feat: a Word table style paints the areas its file declares

w:tblStylePr — header row, banded rows, first/last column — was never read, so a
table styled in Word arrived as a bare grid. Import bakes each area into the cells
now (fill, borders, run marks): the file's own style has no registry entry to
re-derive regions from, and the bake is what a re-export carries.

A band's box is the whole banded region, so its insideH is the line between two
band rows; banding counts from the first body row, as in Word and LibreOffice.
Corpus 803 -> 795, page counts unchanged.
This commit is contained in:
Steffen Becker committed 2026-08-12 22:30:02 +00:00
1 parent 29667a6f0d
commit 9d6aedb6ef
6 files changed
+293 -36

No files matched your search

+5
View File
@@ -81,6 +81,11 @@ We deliberately keep TipTap's `resizable: false` (so its own columnResizing plug
`refreshTableStyles`, and `App.svelte` keeps `sheet.table` across an import because the file
never carried it. Baked bold is only suppressed for `HEADER_SHADE` cells (the existing
`boldByDefault` path) — a foreign style's bold survives as direct formatting.
A **Word** file's own table style does carry its areas (`w:tblStylePr`), and the registry has
no entry to re-derive them from, so the DOCX importer bakes those into the cells instead —
fill, borders and run marks alike (`src/lib/import/CLAUDE.md` for the area rules). What is
re-exported is that bake, which is why the round trip is stable: our `w:tblStyle` is
name-only, so a reimport finds no areas to apply over it.
- **Table-style gallery**: `TableStylePicker.svelte` in the floating `TableToolbar` — tiles drawn
by `previewCellCss` (the same resolver), so a preview can't disagree with what applying does,