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 authored 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));
}
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));
}
if ($oElement->hasAttribute('cmpd')) {
$oBorder->setLineStyle($oElement->getAttribute('cmpd'));
Expand Down

0 comments on commit 1d5b988

Please sign in to comment.