Skip to content

Commit 6e9da89

Browse files
authored
Word2007 Reader: Fixed cast of color (#840)
1 parent e150df8 commit 6e9da89

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

docs/changes/1.2.0.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66

77
- `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)
88
- 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)
9-
- Added support for PHP 8.4 - [@Progi1984](https://github.com/Progi1984) in [#](https://github.com/PHPOffice/PHPPresentation/pull/)
10-
- `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/)
9+
- Added support for PHP 8.4 - [@Progi1984](https://github.com/Progi1984) in [#839](https://github.com/PHPOffice/PHPPresentation/pull/839)
10+
- `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)
1111

1212
## Bug fixes
1313

1414
- 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)
1515
- CI : Fixed PHPCSFixer by [@kw-pr](https://github.com/kw-pr) in [#835](https://github.com/PHPOffice/PHPPresentation/pull/835)
16+
- Word2007 Reader: Fixed cast of color fixing [#826](https://github.com/PHPOffice/PHPPresentation/pull/826) in [#840](https://github.com/PHPOffice/PHPPresentation/pull/840)
1617

1718
## Miscellaneous
1819

src/PhpPresentation/Reader/PowerPoint2007.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1405,7 +1405,7 @@ protected function loadStyleColor(XMLReader $xmlReader, DOMElement $oElement): C
14051405
$oColor->setRGB($oElement->getAttribute('val'));
14061406
$oElementAlpha = $xmlReader->getElement('a:alpha', $oElement);
14071407
if ($oElementAlpha instanceof DOMElement && $oElementAlpha->hasAttribute('val')) {
1408-
$alpha = strtoupper(dechex((((int) $oElementAlpha->getAttribute('val') / 1000) / 100) * 255));
1408+
$alpha = strtoupper(dechex((int) (((int) $oElementAlpha->getAttribute('val') / 1000) / 100) * 255));
14091409
$oColor->setRGB($oElement->getAttribute('val'), $alpha);
14101410
}
14111411

0 commit comments

Comments
 (0)