diff --git a/Classes/PHPExcel/Autoloader.php b/Classes/PHPExcel/Autoloader.php index 30be24a7..dc852701 100644 --- a/Classes/PHPExcel/Autoloader.php +++ b/Classes/PHPExcel/Autoloader.php @@ -31,7 +31,7 @@ PHPExcel_Autoloader::Register(); //PHPExcel_Shared_ZipStreamWrapper::register(); // check mbstring.func_overload if (ini_get('mbstring.func_overload') & 2) { - throw new Exception('Multibyte function overloading in PHP must be disabled for string functions (2).'); + throw new PHPExcel_Exception('Multibyte function overloading in PHP must be disabled for string functions (2).'); } PHPExcel_Shared_String::buildCharacterSets(); diff --git a/Classes/PHPExcel/CachedObjectStorage/CacheBase.php b/Classes/PHPExcel/CachedObjectStorage/CacheBase.php index fb34da02..924b4b44 100644 --- a/Classes/PHPExcel/CachedObjectStorage/CacheBase.php +++ b/Classes/PHPExcel/CachedObjectStorage/CacheBase.php @@ -106,7 +106,7 @@ abstract class PHPExcel_CachedObjectStorage_CacheBase { * * @param PHPExcel_Cell $cell Cell to update * @return void - * @throws Exception + * @throws PHPExcel_Exception */ public function updateCacheData(PHPExcel_Cell $cell) { return $this->addCacheData($cell->getCoordinate(),$cell); @@ -117,7 +117,7 @@ abstract class PHPExcel_CachedObjectStorage_CacheBase { * Delete a cell in cache identified by coordinate address * * @param string $pCoord Coordinate address of the cell to delete - * @throws Exception + * @throws PHPExcel_Exception */ public function deleteCacheData($pCoord) { if ($pCoord === $this->_currentObjectID) { diff --git a/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php b/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php index 41bb168e..3fde3851 100644 --- a/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php +++ b/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php @@ -62,7 +62,7 @@ class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage * and the 'nullify' the current cell object * * @return void - * @throws Exception + * @throws PHPExcel_Exception */ protected function _storeData() { if ($this->_currentCellIsDirty) { @@ -86,7 +86,7 @@ class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage * @param string $pCoord Coordinate address of the cell to update * @param PHPExcel_Cell $cell Cell to update * @return void - * @throws Exception + * @throws PHPExcel_Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { @@ -105,7 +105,7 @@ class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage * Get cell at a specific coordinate * * @param string $pCoord Coordinate of the cell - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Cell Cell that was found, or null if not found */ public function getCacheData($pCoord) { diff --git a/Classes/PHPExcel/CachedObjectStorage/ICache.php b/Classes/PHPExcel/CachedObjectStorage/ICache.php index 1caceea7..8b82f103 100644 --- a/Classes/PHPExcel/CachedObjectStorage/ICache.php +++ b/Classes/PHPExcel/CachedObjectStorage/ICache.php @@ -41,7 +41,7 @@ interface PHPExcel_CachedObjectStorage_ICache * @param string $pCoord Coordinate address of the cell to update * @param PHPExcel_Cell $cell Cell to update * @return void - * @throws Exception + * @throws PHPExcel_Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell); @@ -50,7 +50,7 @@ interface PHPExcel_CachedObjectStorage_ICache * * @param PHPExcel_Cell $cell Cell to update * @return void - * @throws Exception + * @throws PHPExcel_Exception */ public function updateCacheData(PHPExcel_Cell $cell); @@ -59,7 +59,7 @@ interface PHPExcel_CachedObjectStorage_ICache * * @param string $pCoord Coordinate address of the cell to retrieve * @return PHPExcel_Cell Cell that was found, or null if not found - * @throws Exception + * @throws PHPExcel_Exception */ public function getCacheData($pCoord); @@ -67,7 +67,7 @@ interface PHPExcel_CachedObjectStorage_ICache * Delete a cell in cache identified by coordinate address * * @param string $pCoord Coordinate address of the cell to delete - * @throws Exception + * @throws PHPExcel_Exception */ public function deleteCacheData($pCoord); diff --git a/Classes/PHPExcel/CachedObjectStorage/Igbinary.php b/Classes/PHPExcel/CachedObjectStorage/Igbinary.php index 19aa2673..6e33468a 100644 --- a/Classes/PHPExcel/CachedObjectStorage/Igbinary.php +++ b/Classes/PHPExcel/CachedObjectStorage/Igbinary.php @@ -40,7 +40,7 @@ class PHPExcel_CachedObjectStorage_Igbinary extends PHPExcel_CachedObjectStorage * and the 'nullify' the current cell object * * @return void - * @throws Exception + * @throws PHPExcel_Exception */ protected function _storeData() { if ($this->_currentCellIsDirty) { @@ -59,7 +59,7 @@ class PHPExcel_CachedObjectStorage_Igbinary extends PHPExcel_CachedObjectStorage * @param string $pCoord Coordinate address of the cell to update * @param PHPExcel_Cell $cell Cell to update * @return void - * @throws Exception + * @throws PHPExcel_Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { @@ -78,7 +78,7 @@ class PHPExcel_CachedObjectStorage_Igbinary extends PHPExcel_CachedObjectStorage * Get cell at a specific coordinate * * @param string $pCoord Coordinate of the cell - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Cell Cell that was found, or null if not found */ public function getCacheData($pCoord) { diff --git a/Classes/PHPExcel/CachedObjectStorage/Memcache.php b/Classes/PHPExcel/CachedObjectStorage/Memcache.php index 2f995a14..76ff9096 100644 --- a/Classes/PHPExcel/CachedObjectStorage/Memcache.php +++ b/Classes/PHPExcel/CachedObjectStorage/Memcache.php @@ -62,7 +62,7 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage * and the 'nullify' the current cell object * * @return void - * @throws Exception + * @throws PHPExcel_Exception */ protected function _storeData() { if ($this->_currentCellIsDirty) { @@ -72,7 +72,7 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage if (!$this->_memcache->replace($this->_cachePrefix.$this->_currentObjectID.'.cache',$obj,NULL,$this->_cacheTime)) { if (!$this->_memcache->add($this->_cachePrefix.$this->_currentObjectID.'.cache',$obj,NULL,$this->_cacheTime)) { $this->__destruct(); - throw new Exception('Failed to store cell '.$this->_currentObjectID.' in MemCache'); + throw new PHPExcel_Exception('Failed to store cell '.$this->_currentObjectID.' in MemCache'); } } $this->_currentCellIsDirty = false; @@ -87,7 +87,7 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage * @param string $pCoord Coordinate address of the cell to update * @param PHPExcel_Cell $cell Cell to update * @return void - * @throws Exception + * @throws PHPExcel_Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { @@ -121,7 +121,7 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage if ($success === false) { // Entry no longer exists in Memcache, so clear it from the cache array parent::deleteCacheData($pCoord); - throw new Exception('Cell entry '.$pCoord.' no longer exists in MemCache'); + throw new PHPExcel_Exception('Cell entry '.$pCoord.' no longer exists in MemCache'); } return true; } @@ -133,7 +133,7 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage * Get cell at a specific coordinate * * @param string $pCoord Coordinate of the cell - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Cell Cell that was found, or null if not found */ public function getCacheData($pCoord) { @@ -148,7 +148,7 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage if ($obj === false) { // Entry no longer exists in Memcache, so clear it from the cache array parent::deleteCacheData($pCoord); - throw new Exception('Cell entry '.$pCoord.' no longer exists in MemCache'); + throw new PHPExcel_Exception('Cell entry '.$pCoord.' no longer exists in MemCache'); } } else { // Return null if requested entry doesn't exist in cache @@ -184,7 +184,7 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage * Delete a cell in cache identified by coordinate address * * @param string $pCoord Coordinate address of the cell to delete - * @throws Exception + * @throws PHPExcel_Exception */ public function deleteCacheData($pCoord) { // Delete the entry from Memcache @@ -213,11 +213,11 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage if ($obj === false) { // Entry no longer exists in Memcache, so clear it from the cache array parent::deleteCacheData($cellID); - throw new Exception('Cell entry '.$cellID.' no longer exists in MemCache'); + throw new PHPExcel_Exception('Cell entry '.$cellID.' no longer exists in MemCache'); } if (!$this->_memcache->add($newCachePrefix.$cellID.'.cache',$obj,NULL,$this->_cacheTime)) { $this->__destruct(); - throw new Exception('Failed to store cell '.$cellID.' in MemCache'); + throw new PHPExcel_Exception('Failed to store cell '.$cellID.' in MemCache'); } } } @@ -264,7 +264,7 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage // Set a new Memcache object and connect to the Memcache server $this->_memcache = new Memcache(); if (!$this->_memcache->addServer($memcacheServer, $memcachePort, false, 50, 5, 5, true, array($this, 'failureCallback'))) { - throw new Exception('Could not connect to MemCache server at '.$memcacheServer.':'.$memcachePort); + throw new PHPExcel_Exception('Could not connect to MemCache server at '.$memcacheServer.':'.$memcachePort); } $this->_cacheTime = $cacheTime; @@ -278,10 +278,10 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage * * @param string $host Memcache server * @param integer $port Memcache port - * @throws Exception + * @throws PHPExcel_Exception */ public function failureCallback($host, $port) { - throw new Exception('memcache '.$host.':'.$port.' failed'); + throw new PHPExcel_Exception('memcache '.$host.':'.$port.' failed'); } diff --git a/Classes/PHPExcel/CachedObjectStorage/Memory.php b/Classes/PHPExcel/CachedObjectStorage/Memory.php index c3efa13b..416b1e47 100644 --- a/Classes/PHPExcel/CachedObjectStorage/Memory.php +++ b/Classes/PHPExcel/CachedObjectStorage/Memory.php @@ -49,7 +49,7 @@ class PHPExcel_CachedObjectStorage_Memory extends PHPExcel_CachedObjectStorage_C * @param string $pCoord Coordinate address of the cell to update * @param PHPExcel_Cell $cell Cell to update * @return void - * @throws Exception + * @throws PHPExcel_Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { $this->_cellCache[$pCoord] = $cell; @@ -61,7 +61,7 @@ class PHPExcel_CachedObjectStorage_Memory extends PHPExcel_CachedObjectStorage_C * Get cell at a specific coordinate * * @param string $pCoord Coordinate of the cell - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Cell Cell that was found, or null if not found */ public function getCacheData($pCoord) { diff --git a/Classes/PHPExcel/CachedObjectStorage/MemoryGZip.php b/Classes/PHPExcel/CachedObjectStorage/MemoryGZip.php index cc602795..ecb29b8c 100644 --- a/Classes/PHPExcel/CachedObjectStorage/MemoryGZip.php +++ b/Classes/PHPExcel/CachedObjectStorage/MemoryGZip.php @@ -40,7 +40,7 @@ class PHPExcel_CachedObjectStorage_MemoryGZip extends PHPExcel_CachedObjectStora * and the 'nullify' the current cell object * * @return void - * @throws Exception + * @throws PHPExcel_Exception */ protected function _storeData() { if ($this->_currentCellIsDirty) { @@ -59,7 +59,7 @@ class PHPExcel_CachedObjectStorage_MemoryGZip extends PHPExcel_CachedObjectStora * @param string $pCoord Coordinate address of the cell to update * @param PHPExcel_Cell $cell Cell to update * @return void - * @throws Exception + * @throws PHPExcel_Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { @@ -78,7 +78,7 @@ class PHPExcel_CachedObjectStorage_MemoryGZip extends PHPExcel_CachedObjectStora * Get cell at a specific coordinate * * @param string $pCoord Coordinate of the cell - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Cell Cell that was found, or null if not found */ public function getCacheData($pCoord) { diff --git a/Classes/PHPExcel/CachedObjectStorage/MemorySerialized.php b/Classes/PHPExcel/CachedObjectStorage/MemorySerialized.php index fbf22577..3feb5faf 100644 --- a/Classes/PHPExcel/CachedObjectStorage/MemorySerialized.php +++ b/Classes/PHPExcel/CachedObjectStorage/MemorySerialized.php @@ -40,7 +40,7 @@ class PHPExcel_CachedObjectStorage_MemorySerialized extends PHPExcel_CachedObjec * and the 'nullify' the current cell object * * @return void - * @throws Exception + * @throws PHPExcel_Exception */ protected function _storeData() { if ($this->_currentCellIsDirty) { @@ -59,7 +59,7 @@ class PHPExcel_CachedObjectStorage_MemorySerialized extends PHPExcel_CachedObjec * @param string $pCoord Coordinate address of the cell to update * @param PHPExcel_Cell $cell Cell to update * @return void - * @throws Exception + * @throws PHPExcel_Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { @@ -78,7 +78,7 @@ class PHPExcel_CachedObjectStorage_MemorySerialized extends PHPExcel_CachedObjec * Get cell at a specific coordinate * * @param string $pCoord Coordinate of the cell - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Cell Cell that was found, or null if not found */ public function getCacheData($pCoord) { diff --git a/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php b/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php index cc046343..e6eafb7f 100644 --- a/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php +++ b/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php @@ -54,7 +54,7 @@ class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_ * and the 'nullify' the current cell object * * @return void - * @throws Exception + * @throws PHPExcel_Exception */ protected function _storeData() { if ($this->_currentCellIsDirty) { @@ -78,7 +78,7 @@ class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_ * @param string $pCoord Coordinate address of the cell to update * @param PHPExcel_Cell $cell Cell to update * @return void - * @throws Exception + * @throws PHPExcel_Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { @@ -97,7 +97,7 @@ class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_ * Get cell at a specific coordinate * * @param string $pCoord Coordinate of the cell - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Cell Cell that was found, or null if not found */ public function getCacheData($pCoord) { diff --git a/Classes/PHPExcel/CachedObjectStorage/SQLite.php b/Classes/PHPExcel/CachedObjectStorage/SQLite.php index 05be66e0..915d21d0 100644 --- a/Classes/PHPExcel/CachedObjectStorage/SQLite.php +++ b/Classes/PHPExcel/CachedObjectStorage/SQLite.php @@ -54,14 +54,14 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C * and the 'nullify' the current cell object * * @return void - * @throws Exception + * @throws PHPExcel_Exception */ protected function _storeData() { if ($this->_currentCellIsDirty) { $this->_currentObject->detach(); if (!$this->_DBHandle->queryExec("INSERT OR REPLACE INTO kvp_".$this->_TableName." VALUES('".$this->_currentObjectID."','".sqlite_escape_string(serialize($this->_currentObject))."')")) - throw new Exception(sqlite_error_string($this->_DBHandle->lastError())); + throw new PHPExcel_Exception(sqlite_error_string($this->_DBHandle->lastError())); $this->_currentCellIsDirty = false; } $this->_currentObjectID = $this->_currentObject = null; @@ -74,7 +74,7 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C * @param string $pCoord Coordinate address of the cell to update * @param PHPExcel_Cell $cell Cell to update * @return void - * @throws Exception + * @throws PHPExcel_Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { @@ -93,7 +93,7 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C * Get cell at a specific coordinate * * @param string $pCoord Coordinate of the cell - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Cell Cell that was found, or null if not found */ public function getCacheData($pCoord) { @@ -105,7 +105,7 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C $query = "SELECT value FROM kvp_".$this->_TableName." WHERE id='".$pCoord."'"; $cellResultSet = $this->_DBHandle->query($query,SQLITE_ASSOC); if ($cellResultSet === false) { - throw new Exception(sqlite_error_string($this->_DBHandle->lastError())); + throw new PHPExcel_Exception(sqlite_error_string($this->_DBHandle->lastError())); } elseif ($cellResultSet->numRows() == 0) { // Return null if requested entry doesn't exist in cache return null; @@ -139,7 +139,7 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C $query = "SELECT id FROM kvp_".$this->_TableName." WHERE id='".$pCoord."'"; $cellResultSet = $this->_DBHandle->query($query,SQLITE_ASSOC); if ($cellResultSet === false) { - throw new Exception(sqlite_error_string($this->_DBHandle->lastError())); + throw new PHPExcel_Exception(sqlite_error_string($this->_DBHandle->lastError())); } elseif ($cellResultSet->numRows() == 0) { // Return null if requested entry doesn't exist in cache return false; @@ -152,7 +152,7 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C * Delete a cell in cache identified by coordinate address * * @param string $pCoord Coordinate address of the cell to delete - * @throws Exception + * @throws PHPExcel_Exception */ public function deleteCacheData($pCoord) { if ($pCoord === $this->_currentObjectID) { @@ -163,7 +163,7 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C // Check if the requested entry exists in the cache $query = "DELETE FROM kvp_".$this->_TableName." WHERE id='".$pCoord."'"; if (!$this->_DBHandle->queryExec($query)) - throw new Exception(sqlite_error_string($this->_DBHandle->lastError())); + throw new PHPExcel_Exception(sqlite_error_string($this->_DBHandle->lastError())); $this->_currentCellIsDirty = false; } // function deleteCacheData() @@ -182,7 +182,7 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C $query = "SELECT id FROM kvp_".$this->_TableName; $cellIdsResult = $this->_DBHandle->unbufferedQuery($query,SQLITE_ASSOC); if ($cellIdsResult === false) - throw new Exception(sqlite_error_string($this->_DBHandle->lastError())); + throw new PHPExcel_Exception(sqlite_error_string($this->_DBHandle->lastError())); $cellKeys = array(); foreach($cellIdsResult as $row) { @@ -207,7 +207,7 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C $tableName = str_replace('.','_',$this->_getUniqueID()); if (!$this->_DBHandle->queryExec('CREATE TABLE kvp_'.$tableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB) AS SELECT * FROM kvp_'.$this->_TableName)) - throw new Exception(sqlite_error_string($this->_DBHandle->lastError())); + throw new PHPExcel_Exception(sqlite_error_string($this->_DBHandle->lastError())); // Copy the existing cell cache file $this->_TableName = $tableName; @@ -245,9 +245,9 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C $this->_DBHandle = new SQLiteDatabase($_DBName); if ($this->_DBHandle === false) - throw new Exception(sqlite_error_string($this->_DBHandle->lastError())); + throw new PHPExcel_Exception(sqlite_error_string($this->_DBHandle->lastError())); if (!$this->_DBHandle->queryExec('CREATE TABLE kvp_'.$this->_TableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB)')) - throw new Exception(sqlite_error_string($this->_DBHandle->lastError())); + throw new PHPExcel_Exception(sqlite_error_string($this->_DBHandle->lastError())); } } // function __construct() diff --git a/Classes/PHPExcel/CachedObjectStorage/SQLite3.php b/Classes/PHPExcel/CachedObjectStorage/SQLite3.php index 45204c24..f9ca246e 100644 --- a/Classes/PHPExcel/CachedObjectStorage/SQLite3.php +++ b/Classes/PHPExcel/CachedObjectStorage/SQLite3.php @@ -54,7 +54,7 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ * and the 'nullify' the current cell object * * @return void - * @throws Exception + * @throws PHPExcel_Exception */ protected function _storeData() { if ($this->_currentCellIsDirty) { @@ -65,7 +65,7 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ $query->bindValue('data',serialize($this->_currentObject),SQLITE3_BLOB); $result = $query->execute(); if ($result === false) - throw new Exception($this->_DBHandle->lastErrorMsg()); + throw new PHPExcel_Exception($this->_DBHandle->lastErrorMsg()); $this->_currentCellIsDirty = false; } $this->_currentObjectID = $this->_currentObject = null; @@ -78,7 +78,7 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ * @param string $pCoord Coordinate address of the cell to update * @param PHPExcel_Cell $cell Cell to update * @return void - * @throws Exception + * @throws PHPExcel_Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { @@ -97,7 +97,7 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ * Get cell at a specific coordinate * * @param string $pCoord Coordinate of the cell - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Cell Cell that was found, or null if not found */ public function getCacheData($pCoord) { @@ -109,7 +109,7 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ $query = "SELECT value FROM kvp_".$this->_TableName." WHERE id='".$pCoord."'"; $cellResult = $this->_DBHandle->querySingle($query); if ($cellResult === false) { - throw new Exception($this->_DBHandle->lastErrorMsg()); + throw new PHPExcel_Exception($this->_DBHandle->lastErrorMsg()); } elseif (is_null($cellResult)) { // Return null if requested entry doesn't exist in cache return null; @@ -142,7 +142,7 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ $query = "SELECT id FROM kvp_".$this->_TableName." WHERE id='".$pCoord."'"; $cellResult = $this->_DBHandle->querySingle($query); if ($cellResult === false) { - throw new Exception($this->_DBHandle->lastErrorMsg()); + throw new PHPExcel_Exception($this->_DBHandle->lastErrorMsg()); } elseif (is_null($cellResult)) { // Return null if requested entry doesn't exist in cache return false; @@ -155,7 +155,7 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ * Delete a cell in cache identified by coordinate address * * @param string $pCoord Coordinate address of the cell to delete - * @throws Exception + * @throws PHPExcel_Exception */ public function deleteCacheData($pCoord) { if ($pCoord === $this->_currentObjectID) { @@ -167,7 +167,7 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ $query = "DELETE FROM kvp_".$this->_TableName." WHERE id='".$pCoord."'"; $result = $this->_DBHandle->exec($query); if ($result === false) - throw new Exception($this->_DBHandle->lastErrorMsg()); + throw new PHPExcel_Exception($this->_DBHandle->lastErrorMsg()); $this->_currentCellIsDirty = false; } // function deleteCacheData() @@ -186,7 +186,7 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ $query = "SELECT id FROM kvp_".$this->_TableName; $cellIdsResult = $this->_DBHandle->query($query); if ($cellIdsResult === false) - throw new Exception($this->_DBHandle->lastErrorMsg()); + throw new PHPExcel_Exception($this->_DBHandle->lastErrorMsg()); $cellKeys = array(); while ($row = $cellIdsResult->fetchArray(SQLITE3_ASSOC)) { @@ -211,7 +211,7 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ $tableName = str_replace('.','_',$this->_getUniqueID()); if (!$this->_DBHandle->exec('CREATE TABLE kvp_'.$tableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB) AS SELECT * FROM kvp_'.$this->_TableName)) - throw new Exception($this->_DBHandle->lastErrorMsg()); + throw new PHPExcel_Exception($this->_DBHandle->lastErrorMsg()); // Copy the existing cell cache file $this->_TableName = $tableName; @@ -249,9 +249,9 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ $this->_DBHandle = new SQLite3($_DBName); if ($this->_DBHandle === false) - throw new Exception($this->_DBHandle->lastErrorMsg()); + throw new PHPExcel_Exception($this->_DBHandle->lastErrorMsg()); if (!$this->_DBHandle->exec('CREATE TABLE kvp_'.$this->_TableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB)')) - throw new Exception($this->_DBHandle->lastErrorMsg()); + throw new PHPExcel_Exception($this->_DBHandle->lastErrorMsg()); } } // function __construct() diff --git a/Classes/PHPExcel/CachedObjectStorage/Wincache.php b/Classes/PHPExcel/CachedObjectStorage/Wincache.php index 6065e17a..38d61166 100644 --- a/Classes/PHPExcel/CachedObjectStorage/Wincache.php +++ b/Classes/PHPExcel/CachedObjectStorage/Wincache.php @@ -55,7 +55,7 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage * and the 'nullify' the current cell object * * @return void - * @throws Exception + * @throws PHPExcel_Exception */ protected function _storeData() { if ($this->_currentCellIsDirty) { @@ -65,12 +65,12 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage if (wincache_ucache_exists($this->_cachePrefix.$this->_currentObjectID.'.cache')) { if (!wincache_ucache_set($this->_cachePrefix.$this->_currentObjectID.'.cache', $obj, $this->_cacheTime)) { $this->__destruct(); - throw new Exception('Failed to store cell '.$this->_currentObjectID.' in WinCache'); + throw new PHPExcel_Exception('Failed to store cell '.$this->_currentObjectID.' in WinCache'); } } else { if (!wincache_ucache_add($this->_cachePrefix.$this->_currentObjectID.'.cache', $obj, $this->_cacheTime)) { $this->__destruct(); - throw new Exception('Failed to store cell '.$this->_currentObjectID.' in WinCache'); + throw new PHPExcel_Exception('Failed to store cell '.$this->_currentObjectID.' in WinCache'); } } $this->_currentCellIsDirty = false; @@ -86,7 +86,7 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage * @param string $pCoord Coordinate address of the cell to update * @param PHPExcel_Cell $cell Cell to update * @return void - * @throws Exception + * @throws PHPExcel_Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { @@ -119,7 +119,7 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage if ($success === false) { // Entry no longer exists in Wincache, so clear it from the cache array parent::deleteCacheData($pCoord); - throw new Exception('Cell entry '.$pCoord.' no longer exists in WinCache'); + throw new PHPExcel_Exception('Cell entry '.$pCoord.' no longer exists in WinCache'); } return true; } @@ -131,7 +131,7 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage * Get cell at a specific coordinate * * @param string $pCoord Coordinate of the cell - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Cell Cell that was found, or null if not found */ public function getCacheData($pCoord) { @@ -148,7 +148,7 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage if ($success === false) { // Entry no longer exists in WinCache, so clear it from the cache array parent::deleteCacheData($pCoord); - throw new Exception('Cell entry '.$pCoord.' no longer exists in WinCache'); + throw new PHPExcel_Exception('Cell entry '.$pCoord.' no longer exists in WinCache'); } } else { // Return null if requested entry doesn't exist in cache @@ -184,7 +184,7 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage * Delete a cell in cache identified by coordinate address * * @param string $pCoord Coordinate address of the cell to delete - * @throws Exception + * @throws PHPExcel_Exception */ public function deleteCacheData($pCoord) { // Delete the entry from Wincache @@ -214,11 +214,11 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage if ($success === false) { // Entry no longer exists in WinCache, so clear it from the cache array parent::deleteCacheData($cellID); - throw new Exception('Cell entry '.$cellID.' no longer exists in Wincache'); + throw new PHPExcel_Exception('Cell entry '.$cellID.' no longer exists in Wincache'); } if (!wincache_ucache_add($newCachePrefix.$cellID.'.cache', $obj, $this->_cacheTime)) { $this->__destruct(); - throw new Exception('Failed to store cell '.$cellID.' in Wincache'); + throw new PHPExcel_Exception('Failed to store cell '.$cellID.' in Wincache'); } } } diff --git a/Classes/PHPExcel/Calculation.php b/Classes/PHPExcel/Calculation.php index 70f8d124..40fcaa38 100644 --- a/Classes/PHPExcel/Calculation.php +++ b/Classes/PHPExcel/Calculation.php @@ -1738,10 +1738,10 @@ class PHPExcel_Calculation { * __clone implementation. Cloning should not be allowed in a Singleton! * * @access public - * @throws Exception + * @throws PHPExcel_Calculation_Exception */ public final function __clone() { - throw new Exception ('Cloning a Singleton is not allowed!'); + throw new PHPExcel_Calculation_Exception ('Cloning a Singleton is not allowed!'); } // function __clone() @@ -2125,13 +2125,13 @@ class PHPExcel_Calculation { * @access public * @param PHPExcel_Cell $pCell Cell to calculate * @return mixed - * @throws Exception + * @throws PHPExcel_Calculation_Exception */ public function calculate(PHPExcel_Cell $pCell = null) { try { return $this->calculateCellValue($pCell); - } catch (Exception $e) { - throw(new Exception($e->getMessage())); + } catch (PHPExcel_Exception $e) { + throw(new PHPExcel_Calculation_Exception($e->getMessage())); } } // function calculate() @@ -2143,7 +2143,7 @@ class PHPExcel_Calculation { * @param PHPExcel_Cell $pCell Cell to calculate * @param Boolean $resetLog Flag indicating whether the debug log should be reset or not * @return mixed - * @throws Exception + * @throws PHPExcel_Calculation_Exception */ public function calculateCellValue(PHPExcel_Cell $pCell = null, $resetLog = true) { if ($resetLog) { @@ -2167,8 +2167,8 @@ class PHPExcel_Calculation { // Execute the calculation for the cell formula try { $result = self::_unwrapResult($this->_calculateFormulaValue($pCell->getValue(), $pCell->getCoordinate(), $pCell)); - } catch (Exception $e) { - throw(new Exception($e->getMessage())); + } catch (PHPExcel_Exception $e) { + throw(new PHPExcel_Calculation_Exception($e->getMessage())); } if ((is_array($result)) && (self::$returnArrayAsType != self::RETURN_ARRAY_AS_ARRAY)) { @@ -2207,7 +2207,7 @@ class PHPExcel_Calculation { * * @param string $formula Formula to parse * @return array - * @throws Exception + * @throws PHPExcel_Calculation_Exception */ public function parseFormula($formula) { // Basic validation that this is indeed a formula @@ -2227,7 +2227,7 @@ class PHPExcel_Calculation { * * @param string $formula Formula to parse * @return mixed - * @throws Exception + * @throws PHPExcel_Calculation_Exception */ public function calculateFormula($formula, $cellID=null, PHPExcel_Cell $pCell = null) { // Initialise the logging settings @@ -2241,8 +2241,8 @@ class PHPExcel_Calculation { // Execute the calculation try { $result = self::_unwrapResult($this->_calculateFormulaValue($formula, $cellID, $pCell)); - } catch (Exception $e) { - throw(new Exception($e->getMessage())); + } catch (PHPExcel_Exception $e) { + throw(new PHPExcel_Calculation_Exception($e->getMessage())); } // Reset calculation cacheing to its previous state @@ -2259,7 +2259,7 @@ class PHPExcel_Calculation { * @param string $cellID The ID (e.g. A3) of the cell that we are calculating * @param PHPExcel_Cell $pCell Cell to calculate * @return mixed - * @throws Exception + * @throws PHPExcel_Calculation_Exception */ public function _calculateFormulaValue($formula, $cellID=null, PHPExcel_Cell $pCell = null) { // echo ''.$cellID.'
'; @@ -3134,7 +3134,7 @@ class PHPExcel_Calculation { // Perform the required operation against the operand 1 matrix, passing in operand 2 $matrixResult = $matrix->concat($operand2); $result = $matrixResult->getArray(); - } catch (Exception $ex) { + } catch (PHPExcel_Exception $ex) { $this->_writeDebug('JAMA Matrix Exception: '.$ex->getMessage()); $result = '#VALUE!'; } @@ -3180,7 +3180,7 @@ class PHPExcel_Calculation { $matrix1 = new PHPExcel_Shared_JAMA_Matrix($arg); $matrixResult = $matrix1->arrayTimesEquals($multiplier); $result = $matrixResult->getArray(); - } catch (Exception $ex) { + } catch (PHPExcel_Exception $ex) { $this->_writeDebug('JAMA Matrix Exception: '.$ex->getMessage()); $result = '#VALUE!'; } @@ -3535,7 +3535,7 @@ class PHPExcel_Calculation { // Perform the required operation against the operand 1 matrix, passing in operand 2 $matrixResult = $matrix->$matrixFunction($operand2); $result = $matrixResult->getArray(); - } catch (Exception $ex) { + } catch (PHPExcel_Exception $ex) { $this->_writeDebug('JAMA Matrix Exception: '.$ex->getMessage()); $result = '#VALUE!'; } @@ -3600,7 +3600,7 @@ class PHPExcel_Calculation { protected function _raiseFormulaError($errorMessage) { $this->formulaError = $errorMessage; $this->debugLogStack = array(); - if (!$this->suppressFormulaErrors) throw new Exception($errorMessage); + if (!$this->suppressFormulaErrors) throw new PHPExcel_Calculation_Exception($errorMessage); trigger_error($errorMessage, E_USER_ERROR); } // function _raiseFormulaError() @@ -3611,7 +3611,7 @@ class PHPExcel_Calculation { * @param string &$pRange String based range representation * @param PHPExcel_Worksheet $pSheet Worksheet * @return mixed Array of values in range if range contains more than one element. Otherwise, a single value is returned. - * @throws Exception + * @throws PHPExcel_Calculation_Exception */ public function extractCellRange(&$pRange = 'A1', PHPExcel_Worksheet $pSheet = null, $resetLog=true) { // Return value @@ -3667,7 +3667,7 @@ class PHPExcel_Calculation { * @param string &$pRange String based range representation * @param PHPExcel_Worksheet $pSheet Worksheet * @return mixed Array of values in range if range contains more than one element. Otherwise, a single value is returned. - * @throws Exception + * @throws PHPExcel_Calculation_Exception */ public function extractNamedRange(&$pRange = 'A1', PHPExcel_Worksheet $pSheet = null, $resetLog=true) { // Return value diff --git a/Classes/PHPExcel/Calculation/Exception.php b/Classes/PHPExcel/Calculation/Exception.php index 29ae8511..9be7e1b6 100644 --- a/Classes/PHPExcel/Calculation/Exception.php +++ b/Classes/PHPExcel/Calculation/Exception.php @@ -33,7 +33,7 @@ * @package PHPExcel_Calculation * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) */ -class PHPExcel_Calculation_Exception extends Exception { +class PHPExcel_Calculation_Exception extends PHPExcel_Exception { /** * Error handler callback * diff --git a/Classes/PHPExcel/Calculation/FormulaParser.php b/Classes/PHPExcel/Calculation/FormulaParser.php index eabb87ea..72b7c6e0 100644 --- a/Classes/PHPExcel/Calculation/FormulaParser.php +++ b/Classes/PHPExcel/Calculation/FormulaParser.php @@ -93,13 +93,13 @@ class PHPExcel_Calculation_FormulaParser { * Create a new PHPExcel_Calculation_FormulaParser * * @param string $pFormula Formula to parse - * @throws Exception + * @throws PHPExcel_Calculation_Exception */ public function __construct($pFormula = '') { // Check parameters if (is_null($pFormula)) { - throw new Exception("Invalid parameter passed: formula"); + throw new PHPExcel_Calculation_Exception("Invalid parameter passed: formula"); } // Initialise values @@ -122,13 +122,13 @@ class PHPExcel_Calculation_FormulaParser { * * @param int $pId Token id * @return string - * @throws Exception + * @throws PHPExcel_Calculation_Exception */ public function getToken($pId = 0) { if (isset($this->_tokens[$pId])) { return $this->_tokens[$pId]; } else { - throw new Exception("Token with id $pId does not exist."); + throw new PHPExcel_Calculation_Exception("Token with id $pId does not exist."); } } diff --git a/Classes/PHPExcel/Calculation/Function.php b/Classes/PHPExcel/Calculation/Function.php index 2b46c608..3ca09904 100644 --- a/Classes/PHPExcel/Calculation/Function.php +++ b/Classes/PHPExcel/Calculation/Function.php @@ -74,7 +74,7 @@ class PHPExcel_Calculation_Function { * @param string $pCategory Category (represented by CATEGORY_*) * @param string $pExcelName Excel function name * @param string $pPHPExcelName PHPExcel function mapping - * @throws Exception + * @throws PHPExcel_Calculation_Exception */ public function __construct($pCategory = NULL, $pExcelName = NULL, $pPHPExcelName = NULL) { @@ -84,7 +84,7 @@ class PHPExcel_Calculation_Function { $this->_excelName = $pExcelName; $this->_phpExcelName = $pPHPExcelName; } else { - throw new Exception("Invalid parameters passed."); + throw new PHPExcel_Calculation_Exception("Invalid parameters passed."); } } @@ -101,13 +101,13 @@ class PHPExcel_Calculation_Function { * Set Category (represented by CATEGORY_*) * * @param string $value - * @throws Exception + * @throws PHPExcel_Calculation_Exception */ public function setCategory($value = null) { if (!is_null($value)) { $this->_category = $value; } else { - throw new Exception("Invalid parameter passed."); + throw new PHPExcel_Calculation_Exception("Invalid parameter passed."); } } diff --git a/Classes/PHPExcel/Calculation/MathTrig.php b/Classes/PHPExcel/Calculation/MathTrig.php index 532ff695..2da748af 100644 --- a/Classes/PHPExcel/Calculation/MathTrig.php +++ b/Classes/PHPExcel/Calculation/MathTrig.php @@ -547,7 +547,7 @@ class PHPExcel_Calculation_MathTrig { try { $matrix = new PHPExcel_Shared_JAMA_Matrix($matrixData); return $matrix->det(); - } catch (Exception $ex) { + } catch (PHPExcel_Exception $ex) { return PHPExcel_Calculation_Functions::VALUE(); } } // function MDETERM() @@ -589,7 +589,7 @@ class PHPExcel_Calculation_MathTrig { try { $matrix = new PHPExcel_Shared_JAMA_Matrix($matrixData); return $matrix->inverse()->getArray(); - } catch (Exception $ex) { + } catch (PHPExcel_Exception $ex) { return PHPExcel_Calculation_Functions::VALUE(); } } // function MINVERSE() @@ -642,7 +642,7 @@ class PHPExcel_Calculation_MathTrig { } return $matrixA->times($matrixB)->getArray(); - } catch (Exception $ex) { + } catch (PHPExcel_Exception $ex) { return PHPExcel_Calculation_Functions::VALUE(); } } // function MMULT() diff --git a/Classes/PHPExcel/Cell.php b/Classes/PHPExcel/Cell.php index 95044469..640fd7e6 100644 --- a/Classes/PHPExcel/Cell.php +++ b/Classes/PHPExcel/Cell.php @@ -296,7 +296,7 @@ class PHPExcel_Cell // echo 'Cell value for '.$this->getCoordinate().' is a formula: Calculating value
'; $result = PHPExcel_Calculation::getInstance()->calculateCellValue($this,$resetLog); // echo $this->getCoordinate().' calculation result is '.$result.'
'; - } catch ( Exception $ex ) { + } catch ( PHPExcel_Exception $ex ) { if (($ex->getMessage() === 'Unable to access External Workbook') && ($this->_calculatedValue !== NULL)) { // echo 'Returning fallback value of '.$this->_calculatedValue.' for cell '.$this->getCoordinate().'
'; return $this->_calculatedValue; // Fallback for calculations referencing external files. @@ -304,7 +304,7 @@ class PHPExcel_Cell // echo 'Calculation Exception: '.$ex->getMessage().'
'; $result = '#N/A'; throw( - new PHPExcel_Exception( + new PHPExcel_Calculation_Exception( $this->getParent()->getTitle().'!'.$this->getCoordinate().' -> '.$ex->getMessage() ) ); diff --git a/Classes/PHPExcel/Cell/DataValidation.php b/Classes/PHPExcel/Cell/DataValidation.php index 4fb4ed72..2d43a64c 100644 --- a/Classes/PHPExcel/Cell/DataValidation.php +++ b/Classes/PHPExcel/Cell/DataValidation.php @@ -153,8 +153,6 @@ class PHPExcel_Cell_DataValidation /** * Create a new PHPExcel_Cell_DataValidation - * - * @throws Exception */ public function __construct() { diff --git a/Classes/PHPExcel/Chart.php b/Classes/PHPExcel/Chart.php index 0b11e5a9..3e9572dc 100644 --- a/Classes/PHPExcel/Chart.php +++ b/Classes/PHPExcel/Chart.php @@ -184,7 +184,7 @@ class PHPExcel_Chart * Set Worksheet * * @param PHPExcel_Worksheet $pValue - * @throws Exception + * @throws PHPExcel_Chart_Exception * @return PHPExcel_Chart */ public function setWorksheet(PHPExcel_Worksheet $pValue = null) { diff --git a/Classes/PHPExcel/Chart/Exception.php b/Classes/PHPExcel/Chart/Exception.php index 0c296ba1..f7f2825b 100644 --- a/Classes/PHPExcel/Chart/Exception.php +++ b/Classes/PHPExcel/Chart/Exception.php @@ -33,7 +33,7 @@ * @package PHPExcel_Chart * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) */ -class PHPExcel_Chart_Exception extends Exception { +class PHPExcel_Chart_Exception extends PHPExcel_Exception { /** * Error handler callback * diff --git a/Classes/PHPExcel/Comment.php b/Classes/PHPExcel/Comment.php index c38088a2..cb846292 100644 --- a/Classes/PHPExcel/Comment.php +++ b/Classes/PHPExcel/Comment.php @@ -101,7 +101,7 @@ class PHPExcel_Comment implements PHPExcel_IComparable /** * Create a new PHPExcel_Comment * - * @throws Exception + * @throws PHPExcel_Exception */ public function __construct() { diff --git a/Classes/PHPExcel/HashTable.php b/Classes/PHPExcel/HashTable.php index a47c4b14..6458291c 100644 --- a/Classes/PHPExcel/HashTable.php +++ b/Classes/PHPExcel/HashTable.php @@ -86,7 +86,7 @@ class PHPExcel_HashTable * Add HashTable item * * @param PHPExcel_IComparable $pSource Item to add - * @throws Exception + * @throws PHPExcel_Exception */ public function add(PHPExcel_IComparable $pSource = null) { $hash = $pSource->getHashCode(); @@ -100,7 +100,7 @@ class PHPExcel_HashTable * Remove HashTable item * * @param PHPExcel_IComparable $pSource Item to remove - * @throws Exception + * @throws PHPExcel_Exception */ public function remove(PHPExcel_IComparable $pSource = null) { $hash = $pSource->getHashCode(); diff --git a/Classes/PHPExcel/Reader/Excel5.php b/Classes/PHPExcel/Reader/Excel5.php index 76e56e48..79cd7b09 100644 --- a/Classes/PHPExcel/Reader/Excel5.php +++ b/Classes/PHPExcel/Reader/Excel5.php @@ -409,7 +409,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce // get excel data $res = $ole->read($pFilename); return true; - } catch (PHPExcel_Reader_Exception $e) { + } catch (PHPExcel_Exception $e) { return false; } } @@ -2518,7 +2518,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce try { $formula = $this->_getFormulaFromStructure($formulaStructure); - } catch (PHPExcel_Reader_Exception $e) { + } catch (PHPExcel_Exception $e) { $formula = ''; } @@ -3665,7 +3665,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce $formula = $this->_getFormulaFromStructure($formulaStructure); // get formula in human language $cell->setValueExplicit('=' . $formula, PHPExcel_Cell_DataType::TYPE_FORMULA); - } catch (PHPExcel_Reader_Exception $e) { + } catch (PHPExcel_Exception $e) { $cell->setValueExplicit($value, $dataType); } } else { @@ -3995,7 +3995,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce // offset: 0; size: 2; option flags $options = self::_GetInt2d($recordData, 0); - // offset: 2; size: 2; index to first visible row + // offset: 2; size: 2; index to first visible row $firstVisibleRow = self::_GetInt2d($recordData, 2); // offset: 4; size: 2; index to first visible colum @@ -4033,9 +4033,9 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce // bit: 11; mask: 0x0800; 0 = normal view, 1 = page break view $isPageBreakPreview = (bool) ((0x0800 & $options) >> 11); - + //FIXME: set $firstVisibleRow and $firstVisibleColumn - + if ($this->_phpSheet->getSheetView()->getView() !== PHPExcel_Worksheet_SheetView::SHEETVIEW_PAGE_LAYOUT) { //NOTE: this setting is inferior to page layout view(Excel2007-) $view = $isPageBreakPreview? PHPExcel_Worksheet_SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW : @@ -4058,9 +4058,9 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce // move stream pointer to next record $this->_pos += 4 + $length; - + //var_dump(unpack("vrt/vgrbitFrt/V2reserved/vwScalePLV/vgrbit", $recordData)); - + // offset: 0; size: 2; rt //->ignore $rt = self::_GetInt2d($recordData, 0); @@ -4069,20 +4069,20 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce $grbitFrt = self::_GetInt2d($recordData, 2); // offset: 4; size: 8; reserved //->ignore - + // offset: 12; size 2; zoom scale $wScalePLV = self::_GetInt2d($recordData, 12); // offset: 14; size 2; grbit $grbit = self::_GetInt2d($recordData, 14); - + // decomprise grbit $fPageLayoutView = $grbit & 0x01; $fRulerVisible = ($grbit >> 1) & 0x01; //no support $fWhitespaceHidden = ($grbit >> 3) & 0x01; //no support - + if ($fPageLayoutView === 1) { $this->_phpSheet->getSheetView()->setView(PHPExcel_Worksheet_SheetView::SHEETVIEW_PAGE_LAYOUT); - $this->_phpSheet->getSheetView()->setZoomScale($wScalePLV); //set by Excel2007 only if SHEETVIEW_PAGE_LAYOUT + $this->_phpSheet->getSheetView()->setZoomScale($wScalePLV); //set by Excel2007 only if SHEETVIEW_PAGE_LAYOUT } //otherwise, we cannot know whether SHEETVIEW_PAGE_LAYOUT or SHEETVIEW_PAGE_BREAK_PREVIEW. } @@ -4252,7 +4252,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce // offset: 0; size: 8; cell range address of all cells containing this hyperlink try { $cellRange = $this->_readBIFF8CellRangeAddressFixed($recordData, 0, 8); - } catch (PHPExcel_Reader_Exception $e) { + } catch (PHPExcel_Exception $e) { return; } @@ -4536,7 +4536,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce if ($type == PHPExcel_Cell_DataValidation::TYPE_LIST) { $formula1 = str_replace(chr(0), ',', $formula1); } - } catch (PHPExcel_Reader_Exception $e) { + } catch (PHPExcel_Exception $e) { return; } $offset += $sz1; @@ -4553,7 +4553,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce $formula2 = pack('v', $sz2) . $formula2; // prepend the length try { $formula2 = $this->_getFormulaFromStructure($formula2); - } catch (PHPExcel_Reader_Exception $e) { + } catch (PHPExcel_Exception $e) { return; } $offset += $sz2; @@ -4765,7 +4765,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce for ($i = 0; $i < $cref; ++$i) { try { $cellRange = $this->_readBIFF8CellRangeAddressFixed(substr($recordData, 27 + 8 * $i, 8)); - } catch (PHPExcel_Reader_Exception $e) { + } catch (PHPExcel_Exception $e) { return; } $cellRanges[] = $cellRange; @@ -5717,7 +5717,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce $cellAddress = $this->_readBIFF8CellAddress(substr($formulaData, 3, 4)); $data = "$sheetRange!$cellAddress"; - } catch (PHPExcel_Reader_Exception $e) { + } catch (PHPExcel_Exception $e) { // deleted sheet reference $data = '#REF!'; } @@ -5736,7 +5736,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce $cellRangeAddress = $this->_readBIFF8CellRangeAddress(substr($formulaData, 3, 8)); $data = "$sheetRange!$cellRangeAddress"; - } catch (PHPExcel_Reader_Exception $e) { + } catch (PHPExcel_Exception $e) { // deleted sheet reference $data = '#REF!'; } diff --git a/Classes/PHPExcel/Reader/Exception.php b/Classes/PHPExcel/Reader/Exception.php index 8180dce9..5a2b2461 100644 --- a/Classes/PHPExcel/Reader/Exception.php +++ b/Classes/PHPExcel/Reader/Exception.php @@ -33,7 +33,7 @@ * @package PHPExcel_Reader * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) */ -class PHPExcel_Reader_Exception extends Exception { +class PHPExcel_Reader_Exception extends PHPExcel_Exception { /** * Error handler callback * diff --git a/Classes/PHPExcel/ReferenceHelper.php b/Classes/PHPExcel/ReferenceHelper.php index 1494413c..ef990bda 100644 --- a/Classes/PHPExcel/ReferenceHelper.php +++ b/Classes/PHPExcel/ReferenceHelper.php @@ -74,7 +74,7 @@ class PHPExcel_ReferenceHelper * @param int $pBefore Insert before this one * @param int $pNumCols Number of columns to insert * @param int $pNumRows Number of rows to insert - * @throws Exception + * @throws PHPExcel_Exception */ public function insertNewBefore($pBefore = 'A1', $pNumCols = 0, $pNumRows = 0, PHPExcel_Worksheet $pSheet = null) { $remove = ($pNumCols < 0 || $pNumRows < 0); @@ -134,10 +134,10 @@ class PHPExcel_ReferenceHelper // Should the cell be updated? Move value and cellXf index from one cell to another. if (($cellIndex >= $beforeColumnIndex) && ($cell->getRow() >= $beforeRow)) { - + // Update cell styles $pSheet->getCell($newCoordinates)->setXfIndex($cell->getXfIndex()); - + // Insert this cell at its new location if ($cell->getDataType() == PHPExcel_Cell_DataType::TYPE_FORMULA) { // Formula should be adjusted @@ -420,9 +420,9 @@ class PHPExcel_ReferenceHelper * @param int $pNumCols Number of columns to insert * @param int $pNumRows Number of rows to insert * @return string Updated formula - * @throws Exception + * @throws PHPExcel_Exception */ - public function updateFormulaReferences($pFormula = '', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0, $sheetName = '') { + public function updateFormulaReferences($pFormula = '', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0, $sheetName = '') { // Update cell references in the formula $formulaBlocks = explode('"',$pFormula); $i = false; @@ -559,7 +559,7 @@ class PHPExcel_ReferenceHelper * @param int $pNumCols Number of columns to increment * @param int $pNumRows Number of rows to increment * @return string Updated cell range - * @throws Exception + * @throws PHPExcel_Exception */ public function updateCellReference($pCellRange = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) { // Is it in another worksheet? Will not have to update anything. @@ -613,7 +613,7 @@ class PHPExcel_ReferenceHelper * @param int $pNumCols Number of columns to increment * @param int $pNumRows Number of rows to increment * @return string Updated cell range - * @throws Exception + * @throws PHPExcel_Exception */ private function _updateCellRange($pCellRange = 'A1:A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) { if (strpos($pCellRange,':') !== false || strpos($pCellRange, ',') !== false) { @@ -638,7 +638,7 @@ class PHPExcel_ReferenceHelper // Recreate range string return PHPExcel_Cell::buildRange($range); } else { - throw new Exception("Only cell ranges may be passed to this method."); + throw new PHPExcel_Exception("Only cell ranges may be passed to this method."); } } @@ -650,7 +650,7 @@ class PHPExcel_ReferenceHelper * @param int $pNumCols Number of columns to increment * @param int $pNumRows Number of rows to increment * @return string Updated cell reference - * @throws Exception + * @throws PHPExcel_Exception */ private function _updateSingleCellReference($pCellReference = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) { if (strpos($pCellReference, ':') === false && strpos($pCellReference, ',') === false) { @@ -680,16 +680,16 @@ class PHPExcel_ReferenceHelper // Return new reference return $newColumn . $newRow; } else { - throw new Exception("Only single cell references may be passed to this method."); + throw new PHPExcel_Exception("Only single cell references may be passed to this method."); } } /** * __clone implementation. Cloning should not be allowed in a Singleton! * - * @throws Exception + * @throws PHPExcel_Exception */ public final function __clone() { - throw new Exception("Cloning a Singleton is not allowed!"); + throw new PHPExcel_Exception("Cloning a Singleton is not allowed!"); } } diff --git a/Classes/PHPExcel/RichText.php b/Classes/PHPExcel/RichText.php index 5121cad6..b53bb486 100644 --- a/Classes/PHPExcel/RichText.php +++ b/Classes/PHPExcel/RichText.php @@ -46,7 +46,7 @@ class PHPExcel_RichText implements PHPExcel_IComparable * Create a new PHPExcel_RichText instance * * @param PHPExcel_Cell $pParent - * @throws Exception + * @throws PHPExcel_Exception */ public function __construct(PHPExcel_Cell $pCell = null) { @@ -71,7 +71,7 @@ class PHPExcel_RichText implements PHPExcel_IComparable * Add text * * @param PHPExcel_RichText_ITextElement $pText Rich text element - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_RichText */ public function addText(PHPExcel_RichText_ITextElement $pText = null) @@ -85,7 +85,7 @@ class PHPExcel_RichText implements PHPExcel_IComparable * * @param string $pText Text * @return PHPExcel_RichText_TextElement - * @throws Exception + * @throws PHPExcel_Exception */ public function createText($pText = '') { @@ -99,7 +99,7 @@ class PHPExcel_RichText implements PHPExcel_IComparable * * @param string $pText Text * @return PHPExcel_RichText_Run - * @throws Exception + * @throws PHPExcel_Exception */ public function createTextRun($pText = '') { @@ -150,7 +150,7 @@ class PHPExcel_RichText implements PHPExcel_IComparable * Set Rich Text elements * * @param PHPExcel_RichText_ITextElement[] $pElements Array of elements - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_RichText */ public function setRichTextElements($pElements = null) @@ -158,7 +158,7 @@ class PHPExcel_RichText implements PHPExcel_IComparable if (is_array($pElements)) { $this->_richTextElements = $pElements; } else { - throw new Exception("Invalid PHPExcel_RichText_ITextElement[] array passed."); + throw new PHPExcel_Exception("Invalid PHPExcel_RichText_ITextElement[] array passed."); } return $this; } diff --git a/Classes/PHPExcel/RichText/Run.php b/Classes/PHPExcel/RichText/Run.php index 700454ef..24c5fb1c 100644 --- a/Classes/PHPExcel/RichText/Run.php +++ b/Classes/PHPExcel/RichText/Run.php @@ -65,7 +65,7 @@ class PHPExcel_RichText_Run extends PHPExcel_RichText_TextElement implements PHP * Set font * * @param PHPExcel_Style_Font $pFont Font - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_RichText_ITextElement */ public function setFont(PHPExcel_Style_Font $pFont = null) { diff --git a/Classes/PHPExcel/Shared/CodePage.php b/Classes/PHPExcel/Shared/CodePage.php index 74e4b37d..7bc28ae2 100644 --- a/Classes/PHPExcel/Shared/CodePage.php +++ b/Classes/PHPExcel/Shared/CodePage.php @@ -41,14 +41,14 @@ class PHPExcel_Shared_CodePage * * @param integer $codePage Microsoft Code Page Indentifier * @return string Code Page Name - * @throws Exception + * @throws PHPExcel_Exception */ public static function NumberToName($codePage = 1252) { switch ($codePage) { case 367: return 'ASCII'; break; // ASCII case 437: return 'CP437'; break; // OEM US - case 720: throw new Exception('Code page 720 not supported.'); + case 720: throw new PHPExcel_Exception('Code page 720 not supported.'); break; // OEM Arabic case 737: return 'CP737'; break; // OEM Greek case 775: return 'CP775'; break; // OEM Baltic @@ -89,13 +89,13 @@ class PHPExcel_Shared_CodePage case 10079: return 'MACICELAND'; break; // Macintosh Icelandic case 10081: return 'MACTURKISH'; break; // Macintosh Turkish case 32768: return 'MAC'; break; // Apple Roman - case 32769: throw new Exception('Code page 32769 not supported.'); + case 32769: throw new PHPExcel_Exception('Code page 32769 not supported.'); break; // ANSI Latin I (BIFF2-BIFF3) case 65000: return 'UTF-7'; break; // Unicode (UTF-7) case 65001: return 'UTF-8'; break; // Unicode (UTF-8) } - throw new Exception('Unknown codepage: ' . $codePage); + throw new PHPExcel_Exception('Unknown codepage: ' . $codePage); } } diff --git a/Classes/PHPExcel/Shared/Font.php b/Classes/PHPExcel/Shared/Font.php index 62260d8c..6879e602 100644 --- a/Classes/PHPExcel/Shared/Font.php +++ b/Classes/PHPExcel/Shared/Font.php @@ -271,7 +271,7 @@ class PHPExcel_Shared_Font try { // If autosize method is set to 'approx', use approximation if (self::$autoSizeMethod == self::AUTOSIZE_METHOD_APPROX) { - throw new Exception('AutoSize method is set to approx'); + throw new PHPExcel_Exception('AutoSize method is set to approx'); } // Width of text in pixels excl. padding @@ -280,7 +280,7 @@ class PHPExcel_Shared_Font // Excel adds some padding, use 1.07 of the width of an 'n' glyph $columnWidth += ceil(self::getTextWidthPixelsExact('0', $font, 0) * 1.07); // pixels incl. padding - } catch (Exception $e) { + } catch (PHPExcel_Exception $e) { // Width of text in pixels excl. padding, approximation $columnWidth = self::getTextWidthPixelsApprox($cellText, $font, $rotation); @@ -302,11 +302,11 @@ class PHPExcel_Shared_Font * @param PHPExcel_Style_Font * @param int $rotation * @return int - * @throws Exception + * @throws PHPExcel_Exception */ public static function getTextWidthPixelsExact($text, PHPExcel_Style_Font $font, $rotation = 0) { if (!function_exists('imagettfbbox')) { - throw new Exception('GD library needs to be enabled'); + throw new PHPExcel_Exception('GD library needs to be enabled'); } // font size should really be supplied in pixels in GD2, @@ -425,7 +425,7 @@ class PHPExcel_Shared_Font */ public static function getTrueTypeFontFileFromFont($font) { if (!file_exists(self::$trueTypeFontPath) || !is_dir(self::$trueTypeFontPath)) { - throw new Exception('Valid directory to TrueType Font files not specified'); + throw new PHPExcel_Exception('Valid directory to TrueType Font files not specified'); } $name = $font->getName(); @@ -530,7 +530,7 @@ class PHPExcel_Shared_Font break; default: - throw new Exception('Unknown font name "'. $name .'". Cannot map to TrueType font file'); + throw new PHPExcel_Exception('Unknown font name "'. $name .'". Cannot map to TrueType font file'); break; } @@ -538,7 +538,7 @@ class PHPExcel_Shared_Font // Check if file actually exists if (!file_exists($fontFile)) { - throw New Exception('TrueType Font file not found'); + throw New PHPExcel_Exception('TrueType Font file not found'); } return $fontFile; diff --git a/Classes/PHPExcel/Shared/JAMA/CholeskyDecomposition.php b/Classes/PHPExcel/Shared/JAMA/CholeskyDecomposition.php index 9d064f9e..cfbaa53b 100644 --- a/Classes/PHPExcel/Shared/JAMA/CholeskyDecomposition.php +++ b/Classes/PHPExcel/Shared/JAMA/CholeskyDecomposition.php @@ -73,7 +73,7 @@ class CholeskyDecomposition { } } } else { - throw new Exception(JAMAError(ArgumentTypeException)); + throw new PHPExcel_Calculation_Exception(JAMAError(ArgumentTypeException)); } } // function __construct() @@ -136,13 +136,13 @@ class CholeskyDecomposition { return new Matrix($X, $this->m, $nx); } else { - throw new Exception(JAMAError(MatrixSPDException)); + throw new PHPExcel_Calculation_Exception(JAMAError(MatrixSPDException)); } } else { - throw new Exception(JAMAError(MatrixDimensionException)); + throw new PHPExcel_Calculation_Exception(JAMAError(MatrixDimensionException)); } } else { - throw new Exception(JAMAError(ArgumentTypeException)); + throw new PHPExcel_Calculation_Exception(JAMAError(ArgumentTypeException)); } } // function solve() diff --git a/Classes/PHPExcel/Shared/JAMA/LUDecomposition.php b/Classes/PHPExcel/Shared/JAMA/LUDecomposition.php index 6c797a6c..08e500cf 100644 --- a/Classes/PHPExcel/Shared/JAMA/LUDecomposition.php +++ b/Classes/PHPExcel/Shared/JAMA/LUDecomposition.php @@ -115,7 +115,7 @@ class PHPExcel_Shared_JAMA_LUDecomposition { } } } else { - throw new Exception(PHPExcel_Shared_JAMA_Matrix::ArgumentTypeException); + throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::ArgumentTypeException); } } // function __construct() @@ -208,7 +208,7 @@ class PHPExcel_Shared_JAMA_LUDecomposition { } return $d; } else { - throw new Exception(PHPExcel_Shared_JAMA_Matrix::MatrixDimensionException); + throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::MatrixDimensionException); } } // function det() @@ -218,8 +218,8 @@ class PHPExcel_Shared_JAMA_LUDecomposition { * * @param $B A Matrix with as many rows as A and any number of columns. * @return X so that L*U*X = B(piv,:) - * @exception IllegalArgumentException Matrix row dimensions must agree. - * @exception RuntimeException Matrix is singular. + * @PHPExcel_Calculation_Exception IllegalArgumentException Matrix row dimensions must agree. + * @PHPExcel_Calculation_Exception RuntimeException Matrix is singular. */ public function solve($B) { if ($B->getRowDimension() == $this->m) { @@ -248,10 +248,10 @@ class PHPExcel_Shared_JAMA_LUDecomposition { } return $X; } else { - throw new Exception(self::MatrixSingularException); + throw new PHPExcel_Calculation_Exception(self::MatrixSingularException); } } else { - throw new Exception(self::MatrixSquareException); + throw new PHPExcel_Calculation_Exception(self::MatrixSquareException); } } // function solve() diff --git a/Classes/PHPExcel/Shared/JAMA/Matrix.php b/Classes/PHPExcel/Shared/JAMA/Matrix.php index aae40e4c..b893a447 100644 --- a/Classes/PHPExcel/Shared/JAMA/Matrix.php +++ b/Classes/PHPExcel/Shared/JAMA/Matrix.php @@ -102,15 +102,15 @@ class PHPExcel_Shared_JAMA_Matrix { } } } else { - throw new Exception(self::ArrayLengthException); + throw new PHPExcel_Calculation_Exception(self::ArrayLengthException); } break; default: - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); break; } } else { - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); } } // function __construct() @@ -177,8 +177,8 @@ class PHPExcel_Shared_JAMA_Matrix { //A($i0...; $j0...) case 'integer,integer': list($i0, $j0) = $args; - if ($i0 >= 0) { $m = $this->m - $i0; } else { throw new Exception(self::ArgumentBoundsException); } - if ($j0 >= 0) { $n = $this->n - $j0; } else { throw new Exception(self::ArgumentBoundsException); } + if ($i0 >= 0) { $m = $this->m - $i0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); } + if ($j0 >= 0) { $n = $this->n - $j0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); } $R = new PHPExcel_Shared_JAMA_Matrix($m, $n); for($i = $i0; $i < $this->m; ++$i) { for($j = $j0; $j < $this->n; ++$j) { @@ -190,8 +190,8 @@ class PHPExcel_Shared_JAMA_Matrix { //A($i0...$iF; $j0...$jF) case 'integer,integer,integer,integer': list($i0, $iF, $j0, $jF) = $args; - if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { $m = $iF - $i0; } else { throw new Exception(self::ArgumentBoundsException); } - if (($jF > $j0) && ($this->n >= $jF) && ($j0 >= 0)) { $n = $jF - $j0; } else { throw new Exception(self::ArgumentBoundsException); } + if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { $m = $iF - $i0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); } + if (($jF > $j0) && ($this->n >= $jF) && ($j0 >= 0)) { $n = $jF - $j0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); } $R = new PHPExcel_Shared_JAMA_Matrix($m+1, $n+1); for($i = $i0; $i <= $iF; ++$i) { for($j = $j0; $j <= $jF; ++$j) { @@ -203,8 +203,8 @@ class PHPExcel_Shared_JAMA_Matrix { //$R = array of row indices; $C = array of column indices case 'array,array': list($RL, $CL) = $args; - if (count($RL) > 0) { $m = count($RL); } else { throw new Exception(self::ArgumentBoundsException); } - if (count($CL) > 0) { $n = count($CL); } else { throw new Exception(self::ArgumentBoundsException); } + if (count($RL) > 0) { $m = count($RL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); } + if (count($CL) > 0) { $n = count($CL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); } $R = new PHPExcel_Shared_JAMA_Matrix($m, $n); for($i = 0; $i < $m; ++$i) { for($j = 0; $j < $n; ++$j) { @@ -216,8 +216,8 @@ class PHPExcel_Shared_JAMA_Matrix { //$RL = array of row indices; $CL = array of column indices case 'array,array': list($RL, $CL) = $args; - if (count($RL) > 0) { $m = count($RL); } else { throw new Exception(self::ArgumentBoundsException); } - if (count($CL) > 0) { $n = count($CL); } else { throw new Exception(self::ArgumentBoundsException); } + if (count($RL) > 0) { $m = count($RL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); } + if (count($CL) > 0) { $n = count($CL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); } $R = new PHPExcel_Shared_JAMA_Matrix($m, $n); for($i = 0; $i < $m; ++$i) { for($j = 0; $j < $n; ++$j) { @@ -229,8 +229,8 @@ class PHPExcel_Shared_JAMA_Matrix { //A($i0...$iF); $CL = array of column indices case 'integer,integer,array': list($i0, $iF, $CL) = $args; - if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { $m = $iF - $i0; } else { throw new Exception(self::ArgumentBoundsException); } - if (count($CL) > 0) { $n = count($CL); } else { throw new Exception(self::ArgumentBoundsException); } + if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { $m = $iF - $i0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); } + if (count($CL) > 0) { $n = count($CL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); } $R = new PHPExcel_Shared_JAMA_Matrix($m, $n); for($i = $i0; $i < $iF; ++$i) { for($j = 0; $j < $n; ++$j) { @@ -242,8 +242,8 @@ class PHPExcel_Shared_JAMA_Matrix { //$RL = array of row indices case 'array,integer,integer': list($RL, $j0, $jF) = $args; - if (count($RL) > 0) { $m = count($RL); } else { throw new Exception(self::ArgumentBoundsException); } - if (($jF >= $j0) && ($this->n >= $jF) && ($j0 >= 0)) { $n = $jF - $j0; } else { throw new Exception(self::ArgumentBoundsException); } + if (count($RL) > 0) { $m = count($RL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); } + if (($jF >= $j0) && ($this->n >= $jF) && ($j0 >= 0)) { $n = $jF - $j0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); } $R = new PHPExcel_Shared_JAMA_Matrix($m, $n+1); for($i = 0; $i < $m; ++$i) { for($j = $j0; $j <= $jF; ++$j) { @@ -253,11 +253,11 @@ class PHPExcel_Shared_JAMA_Matrix { return $R; break; default: - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); break; } } else { - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); } } // function getMatrix() @@ -274,10 +274,10 @@ class PHPExcel_Shared_JAMA_Matrix { if (($this->m == $B->getRowDimension()) && ($this->n == $B->getColumnDimension())) { return true; } else { - throw new Exception(self::MatrixDimensionException); + throw new PHPExcel_Calculation_Exception(self::MatrixDimensionException); } } else { - throw new Exception(self::ArgumentTypeException); + throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); } } // function checkMatrixDimensions() @@ -345,7 +345,7 @@ class PHPExcel_Shared_JAMA_Matrix { return $this->getMatrix($i0, 0, $i0 + 1, $this->n); } } else { - throw new Exception(self::ArgumentTypeException); + throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); } } // function getMatrixByRow() @@ -366,7 +366,7 @@ class PHPExcel_Shared_JAMA_Matrix { return $this->getMatrix(0, $j0, $this->m, $j0 + 1); } } else { - throw new Exception(self::ArgumentTypeException); + throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); } } // function getMatrixByCol() @@ -428,13 +428,13 @@ class PHPExcel_Shared_JAMA_Matrix { switch($match) { case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new Exception(self::ArgumentTypeException); } + if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); } break; case 'array': $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); break; default: - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); break; } $this->checkMatrixDimensions($M); @@ -445,7 +445,7 @@ class PHPExcel_Shared_JAMA_Matrix { } return $M; } else { - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); } } // function plus() @@ -464,13 +464,13 @@ class PHPExcel_Shared_JAMA_Matrix { switch($match) { case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new Exception(self::ArgumentTypeException); } + if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); } break; case 'array': $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); break; default: - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); break; } $this->checkMatrixDimensions($M); @@ -495,7 +495,7 @@ class PHPExcel_Shared_JAMA_Matrix { } return $this; } else { - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); } } // function plusEquals() @@ -514,13 +514,13 @@ class PHPExcel_Shared_JAMA_Matrix { switch($match) { case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new Exception(self::ArgumentTypeException); } + if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); } break; case 'array': $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); break; default: - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); break; } $this->checkMatrixDimensions($M); @@ -531,7 +531,7 @@ class PHPExcel_Shared_JAMA_Matrix { } return $M; } else { - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); } } // function minus() @@ -550,13 +550,13 @@ class PHPExcel_Shared_JAMA_Matrix { switch($match) { case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new Exception(self::ArgumentTypeException); } + if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); } break; case 'array': $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); break; default: - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); break; } $this->checkMatrixDimensions($M); @@ -581,7 +581,7 @@ class PHPExcel_Shared_JAMA_Matrix { } return $this; } else { - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); } } // function minusEquals() @@ -601,13 +601,13 @@ class PHPExcel_Shared_JAMA_Matrix { switch($match) { case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new Exception(self::ArgumentTypeException); } + if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); } break; case 'array': $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); break; default: - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); break; } $this->checkMatrixDimensions($M); @@ -618,7 +618,7 @@ class PHPExcel_Shared_JAMA_Matrix { } return $M; } else { - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); } } // function arrayTimes() @@ -638,13 +638,13 @@ class PHPExcel_Shared_JAMA_Matrix { switch($match) { case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new Exception(self::ArgumentTypeException); } + if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); } break; case 'array': $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); break; default: - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); break; } $this->checkMatrixDimensions($M); @@ -669,7 +669,7 @@ class PHPExcel_Shared_JAMA_Matrix { } return $this; } else { - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); } } // function arrayTimesEquals() @@ -689,13 +689,13 @@ class PHPExcel_Shared_JAMA_Matrix { switch($match) { case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new Exception(self::ArgumentTypeException); } + if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); } break; case 'array': $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); break; default: - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); break; } $this->checkMatrixDimensions($M); @@ -725,7 +725,7 @@ class PHPExcel_Shared_JAMA_Matrix { } return $M; } else { - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); } } // function arrayRightDivide() @@ -745,13 +745,13 @@ class PHPExcel_Shared_JAMA_Matrix { switch($match) { case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new Exception(self::ArgumentTypeException); } + if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); } break; case 'array': $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); break; default: - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); break; } $this->checkMatrixDimensions($M); @@ -762,7 +762,7 @@ class PHPExcel_Shared_JAMA_Matrix { } return $M; } else { - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); } } // function arrayRightDivideEquals() @@ -782,13 +782,13 @@ class PHPExcel_Shared_JAMA_Matrix { switch($match) { case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new Exception(self::ArgumentTypeException); } + if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); } break; case 'array': $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); break; default: - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); break; } $this->checkMatrixDimensions($M); @@ -799,7 +799,7 @@ class PHPExcel_Shared_JAMA_Matrix { } return $M; } else { - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); } } // function arrayLeftDivide() @@ -819,13 +819,13 @@ class PHPExcel_Shared_JAMA_Matrix { switch($match) { case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new Exception(self::ArgumentTypeException); } + if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); } break; case 'array': $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); break; default: - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); break; } $this->checkMatrixDimensions($M); @@ -836,7 +836,7 @@ class PHPExcel_Shared_JAMA_Matrix { } return $M; } else { - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); } } // function arrayLeftDivideEquals() @@ -855,7 +855,7 @@ class PHPExcel_Shared_JAMA_Matrix { switch($match) { case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $B = $args[0]; } else { throw new Exception(self::ArgumentTypeException); } + if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $B = $args[0]; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); } if ($this->n == $B->m) { $C = new PHPExcel_Shared_JAMA_Matrix($this->m, $B->n); for($j = 0; $j < $B->n; ++$j) { @@ -873,7 +873,7 @@ class PHPExcel_Shared_JAMA_Matrix { } return $C; } else { - throw new Exception(JAMAError(MatrixDimensionMismatch)); + throw new PHPExcel_Calculation_Exception(JAMAError(MatrixDimensionMismatch)); } break; case 'array': @@ -891,7 +891,7 @@ class PHPExcel_Shared_JAMA_Matrix { } return $C; } else { - throw new Exception(JAMAError(MatrixDimensionMismatch)); + throw new PHPExcel_Calculation_Exception(JAMAError(MatrixDimensionMismatch)); } return $M; break; @@ -923,11 +923,11 @@ class PHPExcel_Shared_JAMA_Matrix { return $C; break; default: - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); break; } } else { - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); } } // function times() @@ -946,13 +946,13 @@ class PHPExcel_Shared_JAMA_Matrix { switch($match) { case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new Exception(self::ArgumentTypeException); } + if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); } break; case 'array': $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); break; default: - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); break; } $this->checkMatrixDimensions($M); @@ -977,7 +977,7 @@ class PHPExcel_Shared_JAMA_Matrix { } return $this; } else { - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); } } // function power() @@ -996,12 +996,12 @@ class PHPExcel_Shared_JAMA_Matrix { switch($match) { case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new Exception(self::ArgumentTypeException); } + if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { $M = $args[0]; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); } case 'array': $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); break; default: - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); break; } $this->checkMatrixDimensions($M); @@ -1012,7 +1012,7 @@ class PHPExcel_Shared_JAMA_Matrix { } return $this; } else { - throw new Exception(self::PolymorphicArgumentException); + throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); } } // function concat() diff --git a/Classes/PHPExcel/Shared/JAMA/QRDecomposition.php b/Classes/PHPExcel/Shared/JAMA/QRDecomposition.php index 49293d7e..75384629 100644 --- a/Classes/PHPExcel/Shared/JAMA/QRDecomposition.php +++ b/Classes/PHPExcel/Shared/JAMA/QRDecomposition.php @@ -88,7 +88,7 @@ class PHPExcel_Shared_JAMA_QRDecomposition { $this->Rdiag[$k] = -$nrm; } } else { - throw new Exception(PHPExcel_Shared_JAMA_Matrix::ArgumentTypeException); + throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::ArgumentTypeException); } } // function __construct() @@ -224,10 +224,10 @@ class PHPExcel_Shared_JAMA_QRDecomposition { $X = new PHPExcel_Shared_JAMA_Matrix($X); return ($X->getMatrix(0, $this->n-1, 0, $nx)); } else { - throw new Exception(self::MatrixRankException); + throw new PHPExcel_Calculation_Exception(self::MatrixRankException); } } else { - throw new Exception(PHPExcel_Shared_JAMA_Matrix::MatrixDimensionException); + throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::MatrixDimensionException); } } // function solve() diff --git a/Classes/PHPExcel/Shared/JAMA/utils/Maths.php b/Classes/PHPExcel/Shared/JAMA/utils/Maths.php index f5e2a372..aa09a8bb 100644 --- a/Classes/PHPExcel/Shared/JAMA/utils/Maths.php +++ b/Classes/PHPExcel/Shared/JAMA/utils/Maths.php @@ -35,7 +35,7 @@ function hypot() { if (is_numeric($d)) { $s += pow($d, 2); } else { - throw new Exception(JAMAError(ArgumentTypeException)); + throw new PHPExcel_Calculation_Exception(JAMAError(ArgumentTypeException)); } } return sqrt($s); diff --git a/Classes/PHPExcel/Shared/OLE.php b/Classes/PHPExcel/Shared/OLE.php index a5c8dd1d..9796282a 100644 --- a/Classes/PHPExcel/Shared/OLE.php +++ b/Classes/PHPExcel/Shared/OLE.php @@ -97,18 +97,18 @@ class PHPExcel_Shared_OLE { $fh = fopen($file, "r"); if (!$fh) { - throw new Exception("Can't open file $file"); + throw new PHPExcel_Reader_Exception("Can't open file $file"); } $this->_file_handle = $fh; $signature = fread($fh, 8); if ("\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1" != $signature) { - throw new Exception("File doesn't seem to be an OLE container."); + throw new PHPExcel_Reader_Exception("File doesn't seem to be an OLE container."); } fseek($fh, 28); if (fread($fh, 2) != "\xFE\xFF") { // This shouldn't be a problem in practice - throw new Exception("Only Little-Endian encoding is supported."); + throw new PHPExcel_Reader_Exception("Only Little-Endian encoding is supported."); } // Size of blocks and short blocks in bytes $this->bigBlockSize = pow(2, self::_readInt2($fh)); diff --git a/Classes/PHPExcel/Shared/OLE/PPS/Root.php b/Classes/PHPExcel/Shared/OLE/PPS/Root.php index 9a214167..eb929d20 100644 --- a/Classes/PHPExcel/Shared/OLE/PPS/Root.php +++ b/Classes/PHPExcel/Shared/OLE/PPS/Root.php @@ -84,13 +84,13 @@ class PHPExcel_Shared_OLE_PPS_Root extends PHPExcel_Shared_OLE_PPS $this->_tmp_filename = tempnam($this->_tmp_dir, "OLE_PPS_Root"); $this->_FILEH_ = fopen($this->_tmp_filename,"w+b"); if ($this->_FILEH_ == false) { - throw new Exception("Can't create temporary file."); + throw new PHPExcel_Writer_Exception("Can't create temporary file."); } } else { $this->_FILEH_ = fopen($filename, "wb"); } if ($this->_FILEH_ == false) { - throw new Exception("Can't open $filename. It may be in use or protected."); + throw new PHPExcel_Writer_Exception("Can't open $filename. It may be in use or protected."); } // Make an array of PPS's (for Save) $aList = array(); diff --git a/Classes/PHPExcel/Shared/ZipArchive.php b/Classes/PHPExcel/Shared/ZipArchive.php index cebd32b6..f66bbf76 100644 --- a/Classes/PHPExcel/Shared/ZipArchive.php +++ b/Classes/PHPExcel/Shared/ZipArchive.php @@ -105,7 +105,7 @@ class PHPExcel_Shared_ZipArchive PCLZIP_OPT_ADD_PATH, $filenameParts["dirname"] ); if ($res == 0) { - throw new Exception("Error zipping files : " . $this->_zip->errorInfo(true)); + throw new PHPExcel_Writer_Exception("Error zipping files : " . $this->_zip->errorInfo(true)); } unlink($this->_tempDir.'/'.$filenameParts["basename"]); diff --git a/Classes/PHPExcel/Shared/ZipStreamWrapper.php b/Classes/PHPExcel/Shared/ZipStreamWrapper.php index 74ff55ad..1be11f7d 100644 --- a/Classes/PHPExcel/Shared/ZipStreamWrapper.php +++ b/Classes/PHPExcel/Shared/ZipStreamWrapper.php @@ -82,7 +82,7 @@ class PHPExcel_Shared_ZipStreamWrapper { public function stream_open($path, $mode, $options, &$opened_path) { // Check for mode if ($mode{0} != 'r') { - throw new Exception('Mode ' . $mode . ' is not supported. Only read mode is supported.'); + throw new PHPExcel_Reader_Exception('Mode ' . $mode . ' is not supported. Only read mode is supported.'); } $pos = strrpos($path, '#'); diff --git a/Classes/PHPExcel/Style.php b/Classes/PHPExcel/Style.php index 4451910b..d2ed5b46 100644 --- a/Classes/PHPExcel/Style.php +++ b/Classes/PHPExcel/Style.php @@ -192,7 +192,7 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp * * @param array $pStyles Array containing style information * @param boolean $pAdvanced Advanced mode for setting borders. - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Style */ public function applyFromArray($pStyles = null, $pAdvanced = true) { @@ -464,7 +464,7 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp } } } else { - throw new Exception("Invalid style array passed."); + throw new PHPExcel_Exception("Invalid style array passed."); } return $this; } diff --git a/Classes/PHPExcel/Style/Conditional.php b/Classes/PHPExcel/Style/Conditional.php index ff365d1b..9573f5b7 100644 --- a/Classes/PHPExcel/Style/Conditional.php +++ b/Classes/PHPExcel/Style/Conditional.php @@ -238,7 +238,7 @@ class PHPExcel_Style_Conditional implements PHPExcel_IComparable * Set Style * * @param PHPExcel_Style $pValue - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Style_Conditional */ public function setStyle(PHPExcel_Style $pValue = null) { diff --git a/Classes/PHPExcel/Worksheet.php b/Classes/PHPExcel/Worksheet.php index c54e7f60..345c0c23 100644 --- a/Classes/PHPExcel/Worksheet.php +++ b/Classes/PHPExcel/Worksheet.php @@ -552,7 +552,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * * @param string $index Chart index position * @return false|PHPExcel_Chart - * @throws Exception + * @throws PHPExcel_Exception */ public function getChartByIndex($index = null) { @@ -574,7 +574,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * Return an array of the names of charts on this worksheet * * @return string[] The names of charts - * @throws Exception + * @throws PHPExcel_Exception */ public function getChartNames() { @@ -590,7 +590,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * * @param string $chartName Chart name * @return false|PHPExcel_Chart - * @throws Exception + * @throws PHPExcel_Exception */ public function getChartByName($chartName = '') { @@ -1197,7 +1197,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable if (!$namedRange->getLocalOnly()) { return $namedRange->getWorksheet()->cellExists($pCoordinate); } else { - throw new Exception('Named range ' . $namedRange->getName() . ' is not accessible from within sheet ' . $this->getTitle()); + throw new PHPExcel_Exception('Named range ' . $namedRange->getName() . ' is not accessible from within sheet ' . $this->getTitle()); } } } @@ -1299,7 +1299,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * * @deprecated * @return PHPExcel_Style - * @throws Exception + * @throws PHPExcel_Exception */ public function getDefaultStyle() { @@ -1311,7 +1311,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * * @deprecated * @param PHPExcel_Style $pValue - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function setDefaultStyle(PHPExcel_Style $pValue) @@ -1330,7 +1330,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * * @param string $pCellCoordinate Cell coordinate to get style for * @return PHPExcel_Style - * @throws Exception + * @throws PHPExcel_Exception */ public function getStyle($pCellCoordinate = 'A1') { @@ -1426,7 +1426,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * @deprecated * @param PHPExcel_Style $pSharedCellStyle Cell style to share * @param string $pRange Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function setSharedStyle(PHPExcel_Style $pSharedCellStyle = null, $pRange = '') @@ -1442,7 +1442,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * * @param PHPExcel_Style $pCellStyle Cell style to duplicate * @param string $pRange Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function duplicateStyle(PHPExcel_Style $pCellStyle = null, $pRange = '') @@ -1566,7 +1566,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * @param array $pStyles Array containing style information * @param string $pRange Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") * @param boolean $pAdvanced Advanced mode for setting borders. - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function duplicateStyleArray($pStyles = null, $pRange = '', $pAdvanced = true) @@ -1624,7 +1624,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * Set merge on a cell range * * @param string $pRange Cell range (e.g. A1:E1) - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function mergeCells($pRange = 'A1:A1') @@ -1653,7 +1653,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable } } else { - throw new Exception('Merge must be set on a range of cells.'); + throw new PHPExcel_Exception('Merge must be set on a range of cells.'); } return $this; @@ -1666,7 +1666,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * @param int $pRow1 Numeric row coordinate of the first cell * @param int $pColumn2 Numeric column coordinate of the last cell * @param int $pRow2 Numeric row coordinate of the last cell - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function mergeCellsByColumnAndRow($pColumn1 = 0, $pRow1 = 1, $pColumn2 = 0, $pRow2 = 1) @@ -1679,7 +1679,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * Remove merge on a cell range * * @param string $pRange Cell range (e.g. A1:E1) - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function unmergeCells($pRange = 'A1:A1') @@ -1691,10 +1691,10 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable if (isset($this->_mergeCells[$pRange])) { unset($this->_mergeCells[$pRange]); } else { - throw new Exception('Cell range ' . $pRange . ' not known as merged.'); + throw new PHPExcel_Exception('Cell range ' . $pRange . ' not known as merged.'); } } else { - throw new Exception('Merge can only be removed from a range of cells.'); + throw new PHPExcel_Exception('Merge can only be removed from a range of cells.'); } return $this; @@ -1707,7 +1707,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * @param int $pRow1 Numeric row coordinate of the first cell * @param int $pColumn2 Numeric column coordinate of the last cell * @param int $pRow2 Numeric row coordinate of the last cell - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function unmergeCellsByColumnAndRow($pColumn1 = 0, $pRow1 = 1, $pColumn2 = 0, $pRow2 = 1) @@ -1745,7 +1745,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * @param string $pRange Cell (e.g. A1) or cell range (e.g. A1:E1) * @param string $pPassword Password to unlock the protection * @param boolean $pAlreadyHashed If the password has already been hashed, set this to true - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function protectCells($pRange = 'A1', $pPassword = '', $pAlreadyHashed = false) @@ -1770,7 +1770,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * @param int $pRow2 Numeric row coordinate of the last cell * @param string $pPassword Password to unlock the protection * @param boolean $pAlreadyHashed If the password has already been hashed, set this to true - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function protectCellsByColumnAndRow($pColumn1 = 0, $pRow1 = 1, $pColumn2 = 0, $pRow2 = 1, $pPassword = '', $pAlreadyHashed = false) @@ -1783,7 +1783,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * Remove protection on a cell range * * @param string $pRange Cell (e.g. A1) or cell range (e.g. A1:E1) - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function unprotectCells($pRange = 'A1') @@ -1794,7 +1794,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable if (isset($this->_protectedCells[$pRange])) { unset($this->_protectedCells[$pRange]); } else { - throw new Exception('Cell range ' . $pRange . ' not known as protected.'); + throw new PHPExcel_Exception('Cell range ' . $pRange . ' not known as protected.'); } return $this; } @@ -1808,7 +1808,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * @param int $pRow2 Numeric row coordinate of the last cell * @param string $pPassword Password to unlock the protection * @param boolean $pAlreadyHashed If the password has already been hashed, set this to true - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function unprotectCellsByColumnAndRow($pColumn1 = 0, $pRow1 = 1, $pColumn2 = 0, $pRow2 = 1, $pPassword = '', $pAlreadyHashed = false) @@ -1842,7 +1842,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * * @param PHPExcel_Worksheet_AutoFilter|string $pValue * A simple string containing a Cell range like 'A1:E10' is permitted for backward compatibility - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function setAutoFilter($pValue) @@ -1862,7 +1862,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * @param int $pRow1 Numeric row coordinate of the first cell * @param int $pColumn2 Numeric column coordinate of the second cell * @param int $pRow2 Numeric row coordinate of the second cell - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function setAutoFilterByColumnAndRow($pColumn1 = 0, $pRow1 = 1, $pColumn2 = 0, $pRow2 = 1) @@ -1904,7 +1904,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * B1 will freeze the columns to the left of cell B1 (i.e column A) * B2 will freeze the rows above and to the left of cell A2 * (i.e row 1 and column A) - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function freezePane($pCell = '') @@ -1915,7 +1915,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable if (strpos($pCell,':') === false && strpos($pCell,',') === false) { $this->_freezePane = $pCell; } else { - throw new Exception('Freeze pane can not be set on a range of cells.'); + throw new PHPExcel_Exception('Freeze pane can not be set on a range of cells.'); } return $this; } @@ -1925,7 +1925,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * * @param int $pColumn Numeric column coordinate of the cell * @param int $pRow Numeric row coordinate of the cell - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function freezePaneByColumnAndRow($pColumn = 0, $pRow = 1) @@ -1948,7 +1948,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * * @param int $pBefore Insert before this one * @param int $pNumRows Number of rows to insert - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function insertNewRowBefore($pBefore = 1, $pNumRows = 1) { @@ -1956,7 +1956,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable $objReferenceHelper = PHPExcel_ReferenceHelper::getInstance(); $objReferenceHelper->insertNewBefore('A' . $pBefore, 0, $pNumRows, $this); } else { - throw new Exception("Rows can only be inserted before at least row 1."); + throw new PHPExcel_Exception("Rows can only be inserted before at least row 1."); } return $this; } @@ -1966,7 +1966,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * * @param int $pBefore Insert before this one * @param int $pNumCols Number of columns to insert - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function insertNewColumnBefore($pBefore = 'A', $pNumCols = 1) { @@ -1974,7 +1974,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable $objReferenceHelper = PHPExcel_ReferenceHelper::getInstance(); $objReferenceHelper->insertNewBefore($pBefore . '1', $pNumCols, 0, $this); } else { - throw new Exception("Column references should not be numeric."); + throw new PHPExcel_Exception("Column references should not be numeric."); } return $this; } @@ -1984,14 +1984,14 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * * @param int $pBefore Insert before this one (numeric column coordinate of the cell) * @param int $pNumCols Number of columns to insert - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function insertNewColumnBeforeByIndex($pBefore = 0, $pNumCols = 1) { if ($pBefore >= 0) { return $this->insertNewColumnBefore(PHPExcel_Cell::stringFromColumnIndex($pBefore), $pNumCols); } else { - throw new Exception("Columns can only be inserted before at least column A (0)."); + throw new PHPExcel_Exception("Columns can only be inserted before at least column A (0)."); } } @@ -2000,7 +2000,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * * @param int $pRow Remove starting with this one * @param int $pNumRows Number of rows to remove - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function removeRow($pRow = 1, $pNumRows = 1) { @@ -2008,7 +2008,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable $objReferenceHelper = PHPExcel_ReferenceHelper::getInstance(); $objReferenceHelper->insertNewBefore('A' . ($pRow + $pNumRows), 0, -$pNumRows, $this); } else { - throw new Exception("Rows to be deleted should at least start from row 1."); + throw new PHPExcel_Exception("Rows to be deleted should at least start from row 1."); } return $this; } @@ -2018,7 +2018,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * * @param int $pColumn Remove starting with this one * @param int $pNumCols Number of columns to remove - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function removeColumn($pColumn = 'A', $pNumCols = 1) { @@ -2027,7 +2027,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable $objReferenceHelper = PHPExcel_ReferenceHelper::getInstance(); $objReferenceHelper->insertNewBefore($pColumn . '1', -$pNumCols, 0, $this); } else { - throw new Exception("Column references should not be numeric."); + throw new PHPExcel_Exception("Column references should not be numeric."); } return $this; } @@ -2037,14 +2037,14 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * * @param int $pColumn Remove starting with this one (numeric column coordinate of the cell) * @param int $pNumCols Number of columns to remove - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function removeColumnByIndex($pColumn = 0, $pNumCols = 1) { if ($pColumn >= 0) { return $this->removeColumn(PHPExcel_Cell::stringFromColumnIndex($pColumn), $pNumCols); } else { - throw new Exception("Columns to be deleted should at least start from column 0"); + throw new PHPExcel_Exception("Columns to be deleted should at least start from column 0"); } } @@ -2176,7 +2176,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * * @param string $pCellCoordinate Cell coordinate to get comment for * @return PHPExcel_Comment - * @throws Exception + * @throws PHPExcel_Exception */ public function getComment($pCellCoordinate = 'A1') { @@ -2184,11 +2184,11 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable $pCellCoordinate = strtoupper($pCellCoordinate); if (strpos($pCellCoordinate,':') !== false || strpos($pCellCoordinate,',') !== false) { - throw new Exception('Cell coordinate string can not be a range of cells.'); + throw new PHPExcel_Exception('Cell coordinate string can not be a range of cells.'); } else if (strpos($pCellCoordinate,'$') !== false) { - throw new Exception('Cell coordinate string must not be absolute.'); + throw new PHPExcel_Exception('Cell coordinate string must not be absolute.'); } else if ($pCellCoordinate == '') { - throw new Exception('Cell coordinate can not be zero-length string.'); + throw new PHPExcel_Exception('Cell coordinate can not be zero-length string.'); } else { // Check if we already have a comment for this cell. // If not, create a new comment. @@ -2260,7 +2260,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * Select a range of cells. * * @param string $pCoordinate Cell range, examples: 'A1', 'B2:G5', 'A:C', '3:6' - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function setSelectedCells($pCoordinate = 'A1') @@ -2295,7 +2295,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * * @param int $pColumn Numeric column coordinate of the cell * @param int $pRow Numeric row coordinate of the cell - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function setSelectedCellByColumnAndRow($pColumn = 0, $pRow = 1) @@ -2330,7 +2330,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * @param mixed $nullValue Value in source array that stands for blank cell * @param string $startCell Insert array starting from this cell address as the top left coordinate * @param boolean $strictNullComparison Apply strict comparison when testing for null values in the array - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet */ public function fromArray($source = null, $nullValue = null, $startCell = 'A1', $strictNullComparison = false) { @@ -2363,7 +2363,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable ++$startRow; } } else { - throw new Exception("Parameter \$source should be an array."); + throw new PHPExcel_Exception("Parameter \$source should be an array."); } return $this; } @@ -2444,7 +2444,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * @param boolean $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero * True - Return rows and columns indexed by their actual row and column IDs * @return array - * @throws Exception + * @throws PHPExcel_Exception */ public function namedRangeToArray($pNamedRange = '', $nullValue = null, $calculateFormulas = true, $formatData = true, $returnCellRef = false) { $namedRange = PHPExcel_NamedRange::resolveRange($pNamedRange, $this); @@ -2456,7 +2456,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable $nullValue, $calculateFormulas, $formatData, $returnCellRef); } - throw new Exception('Named Range '.$pNamedRange.' does not exist.'); + throw new PHPExcel_Exception('Named Range '.$pNamedRange.' does not exist.'); } diff --git a/Classes/PHPExcel/Worksheet/AutoFilter/Column.php b/Classes/PHPExcel/Worksheet/AutoFilter/Column.php index d41c3ed5..9a743520 100644 --- a/Classes/PHPExcel/Worksheet/AutoFilter/Column.php +++ b/Classes/PHPExcel/Worksheet/AutoFilter/Column.php @@ -134,7 +134,7 @@ class PHPExcel_Worksheet_AutoFilter_Column * Set AutoFilter Column Index * * @param string $pColumn Column (e.g. A) - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_AutoFilter_Column */ public function setColumnIndex($pColumn) { @@ -183,7 +183,7 @@ class PHPExcel_Worksheet_AutoFilter_Column * Set AutoFilter Type * * @param string $pFilterType - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_AutoFilter_Column */ public function setFilterType($pFilterType = self::AUTOFILTER_FILTERTYPE_FILTER) { @@ -209,7 +209,7 @@ class PHPExcel_Worksheet_AutoFilter_Column * Set AutoFilter Multiple Rules And/Or * * @param string $pJoin And/Or - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_AutoFilter_Column */ public function setJoin($pJoin = self::AUTOFILTER_COLUMN_JOIN_OR) { @@ -228,7 +228,7 @@ class PHPExcel_Worksheet_AutoFilter_Column * Set AutoFilter Attributes * * @param string[] $pAttributes - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_AutoFilter_Column */ public function setAttributes($pAttributes = array()) { @@ -242,7 +242,7 @@ class PHPExcel_Worksheet_AutoFilter_Column * * @param string $pName Attribute Name * @param string $pValue Attribute Value - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_AutoFilter_Column */ public function setAttribute($pName, $pValue) { diff --git a/Classes/PHPExcel/Worksheet/AutoFilter/Column/Rule.php b/Classes/PHPExcel/Worksheet/AutoFilter/Column/Rule.php index 67f01259..771358bc 100644 --- a/Classes/PHPExcel/Worksheet/AutoFilter/Column/Rule.php +++ b/Classes/PHPExcel/Worksheet/AutoFilter/Column/Rule.php @@ -288,7 +288,7 @@ class PHPExcel_Worksheet_AutoFilter_Column_Rule * Set AutoFilter Rule Type * * @param string $pRuleType - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_AutoFilter_Column */ public function setRuleType($pRuleType = self::AUTOFILTER_RULETYPE_FILTER) { @@ -314,7 +314,7 @@ class PHPExcel_Worksheet_AutoFilter_Column_Rule * Set AutoFilter Rule Value * * @param string|string[] $pValue - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_AutoFilter_Column_Rule */ public function setValue($pValue = '') { @@ -354,7 +354,7 @@ class PHPExcel_Worksheet_AutoFilter_Column_Rule * Set AutoFilter Rule Operator * * @param string $pOperator - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_AutoFilter_Column_Rule */ public function setOperator($pOperator = self::AUTOFILTER_COLUMN_RULE_EQUAL) { @@ -382,7 +382,7 @@ class PHPExcel_Worksheet_AutoFilter_Column_Rule * Set AutoFilter Rule Grouping * * @param string $pGrouping - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_AutoFilter_Column_Rule */ public function setGrouping($pGrouping = NULL) { @@ -404,7 +404,7 @@ class PHPExcel_Worksheet_AutoFilter_Column_Rule * @param string $pOperator * @param string|string[] $pValue * @param string $pGrouping - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_AutoFilter_Column_Rule */ public function setRule($pOperator = self::AUTOFILTER_COLUMN_RULE_EQUAL, $pValue = '', $pGrouping = NULL) { diff --git a/Classes/PHPExcel/Worksheet/BaseDrawing.php b/Classes/PHPExcel/Worksheet/BaseDrawing.php index df743341..40b94502 100644 --- a/Classes/PHPExcel/Worksheet/BaseDrawing.php +++ b/Classes/PHPExcel/Worksheet/BaseDrawing.php @@ -212,7 +212,7 @@ class PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable * * @param PHPExcel_Worksheet $pValue * @param bool $pOverrideOld If a Worksheet has already been assigned, overwrite it and remove image from old Worksheet? - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_BaseDrawing */ public function setWorksheet(PHPExcel_Worksheet $pValue = null, $pOverrideOld = false) { @@ -237,7 +237,7 @@ class PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable // Set new PHPExcel_Worksheet $this->setWorksheet($pValue); } else { - throw new Exception("A PHPExcel_Worksheet has already been assigned. Drawings can only exist on one PHPExcel_Worksheet."); + throw new PHPExcel_Exception("A PHPExcel_Worksheet has already been assigned. Drawings can only exist on one PHPExcel_Worksheet."); } } return $this; @@ -440,7 +440,7 @@ class PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable * Set Shadow * * @param PHPExcel_Worksheet_Drawing_Shadow $pValue - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_BaseDrawing */ public function setShadow(PHPExcel_Worksheet_Drawing_Shadow $pValue = null) { diff --git a/Classes/PHPExcel/Worksheet/ColumnDimension.php b/Classes/PHPExcel/Worksheet/ColumnDimension.php index 6f2cc578..3f7cad18 100644 --- a/Classes/PHPExcel/Worksheet/ColumnDimension.php +++ b/Classes/PHPExcel/Worksheet/ColumnDimension.php @@ -195,12 +195,12 @@ class PHPExcel_Worksheet_ColumnDimension * Value must be between 0 and 7 * * @param int $pValue - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_ColumnDimension */ public function setOutlineLevel($pValue) { if ($pValue < 0 || $pValue > 7) { - throw new Exception("Outline level must range between 0 and 7."); + throw new PHPExcel_Exception("Outline level must range between 0 and 7."); } $this->_outlineLevel = $pValue; diff --git a/Classes/PHPExcel/Worksheet/Drawing.php b/Classes/PHPExcel/Worksheet/Drawing.php index 1c5f434a..922bbb43 100644 --- a/Classes/PHPExcel/Worksheet/Drawing.php +++ b/Classes/PHPExcel/Worksheet/Drawing.php @@ -98,7 +98,7 @@ class PHPExcel_Worksheet_Drawing extends PHPExcel_Worksheet_BaseDrawing implemen * * @param string $pValue File path * @param boolean $pVerifyFile Verify file - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_Drawing */ public function setPath($pValue = '', $pVerifyFile = true) { @@ -111,7 +111,7 @@ class PHPExcel_Worksheet_Drawing extends PHPExcel_Worksheet_BaseDrawing implemen list($this->_width, $this->_height) = getimagesize($pValue); } } else { - throw new Exception("File $pValue not found!"); + throw new PHPExcel_Exception("File $pValue not found!"); } } else { $this->_path = $pValue; diff --git a/Classes/PHPExcel/Worksheet/Drawing/Shadow.php b/Classes/PHPExcel/Worksheet/Drawing/Shadow.php index 644fc652..01474cbb 100644 --- a/Classes/PHPExcel/Worksheet/Drawing/Shadow.php +++ b/Classes/PHPExcel/Worksheet/Drawing/Shadow.php @@ -226,7 +226,7 @@ class PHPExcel_Worksheet_Drawing_Shadow implements PHPExcel_IComparable * Set Color * * @param PHPExcel_Style_Color $pValue - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_Drawing_Shadow */ public function setColor(PHPExcel_Style_Color $pValue = null) { diff --git a/Classes/PHPExcel/Worksheet/HeaderFooter.php b/Classes/PHPExcel/Worksheet/HeaderFooter.php index 48e2d694..16248239 100644 --- a/Classes/PHPExcel/Worksheet/HeaderFooter.php +++ b/Classes/PHPExcel/Worksheet/HeaderFooter.php @@ -392,7 +392,7 @@ class PHPExcel_Worksheet_HeaderFooter * * @param PHPExcel_Worksheet_HeaderFooterDrawing $image * @param string $location - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_HeaderFooter */ public function addImage(PHPExcel_Worksheet_HeaderFooterDrawing $image = null, $location = self::IMAGE_HEADER_LEFT) { @@ -404,7 +404,7 @@ class PHPExcel_Worksheet_HeaderFooter * Remove header/footer image * * @param string $location - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_HeaderFooter */ public function removeImage($location = self::IMAGE_HEADER_LEFT) { @@ -418,12 +418,12 @@ class PHPExcel_Worksheet_HeaderFooter * Set header/footer images * * @param PHPExcel_Worksheet_HeaderFooterDrawing[] $images - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_HeaderFooter */ public function setImages($images) { if (!is_array($images)) { - throw new Exception('Invalid parameter!'); + throw new PHPExcel_Exception('Invalid parameter!'); } $this->_headerFooterImages = $images; diff --git a/Classes/PHPExcel/Worksheet/HeaderFooterDrawing.php b/Classes/PHPExcel/Worksheet/HeaderFooterDrawing.php index 3fd1e35e..2e178f10 100644 --- a/Classes/PHPExcel/Worksheet/HeaderFooterDrawing.php +++ b/Classes/PHPExcel/Worksheet/HeaderFooterDrawing.php @@ -296,7 +296,7 @@ class PHPExcel_Worksheet_HeaderFooterDrawing extends PHPExcel_Worksheet_Drawing * * @param string $pValue File path * @param boolean $pVerifyFile Verify file - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_HeaderFooterDrawing */ public function setPath($pValue = '', $pVerifyFile = true) { @@ -309,7 +309,7 @@ class PHPExcel_Worksheet_HeaderFooterDrawing extends PHPExcel_Worksheet_Drawing list($this->_width, $this->_height) = getimagesize($pValue); } } else { - throw new Exception("File $pValue not found!"); + throw new PHPExcel_Exception("File $pValue not found!"); } } else { $this->_path = $pValue; diff --git a/Classes/PHPExcel/Worksheet/PageSetup.php b/Classes/PHPExcel/Worksheet/PageSetup.php index 458b73f5..c94a0277 100644 --- a/Classes/PHPExcel/Worksheet/PageSetup.php +++ b/Classes/PHPExcel/Worksheet/PageSetup.php @@ -339,7 +339,7 @@ class PHPExcel_Worksheet_PageSetup * @param int? $pValue * @param boolean $pUpdate Update fitToPage so scaling applies rather than fitToHeight / fitToWidth * @return PHPExcel_Worksheet_PageSetup - * @throws Exception + * @throws PHPExcel_Exception */ public function setScale($pValue = 100, $pUpdate = true) { // Microsoft Office Excel 2007 only allows setting a scale between 10 and 400 via the user interface, @@ -350,7 +350,7 @@ class PHPExcel_Worksheet_PageSetup $this->_fitToPage = false; } } else { - throw new Exception("Scale must not be negative"); + throw new PHPExcel_Exception("Scale must not be negative"); } return $this; } @@ -568,7 +568,7 @@ class PHPExcel_Worksheet_PageSetup * Default behaviour, or a index value of 0, will return all ranges as a comma-separated string * Otherwise, the specific range identified by the value of $index will be returned * Print areas are numbered from 1 - * @throws Exception + * @throws PHPExcel_Exception * @return string */ public function getPrintArea($index = 0) { @@ -579,7 +579,7 @@ class PHPExcel_Worksheet_PageSetup if (isset($printAreas[$index-1])) { return $printAreas[$index-1]; } - throw new Exception("Requested Print Area does not exist"); + throw new PHPExcel_Exception("Requested Print Area does not exist"); } /** @@ -640,15 +640,15 @@ class PHPExcel_Worksheet_PageSetup * Default behaviour, or the "O" method, overwrites existing print area * The "I" method, inserts the new print area before any specified index, or at the end of the list * @return PHPExcel_Worksheet_PageSetup - * @throws Exception + * @throws PHPExcel_Exception */ public function setPrintArea($value, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) { if (strpos($value,'!') !== false) { - throw new Exception('Cell coordinate must not specify a worksheet.'); + throw new PHPExcel_Exception('Cell coordinate must not specify a worksheet.'); } elseif (strpos($value,':') === false) { - throw new Exception('Cell coordinate must be a range of cells.'); + throw new PHPExcel_Exception('Cell coordinate must be a range of cells.'); } elseif (strpos($value,'$') !== false) { - throw new Exception('Cell coordinate must not be absolute.'); + throw new PHPExcel_Exception('Cell coordinate must not be absolute.'); } $value = strtoupper($value); @@ -661,7 +661,7 @@ class PHPExcel_Worksheet_PageSetup $index = count($printAreas) - abs($index) + 1; } if (($index <= 0) || ($index > count($printAreas))) { - throw new Exception('Invalid index for setting print range.'); + throw new PHPExcel_Exception('Invalid index for setting print range.'); } $printAreas[$index-1] = $value; $this->_printArea = implode(',',$printAreas); @@ -675,13 +675,13 @@ class PHPExcel_Worksheet_PageSetup $index = abs($index) - 1; } if ($index > count($printAreas)) { - throw new Exception('Invalid index for setting print range.'); + throw new PHPExcel_Exception('Invalid index for setting print range.'); } $printAreas = array_merge(array_slice($printAreas,0,$index),array($value),array_slice($printAreas,$index)); $this->_printArea = implode(',',$printAreas); } } else { - throw new Exception('Invalid method for setting print range.'); + throw new PHPExcel_Exception('Invalid method for setting print range.'); } return $this; @@ -698,7 +698,7 @@ class PHPExcel_Worksheet_PageSetup * list. * Print areas are numbered from 1 * @return PHPExcel_Worksheet_PageSetup - * @throws Exception + * @throws PHPExcel_Exception */ public function addPrintArea($value, $index = -1) { return $this->setPrintArea($value, $index, self::SETPRINTRANGE_INSERT); @@ -725,7 +725,7 @@ class PHPExcel_Worksheet_PageSetup * Default behaviour, or the "O" method, overwrites existing print area * The "I" method, inserts the new print area before any specified index, or at the end of the list * @return PHPExcel_Worksheet_PageSetup - * @throws Exception + * @throws PHPExcel_Exception */ public function setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) { @@ -746,7 +746,7 @@ class PHPExcel_Worksheet_PageSetup * list. * Print areas are numbered from 1 * @return PHPExcel_Worksheet_PageSetup - * @throws Exception + * @throws PHPExcel_Exception */ public function addPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = -1) { diff --git a/Classes/PHPExcel/Worksheet/RowDimension.php b/Classes/PHPExcel/Worksheet/RowDimension.php index 0cc778f5..6e8944d6 100644 --- a/Classes/PHPExcel/Worksheet/RowDimension.php +++ b/Classes/PHPExcel/Worksheet/RowDimension.php @@ -195,12 +195,12 @@ class PHPExcel_Worksheet_RowDimension * Value must be between 0 and 7 * * @param int $pValue - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_RowDimension */ public function setOutlineLevel($pValue) { if ($pValue < 0 || $pValue > 7) { - throw new Exception("Outline level must range between 0 and 7."); + throw new PHPExcel_Exception("Outline level must range between 0 and 7."); } $this->_outlineLevel = $pValue; diff --git a/Classes/PHPExcel/Worksheet/SheetView.php b/Classes/PHPExcel/Worksheet/SheetView.php index 9ae4bf06..30dbc2be 100644 --- a/Classes/PHPExcel/Worksheet/SheetView.php +++ b/Classes/PHPExcel/Worksheet/SheetView.php @@ -96,7 +96,7 @@ class PHPExcel_Worksheet_SheetView * Valid values range from 10 to 400. * * @param int $pValue - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_SheetView */ public function setZoomScale($pValue = 100) { @@ -105,7 +105,7 @@ class PHPExcel_Worksheet_SheetView if (($pValue >= 1) || is_null($pValue)) { $this->_zoomScale = $pValue; } else { - throw new Exception("Scale must be greater than or equal to 1."); + throw new PHPExcel_Exception("Scale must be greater than or equal to 1."); } return $this; } @@ -125,14 +125,14 @@ class PHPExcel_Worksheet_SheetView * Valid values range from 10 to 400. * * @param int $pValue - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_SheetView */ public function setZoomScaleNormal($pValue = 100) { if (($pValue >= 1) || is_null($pValue)) { $this->_zoomScaleNormal = $pValue; } else { - throw new Exception("Scale must be greater than or equal to 1."); + throw new PHPExcel_Exception("Scale must be greater than or equal to 1."); } return $this; } @@ -155,7 +155,7 @@ class PHPExcel_Worksheet_SheetView * 'pageBreakPreview' self::SHEETVIEW_PAGE_BREAK_PREVIEW * * @param string $pValue - * @throws Exception + * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_SheetView */ public function setView($pValue = NULL) { @@ -166,7 +166,7 @@ class PHPExcel_Worksheet_SheetView if (in_array($pValue, self::$_sheetViewTypes)) { $this->_sheetviewType = $pValue; } else { - throw new Exception("Invalid sheetview layout type."); + throw new PHPExcel_Exception("Invalid sheetview layout type."); } return $this; diff --git a/Classes/PHPExcel/Writer/Abstract.php b/Classes/PHPExcel/Writer/Abstract.php index 2ac779ce..7aa50cca 100644 --- a/Classes/PHPExcel/Writer/Abstract.php +++ b/Classes/PHPExcel/Writer/Abstract.php @@ -131,7 +131,7 @@ abstract class PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter * * @param boolean $pValue * @param string $pDirectory Disk caching directory - * @throws PHPExcel_Writer_Exception Exception when directory does not exist + * @throws PHPExcel_Writer_Exception when directory does not exist * @return PHPExcel_Writer_Excel2007 */ public function setUseDiskCaching($pValue = FALSE, $pDirectory = NULL) { diff --git a/Classes/PHPExcel/Writer/Excel5.php b/Classes/PHPExcel/Writer/Excel5.php index 2b5f8a30..459653c6 100644 --- a/Classes/PHPExcel/Writer/Excel5.php +++ b/Classes/PHPExcel/Writer/Excel5.php @@ -234,7 +234,7 @@ class PHPExcel_Writer_Excel5 extends PHPExcel_Writer_Abstract implements PHPExce * * @deprecated * @param string $pValue Temporary storage directory - * @throws PHPExcel_Writer_Exception Exception when directory does not exist + * @throws PHPExcel_Writer_Exception when directory does not exist * @return PHPExcel_Writer_Excel5 */ public function setTempDir($pValue = '') { diff --git a/Classes/PHPExcel/Writer/Excel5/Workbook.php b/Classes/PHPExcel/Writer/Excel5/Workbook.php index dfd1011f..b50fa0ff 100644 --- a/Classes/PHPExcel/Writer/Excel5/Workbook.php +++ b/Classes/PHPExcel/Writer/Excel5/Workbook.php @@ -688,7 +688,7 @@ class PHPExcel_Writer_Excel5_Workbook extends PHPExcel_Writer_Excel5_BIFFwriter } $chunk .= $this->writeData($this->_writeDefinedNameBiff8($namedRange->getName(), $formulaData, $scope, false)); - } catch(Exception $e) { + } catch(PHPExcel_Exception $e) { // do nothing } } diff --git a/Classes/PHPExcel/Writer/Excel5/Worksheet.php b/Classes/PHPExcel/Writer/Excel5/Worksheet.php index 4e7beed3..ff675b4c 100644 --- a/Classes/PHPExcel/Writer/Excel5/Worksheet.php +++ b/Classes/PHPExcel/Writer/Excel5/Worksheet.php @@ -478,19 +478,19 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter // Write WINDOW2 record $this->_writeWindow2(); - - // Write PLV record + + // Write PLV record $this->_writePageLayoutView(); - + // Write ZOOM record $this->_writeZoom(); if ($_phpSheet->getFreezePane()) { $this->_writePanes(); } - + // Write SELECTION record $this->_writeSelection(); - + // Write MergedCellsTable Record $this->_writeMergedCells(); @@ -518,11 +518,11 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter $this->_writeDataValidity(); $this->_writeSheetLayout(); - + // Write SHEETPROTECTION record $this->_writeSheetProtection(); $this->_writeRangeProtection(); - + $arrConditionalStyles = $_phpSheet->getConditionalStylesCollection(); if(!empty($arrConditionalStyles)){ $arrConditional = array(); @@ -543,7 +543,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter } } } - + $this->_storeEof(); } @@ -934,7 +934,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter return 0; - } catch (Exception $e) { + } catch (PHPExcel_Exception $e) { // do nothing } @@ -2931,7 +2931,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter $formula1 = $this->_parser->toReversePolish(); $sz1 = strlen($formula1); - } catch(PHPExcel_Writer_Exception $e) { + } catch(PHPExcel_Exception $e) { $sz1 = 0; $formula1 = ''; } @@ -2948,7 +2948,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter $formula2 = $this->_parser->toReversePolish(); $sz2 = strlen($formula2); - } catch(PHPExcel_Writer_Exception $e) { + } catch(PHPExcel_Exception $e) { $sz2 = 0; $formula2 = ''; } @@ -3016,14 +3016,14 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter $data = pack("vvVVvv", $rt, $grbitFrt, 0x00000000, 0x00000000, $wScalvePLV, $grbit); $this->_append($header . $data); } - + /** * Write CFRule Record * @param PHPExcel_Style_Conditional $conditional */ private function _writeCFRule(PHPExcel_Style_Conditional $conditional){ $record = 0x01B1; // Record identifier - + // $type : Type of the CF // $operatorType : Comparison operator if($conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_EXPRESSION){ @@ -3031,7 +3031,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter $operatorType = 0x00; } else if($conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_CELLIS){ $type = 0x01; - + switch ($conditional->getOperatorType()){ case PHPExcel_Style_Conditional::OPERATOR_NONE: $operatorType = 0x00; @@ -3060,7 +3060,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter // not OPERATOR_NOTBETWEEN 0x02 } } - + // $szValue1 : size of the formula data for first value or formula // $szValue2 : size of the formula data for second value or formula $arrConditions = $conditional->getConditions(); @@ -3074,14 +3074,14 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter $szValue1 = ($arrConditions[0] <= 65535 ? 3 : 0x0000); $szValue2 = ($arrConditions[1] <= 65535 ? 3 : 0x0000); $operand1 = pack('Cv', 0x1E, $arrConditions[0]); - $operand2 = pack('Cv', 0x1E, $arrConditions[1]); + $operand2 = pack('Cv', 0x1E, $arrConditions[1]); } else { $szValue1 = 0x0000; $szValue2 = 0x0000; $operand1 = null; $operand2 = null; } - + // $flags : Option flags // Alignment $bAlignHz = ($conditional->getStyle()->getAlignment()->getHorizontal() == null ? 1 : 0); @@ -3169,7 +3169,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter $flags |= (1 == 1 ? 0x00380000 : 0); // Font $flags |= (1 == $bFormatFont ? 0x04000000 : 0); - // Alignment : + // Alignment : $flags |= (1 == $bFormatAlign ? 0x08000000 : 0); // Border $flags |= (1 == $bFormatBorder ? 0x10000000 : 0); @@ -3179,7 +3179,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter $flags |= (1 == $bFormatProt ? 0x40000000 : 0); // Text direction $flags |= (1 == 0 ? 0x80000000 : 0); - + // Data Blocks if($bFormatFont == 1){ // Font Name @@ -3258,7 +3258,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter case '800080': $colorIdx = 0x24; break; case '800000': $colorIdx = 0x25; break; case '008080': $colorIdx = 0x26; break; - case '0000FF': $colorIdx = 0x27; break; + case '0000FF': $colorIdx = 0x27; break; case '00CCFF': $colorIdx = 0x28; break; case 'CCFFFF': $colorIdx = 0x29; break; case 'CCFFCC': $colorIdx = 0x2A; break; @@ -3333,10 +3333,10 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter case PHPExcel_Style_Alignment::VERTICAL_JUSTIFY : $blockAlign = 3 << 4; break; } $blockAlign |= 0 << 7; - + // Text rotation angle - $blockRotation = $conditional->getStyle()->getAlignment()->getTextRotation(); - + $blockRotation = $conditional->getStyle()->getAlignment()->getTextRotation(); + // Indentation $blockIndent = $conditional->getStyle()->getAlignment()->getIndent(); if($conditional->getStyle()->getAlignment()->getShrinkToFit() == true){ @@ -3345,10 +3345,10 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter $blockIndent |= 0 << 4; } $blockIndent |= 0 << 6; - + // Relative indentation $blockIndentRelative = 255; - + $dataBlockAlign = pack('CCvvv', $blockAlign, $blockRotation, $blockIndent, $blockIndentRelative, 0x0000); } if($bFormatBorder == 1){ @@ -3602,7 +3602,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter $dataBlockProtection = 1 << 1; } } - + $data = pack('CCvvVv', $type, $operatorType, $szValue1, $szValue2, $flags, 0x0000); if($bFormatFont == 1){ // Block Formatting : OK $data .= $dataBlockFont; @@ -3635,7 +3635,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter private function _writeCFHeader(){ $record = 0x01B0; // Record identifier $length = 0x0016; // Bytes to follow - + $numColumnMin = null; $numColumnMax = null; $numRowMin = null; @@ -3668,9 +3668,9 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter } } } - $needRedraw = 1; + $needRedraw = 1; $cellRange = pack('vvvv', $numRowMin-1, $numRowMax-1, $numColumnMin-1, $numColumnMax-1); - + $header = pack('vv', $record, $length); $data = pack('vv', count($arrConditional), $needRedraw); $data .= $cellRange; diff --git a/Classes/PHPExcel/Writer/Exception.php b/Classes/PHPExcel/Writer/Exception.php index 3cc055cf..70c8418a 100644 --- a/Classes/PHPExcel/Writer/Exception.php +++ b/Classes/PHPExcel/Writer/Exception.php @@ -33,7 +33,7 @@ * @package PHPExcel_Writer * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) */ -class PHPExcel_Writer_Exception extends Exception { +class PHPExcel_Writer_Exception extends PHPExcel_Exception { /** * Error handler callback * diff --git a/Classes/PHPExcel/Writer/PDF.php b/Classes/PHPExcel/Writer/PDF.php index e2c9112b..cacd9c73 100644 --- a/Classes/PHPExcel/Writer/PDF.php +++ b/Classes/PHPExcel/Writer/PDF.php @@ -42,7 +42,7 @@ class PHPExcel_Writer_PDF * Instantiate a new renderer of the configured type within this container class * * @param PHPExcel $phpExcel PHPExcel object - * @throws PHPExcel_Writer_Exception Exception when PDF library is not configured + * @throws PHPExcel_Writer_Exception when PDF library is not configured */ public function __construct(PHPExcel $phpExcel) { diff --git a/Classes/PHPExcel/Writer/PDF/Core.php b/Classes/PHPExcel/Writer/PDF/Core.php index 7c700b77..8669333e 100644 --- a/Classes/PHPExcel/Writer/PDF/Core.php +++ b/Classes/PHPExcel/Writer/PDF/Core.php @@ -306,7 +306,7 @@ abstract class PHPExcel_Writer_PDF_Core extends PHPExcel_Writer_HTML * Set temporary storage directory * * @param string $pValue Temporary storage directory - * @throws PHPExcel_Writer_Exception Exception when directory does not exist + * @throws PHPExcel_Writer_Exception when directory does not exist * @return PHPExcel_Writer_PDF */ public function setTempDir($pValue = '') diff --git a/Documentation/PHPExcel User Documentation - Reading Spreadsheet Files.doc b/Documentation/PHPExcel User Documentation - Reading Spreadsheet Files.doc index 221f44ba..810937e7 100644 Binary files a/Documentation/PHPExcel User Documentation - Reading Spreadsheet Files.doc and b/Documentation/PHPExcel User Documentation - Reading Spreadsheet Files.doc differ diff --git a/changelog.txt b/changelog.txt index bb892fdd..1a1bdb30 100644 --- a/changelog.txt +++ b/changelog.txt @@ -38,7 +38,8 @@ Fixed in develop branch: - General: (amironov ) Work item GH-84 - Search style by identity in PHPExcel_Worksheet::duplicateStyle() - General: (karak) Work item GH-85 - Fill SheetView IO in Excel5 - General: (cfhay) Work item 18958 - Memory and Speed improvements in PHPExcel_Reader_Excel5 -- General: (MBaker) Modify listWorksheetNames() and listWorksheetInfo to use XMLReader with streamed XML rather than SimpleXML +- General: (MBaker) Work item GH-78 - Modify listWorksheetNames() and listWorksheetInfo to use XMLReader with streamed XML rather than SimpleXML +- General: (dbonsch) Restructuring of PHPExcel Exceptions - 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