mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-26 15:26:03 +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)
|
||||
{
|
||||
if (self::getIsIconvEnabled()) {
|
||||
$value = iconv($from, $to, $value);
|
||||
return $value;
|
||||
return iconv($from, $to, $value);
|
||||
}
|
||||
|
||||
if (self::getIsMbstringEnabled()) {
|
||||
$value = mb_convert_encoding($value, $to, $from);
|
||||
return $value;
|
||||
return mb_convert_encoding($value, $to, $from);
|
||||
}
|
||||
|
||||
if($from == 'UTF-16LE'){
|
||||
return self::utf16_decode($value, false);
|
||||
}else if($from == 'UTF-16BE'){
|
||||
|
@ -944,9 +944,8 @@ class PHPExcel_Writer_Excel5_Parser
|
||||
if ($col >= 256) {
|
||||
throw new Exception("Column in: $cell greater than 255");
|
||||
}
|
||||
// FIXME: change for BIFF8
|
||||
if ($row >= 16384) {
|
||||
throw new Exception("Row in: $cell greater than 16384 ");
|
||||
if ($row >= 65536) {
|
||||
throw new Exception("Row in: $cell greater than 65536 ");
|
||||
}
|
||||
|
||||
// Set the high bits to indicate if row or col are relative.
|
||||
@ -980,11 +979,11 @@ class PHPExcel_Writer_Excel5_Parser
|
||||
--$row2;
|
||||
// Trick poor inocent Excel
|
||||
$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
|
||||
if (($row1 >= 16384) or ($row2 >= 16384)) {
|
||||
throw new Exception("Row in: $range greater than 16384 ");
|
||||
if (($row1 >= 65536) or ($row2 >= 65536)) {
|
||||
throw new Exception("Row in: $range greater than 65536 ");
|
||||
}
|
||||
|
||||
// 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;
|
||||
} else {
|
||||
$rowmin = 0;
|
||||
$rowmax = 16383;
|
||||
$rowmax = 65535;
|
||||
}
|
||||
|
||||
$this->_writeNameShort(
|
||||
|
@ -26,6 +26,7 @@
|
||||
Fixed in develop branch:
|
||||
- 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 GH-66 - Wrong check for maximum number of rows in Excel5 Writer
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user