Repository navigation
fix: bound ODF number format expansion - #1086
Merged
Merged
Conversation
andiwand
force-pushed
the
review/67-odf-number-tokens
branch
from
October 5, 2026 18:32
8d62f54 to
309c283
Compare
LibreOffice clamps a digit count on import and ignores a negative one, so one large count does not drop the whole data style. Clamp each count to 4,096, keep the default for a negative count, and clamp the minimum decimals to the decimals. 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/68-odf-format-bounds
branch
from
October 5, 2026 18:39
af969e3 to
4a29c2f
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
ODF number styles now clamp digit counts to 4096, keep the default for a negative count, and clamp the minimum decimal count to the total, as LibreOffice does. This prevents tiny styles from requesting gigabytes of placeholder strings or overflowing the decimal-count subtraction. Styles with more than two conditional maps are rejected before expanding another mapped style.
One table-driven regression covers the count fields, out-of-range counts, inconsistent decimals, and the upper boundary. All 71 targeted number-format, ODF sheet, and recalculation checks pass. The changed production file passes clang-tidy (upstream pugixml analyzer warnings remain advisory).