%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/__pycache__/uno.cpython-312.pyc

�

wn�faC���ddlZddlZejjd�ejdd�ddlZddlZddlZddlZddlZej�Z
d�Z	d�Zd�Zd�Z
d	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�ZGd�d�ZGd�d�ZGd�de�ZGd�d�ZGd�d�ZGd�d�Zd�ZeZd�Z 	ddl!Z!e e!jHd<Gd �d!e�Z%d"�Z&d#�Z'd$�Z(d%�Z)d&�Z*d'�Z+d(�Z,d)�Z-d*�Z.y#e"$rddl#Z!Y�AwxYw)+�Nz/usr/lib/libreoffice/program�
URE_BOOTSTRAPz@vnd.sun.star.pathname:/usr/lib/libreoffice/program/fundamentalrcc��tS)zHReturns the UNO component context used to initialize the Python runtime.)�_component_context���%/usr/lib/python3/dist-packages/uno.py�getComponentContextr	#s
���rc�*�tj�S)z�Returns the current context.

    See http://udk.openoffice.org/common/man/concept/uno_contexts.html#current_context
    for an explanation on the current context concept.
    )�pyuno�getCurrentContextrrrrr)s���"�"�$�$rc�,�tj|�S)auSets newContext as new UNO context.

    The newContext must implement the XCurrentContext interface. The
    implementation should handle the desired properties and delegate
    unknown properties to the old context. Ensure that the old one
    is reset when you leave your stack, see
    http://udk.openoffice.org/common/man/concept/uno_contexts.html#current_context
    )r�setCurrentContext)�
newContexts rrr3s���"�"�:�.�.rc�,�tj|�S)zBLooks up the value of an IDL constant by giving its explicit name.)r�getConstantByName)�constants rrr@s���"�"�8�,�,rc�,�tj|�S)z�Returns a `uno.Type` instance of the type given by typeName.

    If the type does not exist, a `com.sun.star.uno.RuntimeException` is raised.
    )r�
getTypeByName��typeNames rrrFs�����x�(�(rc�$�t|�|i|��S)a�Creates a UNO struct or exception given by typeName.

    Can be called with:

    1) No additional argument.
       In this case, you get a default constructed UNO structure.
       (e.g. `createUnoStruct("com.sun.star.uno.Exception")`)
    2) Exactly one additional argument that is an instance of typeName.
       In this case, a copy constructed instance of typeName is returned
       (e.g. `createUnoStruct("com.sun.star.uno.Exception" , e)`)
    3) As many additional arguments as the number of elements within typeName
       (e.g. `createUnoStruct("com.sun.star.uno.Exception", "foo error" , self)`).
    4) Keyword arguments to give values for each element of the struct by name.
    5) A mix of 3) and 4), such that each struct element is given a value exactly once,
       either by a positional argument or by a keyword argument.

    The additional and/or keyword arguments must match the type of each struct element,
    otherwise an exception is thrown.
    )�getClass)r�args�kwargss   r�createUnoStructrOs��*�8�H��t�.�v�.�.rc�,�tj|�S)zDReturns the class of a concrete UNO exception, struct, or interface.)rrrs rrrgs���>�>�(�#�#rc�,�tj|�S)z5Returns True, when obj is a class of a UNO interface.)r�isInterface)�objs rrrms�����S�!�!rc�*�tj�S)zuReturns a 16 byte sequence containing a newly generated uuid or guid.

    For more information, see rtl/uuid.h.
    )r�generateUuidrrrr!r!ss������rc�,�tj|�S)z-Returns a file URL for the given system path.)r�systemPathToFileUrl)�
systemPaths rr#r#|s���$�$�Z�0�0rc�,�tj|�S)zqReturns a system path.

    This path is determined by the system that the Python interpreter is running on.
    )r�fileUrlToSystemPath)�urls rr&r&�s���$�$�S�)�)rc�.�tj||�S)z1Returns an absolute file url from the given urls.)r�
absolutize)�path�relativeUrls  rr)r)�s�����D�+�.�.rc�(�eZdZdZd�Zd�Zd�Zd�Zy)�Enumz�Represents a UNO enum.

    Use an instance of this class to explicitly pass an enum to UNO.

    :param typeName: The name of the enum as a string.
    :param value: The actual value of this enum as a string.
    c�J�||_||_tj|�y�N)r�valuer�	checkEnum)�selfrr0s   r�__init__z
Enum.__init__�s�� ��
���
�
����rc�<�d|j�d|j�d�S)Nz<Enum instance � (�)>)rr0�r2s r�__repr__z
Enum.__repr__�s��,0�M�M�4�:�:�F�Frc��t|t�sy|j|jk(xr|j|jk(S�NF)�
isinstancer-rr0�r2�thats  r�__eq__zEnum.__eq__�s4���$��%���
�
����.�N�T�Z�Z�4�:�:�5M�Nrc�&�|j|�Sr/�r>�r2�others  r�__ne__zEnum.__ne__�����;�;�u�%�%�%rN��__name__�
__module__�__qualname__�__doc__r3r8r>rCrrrr-r-�s����
G�O�&rr-c�.�eZdZdZd�Zd�Zd�Zd�Zd�Zy)�Typez�Represents a UNO type.

    Use an instance of this class to explicitly pass a type to UNO.

    :param typeName: Name of the UNO type
    :param typeClass: Python Enum of TypeClass, see com/sun/star/uno/TypeClass.idl
    c�J�||_||_tj|�yr/)r�	typeClassr�	checkType)r2rrMs   rr3z
Type.__init__�s�� ��
�"���
����rc�<�d|j�d|j�d�S)Nz<Type instance r5r6)rrMr7s rr8z
Type.__repr__�s��,0�M�M�4�>�>�J�Jrc��t|t�sy|j|jk(xr|j|jk(Sr:)r;rKrMrr<s  rr>zType.__eq__�s4���$��%���~�~����/�R�D�M�M�T�]�]�4R�Rrc�&�|j|�Sr/r@rAs  rrCzType.__ne__�rDrc�6�|jj�Sr/)r�__hash__r7s rrSz
Type.__hash__�s���}�}�%�%�'�'rN)	rFrGrHrIr3r8r>rCrSrrrrKrK�s"����
K�S�&�(rrKc��eZdZdZd�Zy)�Boolz�Represents a UNO boolean.

    Use an instance of this class to explicitly pass a boolean to UNO.

    Note: This class is deprecated. Use Python's True and False directly instead.
    c��d}tj|t�t|t�r|dk(ryt|t�r|dk(ry|ryy)NzKThe Bool class is deprecated. Use Python's True and False directly instead.�trueT�falseF)�warnings�warn�DeprecationWarningr;�str)�clsr0�messages   r�__new__zBool.__new__�sF��_���
�
�g�1�2��e�S�!�e�v�o���e�S�!�e�w�&6����rN)rFrGrHrIr_rrrrUrU�s���
rrUc�(�eZdZdZd�Zd�Zd�Zd�Zy)�CharaYRepresents a UNO char.

    Use an instance of this class to explicitly pass a char to UNO.

    For Python 3, this class only works with unicode (str) objects. Creating
    a Char instance with a bytes object or comparing a Char instance
    to a bytes object will raise an AssertionError.

    :param value: A Unicode string with length 1
    c��t|t�sJdt|�z��t|�dk(sJd��t	|d�dksJd��||_y)Nz$Expected str object, got %s instead.�z!Char value must have length of 1.ri��z#Char value must be UTF-16 code unit)r;r\�type�len�ordr0�r2r0s  rr3z
Char.__init__�s]���%��%�[�'M�PT�UZ�P[�'[�[�%��5�z�Q��C� C�C���5��8�}��&�M�(M�M�&���
rc�"�d|j�d�S)Nz<Char instance �>�r0r7s rr8z
Char.__repr__�s��'+�z�z�3�3rc��t|t�r!t|�dkDry|j|dk(St|t�r|j|jk(Sy)NrcFr)r;r\rer0rar<s  rr>zChar.__eq__�sM���d�C� ��4�y�1�}���:�:��a��(�(��d�D�!��:�:����+�+�rc�&�|j|�Sr/r@rAs  rrCzChar.__ne__rDrNrErrrrara�s��	��4�
�&rrac�@�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zy
)�ByteSequencez�Represents a UNO ByteSequence value.

    Use an instance of this class to explicitly pass a byte sequence to UNO.

    :param value: A string or bytesequence
    c��t|t�r||_yt|t�r|j|_yt	dt|�z��)Nz6Expected bytes object or ByteSequence, got %s instead.)r;�bytesr0rn�	TypeErrorrdrgs  rr3zByteSequence.__init__sB���e�U�#��D�J�
