HEX
Server: Apache
System: Linux opal14.opalstack.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User: curbgloabal_opal (1234)
PHP: 8.1.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib64/libreoffice/program/wizards/web/WWD_Events.pyc
�
�\Ofc@s@ddlZddlmZddlTddlmZddlmZddlmZdd	l	m
Z
dd
lmZddl
mZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZdefd��YZdS(i����Ni(tWWD_Startup(t*i(t
FileAccess(t
Configuration(tListModelBinder(tTask(t
CGDocument(t	CGSession(tProcessStatusRenderer(t	FTPDialog(tErrorHandler(tAbstractErrorHandler(tProcessErrorHandler(tProcess(tBackgroundsDialog(tIconsDialog(t
TOCPreview(tNoSuchElementExceptiont
WWD_EventscBsDeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!e#fd"��YZ$RS(#s{
    He - my constructor !
    I add a window listener, which, when
    the window closes, deletes the temp directory.
    cCsPtt|�j|�d|_t|_d|_d|_d|_	d|_
dS(Nti(tsuperRt__init__tcurrentSessiontTruetexitOnCreatetcounttNonetbgDialogticonsDialogt
docPreview(tselftxmsf((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyR;s					cCsdS(N((RtnOldSteptnNewStep((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyt	leaveStepDscCs�|dkr�d}|jjj}t|�dksC|ddkrLd}n|jjj|d�j}||jk	r�|j	|�q�ndS(NiRi(
tlstLoadSettingstModelt
SelectedItemstlentsettingstcp_SavedSessionstgetElementAttcp_NameRtloadSession(RtoldtnewStept
sessionToLoadts((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyt	enterStepGs"	cCsH|j|j�j}|j|jt|�dko@|ddk�dS(Ni(tgetModelR#R%t
setEnabledt
btnDelSessionR&(RR/((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pytsessionSelected^scCsy�|j�}tddd�}|j|||jj�|j�|jg�tg�|jj	_
tg�|jj	_|dkr�tj
|jtdt�}n.tj
|jtdt�}tj||�}t�}|j|j�|j|t�|jjj�}|j|dd�|jt�|dkrM|j|�n|j||t|j�|j �||_!x)|j"�|j#�kr�|jt�q|W|j$|�Wn t%k
r�}|j&|�nXy|j'�|j(�Wnt%k
rt)j*�nXdS(NtLoadDocsRi
s/DefaultSessions/SavedSessionsii(+tgetStatusDialogRtexecutet	resourcestresLoadingSessiontstarttsetSelectedDocttupletlstDocumentsR$R%tStringItemListRtgetConfigurationRoottxMSFtCONFIG_PATHtFalsetgetNodeRtsetRootR'treadConfigurationtCONFIG_READ_PARAMt
cp_Contenttcp_DocumentstgetSizetsetMaxtadvanceRtsetSaveSessionNametmountt
xUnoDialogt
checkStepsRt	getStatustgetMaxtremoveTaskListenert	ExceptiontunexpectedErrortrefreshStylePreviewtupdateIconsetTextt	tracebackt	print_exc(RR.tsdttasktviewtsessiontnumDocstex((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyR+fsF

	

	

cCs�|jjj}|jdkr"dS|ddkr6dStj|j|jj|j	j
tj�}|r~y�|j
jj|d�}tj|jtd|�|j
jj|d�|j
jj|dd�dg}|j
jj�|dkr|d|d<nIt|dd�|d<|ddkr>t|jj_n||jj_Wq~tk
rz}tj�|j|�q~XndS(Nis/SavedSessionsi(R#R$R%tlengthRtshowMessage1R@RNtPeerR8tresDelSessionConfirmR
tERROR_QUESTION_NOR'R(tgetKeyRt
removeNodeRAtremovet
savedSessionsRItshortRBR3tEnabledRSRWRXRT(RtselectedtconfirmtnametnextSelectedR^((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyt
delSession�s2	
cCs|jS(N(tselectedDoc(R((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pytgetSelectedDoc�scCs�|j|j�}|j|�}|dkr=|jg�n=|dks[|j|jkrz|j|jj|j��nt|�|_|dk	r�|j||j	�|j
�ndS(N(tgetDocRoRtfillExportListtappTypeR'tgetExporterstlistt	mountListtdocAwaretdisableDocUpDown(RR/toldDoctdoc((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyR;�scCs#y|j�jt|jjj�}|dkr4dStddt|�d�}t|�t	kr�|j
�}|j|jj
�|j|||jj�|j|j|j|||�}|j�|j|�n+|j|j|j|||�}|j�Wntk
rtj�nXdS(NRi(tgetDocAddDialogtcallOpenDialogRR'tcp_DefaultSessiontcp_InDirectoryRRR&tMIN_ADD_FILES_FOR_DIALOGR6tsetLabelR8tresValidatingDocumentsR7tprodNameR5R@RNt
loadDocumentsRRRSRWRX(RtfilesRZRYt	oLoadDocs((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pytaddDocument�s"!
!
cCs�t|j�dkrdS|jjjjj|jd�x0|jd|j�krk|jdcd8<q<W|jddkr�g|_n|jj	�|j
�dS(Niii����(R&RoR'R}RGRHRftgetDocsCountt	docListDAtupdateUIRO(R((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pytremoveDocument
s
cCs�|jjjjj|jd�}|jjjjj|jd�|jjjjj|jdd|�|jj	�|j
�dS(Nii(R'R}RGRHR)RoRftaddR�R�Rx(RRz((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pytdocUp!s
cCs�|jjjjj|jd�}|jjjjj|jd�|jjjjj|jdd|�|jj	�|j
�dS(Nii(R'R}RGRHR)RoRfR�R�R�Rx(RRz((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pytdocDown/s
cCs�z�y�|j|jt�|jdkrbt|j|jj|j	�|_|jj
|jj�n|jj
|jjjj�|jj|�}|dkr�|j|jj��nWntk
r�tj�nXWd|j|jt�XdS(Ni(R2tbtnBackgroundsRBRRRR@R'tcp_BackgroundImagesR8tcreateWindowPeerRNRatsetSelectedR}t	cp_Designtcp_BackgroundImagetexecuteDialogFromParentt
setBackgroundtgetSelectedRSRWRXR(Rti((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pytchooseBackgroundCs 	
cCs5|dkrd}n||jjj_|j�dS(NR(RR'R}R�R�RU(Rt
background((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyR�[s	cCs�z�y�|j|jt�|jdkrbt|j|jj|j	�|_|jj
|jj�n|jj
|jjjj�|jj|�}|dkr�|j
|jj��nWntk
r�tj�nXWd|j|jt�XdS(Ni(R2tbtnIconSetsRBRRRR@R'tcp_IconSetsR8R�RNRat
setIconsetR}R�t
cp_IconSetR�t
getIconsetRSRWRXR(RR�((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyt
chooseIconsetgs 	
cCs ||jjj_|j�dS(N(R'R}R�R�RV(Rticon((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyR�scCsK|dkrdS|j|�}||_t|_|j|�t|_|S(N(RtgetPublishertcp_URLRt
cp_PublishtupdatePublishUItoverwriteApproved(Rt	publisherturltnumbertp((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyt
setPublishUrl�s		
	cCs4|j|j�|j|dj�|j�dS(Ni(tpubAwareR�tcheckPublish(RR�((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyR��scCs5|jdd|jjj�}|jt|d�dS(NsLocal destination directoryRi(tshowFolderDialogR'R}tcp_OutDirectoryR�tLOCAL_PUBLISHER(Rtfolder((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pytsetPublishLocalDir�scCs>|j|jt��r:t|jt�_|jd�ndS(Ni(t
showFTPDialogR�t
FTP_PUBLISHERRR�R�(R((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyt
setFTPPublish�scCsCy |j|�j|�dkSWntk
r>tj�tSXdS(Ni(tgetFTPDialogR7RSRWRXRB(Rtpub((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyR��s
 

cCsV|j�}|j|jjj|jj�}|jt|d�t	|j
t�_dS(Ni(tgetZipDialogtcallStoreDialogR'R}R�R8tresDefaultArchiveFilenameR�t
ZIP_PUBLISHERRR�R�(RRYtzipFile((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pytsetZipFilename�scCs}yV|jdkrBt|j|j|j|jj|j�|_n|jj	|j�Wn t
k
rx}|j|�nXdS(N(RRRR@R'R8tstylePreviewttempDirtmyFrametrefreshRSRT(RR^((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pytdocumentPreview�scCs�t}|jt�}|j�}|jr�|j|jd�}|j|jt	�r,|j
|j�r�|j|jt�}t|�dkr)|j
jjd|�}tj|j|jj|tjtjtjtj�}|s�|Sq)q�|j
jjd|�}tj|j|jj|tj�t	Sq�|j
jjd|�}y(tj|j|jj|tj�}Wntk
r�t j!�nX|s�|Sy|j"j#|j$�Wq�tk
r�|j
j%jd|�}tj|j|jj|tj�t	SXn|jt&�}|jr�|j|j$d�}|j|j$t	�r�|j
|j$�r�|j
j'jd|�}tj|j|jj|tj�t	S|j(s�|j
j)jd|�}tj|j|jj|tj�}|s�t	Sq�q�n|jt*�}|jr�|j|j$d�}|j|jt	�r�|j
|j�r�|j|jt�}t|�dkr�|j
j+jd|�}tj|j|jj|tj,�}|s�|Sq�q�|j
j-jd|�}tj|j|jj|tj�t	Sq�|j
j.jd|�}tj|j|jj|tj�}|s5|Sy|j/|j�Wq�tk
r�|j
j0jd|�}tj|j|jj|tj�t	SXntS(Nis	%FILENAME(1RR�R�t
getFileAccessR�tgetPathR�RtexistsRBtisDirectoryt	listFilesR&R8tresLocalTragetNotEmptytreplaceRtshowMessage2R@RNRaR
tMESSAGE_WARNINGtBUTTONS_YES_NOtDEF_NOt
RESULT_YEStresLocalTargetExistsAsfileR`tERROR_PROCESS_FATALtresLocalTargetCreatetERROR_QUESTION_YESRSRWRXt
xInterfacetcreateFolderR�tresLocalTargetCouldNotCreateR�tresZipTargetIsDirR�tresZipTargetExistsR�tresFTPTargetNotEmptytERROR_QUESTION_CANCELtresFTPTargetExistsAsfiletresFTPTargetCreatetmkdirtresFTPTargetCouldNotCreate(RtresultR�t
fileAccesstpathR�tmessage((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pytpublishTargetApproved�s�	




	
	
	



cCsYy6d}|j�}|jjjj}d}x2||j�kra||j|�_|d7}q0Wt	j
|jtdt
�}yot	j||�}|dk	r�tj|j|jj|jjjd|�tj�s�tSnt	j||�Wntk
rnXd|jj_t	j||�}||jj_|jjj|t�|jjj ||d�t	j!|�|jjj"�t	j
|jtdt�}|jjj#|t�||j_$||_%||j_$|j&�t'j(|j)|jjj*d�t'j+|j,|jj-j*d�|j.�|jj$|_%t
SWnt/k
rTt0j1�tSXdS(Niis/SavedSessionss${NAME}tcp_Index(2RtgetSessionSaveNameR'R}RGRHRIR)R�RR?R@RARRCRR`RNRaR8tresSessionExistsR�R
tERROR_NORMAL_IGNORERBReRt
addConfigNodeR*twriteConfigurationRFR(t
reindexSettcommittclearREtcp_LastSavedSessionRtprepareSessionListsRtfillListR#tchildrenListtfillComboBoxtcbSaveSettingsRgt
selectSessionRSRWRX(RtnodeRltdocsR�tconftconfView((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pytsaveSession�s^



	



cCs=|j|�}|jr5d|j�j|jd�SdSdS(Ns
R(R�R�R�R�R�R(RR�R�((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyttargetStringFor�s	cCs�|jj�r�|jt�|jt�|jt�}|jjjd|�}t	j
|j|jj
|tj�|jr�|jj�q�n(t	j
|j|jj
|jjtj�dS(Ns	%FILENAME(tprocesst	getResultR�R�R�R�R8tresFinishedSuccessR�RR`R@RNRaR
t
ERROR_MESSAGERt
endExecutetresFinishedNoSuccesst
ERROR_WARNING(RttargetsR�((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pytfinishWizardFinished�s	cCs|jj�dS(N(RNR�(R((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pytcancel�scCs
|jt�S(N(t
finishWizard1R(R((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pytfinishWizard�scCs�||_|jt�}|jrr|jrr|jdksI|jdkrr|j|�r||jd�|j	�Sn
|j	�SdS(NRi(
RR�R�R�tproxiestpasswordRR�R�t
finishWizard2(Rt
exitOnCreate_R�((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyR�s	1

cCs\|jt�}|j|_|jt�}|jjdd�}|jdd�}d|d|_|jt�}tj|�|_|j	�s�t
S|jr�|j|_
n|j�r�|j�s�t
Snd|j_yBtj|jtt�}tj|jjd|�tj|�Wntk
r5tj�nX|jrKt
|_
n|jt�}|j�j|jt
�r�|j�j|j�ny�t|j|j j!|j"�}t#|j|j|�|_$|j%�}|j&t'|j"��|j(||j$j)|j"j*�|j$j+�|j,�|j$j)j-|�tSWntk
rWtj�nXdS(Nt%s%25t/s%2Fsvnd.sun.star.zip://RtLastSavedSession(.R�R�R�R�R�R�R�R	tgetFullURL1R�RBRtftpR�t
isSaveSessionR�R'R�RR?R@RARtsetR�RSRWRXR�R�tdeleteRRNRaR8R
R�R6tsetRendererRR7tmyTaskR�t
runProcessRRR(RR�turl1R�tehtpd((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyR	sT	
		


cCs�y�|jj�|jj�|jdk	r?|jjj�n|jdk	ra|jjj�n|jdk	r�|jjj�n|jj�|j	j
t�Wntk
r�t
j�nXdS(N(tdpStylePreviewtdisposeR�tcleanupRRRNRt	ftpDialogR�tcloseRBRSRWRX(R((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyR^s



R5cBseZd�Zd�ZRS(cCs1||_||_||_||_||_dS(N(R@txCR�tparentRZ(RRtxC_tfiles_ttask_tparent_((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyRws
				cCs�t|jj�dkr,|jjddn|jj�}d}tj|jd�|jjj_	x�t
dt|j��D]�}t�}|j|jj�|j||_
|jj||j|j�r�|||}|jjjjjj||�q||d7}q|Wt|j�|kr5|jj|g�n|jjj�|jj�x2|jj�|jj�kr�|jjt�qUWdS(Nii(R&RRoR�RtgetParentDirR�R'R}R~trangeRRDR�t
checkDocumentRZRRGRHR�R;R�R�RORPRQRKRB(RtoffsettfailedR�Rztindex((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyR�~s";"	"
!(t__name__t
__module__RR�(((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyR5us	(%R'R(t__doc__RR"R0R4R+RnRpR;R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RRRRRRtobjectR5(((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyR3sD						-	4			"																�	8						U	(RWRtWebWizardConsttcommon.FileAccessRtcommon.ConfigurationRtui.event.ListModelBinderRt
ui.event.TaskRtdata.CGDocumentRtdata.CGSessionRRR	R
RRR
RRRtcom.sun.star.containerRR(((s8/usr/lib64/libreoffice/program/wizards/web/WWD_Events.pyt<module>s&