o
    T                     @   st   d Z ddlmZmZmZmZ ddlZddlmZ	 ddl
mZ ddlmZ ddlmZ dd	lmZ G d
d deZdS )z)
Provides StylesPart and related objects
    )absolute_importdivisionprint_functionunicode_literalsN   )CONTENT_TYPE)PackURI)XmlPart)	parse_xml)Stylesc                   @   s4   e Zd ZdZedd Zedd Zedd ZdS )	
StylesPartzd
    Proxy for the styles.xml part containing style definitions for a document
    or glossary.
    c                 C   s(   t d}tj}t|  }| ||||S )zc
        Return a newly created styles part, containing a default set of
        elements.
        z/word/styles.xml)r   CTZ
WML_STYLESr
   _default_styles_xml)clspackageZpartnamecontent_typeelement r   AD:\Projects\ConvertPro\env\Lib\site-packages\docx\parts\styles.pydefault   s   zStylesPart.defaultc                 C   s
   t | jS )zx
        The |_Styles| instance containing the styles (<w:style> element
        proxies) for this styles part.
        )r   r   )selfr   r   r   styles$   s   
zStylesPart.stylesc                 C   sV   t jt jtd ddd}t|d}| }W d   |S 1 s$w   Y  |S )zO
        Return a bytestream containing XML for a default styles part.
        r   z..Z	templateszdefault-styles.xmlrbN)ospathjoinsplit__file__openread)r   r   fZ	xml_bytesr   r   r   r   ,   s   

zStylesPart._default_styles_xmlN)	__name__
__module____qualname____doc__classmethodr   propertyr   r   r   r   r   r   r      s    


r   )r$   Z
__future__r   r   r   r   r   Zopc.constantsr   r   Zopc.packurir   Zopc.partr	   Zoxmlr
   Zstyles.stylesr   r   r   r   r   r   <module>   s   