fix(xlsx): preserve literal zero format spacing - #1515
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
Related issue
Fixes #1262.
Follow-up found during the closing audit: #1514.
Testing
cargo fmt --all -- --checkgit diff --checkpython3 -m unittest discover -s scripts/tests(326 passed)cargo test -p office2pdf literal_zero_section_tests(3 passed)cargo test -p office2pdf --test xlsx_fixtures structure_monthly_budget_zero_values_preserve_the_literal_zero_section -- --exact(1 passed)cargo test --workspace(passed after refreshing the ignored local lock to the currentdocx-rsbranch head and rebuilding a shared-target test binary whose embedded worktree fixture path was stale)CARGO_INCREMENTAL=0 cargo clippy --workspace --all-targets -- -D warningscargo package -p office2pdf --allow-dirty(221 files packaged; crates.io dependency boundary compiled)CARGO_INCREMENTAL=0 cargo check --target wasm32-unknown-unknown -p office2pdfCARGO_INCREMENTAL=0 cargo check --target wasm32-unknown-unknown -p office2pdf --features wasmCARGO_INCREMENTAL=0 cargo check --target wasm32-unknown-unknown -p office2pdf --features wasm-cjk-fontqpdf --check target/issue-1262/after-current-source.pdfpython3 scripts/compare_layout.py target/issue-1262/gt-clean.pdf target/issue-1262/after-current-source.pdf --noise-floor 0.5 --fine-shift 0.5 --audit --json(expected findings were dispositioned to open issues)python3 scripts/compare_render.py target/issue-1262/gt-clean.pdf target/issue-1262/after-current-source.pdf --page 1 --dpi 300 --fine-shift 0.5 --artifacts-dir target/issue-1262/strict-after-300 --cluster-report assets/bugfixes/issue-1262/render-clusters-page-1.json --cluster-dispositions target/issue-1262/page-1-dispositions.json --strict-clustersumya-spreadsheet:cargo test --lib(119 passed) andcargo clippy --lib -- -D warningson Preserve whitespace in literal-only number format sections MathNya/umya-spreadsheet#362Visual impact
Visual audit
tests/fixtures/xlsx/issue_1181_fit_to_height.xlsx, sheetMonthly college budgetpdftoppmat 300 DPI for the full page, diff, evidence band, and matched cropsfixassets/bugfixes/issue-1262/layout-audit.jsonassets/bugfixes/issue-1262/render-clusters-page-1.json0; after the fix, each shows the literal dash with its two trailing spaces and the target run width matches Excel (7.804pt versus 7.808pt). The before/after position census found no shifts above 0.5pt and no material 20pt2 diff cluster beyond those glyph replacements. The full-page comparison still shows the separately tracked chart, font, row-pitch, footer, and overflow deviations listed below. Hairline inventory: the title double rules, chart axes/grid rules, gray table separators, olive section rules, teal total rules, and column-Q sparkline strokes were checked; there is no dashed or dotted border on this page, and the target dashes are text glyphs. Emphasis inventory: the bold title, teal headings, brown section labels, teal totals, negative red values, and regular body runs remain present; no italic or underline emphasis is missing.assets/bugfixes/issue-1262/gt.jpgassets/bugfixes/issue-1262/before.jpgassets/bugfixes/issue-1262/after.jpgVisual comparison
Required inspection
Deviation audit
Follow-up evidence
#1514 records the independent row-height snap discovered during this audit. Native Excel is on the left and the current office2pdf output is on the right, rendered at 300 DPI.
Checklist
Signed-off-byline