%PDF- %PDF-
Mini Shell

Mini Shell

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

�

뤎f�*��f�ddlZddlZddlZddlZddlmZmZmZddlm	Z	m
Z
ddlmZ
ddlmZddlmZmZmZddlmZmZmZmZm Z!m"Z#m$Z%m&Z'd�Z(d�Z)d	�Z*d
�Z+Gd�d�Z,Gd
�d�Z-Gd�d�Z.d�Z/d�Z0d�Z1d�Z2d�Z3d�Z4iZ5d�Z6Gd�de�Z7Gd�de
e7�Z8Gd�deee7�Z9y)�N)�
XTypeProvider�XSingleComponentFactory�XServiceInfo)�RuntimeException�XCurrentContext)�ALL)�IN�OUT�INOUT)�	MAYBEVOID�BOUND�CONSTRAINED�	TRANSIENT�READONLY�MAYBEAMBIGUOUS�MAYBEDEFAULT�	REMOVABLEc�T�d}|tk(rd}|S|tk(rd}|S|tk(rd}|S)Nz[]z[inout]z[out]z[in])�PARAM_MODE_INOUT�PARAM_MODE_OUT�
PARAM_MODE_IN��mode�rets  �+/usr/lib/python3/dist-packages/unohelper.py�_mode_to_strr,sF��
�C������
�J�	
��	����J�
��	����J�c��d}t|zr|dz}t|zr|dz}t|zr|dz}t|zr|dz}t|zr|dz}t
|zr|dz}t|zr|dz}t|zr|d	z}|j�S)
N�z
removable z
maybedefault zmaybeambiguous z	readonly z
transient zconstrained zbound z
maybevoid )	�PROP_ATTR_REMOVABLE�PROP_ATTR_MAYBEDEFAULT�PROP_ATTR_MAYBEAMBIGUOUS�PROP_ATTR_READONLY�PROP_ATTR_TRANSIENT�PROP_ATTR_CONSTRAINED�PROP_ATTR_BOUND�PROP_ATTR_MAYBEVOID�rstriprs  r�_propertymode_to_strr)6s���
�C��T�!��L� ����$��O�#���$�&��%�%���D� ��K����T�!��L� ���t�#��N�"������H�n���T�!��L� ���:�:�<�rc��t|tj�s�t|tj�sht|tj�sNt|tj
�s4t|tj�st|tj�r|jt|�dz�ytj�}|jjd|�}|jd�t|d�r/|j�}|D]}|jd|zdz��n|jd�|jd�t|d�r9|j�}|D]#}|jd|j zdz��%n|jd�|j#|�}|j%t&�}|jd	�|D]�}|jd|j(j*zd
z|j*z�|j,}	|j.}
|jd�t1dt3|	��D]e}|dkDr|jd
�|jt5|
|j6�d
z|	|j*zd
z|
|j8z��g|jd���|j;t<�}|jd�|D]V}|jdt?|j@�zdz|jj zd
z|j*zdz��Xy)N�
z com.sun.star.beans.IntrospectionzSupported services:
�getSupportedServiceNamesz  z
  unknown
zInterfaces:
�getTypesz	Methods:
� z( rz, z )
zProperties:
z  (z) )!�
isinstance�uno�Type�Char�Bool�ByteSequence�Enum�Any�write�str�getComponentContext�ServiceManager�createInstanceWithContext�hasattrr,r-�typeName�inspect�
getMethods�METHOD_CONCEPT_ALL�
ReturnType�Name�ParameterTypes�ParameterInfos�range�lenr�aMode�aName�
getProperties�PROPERTY_CONCEPT_ALLr)�
Attributes)
�obj�out�ctx�
introspection�names�ii�
interfaces�access�methods�args�infos�i�propss
             rr>r>Js����3����"��3����"��3����"��3��(�(�*��3����"��3����!��	�	�3�s�8�d�?�#��

