`` `` element, child of `` ``, holds child elements that define table properties such as style and borders.
| 295 | |
| 296 | |
| 297 | class CT_TblPr(BaseOxmlElement): |
| 298 | """``<w:tblPr>`` element, child of ``<w:tbl>``, holds child elements that define |
| 299 | table properties such as style and borders.""" |
| 300 | |
| 301 | get_or_add_bidiVisual: Callable[[], CT_OnOff] |
| 302 | get_or_add_jc: Callable[[], CT_Jc] |
| 303 | get_or_add_tblLayout: Callable[[], CT_TblLayoutType] |
| 304 | _add_tblStyle: Callable[[], CT_String] |
| 305 | _remove_bidiVisual: Callable[[], None] |
| 306 | _remove_jc: Callable[[], None] |
| 307 | _remove_tblStyle: Callable[[], None] |
| 308 | |
| 309 | _tag_seq = ( |
| 310 | "w:tblStyle", |
| 311 | "w:tblpPr", |
| 312 | "w:tblOverlap", |
| 313 | "w:bidiVisual", |
| 314 | "w:tblStyleRowBandSize", |
| 315 | "w:tblStyleColBandSize", |
| 316 | "w:tblW", |
| 317 | "w:jc", |
| 318 | "w:tblCellSpacing", |
| 319 | "w:tblInd", |
| 320 | "w:tblBorders", |
| 321 | "w:shd", |
| 322 | "w:tblLayout", |
| 323 | "w:tblCellMar", |
| 324 | "w:tblLook", |
| 325 | "w:tblCaption", |
| 326 | "w:tblDescription", |
| 327 | "w:tblPrChange", |
| 328 | ) |
| 329 | tblStyle: CT_String | None = ZeroOrOne( # pyright: ignore[reportAssignmentType] |
| 330 | "w:tblStyle", successors=_tag_seq[1:] |
| 331 | ) |
| 332 | bidiVisual: CT_OnOff | None = ZeroOrOne( # pyright: ignore[reportAssignmentType] |
| 333 | "w:bidiVisual", successors=_tag_seq[4:] |
| 334 | ) |
| 335 | jc: CT_Jc | None = ZeroOrOne( # pyright: ignore[reportAssignmentType] |
| 336 | "w:jc", successors=_tag_seq[8:] |
| 337 | ) |
| 338 | tblLayout: CT_TblLayoutType | None = ZeroOrOne( # pyright: ignore[reportAssignmentType] |
| 339 | "w:tblLayout", successors=_tag_seq[13:] |
| 340 | ) |
| 341 | del _tag_seq |
| 342 | |
| 343 | @property |
| 344 | def alignment(self) -> WD_TABLE_ALIGNMENT | None: |
| 345 | """Horizontal alignment of table, |None| if `./w:jc` is not present.""" |
| 346 | jc = self.jc |
| 347 | if jc is None: |
| 348 | return None |
| 349 | return cast("WD_TABLE_ALIGNMENT | None", jc.val) |
| 350 | |
| 351 | @alignment.setter |
| 352 | def alignment(self, value: WD_TABLE_ALIGNMENT | None): |
| 353 | self._remove_jc() |
| 354 | if value is None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…