MCPcopy Index your code
hub / github.com/python-openxml/python-docx / CT_SectPr

Class CT_SectPr

src/docx/oxml/section.py:100–423  ·  view source on GitHub ↗

`w:sectPr` element, the container element for section properties.

Source from the content-addressed store, hash-verified

98
99
100class CT_SectPr(BaseOxmlElement):
101 """`w:sectPr` element, the container element for section properties."""
102
103 get_or_add_pgMar: Callable[[], CT_PageMar]
104 get_or_add_pgSz: Callable[[], CT_PageSz]
105 get_or_add_titlePg: Callable[[], CT_OnOff]
106 get_or_add_type: Callable[[], CT_SectType]
107 _add_footerReference: Callable[[], CT_HdrFtrRef]
108 _add_headerReference: Callable[[], CT_HdrFtrRef]
109 _remove_titlePg: Callable[[], None]
110 _remove_type: Callable[[], None]
111
112 _tag_seq = (
113 "w:footnotePr",
114 "w:endnotePr",
115 "w:type",
116 "w:pgSz",
117 "w:pgMar",
118 "w:paperSrc",
119 "w:pgBorders",
120 "w:lnNumType",
121 "w:pgNumType",
122 "w:cols",
123 "w:formProt",
124 "w:vAlign",
125 "w:noEndnote",
126 "w:titlePg",
127 "w:textDirection",
128 "w:bidi",
129 "w:rtlGutter",
130 "w:docGrid",
131 "w:printerSettings",
132 "w:sectPrChange",
133 )
134 headerReference = ZeroOrMore("w:headerReference", successors=_tag_seq)
135 footerReference = ZeroOrMore("w:footerReference", successors=_tag_seq)
136 type: CT_SectType | None = ZeroOrOne( # pyright: ignore[reportAssignmentType]
137 "w:type", successors=_tag_seq[3:]
138 )
139 pgSz: CT_PageSz | None = ZeroOrOne( # pyright: ignore[reportAssignmentType]
140 "w:pgSz", successors=_tag_seq[4:]
141 )
142 pgMar: CT_PageMar | None = ZeroOrOne( # pyright: ignore[reportAssignmentType]
143 "w:pgMar", successors=_tag_seq[5:]
144 )
145 titlePg: CT_OnOff | None = ZeroOrOne( # pyright: ignore[reportAssignmentType]
146 "w:titlePg", successors=_tag_seq[14:]
147 )
148 del _tag_seq
149
150 def add_footerReference(self, type_: WD_HEADER_FOOTER, rId: str) -> CT_HdrFtrRef:
151 """Return newly added CT_HdrFtrRef element of `type_` with `rId`.
152
153 The element tag is `w:footerReference`.
154 """
155 footerReference = self._add_footerReference()
156 footerReference.type_ = type_
157 footerReference.rId = rId

Callers

nothing calls this directly

Calls 2

ZeroOrMoreClass · 0.90
ZeroOrOneClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…