mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-22 21:36:05 +03:00
Bugfix: Work item GH-66 - Wrong check for maximum number of rows in Excel5 Writer
This commit is contained in:
parent
701ff5adf1
commit
45f2829a33
@ -493,14 +493,13 @@ class PHPExcel_Shared_String
|
|||||||
public static function ConvertEncoding($value, $to, $from)
|
public static function ConvertEncoding($value, $to, $from)
|
||||||
{
|
{
|
||||||
if (self::getIsIconvEnabled()) {
|
if (self::getIsIconvEnabled()) {
|
||||||
$value = iconv($from, $to, $value);
|
return iconv($from, $to, $value);
|
||||||
return $value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self::getIsMbstringEnabled()) {
|
if (self::getIsMbstringEnabled()) {
|
||||||
$value = mb_convert_encoding($value, $to, $from);
|
return mb_convert_encoding($value, $to, $from);
|
||||||
return $value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($from == 'UTF-16LE'){
|
if($from == 'UTF-16LE'){
|
||||||
return self::utf16_decode($value, false);
|
return self::utf16_decode($value, false);
|
||||||
}else if($from == 'UTF-16BE'){
|
}else if($from == 'UTF-16BE'){
|
||||||
|
@ -944,9 +944,8 @@ class PHPExcel_Writer_Excel5_Parser
|
|||||||
if ($col >= 256) {
|
if ($col >= 256) {
|
||||||
throw new Exception("Column in: $cell greater than 255");
|
throw new Exception("Column in: $cell greater than 255");
|
||||||
}
|
}
|
||||||
// FIXME: change for BIFF8
|
if ($row >= 65536) {
|
||||||
if ($row >= 16384) {
|
throw new Exception("Row in: $cell greater than 65536 ");
|
||||||
throw new Exception("Row in: $cell greater than 16384 ");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the high bits to indicate if row or col are relative.
|
// Set the high bits to indicate if row or col are relative.
|
||||||
@ -980,11 +979,11 @@ class PHPExcel_Writer_Excel5_Parser
|
|||||||
--$row2;
|
--$row2;
|
||||||
// Trick poor inocent Excel
|
// Trick poor inocent Excel
|
||||||
$col1 = 0;
|
$col1 = 0;
|
||||||
$col2 = 16383; // FIXME: maximum possible value for Excel 5 (change this!!!)
|
$col2 = 65535; // FIXME: maximum possible value for Excel 5 (change this!!!)
|
||||||
|
|
||||||
// FIXME: this changes for BIFF8
|
// FIXME: this changes for BIFF8
|
||||||
if (($row1 >= 16384) or ($row2 >= 16384)) {
|
if (($row1 >= 65536) or ($row2 >= 65536)) {
|
||||||
throw new Exception("Row in: $range greater than 16384 ");
|
throw new Exception("Row in: $range greater than 65536 ");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the high bits to indicate if rows are relative.
|
// Set the high bits to indicate if rows are relative.
|
||||||
|
@ -629,7 +629,7 @@ class PHPExcel_Writer_Excel5_Workbook extends PHPExcel_Writer_Excel5_BIFFwriter
|
|||||||
$rowmax = $repeat[1] - 1;
|
$rowmax = $repeat[1] - 1;
|
||||||
} else {
|
} else {
|
||||||
$rowmin = 0;
|
$rowmin = 0;
|
||||||
$rowmax = 16383;
|
$rowmax = 65535;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_writeNameShort(
|
$this->_writeNameShort(
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
Fixed in develop branch:
|
Fixed in develop branch:
|
||||||
- Bugfix: (Asker) Work item 18777 - Error in PHPEXCEL/Calculation.php script on line 2976 (stack pop check)
|
- Bugfix: (Asker) Work item 18777 - Error in PHPEXCEL/Calculation.php script on line 2976 (stack pop check)
|
||||||
- Bugfix: (MBaker) Work item 18794 - CSV files without a file extension being identified as HTML
|
- Bugfix: (MBaker) Work item 18794 - CSV files without a file extension being identified as HTML
|
||||||
|
- Bugfix: (MBaker) Work item GH-66 - Wrong check for maximum number of rows in Excel5 Writer
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user