o
    ûÐ,h‹	  ã                   @   s.   d dl mZ ddlmZ G dd„ dejƒZdS )é    )ÚImageé   )Ú	xmlwriterc                       sF   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Zdefd	d
„Zdd„ Z	‡  Z
S )Ú	RichValuezD
    A class for writing the Excel XLSX rdrichvalue.xml file.


    c                    s   t ƒ  ¡  g | _dS )z
        Constructor.

        N)ÚsuperÚ__init__Úembedded_images©Úself©Ú	__class__© úK/var/www/html/rh/venv/lib/python3.10/site-packages/xlsxwriter/rich_value.pyr      s   

zRichValue.__init__c                 C   s&   |   ¡  |  ¡  |  d¡ |  ¡  d S )NÚrvData)Ú_xml_declarationÚ_write_rv_dataÚ_xml_end_tagÚ
_xml_closer	   r   r   r   Ú_assemble_xml_file+   s   
zRichValue._assemble_xml_filec                 C   sJ   d}d|fdt | jƒfg}|  d|¡ t| jƒD ]
\}}|  ||¡ qd S )Nz?http://schemas.microsoft.com/office/spreadsheetml/2017/richdataÚxmlnsÚcountr   )Úlenr   Ú_xml_start_tagÚ	enumerateÚ	_write_rv)r
   r   Ú
attributesÚindexÚimager   r   r   r   >   s   þþzRichValue._write_rv_datar   c                 C   sT   dg}d}|j r
d}|  d|¡ |  |¡ |  |¡ |jr#|  |j¡ |  d¡ d S )N)Úsr   é   é   Úrv)Ú
decorativer   Ú_write_vÚdescriptionr   )r
   r   r   r   Úvaluer   r   r   r   M   s   

zRichValue._write_rvc                 C   s   |   d|¡ d S )NÚv)Ú_xml_data_element)r
   Údatar   r   r   r#   `   s   zRichValue._write_v)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r#   Ú__classcell__r   r   r   r   r      s    r   N)Úxlsxwriter.imager   Ú r   Ú	XMLwriterr   r   r   r   r   Ú<module>   s   	