Bugfix: (manual merge from a pull request from amironov) Work item GH-82 - PHPExcel_Worksheet::getCellCollection() may not return last cached cell

This commit is contained in:
Mark Baker
2012-11-29 23:57:12 +00:00
parent a032194211
commit 487f4b79ec
15 changed files with 187 additions and 10 deletions
@@ -42,7 +42,7 @@ class PHPExcel_CachedObjectStorage_MemorySerialized extends PHPExcel_CachedObjec
* @return void
* @throws Exception
*/
private function _storeData() {
protected function _storeData() {
if ($this->_currentCellIsDirty) {
$this->_currentObject->detach();
@@ -104,6 +104,20 @@ class PHPExcel_CachedObjectStorage_MemorySerialized extends PHPExcel_CachedObjec
} // function getCacheData()
/**
* Get a list of all cell addresses currently held in cache
*
* @return array of string
*/
public function getCellList() {
if ($this->_currentObjectID !== null) {
$this->_storeData();
}
return parent::getCellList();
}
/**
* Clear the cell collection and disconnect from our parent
*