;idZddlmZddlZddlmZddlmZddl m Z ddl m Z erddl mZGd d e ZGd d e ZdS) zHeader and footer part objects.) annotationsN) TYPE_CHECKING) CONTENT_TYPE) parse_xml) StoryPart)Packagec@eZdZdZeddZedZdS) FooterPartzDefinition of a section footer.packagerc|d}tj}t|}|||||S)z!Return newly created footer part.z/word/footer%d.xml) next_partnameCT WML_FOOTERr_default_footer_xmlclsr partname content_typeelements EC:\PYTHON\MyICR_Workspace\venv\Lib\site-packages\docx/parts/hdrftr.pynewzFooterPart.newN(()=>>} C335566s8\7G<<<ctjtjtdddd}t |d5}|}dddn #1swxYwY|S)z6Return bytes containing XML for a default footer part.r.. templateszdefault-footer.xmlrbNospathjoinsplit__file__openreadrr f xml_bytess rrzFooterPart._default_footer_xmlw||BGMM(33A6kK_`` $   !I ! ! ! ! ! ! ! ! ! ! ! ! ! ! !A<<BBNr r)__name__ __module__ __qualname____doc__ classmethodrrrrr r S))===[=[rr c@eZdZdZeddZedZdS) HeaderPartzDefinition of a section header.r rc|d}tj}t|}|||||S)z!Return newly created header part.z/word/header%d.xml)r r WML_HEADERr_default_header_xmlrs rrzHeaderPart.new'rrctjtjtdddd}t |d5}|}dddn #1swxYwY|S)z6Return bytes containing XML for a default header part.rrrzdefault-header.xmlrNrr&s rr7zHeaderPart._default_header_xml/r)r*Nr+)r,r-r.r/r0rr7r1rrr4r4$r2rr4)r/ __future__rrtypingrdocx.opc.constantsrrdocx.oxml.parserrdocx.parts.storyr docx.packagerr r4r1rrr?s%%"""""" 111111&&&&&&&&&&&&%$$$$$$(r