fix: read dataBar cfvo and color children written as start/end tags#347
Merged
Merged
Conversation
Some producers (e.g. openpyxl) write <cfvo> and <color> inside <dataBar> as <cfvo ...></cfvo> rather than self-closing <cfvo .../>. DataBar's reader only matched Event::Empty, so both collections came back empty and consumers lost the bar color. Match Event::Start as well, mirroring ColorScale's reader. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
This was referenced Jul 21, 2026
Closed
pull Bot
pushed a commit
to RadaKichenin/office2pdf
that referenced
this pull request
Jul 22, 2026
Data bars fell back to the default steel blue when the rule's <color> (and <cfvo>) children were written as start/end pairs instead of self-closing tags — umya-spreadsheet's DataBar reader only matched Event::Empty, so the color collection came back empty (issue developer0hye#371). The reader fix lands in the umya-spreadsheet fork (branch fix/panic-safety-v2, upstreamed as MathNya/umya-spreadsheet#347); this change pins the behavior with a regression test that rewrites the fixture XML into the start/end-tag form before parsing. Also ships the side-by-side comparison for follow-up defect developer0hye#396 (auto-height rows render taller than Excel). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
11 tasks
Owner
|
@developer0hye |
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
DataBar::set_attributesonly matchesEvent::Emptyfor its<cfvo>and<color>children. Files written by producers that emit these as start/end pairs (<color rgb="FF1E2761"></color>— openpyxl among others) load with emptycfvo_collectionandcolor_collection, so the data bar's color is silently lost.ColorScale::set_attributesalready handles both event kinds; this PR applies the same pattern toDataBar.Changes
Event::Startin addition toEvent::Emptyforcfvo/colorchildren of<dataBar>, passing the empty flag through to the child readers.Testing
cargo test— full suite green (87 + 112 + 4 + 79 passed).structs::data_bar::tests::read_child_elements_with_end_tags,read_child_elements_self_closing.