a
    GBìj7  ã                   @   sd   d dl mZ d dlmZmZmZ d dlmZmZm	Z	 ddl
mZ G dd„ deƒZG dd	„ d	eƒZd
S )é    )ÚSerialisable)ÚTypedÚAliasÚSequence)ÚRichTextPropertiesÚ	ListStyleÚ	Paragraphé   )ÚStrRefc                   @   sR   e Zd ZdZdZeed�ZedƒZ	ee
dd�Zeed�ZedƒZdZdd
d„Zd	S )ÚRichTextz€
    From the specification: 21.2.2.216

    This element specifies text formatting. The lstStyle element is not supported.
    Úrich)Úexpected_typeÚbodyPrT©r   Ú
allow_noneÚp)r   ÚlstStyler   Nc                 C   s4   |d u rt ƒ }|| _|| _|d u r*tƒ g}|| _d S ©N)r   r   r   r   r   )Úselfr   r   r   © r   úR/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/openpyxl/chart/text.pyÚ__init__%   s    zRichText.__init__)NNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Útagnamer   r   r   r   Ú
propertiesr   r   r   r   r   Z
paragraphsÚ__elements__r   r   r   r   r   r      s   

   ýr   c                       sL   e Zd ZdZdZeedd�Zeedd�Z	dZ
ddd„Zd‡ fd	d
„	Z‡  ZS )ÚTextz}
    The value can be either a cell reference or a text element
    If both are present then the reference will be used.
    ZtxTr   )ÚstrRefr   Nc                 C   s   || _ |d u rtƒ }|| _d S r   )r    r   r   )r   r    r   r   r   r   r   A   s    zText.__init__c                    s"   | j r| jrd | _tƒ  |||¡S r   )r    r   ÚsuperÚto_tree)r   r   ÚidxÚ	namespace©Ú	__class__r   r   r"   K   s    zText.to_tree)NN)NNN)r   r   r   r   r   r   r
   r    r   r   r   r   r"   Ú__classcell__r   r   r%   r   r   3   s     þ

r   N)Z!openpyxl.descriptors.serialisabler   Zopenpyxl.descriptorsr   r   r   Zopenpyxl.drawing.textr   r   r   Zdata_sourcer
   r   r   r   r   r   r   Ú<module>   s
    