Skip to content

Commit 19a552e

Browse files
author
Steve Canny
committed
run: convert Run.underline to Run.font pass-through
1 parent 0311ab2 commit 19a552e

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

docx/oxml/text/run.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -122,22 +122,6 @@ def text(self, text):
122122
self.clear_content()
123123
_RunContentAppender.append_to_run_from_text(self, text)
124124

125-
@property
126-
def underline(self):
127-
"""
128-
String contained in w:val attribute of ./w:rPr/w:u grandchild, or
129-
|None| if not present.
130-
"""
131-
rPr = self.rPr
132-
if rPr is None:
133-
return None
134-
return rPr.u_val
135-
136-
@underline.setter
137-
def underline(self, value):
138-
rPr = self.get_or_add_rPr()
139-
rPr.u_val = value
140-
141125

142126
class CT_RPr(BaseOxmlElement):
143127
"""

docx/text/run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,11 +372,11 @@ def underline(self):
372372
underline. The values from :ref:`WdUnderline` are used to specify
373373
other outline styles such as double, wavy, and dotted.
374374
"""
375-
return self._r.underline
375+
return self.font.underline
376376

377377
@underline.setter
378378
def underline(self, value):
379-
self._r.underline = value
379+
self.font.underline = value
380380

381381
@boolproperty
382382
def web_hidden(self):

0 commit comments

Comments
 (0)