Conversation
This reverts commit 0fdc017.
… tests to test.rs
Resolved conflicts: - src/xlsx/cells_reader.rs: Kept fork's style support, added upstream's shared_index fix for non-monotonic si numbers - src/xlsx/mod.rs: Kept fork's full style parsing (fonts, fills, borders, alignment), integrated upstream's Reference enum for better shared formula handling - tests/test.rs: Kept fork's style tests, added upstream's tests for issues tafia#573, tafia#587, tafia#589, tafia#594 New upstream features merged: - Shared formula fixes for row/column ranges (E:F, 5:6) - Absolute reference handling in shared formulas - Non-monotonic si number support - ODS DoS protection via cell limits - Table loading improvements
- Fixed shared formula offset calculation by properly looking up base formulas and applying offset using replace_cell_names function - Fixed chart worksheet detection (NotAWorksheet error) to return empty range instead of XmlEof error for non-worksheet sheets Fixes tests: issue_391_shared_formula, non_monotonic_si_shared_formula, shared_formula_reversed, column_row_ranges, issue_565_multi_axis_shared_formula, issue_567_absolute_shared_formula, issue_438_charts
Resolves merge conflicts in Cargo.toml (rstest version) and tests/test.rs (pivot table tests vs style tests — keep both). This merge adds: - Style struct with Font/Fill/Borders/Alignment/NumberFormat/Protection - styles.xml parser (src/xlsx/style_parser.rs) - worksheet_style() API returning row×col style grid - RLE-compressed StyleRange for memory efficiency Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Set package.name = "calamine-styles" with version 0.1.0 - Add crate metadata: description, keywords, authors - Replace README with calamine-styles specific docs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@codex review Please review exact head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1361d58135
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Parse font emphasis booleans, map text rotation 255 to stacked text, and preserve the default locked protection state. Reject malformed values with focused regressions.
|
@codex review Please re-review exact head |
Clarify that omitted locked/hidden behavior is supplied by Excel rather than declared as a CT_CellProtection schema default.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 934f220bc7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Please review final exact head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a2f351f0b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Honor explicit OOXML apply flags when materializing styles, compact each worksheet palette to the styles it actually uses, and expose rich-text plain values through all string-compatible serde deserializers. Add focused regressions for explicit false/true apply flags, sparse repeated style IDs, multi-run rich text, and Unicode scalar chars.
Keep an explicit cellXfs index zero distinct from an omitted style, preserve rich-text run properties that explicitly disable inherited formatting, and recognize all visible font and number-format properties. Track implicit SpreadsheetML row indexes, add focused regressions, and replace the style guide's value-range examples with compile-checked StyleRange usage.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8b8575607
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Compare owned and borrowed rich-text values to strings by their concatenated run text without allocating, and align all DataRef string variants with those semantics. Keep absent column widths distinct from explicit zero, resolving metadata-only column records through the worksheet or library default with focused regressions.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 97a8ef6881
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Keep an omitted row height distinct from explicit zero, resolving hidden and border-metadata rows through the worksheet or library default while preserving valid zero and historical malformed-height behavior. Cover worksheet and library defaults, explicit and implicit row indexes, explicit zero, and malformed metadata cases.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 31a7151350
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Preserve effective row and column styles for cells without an explicit cell XF, including number-format conversion. Resolve cellStyleXfs bases before applying cell-XF overrides, and expose both standard medium dash-dot border variants. Add focused regressions for precedence, inherited formats, all apply flags, and border token mappings.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac0ce40069
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Use cell XF zero for value conversion when a cell omits its style attribute without conflating omitted and explicit/inherited styles in StyleRange. Index cumulative RLE run endpoints so random style access is logarithmic rather than scanning from the first run. Add regressions for the XF-zero representation boundary and 4,096 alternating run boundaries with iterator/get consistency.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc6e1582b5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Represent SpreadsheetML centerContinuous explicitly and verify every horizontal and vertical alignment token remains distinct.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7535dcdf7c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Expose decoded custom format codes without stripping their format-language escapes, while continuing to use the same raw code for value conversion.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f4d43585cc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for attr in e.attributes() { | ||
| let attr = attr?; | ||
| if attr.key.as_ref() == b"val" { | ||
| name = Some(String::from_utf8_lossy(&attr.value).to_string()); |
There was a problem hiding this comment.
Decode XML entities in font names
When a font name contains an XML-escaped character, such as <name val="A&B"/>, Attribute::value still contains the encoded attribute text, so this stores A&B rather than the actual font name A&B. The rich-text rFont path uses the same raw conversion, causing both worksheet styles and formatted text runs to expose incorrect names; decode and unescape the attribute with the XML reader's decoder.
Useful? React with 👍 / 👎.
| let (red, green, blue) = OOXML_INDEXED_COLORS | ||
| .get(usize::from(index)) | ||
| .copied() | ||
| .unwrap_or((0, 0, 0)); |
There was a problem hiding this comment.
Handle the indexed system-background color
For a valid color using indexed="65", SpreadsheetML defines this reserved index as the system background color, but the 64-entry lookup falls through here and resolves every out-of-range index to black. Fonts, fills, borders, or rich-text runs using index 65 are therefore exposed with the foreground color instead of the expected background color; handle the reserved system foreground/background indices separately rather than mapping both through the black fallback.
Useful? React with 👍 / 👎.
Purpose
Promote the actual
calamine-stylesimplementation branch into the repository's default source line.The current default branch is an unchanged upstream snapshot, while WolfXL Community consumes the separately published
calamine-stylescrate. Keeping the implementation only on an unreviewed side branch makes source ownership, CI status, and release provenance ambiguous.Current contents
calamine-styles 0.1.0Required before merge
Exact-head validation
At
f4d43585cc5cb7e2bafc1bca4e4b9882cfb1f596:cargo test --all-featurespass: 80 library tests, 133 integration tests with 1 ignored, and 60 documentation tests with 1 ignoredcargo fmt --all -- --check, strict all-target/all-feature Clippy, Rust 1.83 all-target/all-feature check,cargo package --allow-dirty, andgit diff --checkpassStyleclones while the public styled streaming API remains styledStyleRangeconstructs sparse runs without materializing the bounding rectangle, reserves sparse-gap slot zero, usesu32run IDs without the prioru16aliasing, and indexes cumulative run endpoints for O(log runs) random accessworksheet_style()compacts the workbook palette to distinct styles used by the sheet; an explicits="0"retains real cellXfs style zero while an omitted style remains unstyledsinherit effective formatting with cell >customFormatrow > column precedence; inherited number formats also drive value conversion, and the column lookup is bounded to 16,384 entriesStyleRangeretains the omitted-vs-explicit/inherited representation distinctionapply*formatting flags while preserving the branch's omitted-flag compatibility behaviorcellStyleXfs[xfId]bases before overrides, so false apply flags retain inherited font, fill, border, number format, alignment, protection, andCellFormatchar, bytes, byte buffers, and enums), including Unicode scalar charsDataandDataRefrich-text values compare tostr/&strby concatenated run text without allocatingStyle::has_visible_properties()includes font name, size, family, underline, strikethrough, and number formats in addition to the existing visible fieldsNumberFormat::format_codeand use that same faithful code for typed value conversion<border>attributes, including self-closing diagonal sides and malformed-boolean rejectionmediumDashDotandmediumDashDotDotborders have distinct publicBorderStylevariants; this intentional enum expansion is an exhaustive-match API consideration for the maintained releasecenterContinuousalignment has a distinct publicHorizontalAlignment::CenterContinuousvariant; focused coverage audits every SpreadsheetML horizontal and vertical alignment token, and this intentional enum expansion is another exhaustive-match API consideration for the maintained releaseSTYLE_FEATURE.mddocument the realworksheet_style() -> StyleRangeAPI, its relative coordinates, concrete color/alignment types, and value/style separation; replacement guide examples were compile-checked7535dcdreview have commit-and-test replies and are resolved; an exact-head re-review is required before readinessExact-head Rust run · Exact-head typo run
This establishes a green, packageable 0.33-era fork baseline. Current upstream reports Calamine 0.36.1 with Rust 1.88, so the rebase must explicitly resolve both API delta and whether the fork retains Rust 1.83 or adopts the newer floor. It does not establish current-upstream parity; the upstream rebase, downstream verification, and release provenance remain merge blockers.
This PR is intentionally draft: it makes the real source delta visible and reviewable, but should not merge until the upstream and CI gates above are complete.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.