`p:cSld` element.
| 89 | |
| 90 | |
| 91 | class CT_CommonSlideData(BaseOxmlElement): |
| 92 | """`p:cSld` element.""" |
| 93 | |
| 94 | _remove_bg: Callable[[], None] |
| 95 | get_or_add_bg: Callable[[], CT_Background] |
| 96 | |
| 97 | _tag_seq = ("p:bg", "p:spTree", "p:custDataLst", "p:controls", "p:extLst") |
| 98 | bg: CT_Background | None = ZeroOrOne( # pyright: ignore[reportAssignmentType] |
| 99 | "p:bg", successors=_tag_seq[1:] |
| 100 | ) |
| 101 | spTree: CT_GroupShape = OneAndOnlyOne("p:spTree") # pyright: ignore[reportAssignmentType] |
| 102 | del _tag_seq |
| 103 | name: str = OptionalAttribute( # pyright: ignore[reportAssignmentType] |
| 104 | "name", XsdString, default="" |
| 105 | ) |
| 106 | |
| 107 | def get_or_add_bgPr(self) -> CT_BackgroundProperties: |
| 108 | """Return `p:bg/p:bgPr` grandchild. |
| 109 | |
| 110 | If no such grandchild is present, any existing `p:bg` child is first removed and a new |
| 111 | default `p:bg` with noFill settings is added. |
| 112 | """ |
| 113 | bg = self.bg |
| 114 | if bg is None or bg.bgPr is None: |
| 115 | bg = self._change_to_noFill_bg() |
| 116 | return cast(CT_BackgroundProperties, bg.bgPr) |
| 117 | |
| 118 | def _change_to_noFill_bg(self) -> CT_Background: |
| 119 | """Establish a `p:bg` child with no-fill settings. |
| 120 | |
| 121 | Any existing `p:bg` child is first removed. |
| 122 | """ |
| 123 | self._remove_bg() |
| 124 | bg = self.get_or_add_bg() |
| 125 | bg.add_noFill_bgPr() |
| 126 | return bg |
| 127 | |
| 128 | |
| 129 | class CT_NotesMaster(_BaseSlideElement): |
nothing calls this directly
no test coverage detected
searching dependent graphs…