Used for `w:pStyle` and `w:tblStyle` elements and others. In those cases, it containing a style name in its `val` attribute.
| 37 | |
| 38 | |
| 39 | class CT_String(BaseOxmlElement): |
| 40 | """Used for `w:pStyle` and `w:tblStyle` elements and others. |
| 41 | |
| 42 | In those cases, it containing a style name in its `val` attribute. |
| 43 | """ |
| 44 | |
| 45 | val: str = RequiredAttribute("w:val", ST_String) # pyright: ignore[reportAssignmentType] |
| 46 | |
| 47 | @classmethod |
| 48 | def new(cls, nsptagname: str, val: str): |
| 49 | """A new `CT_String`` element with tagname `nsptagname` and `val` attribute set to `val`.""" |
| 50 | elm = cast(CT_String, OxmlElement(nsptagname)) |
| 51 | elm.val = val |
| 52 | return elm |
nothing calls this directly
no test coverage detected
searching dependent graphs…