Beispiel #1
0
class CT_PageSz(BaseOxmlElement):
    """
    ``<w:pgSz>`` element, defining page dimensions and orientation.
    """
    w = OptionalAttribute('w:w', ST_TwipsMeasure)
    h = OptionalAttribute('w:h', ST_TwipsMeasure)
    orient = OptionalAttribute('w:orient',
                               WD_ORIENTATION,
                               default=WD_ORIENTATION.PORTRAIT)
Beispiel #2
0
class CT_PageMar(BaseOxmlElement):
    """
    ``<w:pgMar>`` element, defining page margins.
    """
    top = OptionalAttribute('w:top', ST_SignedTwipsMeasure)
    right = OptionalAttribute('w:right', ST_TwipsMeasure)
    bottom = OptionalAttribute('w:bottom', ST_SignedTwipsMeasure)
    left = OptionalAttribute('w:left', ST_TwipsMeasure)
    header = OptionalAttribute('w:header', ST_TwipsMeasure)
    footer = OptionalAttribute('w:footer', ST_TwipsMeasure)
    gutter = OptionalAttribute('w:gutter', ST_TwipsMeasure)
Beispiel #3
0
class CT_Parent(BaseOxmlElement):
    """
    ``<w:parent>`` element, an invented element for use in testing.
    """
    eg_zooChoice = ZeroOrOneChoice((Choice('w:choice'), Choice('w:choice2')),
                                   successors=('w:oomChild', 'w:oooChild'))
    oomChild = OneOrMore('w:oomChild',
                         successors=('w:oooChild', 'w:zomChild', 'w:zooChild'))
    oooChild = OneAndOnlyOne('w:oooChild')
    zomChild = ZeroOrMore('w:zomChild', successors=('w:zooChild', ))
    zooChild = ZeroOrOne('w:zooChild', successors=())
    optAttr = OptionalAttribute('w:optAttr', ST_IntegerType)
    reqAttr = RequiredAttribute('reqAttr', ST_IntegerType)
Beispiel #4
0
class CT_SectType(BaseOxmlElement):
    """
    ``<w:sectType>`` element, defining the section start type.
    """
    val = OptionalAttribute('w:val', WD_SECTION_START)