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

Class CT_OnOff

src/docx/oxml/shared.py:27–36  ·  view source on GitHub ↗

Used for `w:b`, `w:i` elements and others. Contains a bool-ish string in its `val` attribute, xsd:boolean plus "on" and "off". Defaults to `True`, so ` ` for example means "bold is turned on".

Source from the content-addressed store, hash-verified

25
26
27class CT_OnOff(BaseOxmlElement):
28 """Used for `w:b`, `w:i` elements and others.
29
30 Contains a bool-ish string in its `val` attribute, xsd:boolean plus "on" and
31 "off". Defaults to `True`, so `<w:b>` for example means "bold is turned on".
32 """
33
34 val: bool = OptionalAttribute( # pyright: ignore[reportAssignmentType]
35 "w:val", ST_OnOff, default=True
36 )
37
38
39class CT_String(BaseOxmlElement):

Callers

nothing calls this directly

Calls 1

OptionalAttributeClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…