Skip to content

Commit

Permalink
Fix issue with richtext color values not being read in Xlsx.php (prob…
Browse files Browse the repository at this point in the history
…ably related to a namespace change and - according to commit log - issue PHPOffice#2303)
  • Loading branch information
daedeloth committed Dec 21, 2021
1 parent 707b7d5 commit 8ceaae8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/PhpSpreadsheet/Reader/Xlsx.php
Original file line number Diff line number Diff line change
Expand Up @@ -1688,8 +1688,9 @@ private function parseRichText(?SimpleXMLElement $is)
if (isset($attr['val'])) {
$objText->getFont()->setSize((float) $attr['val']);
}
if (isset($run->rPr->color)) {
$objText->getFont()->setColor(new Color($this->styleReader->readColor($run->rPr->color)));
$attr = $run->rPr->color->attributes();
if (count($attr) > 0) {
$objText->getFont()->setColor(new Color($this->styleReader->readColor($attr)));
}
if (isset($run->rPr->b)) {
$attr = $run->rPr->b->attributes();
Expand Down

0 comments on commit 8ceaae8

Please sign in to comment.