Skip to content

Commit

Permalink
Merge pull request #739 from zose43/issue738
Browse files Browse the repository at this point in the history
#738: Fix Reader/PowerPoint2007, float to int
  • Loading branch information
Progi1984 committed Aug 12, 2023
2 parents f5907e1 + 43dd40c commit 1d5b988
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PhpPresentation/Reader/PowerPoint2007.php
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ protected function loadMasterSlide(string $sPart, string $baseFile): void
$oElementLvlDefRPR = $xmlReader->getElement('a:defRPr', $oElementLvl);
if ($oElementLvlDefRPR instanceof DOMElement) {
if ($oElementLvlDefRPR->hasAttribute('sz')) {
$oRTParagraph->getFont()->setSize($oElementLvlDefRPR->getAttribute('sz') / 100);
$oRTParagraph->getFont()->setSize((int) ($oElementLvlDefRPR->getAttribute('sz') / 100));

Check failure on line 560 in src/PhpPresentation/Reader/PowerPoint2007.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.0)

Binary operation "/" between string and 100 results in an error.

Check failure on line 560 in src/PhpPresentation/Reader/PowerPoint2007.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (7.4)

Binary operation "/" between string and 100 results in an error.

Check failure on line 560 in src/PhpPresentation/Reader/PowerPoint2007.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (7.3)

Binary operation "/" between string and 100 results in an error.

Check failure on line 560 in src/PhpPresentation/Reader/PowerPoint2007.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.1)

Binary operation "/" between string and 100 results in an error.

Check failure on line 560 in src/PhpPresentation/Reader/PowerPoint2007.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (7.1)

Binary operation "/" between string and 100 results in an error.

Check failure on line 560 in src/PhpPresentation/Reader/PowerPoint2007.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (7.2)

Binary operation "/" between string and 100 results in an error.
}
if ($oElementLvlDefRPR->hasAttribute('b') && 1 == $oElementLvlDefRPR->getAttribute('b')) {
$oRTParagraph->getFont()->setBold(true);
Expand Down Expand Up @@ -1264,7 +1264,7 @@ protected function loadHyperlink(XMLReader $xmlReader, DOMElement $element, Hype
protected function loadStyleBorder(XMLReader $xmlReader, DOMElement $oElement, Border $oBorder): void
{
if ($oElement->hasAttribute('w')) {
$oBorder->setLineWidth($oElement->getAttribute('w') / 12700);
$oBorder->setLineWidth((int) ($oElement->getAttribute('w') / 12700));

Check failure on line 1267 in src/PhpPresentation/Reader/PowerPoint2007.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.0)

Binary operation "/" between string and 12700 results in an error.

Check failure on line 1267 in src/PhpPresentation/Reader/PowerPoint2007.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (7.4)

Binary operation "/" between string and 12700 results in an error.

Check failure on line 1267 in src/PhpPresentation/Reader/PowerPoint2007.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (7.3)

Binary operation "/" between string and 12700 results in an error.

Check failure on line 1267 in src/PhpPresentation/Reader/PowerPoint2007.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.1)

Binary operation "/" between string and 12700 results in an error.

Check failure on line 1267 in src/PhpPresentation/Reader/PowerPoint2007.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (7.1)

Binary operation "/" between string and 12700 results in an error.

Check failure on line 1267 in src/PhpPresentation/Reader/PowerPoint2007.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (7.2)

Binary operation "/" between string and 12700 results in an error.
}
if ($oElement->hasAttribute('cmpd')) {
$oBorder->setLineStyle($oElement->getAttribute('cmpd'));
Expand Down

0 comments on commit 1d5b988

Please sign in to comment.