Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect font color read from xlsx #3465

Merged
merged 2 commits into from
Mar 18, 2023
Merged

Conversation

anhoder
Copy link
Contributor

@anhoder anhoder commented Mar 18, 2023

This is:

  • a bugfix
  • a new feature
  • refactoring
  • additional unit tests

Checklist:

  • Changes are covered by unit tests
    • Changes are covered by existing unit tests
    • New unit tests have been added
  • Code style is respected
  • Commit message explains why the change is made (see https://github.com/erlang/otp/wiki/Writing-good-commit-messages)
  • CHANGELOG.md contains a short summary of the change and a link to the pull request if applicable
  • Documentation is updated as necessary

Why this change is needed?

Fix #3464.

Place the read font color after setting the styles
@oleibman
Copy link
Collaborator

I believe your solution is correct, and I will merge it after studying it a bit more. I just want to add a little documentation about the problem. The spreadsheet which exposed the problem uses a RichText element which uses indexed colors and supplies its own color palette, which is relatively unusual (which is why this isn't a widespread problem). The code to read the color palette is processed with the styles. The code to read the RichText element had come before the style processing, and therefore used a default color palette. Moving the code which processes the RichText after the styles allows the correct palette to be used.

@oleibman oleibman merged commit b4e4e20 into PHPOffice:master Mar 18, 2023
@oleibman
Copy link
Collaborator

Thank you for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect font color read from xlsx
2 participants