��|�
,����D�J��T�W[�\a�Wb�b�c�crc�"�d|j�d�S)Nz<ByteSequence instance 'z'>rjr7s rr8zByteSequence.__repr__s��15���=�=rc��t|t�r|j|k(St|t�r|j|jk(Syr:)r;rpr0rnr<s  rr>zByteSequence.__eq__s;���d�E�"��:�:��%�%��d�L�)��:�:����+�+�rc�,�t|j�Sr/)rer0r7s r�__len__zByteSequence.__len__'s���4�:�:��rc� �|j|Sr/rj)r2�indexs  r�__getitem__zByteSequence.__getitem__*s���z�z�%� � rc�6�|jj�Sr/)r0�__iter__r7s rrzzByteSequence.__iter__-s���z�z�"�"�$�$rc���t|t�rt|j|z�St|t�r"t|j|jz�St	dt|�z��)NzCan't add ByteString and %s.)r;rprnr0rqrd)r2�bs  r�__add__zByteSequence.__add__0sX���a�����
�
�Q��/�/�
��<�
(���
�
�Q�W�W� 4�5�5��:�T�!�W�D�E�Erc�6�|jj�Sr/)r0�hashr7s rrSzByteSequence.__hash__:s���z�z��� � rN)rFrGrHrIr3r8r>rurxrzr}rSrrrrnrn	s1���d�>���!�%�F�!rrnc��eZdZdZd�Zy)�AnyzmRepresents a UNO Any value.

    Use only in connection with uno.invoke() to pass an explicit typed Any.
    c�p�t|t�r||_||_yt|�|_||_yr/)r;rKrdrr0)r2rdr0s   rr3zAny.__init__Ds1���d�D�!��D�I���
�&�d�+�D�I���
rN)rFrGrHrIr3rrrr�r�>s���
rr�c�0�tj|||�S)zKUse this function to pass exactly typed Anys to the callee (using uno.Any).)r�invoke)�object�
methodname�argTuples   rr�r�Ms���<�<��
�H�5�5rc	��	t|g|��i|��S#t$ro}t|�dd|jdi�|jdi�|jdg�gt	|�dz\}}}|rt|d�r�|}Yd}~nd}~wwxYwd}tj}	|jd�D]1}
|
|	vr|	|
}ntj|
�}|�|�|j}	�3tjd�}|D]�}||	vs�d	}
	tj|dz|z�|	|<nj#|$rb	t||�|	|<nN#|$rF	t|dz|z�|	|<n-#|$r%	t||�|	|<n#t $rd
}
YnwxYwYnwxYwYnwxYwYnwxYw|
s��t|�d|�d|�d��}|j#|j$�}d
|_|�|S)
zJOverrides built-in import to allow directly importing LibreOffice classes.N��globals�locals�fromlist�_uno_import_failed�.�!com.sun.star.uno.RuntimeExceptionFTz (or 'z
' is unknown))�_builtin_import�ImportError�list�getre�hasattr�sys�modules�splitr�	__class__�__dict__rr-r�_impl_getConstantGroupByName�
ValueError�with_traceback�
__traceback__r�)�name�optargsr�er�r�r��
py_import_exc�mod�d�module�RuntimeException�
class_name�failed�uno_import_excs               r�_uno_importr�Ys&����t�8�g�8��8�8���
�$(��M�"�1�$5����I�r�9R�TZ�T^�T^�_g�ik�Tl�9?���J�PR�9S�9U�UX�Y`�Ua�Ub�9d�%d�!�����7�1�&:�;���
��
���C����A��*�*�S�/�	���Q�;��F�)�C��/�/�&�)�C��;����L�L��	��~�~�&I�J���2%�
��Q���F�
*� %���t�c�z�J�/F� G��*�
��#�

*�*�$(��z�$:�A�j�M��'�	*�*�(9�$��*�z�:Q�(R��*�
��+�*�*�,H��z�,Z�A�j�M��)�*�%)�F�*��	*��		*��	

