fix(pptx): apply style-matrix outlines (lnRef) to shapes#322
Merged
Conversation
Shapes whose outline comes from the style matrix rendered without a stroke. Two causes: the outline width lives in the theme lnStyleLst referenced by <a:lnRef idx>, which we never parsed; and the lnRef scheme color carrying a shade/tint transform arrives as a Start event, which only the Empty-event color arm handled, so the color was dropped (the same class of bug as the text-box shade fix in #240). Parse the theme lnStyleLst widths into ThemeData, capture the lnRef idx, fall back to that width when no explicit <a:ln w> is present, and resolve lnRef/fillRef/fontRef colors from Start events too. Related: #318 Co-Authored-By: Claude Fable 5 <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
Shapes whose outline comes from the style matrix (
<p:style><a:lnRef>) rendered with no stroke. Two root causes:lnStyleLstentry referenced by<a:lnRef idx="N">, which we never parsed — the width defaulted to 0<a:shade>/<a:tint>transform arrives as a Start event, but only the Empty-event color arm handled the refs, so the color was dropped (same bug class as the text-box shade fix in XLSX: render worksheet text boxes #240)Fix: parse the theme
lnStyleLstwidths intoThemeData; capture thelnRef idxand fall back to that width when no explicit<a:ln w>is present; resolvelnRef/fillRef/fontRefcolors from Start events too.Test plan
lnStyleLstwidth parsing; a shape with only a shadedlnRef idx=2outline resolves both width (theme idx→1pt) and color (accent1 shaded 50%) into a stroke (TDD, red first)--checkclean; clippy-D warningscleanVisual verification (public shape-text-rotate fixture vs PowerPoint GT, 150 DPI)
The pentagon now shows its accent1-shaded outline like PowerPoint (combined with the geometry fix #319 already on main).
Related: #318
🤖 Generated with Claude Code