U
    ª…7hj  ã                   @   s"   d dl mZ G dd„ dejƒZdS )é   )Ú	xmlwriterc                       s`   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Zdd	„ Zd
d„ Zdd„ Z	dd„ Z
dd„ Zdd„ Z‡  ZS )ÚFeaturePropertyBagzG
    A class for writing the Excel XLSX FeaturePropertyBag file.


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

        N)ÚsuperÚ__init__ÚsetÚfeature_property_bags©Úself©Ú	__class__© úY/var/www/formularioweb/env/lib/python3.8/site-packages/xlsxwriter/feature_property_bag.pyr      s    
zFeaturePropertyBag.__init__c                 C   sX   |   ¡  |  ¡  |  ¡  |  ¡  |  ¡  |  ¡  d| jkrB|  ¡  |  d¡ |  	¡  d S )NÚDXFComplementsÚFeaturePropertyBags)
Z_xml_declarationÚ_write_feature_property_bagsÚ_write_checkbox_bagÚ_write_xf_control_bagÚ_write_xf_compliment_bagÚ_write_xf_compliments_bagr   Ú_write_dxf_compliments_bagÚ_xml_end_tagZ
_xml_closer   r   r   r   Ú_assemble_xml_file,   s    

z%FeaturePropertyBag._assemble_xml_filec                 C   s   d}d|fg}|   d|¡ d S )NzIhttp://schemas.microsoft.com/office/spreadsheetml/2022/featurepropertybagÚxmlnsr   )Ú_xml_start_tag)r	   r   Ú
attributesr   r   r   r   P   s    ÿ
z/FeaturePropertyBag._write_feature_property_bagsc                 C   s   dg}|   d|¡ d S )N)ÚtypeZCheckboxÚbag)Z_xml_empty_tag©r	   r   r   r   r   r   [   s    z&FeaturePropertyBag._write_checkbox_bagc                 C   s,   dg}|   d|¡ |  dd¡ |  d¡ d S )N)r   Ú
XFControlsr   ZCellControlé    ©r   Ú_write_bag_idr   r   r   r   r   r   a   s    z(FeaturePropertyBag._write_xf_control_bagc                 C   s,   dg}|   d|¡ |  dd¡ |  d¡ d S )N)r   ZXFComplementr   r   r   r    r   r   r   r   r   l   s    z+FeaturePropertyBag._write_xf_compliment_bagc                 C   sF   ddg}|   d|¡ |   ddg¡ |  dd¡ |  d¡ |  d¡ d S )N)r   ZXFComplements)ÚextRefZXFComplementsMapperExtRefr   Úa©ÚkZMappedFeaturePropertyBagsÚ é   r    r   r   r   r   r   w   s    þ
z,FeaturePropertyBag._write_xf_compliments_bagc                 C   sF   ddg}|   d|¡ |   ddg¡ |  dd¡ |  d¡ |  d¡ d S )N)r   r   )r"   ZDXFComplementsMapperExtRefr   r#   r$   r&   r'   r    r   r   r   r   r   †   s    þ
z-FeaturePropertyBag._write_dxf_compliments_bagc                 C   s$   g }|rd|fg}|   d||¡ d S )Nr%   ZbagId)Z_xml_data_element)r	   ÚkeyZbag_idr   r   r   r   r!   •   s    
z FeaturePropertyBag._write_bag_id)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r   r!   Ú__classcell__r   r   r
   r   r      s   $r   N)r&   r   Z	XMLwriterr   r   r   r   r   Ú<module>   s   