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/common/SystemDialog.pyo
�
�\Ofc@s�ddlZddlmZddlmZmZddlmZddlmZddl	m
Z
ddlmZdd	l
mZd
efd��YZdS(i����Ni(tDesktop(tFILESAVE_AUTOEXTENSIONtFILEOPEN_SIMPLE(tCHECKBOX_AUTOEXTENSION(tWindowDescriptor(tMODALTOP(tIllegalArgumentException(tOKtSystemDialogcBs�eZd�Zed��Zed��Zed��Zed��Zd�Zdd�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zeddd
��Zedd��Zed��ZRS(cCs�yk||_|j|�|_|j|�|_|jdk	rjt|jd�rj|jj|f�qjnWntk
r�t	j
�nXdS(Nt
initialize(txMSFtcreateInstancetsystemDialogtcreateStringSubstitutiontxStringSubstitutiontNonethasattrR	t	Exceptiont	tracebackt	print_exc(tselfR
tServiceNametType((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pyt__init__ s	
cCst|dt�S(Ns"com.sun.star.ui.dialogs.FilePicker(RR(Rtxmsf((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pytcreateStoreDialog.scCst|dt�S(Ns"com.sun.star.ui.dialogs.FilePicker(RR(RR((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pytcreateOpenDialog4scCst|dd�S(Ns$com.sun.star.ui.dialogs.FolderPickeri(R(RR((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pytcreateFolderDialog9scCst|dd�S(Ns*com.sun.star.ui.dialogs.OfficeFolderPickeri(R(RR((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pytcreateOfficeFolderDialog>scCs@y|jj|t�}|SWntk
r;tj�|SXdS(N(RtsubstituteVariablestFalseRRR(Rtpathts((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pytsubstCs

cCs�|dk	r&|j|d|t�nd|_yt|jjtdt�|jj|�|jj|j	|��|j
|j�r�|jj�}|d|_nWntk
r�t
j�nX|jS(Ni����i(RtaddFilterToDialogtTruet
sStorePathRtsetValueRtsetDefaultNametsetDisplayDirectoryR!texecutetgetFilesRRR(Rt
displayDirtdefaultNamet	sDocuTypet	sPathList((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pytcallStoreDialogKs	
cCs�y|jj|j|��Wn/tk
rN}tj�t|j���nX|jj|�|jj	|�|j
|j�r�|jj�SdSdS(N(
RR'R!RRRtAttributeErrort
getMessagetsetTitletsetDescriptionR(tgetDirectoryR(RttitletdescriptionR*tiae((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pytcallFolderDialog]s	

cCs|j�dkS(Ni(R((Rt
execDialog((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pyR(lscCsnyL|jj|�|jj|j|��|j|j�rK|jj�SWntk
ritj�nXdS(N(
RtsetMultiSelectionModeR'R!R(tgetSelectedFilesRRRR(RtmultiSelecttdisplayDirectory((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pytcallOpenDialogos
cCsRy0|j|�}d|}|j|||�Wntk
rMtj�nXdS(Ns*.(tgetFilterUINamet	addFilterRRR(Rt
sExtensiont
filterNametsetToDefaulttuiNametpattern((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pyR"{s

cCsRy0|jj||�|r/|jj|�nWntk
rMtj�nXdS(N(RtappendFiltertsetCurrentFilterRRR(RRCRDRB((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pyR?�s
cCs�y�|jjd�}|j|�}t|�}xB|D]:}|dk	r7|jdkr7t|j�jdd�Sq7Wt	d|��Wnt
k
r�tj�dSXdS(Ns#com.sun.star.document.FilterFactorytUINames
%productname%tLibreOffices%UIName property not found for Filter (
R
Rt	getByNametlistRtNametstrtValuetreplacetNullPointerExceptionRRR(RRAtoFactorytoObjecttxPropertyValueti((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pyR>�s		


c
Cs�ddlm}|||�}|j|�}	|	jdd�}	|	jtd�d�}	|ry|ry|	j||�}	n|j|dt|	�S(Ni(tResources%PRODUCTNAMERHi
s<BR>tErrorBox(RTt
getResTextRNRLtshowMessageBoxR(
RR
tResNamet	ResPrefixtResIDtAddTagt	AddStringRTt	oResourcet
sErrorMessage((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pytshowErrorBox�scCs�|dkrdSd}y�|dkrCtj|�}|j�}n|jd�}t�}	||	_||	_t|	_	||	_
|j|	�}
||
_|
j
�}|
j�Wntk
r�tj�nX|S(Niscom.sun.star.awt.Toolkit(RRtgetActiveFrametgetComponentWindowRRtWindowServiceNametParentRRtWindowAttributestcreateWindowtMessageTextR(tdisposeRRR(RR
twindowServiceNametwindowAttributeRftpeertiMessagetxFrametxToolkittoDescriptortxMsgPeer((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pyRW�s(						
cCs@d}y|jd�}|SWntk
r;tj�dSXdS(Ns"com.sun.star.util.PathSubstitution(RRRRR(RR
t
xPathSubst((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pyR
�s	

N(t__name__t
__module__RtclassmethodRRRRR!RR.R7R(R=R"R?R>R_RWR
(((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pyRs$						
		(RRt+com.sun.star.ui.dialogs.TemplateDescriptionRRt4com.sun.star.ui.dialogs.ExtendedFilePickerElementIdsRtcom.sun.star.awtRtcom.sun.star.awt.WindowClassRtcom.sun.star.langRt'com.sun.star.awt.VclWindowPeerAttributeRtobjectR(((s=/usr/lib64/libreoffice/program/wizards/common/SystemDialog.pyt<module>s