A sequence of |_Cell| objects, one for each cell of the layout grid. If the table contains a span, one or more |_Cell| object references are repeated.
(self)
| 162 | |
| 163 | @property |
| 164 | def _cells(self) -> list[_Cell]: |
| 165 | """A sequence of |_Cell| objects, one for each cell of the layout grid. |
| 166 | |
| 167 | If the table contains a span, one or more |_Cell| object references are |
| 168 | repeated. |
| 169 | """ |
| 170 | col_count = self._column_count |
| 171 | cells: list[_Cell] = [] |
| 172 | for tc in self._tbl.iter_tcs(): |
| 173 | for grid_span_idx in range(tc.grid_span): |
| 174 | if tc.vMerge == ST_Merge.CONTINUE: |
| 175 | cells.append(cells[-col_count]) |
| 176 | elif grid_span_idx > 0: |
| 177 | cells.append(cells[-1]) |
| 178 | else: |
| 179 | cells.append(_Cell(tc, self)) |
| 180 | return cells |
| 181 | |
| 182 | @property |
| 183 | def _column_count(self): |