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/TextSectionHandler.pyo
�
�\Ofc@s2ddlZddlZdefd��YZdS(i����NtTextSectionHandlercBsteZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
dd	�Zd
�Z
d�Z
RS(
s,Creates a new instance of TextSectionHandlercCs"||_||_|j|_dS(N(txMSFDoct
xTextDocumenttTexttxText(tselftxMSFR((sA/usr/lib64/libreoffice/program/wizards/text/TextSectionHandler.pyt__init__s		cCsfyD|jj}|j|�rC|jjj|�}|j|�nWntk
ratj�nXdS(N(RtTextSectionst	hasByNamet	getByNametremoveTextSectiont	Exceptiont	tracebackt	print_exc(RtSectionNametxAllTextSectionstoTextSection((sA/usr/lib64/libreoffice/program/wizards/text/TextSectionHandler.pytremoveTextSectionbyNames	
cCs|jj}|j|�S(N(RRR	(RRR((sA/usr/lib64/libreoffice/program/wizards/text/TextSectionHandler.pythasTextSectionByName(scCsXy6|jj}|j|j�d�}|j|�Wntk
rStj�nXdS(Ni(RRt
getByIndextgetCountRRR
R(RRR((sA/usr/lib64/libreoffice/program/wizards/text/TextSectionHandler.pytremoveLastTextSection,s
cCs6y|jj|�Wntk
r1tj�nXdS(N(RtremoveTextContentRR
R(Rt
_oTextSection((sA/usr/lib64/libreoffice/program/wizards/text/TextSectionHandler.pyR5s
cCs�yz|jj}|j�}|d}xQ|dkrx|j|�}t|jd��sk|jj|�n|d8}q(WWntk
r�t	j
�nXdS(Niit	IsVisible(RRRRtbooltgetPropertyValueRRRR
R(RRtTextSectionCounttitxTextContentTextSection((sA/usr/lib64/libreoffice/program/wizards/text/TextSectionHandler.pytremoveInvisibleTextSections;s

cCs�y_|jjj}|jj}x=t|ddd�D]%}|j|�}|jj|�q5WWntk
r|tj	�nXdS(Nii����(
RRtCounttrangeRRRRR
R(RRRRR((sA/usr/lib64/libreoffice/program/wizards/text/TextSectionHandler.pytremoveAllTextSectionsIs
cCs]y;tjd�}d|_tj|dd|dff�Wntk
rXtj�nXdS(Ns!com.sun.star.text.SectionFileLinkttsetPropertyValuestFileLinkt
LinkRegion(R%R&(tunotcreateUnoStructtFileURLtinvokeRR
R(RRtoSectionLink((sA/usr/lib64/libreoffice/program/wizards/text/TextSectionHandler.pytbreakLinkOfTextSectionSs	
cCs�yz|s!|jjj|�}ntjd�}||_tj|dd||ff�|j}||k	ry||_nWntk
r�t	j
�nXdS(Ns!com.sun.star.text.SectionFileLinkR$R%R&(sFileLinks
LinkRegion(RRR
R'R(R)R*tNameRR
R(RtTemplateNameRRR+tNewSectionName((sA/usr/lib64/libreoffice/program/wizards/text/TextSectionHandler.pytlinkSectiontoTemplate]s		
cCs�yk|r>|jj�}|jj|tjt�|j�n|jj�}|jt�t|||�Wnt	k
r�t
j�nXdS(N(RtcreateTextCursortinsertControlCharactertControlCharactertPARAGRAPH_BREAKtFalset
collapseToEndtgotoEndtinsertTextSectiontIllegalArgumentExceptionR
R(Rt	GroupNameR.t_bAddParagraphtxTextCursortxSecondTextCursor((sA/usr/lib64/libreoffice/program/wizards/text/TextSectionHandler.pyR8os	


cCs�yl|jjj|�r0|jjj|�}n+|jjd�}|j�j||t�t	|||�Wnt
k
r�tj�nXdS(Nscom.sun.star.text.TextSection(
RRR	R
RtcreateInstancetgetTexttinsertTextContentR5R0RR
R(RtsectionNamettemplateNametpositiontxTextSection((sA/usr/lib64/libreoffice/program/wizards/text/TextSectionHandler.pyR8}s		

N(t__name__t
__module__t__doc__RRRRRRR"R,tNoneR0R8(((sA/usr/lib64/libreoffice/program/wizards/text/TextSectionHandler.pyRs								
		(R'R
tobjectR(((sA/usr/lib64/libreoffice/program/wizards/text/TextSectionHandler.pyt<module>s