From 1f601e0ecf4f22d7888164cb8b7ea8b3a42e7741 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Fri, 9 Nov 2012 01:24:44 +0000 Subject: [PATCH] Bugfix: Work item 18844 - cache_in_memory_gzip "eats" last worksheet line, cache_in_memory doesn't --- Classes/PHPExcel/Worksheet.php | 4 ++-- changelog.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Classes/PHPExcel/Worksheet.php b/Classes/PHPExcel/Worksheet.php index 2073910..d14e0da 100644 --- a/Classes/PHPExcel/Worksheet.php +++ b/Classes/PHPExcel/Worksheet.php @@ -2385,7 +2385,6 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable public function rangeToArray($pRange = 'A1', $nullValue = null, $calculateFormulas = true, $formatData = true, $returnCellRef = false) { // Returnvalue $returnValue = array(); - // Identify the range that we need to extract from the worksheet list($rangeStart, $rangeEnd) = PHPExcel_Cell::rangeBoundaries($pRange); $minCol = PHPExcel_Cell::stringFromColumnIndex($rangeStart[0] -1); @@ -2394,7 +2393,6 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable $maxRow = $rangeEnd[1]; $maxCol++; - // Loop through rows $r = -1; for ($row = $minRow; $row <= $maxRow; ++$row) { @@ -2503,6 +2501,8 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * @return PHPExcel_Worksheet */ public function garbageCollect() { + // Flush cache + $this->_cellCollection->getCacheData('A1'); // Build a reference table from images // $imageCoordinates = array(); // $iterator = $this->getDrawingCollection()->getIterator(); diff --git a/changelog.txt b/changelog.txt index 78c97c3..8c02994 100644 --- a/changelog.txt +++ b/changelog.txt @@ -31,6 +31,7 @@ Fixed in develop branch: - General: (kea) Work item GH-69 - Improved AdvancedValueBinder for currency - Bugfix: (techhead) Work item GH-70 - Fixed formula/formatting bug when removing rows - Bugfix: (alexgann) Work item GH-63 - Fix to cellExists for non-existent namedRanges +- Bugfix: (MBaker) Work item 18844 - cache_in_memory_gzip "eats" last worksheet line, cache_in_memory doesn't --------------------------------------------------------------------------------