*���,"-�.;�T�:�.O�"P��"0�!>�!>�}�?Z�?Z�![��48��1�$�$�e2%�h�Js���	B	�A%B�B	�D$�$F�*D:�9F�:F�E�F�E?	�E+�*E?	�+E9�6E?	�8E9�9E?	�<F�>E?	�?F�F�F�F�
F�
__import__c�(�eZdZdZdgZd�Zd�Zd�Zy)�_ConstantGroupz'Represents a group of UNOIDL constants.�
_constantsc��||_yr/)r�)r2�	constantss  rr3z_ConstantGroup.__init__�s	��#��rc�6�|jj�Sr/)r��keysr7s r�__dir__z_ConstantGroup.__dir__�s�����#�#�%�%rc�X�||jvr|j|Std|z��)Nz%The constant '%s' could not be found.)r��AttributeError�r2r�s  r�__getattr__z_ConstantGroup.__getattr__�s.���4�?�?�"��?�?�4�(�(��D�t�K�L�LrN)rFrGrHrI�	__slots__r3r�r�rrrr�r��s��1���I�$�&�Mrr�c�*�tdd�}tdd�}tjd�}|j||f|�}|dz|z}|D]8}|j|k(s�tt
d�|jD���cStd|z��)	z#Gets UNOIDL constant group by name.zcom.sun.star.uno.TypeClass�	CONSTANTSz2com.sun.star.reflection.TypeDescriptionSearchDepth�ONEz=/singletons/com.sun.star.reflection.theTypeDescriptionManagerr�c3�pK�|].}|jjd�d|jf���0y�w)r����N)�Namer��
ConstantValue)�.0�cs  r�	<genexpr>z/_impl_getConstantGroupByName.<locals>.<genexpr>�s3����'.�������c�"�2�&����8�'.�s�46z+The constant group '%s' could not be found.)	r-r�getValueByName� createTypeDescriptionEnumerationr�r��dict�	Constantsr�)r��groupr��one�
type_desc_mgr�
type_descs�qualified_name�	type_descs        rr�r��s����1�;�?�I�
�C�U�
K�C�&�5�5�6u�v�M��?�?����VY�Z�J��c�\�E�)�N��/�	��>�>�^�+�!�$�'.�"�,�,�'.�#.�/�
/�/��B�^�S�
T�Trc��t|�dk(r>t|�dk(r0t|ddd�|jk(r|d|jd<yt	j
|jj|fi|��\}}|j�D]4}|j|�r�t	jd�}|d|zd��||jd<y)aInitializes a UNO struct.

    Referenced from the pyuno shared library.

    This function can be called with either an already constructed UNO struct, which it
    will then just reference without copying, or with arguments to create a new UNO struct.
    rrcr�Nr0r�z2_uno_struct__init__: unused keyword argument '%s'.)
re�getattrr�r�r�_createUnoStructHelper�__pyunostruct__r�r�r)r2rr�struct�used�kwargr�s       r�_uno_struct__init__r��s����6�{�a��C��I��N�w�t�A�w��T�/R�VZ�Vd�Vd�/d�!%�a���
�
�g���3�3�D�N�N�4R�4R�TX�c�\b�c�����[�[�]�	k�E��8�8�E�?�#(�>�>�2U�#V� �&�'[�^c�'c�ei�j�j�	k�
"(��
�
�g�rc�4�t|jd|�S)zSGets attribute from UNO struct.

    Referenced from the pyuno shared library.
    r0)r�r�r�s  r�_uno_struct__getattr__r��s���4�=�=��)�4�0�0rc�6�t|jd||�S)zQSets attribute on UNO struct.

    Referenced from the pyuno shared library.
    r0)�setattrr�)r2r�r0s   r�_uno_struct__setattr__r��s���4�=�=��)�4��7�7rc�2�t|jd�S)z`Converts a UNO struct to a printable string.

    Referenced from the pyuno shared library.
    r0)�reprr�r7s r�_uno_struct__repr__r�s����
�
�g�&�'�'rc�2�t|jd�S)z"Converts a UNO struct to a string.r0)r\r�r7s r�_uno_struct__str__r�s���t�}�}�W�%�&�&rc�&�|j|�Sr/r@rAs  r�_uno_struct__ne__r�s���{�{�5�!�!�!rc�Z�t|d�r|jd|jdk(Sy)zMCompares two UNO structs.

    Referenced from the pyuno shared library.
    r0F)r�r�r<s  r�_uno_struct__eq__r�s.���t�W���}�}�W�%����w�)?�?�?�rc�J�djtj|��S)z`Extracts a printable stacktrace.

    Referenced from pyuno shared lib and pythonscript.py.
    �)�join�	traceback�	format_tb)�traces r�!_uno_extract_printable_stacktracer�$s���7�7�9�&�&�u�-�.�.r)/r��osr*�append�putenvrr�rY�socketr	rrrrrrrrr!r#r&r)r-rKr�rUrarnr�r�r�r�r��__builtin__r��builtinsr�r�r�r�r�r�r�r�r�r�r�rrr�<module>r�sJ��������.�/�	��	�	�/�]�^�&
�
����/�U�.�.�0���%�
/�-�)�/�0$�"� �1�*�/�&�&�6(�(�<�6��0$&�$&�N2!�2!�j��6���U�p#��
&1����\�"�M�V�M�$U�$(�.1�8�(�'�
"�	�/��c�#�"�#�s�D�	D�D

Zerion Mini Shell 1.0