MCPcopy Create free account
hub / github.com/scanny/python-pptx / CT_TextParagraphProperties

Class CT_TextParagraphProperties

src/pptx/oxml/text.py:462–569  ·  view source on GitHub ↗

`a:pPr` custom element class.

Source from the content-addressed store, hash-verified

460
461
462class CT_TextParagraphProperties(BaseOxmlElement):
463 """`a:pPr` custom element class."""
464
465 get_or_add_defRPr: Callable[[], CT_TextCharacterProperties]
466 _add_lnSpc: Callable[[], CT_TextSpacing]
467 _add_spcAft: Callable[[], CT_TextSpacing]
468 _add_spcBef: Callable[[], CT_TextSpacing]
469 _remove_lnSpc: Callable[[], None]
470 _remove_spcAft: Callable[[], None]
471 _remove_spcBef: Callable[[], None]
472
473 _tag_seq = (
474 "a:lnSpc",
475 "a:spcBef",
476 "a:spcAft",
477 "a:buClrTx",
478 "a:buClr",
479 "a:buSzTx",
480 "a:buSzPct",
481 "a:buSzPts",
482 "a:buFontTx",
483 "a:buFont",
484 "a:buNone",
485 "a:buAutoNum",
486 "a:buChar",
487 "a:buBlip",
488 "a:tabLst",
489 "a:defRPr",
490 "a:extLst",
491 )
492 lnSpc: CT_TextSpacing | None = ZeroOrOne( # pyright: ignore[reportAssignmentType]
493 "a:lnSpc", successors=_tag_seq[1:]
494 )
495 spcBef: CT_TextSpacing | None = ZeroOrOne( # pyright: ignore[reportAssignmentType]
496 "a:spcBef", successors=_tag_seq[2:]
497 )
498 spcAft: CT_TextSpacing | None = ZeroOrOne( # pyright: ignore[reportAssignmentType]
499 "a:spcAft", successors=_tag_seq[3:]
500 )
501 defRPr: CT_TextCharacterProperties | None = ZeroOrOne( # pyright: ignore[reportAssignmentType]
502 "a:defRPr", successors=_tag_seq[16:]
503 )
504 lvl: int = OptionalAttribute( # pyright: ignore[reportAssignmentType]
505 "lvl", ST_TextIndentLevelType, default=0
506 )
507 algn: PP_PARAGRAPH_ALIGNMENT | None = OptionalAttribute(
508 "algn", PP_PARAGRAPH_ALIGNMENT
509 ) # pyright: ignore[reportAssignmentType]
510 del _tag_seq
511
512 @property
513 def line_spacing(self) -> float | Length | None:
514 """The spacing between baselines of successive lines in this paragraph.
515
516 A float value indicates a number of lines. A |Length| value indicates a fixed spacing.
517 Value is contained in `./a:lnSpc/a:spcPts/@val` or `./a:lnSpc/a:spcPct/@val`. Value is
518 |None| if no element is present.
519 """

Callers

nothing calls this directly

Calls 2

ZeroOrOneClass · 0.90
OptionalAttributeClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…