(cls, rows: int, cols: int, width: Length)
| 218 | |
| 219 | @classmethod |
| 220 | def _tbl_xml(cls, rows: int, cols: int, width: Length) -> str: |
| 221 | col_width = Emu(width // cols) if cols > 0 else Emu(0) |
| 222 | return ( |
| 223 | f"<w:tbl {nsdecls('w')}>\n" |
| 224 | f" <w:tblPr>\n" |
| 225 | f' <w:tblW w:type="auto" w:w="0"/>\n' |
| 226 | f' <w:tblLook w:firstColumn="1" w:firstRow="1"\n' |
| 227 | f' w:lastColumn="0" w:lastRow="0" w:noHBand="0"\n' |
| 228 | f' w:noVBand="1" w:val="04A0"/>\n' |
| 229 | f" </w:tblPr>\n" |
| 230 | f"{cls._tblGrid_xml(cols, col_width)}" |
| 231 | f"{cls._trs_xml(rows, cols, col_width)}" |
| 232 | f"</w:tbl>\n" |
| 233 | ) |
| 234 | |
| 235 | @classmethod |
| 236 | def _tblGrid_xml(cls, col_count: int, col_width: Length) -> str: |
no test coverage detected