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

Method _add_width_of

src/docx/oxml/table.py:567–573  ·  view source on GitHub ↗

Add the width of `other_tc` to this cell. Does nothing if either this tc or `other_tc` does not have a specified width.

(self, other_tc: CT_Tc)

Source from the content-addressed store, hash-verified

565 tcPr.width = value
566
567 def _add_width_of(self, other_tc: CT_Tc):
568 """Add the width of `other_tc` to this cell.
569
570 Does nothing if either this tc or `other_tc` does not have a specified width.
571 """
572 if self.width and other_tc.width:
573 self.width = Length(self.width + other_tc.width)
574
575 def _grow_to(self, width: int, height: int, top_tc: CT_Tc | None = None):
576 """Grow this cell to `width` grid columns and `height` rows.

Callers 1

_swallow_next_tcMethod · 0.95

Calls 1

LengthClass · 0.90

Tested by

no test coverage detected