%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/libreoffice/program/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/libreoffice/program/__pycache__/officehelper.cpython-312.pyc

�

뤎f���h�ddlZddlZddlmZddlmZddlZddlmZddl	m
ZGd�de�Zd�Z
y)	�N)�platform)�sleep)�NoConnectException)�	Exceptionc��eZdZy)�BootstrapExceptionN)�__name__�
__module__�__qualname__���,/usr/lib/libreoffice/program/officehelper.pyrr"s��r
rc�.�	dtjvrtjd}nd}tjj|d�}t	j
d�r|dz
}t
j�dtt
j��ddz}|d	d
djd|dg�f}tjtj||�tj�}|jjd
|�}djd|dg�}d}		|j|�}	|S#t $r$|dz}|dkrt#dd��t%d�YnwxYw�F#t"$r�t&$r}t#dt|�zd��d}~wwxYw)a?Bootstrap OOo and PyUNO Runtime.
    The soffice process is started opening a named pipe of random name, then the local context is used
	to access the pipe. This function directly returns the remote component context, from whereon you can
	get the ServiceManager by calling getServiceManager() on the returned object.
	�UNO_PATH��soffice�winz.exe�uno�Nz--nologoz--nodefaultz--accept=pipe,name=z;urp;z"com.sun.star.bridge.UnoUrlResolverzuno:pipe,name=z ;urp;StarOffice.ComponentContext��rz!Cannot connect to soffice server.g�?zCaught exception )�os�environ�path�joinr�
startswith�random�seed�str�spawnv�P_NOWAITr�getComponentContext�ServiceManager�createInstanceWithContext�resolverrrr)	�sOffice�	sPipeName�cmdArray�
xLocalContext�resolver�sConnect�nLoop�xContext�es	         r�	bootstrapr/%s���(E�����#��j�j��,�G��G��'�'�,�,�w�	�2�����u�%��v��G�	���
��C��
�
��0���4�4�	��Z�����AV�Xa�cj�@k�8l�m��
�	�	�"�+�+�w��1��/�/�1�
� �/�/�I�I�0�-�A���7�7�,�i�9[�\�]�����
�#�+�+�H�5����O��&�
���
���A�:�,�-P�RV�W�W��c�
�	
��	����
��E� �!4�s�1�v�!=�t�D�D��E�s6�DE%� D4�4*E!�E%� E!�!E%�%F�7F�F)rr�sysr�timerr�com.sun.star.connectionr�com.sun.star.unor�UnoExceptionrr/rr
r�<module>r5s-��0
�
���
�6�6�	��	�0r

Zerion Mini Shell 1.0