fix: keep table spans compact and bound their extents - #1038
Merged
Merged
Conversation
andiwand
force-pushed
the
review/19-csv-boundaries
branch
from
October 5, 2026 06:05
6ed93b6 to
b12a6a9
Compare
The ODF readers take repeat and span counts with as_uint(1), whose default applies only to a missing attribute. So a damaged number-columns-repeated="0" reached the cursor, which now threw, and the document no longer opened. Before, a zero count advanced nothing. The cursor again accepts zero and still rejects overflow. The recalculation also threw for a zero matrix span. Because every save recalculates, such a document no longer saved. A zero span covers no cell, so only overflow is rejected there too. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gb1fLafqqzehpqPuU6uBfn
andiwand
force-pushed
the
review/20-table-spans
branch
from
October 5, 2026 06:12
35d7498 to
52fc542
Compare
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.
🤖 Generated with Claude Code
The shared table cursor previously allocated a list entry for every row covered by a merged cell and discarded pending spans when advancing several rows. Store one range with an end row per merged cell and retain active spans across row advances. Reject overflowing extents before changing the cursor; a zero count from a damaged file advances nothing.
Recalculation checks formula-span dimensions and its expansion budget before narrowing or accumulating sizes, including on 32-bit targets. Row-label formatting also widens before adding one.
Validation: 305 targeted ODF, HTML, recalculation, table-cursor, and position tests pass. New regressions cover a UINT32_MAX-row span without proportional allocation, invalid extents, and a formula array whose size would wrap on 32-bit targets.