Skip to content

Fix RTF shape border color mapping#83

Draft
vixco wants to merge 1 commit into
Euro-Office:mainfrom
vixco:fix/rtf-picture-border-line-color
Draft

Fix RTF shape border color mapping#83
vixco wants to merge 1 commit into
Euro-Office:mainfrom
vixco:fix/rtf-picture-border-line-color

Conversation

@vixco
Copy link
Copy Markdown
Contributor

@vixco vixco commented May 29, 2026

Summary

  • Include m_nBorderRightColor when copying line color to picture border colors.
  • Write o:borderbottomcolor from m_nBorderBottomColor.
  • Write o:borderrightcolor from m_nBorderRightColor.

Why

Two RTF shape border color mappings were inconsistent:

  • The line-color fallback assigned m_nBorderTopColor twice and never assigned m_nBorderRightColor.
  • Shape property rendering emitted bottom border color from the right field and right border color from the bottom field.

Both cases can make a shape or picture border use the wrong side's color when round-tripping RTF.

Validation

  • Ran git diff --check.
  • Checked the border color field definitions.
  • Checked the RTF shape property reader and VML-style shape rendering for the same border color fields.

Signed-off-by: vixco <93612321+vixco@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant