Skip to content

Honor w start/w end in table cell margin parsing#85

Merged
SimonCropp merged 6 commits intomainfrom
Honor-w-start/w-end-in-table-cell-margin-parsing
Apr 20, 2026
Merged

Honor w start/w end in table cell margin parsing#85
SimonCropp merged 6 commits intomainfrom
Honor-w-start/w-end-in-table-cell-margin-parsing

Conversation

@SimonCropp
Copy link
Copy Markdown
Owner

No description provided.

  ParseTableCellMargin and ParseCellMargin only read the legacy <w:left>/<w:right>
  elements, ignoring the Office 2010+ <w:start>/<w:end> form. Writers emitting
  the modern form (e.g. Excelsior's WordTableRenderer) had their horizontal cell
  padding silently read as 0, so rendered output showed no left/right padding
  even though the docx declared it.

  Both methods now prefer StartMargin/EndMargin and fall back to the legacy
  TableCellLeftMargin/TableCellRightMargin (resp. LeftMargin/RightMargin). Made
  them internal static so Tests can exercise them directly, and added
  TableCellMarginParseTests covering both forms plus the precedence rule.
@SimonCropp SimonCropp added this to the 0.4.3 milestone Apr 20, 2026
@SimonCropp SimonCropp merged commit 0baca28 into main Apr 20, 2026
3 of 4 checks passed
@SimonCropp SimonCropp deleted the Honor-w-start/w-end-in-table-cell-margin-parsing branch April 20, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant