Typecasting fixes

This commit is contained in:
MarkBaker 2020-11-16 19:48:32 +01:00
parent d6f2180fa0
commit d311603c6b
2 changed files with 3 additions and 3 deletions

View File

@ -1144,8 +1144,8 @@ class Xlsx extends BaseReader
$shadow = $objDrawing->getShadow(); $shadow = $objDrawing->getShadow();
$shadow->setVisible(true); $shadow->setVisible(true);
$shadow->setBlurRadius(Drawing::EMUToPixels((int) self::getArrayItem($outerShdw->attributes(), 'blurRad'))); $shadow->setBlurRadius(Drawing::EMUToPixels((int) self::getArrayItem($outerShdw->attributes(), 'blurRad')));
$shadow->setDistance(Drawing::EMUToPixels(self::getArrayItem($outerShdw->attributes(), 'dist'))); $shadow->setDistance(Drawing::EMUToPixels((int) self::getArrayItem($outerShdw->attributes(), 'dist')));
$shadow->setDirection(Drawing::angleToDegrees(self::getArrayItem($outerShdw->attributes(), 'dir'))); $shadow->setDirection(Drawing::angleToDegrees((int) self::getArrayItem($outerShdw->attributes(), 'dir')));
$shadow->setAlignment((string) self::getArrayItem($outerShdw->attributes(), 'algn')); $shadow->setAlignment((string) self::getArrayItem($outerShdw->attributes(), 'algn'));
$clr = isset($outerShdw->srgbClr) ? $outerShdw->srgbClr : $outerShdw->prstClr; $clr = isset($outerShdw->srgbClr) ? $outerShdw->srgbClr : $outerShdw->prstClr;
$shadow->getColor()->setRGB(self::getArrayItem($clr->attributes(), 'val')); $shadow->getColor()->setRGB(self::getArrayItem($clr->attributes(), 'val'));

View File

@ -77,7 +77,7 @@ class Xls
// then we have a default row dimension with explicit height // then we have a default row dimension with explicit height
$defaultRowDimension = $worksheet->getDefaultRowDimension(); $defaultRowDimension = $worksheet->getDefaultRowDimension();
$rowHeight = $defaultRowDimension->getRowHeight(); $rowHeight = $defaultRowDimension->getRowHeight();
$pixelRowHeight = Drawing::pointsToPixels($rowHeight); $pixelRowHeight = Drawing::pointsToPixels((int) $rowHeight);
} else { } else {
// we don't even have any default row dimension. Height depends on default font // we don't even have any default row dimension. Height depends on default font
$pointRowHeight = Font::getDefaultRowHeightByFont($font); $pointRowHeight = Font::getDefaultRowHeightByFont($font);