B
    USW                 @   s   d Z ddlmZ 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 G dd	 d	eZG d
d deZG dd deZdS )z8
Objects shared by modules in the docx.oxml subpackage.
    )absolute_import   )OxmlElement)qn)ST_DecimalNumberST_OnOff	ST_String)BaseOxmlElementOptionalAttributeRequiredAttributec               @   s&   e Zd ZdZedeZedd ZdS )CT_DecimalNumberz
    Used for ``<w:numId>``, ``<w:ilvl>``, ``<w:abstractNumId>`` and several
    others, containing a text representation of a decimal number (e.g. 42) in
    its ``val`` attribute.
    zw:valc             C   s   t |tdt|idS )z
        Return a new ``CT_DecimalNumber`` element having tagname *nsptagname*
        and ``val`` attribute set to *val*.
        zw:val)attrs)r   r   str)cls
nsptagnameval r   B/var/www/html/venv/lib/python3.7/site-packages/docx/oxml/shared.pynew   s    zCT_DecimalNumber.newN)	__name__
__module____qualname____doc__r   r   r   classmethodr   r   r   r   r   r      s   
r   c               @   s   e Zd ZdZededdZdS )CT_OnOffz
    Used for ``<w:b>``, ``<w:i>`` elements and others, containing a bool-ish
    string in its ``val`` attribute, xsd:boolean plus 'on' and 'off'.
    zw:valT)defaultN)r   r   r   r   r
   r   r   r   r   r   r   r       s   r   c               @   s&   e Zd ZdZedeZedd ZdS )	CT_Stringz
    Used for ``<w:pStyle>`` and ``<w:tblStyle>`` elements and others,
    containing a style name in its ``val`` attribute.
    zw:valc             C   s   t |}||_|S )zz
        Return a new ``CT_String`` element with tagname *nsptagname* and
        ``val`` attribute set to *val*.
        )r   r   )r   r   r   elmr   r   r   r   /   s    zCT_String.newN)	r   r   r   r   r   r   r   r   r   r   r   r   r   r   (   s   
r   N)r   
__future__r    r   nsr   Zsimpletypesr   r   r   Zxmlchemyr	   r
   r   r   r   r   r   r   r   r   <module>   s   