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/agenda/AgendaDocument.pyc
�
�\Ofc@sddlZddlZddlmZddlmZddlmZddlm	Z	ddl
m
Z
ddlmZdd	l
mZmZd
efd��YZdefd
��YZdefd��YZdefd��YZdefd��YZdefd��YZdS(i����Ni(tTextElement(tTextDocument(tTextSectionHandler(t
FileAccess(tdatetime(tTEXT(t	TIME_HHMMtDATE_SYSTEM_LONGtAgendaDocumentcBs�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zed��Zd�Zed��Zed��ZRS(s_
    constructor. The document is *not* loaded here.
    only some formal members are set.
    cCsPtt|�j||dd�||_||_||_i|_g|_dS(NtWIZARD_LIVE_PREVIEW(	tsuperRt__init__tNonetagendattemplateConstst	resourcestitemsMaptallItems(tselftxmsfR
RRtlistener((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyRPs				cCsc|j|�|_|j|t�t|jj_|jj�|j	�|j
�|jj�dS(N(tcalcTemplateNamettemplatet
loadAsPreviewtFalsetxFrametComponentWindowtEnablet
xTextDocumenttlockControllerst
initializetinitializeDatatunlockControllers(RttemplateURL((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pytloadYs


cCs&tjtj|�tj|�d�S(Ni(RtconnectURLstgetParentDirtgetFilename(Rturl((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyRjscCsxx=|jD]2}y|j�Wq
tk
r;tj�q
Xq
W|jd�|jd�|jd�|jd�dS(NttxtTitlettxtDatettxtTimet
cbLocation(titemsTablestwritet	Exceptiont	tracebackt	print_exctredrawTitle(Rti((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyRus



cCsW|jj�y|j|}|j�Wntk
rEtj�nX|jj�dS(N(RRRR,R-R.R/R (RtitemNamet
itemsTable((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pytredraw�s


cCsD||jjkr|jjS||jjkr8|jjS||jjkrT|jjS||jjkrp|jj	S||jj
kr�|jjS||jjkr�|jj
S||jjkr�|jjS||jjkr�|jjS||jjkr�|jjS||jjkr|jjS||jjkr4|jjStd��dS(NsNo such item(RtFILLIN_MEETING_TYPER
tcp_ShowMeetingTypetFILLIN_READtcp_ShowReadtFILLIN_BRINGtcp_ShowBringtFILLIN_NOTEStcp_ShowNotestFILLIN_FACILITATORtcp_ShowFacilitatortFILLIN_TIMEKEEPERtcp_ShowTimekeepertFILLIN_NOTETAKERtcp_ShowNotetakertFILLIN_PARTICIPANTStcp_ShowAttendeestFILLIN_CALLED_BYtcp_ShowCalledBytFILLIN_OBSERVERStcp_ShowObserverstFILLIN_RESOURCE_PERSONStcp_ShowResourcePersonst
ValueError(RR2((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyt
isShowItem�s.










cCsi|_t|jj|jjt|jj|jj|j	��|j|jj<t|jj
|jjt|jj|jj|j	��|j|jj
<t|jj
|jjt|jj|jj|j	��|j|jj
<t|jj|jjt|jj|jj|j	��|j|jj<t|jj|jjt|jj|jj|j	��|j|jj<t|jj|jjt|jj|jj|j	��|j|jj<t|jj|jjt|jj|jj|j	��|j|jj<t|jj|jjt|jj|jj|j	��|j|jj<t|jj|jj t|jj!|jj|j	��|j|jj<t|jj"|jj#t|jj$|jj|j	��|j|jj"<t|jj%|jj&t|jj'|jj|j	��|j|jj%<dS(N((t
itemsCachet
AgendaItemRR5RtitemMeetingTypetPlaceholderElementtreschkMeetingTitle_valuetresPlaceHolderHintRR9t	itemBringtreschkBring_valueR7titemReadtreschkRead_valueR;titemNotetreschkNotes_valueREtitemCalledBytreschkConvenedBy_valueR=titemFacilitatortreschkPresiding_valueRCt
itemAttendeestreschkAttendees_valueRAt
itemNotetakertreschkNoteTaker_valueR?titemTimekeepertreschkTimekeeper_valueRGt
itemObserverstreschkObservers_valueRItitemResourcetreschkResourcePersons_value(R((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pytinitItemsCache�sp			%		%		%		%		%		%		%		%		%		%		cCs�|j|j|j�|_|jj|_|jjt�|_|jjt�|_	|j
�|jd�|_|j
�|j�t|j|j�|_t|�|_dS(sj
        Get the default locale of the document,
        and create the date and time formatters.
        iN(t	DateUtilstxMSFRt	dateUtilst	formattert	getFormatRt
dateFormatRt
timeFormatRgtsearchFillInItemsRtinitializeTitlestinitializeItemsSectionsRttextSectionHandlertTopicsttopics(R((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyRs


cCs]g}xG|jD]<}|jj�j�}||jjkrpt||jj|jj	|j
�|_||_q||jj
kr�t||jj|jj	|j
�|_||_q||jjkr�t||jj|jj	|j
�|_||_q||jjkr?t||jj|jj	|j
�|_||_q|j|�qW||_dS(N(RtStringtlstriptlowerRtFILLIN_TITLEtPlaceholderTextElementRtresPlaceHolderTitleRRRtteTitlettrTitletFILLIN_DATEtresPlaceHolderDatetteDatettrDatetFILLIN_TIMEtresPlaceHolderTimetteTimettrTimetFILLIN_LOCATIONtresPlaceHolderLocationt
teLocationt
trLocationtappend(RtauxListR1ttext((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyRp-s2cCs�|j|j|jj�}g|_xn|D]f}y2|jjt|j|�|j|�|��Wq+t	k
r�t
j�td|��q+Xq+WdS(NsUFatal Error while initialilzing                     Template: items table in section (
tgetSectionsRRt
SECTION_ITEMSR+R�t
ItemsTablet
getSectiontgetTableR-R.R/tAttributeError(RtsectionsR1((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyRqNs	
	)

cCs|jj}|j||�S(N(tTextSectionstElementNamestgetNamesWhichStartWith(RtdocumenttstallSections((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyR�^scCs|jjj|�S(N(RR�t	getByName(Rtname((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyR�bscCs|jjj|�S(N(Rt
TextTablesR�(RR�((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyR�escCsy�|dkr7|jj|j_|jj|j�n�|dkrt|j|jj�|j_|jj|j	�nt|dkr�|jj
|j_|jj|j�n@|dkr�|jj
|j_|jj|j�ntd��Wntk
rtj�nXdS(NR'R(R)R*sNo such title control...(R
tcp_TitleR{tplaceHolderTextR,R|t
getDateStringtcp_DateRR�tcp_TimeR�R�tcp_LocationR�R�tIllegalArgumentExceptionR-R.R/(RtcontrolName((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyR0hs 
cCs8|s
dStj|d�j�}|jj|j|�S(Nts%d/%m/%y(RtstrptimetdateRjtformatRm(RR�t
dateObject((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyR�|scCs(|j|�|j�|jj�dS(N(t
createMinutestdeleteHiddenSectionsRrtremoveAllTextSections(RRt((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pytfinish�s

cCs�|jjj}yQxJ|D]B}|j|�|_t|jj�}|sd|jj_qqWWnt	k
r}t
j�nXdS(NR�(RR�R�R�tsectiontboolt	IsVisibletAnchorRuR-R.R/(RR�R1tvisible((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyR��s

cCs�|jjst|�dkrey%|j|jj�}d|j_Wq�tk
rat	j
�q�Xn0yt|jj�}|j
�|_d}x�|jD]�}|jj�j�}||jjkr�|j||jj|jj�q�||jjkr|j||jj|jj�q�||jjkrV|j|t|jj�|jj�q�||jjkr�|j||jj|jj�q�q�W|jj�x�t t|�d�D]�}||}|j
�}	d}xM|	D]E}|jj�j�}||jj!kr"t||dj"d�q�||jj#krNt||dj"d�q�||jj$krzt||dj"d�q�||jj%kr�d}
y|dj"}
Wntk
r�nX|
dks�|dkr�|dj"}n.t&|�d}||
d7}|t&|�7}t||d�q�q�W|j'j(|jj)�|t|�dkr�|j'j*|jj)|j+t,�q�q�WWntk
r�t	j
�nXdS(NiR�iiis - i�(-R
tcp_IncludeMinutestlenR�RtSECTION_MINUTES_ALLR�RuR-R.R/tintR�RotitemsRvRwtFILLIN_MINUTES_TITLEtfillMinutesItemR�RRztFILLIN_MINUTES_LOCATIONR�R�tFILLIN_MINUTES_DATER�R�R~tFILLIN_MINUTES_TIMER�tcleartxrangetFILLIN_MINUTE_NUMtValuetFILLIN_MINUTE_TOPICtFILLIN_MINUTE_RESPONSIBLEtFILLIN_MINUTE_TIMEtstrRrtremoveTextSectionbyNametSECTION_MINUTEStinsertTextSectionRR(Rt
topicsDatatminutesAllSectionttopicStartTimet	itemIndextitemtitemTextR1ttopicR�t	topicTimettime((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyR��s�





	
		
cCs�|j}|j|�||_|dks7|dkr�|dk	r�|dkr�t|j||jj�}y |jjj	|j|t
�Wq�tk
r�tj
�q�Xq�ndS(NR�(t
ParaStyleNamet	setStringRtcreatePlaceHolderRRRRtStarttTexttinsertTextContenttTrueR-R.R/(RtRangeR�tplaceholdert	paraStyletplaceHolder((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyR�
s	
		
cCs]y|jd�}Wntk
r1tj�dSX||_||_tjdt	�|_
|S(Ns$com.sun.star.text.TextField.JumpEdittshort(tcreateInstanceR-R.R/RtPlaceHoldertHinttunotAnyRtPlaceHolderType(RRtphthintR�((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyR� s


		cCs:g}x-|D]%}|j|�r
|j|�q
q
W|S(N(t
startswithR�(RtallNamestprefixtvR1((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyR�.s

cCs|j}|j||�dS(N(tRowst
insertByIndex(Rttabletstarttcounttrows((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pytinsertTableRows9s	cCs(|j�}t|t|�dd�S(Ni(tgetCellNamesR�R�(RR�tcells((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pytgetRowCountCs(t__name__t
__module__t__doc__RR"RRR4RLRgRRpRqR�R�R�R0R�R�R�R�R�tclassmethodR�R�R�R�(((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyRIs0							 	_		!									j		
R�cBs,eZdZgZdZd�Zd�ZRS(s!
    the items in the table.
    c	Cs�||_|t_||_g|_g}x�|jjD]�}|j}|tjkr�|jj�j	�}|jj
|}|dk	r�|jj|�||jj
|<q�q7|j|�q7W||j_dS(N(R
R�R�R�R�Rt	TextTableRuRwRvRMRR�R(	RR�R�R
tauxR�tttiTexttai((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyROs					cCs�|jj}|jjj|jj||j�|jjj|j�|jj|�t_	|jj
|�|_tj	jd�}t}d}xa|j
D]V}|jj|j�r�t}tj	|_	|j|�|j}|jdt�q�q�W|r�t}nt}||j_|sdS||jkr.dSx^||jkr�|jjd�r�tj	j|j�}d|_|j}|jdt�q1W||jkr�dS|jt�dS(NtA1R�itA(R�tNameR
RrtlinkSectiontoTemplateRtbreakLinkOfTextSectionR�R�R�R�tcreateCursorByCellNameRR�RLR�R�R,t	RangeNametgoRightR�R�t
getCellByNameRut	gotoStart(RR�tcursorR�tcellNameR1tbooleantcell((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyR,qsH
	
				N(R�R�R�R�RR�RR,(((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyR�Hs
	"RscBs;eZdZdZgZdZd�Zd�Zd�Z	RS(sYAnalyze the structure of the Topics table.
    The structure Must be as follows:<br>
    -One Header Row. <br>
    -arbitrary number of rows per topic <br>
    -arbitrary content in the topics row <br>
    -only soft formatting will be restored. <br>
    -the topic rows must repeat three times. <br>
    -in the topics rows, placeholders for number, topic, responsible,
    and duration must be placed.<br><br>
    A word about table format: to reconstruct the format of the table we hold
    to the following formats: first row (header), topic, and last row.
    We hold the format of the last row, because one might wish to give it
    a special format, other than the one on the bottom of each topic.
    The left and right borders of the whole table are, on the other side,
    part of the topics rows format, and need not be preserved separately.
    cCs�g|_||_d|_y"|jj|jjj�t_Wn8tk
rwt	j
�td|jjjd��nXy'i}xK|jjD]=}|j
}|tjkr�|j}|j}|||<q�q�W|jjtj�}t|dd�t_dtdtjd�}dtdtjdd�}	tjj|�}
xT|
j|	ks�tjj|
j�}t||j�}|j�|
jdt�qJWWntk
r�t	j
�nXdS(Ni����s*Fatal error while loading template: table s could not load.iiR�i(tfirstRowFormatR
t
writtenTopicsR�RtSECTION_TOPICSRsR�R-R.R/R�RR�tCelltCellNameR�R�trowsPerTopicR�RRRRRuR,RR(RR
R�R1R�RR�R�t	firstCellt
afterLastCellRtae((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyR�s<				


			

cCs*|j|kr�|jd7_|jjtj�}d|dtj}|tjd}||}|dkr�|jjtj||�nd}tjjdt|��}nAd|tjd}tjjdt|��}|j	|t
�tjj|j�}	t
|	||j�}
|
j�dS(NiiR�(R
R
R�RsR�RR�RR�RRRRRR�R,(RtrowtcolumntdataR�treqRowstfirstRowtdiffRtxctte((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyt	writeCells 
cCs_|dkrd}ntjj}|tjd}|j|kr[|j||j|�ndS(Nii(RsR�R�RtCountt
removeByIndex(RRtt	tableRowsttargetNumOfRows((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pytreduceDocumentToFs	N(
R�R�R�RR�t
lastRowFormatRRRR(((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyRs�s	?	*RycBseZd�Zd�ZRS(cCsAtt|�j|d�||_||_||_g|_dS(NR�(R
RyRR�R�RtxTextContentList(Rt	textRangetplaceHolderText_thint_txmsf_((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyRXs
			cCs�|j|_|jdks*|jdkr�yKtj|j|j|j�}|jj	|�|j
j|j|t
�Wq�tk
r�tj�q�Xn9|jr�x!|jD]}|j
j|�q�Wg|_ndS(NR�(R�RuRRR�RR�R�R!R�R�R�R�R�R-R.R/tremoveTextContent(RR"txTextContentR1((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyR,`s	
	(R�R�RR,(((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyRyVs	RPcBseZd�Zd�ZRS(cCs||_||_||_dS(N(R�R�ttextDocument(RR#R$R(((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyRws		cCs]y;tj|j|j|j�}|jj|j|t�Wnt	k
rXt
j�nXdS(N(RR�R(R�R�R�R�R�R�R-R.R/(RR"R'((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyR,|s	
(R�R�RR,(((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyRPus	RNcBseZd�Zd�ZRS(cCs||_||_||_dS(N(R�tfieldttextElement(Rtname_Rtf((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyR�s		cCsl|j}tjj|�}|j|_|jdt�|jdk	rh|jj
tjj|j��ndS(Ni(RR�R�RR*RuRRR)RR,(RttableCursortcellnameR((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyR,�s	(R�R�RR,(((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyRN�s	(R�R.ttext.TextElementRttext.TextDocumentRttext.TextSectionHandlerRtcommon.FileAccessRRt!com.sun.star.text.PlaceholderTypeRt#com.sun.star.i18n.NumberFormatIndexRRRtobjectR�RsRyRPRN(((s?/usr/lib64/libreoffice/program/wizards/agenda/AgendaDocument.pyt<module>s -����