a
    bA                     @   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   c/Users/vegardjervell/Documents/master/model/venv/lib/python3.9/site-packages/openpyxl/chart/text.py__init__%   s    zRichText.__init__)NNN)__name__
__module____qualname____doc__tagnamer   r   r   r   Z
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t| |||S r   )r   r   superr   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
    