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/document/OfficeDocument.pyc
�
�\Ofc@s�ddlZddlZddlmZmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ejd	�Zejd
�Zejd�Zejd�Zd
efd��YZdS(i����N(tsystemPathToFileUrlt
absolutizei(tDesktop(tWindowDescriptor(t	Rectangle(tTOP(tErrorCodeIOExceptions'com.sun.star.awt.WindowAttribute.BORDERs)com.sun.star.awt.WindowAttribute.SIZEABLEs)com.sun.star.awt.WindowAttribute.MOVEABLEs4com.sun.star.awt.VclWindowPeerAttribute.CLIPCHILDRENtOfficeDocumentcBs�eZdZd�Zed��Zd�Zed��Zedd��Zed��Z	ed��Z
ed	��Zd
�Zd�Z
ed��Zed
��Zd�ZRS(s)Creates a new instance of OfficeDocument cCs
||_dS(N(txMSF(tselft_xMSF((sA/usr/lib64/libreoffice/program/wizards/document/OfficeDocument.pyt__init__*scCs�y�ttd��}tjd�|d<d|d_||d_tjd�|d<d|d_||d_tj|jd|tjdt	|��f�Wnt
k
r�tj�nXdS(	Nis com.sun.star.beans.PropertyValueit	EventTypeitScriptt
replaceByNames"[]com.sun.star.beans.PropertyValue(
tlisttrangetunotcreateUnoStructtNametValuetinvoketEventstAnyttuplet	Exceptiont	tracebackt	print_exc(R	t
xComponentt	EventNameRtEventURLtoEventProperties((sA/usr/lib64/libreoffice/program/wizards/document/OfficeDocument.pytattachEventCall-s






cCspyN|dk	rM|jj}|j�r7|jt�ntj|d|�nWntk
rkt	j
�nXdS(Ns
.uno:CloseDoc(tNonetCurrentControllertFramet
isModifiedtsetModifiedtFalseRtdispatchURLtPropertyVetoExceptionRR(R	RRtxFrame((sA/usr/lib64/libreoffice/program/wizards/document/OfficeDocument.pytdispose@s
cCs�ttd��}tjd�|d<d|d_|rHt|d_n
t|d_tjd�|d<d|d_|r�t|d_n
t|d_d|}d}y"|j	|ddt
|��}Wntk
r�tj
�nX|S(	Nis com.sun.star.beans.PropertyValueitReadOnlyitPreviewsprivate:factory/t_self(RRRRRtTrueRR&R!tloadComponentFromURLRRRR(R	tframet
sDocumentTypetpreviewtreadonlyt
loadValuestsURLR((sA/usr/lib64/libreoffice/program/wizards/document/OfficeDocument.pytcreateNewDocumentUs*







t_blankcCs�d}|j�dj�kr3|j||�}nVtj|�}|j|d�}|dk	r�|j�}|j|�|j|�n|S(NtWIZARD_LIVE_PREVIEWi(	R!tlowertcreateNewPreviewFrameRt
getDesktopt	findFramet	getFramestremovetaddTerminateListener(R	Rtlistenert	FrameNameR)txFtxFF((sA/usr/lib64/libreoffice/program/wizards/document/OfficeDocument.pytcreateNewFramers
cCs;d}y|jd�}Wntk
r6tj�nXt�}t|_d|_d|_	d|_
tdddd�|_t
ttt}||_d}y|j|�}Wntk
r�tj�nXd}y|jd�}Wntk
rtj�nX|j|�|dk	r7tj|�j|�n|S(Nscom.sun.star.awt.Toolkittwindowi����i
i�i�scom.sun.star.frame.Frame(R!tcreateInstanceRRRRRtTypetWindowServiceNametParentIndextParentRtBoundst'com_sun_star_awt_WindowAttribute_BORDERt)com_sun_star_awt_WindowAttribute_MOVEABLEt)com_sun_star_awt_WindowAttribute_SIZEABLEt4com_sun_star_awt_VclWindowPeerAttribute_CLIPCHILDRENtWindowAttributestcreateWindowtIllegalArgumentExceptiont
initializeRR;R?(R	RR@txToolkittaDescriptortgnDefaultWindowAttributestxPeerR)((sA/usr/lib64/libreoffice/program/wizards/document/OfficeDocument.pyR:�s8
						


cCshd}y@|jd�s't|�}n|j||dt|��}Wntk
rctj�nX|S(Nsfile://i(R!t
startswithRR/RRRR(R	t
xInterfaceR5tsFrametxValuesR((sA/usr/lib64/libreoffice/program/wizards/document/OfficeDocument.pytload�s
cCs+y�t|�r�ttd��}tjd�|d<d|d_||d_tjd�|d<d|d_|jd�|d_nttd��}t|�}||j	d�d }||j	d�d}|j
t||�t|��t
SWn-tk
rt
Stk
r&tj�tSXdS(	Nis com.sun.star.beans.PropertyValueit
FilterNameitInteractionHandlers+com.sun.star.comp.uui.UUIInteractionHandlert/(tlenRRRRRRRFRtrfindt
storeToURLRRR.RRRRR&(R	RRt	StorePathR]toStorePropertiestsPathtsFile((sA/usr/lib64/libreoffice/program/wizards/document/OfficeDocument.pytstore�s2







cCskt}|dk	rWy|jt�t}Wqgtjjjjk
rSdGHt}qgXn|j	�t}|S(Nscould not close doc(
R&R!tcloseR.tcomtsuntstartutiltCloseVetoExceptionR*(R	RtbState((sA/usr/lib64/libreoffice/program/wizards/document/OfficeDocument.pyRh�s



cCs�ym|j}|dkrl|dj}|dkrl|j||||d||d�}|j|�qlnWntk
r�tj�nXdS(Nii(tlengthtgetCellRangeByPositiontsetDataArrayRRR(R	tdatalisttoTabletxpostypostrowcounttcolcountt	xNewRange((sA/usr/lib64/libreoffice/program/wizards/document/OfficeDocument.pytArraytoCellRange�s	

cCs�|jd�}ttd��}tjd�|d<d|d_||d_|jt|�t	�d}|dkrzdS|j|�SdS(Ns#com.sun.star.document.TypeDetectionis com.sun.star.beans.PropertyValueitURLt(RFRRRRRRtqueryTypeByDescriptorRR.R!t	getByName(R	txmsfturlt
typeDetectt
mediaDescrRG((sA/usr/lib64/libreoffice/program/wizards/document/OfficeDocument.pytgetFileMediaDecriptors	


cCs|jd�}|j|�S(Ns#com.sun.star.document.TypeDetection(RFR}(R	R~ttypeR�((sA/usr/lib64/libreoffice/program/wizards/document/OfficeDocument.pytgetTypeMediaDescriptors	cCstj||||�S(N(tSystemDialogtshowMessageBox(R	RtwindowServiceNametwindowAttributetMessageText((sA/usr/lib64/libreoffice/program/wizards/document/OfficeDocument.pyR�s(t__name__t
__module__t__doc__RtclassmethodR R*R6RDR:R\RgRhRyR�R�R�(((sA/usr/lib64/libreoffice/program/wizards/document/OfficeDocument.pyR's		3
!		(RRt	unohelperRRtcommon.DesktopRtcom.sun.star.awtRRtcom.sun.star.awt.WindowClassRtcom.sun.star.taskRtgetConstantByNameRLRNRMROtobjectR(((sA/usr/lib64/libreoffice/program/wizards/document/OfficeDocument.pyt<module>s