fix(docx): even a table row's vertical cell margins, and hold a composed chip to its outline - #795
Merged
Merged
Conversation
… of their padding in their paragraphs, and hold a composed chip to its outline
…-page guard no table reaches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
In Word,
CobaltRotastood 23pt off its page on median and ran onto a second page.CobaltRota's masthead row stood 20.8pt taller than the page's.What changed
evenTheRowsMargins, called inwriteTableRowsonce a row's cells are written and beforeholdRowHeight:w:tcMaris lowered to the row's smallest.w:beforeon the cell's first paragraph andw:afteron its last.holdRowAtLeaststill subtracts the row's margins, now the smaller ones. The moved spacing is part of the content, so the held height comes out the same.dropTheSpaceBelowis unchanged. It leaves a table with a drawn bottom alone, and every tablewriteTableRowswrites has one (POI's single table border), so the padding moved below a last row's text is never stripped at the end of a page.writePanelPiece. AShapeContainerNodewritten as a panel with no layout placement, which means composed in a table cell, is held at least its outline's height. This matches howpanelWidthalready takes the outline's width.writtenAsAPanel), soMeteredInvoice's rows, the case fix(docx): write a filled pill composed in a table cell as a panel, so a rota's shift chips keep their colour #772 guarded, are unaffected.CHANGELOG.mdanddocs/recipes/docx-export.md(the Tables row and the composed-shape paragraph) are updated.Verification
./mvnw -B -ntp clean verify -pl :graph-compose-core,:graph-compose-render-pdf,:graph-compose-render-docx,:graph-compose-render-pptx,:graph-compose-templates,:graph-compose-testing,:graph-compose-qa,:graph-compose-coverage -amgives BUILD SUCCESS (1791 + 127 tests).extract-api --checkpass.DocxCellPaddingTest:DocxComposedCellTest: the pill test now pins its row held at least the outline's 14pt, where fix(docx): write a filled pill composed in a table cell as a panel, so a rota's shift chips keep their colour #772 had pinned it not held.2.5-dev:CobaltRotaandOrangeOps(unchanged in both editors).CobaltRota's median drift falls from 23.1pt to 8.9 in Word and in LibreOffice.CobaltRotafits one page again in LibreOffice; in Word its last staff row still goes onto a second page.Known limits
CobaltRotain Word (about 9pt, one row onto page 2):Lane: shared-engine (render-docx). No public API change.