B
    P\h                 @   sp   d dl mZ 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 )    )absolute_import)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 krt  }|| _|| _|d kr*t g}|| _d S )N)r   r   r   r	   r   )selfr   r   r    r   2lib/python3.7/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txT)r   r   )strRefr   Nc             C   s   || _ |d krt }|| _d S )N)r   r   r   )r   r   r   r   r   r   r   B   s    zText.__init__c                s&   | j r| jrd | _tt| |||S )N)r   r   superr   to_tree)r   r   idx	namespace)	__class__r   r   r    L   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   4   s    
r   N)Z
__future__r   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    