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

Method grid_offset

src/docx/oxml/table.py:461–470  ·  view source on GitHub ↗

Starting offset of `tc` in the layout-grid columns of its table. A cell in the leftmost grid-column has offset 0.

(self)

Source from the content-addressed store, hash-verified

459
460 @property
461 def grid_offset(self) -> int:
462 """Starting offset of `tc` in the layout-grid columns of its table.
463
464 A cell in the leftmost grid-column has offset 0.
465 """
466 grid_before = self._tr.grid_before
467 preceding_tc_grid_spans = sum(
468 tc.grid_span for tc in self.xpath("./preceding-sibling::w:tc")
469 )
470 return grid_before + preceding_tc_grid_spans
471
472 @property
473 def grid_span(self) -> int:

Callers

nothing calls this directly

Calls 1

xpathMethod · 0.80

Tested by

no test coverage detected