Skip to content

fix(xlsx): preserve fill boundary crossings - #1500

Merged
developer0hye merged 1 commit into
mainfrom
fix/issue-1475-fill-bleed-precedence
Sep 1, 2026
Merged

fix(xlsx): preserve fill boundary crossings#1500
developer0hye merged 1 commit into
mainfrom
fix/issue-1475-fill-bleed-precedence

Conversation

@developer0hye

@developer0hye developer0hye commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Fixes #1475

Summary

  • precompute the positive-axis horizontal ink that owns each Excel cell junction after border conflict resolution
  • start a later cell's right-side background bleed below that winning band while keeping the lower edge fixed
  • preserve Excel's ordinary lower-left crossing ownership when a differently coloured upper-right fill starts at the same junction
  • add focused regressions for the merged-title, ordinary adjacent-fill, and conditional-fill cases
  • add fresh GT/before/after evidence plus 300-DPI layout and strict cluster reports

The page-1 title/body boundary now stays continuous at both pale-cell intersections. The same rule removes four page-2 conditional-fill notches without moving text or changing surrounding fill extents.

Related issue

Fixes #1475. Related: #982, #1472.

Testing

  • cargo test -p office2pdf render::typst_gen::tests::table_codegen_tests::table_border_tests — 40 passed
  • cargo test --workspace — passed, including 2,802 office2pdf library tests and all DOCX/PPTX/XLSX fixture suites
  • python3 -m unittest discover -s scripts/tests — 326 passed
  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo check --target wasm32-unknown-unknown -p office2pdf
  • cargo check --target wasm32-unknown-unknown -p office2pdf --features wasm
  • cargo check --target wasm32-unknown-unknown -p office2pdf --features wasm-cjk-font
  • wasm-pack build crates/office2pdf --target web --features wasm
  • qpdf --check target/issue-1475/after-final.pdf
  • required pre-commit documentation freshness audit: PASS

Visual impact

  • No rendered PDF change
  • Rendered PDF change or visual evidence added
  • Reason: The fix changes Excel fill-paint precedence at shared cell junctions.

Visual audit

Visual comparison

GT Before After
GT Before After

Fresh Poppler and MuPDF renders at 300 DPI both show the two page-1 pale notches in the before PDF and a continuous rose boundary in the after PDF.

The page-2 audit retains two 1pt adjacent-colour corner differences, both tracked in #1495. Before this change page 2 had six visible-fill mismatches, so four are fixed and none are newly introduced.

The PDF text-layer check reports two extra GT spaces because the native exporter fragments the source phrase Birthday Budget as Birt hday Bu dget. The output preserves the workbook source phrase, so this is a GT text-fragmentation artifact rather than output content loss.

Required inspection

  • Rendered all evidence at 150 DPI or higher
  • Stored progressive JPEG quality 86 assets with metadata stripped
  • Used Codex/Claude vision to inspect the full GT/output pages, diff, and matched crops
  • Inspected matched region crops at full resolution
  • Ran compare_layout.py --audit --fine-shift PT and dispositioned every fine/large text-instance shift, painted-text visibility mismatch, and visible-fill occlusion
  • Ran compare_render.py --cluster-report PATH --strict-clusters and dispositioned every material 5% fuzz diff cluster by explicit ID
  • Inventoried hairlines and border dash styles
  • Inventoried font weight, italic, and underline emphasis

Deviation audit

Check Result
Page count/order Matches GT — two printable worksheets in workbook order.
Element presence Matches GT — all 46 audited text lines, chart, images, table regions, and footer elements are present.
Position/size Remaining: #1210, #1493, #1494, #1496, #1497, #1498, #1499. Both #1475 crossings and four page-2 conditional-fill crossings are fixed without changing affected sizes.
Rotation/flip Matches GT — no rotated or flipped mismatch.
Fill Remaining: #1495. The rose page-1 boundary is fixed; two adjacent-colour page-2 corners remain.
Stroke/border Matches GT — page 1 separator is the fill boundary fixed here; page 2 chart gridlines, plot line/markers, and table seams match in position and pattern.
Shape outline geometry Matches GT — chart, images, and table geometry remain unchanged.
Text content Matches GT — output preserves the workbook source; only the native GT text layer inserts two fragment spaces.
Font family/weight/style Remaining: #1210. Regular title/body runs and bold conditional category labels otherwise match; no italic or underline runs are missing.
Text color Remaining: #1210. Other text colours match GT.
Alignment Remaining: #1493. Other alignment matches GT.
Line/paragraph spacing Remaining: #1494, #1498. Other line and paragraph spacing matches GT.
Clipping/overflow Matches GT — no new clipping, overflow, wrap, or reflow.

Checklist

  • Commits include a Signed-off-by line
  • PR scope contains one root cause
  • Remaining visual deviations each reference an open issue

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
@developer0hye
developer0hye merged commit ebfdfd3 into main Sep 1, 2026
34 of 35 checks passed
@developer0hye
developer0hye deleted the fix/issue-1475-fill-bleed-precedence branch September 1, 2026 18:01
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.

XLSX: a later body-cell fill cuts a notch through the title region's bottom rule

1 participant