Correct attachment of cells to cache collection as parent rather than worksheet

This commit is contained in:
Mark Baker 2013-02-21 11:44:33 +00:00
parent db75c5981a
commit d42361e8bf
11 changed files with 21 additions and 21 deletions

View File

@ -154,8 +154,8 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach
// Set current entry to the requested entry // Set current entry to the requested entry
$this->_currentObjectID = $pCoord; $this->_currentObjectID = $pCoord;
$this->_currentObject = unserialize($obj); $this->_currentObject = unserialize($obj);
// Re-attach the parent worksheet // Re-attach this as the cell's parent
$this->_currentObject->attach($this->_parent); $this->_currentObject->attach($this);
// Return requested entry // Return requested entry
return $this->_currentObject; return $this->_currentObject;

View File

@ -259,7 +259,7 @@ abstract class PHPExcel_CachedObjectStorage_CacheBase {
$this->_parent = $parent; $this->_parent = $parent;
if (($this->_currentObject !== NULL) && (is_object($this->_currentObject))) { if (($this->_currentObject !== NULL) && (is_object($this->_currentObject))) {
$this->_currentObject->attach($parent); $this->_currentObject->attach($this);
} }
} // function copyCellCollection() } // function copyCellCollection()

View File

@ -124,8 +124,8 @@ class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage
$this->_currentObjectID = $pCoord; $this->_currentObjectID = $pCoord;
fseek($this->_fileHandle,$this->_cellCache[$pCoord]['ptr']); fseek($this->_fileHandle,$this->_cellCache[$pCoord]['ptr']);
$this->_currentObject = unserialize(fread($this->_fileHandle,$this->_cellCache[$pCoord]['sz'])); $this->_currentObject = unserialize(fread($this->_fileHandle,$this->_cellCache[$pCoord]['sz']));
// Re-attach the parent worksheet // Re-attach this as the cell's parent
$this->_currentObject->attach($this->_parent); $this->_currentObject->attach($this);
// Return requested entry // Return requested entry
return $this->_currentObject; return $this->_currentObject;

View File

@ -96,8 +96,8 @@ class PHPExcel_CachedObjectStorage_Igbinary extends PHPExcel_CachedObjectStorage
// Set current entry to the requested entry // Set current entry to the requested entry
$this->_currentObjectID = $pCoord; $this->_currentObjectID = $pCoord;
$this->_currentObject = igbinary_unserialize($this->_cellCache[$pCoord]); $this->_currentObject = igbinary_unserialize($this->_cellCache[$pCoord]);
// Re-attach the parent worksheet // Re-attach this as the cell's parent
$this->_currentObject->attach($this->_parent); $this->_currentObject->attach($this);
// Return requested entry // Return requested entry
return $this->_currentObject; return $this->_currentObject;

View File

@ -158,8 +158,8 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage
// Set current entry to the requested entry // Set current entry to the requested entry
$this->_currentObjectID = $pCoord; $this->_currentObjectID = $pCoord;
$this->_currentObject = unserialize($obj); $this->_currentObject = unserialize($obj);
// Re-attach the parent worksheet // Re-attach this as the cell's parent
$this->_currentObject->attach($this->_parent); $this->_currentObject->attach($this);
// Return requested entry // Return requested entry
return $this->_currentObject; return $this->_currentObject;

View File

@ -96,8 +96,8 @@ class PHPExcel_CachedObjectStorage_MemoryGZip extends PHPExcel_CachedObjectStora
// Set current entry to the requested entry // Set current entry to the requested entry
$this->_currentObjectID = $pCoord; $this->_currentObjectID = $pCoord;
$this->_currentObject = unserialize(gzinflate($this->_cellCache[$pCoord])); $this->_currentObject = unserialize(gzinflate($this->_cellCache[$pCoord]));
// Re-attach the parent worksheet // Re-attach this as the cell's parent
$this->_currentObject->attach($this->_parent); $this->_currentObject->attach($this);
// Return requested entry // Return requested entry
return $this->_currentObject; return $this->_currentObject;

View File

@ -96,8 +96,8 @@ class PHPExcel_CachedObjectStorage_MemorySerialized extends PHPExcel_CachedObjec
// Set current entry to the requested entry // Set current entry to the requested entry
$this->_currentObjectID = $pCoord; $this->_currentObjectID = $pCoord;
$this->_currentObject = unserialize($this->_cellCache[$pCoord]); $this->_currentObject = unserialize($this->_cellCache[$pCoord]);
// Re-attach the parent worksheet // Re-attach this as the cell's parent
$this->_currentObject->attach($this->_parent); $this->_currentObject->attach($this);
// Return requested entry // Return requested entry
return $this->_currentObject; return $this->_currentObject;

View File

@ -116,8 +116,8 @@ class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_
$this->_currentObjectID = $pCoord; $this->_currentObjectID = $pCoord;
fseek($this->_fileHandle,$this->_cellCache[$pCoord]['ptr']); fseek($this->_fileHandle,$this->_cellCache[$pCoord]['ptr']);
$this->_currentObject = unserialize(fread($this->_fileHandle,$this->_cellCache[$pCoord]['sz'])); $this->_currentObject = unserialize(fread($this->_fileHandle,$this->_cellCache[$pCoord]['sz']));
// Re-attach the parent worksheet // Re-attach this as the cell's parent
$this->_currentObject->attach($this->_parent); $this->_currentObject->attach($this);
// Return requested entry // Return requested entry
return $this->_currentObject; return $this->_currentObject;

View File

@ -116,8 +116,8 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C
$cellResult = $cellResultSet->fetchSingle(); $cellResult = $cellResultSet->fetchSingle();
$this->_currentObject = unserialize($cellResult); $this->_currentObject = unserialize($cellResult);
// Re-attach the parent worksheet // Re-attach this as the cell's parent
$this->_currentObject->attach($this->_parent); $this->_currentObject->attach($this);
// Return requested entry // Return requested entry
return $this->_currentObject; return $this->_currentObject;

View File

@ -119,8 +119,8 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_
$this->_currentObjectID = $pCoord; $this->_currentObjectID = $pCoord;
$this->_currentObject = unserialize($cellResult); $this->_currentObject = unserialize($cellResult);
// Re-attach the parent worksheet // Re-attach this as the cell's parent
$this->_currentObject->attach($this->_parent); $this->_currentObject->attach($this);
// Return requested entry // Return requested entry
return $this->_currentObject; return $this->_currentObject;

View File

@ -158,8 +158,8 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage
// Set current entry to the requested entry // Set current entry to the requested entry
$this->_currentObjectID = $pCoord; $this->_currentObjectID = $pCoord;
$this->_currentObject = unserialize($obj); $this->_currentObject = unserialize($obj);
// Re-attach the parent worksheet // Re-attach this as the cell's parent
$this->_currentObject->attach($this->_parent); $this->_currentObject->attach($this);
// Return requested entry // Return requested entry
return $this->_currentObject; return $this->_currentObject;