Corrupt Sample Output for 20 and 30 (#2648)
Xls Reader can read drawing offsetX and offsetY as float. However, Excel Xlsx (and PhpSpreadsheet) wants them only as int. This leads 20_Read_Xls and 30_Template to produce corrupt Xlsx files for any Php release. Change Xls Reader to treat values as int, eliminating the corrupt files.
This commit is contained in:
parent
e87be5e16d
commit
dade9cc063
|
|
@ -1101,8 +1101,8 @@ class Xls extends BaseReader
|
|||
$height = SharedXls::getDistanceY($this->phpSheet, $startRow, $startOffsetY, $endRow, $endOffsetY);
|
||||
|
||||
// calculate offsetX and offsetY of the shape
|
||||
$offsetX = $startOffsetX * SharedXls::sizeCol($this->phpSheet, $startColumn) / 1024;
|
||||
$offsetY = $startOffsetY * SharedXls::sizeRow($this->phpSheet, $startRow) / 256;
|
||||
$offsetX = (int) ($startOffsetX * SharedXls::sizeCol($this->phpSheet, $startColumn) / 1024);
|
||||
$offsetY = (int) ($startOffsetY * SharedXls::sizeRow($this->phpSheet, $startRow) / 256);
|
||||
|
||||
switch ($obj['otObjType']) {
|
||||
case 0x19:
|
||||
|
|
|
|||
Loading…
Reference in New Issue