fix(docx): resolve basedOn style chains - #1455
Merged
Merged
Conversation
Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
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.
Summary
w:basedOnchains transitively within the same style type.ALL,AGES,WELCOME, and gate text, with fresh two-page visual evidence.Related issue
Fixes #1453
Testing
CARGO_TARGET_DIR=/Users/yhkwon/Documents/office2pdf/target cargo test -p office2pdf --lib test_based_on_chain_inherits_parent_paragraph_and_run_properties -- --nocapturefailed before the implementation because inherited center alignment wasNone.CARGO_TARGET_DIR=/Users/yhkwon/Documents/office2pdf/target cargo test -p office2pdf --lib parser::docx::tests::style_tests -- --nocapture(51 passed)CARGO_TARGET_DIR=/Users/yhkwon/Documents/office2pdf/target cargo test --workspace(all workspace, fixture, integration, and doc tests passed)CARGO_TARGET_DIR=/Users/yhkwon/Documents/office2pdf/target cargo clippy --workspace --all-targets -- -D warningsCARGO_TARGET_DIR=/Users/yhkwon/Documents/office2pdf/target cargo check --target wasm32-unknown-unknown -p office2pdfCARGO_TARGET_DIR=/Users/yhkwon/Documents/office2pdf/target cargo check --target wasm32-unknown-unknown -p office2pdf --features wasmCARGO_TARGET_DIR=/Users/yhkwon/Documents/office2pdf/target cargo check --target wasm32-unknown-unknown -p office2pdf --features wasm-cjk-fontpython3 -m unittest discover -s scripts/tests -p 'test_*.py'(275 passed)cargo fmt --all -- --checkgit diff --checkpython3 scripts/compare_layout.py gt.pdf after.pdf --json --audit(expected nonzero; all remaining findings dispositioned to DOCX missing-font selection changes table wrapping and placement across hosts #1409 and DOCX table cells do not break overlong Latin tokens at character boundaries #1454, with zero painted-visibility mismatches)python3 scripts/compare_text_layer.py gt.pdf after.pdf --json(census identical; normalized content differs only because GT breaksWELCOMEasWELC/OME, tracked in DOCX table cells do not break overlong Latin tokens at character boundaries #1454)python3 scripts/compare_render.py --page 1 --dpi 300 --audit --lines --artifacts-dir ... gt.pdf after.pdfand page 2 equivalent (expected nonzero; all remaining clusters dispositioned to DOCX missing-font selection changes table wrapping and placement across hosts #1409 and DOCX table cells do not break overlong Latin tokens at character boundaries #1454)PASSVisual impact
Visual audit
Place your event title here.docxpdftoppm, 300 DPI inspection; stored progressive JPEG evidence at 150 DPIfixassets/bugfixes/issue-1453/layout-audit.jsonALL,AGES, andGATES OPEN AT 9AMmoving from left alignment to the right cell's horizontal center; their remaining x deltas are 1.77pt, 0.39pt, and 0.02pt. Page 1 visually hidesSensitivity: Internalbehind the artwork and the strengthened layout audit reports zero visibility mismatches on both pages. The rotated photo, orange diamond, blue and pink panels, dot fields, white circle, triangles, diagonal separators, and three vertical rules retain their position, size, rotation, fill, and stroke. The still-unbroken and overflowingWELCOMEline and the resulting vertical stack are DOCX table cells do not break overlong Latin tokens at character boundaries #1454; title/subtitle/RSVP font family, weight, width, and metric differences are DOCX missing-font selection changes table wrapping and placement across hosts #1409.assets/bugfixes/issue-1453/gt.jpgassets/bugfixes/issue-1453/before.jpgassets/bugfixes/issue-1453/after.jpgVisual comparison
Required inspection
Deviation audit
WELC/OMElines versus the output's singleWELCOMEline; all source elements remain presentWELC/OME; the codepoint-class census otherwise matches and both footer instances remain extractableWELCOMElines after wrapping; #1453 fixes the inherited center alignment for every current right-cell lineWELCOMEline and resulting vertical cell distribution; #1409 tracks subtitle and RSVP font-metric offsetsWELCOMEline; the page-1 footer is correctly clipped/occluded and now reports zero visibility mismatchesChecklist
Signed-off-byline