feat: add PPTX table style support#168
Merged
developer0hye merged 6 commits intomainfrom Mar 14, 2026
Merged
Conversation
Add Tint and Shade variants to ColorTransform enum for OOXML color processing. Tint blends toward white (new = 255 - (255 - old) * t) and Shade blends toward black (new = old * s), both applied in RGB space before luminance transforms. Fix test_scheme_color_as_start_element to assert correct tinted color instead of ignoring the transform. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
Add pptx_table_styles module that: - Parses <a:tblStyleLst> XML from ppt/tableStyles.xml into a TableStyleMap keyed by style ID - Extracts per-region styles (wholeTbl, firstRow, lastRow, firstCol, lastCol, band1H, band2H) including fill color, text color, bold - Applies resolved styles to table cells with correct priority: cell-explicit > firstRow/lastRow/firstCol/lastCol > band > wholeTbl - Preserves explicit cell-level overrides (background, text color) Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
Thread TableStyleMap from ppt/tableStyles.xml through the parser chain: PptxParser::parse → parse_single_slide → SlideXmlParser → parse_pptx_table. Parse <a:tblPr> attributes (firstRow, bandRow, etc.) and <a:tableStyleId> text content. Apply resolved table styles in PptxTableParser::finish() so cells receive background fills and text formatting from the style definition. Set header_row_count from the firstRow attribute. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
023768e to
627e4b5
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
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
tableStyles.xmland resolve theme-based colors (schemeClr, srgbClr, sysClr) with tint/shade transformsTest plan
parse_table_styles_xml(solid fill, scheme colors, banded rows, color transforms)apply_table_style(header fill, banding with skip, explicit override, missing style noop)tableStyles.xml→ correct IR table output🤖 Generated with Claude Code