Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 866558b

Browse files
author
Steve Canny
committed
txt: add Run boolean properties
Includes all_caps, hidden, small_caps, strikethrough, and others, 20 total.
1 parent a788802 commit 866558b

File tree

8 files changed

+801
-127
lines changed

8 files changed

+801
-127
lines changed

docs/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@
9797
9898
.. |None| replace:: ``None``
9999
100+
.. |NumberingPart| replace:: :class:`NumberingPart`
101+
100102
.. |Paragraph| replace:: :class:`.Paragraph`
101103
102104
.. |Part| replace:: :class:`Part`
@@ -111,6 +113,8 @@
111113
112114
.. |Run| replace:: :class:`Run`
113115
116+
.. |StylesPart| replace:: :class:`StylesPart`
117+
114118
.. |Table| replace:: :class:`.Table`
115119
116120
.. |Text| replace:: :class:`Text`

docs/dev/analysis/features/bool-run-props.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,20 @@ applying run-level properties::
8080

8181
The semantics of the three values are as follows:
8282

83-
+-------+-------------------------------------------------------------+
84-
| value | meaning |
85-
+=======+=============================================================+
86-
| True | The effective value of the property is unconditional *on*. |
87-
| | Contrary settings in the style hierarchy have no effect. |
88-
+-------+-------------------------------------------------------------+
89-
| False | The effective value of the property is unconditional *off*. |
90-
| | Contrary settings in the style hierarchy have no effect. |
91-
+-------+-------------------------------------------------------------+
92-
| None | The element is not present. The effective value is |
93-
| | inherited from the style hierarchy. If no value for this |
94-
| | property is present in the style hierarchy, the effective |
95-
| | value is *off*. |
96-
+-------+-------------------------------------------------------------+
83+
+-------+---------------------------------------------------------------+
84+
| value | meaning |
85+
+=======+===============================================================+
86+
| True | The effective value of the property is unconditionally *on*. |
87+
| | Contrary settings in the style hierarchy have no effect. |
88+
+-------+---------------------------------------------------------------+
89+
| False | The effective value of the property is unconditionally *off*. |
90+
| | Contrary settings in the style hierarchy have no effect. |
91+
+-------+---------------------------------------------------------------+
92+
| None | The element is not present. The effective value is |
93+
| | inherited from the style hierarchy. If no value for this |
94+
| | property is present in the style hierarchy, the effective |
95+
| | value is *off*. |
96+
+-------+---------------------------------------------------------------+
9797

9898

9999
Specimen XML

docx/oxml/__init__.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,29 @@
5555

5656
from docx.oxml.text import CT_Br, CT_P, CT_PPr, CT_R, CT_RPr, CT_Text
5757
register_custom_element_class('w:b', CT_OnOff)
58+
register_custom_element_class('w:bCs', CT_OnOff)
5859
register_custom_element_class('w:br', CT_Br)
60+
register_custom_element_class('w:caps', CT_OnOff)
61+
register_custom_element_class('w:cs', CT_OnOff)
62+
register_custom_element_class('w:dstrike', CT_OnOff)
63+
register_custom_element_class('w:emboss', CT_OnOff)
5964
register_custom_element_class('w:i', CT_OnOff)
65+
register_custom_element_class('w:iCs', CT_OnOff)
66+
register_custom_element_class('w:imprint', CT_OnOff)
67+
register_custom_element_class('w:noProof', CT_OnOff)
68+
register_custom_element_class('w:oMath', CT_OnOff)
69+
register_custom_element_class('w:outline', CT_OnOff)
6070
register_custom_element_class('w:p', CT_P)
6171
register_custom_element_class('w:pPr', CT_PPr)
6272
register_custom_element_class('w:pStyle', CT_String)
6373
register_custom_element_class('w:r', CT_R)
6474
register_custom_element_class('w:rPr', CT_RPr)
75+
register_custom_element_class('w:rtl', CT_OnOff)
76+
register_custom_element_class('w:shadow', CT_OnOff)
77+
register_custom_element_class('w:smallCaps', CT_OnOff)
78+
register_custom_element_class('w:snapToGrid', CT_OnOff)
79+
register_custom_element_class('w:specVanish', CT_OnOff)
80+
register_custom_element_class('w:strike', CT_OnOff)
6581
register_custom_element_class('w:t', CT_Text)
82+
register_custom_element_class('w:vanish', CT_OnOff)
83+
register_custom_element_class('w:webHidden', CT_OnOff)

0 commit comments

Comments
 (0)