Skip to content

Commit 72b3d5d

Browse files
author
Steve Canny
committed
oxml: remove dead code from CT_Body
* also fix type in Length class docstring
1 parent 45f2c64 commit 72b3d5d

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

docx/oxml/parts/document.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ def add_section_break(self):
4747
p.set_sectPr(cloned_sectPr)
4848
return sentinel_sectPr
4949

50-
def _insert_p(self, p):
51-
return self._append_blocklevelelt(p)
52-
53-
def _insert_tbl(self, tbl):
54-
return self._append_blocklevelelt(tbl)
55-
5650
def _new_tbl(self):
5751
return CT_Tbl.new()
5852

@@ -67,15 +61,3 @@ def clear_content(self):
6761
content_elms = self[:]
6862
for content_elm in content_elms:
6963
self.remove(content_elm)
70-
71-
def _append_blocklevelelt(self, block_level_elt):
72-
"""
73-
Return *block_level_elt* after appending it to end of
74-
EG_BlockLevelElts sequence.
75-
"""
76-
sectPr = self.sectPr
77-
if sectPr is not None:
78-
sectPr.addprevious(block_level_elt)
79-
else:
80-
self.append(block_level_elt)
81-
return block_level_elt

docx/shared.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
class Length(int):
1111
"""
1212
Base class for length constructor classes Inches, Cm, Mm, Px, and Emu.
13-
Behaves as an int count of English Metric Units, 914400 to the inch,
14-
36000 to the cm. Provides convenience unit conversion methods in the form
13+
Behaves as an int count of English Metric Units, 914,400 to the inch,
14+
36,000 to the mm. Provides convenience unit conversion methods in the form
1515
of read-only properties. Immutable.
1616
"""
1717
_EMUS_PER_INCH = 914400

0 commit comments

Comments
 (0)