Repository navigation
fix(docx): name in the report what a container written as its contents leaves of its layout - #859
Merged
Merged
Conversation
…s leaves of its layout A canvas's places, the room it holds where something follows it and the width its text wraps at, a bled panel's bleed where the page bleeds it, a layer stack column's fixed width, and the keep of a line drawn in the body before a block that writes a table first were left out of the Word file in silence. Each container's note now names them. A canvas's clip policy is recorded as having nothing to carry: the page clips no canvas. Nothing written changes.
… out page by page A drawn line's drawing is anchored in a paragraph near it, so its keep with the next block is lost before a paragraph as much as before a table, and in a panel as much as in the body; the page keeps blocks together, and bleeds a section's paint, in the flow it lays out page by page, and in no row's or table's cell, layer or layer stack's column. Both are named there now, on every page and side. A canvas names its room only where it has a placement and something other than a page break follows it, and its places only where it does not stack what it writes from its corner; its room as its row's tallest cell stays a gap.
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
A container the DOCX export writes as its contents left part of its own layout out of the Word file and said nothing, while
DocxExportReportpromises to name every loss:DocxNodeFieldLedgerTestlisted each of these as a gap.What changed
inThePagedFlow()says where the page keeps a block with the next and bleeds a section's paint toward its edges: in the flow it lays out page by page, the body and the panels in it. Everything else is a box the page places:overlayDepth);slotDepth, raised inwriteCellNodesandwriteLayerColumns).canvasLossesnames what a canvas written as its contents leaves out. Its drawings stand where it places them; what it writes is written one block after another inside its margin and padding.overlayDepth - oneLayerDepth == 1, a stack of one layer being no overlay), has a placement to measure by, and something follows it there other than a page break (followedInFlow).followedInFlowis kept bywriteChildren, bywriteContainerBodyfor a box's last child, and by the loop over the roots.writeLayerColumns).REPORTED: a canvas's width and placements, a section's bleed, a line's keep, and a section's and a container's fixed width.clipPolicymoves toINERT: the page clips no canvas, andCanvasLayerDefinitionemits no clip.INERT's Javadoc now covers a field the page does not apply.Verification
./mvnw -B -ntp install -pl :graph-compose-render-docx→ BUILD SUCCESS: 1030 tests, 0 failures, 1 skipped (the property-gated fidelity probe).DocxFlowContainerReportTestis new, 16 tests. A note on a container is checked whole; a phrase added to a drawn line's note is checked by how the note ends.DocxFidelityCorpusTest -Dgraphcompose.docxFidelity=export, SHA-256 per file, 0 of 62 differ.-pl :graph-compose-core -Dtest='com.demcha.documentation.**'→ 166 tests, 0 failures;DocxPageZoneTest,DocxTransparentWrapperTest,TimelineRailAcrossBackendsTestandRtlAcrossBackendsTest→ 52 tests, 0 failures.Lane: render-docx backend (report only, no change to what is written) plus tests and docs.