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/text/TextDocument.pyo
�
�\Ofc@s�ddlZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZdd	l
mZdd
lmZddlmZddlmZd
efd��YZdS(i����N(tdatei(tTextFieldHandleri(tOfficeDocument(tDesktop(t
Configuration(tNumberFormatter(tDATE_SYS_DDMMYY(tENTIRE_PAGE(tDIRECT_VALUEtTextDocumentcBs�eZd
d
d
d
d
d
d
d�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
ed��Zed	��Z
d
�Zdefd��YZRS(c	CsV||_d|_|dk	r7|dk	rFtj|||�|_dS|dk	rtj||�|_|j|t�|_q5|dk	r�tj	|�|_
tj||�|_tjttd|�|_tj
�|_|jj|_|jj}	dStj	|�|_
|j
j�|_|jj�j|_n�|dk	ry�|jd�|_|jj�|jj|j�tj	|�}
ttd��}d|d<d|d<|j|d<t|d<|
jddd|�|jjj|_Wq5tk
r
t j!�q5Xn'|dk	r5|jj|_||_n|rH|j"�n|j#�dS(	Nt_selfscom.sun.star.text.TextDocumentitModelii����sprivate:objectt_blank($txMSFtNonet
xTextDocumentRtcreateNewFrametxFramet
loadAsPreviewtTrueRt
getDesktoptxDesktoptloadtURLtgetComponentWindowtxWindowPeertDocumentPropertiestm_xDocPropst
CharLocaletgetActiveFramet
getControllerRtcreateInstancetinitNewt
setIdentifiert
IdentifiertlisttrangeRtloadComponentFromURLtCurrentControllertFramet	Exceptiont	tracebackt	print_exctshowStatusIndicatortinit(tselfR
tlistenertbShowStatusIndicatort	FrameNamet_sPreviewURLt_moduleIdentifiert
_textDocumenttxArgsRRtloadArgs((s;/usr/lib64/libreoffice/program/wizards/text/TextDocument.pyt__init__"s\		
	






cCsC|jj�|_|jj|_|jj|_|jj|_dS(N(	RRRRRRRtTexttxText(R-((s;/usr/lib64/libreoffice/program/wizards/text/TextDocument.pyR,jscCs9|jj�|_|jjdd�|jjd�dS(Ntidi(RtcreateStatusIndicatortxProgressBartstarttsetValue(R-((s;/usr/lib64/libreoffice/program/wizards/text/TextDocument.pyR+pscCs6ttd��}tjd�|d<d|d_t|d_tjd�|d<d|d_|rut|d_n
t|d_tjd�|d<d|d_t|d_tj	|j
|d	|�|_|j�|_
yt|jjj_Wntk
rtj�nXt|j|j�}|j�|jS(
Nis com.sun.star.beans.PropertyValueitReadOnlyit
AsTemplateitPreviewR
(R#R$tunotcreateUnoStructtNameRtValuetFalseRRRRtgetPageSizetDocSizeRR&tViewSettingstZoomTypeR(R)R*RR
tupdateDocInfoFields(R-tsDefaultTemplatet
asTemplatet
loadValuestmyFieldHandler((s;/usr/lib64/libreoffice/program/wizards/text/TextDocument.pyRus2










cCsXy5|jj}|jd�}|jd�}|jSWntk
rStj�dSXdS(Nt
PageStyless
First Page(Rt
StyleFamiliest	getByNametSizeR(R)R*R(R-txNameAccesstxPageStyleCollectiont
xPageStyle((s;/usr/lib64/libreoffice/program/wizards/text/TextDocument.pyRF�s

cCs|j�}|S(N(tcreateTextCursor(R-toCursorContainertxTextCursor((s;/usr/lib64/libreoffice/program/wizards/text/TextDocument.pyRV�scCs|jj�dS(N(Rtrefresh(R-((s;/usr/lib64/libreoffice/program/wizards/text/TextDocument.pyRY�scCs�y^tj|jdt�}|jd�}|jd�}t|�dt|�}tjtj��}tjd|�}tjd|�}	tjd|�}
t	t
|�t
|	�t
|
��}|j|j|j�}|j
t�}
|j|
|�}|jj}||_||_|j}|d|}|jd|�}|jd	|�}||_Wntk
r{tj�nXdS(
Ns /org.openoffice.UserProfile/Datat	givennametsnt s%Ys%ms%ds
<wizard_name>s<current_date>(RtgetConfigurationRootR
RERQtstrttimet	localtimetstrftimetdateTimeObjecttintt	DateUtilsRt	getFormatRtformatRtAuthort
ModifiedBytDescriptiontreplaceR(R)R*(R-t
WizardNametTemplateDescriptiontxNAtgnR[tfullnametnowtyeartmonthtdayt
dateObjecttdutfftmyDatet
xDocProps2tdescription((s;/usr/lib64/libreoffice/program/wizards/text/TextDocument.pytsetWizardTemplateDocInfo�s0$			

cCs,|j�}|j�}|j�|j�S(N(tgetCurrentControllert
getViewCursortjumpToLastPagetgetPage(R-tmodeltxControllertxPC((s;/usr/lib64/libreoffice/program/wizards/text/TextDocument.pytgetPageCount�s
cCs&|jj|�r"|jj|�SdS(N(t
TextFramest	hasByNameRQR(R-t
sFrameNametxTD((s;/usr/lib64/libreoffice/program/wizards/text/TextDocument.pytgetFrameByName�scCs�|jj�}|dkr+|jd�n|dkrG|jd�n|jdt�|jdt�g}|jj|�}x3tt|j��D]}|j	|j
|��q�W|S(Nis<[^>]+>is#[^#]+#tSearchRegularExpressiontSearchWords(RtcreateSearchDescriptortsetSearchStringtsetPropertyValueRtfindAllR#R$tCounttappendt
getByIndex(R-t
typeSearchtsdtauxListtallItemsti((s;/usr/lib64/libreoffice/program/wizards/text/TextDocument.pytsearchFillInItems�sRdcBs#eZd�Zd�Zd�ZRS(cCs[||_|jj�}|j}t|j|j|j�|_tj	||j�|_
dS(N(tformatSuppliertgetNumberFormatSettingstNullDateRbtYeartMonthtDaytcalendarRtcreateNumberFormattert	formatter(R-txmsftdocumenttformatSettingsR((s;/usr/lib64/libreoffice/program/wizards/text/TextDocument.pyR6�s			cCstj|j|�S(N(RtgetNumberFormatterKeyR�(R-Rf((s;/usr/lib64/libreoffice/program/wizards/text/TextDocument.pyRescCs#||j}|jj||j�S(N(R�R�tconvertNumberToStringtdays(R-tformatIndexRt
difference((s;/usr/lib64/libreoffice/program/wizards/text/TextDocument.pyRfs
(t__name__t
__module__R6ReRf(((s;/usr/lib64/libreoffice/program/wizards/text/TextDocument.pyRd�s	
		N(R�R�RR6R,R+RRFRVRYRztclassmethodR�R�R�tobjectRd(((s;/usr/lib64/libreoffice/program/wizards/text/TextDocument.pyR	 s	F			!	
			#	(RAR)R_tdatetimeRRbRtdocument.OfficeDocumentRtcommon.DesktopRtcommon.ConfigurationRtcommon.NumberFormatterRt#com.sun.star.i18n.NumberFormatIndexRt"com.sun.star.view.DocumentZoomTypeRt com.sun.star.beans.PropertyStateRR�R	(((s;/usr/lib64/libreoffice/program/wizards/text/TextDocument.pyt<module>s