
    f                     8    d dl mZ  G d dej                  ZdS )   )	xmlwriterc                   X     e Zd ZdZ fdZd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Z xZS )CustomzM
    A class for writing the Excel XLSX Custom Workbook Property file.


    c                 r    t          t          |                                            g | _        d| _        dS )z
        Constructor.

        r   N)superr   __init__
propertiespid)self	__class__s    S/var/www/ffwdstore.be/apps/py-env/lib/python3.11/site-packages/xlsxwriter/custom.pyr   zCustom.__init__   s3     	fd$$&&&    c                     || _         d S )N)r	   )r   r	   s     r   _set_propertieszCustom._set_properties%   s    $r   c                     |                                   |                                  |                     d           |                                  d S )N
Properties)_xml_declaration_write_properties_xml_end_tag
_xml_close)r   s    r   _assemble_xml_filezCustom._assemble_xml_file/   sT     	   ,''' 	r   c                     d}|dz   }|dz   }d|fd|fg}|                      d|           | j        D ]}|                     |           d S )Nz6http://schemas.openxmlformats.org/officeDocument/2006/zcustom-propertiesdocPropsVTypesxmlnszxmlns:vtr   )_xml_start_tagr	   _write_property)r   schemar   xmlns_vt
attributescustom_propertys         r   r   zCustom._write_propertiesB   s    I,,,, e"


 	L*555# 	2 	2O  1111	2 	2r   c                    d}|\  }}}| xj         dz  c_         d|fd| j         fd|fg}|                     d|           |dk    r|                     |           ni|dk    r|                     |           nM|d	k    r|                     |           n1|d
k    r|                     |           n|                     |           |                     d           d S )Nz&{D5CDD505-2E9C-101B-9397-08002B2CF9AE}r   fmtidr
   nameproperty
number_intnumberdatebool)r
   r   _write_vt_i4_write_vt_r8_write_vt_filetime_write_vt_bool_write_vt_lpwstrr   )r   r    r"   r#   valueproperty_typer   s          r   r   zCustom._write_propertyS   s    9%4"e]A eDHTN

 	J
333L((e$$$$h&&e$$$$f$$##E****f$$&&&& !!%(((*%%%%%r   c                 2    |                      d|           d S )Nz	vt:lpwstr_xml_data_elementr   r.   s     r   r-   zCustom._write_vt_lpwstru   s    {E22222r   c                 2    |                      d|           d S )Nzvt:filetimer1   r3   s     r   r+   zCustom._write_vt_filetimey   s    }e44444r   c                 2    |                      d|           d S )Nzvt:i4r1   r3   s     r   r)   zCustom._write_vt_i4}       w.....r   c                 2    |                      d|           d S )Nzvt:r8r1   r3   s     r   r*   zCustom._write_vt_r8   r6   r   c                 @    |rd}nd}|                      d|           d S )Ntruefalsezvt:boolr1   r3   s     r   r,   zCustom._write_vt_bool   s4      	EEEy%00000r   )__name__
__module____qualname____doc__r   r   r   r   r   r-   r+   r)   r*   r,   __classcell__)r   s   @r   r   r      s         	 	 	 	 	% % %  &2 2 2" &  &  &D3 3 35 5 5/ / // / /1 1 1 1 1 1 1r   r   N) r   	XMLwriterr    r   r   <module>rC      sZ         @1 @1 @1 @1 @1Y  @1 @1 @1 @1 @1r   