�
!�
!�
#�C�	�	�	�	5�	5�7Y�[^�	`���I�I�&�(���/�1��,�,�.���	*�B��I�I�t�b�y�4�'�)�	*�	�	�	�=�"��I�I�� ���Z�!��\�\�^�
��	3�B��I�I�t�b�k�k�)�D�0�2�	3�	�	�	�=�"�
�
"�
"�C�
)�F����!3�5�G��I�I�|���	���	�	�4�"�-�-�,�,�,�s�2�R�W�W�<�>�� � ���!�!���	�	�4����3��;�(�	d�A��1�u��	�	�4�!��I�I�|�U�1�X�^�^�5��;�d�1�g�l�l�J�S�P�SX�YZ�S[�Sa�Sa�a�c�	d�	�	�	�6��	�
� � �"6�8�E��I�I�� ��k���	�	�5�-�r�}�}�>�>��E�b�g�g�FV�FV�V�WZ�Z�[]�[b�[b�b�dh�h�j�krc��t|||�S�N)�_FactoryHelper_��clazz�implementationName�serviceNamess   r�createSingleServiceFactoryr`{s���E�#5�|�E�Erc��eZdZd�Zy)�_ImplementationHelperEntryc� �||_||_yrZ)�ctorr_)�selfrdr_s   r�__init__z#_ImplementationHelperEntry.__init__s����	�(��rN��__name__�
__module__�__qualname__rf�rrrbrb~s��)rrbc�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�ImplementationHelperc��i|_yrZ)�impls�res rrfzImplementationHelper.__init__�s	����
rc�6�t||�|j|<yrZ)rbro)rerdr^r_s    r�addImplementationz&ImplementationHelper.addImplementation�s��*D�T�,�*W��
�
�%�&rc���t|jj��D]C}d|dzdz}|j|�}|djD]}|j|���Ey)N�/r�
/UNO/SERVICES�)�listro�items�	createKeyr_)re�regKey�smgrrW�keyName�key�serviceNames       r�writeRegistryInfoz&ImplementationHelper.writeRegistryInfo�so���d�j�j�&�&�(�)�	-�A��1�Q�4�i�/�1�G��"�"�G�-�C� ��t�0�0�
-���
�
�{�,�
-�	-�
rc��|jj|d�}|�t|dzd��t|j||j
�S�Nz is unknown)ro�getrr`rdr_)rer^rzr{�entrys     r�getComponentFactoryz(ImplementationHelper.getComponentFactory�sI���
�
��� 2�D�:���=�"�$6��$F��O�O�)�5�:�:�7I�5�K]�K]�_�_rc�t�|jj|d�}|�t|dzd��|jSr��ror�rr_)rer^r�s   rr,z-ImplementationHelper.getSupportedServiceNames�s;���
�
��� 2�D�:���=�"�$6��$F��O�O��!�!�!rc�x�|jj|d�}|�t|dzd��||jvSr�r�)rer^r~r�s    r�supportsServicez$ImplementationHelper.supportsService�s@���
�
��� 2�4�9���=�"�$6��$F��N�N��e�0�0�0�0rN)	rhrirjrfrrrr�r,r�rkrrrmrm�s"���X��`�"�1rrmc��eZdZd�Zy)�ImplementationEntryc�.�||_||_||_yrZ)�implName�supportedServicesr])rer�r�r]s    rrfzImplementationEntry.__init__�s�� ��
�!2�����
rNrgrkrrr�r��s��rr�c��|D]G}d|jzdz}|j|�}|jD]}|j|���Iy)Nrtru)r�ryr�)r{rz�
seqEntriesr�r|r}r~s       r�writeRegistryInfoHelperr��sU���)���u�~�~�%��7������)�� �2�2�	)�K��M�M�;�(�	)�)rc�,�tj|�S)z,returns a file-url for the given system path)�pyuno�systemPathToFileUrl)�
systemPaths rr�r��s���$�$�j�2�2rc�,�tj|�S)zVreturns a system path (determined by the system, the python interpreter is running on))r��fileUrlToSystemPath)�urls rr�r��s���$�$�c�+�+rc�.�tj||�S)z0returns an absolute file url from the given urls)r��
absolutize)�path�relativeUrls  rr�r��s�����T�;�0�0rc�v�|D]4}|j|k(s�t|j||j�cSyrZ)r�r`r]r�)r^r{rzr��xs     r�getComponentFactoryHelperr��s:��
�b���:�:�+�+�-�q�w�w�8J�A�L_�L_�a�a�brc	��|j}|j||�}|jd|�}tjdk(xstjdk(}tj
dk(}|D]�}	|jd|�}
|
j
ddd�|s|	jd	�r
|r|	d
z}	n|	dz}	|j||	|
�|
j�}|jd�}|j�}
|j}|
D]?}|jt|jd
��d|	|�}|j|��A|
j!���y)Nz0com.sun.star.registry.ImplementationRegistration�nt�dos�darwinz$com.sun.star.registry.SimpleRegistryrrrvz.unoz.dylibz.so�IMPLEMENTATIONSrt)r:r;�os�name�sys�platform�open�endswith�registerImplementation�
getRootKey�openKey�getKeyNames�activate�max�split�insert�close)�toBeExtendedContext�contextRuntime�
componentUrls�
loaderNamer{�loader�implReg�isWin�isMac�componentUrl�reg�rootKey�implementationKey�	implNames�extSMGRr��facs                 r�addComponentsToContextr��sD���(�(�D�
�
+�
+�Z��
I�F��,�,�.`�ao�p�G��G�G�t�O�/�r�w�w�%�/�E��L�L�H�$�E�%����,�,�.T�Vd�f�����"�a�����.�.��8��+�h�6��+�e�3���&�&�
�<��F��.�.�"��#�O�O�->�@��%�1�1�3�	�%�4�4���	"�A��/�/�3�q�w�w�s�|�#4�R��W�M�C��N�N�C�!�	"�	�	�	��#rc�Z�d}|jtvrt|j}|Si}t|jj�}t	|�dkDrl|j�}|j}t
j|�rd||j<nt	|�dkDr|t|�z}t	|�dkDr�lt|j��}g}|D](}t
j|�}	|j|	��*t|�}|t|j<|S)Nr)
�	__class__�_g_typeTablerw�	__bases__rF�popr0�isInterface�__pyunointerface__�keys�
getTypeByName�append�tuple)
rerrP�traverse�item�bases�lst�typesr��ts
          r�_unohelper_getHandler��s��
