Skip to content

Commit

Permalink
Word2007 Reader: Fixed cast of color
Browse files Browse the repository at this point in the history
  • Loading branch information
Progi1984 committed Jan 7, 2025
1 parent e150df8 commit 5eacf2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docs/changes/1.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@

- `phpoffice/phpspreadsheet`: Allow version 1.9 or 2.0 by [@Progi1984](https://github.com/Progi1984) fixing [#790](https://github.com/PHPOffice/PHPPresentation/pull/790), [#812](https://github.com/PHPOffice/PHPPresentation/pull/812) in [#816](https://github.com/PHPOffice/PHPPresentation/pull/816)
- Group Shape: moving the shape now moves all contained shapes. Offsets and size are calculated based on the contained shapes by [@DennisBirkholz](https://github.com/DennisBirkholz) in [#690](https://github.com/PHPOffice/PHPPresentation/pull/690)
- Added support for PHP 8.4 - [@Progi1984](https://github.com/Progi1984) in [#](https://github.com/PHPOffice/PHPPresentation/pull/)
- `phpoffice/phpspreadsheet`: Allow version 3.0 by [@Progi1984](https://github.com/Progi1984) fixing [#836](https://github.com/PHPOffice/PHPPresentation/pull/836) in [#](https://github.com/PHPOffice/PHPPresentation/pull/)
- Added support for PHP 8.4 - [@Progi1984](https://github.com/Progi1984) in [#839](https://github.com/PHPOffice/PHPPresentation/pull/839)
- `phpoffice/phpspreadsheet`: Allow version 3.0 by [@Progi1984](https://github.com/Progi1984) fixing [#836](https://github.com/PHPOffice/PHPPresentation/pull/836) in [#839](https://github.com/PHPOffice/PHPPresentation/pull/839)

## Bug fixes

- Word2007 Reader: Fixed cast of spacing fixing [#729](https://github.com/PHPOffice/PHPPresentation/pull/729), [#796](https://github.com/PHPOffice/PHPPresentation/pull/796) in [#818](https://github.com/PHPOffice/PHPPresentation/pull/818)
- CI : Fixed PHPCSFixer by [@kw-pr](https://github.com/kw-pr) in [#835](https://github.com/PHPOffice/PHPPresentation/pull/835)
- Word2007 Reader: Fixed cast of color fixing [#826](https://github.com/PHPOffice/PHPPresentation/pull/826) in [#840](https://github.com/PHPOffice/PHPPresentation/pull/840)

## Miscellaneous

Expand Down
2 changes: 1 addition & 1 deletion src/PhpPresentation/Reader/PowerPoint2007.php
Original file line number Diff line number Diff line change
Expand Up @@ -1405,7 +1405,7 @@ protected function loadStyleColor(XMLReader $xmlReader, DOMElement $oElement): C
$oColor->setRGB($oElement->getAttribute('val'));
$oElementAlpha = $xmlReader->getElement('a:alpha', $oElement);
if ($oElementAlpha instanceof DOMElement && $oElementAlpha->hasAttribute('val')) {
$alpha = strtoupper(dechex((((int) $oElementAlpha->getAttribute('val') / 1000) / 100) * 255));
$alpha = strtoupper(dechex((int) (((int) $oElementAlpha->getAttribute('val') / 1000) / 100) * 255));
$oColor->setRGB($oElement->getAttribute('val'), $alpha);
}

Expand Down

0 comments on commit 5eacf2b

Please sign in to comment.