Skip to content

Commit d311603

Browse files
author
MarkBaker
committed
Typecasting fixes
1 parent d6f2180 commit d311603

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/PhpSpreadsheet/Reader/Xlsx.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,8 +1144,8 @@ public function load($pFilename)
11441144
$shadow = $objDrawing->getShadow();
11451145
$shadow->setVisible(true);
11461146
$shadow->setBlurRadius(Drawing::EMUToPixels((int) self::getArrayItem($outerShdw->attributes(), 'blurRad')));
1147-
$shadow->setDistance(Drawing::EMUToPixels(self::getArrayItem($outerShdw->attributes(), 'dist')));
1148-
$shadow->setDirection(Drawing::angleToDegrees(self::getArrayItem($outerShdw->attributes(), 'dir')));
1147+
$shadow->setDistance(Drawing::EMUToPixels((int) self::getArrayItem($outerShdw->attributes(), 'dist')));
1148+
$shadow->setDirection(Drawing::angleToDegrees((int) self::getArrayItem($outerShdw->attributes(), 'dir')));
11491149
$shadow->setAlignment((string) self::getArrayItem($outerShdw->attributes(), 'algn'));
11501150
$clr = isset($outerShdw->srgbClr) ? $outerShdw->srgbClr : $outerShdw->prstClr;
11511151
$shadow->getColor()->setRGB(self::getArrayItem($clr->attributes(), 'val'));

src/PhpSpreadsheet/Shared/Xls.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public static function sizeRow(Worksheet $worksheet, $row = 1)
7777
// then we have a default row dimension with explicit height
7878
$defaultRowDimension = $worksheet->getDefaultRowDimension();
7979
$rowHeight = $defaultRowDimension->getRowHeight();
80-
$pixelRowHeight = Drawing::pointsToPixels($rowHeight);
80+
$pixelRowHeight = Drawing::pointsToPixels((int) $rowHeight);
8181
} else {
8282
// we don't even have any default row dimension. Height depends on default font
8383
$pointRowHeight = Font::getDefaultRowHeightByFont($font);

0 commit comments

Comments
 (0)