�C��~�~��%��4�>�>�*��*�J�'������0�0�1���8�o��!��<�<�>�D��N�N�E�����&�15��d�-�-�.��U��a��#�d�5�k�1���8�o��!��5�:�:�<� �����	�A��!�!�1�&�A��L�L�!��	��E�l��'*��T�^�^�$��Jrc��eZdZd�Zd�Zy)�Basec��t|�SrZ)r�rps rr-z
Base.getTypes�s
��#�T�+�+rc��y)Nrkrkrps r�getImplementationIdzBase.getImplementationId�s��rN)rhrirjr-r�rkrrr�r��s��,�rr�c��eZdZdZd�Zd�Zy)�CurrentContextz�a current context implementation, which first does a lookup in the given
       hashmap and if the key cannot be found, it delegates to the predecessor
       if available
    c� �||_||_yrZ)�hashMap�
oldContext)rer�r�s   rrfzCurrentContext.__init__s�����$��rc��||jvr|j|S|j�|jj|�SyrZ)r�r��getValueByName)rer�s  rr�zCurrentContext.getValueByName	s?���4�<�<���<�<��%�%�
�_�_�
(��?�?�1�1�4�9�9�rN)rhrirj�__doc__rfr�rkrrr�r�s���%�rr�c�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)r[c�.�||_||_||_yrZr\)rer]r^r_s    rrfz_FactoryHelper_.__init__s����
�"4���(��rc��|jSrZ)r^rps r�getImplementationNamez%_FactoryHelper_.getImplementationNames���&�&�&rc��||jvSrZ�r_)re�ServiceNames  rr�z_FactoryHelper_.supportsServices���d�/�/�/�/rc��|jSrZr�rps rr,z(_FactoryHelper_.getSupportedServiceNames s��� � � rc�$�|j|�SrZ�r])re�contexts  rr;z)_FactoryHelper_.createInstanceWithContext#s���z�z�7�$�$rc�(�|j|g|���SrZr�)rerUr�s   r�%createInstanceWithArgumentsAndContextz5_FactoryHelper_.createInstanceWithArgumentsAndContext&s���t�z�z�7�+�T�+�+rN)	rhrirjrfr�r�r,r;r�rkrrr[r[s ��)�
'�0�!�%�,rr[):r0r�r�r��com.sun.star.langrrr�com.sun.star.unorr� com.sun.star.beans.MethodConceptrr@�"com.sun.star.beans.PropertyConceptrJ�!com.sun.star.reflection.ParamModer	rr
rrr�$com.sun.star.beans.PropertyAttributerr'r
r&rr%rr$rr#rr"rr!rr rr)r>r`rbrmr�r�r�r�r�r�r�r�r�r�r�r[rkrr�<module>r�s���&��	�
�R�R�>�F�J���
&�&�&���(/k�bF�)�)�
1�1�D��)�3�,�1�b�
�8���4�=���_�d��(,�.��d�,r

Zerion Mini Shell 1.0