From d42361e8bf31acc5fc1b74f1dcbb5c7b20e42a94 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Thu, 21 Feb 2013 11:44:33 +0000 Subject: [PATCH] Correct attachment of cells to cache collection as parent rather than worksheet --- Classes/PHPExcel/CachedObjectStorage/APC.php | 4 ++-- Classes/PHPExcel/CachedObjectStorage/CacheBase.php | 2 +- Classes/PHPExcel/CachedObjectStorage/DiscISAM.php | 4 ++-- Classes/PHPExcel/CachedObjectStorage/Igbinary.php | 4 ++-- Classes/PHPExcel/CachedObjectStorage/Memcache.php | 4 ++-- Classes/PHPExcel/CachedObjectStorage/MemoryGZip.php | 4 ++-- Classes/PHPExcel/CachedObjectStorage/MemorySerialized.php | 4 ++-- Classes/PHPExcel/CachedObjectStorage/PHPTemp.php | 4 ++-- Classes/PHPExcel/CachedObjectStorage/SQLite.php | 4 ++-- Classes/PHPExcel/CachedObjectStorage/SQLite3.php | 4 ++-- Classes/PHPExcel/CachedObjectStorage/Wincache.php | 4 ++-- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Classes/PHPExcel/CachedObjectStorage/APC.php b/Classes/PHPExcel/CachedObjectStorage/APC.php index 8f1e931..2e61f03 100644 --- a/Classes/PHPExcel/CachedObjectStorage/APC.php +++ b/Classes/PHPExcel/CachedObjectStorage/APC.php @@ -154,8 +154,8 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach // Set current entry to the requested entry $this->_currentObjectID = $pCoord; $this->_currentObject = unserialize($obj); - // Re-attach the parent worksheet - $this->_currentObject->attach($this->_parent); + // Re-attach this as the cell's parent + $this->_currentObject->attach($this); // Return requested entry return $this->_currentObject; diff --git a/Classes/PHPExcel/CachedObjectStorage/CacheBase.php b/Classes/PHPExcel/CachedObjectStorage/CacheBase.php index 0651b4a..2176c0c 100644 --- a/Classes/PHPExcel/CachedObjectStorage/CacheBase.php +++ b/Classes/PHPExcel/CachedObjectStorage/CacheBase.php @@ -259,7 +259,7 @@ abstract class PHPExcel_CachedObjectStorage_CacheBase { $this->_parent = $parent; if (($this->_currentObject !== NULL) && (is_object($this->_currentObject))) { - $this->_currentObject->attach($parent); + $this->_currentObject->attach($this); } } // function copyCellCollection() diff --git a/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php b/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php index 3fde385..956fd56 100644 --- a/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php +++ b/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php @@ -124,8 +124,8 @@ class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage $this->_currentObjectID = $pCoord; fseek($this->_fileHandle,$this->_cellCache[$pCoord]['ptr']); $this->_currentObject = unserialize(fread($this->_fileHandle,$this->_cellCache[$pCoord]['sz'])); - // Re-attach the parent worksheet - $this->_currentObject->attach($this->_parent); + // Re-attach this as the cell's parent + $this->_currentObject->attach($this); // Return requested entry return $this->_currentObject; diff --git a/Classes/PHPExcel/CachedObjectStorage/Igbinary.php b/Classes/PHPExcel/CachedObjectStorage/Igbinary.php index 6e33468..7e7d1df 100644 --- a/Classes/PHPExcel/CachedObjectStorage/Igbinary.php +++ b/Classes/PHPExcel/CachedObjectStorage/Igbinary.php @@ -96,8 +96,8 @@ class PHPExcel_CachedObjectStorage_Igbinary extends PHPExcel_CachedObjectStorage // Set current entry to the requested entry $this->_currentObjectID = $pCoord; $this->_currentObject = igbinary_unserialize($this->_cellCache[$pCoord]); - // Re-attach the parent worksheet - $this->_currentObject->attach($this->_parent); + // Re-attach this as the cell's parent + $this->_currentObject->attach($this); // Return requested entry return $this->_currentObject; diff --git a/Classes/PHPExcel/CachedObjectStorage/Memcache.php b/Classes/PHPExcel/CachedObjectStorage/Memcache.php index 76ff909..a544059 100644 --- a/Classes/PHPExcel/CachedObjectStorage/Memcache.php +++ b/Classes/PHPExcel/CachedObjectStorage/Memcache.php @@ -158,8 +158,8 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage // Set current entry to the requested entry $this->_currentObjectID = $pCoord; $this->_currentObject = unserialize($obj); - // Re-attach the parent worksheet - $this->_currentObject->attach($this->_parent); + // Re-attach this as the cell's parent + $this->_currentObject->attach($this); // Return requested entry return $this->_currentObject; diff --git a/Classes/PHPExcel/CachedObjectStorage/MemoryGZip.php b/Classes/PHPExcel/CachedObjectStorage/MemoryGZip.php index ecb29b8..43ed104 100644 --- a/Classes/PHPExcel/CachedObjectStorage/MemoryGZip.php +++ b/Classes/PHPExcel/CachedObjectStorage/MemoryGZip.php @@ -96,8 +96,8 @@ class PHPExcel_CachedObjectStorage_MemoryGZip extends PHPExcel_CachedObjectStora // Set current entry to the requested entry $this->_currentObjectID = $pCoord; $this->_currentObject = unserialize(gzinflate($this->_cellCache[$pCoord])); - // Re-attach the parent worksheet - $this->_currentObject->attach($this->_parent); + // Re-attach this as the cell's parent + $this->_currentObject->attach($this); // Return requested entry return $this->_currentObject; diff --git a/Classes/PHPExcel/CachedObjectStorage/MemorySerialized.php b/Classes/PHPExcel/CachedObjectStorage/MemorySerialized.php index 3feb5fa..5e1f838 100644 --- a/Classes/PHPExcel/CachedObjectStorage/MemorySerialized.php +++ b/Classes/PHPExcel/CachedObjectStorage/MemorySerialized.php @@ -96,8 +96,8 @@ class PHPExcel_CachedObjectStorage_MemorySerialized extends PHPExcel_CachedObjec // Set current entry to the requested entry $this->_currentObjectID = $pCoord; $this->_currentObject = unserialize($this->_cellCache[$pCoord]); - // Re-attach the parent worksheet - $this->_currentObject->attach($this->_parent); + // Re-attach this as the cell's parent + $this->_currentObject->attach($this); // Return requested entry return $this->_currentObject; diff --git a/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php b/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php index e6eafb7..5b13e66 100644 --- a/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php +++ b/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php @@ -116,8 +116,8 @@ class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_ $this->_currentObjectID = $pCoord; fseek($this->_fileHandle,$this->_cellCache[$pCoord]['ptr']); $this->_currentObject = unserialize(fread($this->_fileHandle,$this->_cellCache[$pCoord]['sz'])); - // Re-attach the parent worksheet - $this->_currentObject->attach($this->_parent); + // Re-attach this as the cell's parent + $this->_currentObject->attach($this); // Return requested entry return $this->_currentObject; diff --git a/Classes/PHPExcel/CachedObjectStorage/SQLite.php b/Classes/PHPExcel/CachedObjectStorage/SQLite.php index 915d21d..0bafbb7 100644 --- a/Classes/PHPExcel/CachedObjectStorage/SQLite.php +++ b/Classes/PHPExcel/CachedObjectStorage/SQLite.php @@ -116,8 +116,8 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C $cellResult = $cellResultSet->fetchSingle(); $this->_currentObject = unserialize($cellResult); - // Re-attach the parent worksheet - $this->_currentObject->attach($this->_parent); + // Re-attach this as the cell's parent + $this->_currentObject->attach($this); // Return requested entry return $this->_currentObject; diff --git a/Classes/PHPExcel/CachedObjectStorage/SQLite3.php b/Classes/PHPExcel/CachedObjectStorage/SQLite3.php index f9ca246..37615d0 100644 --- a/Classes/PHPExcel/CachedObjectStorage/SQLite3.php +++ b/Classes/PHPExcel/CachedObjectStorage/SQLite3.php @@ -119,8 +119,8 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ $this->_currentObjectID = $pCoord; $this->_currentObject = unserialize($cellResult); - // Re-attach the parent worksheet - $this->_currentObject->attach($this->_parent); + // Re-attach this as the cell's parent + $this->_currentObject->attach($this); // Return requested entry return $this->_currentObject; diff --git a/Classes/PHPExcel/CachedObjectStorage/Wincache.php b/Classes/PHPExcel/CachedObjectStorage/Wincache.php index 38d6116..97b1639 100644 --- a/Classes/PHPExcel/CachedObjectStorage/Wincache.php +++ b/Classes/PHPExcel/CachedObjectStorage/Wincache.php @@ -158,8 +158,8 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage // Set current entry to the requested entry $this->_currentObjectID = $pCoord; $this->_currentObject = unserialize($obj); - // Re-attach the parent worksheet - $this->_currentObject->attach($this->_parent); + // Re-attach this as the cell's parent + $this->_currentObject->attach($this); // Return requested entry return $this->_currentObject;