Fix datatype conversion for Gnumeric values
This commit is contained in:
parent
aecef1372f
commit
84ba21400c
|
@ -436,18 +436,18 @@ class Gnumeric extends BaseReader
|
||||||
{
|
{
|
||||||
if (!$this->readDataOnly && isset($sheet->PrintInformation)) {
|
if (!$this->readDataOnly && isset($sheet->PrintInformation)) {
|
||||||
$printInformation = $sheet->PrintInformation[0];
|
$printInformation = $sheet->PrintInformation[0];
|
||||||
$scale = $printInformation->Scale->attributes()['percentage'];
|
$scale = (string) $printInformation->Scale->attributes()['percentage'];
|
||||||
$pageOrder = (string) $printInformation->order;
|
$pageOrder = (string) $printInformation->order;
|
||||||
$orientation = (string) $printInformation->orientation;
|
$orientation = (string) $printInformation->orientation;
|
||||||
$horizontalCentered = (bool) $printInformation->hcenter;
|
$horizontalCentered = (string) $printInformation->hcenter->attributes()['value'];
|
||||||
$verticalCentered = (bool) $printInformation->vcenter;
|
$verticalCentered = (string) $printInformation->vcenter->attributes()['value'];
|
||||||
|
|
||||||
$this->spreadsheet->getActiveSheet()->getPageSetup()
|
$this->spreadsheet->getActiveSheet()->getPageSetup()
|
||||||
->setPageOrder($pageOrder === 'r_then_d' ? PageSetup::PAGEORDER_OVER_THEN_DOWN : PageSetup::PAGEORDER_DOWN_THEN_OVER)
|
->setPageOrder($pageOrder === 'r_then_d' ? PageSetup::PAGEORDER_OVER_THEN_DOWN : PageSetup::PAGEORDER_DOWN_THEN_OVER)
|
||||||
->setScale((int) $scale)
|
->setScale((int) $scale)
|
||||||
->setOrientation($orientation ?? PageSetup::ORIENTATION_DEFAULT)
|
->setOrientation($orientation ?? PageSetup::ORIENTATION_DEFAULT)
|
||||||
->setHorizontalCentered($horizontalCentered)
|
->setHorizontalCentered((bool) $horizontalCentered)
|
||||||
->setVerticalCentered($verticalCentered);
|
->setVerticalCentered((bool) $verticalCentered);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue