Update library PHPExcel to version 1.7.4
This commit is contained in:
@@ -7,6 +7,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
|||||||
|
|
||||||
3.3.8.0 (not yet released)
|
3.3.8.0 (not yet released)
|
||||||
- bug #3059311 [import] BIGINT field type added to table analysis
|
- bug #3059311 [import] BIGINT field type added to table analysis
|
||||||
|
- [core] Update library PHPExcel to version 1.7.4
|
||||||
|
|
||||||
3.3.7.0 (2010-09-07)
|
3.3.7.0 (2010-09-07)
|
||||||
- patch #3050492 [PDF scratchboard] Cannot drag table box to the edge after
|
- patch #3050492 [PDF scratchboard] Cannot drag table box to the edge after
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel
|
* @package PHPExcel
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -434,7 +434,7 @@ class PHPExcel
|
|||||||
|
|
||||||
// update the cellXfs
|
// update the cellXfs
|
||||||
foreach ($pSheet->getCellCollection(false) as $cellID) {
|
foreach ($pSheet->getCellCollection(false) as $cellID) {
|
||||||
$cell = $sheet->getCell($cellID);
|
$cell = $pSheet->getCell($cellID);
|
||||||
$cell->setXfIndex( $cell->getXfIndex() + $countCellXfs );
|
$cell->setXfIndex( $cell->getXfIndex() + $countCellXfs );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel
|
* @package PHPExcel
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class PHPExcel_Autoloader
|
class PHPExcel_Autoloader
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_CachedObjectStorage
|
* @package PHPExcel_CachedObjectStorage
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach
|
|||||||
|
|
||||||
if (!apc_store($this->_cachePrefix.$this->_currentObjectID.'.cache',serialize($this->_currentObject),$this->_cacheTime)) {
|
if (!apc_store($this->_cachePrefix.$this->_currentObjectID.'.cache',serialize($this->_currentObject),$this->_cacheTime)) {
|
||||||
$this->__destruct();
|
$this->__destruct();
|
||||||
throw new Exception('Failed to store cell in APC');
|
throw new Exception('Failed to store cell '.$cellID.' in APC');
|
||||||
}
|
}
|
||||||
$this->_currentObjectID = $this->_currentObject = null;
|
$this->_currentObjectID = $this->_currentObject = null;
|
||||||
} // function _storeData()
|
} // function _storeData()
|
||||||
@@ -90,7 +90,7 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach
|
|||||||
if ($success === false) {
|
if ($success === false) {
|
||||||
// Entry no longer exists in APC, so clear it from the cache array
|
// Entry no longer exists in APC, so clear it from the cache array
|
||||||
parent::deleteCacheData($pCoord);
|
parent::deleteCacheData($pCoord);
|
||||||
throw new Exception('Cell entry no longer exists in APC');
|
throw new Exception('Cell entry '.$cellID.' no longer exists in APC');
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -117,7 +117,7 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach
|
|||||||
if ($obj === false) {
|
if ($obj === false) {
|
||||||
// Entry no longer exists in APC, so clear it from the cache array
|
// Entry no longer exists in APC, so clear it from the cache array
|
||||||
parent::deleteCacheData($pCoord);
|
parent::deleteCacheData($pCoord);
|
||||||
throw new Exception('Cell entry no longer exists in APC');
|
throw new Exception('Cell entry '.$cellID.' no longer exists in APC');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Return null if requested entry doesn't exist in cache
|
// Return null if requested entry doesn't exist in cache
|
||||||
@@ -150,6 +150,35 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach
|
|||||||
} // function deleteCacheData()
|
} // function deleteCacheData()
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clone the cell collection
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function copyCellCollection(PHPExcel_Worksheet $parent) {
|
||||||
|
parent::copyCellCollection($parent);
|
||||||
|
// Get a new id for the new file name
|
||||||
|
$baseUnique = $this->_getUniqueID();
|
||||||
|
$newCachePrefix = substr(md5($baseUnique),0,8).'.';
|
||||||
|
$cacheList = $this->getCellList();
|
||||||
|
foreach($cacheList as $cellID) {
|
||||||
|
if ($cellID != $this->_currentObjectID) {
|
||||||
|
$obj = apc_fetch($this->_cachePrefix.$cellID.'.cache');
|
||||||
|
if ($obj === false) {
|
||||||
|
// Entry no longer exists in APC, so clear it from the cache array
|
||||||
|
parent::deleteCacheData($cellID);
|
||||||
|
throw new Exception('Cell entry '.$cellID.' no longer exists in APC');
|
||||||
|
}
|
||||||
|
if (!apc_store($newCachePrefix.$cellID.'.cache',$obj,$this->_cacheTime)) {
|
||||||
|
$this->__destruct();
|
||||||
|
throw new Exception('Failed to store cell '.$cellID.' in APC');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->_cachePrefix = $newCachePrefix;
|
||||||
|
} // function copyCellCollection()
|
||||||
|
|
||||||
|
|
||||||
public function unsetWorksheetCells() {
|
public function unsetWorksheetCells() {
|
||||||
if(!is_null($this->_currentObject)) {
|
if(!is_null($this->_currentObject)) {
|
||||||
$this->_currentObject->detach();
|
$this->_currentObject->detach();
|
||||||
@@ -170,12 +199,8 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach
|
|||||||
$cacheTime = (isset($arguments['cacheTime'])) ? $arguments['cacheTime'] : 600;
|
$cacheTime = (isset($arguments['cacheTime'])) ? $arguments['cacheTime'] : 600;
|
||||||
|
|
||||||
if (is_null($this->_cachePrefix)) {
|
if (is_null($this->_cachePrefix)) {
|
||||||
if (function_exists('posix_getpid')) {
|
$baseUnique = $this->_getUniqueID();
|
||||||
$baseUnique = posix_getpid();
|
$this->_cachePrefix = substr(md5($baseUnique),0,8).'.';
|
||||||
} else {
|
|
||||||
$baseUnique = mt_rand();
|
|
||||||
}
|
|
||||||
$this->_cachePrefix = substr(md5(uniqid($baseUnique,true)),0,8).'.';
|
|
||||||
$this->_cacheTime = $cacheTime;
|
$this->_cacheTime = $cacheTime;
|
||||||
|
|
||||||
parent::__construct($parent);
|
parent::__construct($parent);
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_CachedObjectStorage
|
* @package PHPExcel_CachedObjectStorage
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ class PHPExcel_CachedObjectStorage_CacheBase {
|
|||||||
$this->_currentObjectID = $this->_currentObject = null;
|
$this->_currentObjectID = $this->_currentObject = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->_cellCache[$pCoord])) {
|
if (is_object($this->_cellCache[$pCoord])) {
|
||||||
$this->_cellCache[$pCoord]->detach();
|
$this->_cellCache[$pCoord]->detach();
|
||||||
unset($this->_cellCache[$pCoord]);
|
unset($this->_cellCache[$pCoord]);
|
||||||
}
|
}
|
||||||
@@ -141,13 +141,34 @@ class PHPExcel_CachedObjectStorage_CacheBase {
|
|||||||
public function getSortedCellList() {
|
public function getSortedCellList() {
|
||||||
$sortKeys = array();
|
$sortKeys = array();
|
||||||
foreach ($this->_cellCache as $coord => $value) {
|
foreach ($this->_cellCache as $coord => $value) {
|
||||||
preg_match('/^(\w+)(\d+)$/U',$coord,$matches);
|
list($colNum,$rowNum) = sscanf($coord,'%[A-Z]%d');
|
||||||
list(,$colNum,$rowNum) = $matches;
|
$sortKeys[sprintf('%09d%3s',$rowNum,$colNum)] = $coord;
|
||||||
$sortKeys[$coord] = str_pad($rowNum . str_pad($colNum,3,'@',STR_PAD_LEFT),12,'0',STR_PAD_LEFT);
|
|
||||||
}
|
}
|
||||||
asort($sortKeys);
|
ksort($sortKeys);
|
||||||
|
|
||||||
return array_keys($sortKeys);
|
return array_values($sortKeys);
|
||||||
} // function sortCellList()
|
} // function sortCellList()
|
||||||
|
|
||||||
|
|
||||||
|
protected function _getUniqueID() {
|
||||||
|
if (function_exists('posix_getpid')) {
|
||||||
|
$baseUnique = posix_getpid();
|
||||||
|
} else {
|
||||||
|
$baseUnique = mt_rand();
|
||||||
|
}
|
||||||
|
return uniqid($baseUnique,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clone the cell collection
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function copyCellCollection(PHPExcel_Worksheet $parent) {
|
||||||
|
$this->_parent = $parent;
|
||||||
|
if ((!is_null($this->_currentObject)) && (is_object($this->_currentObject))) {
|
||||||
|
$this->_currentObject->attach($parent);
|
||||||
|
}
|
||||||
|
} // function copyCellCollection()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_CachedObjectStorage
|
* @package PHPExcel_CachedObjectStorage
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -103,6 +103,24 @@ class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage
|
|||||||
} // function getCacheData()
|
} // function getCacheData()
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clone the cell collection
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function copyCellCollection(PHPExcel_Worksheet $parent) {
|
||||||
|
parent::copyCellCollection($parent);
|
||||||
|
// Get a new id for the new file name
|
||||||
|
$baseUnique = $this->_getUniqueID();
|
||||||
|
$newFileName = sys_get_temp_dir().'/PHPExcel.'.$baseUnique.'.cache';
|
||||||
|
// Copy the existing cell cache file
|
||||||
|
copy ($this->_fileName,$newFileName);
|
||||||
|
$this->_fileName = $newFileName;
|
||||||
|
// Open the copied cell cache file
|
||||||
|
$this->_fileHandle = fopen($this->_fileName,'a+');
|
||||||
|
} // function copyCellCollection()
|
||||||
|
|
||||||
|
|
||||||
public function unsetWorksheetCells() {
|
public function unsetWorksheetCells() {
|
||||||
if(!is_null($this->_currentObject)) {
|
if(!is_null($this->_currentObject)) {
|
||||||
$this->_currentObject->detach();
|
$this->_currentObject->detach();
|
||||||
@@ -121,12 +139,8 @@ class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage
|
|||||||
public function __construct(PHPExcel_Worksheet $parent) {
|
public function __construct(PHPExcel_Worksheet $parent) {
|
||||||
parent::__construct($parent);
|
parent::__construct($parent);
|
||||||
if (is_null($this->_fileHandle)) {
|
if (is_null($this->_fileHandle)) {
|
||||||
if (function_exists('posix_getpid')) {
|
$baseUnique = $this->_getUniqueID();
|
||||||
$baseUnique = posix_getpid();
|
$this->_fileName = sys_get_temp_dir().'/PHPExcel.'.$baseUnique.'.cache';
|
||||||
} else {
|
|
||||||
$baseUnique = mt_rand();
|
|
||||||
}
|
|
||||||
$this->_fileName = sys_get_temp_dir().'/PHPExcel.'.uniqid($baseUnique,true).'.cache';
|
|
||||||
$this->_fileHandle = fopen($this->_fileName,'a+');
|
$this->_fileHandle = fopen($this->_fileName,'a+');
|
||||||
}
|
}
|
||||||
} // function __construct()
|
} // function __construct()
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_CachedObjectStorage
|
* @package PHPExcel_CachedObjectStorage
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -94,4 +94,11 @@ interface PHPExcel_CachedObjectStorage_ICache
|
|||||||
*/
|
*/
|
||||||
public function getSortedCellList();
|
public function getSortedCellList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clone the cell collection
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function copyCellCollection(PHPExcel_Worksheet $parent);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_CachedObjectStorage
|
* @package PHPExcel_CachedObjectStorage
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage
|
|||||||
if (!$this->_memcache->replace($this->_cachePrefix.$this->_currentObjectID.'.cache',$obj,NULL,$this->_cacheTime)) {
|
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)) {
|
if (!$this->_memcache->add($this->_cachePrefix.$this->_currentObjectID.'.cache',$obj,NULL,$this->_cacheTime)) {
|
||||||
$this->__destruct();
|
$this->__destruct();
|
||||||
throw new Exception('Failed to store cell in Memcache');
|
throw new Exception('Failed to store cell '.$cellID.' in MemCache');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->_currentObjectID = $this->_currentObject = null;
|
$this->_currentObjectID = $this->_currentObject = null;
|
||||||
@@ -90,12 +90,12 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage
|
|||||||
if ($this->_currentObjectID == $pCoord) {
|
if ($this->_currentObjectID == $pCoord) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Check if the requested entry still exists in apc
|
// Check if the requested entry still exists in Memcache
|
||||||
$success = $this->_memcache->get($this->_cachePrefix.$pCoord.'.cache');
|
$success = $this->_memcache->get($this->_cachePrefix.$pCoord.'.cache');
|
||||||
if ($success === false) {
|
if ($success === false) {
|
||||||
// Entry no longer exists in Memcache, so clear it from the cache array
|
// Entry no longer exists in Memcache, so clear it from the cache array
|
||||||
parent::deleteCacheData($pCoord);
|
parent::deleteCacheData($pCoord);
|
||||||
throw new Exception('Cell entry no longer exists in Memcache');
|
throw new Exception('Cell entry '.$cellID.' no longer exists in MemCache');
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -122,7 +122,7 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage
|
|||||||
if ($obj === false) {
|
if ($obj === false) {
|
||||||
// Entry no longer exists in Memcache, so clear it from the cache array
|
// Entry no longer exists in Memcache, so clear it from the cache array
|
||||||
parent::deleteCacheData($pCoord);
|
parent::deleteCacheData($pCoord);
|
||||||
throw new Exception('Cell entry no longer exists in Memcache');
|
throw new Exception('Cell entry '.$cellID.' no longer exists in MemCache');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Return null if requested entry doesn't exist in cache
|
// Return null if requested entry doesn't exist in cache
|
||||||
@@ -155,6 +155,35 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage
|
|||||||
} // function deleteCacheData()
|
} // function deleteCacheData()
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clone the cell collection
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function copyCellCollection(PHPExcel_Worksheet $parent) {
|
||||||
|
parent::copyCellCollection($parent);
|
||||||
|
// Get a new id for the new file name
|
||||||
|
$baseUnique = $this->_getUniqueID();
|
||||||
|
$newCachePrefix = substr(md5($baseUnique),0,8).'.';
|
||||||
|
$cacheList = $this->getCellList();
|
||||||
|
foreach($cacheList as $cellID) {
|
||||||
|
if ($cellID != $this->_currentObjectID) {
|
||||||
|
$obj = $this->_memcache->get($this->_cachePrefix.$cellID.'.cache');
|
||||||
|
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');
|
||||||
|
}
|
||||||
|
if (!$this->_memcache->add($newCachePrefix.$cellID.'.cache',$obj,NULL,$this->_cacheTime)) {
|
||||||
|
$this->__destruct();
|
||||||
|
throw new Exception('Failed to store cell '.$cellID.' in MemCache');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->_cachePrefix = $newCachePrefix;
|
||||||
|
} // function copyCellCollection()
|
||||||
|
|
||||||
|
|
||||||
public function unsetWorksheetCells() {
|
public function unsetWorksheetCells() {
|
||||||
if(!is_null($this->_currentObject)) {
|
if(!is_null($this->_currentObject)) {
|
||||||
$this->_currentObject->detach();
|
$this->_currentObject->detach();
|
||||||
@@ -177,17 +206,13 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage
|
|||||||
$cacheTime = (isset($arguments['cacheTime'])) ? $arguments['cacheTime'] : 600;
|
$cacheTime = (isset($arguments['cacheTime'])) ? $arguments['cacheTime'] : 600;
|
||||||
|
|
||||||
if (is_null($this->_cachePrefix)) {
|
if (is_null($this->_cachePrefix)) {
|
||||||
if (function_exists('posix_getpid')) {
|
$baseUnique = $this->_getUniqueID();
|
||||||
$baseUnique = posix_getpid();
|
$this->_cachePrefix = substr(md5($baseUnique),0,8).'.';
|
||||||
} else {
|
|
||||||
$baseUnique = mt_rand();
|
|
||||||
}
|
|
||||||
$this->_cachePrefix = substr(md5(uniqid($baseUnique,true)),0,8).'.';
|
|
||||||
|
|
||||||
// Set a new Memcache object and connect to the Memcache server
|
// Set a new Memcache object and connect to the Memcache server
|
||||||
$this->_memcache = new Memcache();
|
$this->_memcache = new Memcache();
|
||||||
if (!$this->_memcache->addServer($memcacheServer, $memcachePort, false, 50, 5, 5, true, array($this, 'failureCallback')) {
|
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 Exception('Could not connect to MemCache server at '.$memcacheServer.':'.$memcachePort);
|
||||||
}
|
}
|
||||||
$this->_cacheTime = $cacheTime;
|
$this->_cacheTime = $cacheTime;
|
||||||
|
|
||||||
@@ -197,7 +222,7 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage
|
|||||||
|
|
||||||
|
|
||||||
public function failureCallback($host, $port) {
|
public function failureCallback($host, $port) {
|
||||||
throw new Exception('memcache '.$host.':'.$port' failed');
|
throw new Exception('memcache '.$host.':'.$port.' failed');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_CachedObjectStorage
|
* @package PHPExcel_CachedObjectStorage
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_CachedObjectStorage
|
* @package PHPExcel_CachedObjectStorage
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_CachedObjectStorage
|
* @package PHPExcel_CachedObjectStorage
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_CachedObjectStorage
|
* @package PHPExcel_CachedObjectStorage
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -38,6 +38,8 @@ class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_
|
|||||||
private $_fileHandle = null;
|
private $_fileHandle = null;
|
||||||
|
|
||||||
|
|
||||||
|
private $_memoryCacheSize = null;
|
||||||
|
|
||||||
private function _storeData() {
|
private function _storeData() {
|
||||||
$this->_currentObject->detach();
|
$this->_currentObject->detach();
|
||||||
|
|
||||||
@@ -102,6 +104,24 @@ class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_
|
|||||||
} // function getCacheData()
|
} // function getCacheData()
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clone the cell collection
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function copyCellCollection(PHPExcel_Worksheet $parent) {
|
||||||
|
parent::copyCellCollection($parent);
|
||||||
|
// Open a new stream for the cell cache data
|
||||||
|
$newFileHandle = fopen('php://temp/maxmemory:'.$this->_memoryCacheSize,'a+');
|
||||||
|
// Copy the existing cell cache data to the new stream
|
||||||
|
fseek($this->_fileHandle,0);
|
||||||
|
while (!feof($this->_fileHandle)) {
|
||||||
|
fwrite($newFileHandle,fread($this->_fileHandle, 1024));
|
||||||
|
}
|
||||||
|
$this->_fileHandle = $newFileHandle;
|
||||||
|
} // function copyCellCollection()
|
||||||
|
|
||||||
|
|
||||||
public function unsetWorksheetCells() {
|
public function unsetWorksheetCells() {
|
||||||
if(!is_null($this->_currentObject)) {
|
if(!is_null($this->_currentObject)) {
|
||||||
$this->_currentObject->detach();
|
$this->_currentObject->detach();
|
||||||
@@ -118,11 +138,11 @@ class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_
|
|||||||
|
|
||||||
|
|
||||||
public function __construct(PHPExcel_Worksheet $parent, $memoryCacheSize = '1MB') {
|
public function __construct(PHPExcel_Worksheet $parent, $memoryCacheSize = '1MB') {
|
||||||
$memoryCacheSize = (isset($arguments['memoryCacheSize'])) ? $arguments['memoryCacheSize'] : '1MB';
|
$this->_memoryCacheSize = (isset($arguments['memoryCacheSize'])) ? $arguments['memoryCacheSize'] : '1MB';
|
||||||
|
|
||||||
parent::__construct($parent);
|
parent::__construct($parent);
|
||||||
if (is_null($this->_fileHandle)) {
|
if (is_null($this->_fileHandle)) {
|
||||||
$this->_fileHandle = fopen('php://temp/maxmemory:'.$memoryCacheSize,'a+');
|
$this->_fileHandle = fopen('php://temp/maxmemory:'.$this->_memoryCacheSize,'a+');
|
||||||
}
|
}
|
||||||
} // function __construct()
|
} // function __construct()
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_CachedObjectStorage
|
* @package PHPExcel_CachedObjectStorage
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -45,9 +45,15 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage
|
|||||||
|
|
||||||
$obj = serialize($this->_currentObject);
|
$obj = serialize($this->_currentObject);
|
||||||
if (wincache_ucache_exists($this->_cachePrefix.$this->_currentObjectID.'.cache')) {
|
if (wincache_ucache_exists($this->_cachePrefix.$this->_currentObjectID.'.cache')) {
|
||||||
wincache_ucache_set($this->_cachePrefix.$this->_currentObjectID.'.cache', $obj, $this->_cacheTime);
|
if (!wincache_ucache_set($this->_cachePrefix.$this->_currentObjectID.'.cache', $obj, $this->_cacheTime)) {
|
||||||
|
$this->__destruct();
|
||||||
|
throw new Exception('Failed to store cell '.$cellID.' in WinCache');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
wincache_ucache_add($this->_cachePrefix.$this->_currentObjectID.'.cache', $obj, $this->_cacheTime);
|
if (!wincache_ucache_add($this->_cachePrefix.$this->_currentObjectID.'.cache', $obj, $this->_cacheTime)) {
|
||||||
|
$this->__destruct();
|
||||||
|
throw new Exception('Failed to store cell '.$cellID.' in WinCache');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_currentObjectID = $this->_currentObject = null;
|
$this->_currentObjectID = $this->_currentObject = null;
|
||||||
@@ -93,7 +99,7 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage
|
|||||||
if ($success === false) {
|
if ($success === false) {
|
||||||
// Entry no longer exists in Wincache, so clear it from the cache array
|
// Entry no longer exists in Wincache, so clear it from the cache array
|
||||||
parent::deleteCacheData($pCoord);
|
parent::deleteCacheData($pCoord);
|
||||||
throw new Exception('Cell entry no longer exists in Wincache');
|
throw new Exception('Cell entry '.$cellID.' no longer exists in WinCache');
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -120,9 +126,9 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage
|
|||||||
$success = false;
|
$success = false;
|
||||||
$obj = wincache_ucache_get($this->_cachePrefix.$pCoord.'.cache', $success);
|
$obj = wincache_ucache_get($this->_cachePrefix.$pCoord.'.cache', $success);
|
||||||
if ($success === false) {
|
if ($success === false) {
|
||||||
// Entry no longer exists in Wincache, so clear it from the cache array
|
// Entry no longer exists in WinCache, so clear it from the cache array
|
||||||
parent::deleteCacheData($pCoord);
|
parent::deleteCacheData($pCoord);
|
||||||
throw new Exception('Cell entry no longer exists in Wincache');
|
throw new Exception('Cell entry '.$cellID.' no longer exists in WinCache');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Return null if requested entry doesn't exist in cache
|
// Return null if requested entry doesn't exist in cache
|
||||||
@@ -155,13 +161,43 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage
|
|||||||
} // function deleteCacheData()
|
} // function deleteCacheData()
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clone the cell collection
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function copyCellCollection(PHPExcel_Worksheet $parent) {
|
||||||
|
parent::copyCellCollection($parent);
|
||||||
|
// Get a new id for the new file name
|
||||||
|
$baseUnique = $this->_getUniqueID();
|
||||||
|
$newCachePrefix = substr(md5($baseUnique),0,8).'.';
|
||||||
|
$cacheList = $this->getCellList();
|
||||||
|
foreach($cacheList as $cellID) {
|
||||||
|
if ($cellID != $this->_currentObjectID) {
|
||||||
|
$success = false;
|
||||||
|
$obj = wincache_ucache_get($this->_cachePrefix.$cellID.'.cache', $success);
|
||||||
|
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');
|
||||||
|
}
|
||||||
|
if (!wincache_ucache_add($newCachePrefix.$cellID.'.cache', $obj, $this->_cacheTime)) {
|
||||||
|
$this->__destruct();
|
||||||
|
throw new Exception('Failed to store cell '.$cellID.' in Wincache');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->_cachePrefix = $newCachePrefix;
|
||||||
|
} // function copyCellCollection()
|
||||||
|
|
||||||
|
|
||||||
public function unsetWorksheetCells() {
|
public function unsetWorksheetCells() {
|
||||||
if(!is_null($this->_currentObject)) {
|
if(!is_null($this->_currentObject)) {
|
||||||
$this->_currentObject->detach();
|
$this->_currentObject->detach();
|
||||||
$this->_currentObject = $this->_currentObjectID = null;
|
$this->_currentObject = $this->_currentObjectID = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flush the Wincache cache
|
// Flush the WinCache cache
|
||||||
$this->__destruct();
|
$this->__destruct();
|
||||||
|
|
||||||
$this->_cellCache = array();
|
$this->_cellCache = array();
|
||||||
@@ -175,12 +211,8 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage
|
|||||||
$cacheTime = (isset($arguments['cacheTime'])) ? $arguments['cacheTime'] : 600;
|
$cacheTime = (isset($arguments['cacheTime'])) ? $arguments['cacheTime'] : 600;
|
||||||
|
|
||||||
if (is_null($this->_cachePrefix)) {
|
if (is_null($this->_cachePrefix)) {
|
||||||
if (function_exists('posix_getpid')) {
|
$baseUnique = $this->_getUniqueID();
|
||||||
$baseUnique = posix_getpid();
|
$this->_cachePrefix = substr(md5($baseUnique),0,8).'.';
|
||||||
} else {
|
|
||||||
$baseUnique = mt_rand();
|
|
||||||
}
|
|
||||||
$this->_cachePrefix = substr(md5(uniqid($baseUnique,true)),0,8).'.';
|
|
||||||
$this->_cacheTime = $cacheTime;
|
$this->_cacheTime = $cacheTime;
|
||||||
|
|
||||||
parent::__construct($parent);
|
parent::__construct($parent);
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Calculation
|
* @package PHPExcel_Calculation
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -2248,7 +2248,7 @@ class PHPExcel_Calculation {
|
|||||||
}
|
}
|
||||||
$this->debugLogStack[] = $wsTitle.'!'.$cellID;
|
$this->debugLogStack[] = $wsTitle.'!'.$cellID;
|
||||||
// Parse the formula onto the token stack and calculate the value
|
// Parse the formula onto the token stack and calculate the value
|
||||||
$cellValue = $this->_processTokenStack($this->_parseFormula($formula), $cellID, $pCell);
|
$cellValue = $this->_processTokenStack($this->_parseFormula($formula, $pCell), $cellID, $pCell);
|
||||||
array_pop($this->debugLogStack);
|
array_pop($this->debugLogStack);
|
||||||
|
|
||||||
// Save to calculation cache
|
// Save to calculation cache
|
||||||
@@ -2462,21 +2462,17 @@ class PHPExcel_Calculation {
|
|||||||
$value = array_pop($testArray);
|
$value = array_pop($testArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (gettype($value)) {
|
if (is_null($value)) {
|
||||||
case 'double' :
|
return 'a null value';
|
||||||
case 'float' :
|
} elseif (is_float($value)) {
|
||||||
$typeString = 'a floating point number';
|
$typeString = 'a floating point number';
|
||||||
break;
|
} elseif(is_int($value)) {
|
||||||
case 'integer' :
|
|
||||||
$typeString = 'an integer number';
|
$typeString = 'an integer number';
|
||||||
break;
|
} elseif(is_bool($value)) {
|
||||||
case 'boolean' :
|
|
||||||
$typeString = 'a boolean';
|
$typeString = 'a boolean';
|
||||||
break;
|
} elseif(is_array($value)) {
|
||||||
case 'array' :
|
|
||||||
$typeString = 'a matrix';
|
$typeString = 'a matrix';
|
||||||
break;
|
} else {
|
||||||
case 'string' :
|
|
||||||
if ($value == '') {
|
if ($value == '') {
|
||||||
return 'an empty string';
|
return 'an empty string';
|
||||||
} elseif ($value{0} == '#') {
|
} elseif ($value{0} == '#') {
|
||||||
@@ -2484,9 +2480,6 @@ class PHPExcel_Calculation {
|
|||||||
} else {
|
} else {
|
||||||
$typeString = 'a string';
|
$typeString = 'a string';
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case 'NULL' :
|
|
||||||
return 'a null value';
|
|
||||||
}
|
}
|
||||||
return $typeString.' with a value of '.self::_showValue($value);
|
return $typeString.' with a value of '.self::_showValue($value);
|
||||||
} // function _showTypeDetails()
|
} // function _showTypeDetails()
|
||||||
@@ -2548,11 +2541,15 @@ class PHPExcel_Calculation {
|
|||||||
|
|
||||||
|
|
||||||
// Convert infix to postfix notation
|
// Convert infix to postfix notation
|
||||||
private function _parseFormula($formula) {
|
private function _parseFormula($formula, PHPExcel_Cell $pCell = null) {
|
||||||
if (($formula = self::_convertMatrixReferences(trim($formula))) === false) {
|
if (($formula = self::_convertMatrixReferences(trim($formula))) === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we're using cell caching, then $pCell may well be flushed back to the cache (which detaches the parent worksheet),
|
||||||
|
// so we store the parent worksheet so that we can re-attach it when necessary
|
||||||
|
$pCellParent = (!is_null($pCell)) ? $pCell->getParent() : null;
|
||||||
|
|
||||||
// Binary Operators
|
// Binary Operators
|
||||||
// These operators always work on two values
|
// These operators always work on two values
|
||||||
// Array key is the operator, the value indicates whether this is a left or right associative operator
|
// Array key is the operator, the value indicates whether this is a left or right associative operator
|
||||||
@@ -2774,12 +2771,56 @@ class PHPExcel_Calculation {
|
|||||||
// echo 'Element '.$val.' is a Cell reference<br />';
|
// echo 'Element '.$val.' is a Cell reference<br />';
|
||||||
// Watch for this case-change when modifying to allow cell references in different worksheets...
|
// Watch for this case-change when modifying to allow cell references in different worksheets...
|
||||||
// Should only be applied to the actual cell column, not the worksheet name
|
// Should only be applied to the actual cell column, not the worksheet name
|
||||||
|
|
||||||
|
// If the last entry on the stack was a : operator, then we have a cell range reference
|
||||||
|
$testPrevOp = $stack->last(1);
|
||||||
|
if ($testPrevOp['value'] == ':') {
|
||||||
|
// If we have a worksheet reference, then we're playing with a 3D reference
|
||||||
|
if ($matches[2] == '') {
|
||||||
|
// Otherwise, we 'inherit' the worksheet reference from the start cell reference
|
||||||
|
// The start of the cell range reference should be the last entry in $output
|
||||||
|
$startCellRef = $output[count($output)-1]['value'];
|
||||||
|
preg_match('/^'.self::CALCULATION_REGEXP_CELLREF.'$/i', $startCellRef, $startMatches);
|
||||||
|
if ($startMatches[2] > '') {
|
||||||
|
$val = $startMatches[2].'!'.$val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
$cellRef = strtoupper($val);
|
$cellRef = strtoupper($val);
|
||||||
// $output[] = $cellRef;
|
|
||||||
$output[] = array('type' => 'Cell Reference', 'value' => $val, 'reference' => $cellRef);
|
$output[] = array('type' => 'Cell Reference', 'value' => $val, 'reference' => $cellRef);
|
||||||
// $expectingOperator = false;
|
// $expectingOperator = false;
|
||||||
} else { // it's a variable, constant, string, number or boolean
|
} else { // it's a variable, constant, string, number or boolean
|
||||||
// echo 'Element is a Variable, Constant, String, Number or Boolean<br />';
|
// echo 'Element is a Variable, Constant, String, Number or Boolean<br />';
|
||||||
|
// If the last entry on the stack was a : operator, then we may have a row or column range reference
|
||||||
|
$testPrevOp = $stack->last(1);
|
||||||
|
if ($testPrevOp['value'] == ':') {
|
||||||
|
$startRowColRef = $output[count($output)-1]['value'];
|
||||||
|
$rangeWS1 = '';
|
||||||
|
if (strpos('!',$startRowColRef) !== false) {
|
||||||
|
list($rangeWS1,$startRowColRef) = explode('!',$startRowColRef);
|
||||||
|
}
|
||||||
|
if ($rangeWS1 != '') $rangeWS1 .= '!';
|
||||||
|
$rangeWS2 = $rangeWS1;
|
||||||
|
if (strpos('!',$val) !== false) {
|
||||||
|
list($rangeWS2,$val) = explode('!',$val);
|
||||||
|
}
|
||||||
|
if ($rangeWS2 != '') $rangeWS2 .= '!';
|
||||||
|
if ((is_integer($startRowColRef)) && (ctype_digit($val)) &&
|
||||||
|
($startRowColRef <= 1048576) && ($val <= 1048576)) {
|
||||||
|
// Row range
|
||||||
|
$endRowColRef = (!is_null($pCellParent)) ? $pCellParent->getHighestColumn() : 'XFD'; // Max 16,384 columns for Excel2007
|
||||||
|
$output[count($output)-1]['value'] = $rangeWS1.'A'.$startRowColRef;
|
||||||
|
$val = $rangeWS2.$endRowColRef.$val;
|
||||||
|
} elseif ((ctype_alpha($startRowColRef)) && (ctype_alpha($val)) &&
|
||||||
|
(strlen($startRowColRef) <= 3) && (strlen($val) <= 3)) {
|
||||||
|
// Column range
|
||||||
|
$endRowColRef = (!is_null($pCellParent)) ? $pCellParent->getHighestRow() : 1048576; // Max 1,048,576 rows for Excel2007
|
||||||
|
$output[count($output)-1]['value'] = $rangeWS1.strtoupper($startRowColRef).'1';
|
||||||
|
$val = $rangeWS2.$val.$endRowColRef;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$localeConstant = false;
|
$localeConstant = false;
|
||||||
if ($opCharacter == '"') {
|
if ($opCharacter == '"') {
|
||||||
// echo 'Element is a String<br />';
|
// echo 'Element is a String<br />';
|
||||||
@@ -2808,6 +2849,8 @@ class PHPExcel_Calculation {
|
|||||||
}
|
}
|
||||||
$index += $length;
|
$index += $length;
|
||||||
|
|
||||||
|
} elseif ($opCharacter == '$') { // absolute row or column range
|
||||||
|
$index++;
|
||||||
} elseif ($opCharacter == ')') { // miscellaneous error checking
|
} elseif ($opCharacter == ')') { // miscellaneous error checking
|
||||||
if ($expectingOperand) {
|
if ($expectingOperand) {
|
||||||
$output[] = array('type' => 'Null Value', 'value' => self::$_ExcelConstants['NULL'], 'reference' => NULL);
|
$output[] = array('type' => 'Null Value', 'value' => self::$_ExcelConstants['NULL'], 'reference' => NULL);
|
||||||
@@ -3067,7 +3110,7 @@ class PHPExcel_Calculation {
|
|||||||
return $this->_raiseFormulaError('Unable to access Cell Reference');
|
return $this->_raiseFormulaError('Unable to access Cell Reference');
|
||||||
}
|
}
|
||||||
$this->_writeDebug('Evaluation Result for cells '.$cellRef.' in worksheet '.$matches[2].' is '.self::_showTypeDetails($cellValue));
|
$this->_writeDebug('Evaluation Result for cells '.$cellRef.' in worksheet '.$matches[2].' is '.self::_showTypeDetails($cellValue));
|
||||||
$cellRef = $matches[2].'!'.$cellRef;
|
// $cellRef = $matches[2].'!'.$cellRef;
|
||||||
} else {
|
} else {
|
||||||
// echo '$cellRef='.$cellRef.' in current worksheet<br />';
|
// echo '$cellRef='.$cellRef.' in current worksheet<br />';
|
||||||
$this->_writeDebug('Evaluating Cell Range '.$cellRef.' in current worksheet');
|
$this->_writeDebug('Evaluating Cell Range '.$cellRef.' in current worksheet');
|
||||||
@@ -3101,7 +3144,7 @@ class PHPExcel_Calculation {
|
|||||||
return $this->_raiseFormulaError('Unable to access Cell Reference');
|
return $this->_raiseFormulaError('Unable to access Cell Reference');
|
||||||
}
|
}
|
||||||
$this->_writeDebug('Evaluation Result for cell '.$cellRef.' in worksheet '.$matches[2].' is '.self::_showTypeDetails($cellValue));
|
$this->_writeDebug('Evaluation Result for cell '.$cellRef.' in worksheet '.$matches[2].' is '.self::_showTypeDetails($cellValue));
|
||||||
$cellRef = $matches[2].'!'.$cellRef;
|
// $cellRef = $matches[2].'!'.$cellRef;
|
||||||
} else {
|
} else {
|
||||||
// echo '$cellRef='.$cellRef.' in current worksheet<br />';
|
// echo '$cellRef='.$cellRef.' in current worksheet<br />';
|
||||||
$this->_writeDebug('Evaluating Cell '.$cellRef.' in current worksheet');
|
$this->_writeDebug('Evaluating Cell '.$cellRef.' in current worksheet');
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Calculation
|
* @package PHPExcel_Calculation
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Calculation
|
* @package PHPExcel_Calculation
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Calculation
|
* @package PHPExcel_Calculation
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Calculation
|
* @package PHPExcel_Calculation
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Calculation
|
* @package PHPExcel_Calculation
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Calculation
|
* @package PHPExcel_Calculation
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -1885,7 +1885,7 @@ class PHPExcel_Calculation_Functions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
if (($aCount > 0) && ($returnValue > 0)) {
|
if (($aCount > 0) && ($returnValue >= 0)) {
|
||||||
return sqrt($returnValue / $aCount);
|
return sqrt($returnValue / $aCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1937,7 +1937,7 @@ class PHPExcel_Calculation_Functions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
if (($aCount > 0) && ($returnValue > 0)) {
|
if (($aCount > 0) && ($returnValue >= 0)) {
|
||||||
return sqrt($returnValue / $aCount);
|
return sqrt($returnValue / $aCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1984,7 +1984,7 @@ class PHPExcel_Calculation_Functions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
if (($aCount > 0) && ($returnValue > 0)) {
|
if (($aCount > 0) && ($returnValue >= 0)) {
|
||||||
return sqrt($returnValue / $aCount);
|
return sqrt($returnValue / $aCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2036,7 +2036,7 @@ class PHPExcel_Calculation_Functions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
if (($aCount > 0) && ($returnValue > 0)) {
|
if (($aCount > 0) && ($returnValue >= 0)) {
|
||||||
return sqrt($returnValue / $aCount);
|
return sqrt($returnValue / $aCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5691,7 +5691,7 @@ class PHPExcel_Calculation_Functions {
|
|||||||
* @return string Version information
|
* @return string Version information
|
||||||
*/
|
*/
|
||||||
public static function VERSION() {
|
public static function VERSION() {
|
||||||
return 'PHPExcel 1.7.3c, 2010-06-01';
|
return 'PHPExcel 1.7.4, 2010-08-26';
|
||||||
} // function VERSION()
|
} // function VERSION()
|
||||||
|
|
||||||
|
|
||||||
@@ -11139,112 +11139,101 @@ class PHPExcel_Calculation_Functions {
|
|||||||
* @return integer The relative position of the found item
|
* @return integer The relative position of the found item
|
||||||
*/
|
*/
|
||||||
public static function MATCH($lookup_value, $lookup_array, $match_type=1) {
|
public static function MATCH($lookup_value, $lookup_array, $match_type=1) {
|
||||||
|
|
||||||
// flatten the lookup_array
|
|
||||||
$lookup_array = self::flattenArray($lookup_array);
|
$lookup_array = self::flattenArray($lookup_array);
|
||||||
|
|
||||||
// flatten lookup_value since it may be a cell reference to a value or the value itself
|
|
||||||
$lookup_value = self::flattenSingleValue($lookup_value);
|
$lookup_value = self::flattenSingleValue($lookup_value);
|
||||||
|
$match_type = (is_null($match_type)) ? 1 : (int) self::flattenSingleValue($match_type);
|
||||||
// MATCH is not case sensitive
|
// MATCH is not case sensitive
|
||||||
$lookup_value = strtolower($lookup_value);
|
$lookup_value = strtolower($lookup_value);
|
||||||
|
|
||||||
/*
|
|
||||||
echo "--------------------<br>looking for $lookup_value in <br>";
|
|
||||||
print_r($lookup_array);
|
|
||||||
echo "<br>";
|
|
||||||
//return 1;
|
|
||||||
/**/
|
|
||||||
|
|
||||||
// **
|
|
||||||
// check inputs
|
|
||||||
// **
|
|
||||||
// lookup_value type has to be number, text, or logical values
|
// lookup_value type has to be number, text, or logical values
|
||||||
if (!is_numeric($lookup_value) && !is_string($lookup_value) && !is_bool($lookup_value)){
|
if ((!is_numeric($lookup_value)) && (!is_string($lookup_value)) && (!is_bool($lookup_value))) {
|
||||||
// error: lookup_array should contain only number, text, or logical values
|
|
||||||
//echo "error: lookup_array should contain only number, text, or logical values<br>";
|
|
||||||
return self::$_errorCodes['na'];
|
return self::$_errorCodes['na'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// match_type is 0, 1 or -1
|
// match_type is 0, 1 or -1
|
||||||
if ($match_type!==0 && $match_type!==-1 && $match_type!==1){
|
if (($match_type !== 0) && ($match_type !== -1) && ($match_type !== 1)) {
|
||||||
// error: wrong value for match_type
|
|
||||||
//echo "error: wrong value for match_type<br>";
|
|
||||||
return self::$_errorCodes['na'];
|
return self::$_errorCodes['na'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// lookup_array should not be empty
|
// lookup_array should not be empty
|
||||||
if (sizeof($lookup_array)<=0){
|
$lookupArraySize = count($lookup_array);
|
||||||
// error: empty range
|
if ($lookupArraySize <= 0) {
|
||||||
//echo "error: empty range ".sizeof($lookup_array)."<br>";
|
|
||||||
return self::$_errorCodes['na'];
|
return self::$_errorCodes['na'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// lookup_array should contain only number, text, or logical values
|
// lookup_array should contain only number, text, or logical values, or empty (null) cells
|
||||||
for ($i=0;$i<sizeof($lookup_array);++$i){
|
foreach($lookup_array as $i => $lookupArrayValue) {
|
||||||
// check the type of the value
|
// check the type of the value
|
||||||
if (!is_numeric($lookup_array[$i]) && !is_string($lookup_array[$i]) && !is_bool($lookup_array[$i])){
|
if ((!is_numeric($lookupArrayValue)) && (!is_string($lookupArrayValue)) &&
|
||||||
// error: lookup_array should contain only number, text, or logical values
|
(!is_bool($lookupArrayValue)) && (!is_null($lookupArrayValue))) {
|
||||||
//echo "error: lookup_array should contain only number, text, or logical values<br>";
|
|
||||||
return self::$_errorCodes['na'];
|
return self::$_errorCodes['na'];
|
||||||
}
|
}
|
||||||
// convert tpo lowercase
|
// convert strings to lowercase for case-insensitive testing
|
||||||
if (is_string($lookup_array[$i]))
|
if (is_string($lookupArrayValue)) {
|
||||||
$lookup_array[$i] = strtolower($lookup_array[$i]);
|
$lookup_array[$i] = strtolower($lookupArrayValue);
|
||||||
|
}
|
||||||
|
if ((is_null($lookupArrayValue)) && (($match_type == 1) || ($match_type == -1))) {
|
||||||
|
$lookup_array = array_slice($lookup_array,0,$i-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if match_type is 1 or -1, the list has to be ordered
|
// if match_type is 1 or -1, the list has to be ordered
|
||||||
if($match_type==1 || $match_type==-1){
|
if ($match_type == 1) {
|
||||||
// **
|
asort($lookup_array);
|
||||||
// iniitialization
|
$keySet = array_keys($lookup_array);
|
||||||
// store the last value
|
} elseif($match_type == -1) {
|
||||||
$iLastValue=$lookup_array[0];
|
arsort($lookup_array);
|
||||||
// **
|
$keySet = array_keys($lookup_array);
|
||||||
// loop on the cells
|
|
||||||
for ($i=0;$i<sizeof($lookup_array);++$i){
|
|
||||||
// check ascending order
|
|
||||||
if(($match_type==1 && $lookup_array[$i]<$iLastValue)
|
|
||||||
// OR check descending order
|
|
||||||
|| ($match_type==-1 && $lookup_array[$i]>$iLastValue)){
|
|
||||||
// error: list is not ordered correctly
|
|
||||||
//echo "error: list is not ordered correctly<br>";
|
|
||||||
return self::$_errorCodes['na'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// **
|
// **
|
||||||
// find the match
|
// find the match
|
||||||
// **
|
// **
|
||||||
// loop on the cells
|
// loop on the cells
|
||||||
for ($i=0; $i < sizeof($lookup_array); ++$i){
|
// var_dump($lookup_array);
|
||||||
// if match_type is 0 <=> find the first value that is exactly equal to lookup_value
|
// echo '<br />';
|
||||||
if ($match_type==0 && $lookup_array[$i]==$lookup_value){
|
foreach($lookup_array as $i => $lookupArrayValue) {
|
||||||
// this is the exact match
|
if (($match_type == 0) && ($lookupArrayValue == $lookup_value)) {
|
||||||
return $i+1;
|
// exact match
|
||||||
}
|
return ++$i;
|
||||||
|
} elseif (($match_type == -1) && ($lookupArrayValue <= $lookup_value)) {
|
||||||
|
// echo '$i = '.$i.' => ';
|
||||||
|
// var_dump($lookupArrayValue);
|
||||||
|
// echo '<br />';
|
||||||
|
// echo 'Keyset = ';
|
||||||
|
// var_dump($keySet);
|
||||||
|
// echo '<br />';
|
||||||
|
$i = array_search($i,$keySet);
|
||||||
|
// echo '$i='.$i.'<br />';
|
||||||
// if match_type is -1 <=> find the smallest value that is greater than or equal to lookup_value
|
// if match_type is -1 <=> find the smallest value that is greater than or equal to lookup_value
|
||||||
if ($match_type==-1 && $lookup_array[$i] < $lookup_value){
|
|
||||||
if ($i < 1){
|
if ($i < 1){
|
||||||
// 1st cell was allready smaller than the lookup_value
|
// 1st cell was allready smaller than the lookup_value
|
||||||
break;
|
break;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
// the previous cell was the match
|
// the previous cell was the match
|
||||||
return $i;
|
return $keySet[$i-1]+1;
|
||||||
}
|
}
|
||||||
|
} elseif (($match_type == 1) && ($lookupArrayValue >= $lookup_value)) {
|
||||||
|
// echo '$i = '.$i.' => ';
|
||||||
|
// var_dump($lookupArrayValue);
|
||||||
|
// echo '<br />';
|
||||||
|
// echo 'Keyset = ';
|
||||||
|
// var_dump($keySet);
|
||||||
|
// echo '<br />';
|
||||||
|
$i = array_search($i,$keySet);
|
||||||
|
// echo '$i='.$i.'<br />';
|
||||||
// if match_type is 1 <=> find the largest value that is less than or equal to lookup_value
|
// if match_type is 1 <=> find the largest value that is less than or equal to lookup_value
|
||||||
if ($match_type==1 && $lookup_array[$i] > $lookup_value){
|
|
||||||
if ($i < 1){
|
if ($i < 1){
|
||||||
// 1st cell was allready bigger than the lookup_value
|
// 1st cell was allready bigger than the lookup_value
|
||||||
break;
|
break;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
// the previous cell was the match
|
// the previous cell was the match
|
||||||
return $i;
|
return $keySet[$i-1]+1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// unsuccessful in finding a match, return #N/A error value
|
// unsuccessful in finding a match, return #N/A error value
|
||||||
//echo "unsuccessful in finding a match<br>";
|
|
||||||
return self::$_errorCodes['na'];
|
return self::$_errorCodes['na'];
|
||||||
} // function MATCH()
|
} // function MATCH()
|
||||||
|
|
||||||
@@ -11378,25 +11367,19 @@ class PHPExcel_Calculation_Functions {
|
|||||||
}
|
}
|
||||||
$value = self::flattenSingleValue($value);
|
$value = self::flattenSingleValue($value);
|
||||||
|
|
||||||
switch (gettype($value)) {
|
if ((is_float($value)) || (is_int($value))) {
|
||||||
case 'double' :
|
|
||||||
case 'float' :
|
|
||||||
case 'integer' :
|
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
} elseif(is_bool($value)) {
|
||||||
case 'boolean' :
|
|
||||||
return 4;
|
return 4;
|
||||||
break;
|
} elseif(is_array($value)) {
|
||||||
case 'array' :
|
|
||||||
return 64;
|
return 64;
|
||||||
break;
|
break;
|
||||||
case 'string' :
|
} elseif(is_string($value)) {
|
||||||
// Errors
|
// Errors
|
||||||
if ((strlen($value) > 0) && ($value{0} == '#')) {
|
if ((strlen($value) > 0) && ($value{0} == '#')) {
|
||||||
return 16;
|
return 16;
|
||||||
}
|
}
|
||||||
return 2;
|
return 2;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
} // function TYPE()
|
} // function TYPE()
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Cell
|
* @package PHPExcel_Cell
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -91,6 +91,13 @@ class PHPExcel_Cell
|
|||||||
*/
|
*/
|
||||||
private $_xfIndex;
|
private $_xfIndex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attributes of the formula
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private $_formulaAttributes;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send notification to the cache controller
|
* Send notification to the cache controller
|
||||||
@@ -98,6 +105,7 @@ class PHPExcel_Cell
|
|||||||
**/
|
**/
|
||||||
public function notifyCacheController() {
|
public function notifyCacheController() {
|
||||||
$this->_parent->getCellCacheController()->updateCacheData($this);
|
$this->_parent->getCellCacheController()->updateCacheData($this);
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function detach() {
|
public function detach() {
|
||||||
@@ -242,8 +250,7 @@ class PHPExcel_Cell
|
|||||||
// set the datatype
|
// set the datatype
|
||||||
$this->_dataType = $pDataType;
|
$this->_dataType = $pDataType;
|
||||||
|
|
||||||
$this->notifyCacheController();
|
return $this->notifyCacheController();
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -254,7 +261,7 @@ class PHPExcel_Cell
|
|||||||
public function getCalculatedValue($resetLog=true)
|
public function getCalculatedValue($resetLog=true)
|
||||||
{
|
{
|
||||||
// echo 'Cell '.$this->getCoordinate().' value is a '.$this->_dataType.' with a value of '.$this->getValue().'<br />';
|
// echo 'Cell '.$this->getCoordinate().' value is a '.$this->_dataType.' with a value of '.$this->getValue().'<br />';
|
||||||
if (!is_null($this->_calculatedValue) && $this->_dataType == PHPExcel_Cell_DataType::TYPE_FORMULA) {
|
if ($this->_dataType == PHPExcel_Cell_DataType::TYPE_FORMULA) {
|
||||||
try {
|
try {
|
||||||
// echo 'Cell value for '.$this->getCoordinate().' is a formula: Calculating value<br />';
|
// echo 'Cell value for '.$this->getCoordinate().' is a formula: Calculating value<br />';
|
||||||
$result = PHPExcel_Calculation::getInstance()->calculateCellValue($this,$resetLog);
|
$result = PHPExcel_Calculation::getInstance()->calculateCellValue($this,$resetLog);
|
||||||
@@ -262,28 +269,23 @@ class PHPExcel_Cell
|
|||||||
} catch ( Exception $ex ) {
|
} catch ( Exception $ex ) {
|
||||||
// echo 'Calculation Exception: '.$ex->getMessage().'<br />';
|
// echo 'Calculation Exception: '.$ex->getMessage().'<br />';
|
||||||
$result = '#N/A';
|
$result = '#N/A';
|
||||||
throw(new Exception($ex->getMessage()));
|
throw(new Exception($this->getParent()->getTitle().'!'.$this->getCoordinate().' -> '.$ex->getMessage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((is_string($result)) && ($result == '#Not Yet Implemented')) {
|
if ($result === '#Not Yet Implemented') {
|
||||||
// echo 'Returning fallback value of '.$this->_calculatedValue.' for cell '.$this->getCoordinate().'<br />';
|
// echo 'Returning fallback value of '.$this->_calculatedValue.' for cell '.$this->getCoordinate().'<br />';
|
||||||
return $this->_calculatedValue; // Fallback if calculation engine does not support the formula.
|
return $this->_calculatedValue; // Fallback if calculation engine does not support the formula.
|
||||||
} else {
|
}
|
||||||
// echo 'Returning calculated value of '.$result.' for cell '.$this->getCoordinate().'<br />';
|
// echo 'Returning calculated value of '.$result.' for cell '.$this->getCoordinate().'<br />';
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (is_null($this->_value)) {
|
if (is_null($this->_value)) {
|
||||||
// echo 'Cell '.$this->getCoordinate().' has no value, formula or otherwise<br />';
|
// echo 'Cell '.$this->getCoordinate().' has no value, formula or otherwise<br />';
|
||||||
return null;
|
return null;
|
||||||
} else if ($this->_dataType != PHPExcel_Cell_DataType::TYPE_FORMULA) {
|
}
|
||||||
// echo 'Cell value for '.$this->getCoordinate().' is not a formula: Returning data value of '.$this->_value.'<br />';
|
// echo 'Cell value for '.$this->getCoordinate().' is not a formula: Returning data value of '.$this->_value.'<br />';
|
||||||
return $this->_value;
|
return $this->_value;
|
||||||
} else {
|
|
||||||
// echo 'Cell value is a formula: Calculating value<br />';
|
|
||||||
return PHPExcel_Calculation::getInstance()->calculateCellValue($this,$resetLog);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -298,8 +300,7 @@ class PHPExcel_Cell
|
|||||||
$this->_calculatedValue = $pValue;
|
$this->_calculatedValue = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->notifyCacheController();
|
return $this->notifyCacheController();
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -332,8 +333,7 @@ class PHPExcel_Cell
|
|||||||
{
|
{
|
||||||
$this->_dataType = $pDataType;
|
$this->_dataType = $pDataType;
|
||||||
|
|
||||||
$this->notifyCacheController();
|
return $this->notifyCacheController();
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -361,8 +361,7 @@ class PHPExcel_Cell
|
|||||||
throw new Exception('Cannot get data validation for cell that is not bound to a worksheet');
|
throw new Exception('Cannot get data validation for cell that is not bound to a worksheet');
|
||||||
}
|
}
|
||||||
|
|
||||||
$dataValidation = $this->_parent->getDataValidation($this->getCoordinate());
|
return $this->_parent->getDataValidation($this->getCoordinate());
|
||||||
return $dataValidation;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -380,8 +379,7 @@ class PHPExcel_Cell
|
|||||||
|
|
||||||
$this->_parent->setDataValidation($this->getCoordinate(), $pDataValidation);
|
$this->_parent->setDataValidation($this->getCoordinate(), $pDataValidation);
|
||||||
|
|
||||||
$this->notifyCacheController();
|
return $this->notifyCacheController();
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -410,8 +408,7 @@ class PHPExcel_Cell
|
|||||||
throw new Exception('Cannot get hyperlink for cell that is not bound to a worksheet');
|
throw new Exception('Cannot get hyperlink for cell that is not bound to a worksheet');
|
||||||
}
|
}
|
||||||
|
|
||||||
$hyperlink = $this->_parent->getHyperlink($this->getCoordinate());
|
return $this->_parent->getHyperlink($this->getCoordinate());
|
||||||
return $hyperlink;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -429,8 +426,7 @@ class PHPExcel_Cell
|
|||||||
|
|
||||||
$this->_parent->setHyperlink($this->getCoordinate(), $pHyperlink);
|
$this->_parent->setHyperlink($this->getCoordinate(), $pHyperlink);
|
||||||
|
|
||||||
$this->notifyCacheController();
|
return $this->notifyCacheController();
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -451,8 +447,7 @@ class PHPExcel_Cell
|
|||||||
public function rebindParent(PHPExcel_Worksheet $parent) {
|
public function rebindParent(PHPExcel_Worksheet $parent) {
|
||||||
$this->_parent = $parent;
|
$this->_parent = $parent;
|
||||||
|
|
||||||
$this->notifyCacheController();
|
return $this->notifyCacheController();
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -463,35 +458,15 @@ class PHPExcel_Cell
|
|||||||
*/
|
*/
|
||||||
public function isInRange($pRange = 'A1:A1')
|
public function isInRange($pRange = 'A1:A1')
|
||||||
{
|
{
|
||||||
// Uppercase coordinate
|
list($rangeStart,$rangeEnd) = PHPExcel_Cell::rangeBoundaries($pRange);
|
||||||
$pRange = strtoupper($pRange);
|
|
||||||
|
|
||||||
// Extract range
|
|
||||||
$rangeA = '';
|
|
||||||
$rangeB = '';
|
|
||||||
if (strpos($pRange, ':') === false) {
|
|
||||||
$rangeA = $pRange;
|
|
||||||
$rangeB = $pRange;
|
|
||||||
} else {
|
|
||||||
list($rangeA, $rangeB) = explode(':', $pRange);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Calculate range outer borders
|
|
||||||
$rangeStart = PHPExcel_Cell::coordinateFromString($rangeA);
|
|
||||||
$rangeEnd = PHPExcel_Cell::coordinateFromString($rangeB);
|
|
||||||
|
|
||||||
// Translate column into index
|
|
||||||
$rangeStart[0] = PHPExcel_Cell::columnIndexFromString($rangeStart[0]) - 1;
|
|
||||||
$rangeEnd[0] = PHPExcel_Cell::columnIndexFromString($rangeEnd[0]) - 1;
|
|
||||||
|
|
||||||
// Translate properties
|
// Translate properties
|
||||||
$myColumn = PHPExcel_Cell::columnIndexFromString($this->getColumn()) - 1;
|
$myColumn = PHPExcel_Cell::columnIndexFromString($this->getColumn()) - 1;
|
||||||
$myRow = $this->getRow();
|
$myRow = $this->getRow();
|
||||||
|
|
||||||
// Verify if cell is in range
|
// Verify if cell is in range
|
||||||
return (
|
return (($rangeStart[0] <= $myColumn) && ($rangeEnd[0] >= $myColumn) &&
|
||||||
($rangeStart[0] <= $myColumn && $rangeEnd[0] >= $myColumn) &&
|
($rangeStart[1] <= $myRow) && ($rangeEnd[1] >= $myRow)
|
||||||
($rangeStart[1] <= $myRow && $rangeEnd[1] >= $myRow)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -506,17 +481,13 @@ class PHPExcel_Cell
|
|||||||
{
|
{
|
||||||
if (strpos($pCoordinateString,':') !== false) {
|
if (strpos($pCoordinateString,':') !== false) {
|
||||||
throw new Exception('Cell coordinate string can not be a range of cells.');
|
throw new Exception('Cell coordinate string can not be a range of cells.');
|
||||||
|
|
||||||
} else if ($pCoordinateString == '') {
|
} else if ($pCoordinateString == '') {
|
||||||
throw new Exception('Cell coordinate can not be zero-length string.');
|
throw new Exception('Cell coordinate can not be zero-length string.');
|
||||||
|
|
||||||
} else if (preg_match("/([$]?[A-Z]+)([$]?\d+)/", $pCoordinateString, $matches)) {
|
} else if (preg_match("/([$]?[A-Z]+)([$]?\d+)/", $pCoordinateString, $matches)) {
|
||||||
list(, $column, $row) = $matches;
|
list(, $column, $row) = $matches;
|
||||||
return array($column, $row);
|
return array($column, $row);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw new Exception('Invalid cell coordinate.');
|
throw new Exception('Invalid cell coordinate.');
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -530,15 +501,9 @@ class PHPExcel_Cell
|
|||||||
public static function absoluteCoordinate($pCoordinateString = 'A1')
|
public static function absoluteCoordinate($pCoordinateString = 'A1')
|
||||||
{
|
{
|
||||||
if (strpos($pCoordinateString,':') === false && strpos($pCoordinateString,',') === false) {
|
if (strpos($pCoordinateString,':') === false && strpos($pCoordinateString,',') === false) {
|
||||||
// Return value
|
|
||||||
$returnValue = '';
|
|
||||||
|
|
||||||
// Create absolute coordinate
|
// Create absolute coordinate
|
||||||
list($column, $row) = PHPExcel_Cell::coordinateFromString($pCoordinateString);
|
list($column, $row) = PHPExcel_Cell::coordinateFromString($pCoordinateString);
|
||||||
$returnValue = '$' . $column . '$' . $row;
|
return '$' . $column . '$' . $row;
|
||||||
|
|
||||||
// Return
|
|
||||||
return $returnValue;
|
|
||||||
} else {
|
} else {
|
||||||
throw new Exception("Coordinate string should not be a cell range.");
|
throw new Exception("Coordinate string should not be a cell range.");
|
||||||
}
|
}
|
||||||
@@ -584,22 +549,19 @@ class PHPExcel_Cell
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculate range dimension
|
* Calculate range boundaries
|
||||||
*
|
*
|
||||||
* @param string $pRange Cell range (e.g. A1:A1)
|
* @param string $pRange Cell range (e.g. A1:A1)
|
||||||
* @return array Range dimension (width, height)
|
* @return array Range coordinates (Start Cell, End Cell) where Start Cell and End Cell are arrays (Column Number, Row Number)
|
||||||
*/
|
*/
|
||||||
public static function rangeDimension($pRange = 'A1:A1')
|
public static function rangeBoundaries($pRange = 'A1:A1')
|
||||||
{
|
{
|
||||||
// Uppercase coordinate
|
// Uppercase coordinate
|
||||||
$pRange = strtoupper($pRange);
|
$pRange = strtoupper($pRange);
|
||||||
|
|
||||||
// Extract range
|
// Extract range
|
||||||
$rangeA = '';
|
|
||||||
$rangeB = '';
|
|
||||||
if (strpos($pRange, ':') === false) {
|
if (strpos($pRange, ':') === false) {
|
||||||
$rangeA = $pRange;
|
$rangeA = $rangeB = $pRange;
|
||||||
$rangeB = $pRange;
|
|
||||||
} else {
|
} else {
|
||||||
list($rangeA, $rangeB) = explode(':', $pRange);
|
list($rangeA, $rangeB) = explode(':', $pRange);
|
||||||
}
|
}
|
||||||
@@ -612,6 +574,20 @@ class PHPExcel_Cell
|
|||||||
$rangeStart[0] = PHPExcel_Cell::columnIndexFromString($rangeStart[0]);
|
$rangeStart[0] = PHPExcel_Cell::columnIndexFromString($rangeStart[0]);
|
||||||
$rangeEnd[0] = PHPExcel_Cell::columnIndexFromString($rangeEnd[0]);
|
$rangeEnd[0] = PHPExcel_Cell::columnIndexFromString($rangeEnd[0]);
|
||||||
|
|
||||||
|
return array($rangeStart, $rangeEnd);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculate range dimension
|
||||||
|
*
|
||||||
|
* @param string $pRange Cell range (e.g. A1:A1)
|
||||||
|
* @return array Range dimension (width, height)
|
||||||
|
*/
|
||||||
|
public static function rangeDimension($pRange = 'A1:A1')
|
||||||
|
{
|
||||||
|
// Calculate range outer borders
|
||||||
|
list($rangeStart,$rangeEnd) = PHPExcel_Cell::rangeBoundaries($pRange);
|
||||||
|
|
||||||
return array( ($rangeEnd[0] - $rangeStart[0] + 1), ($rangeEnd[1] - $rangeStart[1] + 1) );
|
return array( ($rangeEnd[0] - $rangeStart[0] + 1), ($rangeEnd[1] - $rangeStart[1] + 1) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -627,8 +603,6 @@ class PHPExcel_Cell
|
|||||||
$pRange = strtoupper($pRange);
|
$pRange = strtoupper($pRange);
|
||||||
|
|
||||||
// Extract range
|
// Extract range
|
||||||
$rangeA = '';
|
|
||||||
$rangeB = '';
|
|
||||||
if (strpos($pRange, ':') === false) {
|
if (strpos($pRange, ':') === false) {
|
||||||
$rangeA = $pRange;
|
$rangeA = $pRange;
|
||||||
$rangeB = $pRange;
|
$rangeB = $pRange;
|
||||||
@@ -813,7 +787,7 @@ class PHPExcel_Cell
|
|||||||
public function __clone() {
|
public function __clone() {
|
||||||
$vars = get_object_vars($this);
|
$vars = get_object_vars($this);
|
||||||
foreach ($vars as $key => $value) {
|
foreach ($vars as $key => $value) {
|
||||||
if (is_object($value)) {
|
if ((is_object($value)) && ($key != '_parent')) {
|
||||||
$this->$key = clone $value;
|
$this->$key = clone $value;
|
||||||
} else {
|
} else {
|
||||||
$this->$key = $value;
|
$this->$key = $value;
|
||||||
@@ -841,8 +815,20 @@ class PHPExcel_Cell
|
|||||||
{
|
{
|
||||||
$this->_xfIndex = $pValue;
|
$this->_xfIndex = $pValue;
|
||||||
|
|
||||||
$this->notifyCacheController();
|
return $this->notifyCacheController();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function setFormulaAttributes($pAttributes)
|
||||||
|
{
|
||||||
|
$this->_formulaAttributes = $pAttributes;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getFormulaAttributes()
|
||||||
|
{
|
||||||
|
return $this->_formulaAttributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Cell
|
* @package PHPExcel_Cell
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Cell
|
* @package PHPExcel_Cell
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Cell
|
* @package PHPExcel_Cell
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Cell
|
* @package PHPExcel_Cell
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Cell
|
* @package PHPExcel_Cell
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Cell
|
* @package PHPExcel_Cell
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel
|
* @package PHPExcel
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel
|
* @package PHPExcel
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -120,6 +120,7 @@ class PHPExcel_DocumentProperties
|
|||||||
$this->_description = '';
|
$this->_description = '';
|
||||||
$this->_keywords = '';
|
$this->_keywords = '';
|
||||||
$this->_category = '';
|
$this->_category = '';
|
||||||
|
$this->_manager = '';
|
||||||
$this->_company = 'Microsoft Corporation';
|
$this->_company = 'Microsoft Corporation';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -322,13 +323,33 @@ class PHPExcel_DocumentProperties
|
|||||||
* Set Company
|
* Set Company
|
||||||
*
|
*
|
||||||
* @param string $pValue
|
* @param string $pValue
|
||||||
* @return PHPPowerPoint_DocumentProperties
|
* @return PHPExcel_DocumentProperties
|
||||||
*/
|
*/
|
||||||
public function setCompany($pValue = '') {
|
public function setCompany($pValue = '') {
|
||||||
$this->_company = $pValue;
|
$this->_company = $pValue;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Manager
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getManager() {
|
||||||
|
return $this->_manager;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set Manager
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
* @return PHPExcel_DocumentProperties
|
||||||
|
*/
|
||||||
|
public function setManager($pValue = '') {
|
||||||
|
$this->_manager = $pValue;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implement PHP __clone to create a deep clone, not just a shallow copy.
|
* Implement PHP __clone to create a deep clone, not just a shallow copy.
|
||||||
*/
|
*/
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel
|
* @package PHPExcel
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel
|
* @package PHPExcel
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
* @package PHPExcel
|
* @package PHPExcel
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel
|
* @package PHPExcel
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel
|
* @package PHPExcel
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Reader
|
* @package PHPExcel_Reader
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Reader
|
* @package PHPExcel_Reader
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Reader
|
* @package PHPExcel_Reader
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -557,6 +557,11 @@ class PHPExcel_Reader_Excel2003XML implements PHPExcel_Reader_IReader
|
|||||||
$cellDataFormula = '';
|
$cellDataFormula = '';
|
||||||
if (isset($cell_ss['Formula'])) {
|
if (isset($cell_ss['Formula'])) {
|
||||||
$cellDataFormula = $cell_ss['Formula'];
|
$cellDataFormula = $cell_ss['Formula'];
|
||||||
|
// added this as a check for array formulas
|
||||||
|
if (isset($cell_ss['ArrayRange'])) {
|
||||||
|
$cellDataCSEFormula = $cell_ss['ArrayRange'];
|
||||||
|
// echo "found an array formula at ".$columnID.$rowID."<br />";
|
||||||
|
}
|
||||||
$hasCalculatedValue = true;
|
$hasCalculatedValue = true;
|
||||||
}
|
}
|
||||||
if (isset($cell->Data)) {
|
if (isset($cell->Data)) {
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Reader
|
* @package PHPExcel_Reader
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -71,6 +71,9 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader
|
|||||||
*/
|
*/
|
||||||
private $_readFilter = null;
|
private $_readFilter = null;
|
||||||
|
|
||||||
|
|
||||||
|
private $_referenceHelper = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read data only?
|
* Read data only?
|
||||||
*
|
*
|
||||||
@@ -150,6 +153,7 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader
|
|||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->_readFilter = new PHPExcel_Reader_DefaultReadFilter();
|
$this->_readFilter = new PHPExcel_Reader_DefaultReadFilter();
|
||||||
|
$this->_referenceHelper = PHPExcel_ReferenceHelper::getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -245,8 +249,7 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader
|
|||||||
$difference[0] = PHPExcel_Cell::columnIndexFromString($current[0]) - PHPExcel_Cell::columnIndexFromString($master[0]);
|
$difference[0] = PHPExcel_Cell::columnIndexFromString($current[0]) - PHPExcel_Cell::columnIndexFromString($master[0]);
|
||||||
$difference[1] = $current[1] - $master[1];
|
$difference[1] = $current[1] - $master[1];
|
||||||
|
|
||||||
$helper = PHPExcel_ReferenceHelper::getInstance();
|
$value = $this->_referenceHelper->updateFormulaReferences( $sharedFormulas[$instance]['formula'],
|
||||||
$value = $helper->updateFormulaReferences( $sharedFormulas[$instance]['formula'],
|
|
||||||
'A1',
|
'A1',
|
||||||
$difference[0],
|
$difference[0],
|
||||||
$difference[1]
|
$difference[1]
|
||||||
@@ -311,7 +314,7 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader
|
|||||||
switch ($rel["Type"]) {
|
switch ($rel["Type"]) {
|
||||||
case "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties":
|
case "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties":
|
||||||
$xmlCore = simplexml_load_string($this->_getFromZipArchive($zip, "{$rel['Target']}"));
|
$xmlCore = simplexml_load_string($this->_getFromZipArchive($zip, "{$rel['Target']}"));
|
||||||
if ($xmlCore) {
|
if (is_object($xmlCore)) {
|
||||||
$xmlCore->registerXPathNamespace("dc", "http://purl.org/dc/elements/1.1/");
|
$xmlCore->registerXPathNamespace("dc", "http://purl.org/dc/elements/1.1/");
|
||||||
$xmlCore->registerXPathNamespace("dcterms", "http://purl.org/dc/terms/");
|
$xmlCore->registerXPathNamespace("dcterms", "http://purl.org/dc/terms/");
|
||||||
$xmlCore->registerXPathNamespace("cp", "http://schemas.openxmlformats.org/package/2006/metadata/core-properties");
|
$xmlCore->registerXPathNamespace("cp", "http://schemas.openxmlformats.org/package/2006/metadata/core-properties");
|
||||||
@@ -328,6 +331,25 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties":
|
||||||
|
$xmlCore = simplexml_load_string($this->_getFromZipArchive($zip, "{$rel['Target']}"));
|
||||||
|
if (is_object($xmlCore)) {
|
||||||
|
$docProps = $excel->getProperties();
|
||||||
|
if (isset($xmlCore->Company))
|
||||||
|
$docProps->setCompany((string) $xmlCore->Company);
|
||||||
|
if (isset($xmlCore->Manager))
|
||||||
|
$docProps->setManager((string) $xmlCore->Manager);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties":
|
||||||
|
$xmlCore = simplexml_load_string($this->_getFromZipArchive($zip, "{$rel['Target']}"));
|
||||||
|
if (is_object($xmlCore)) {
|
||||||
|
$xmlCore->registerXPathNamespace("vt", "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes");
|
||||||
|
$docProps = $excel->getProperties();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument":
|
case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument":
|
||||||
$dir = dirname($rel["Target"]);
|
$dir = dirname($rel["Target"]);
|
||||||
$relsWorkbook = simplexml_load_string($this->_getFromZipArchive($zip, "$dir/_rels/" . basename($rel["Target"]) . ".rels")); //~ http://schemas.openxmlformats.org/package/2006/relationships");
|
$relsWorkbook = simplexml_load_string($this->_getFromZipArchive($zip, "$dir/_rels/" . basename($rel["Target"]) . ".rels")); //~ http://schemas.openxmlformats.org/package/2006/relationships");
|
||||||
@@ -692,6 +714,11 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader
|
|||||||
} else {
|
} else {
|
||||||
// Formula
|
// Formula
|
||||||
$this->_castToFormula($c,$r,$cellDataType,$value,$calculatedValue,$sharedFormulas,'_castToBool');
|
$this->_castToFormula($c,$r,$cellDataType,$value,$calculatedValue,$sharedFormulas,'_castToBool');
|
||||||
|
if (isset($c->f['t'])) {
|
||||||
|
$att = array();
|
||||||
|
$att = $c->f;
|
||||||
|
$docSheet->getCell($r)->setFormulaAttributes($att);
|
||||||
|
}
|
||||||
// echo '$calculatedValue = '.$calculatedValue.'<br />';
|
// echo '$calculatedValue = '.$calculatedValue.'<br />';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1276,10 +1303,14 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case '_xlnm.Print_Area':
|
case '_xlnm.Print_Area':
|
||||||
$range = explode('!', $extractedRange);
|
$rangeSets = explode(',', $extractedRange); // FIXME: what if sheetname contains comma?
|
||||||
$extractedRange = isset($range[1]) ? $range[1] : $range[0];
|
$newRangeSets = array();
|
||||||
|
foreach($rangeSets as $rangeSet) {
|
||||||
$docSheet->getPageSetup()->setPrintArea($extractedRange);
|
$range = explode('!', $rangeSet); // FIXME: what if sheetname contains exclamation mark?
|
||||||
|
$rangeSet = isset($range[1]) ? $range[1] : $range[0];
|
||||||
|
$newRangeSets[] = str_replace('$', '', $rangeSet);
|
||||||
|
}
|
||||||
|
$docSheet->getPageSetup()->setPrintArea(implode(',',$newRangeSets));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Reader_Excel5
|
* @package PHPExcel_Reader_Excel5
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Original file header of ParseXL (used as the base for this class):
|
// Original file header of ParseXL (used as the base for this class):
|
||||||
@@ -834,7 +834,7 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||||||
// Foo!$C$7:$J$66
|
// Foo!$C$7:$J$66
|
||||||
// Bar!$A$1:$IV$2
|
// Bar!$A$1:$IV$2
|
||||||
|
|
||||||
$explodes = explode('!', $range);
|
$explodes = explode('!', $range); // FIXME: what if sheetname contains exclamation mark?
|
||||||
$sheetName = $explodes[0];
|
$sheetName = $explodes[0];
|
||||||
|
|
||||||
if (count($explodes) == 2) {
|
if (count($explodes) == 2) {
|
||||||
@@ -4202,22 +4202,22 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||||||
// 1. BITMAPCOREHEADER
|
// 1. BITMAPCOREHEADER
|
||||||
// offset: 0; size: 4; bcSize, Specifies the number of bytes required by the structure
|
// offset: 0; size: 4; bcSize, Specifies the number of bytes required by the structure
|
||||||
$bcSize = $this->_GetInt4d($iData, 0);
|
$bcSize = $this->_GetInt4d($iData, 0);
|
||||||
var_dump($bcSize);
|
// var_dump($bcSize);
|
||||||
|
|
||||||
// offset: 4; size: 2; bcWidth, specifies the width of the bitmap, in pixels
|
// offset: 4; size: 2; bcWidth, specifies the width of the bitmap, in pixels
|
||||||
$bcWidth = $this->_GetInt2d($iData, 4);
|
$bcWidth = $this->_GetInt2d($iData, 4);
|
||||||
var_dump($bcWidth);
|
// var_dump($bcWidth);
|
||||||
|
|
||||||
// offset: 6; size: 2; bcHeight, specifies the height of the bitmap, in pixels.
|
// offset: 6; size: 2; bcHeight, specifies the height of the bitmap, in pixels.
|
||||||
$bcHeight = $this->_GetInt2d($iData, 6);
|
$bcHeight = $this->_GetInt2d($iData, 6);
|
||||||
var_dump($bcHeight);
|
// var_dump($bcHeight);
|
||||||
$ih = imagecreatetruecolor($bcWidth, $bcHeight);
|
$ih = imagecreatetruecolor($bcWidth, $bcHeight);
|
||||||
|
|
||||||
// offset: 8; size: 2; bcPlanes, specifies the number of planes for the target device. This value must be 1
|
// offset: 8; size: 2; bcPlanes, specifies the number of planes for the target device. This value must be 1
|
||||||
|
|
||||||
// offset: 10; size: 2; bcBitCount specifies the number of bits-per-pixel. This value must be 1, 4, 8, or 24
|
// offset: 10; size: 2; bcBitCount specifies the number of bits-per-pixel. This value must be 1, 4, 8, or 24
|
||||||
$bcBitCount = $this->_GetInt2d($iData, 10);
|
$bcBitCount = $this->_GetInt2d($iData, 10);
|
||||||
var_dump($bcBitCount);
|
// var_dump($bcBitCount);
|
||||||
|
|
||||||
$rgbString = substr($iData, 12);
|
$rgbString = substr($iData, 12);
|
||||||
$rgbTriples = array();
|
$rgbTriples = array();
|
||||||
@@ -4714,14 +4714,17 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||||||
$data = $this->_extractNumber(substr($formulaData, 1));
|
$data = $this->_extractNumber(substr($formulaData, 1));
|
||||||
$data = str_replace(',', '.', (string)$data); // in case non-English locale
|
$data = str_replace(',', '.', (string)$data); // in case non-English locale
|
||||||
break;
|
break;
|
||||||
case 0x40: // array constant
|
case 0x20: // array constant
|
||||||
case 0x60: // array constant
|
case 0x40:
|
||||||
|
case 0x60:
|
||||||
// offset: 1; size: 7; not used
|
// offset: 1; size: 7; not used
|
||||||
$name = 'tArray';
|
$name = 'tArray';
|
||||||
$size = 8;
|
$size = 8;
|
||||||
$data = null;
|
$data = null;
|
||||||
break;
|
break;
|
||||||
case 0x41: // function with fixed number of arguments
|
case 0x21: // function with fixed number of arguments
|
||||||
|
case 0x41:
|
||||||
|
case 0x61:
|
||||||
$name = 'tFunc';
|
$name = 'tFunc';
|
||||||
$size = 3;
|
$size = 3;
|
||||||
// offset: 1; size: 2; index to built-in sheet function
|
// offset: 1; size: 2; index to built-in sheet function
|
||||||
@@ -4892,8 +4895,8 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||||||
$data = array('function' => $function, 'args' => $args);
|
$data = array('function' => $function, 'args' => $args);
|
||||||
break;
|
break;
|
||||||
case 0x22: // function with variable number of arguments
|
case 0x22: // function with variable number of arguments
|
||||||
case 0x42: // function with variable number of arguments
|
case 0x42:
|
||||||
case 0x62: // function with variable number of arguments
|
case 0x62:
|
||||||
$name = 'tFuncV';
|
$name = 'tFuncV';
|
||||||
$size = 4;
|
$size = 4;
|
||||||
// offset: 1; size: 1; number of arguments
|
// offset: 1; size: 1; number of arguments
|
||||||
@@ -4997,6 +5000,7 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||||||
break;
|
break;
|
||||||
case 0x23: // index to defined name
|
case 0x23: // index to defined name
|
||||||
case 0x43:
|
case 0x43:
|
||||||
|
case 0x63:
|
||||||
$name = 'tName';
|
$name = 'tName';
|
||||||
$size = 5;
|
$size = 5;
|
||||||
// offset: 1; size: 2; one-based index to definedname record
|
// offset: 1; size: 2; one-based index to definedname record
|
||||||
@@ -5011,15 +5015,16 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||||||
$size = 5;
|
$size = 5;
|
||||||
$data = $this->_readBIFF8CellAddress(substr($formulaData, 1, 4));
|
$data = $this->_readBIFF8CellAddress(substr($formulaData, 1, 4));
|
||||||
break;
|
break;
|
||||||
case 0x25: // cell range reference to cells in the same sheet
|
case 0x25: // cell range reference to cells in the same sheet (2d)
|
||||||
case 0x45:
|
case 0x45:
|
||||||
case 0x65:
|
case 0x65:
|
||||||
$name = 'tArea';
|
$name = 'tArea';
|
||||||
$size = 9;
|
$size = 9;
|
||||||
$data = $this->_readBIFF8CellRangeAddress(substr($formulaData, 1, 8));
|
$data = $this->_readBIFF8CellRangeAddress(substr($formulaData, 1, 8));
|
||||||
break;
|
break;
|
||||||
case 0x26:
|
case 0x26: // Constant reference sub-expression
|
||||||
case 0x46:
|
case 0x46:
|
||||||
|
case 0x66:
|
||||||
$name = 'tMemArea';
|
$name = 'tMemArea';
|
||||||
// offset: 1; size: 4; not used
|
// offset: 1; size: 4; not used
|
||||||
// offset: 5; size: 2; size of the following subexpression
|
// offset: 5; size: 2; size of the following subexpression
|
||||||
@@ -5027,7 +5032,9 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||||||
$size = 7 + $subSize;
|
$size = 7 + $subSize;
|
||||||
$data = $this->_getFormulaFromData(substr($formulaData, 7, $subSize));
|
$data = $this->_getFormulaFromData(substr($formulaData, 7, $subSize));
|
||||||
break;
|
break;
|
||||||
|
case 0x27: // Deleted constant reference sub-expression
|
||||||
case 0x47:
|
case 0x47:
|
||||||
|
case 0x67:
|
||||||
$name = 'tMemErr';
|
$name = 'tMemErr';
|
||||||
// offset: 1; size: 4; not used
|
// offset: 1; size: 4; not used
|
||||||
// offset: 5; size: 2; size of the following subexpression
|
// offset: 5; size: 2; size of the following subexpression
|
||||||
@@ -5035,16 +5042,17 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||||||
$size = 7 + $subSize;
|
$size = 7 + $subSize;
|
||||||
$data = $this->_getFormulaFromData(substr($formulaData, 7, $subSize));
|
$data = $this->_getFormulaFromData(substr($formulaData, 7, $subSize));
|
||||||
break;
|
break;
|
||||||
case 0x29:
|
case 0x29: // Variable reference sub-expression
|
||||||
case 0x49:
|
case 0x49:
|
||||||
|
case 0x69:
|
||||||
$name = 'tMemFunc';
|
$name = 'tMemFunc';
|
||||||
// offset: 1; size: 2; size of the following subexpression
|
// offset: 1; size: 2; size of the following sub-expression
|
||||||
$subSize = $this->_GetInt2d($formulaData, 1);
|
$subSize = $this->_GetInt2d($formulaData, 1);
|
||||||
$size = 3 + $subSize;
|
$size = 3 + $subSize;
|
||||||
$data = $this->_getFormulaFromData(substr($formulaData, 3, $subSize));
|
$data = $this->_getFormulaFromData(substr($formulaData, 3, $subSize));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x2C: // Relative reference, used in shared formulas and some other places
|
case 0x2C: // Relative 2d cell reference reference, used in shared formulas and some other places
|
||||||
case 0x4C:
|
case 0x4C:
|
||||||
case 0x6C:
|
case 0x6C:
|
||||||
$name = 'tRefN';
|
$name = 'tRefN';
|
||||||
@@ -5052,7 +5060,7 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||||||
$data = $this->_readBIFF8CellAddressB(substr($formulaData, 1, 4), $baseCell);
|
$data = $this->_readBIFF8CellAddressB(substr($formulaData, 1, 4), $baseCell);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x2D:
|
case 0x2D: // Relative 2d range reference
|
||||||
case 0x4D:
|
case 0x4D:
|
||||||
case 0x6D:
|
case 0x6D:
|
||||||
$name = 'tAreaN';
|
$name = 'tAreaN';
|
||||||
@@ -5060,7 +5068,7 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||||||
$data = $this->_readBIFF8CellRangeAddressB(substr($formulaData, 1, 8), $baseCell);
|
$data = $this->_readBIFF8CellRangeAddressB(substr($formulaData, 1, 8), $baseCell);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x39:
|
case 0x39: // External name
|
||||||
case 0x59:
|
case 0x59:
|
||||||
case 0x79:
|
case 0x79:
|
||||||
$name = 'tNameX';
|
$name = 'tNameX';
|
||||||
@@ -5075,6 +5083,7 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||||||
|
|
||||||
case 0x3A: // 3d reference to cell
|
case 0x3A: // 3d reference to cell
|
||||||
case 0x5A:
|
case 0x5A:
|
||||||
|
case 0x7A:
|
||||||
$name = 'tRef3d';
|
$name = 'tRef3d';
|
||||||
$size = 7;
|
$size = 7;
|
||||||
|
|
||||||
@@ -5085,7 +5094,6 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||||||
$cellAddress = $this->_readBIFF8CellAddress(substr($formulaData, 3, 4));
|
$cellAddress = $this->_readBIFF8CellAddress(substr($formulaData, 3, 4));
|
||||||
|
|
||||||
$data = "$sheetRange!$cellAddress";
|
$data = "$sheetRange!$cellAddress";
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
// deleted sheet reference
|
// deleted sheet reference
|
||||||
$data = '#REF!';
|
$data = '#REF!';
|
||||||
@@ -5094,6 +5102,7 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||||||
break;
|
break;
|
||||||
case 0x3B: // 3d reference to cell range
|
case 0x3B: // 3d reference to cell range
|
||||||
case 0x5B:
|
case 0x5B:
|
||||||
|
case 0x7B:
|
||||||
$name = 'tArea3d';
|
$name = 'tArea3d';
|
||||||
$size = 11;
|
$size = 11;
|
||||||
|
|
||||||
@@ -5104,15 +5113,13 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||||||
$cellRangeAddress = $this->_readBIFF8CellRangeAddress(substr($formulaData, 3, 8));
|
$cellRangeAddress = $this->_readBIFF8CellRangeAddress(substr($formulaData, 3, 8));
|
||||||
|
|
||||||
$data = "$sheetRange!$cellRangeAddress";
|
$data = "$sheetRange!$cellRangeAddress";
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
// deleted sheet reference
|
// deleted sheet reference
|
||||||
$data = '#REF!';
|
$data = '#REF!';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
// case 0x39: // don't know how to deal with
|
// Unknown cases // don't know how to deal with
|
||||||
default:
|
default:
|
||||||
throw new Exception('Unrecognized token ' . sprintf('%02X', $id) . ' in formula');
|
throw new Exception('Unrecognized token ' . sprintf('%02X', $id) . ' in formula');
|
||||||
break;
|
break;
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Reader_Excel5
|
* @package PHPExcel_Reader_Excel5
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Reader
|
* @package PHPExcel_Reader
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Reader
|
* @package PHPExcel_Reader
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Reader
|
* @package PHPExcel_Reader
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -242,6 +242,9 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader
|
|||||||
throw new Exception("Could not open " . $pFilename . " for reading! File does not exist.");
|
throw new Exception("Could not open " . $pFilename . " for reading! File does not exist.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$timezoneObj = new DateTimeZone('Europe/London');
|
||||||
|
$GMT = new DateTimeZone('UTC');
|
||||||
|
|
||||||
$zip = new ZipArchive;
|
$zip = new ZipArchive;
|
||||||
if ($zip->open($pFilename) === true) {
|
if ($zip->open($pFilename) === true) {
|
||||||
// echo '<h1>Meta Information</h1>';
|
// echo '<h1>Meta Information</h1>';
|
||||||
@@ -338,6 +341,11 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader
|
|||||||
foreach($worksheetData as $key => $rowData) {
|
foreach($worksheetData as $key => $rowData) {
|
||||||
// echo '<b>'.$key.'</b><br />';
|
// echo '<b>'.$key.'</b><br />';
|
||||||
switch ($key) {
|
switch ($key) {
|
||||||
|
case 'table-header-rows':
|
||||||
|
foreach ($rowData as $key=>$cellData) {
|
||||||
|
$rowData = $cellData;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 'table-row' :
|
case 'table-row' :
|
||||||
$columnID = 'A';
|
$columnID = 'A';
|
||||||
foreach($rowData as $key => $cellData) {
|
foreach($rowData as $key => $cellData) {
|
||||||
@@ -387,7 +395,8 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader
|
|||||||
break;
|
break;
|
||||||
case 'date' :
|
case 'date' :
|
||||||
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
||||||
$dateObj = date_create($cellDataOfficeAttributes['date-value']);
|
$dateObj = new DateTime($cellDataOfficeAttributes['date-value'], $GMT);
|
||||||
|
$dateObj->setTimeZone($timezoneObj);
|
||||||
list($year,$month,$day,$hour,$minute,$second) = explode(' ',$dateObj->format('Y m d H i s'));
|
list($year,$month,$day,$hour,$minute,$second) = explode(' ',$dateObj->format('Y m d H i s'));
|
||||||
$dataValue = PHPExcel_Shared_Date::FormattedPHPToExcel($year,$month,$day,$hour,$minute,$second);
|
$dataValue = PHPExcel_Shared_Date::FormattedPHPToExcel($year,$month,$day,$hour,$minute,$second);
|
||||||
if ($dataValue != floor($dataValue)) {
|
if ($dataValue != floor($dataValue)) {
|
||||||
@@ -418,7 +427,7 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader
|
|||||||
if (($key % 2) == 0) {
|
if (($key % 2) == 0) {
|
||||||
$value = preg_replace('/\[\.(.*):\.(.*)\]/Ui','$1:$2',$value);
|
$value = preg_replace('/\[\.(.*):\.(.*)\]/Ui','$1:$2',$value);
|
||||||
$value = preg_replace('/\[\.(.*)\]/Ui','$1',$value);
|
$value = preg_replace('/\[\.(.*)\]/Ui','$1',$value);
|
||||||
$value = PHPExcel_Calculation::_translateSeparator(';',',',$value);
|
$value = PHPExcel_Calculation::_translateSeparator(';',',',$value,$inBraces);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($value);
|
unset($value);
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Reader
|
* @package PHPExcel_Reader
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Reader
|
* @package PHPExcel_Reader
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel
|
* @package PHPExcel
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -35,6 +35,13 @@
|
|||||||
*/
|
*/
|
||||||
class PHPExcel_ReferenceHelper
|
class PHPExcel_ReferenceHelper
|
||||||
{
|
{
|
||||||
|
/** Constants */
|
||||||
|
/** Regular Expressions */
|
||||||
|
const REFHELPER_REGEXP_CELLREF = '((\w*|\'[^!]*\')!)?(?<![:a-z\$])(\$?[a-z]{1,3}\$?\d+)(?=[^:!\d\'])';
|
||||||
|
const REFHELPER_REGEXP_CELLRANGE = '((\w*|\'[^!]*\')!)?(\$?[a-z]{1,3}\$?\d+):(\$?[a-z]{1,3}\$?\d+)';
|
||||||
|
const REFHELPER_REGEXP_ROWRANGE = '((\w*|\'[^!]*\')!)?(\$?\d+):(\$?\d+)';
|
||||||
|
const REFHELPER_REGEXP_COLRANGE = '((\w*|\'[^!]*\')!)?(\$?[a-z]{1,3}):(\$?[a-z]{1,3})';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instance of this class
|
* Instance of this class
|
||||||
*
|
*
|
||||||
@@ -119,10 +126,8 @@ class PHPExcel_ReferenceHelper
|
|||||||
$newCoordinates = PHPExcel_Cell::stringFromColumnIndex( PHPExcel_Cell::columnIndexFromString($cell->getColumn()) - 1 + $pNumCols ) . ($cell->getRow() + $pNumRows);
|
$newCoordinates = PHPExcel_Cell::stringFromColumnIndex( PHPExcel_Cell::columnIndexFromString($cell->getColumn()) - 1 + $pNumCols ) . ($cell->getRow() + $pNumRows);
|
||||||
|
|
||||||
// Should the cell be updated? Move value and cellXf index from one cell to another.
|
// Should the cell be updated? Move value and cellXf index from one cell to another.
|
||||||
if (
|
if ((PHPExcel_Cell::columnIndexFromString( $cell->getColumn() ) >= PHPExcel_Cell::columnIndexFromString($beforeColumn)) &&
|
||||||
(PHPExcel_Cell::columnIndexFromString( $cell->getColumn() ) >= PHPExcel_Cell::columnIndexFromString($beforeColumn)) &&
|
($cell->getRow() >= $beforeRow)) {
|
||||||
($cell->getRow() >= $beforeRow)
|
|
||||||
) {
|
|
||||||
|
|
||||||
// Update cell styles
|
// Update cell styles
|
||||||
$pSheet->getCell($newCoordinates)->setXfIndex($cell->getXfIndex());
|
$pSheet->getCell($newCoordinates)->setXfIndex($cell->getXfIndex());
|
||||||
@@ -132,7 +137,7 @@ class PHPExcel_ReferenceHelper
|
|||||||
if ($cell->getDataType() == PHPExcel_Cell_DataType::TYPE_FORMULA) {
|
if ($cell->getDataType() == PHPExcel_Cell_DataType::TYPE_FORMULA) {
|
||||||
// Formula should be adjusted
|
// Formula should be adjusted
|
||||||
$pSheet->getCell($newCoordinates)
|
$pSheet->getCell($newCoordinates)
|
||||||
->setValue($this->updateFormulaReferences($cell->getValue(), $pBefore, $pNumCols, $pNumRows));
|
->setValue($this->updateFormulaReferences($cell->getValue(), $pBefore, $pNumCols, $pNumRows, $pSheet->getTitle()));
|
||||||
} else {
|
} else {
|
||||||
// Formula should not be adjusted
|
// Formula should not be adjusted
|
||||||
$pSheet->getCell($newCoordinates)->setValue($cell->getValue());
|
$pSheet->getCell($newCoordinates)->setValue($cell->getValue());
|
||||||
@@ -340,43 +345,121 @@ class PHPExcel_ReferenceHelper
|
|||||||
* @return string Updated formula
|
* @return string Updated formula
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function updateFormulaReferences($pFormula = '', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) {
|
public function updateFormulaReferences($pFormula = '', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0, $sheetName = '') {
|
||||||
// Parse formula into a tree of tokens
|
// Update cell references in the formula
|
||||||
$tokenisedFormula = PHPExcel_Calculation::getInstance()->parseFormula($pFormula);
|
$formulaBlocks = explode('"',$pFormula);
|
||||||
|
foreach($formulaBlocks as $i => &$formulaBlock) {
|
||||||
$newCellTokens = $cellTokens = array();
|
// Ignore blocks that were enclosed in quotes (even entries in the $formulaBlocks array after the explode)
|
||||||
|
if (($i % 2) == 0) {
|
||||||
$adjustCount = 0;
|
$adjustCount = 0;
|
||||||
// Build the translation table of cell tokens
|
$newCellTokens = $cellTokens = array();
|
||||||
foreach($tokenisedFormula as $token) {
|
// Search for row ranges (e.g. 'Sheet1'!3:5 or 3:5) with or without $ absolutes (e.g. $3:5)
|
||||||
$token = $token['value'];
|
$matchCount = preg_match_all('/'.self::REFHELPER_REGEXP_ROWRANGE.'/i', ' '.$formulaBlock.' ', $matches, PREG_SET_ORDER);
|
||||||
if (preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $token, $matches)) {
|
if ($matchCount > 0) {
|
||||||
list($column,$row) = PHPExcel_Cell::coordinateFromString($token);
|
foreach($matches as $match) {
|
||||||
|
$fromString = ($match[2] > '') ? $match[2].'!' : '';
|
||||||
|
$fromString .= $match[3].':'.$match[4];
|
||||||
|
$modified3 = substr($this->updateCellReference('$A'.$match[3],$pBefore,$pNumCols,$pNumRows),2);
|
||||||
|
$modified4 = substr($this->updateCellReference('$A'.$match[4],$pBefore,$pNumCols,$pNumRows),2);
|
||||||
|
|
||||||
|
if ($match[3].':'.$match[4] !== $modified3.':'.$modified4) {
|
||||||
|
if (($match[2] == '') || (trim($match[2],"'") == $sheetName)) {
|
||||||
|
$toString = ($match[2] > '') ? $match[2].'!' : '';
|
||||||
|
$toString .= $modified3.':'.$modified4;
|
||||||
// Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more
|
// Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more
|
||||||
$column = PHPExcel_Cell::columnIndexFromString($column) + 100000;
|
$column = 100000;
|
||||||
$row += 10000000;
|
$row = 10000000+trim($match[3],'$');
|
||||||
$cellIndex = $column.$row;
|
$cellIndex = $column.$row;
|
||||||
if (!isset($cellTokens[$cellIndex])) {
|
|
||||||
$newReference = $this->updateCellReference($token, $pBefore, $pNumCols, $pNumRows);
|
$newCellTokens[$cellIndex] = preg_quote($toString);
|
||||||
if ($newReference !== $token) {
|
$cellTokens[$cellIndex] = '/(?<!\d)'.preg_quote($fromString).'(?!\d)/i';
|
||||||
$newCellTokens[$cellIndex] = preg_quote($newReference);
|
|
||||||
$cellTokens[$cellIndex] = '/(?<![A-Z])'.preg_quote($token).'(?!\d)/i';
|
|
||||||
++$adjustCount;
|
++$adjustCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($adjustCount == 0) {
|
// Search for column ranges (e.g. 'Sheet1'!C:E or C:E) with or without $ absolutes (e.g. $C:E)
|
||||||
return $pFormula;
|
$matchCount = preg_match_all('/'.self::REFHELPER_REGEXP_COLRANGE.'/i', ' '.$formulaBlock.' ', $matches, PREG_SET_ORDER);
|
||||||
|
if ($matchCount > 0) {
|
||||||
|
foreach($matches as $match) {
|
||||||
|
$fromString = ($match[2] > '') ? $match[2].'!' : '';
|
||||||
|
$fromString .= $match[3].':'.$match[4];
|
||||||
|
$modified3 = substr($this->updateCellReference($match[3].'$1',$pBefore,$pNumCols,$pNumRows),0,-2);
|
||||||
|
$modified4 = substr($this->updateCellReference($match[4].'$1',$pBefore,$pNumCols,$pNumRows),0,-2);
|
||||||
|
|
||||||
|
if ($match[3].':'.$match[4] !== $modified3.':'.$modified4) {
|
||||||
|
if (($match[2] == '') || (trim($match[2],"'") == $sheetName)) {
|
||||||
|
$toString = ($match[2] > '') ? $match[2].'!' : '';
|
||||||
|
$toString .= $modified3.':'.$modified4;
|
||||||
|
// Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more
|
||||||
|
$column = PHPExcel_Cell::columnIndexFromString(trim($match[3],'$')) + 100000;
|
||||||
|
$row = 10000000;
|
||||||
|
$cellIndex = $column.$row;
|
||||||
|
|
||||||
|
$newCellTokens[$cellIndex] = preg_quote($toString);
|
||||||
|
$cellTokens[$cellIndex] = '/(?<![A-Z])'.preg_quote($fromString).'(?![A-Z])/i';
|
||||||
|
++$adjustCount;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Search for cell ranges (e.g. 'Sheet1'!A3:C5 or A3:C5) with or without $ absolutes (e.g. $A1:C$5)
|
||||||
|
$matchCount = preg_match_all('/'.self::REFHELPER_REGEXP_CELLRANGE.'/i', ' '.$formulaBlock.' ', $matches, PREG_SET_ORDER);
|
||||||
|
if ($matchCount > 0) {
|
||||||
|
foreach($matches as $match) {
|
||||||
|
$fromString = ($match[2] > '') ? $match[2].'!' : '';
|
||||||
|
$fromString .= $match[3].':'.$match[4];
|
||||||
|
$modified3 = $this->updateCellReference($match[3],$pBefore,$pNumCols,$pNumRows);
|
||||||
|
$modified4 = $this->updateCellReference($match[4],$pBefore,$pNumCols,$pNumRows);
|
||||||
|
|
||||||
|
if ($match[3].$match[4] !== $modified3.$modified4) {
|
||||||
|
if (($match[2] == '') || (trim($match[2],"'") == $sheetName)) {
|
||||||
|
$toString = ($match[2] > '') ? $match[2].'!' : '';
|
||||||
|
$toString .= $modified3.':'.$modified4;
|
||||||
|
list($column,$row) = PHPExcel_Cell::coordinateFromString($match[3]);
|
||||||
|
// Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more
|
||||||
|
$column = PHPExcel_Cell::columnIndexFromString(trim($column,'$')) + 100000;
|
||||||
|
$row = trim($row,'$') + 10000000;
|
||||||
|
$cellIndex = $column.$row;
|
||||||
|
|
||||||
|
$newCellTokens[$cellIndex] = preg_quote($toString);
|
||||||
|
$cellTokens[$cellIndex] = '/(?<![A-Z])'.preg_quote($fromString).'(?!\d)/i';
|
||||||
|
++$adjustCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Search for cell references (e.g. 'Sheet1'!A3 or C5) with or without $ absolutes (e.g. $A1 or C$5)
|
||||||
|
$matchCount = preg_match_all('/'.self::REFHELPER_REGEXP_CELLREF.'/i', ' '.$formulaBlock.' ', $matches, PREG_SET_ORDER);
|
||||||
|
if ($matchCount > 0) {
|
||||||
|
foreach($matches as $match) {
|
||||||
|
$fromString = ($match[2] > '') ? $match[2].'!' : '';
|
||||||
|
$fromString .= $match[3];
|
||||||
|
$modified3 = $this->updateCellReference($match[3],$pBefore,$pNumCols,$pNumRows);
|
||||||
|
|
||||||
|
if ($match[3] !== $modified3) {
|
||||||
|
if (($match[2] == '') || (trim($match[2],"'") == $sheetName)) {
|
||||||
|
$toString = ($match[2] > '') ? $match[2].'!' : '';
|
||||||
|
$toString .= $modified3;
|
||||||
|
list($column,$row) = PHPExcel_Cell::coordinateFromString($match[3]);
|
||||||
|
// Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more
|
||||||
|
$column = PHPExcel_Cell::columnIndexFromString(trim($column,'$')) + 100000;
|
||||||
|
$row = trim($row,'$') + 10000000;
|
||||||
|
$cellIndex = $column.$row;
|
||||||
|
|
||||||
|
$newCellTokens[$cellIndex] = preg_quote($toString);
|
||||||
|
$cellTokens[$cellIndex] = '/(?<![A-Z])'.preg_quote($fromString).'(?!\d)/i';
|
||||||
|
++$adjustCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($adjustCount > 0) {
|
||||||
krsort($cellTokens);
|
krsort($cellTokens);
|
||||||
krsort($newCellTokens);
|
krsort($newCellTokens);
|
||||||
|
|
||||||
// Update cell references in the formula
|
// Update cell references in the formula
|
||||||
$formulaBlocks = explode('"',$pFormula);
|
$formulaBlock = str_replace('\\','',preg_replace($cellTokens,$newCellTokens,$formulaBlock));
|
||||||
foreach($formulaBlocks as $i => &$formulaBlock) {
|
}
|
||||||
// Only count/replace in alternate array entries
|
|
||||||
if (($i % 2) == 0) {
|
|
||||||
$formulaBlock = preg_replace($cellTokens,$newCellTokens,$formulaBlock);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($formulaBlock);
|
unset($formulaBlock);
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_RichText
|
* @package PHPExcel_RichText
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
* @package PHPExcel_RichText
|
* @package PHPExcel_RichText
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
* @package PHPExcel_RichText
|
* @package PHPExcel_RichText
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
* @package PHPExcel_RichText
|
* @package PHPExcel_RichText
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Settings
|
* @package PHPExcel_Settings
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** PHPExcel root directory */
|
/** PHPExcel root directory */
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared
|
* @package PHPExcel_Shared
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
* @package PHPExcel_Shared
|
* @package PHPExcel_Shared
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared
|
* @package PHPExcel_Shared
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared_Escher
|
* @package PHPExcel_Shared_Escher
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared_Escher
|
* @package PHPExcel_Shared_Escher
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared_Escher
|
* @package PHPExcel_Shared_Escher
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared_Escher
|
* @package PHPExcel_Shared_Escher
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared_Escher
|
* @package PHPExcel_Shared_Escher
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -69,6 +69,13 @@ class PHPExcel_Shared_Escher_DggContainer
|
|||||||
*/
|
*/
|
||||||
private $_OPT = array();
|
private $_OPT = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Array of identifier clusters containg information about the maximum shape identifiers
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
private $_IDCLs = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get maximum shape index of all shapes in all drawings (plus one)
|
* Get maximum shape index of all shapes in all drawings (plus one)
|
||||||
*
|
*
|
||||||
@@ -174,4 +181,23 @@ class PHPExcel_Shared_Escher_DggContainer
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get identifier clusters
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getIDCLs()
|
||||||
|
{
|
||||||
|
return $this->_IDCLs;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set identifier clusters. array(<drawingId> => <max shape id>, ...)
|
||||||
|
*
|
||||||
|
* @param array $pValue
|
||||||
|
*/
|
||||||
|
public function setIDCLs($pValue)
|
||||||
|
{
|
||||||
|
$this->_IDCLs = $pValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared_Escher
|
* @package PHPExcel_Shared_Escher
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared_Escher
|
* @package PHPExcel_Shared_Escher
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared_Escher
|
* @package PHPExcel_Shared_Escher
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared
|
* @package PHPExcel_Shared
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared
|
* @package PHPExcel_Shared
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -75,7 +75,9 @@ class PHPExcel_Shared_File
|
|||||||
$returnValue = '';
|
$returnValue = '';
|
||||||
|
|
||||||
// Try using realpath()
|
// Try using realpath()
|
||||||
|
if (file_exists($pFilename)) {
|
||||||
$returnValue = realpath($pFilename);
|
$returnValue = realpath($pFilename);
|
||||||
|
}
|
||||||
|
|
||||||
// Found something?
|
// Found something?
|
||||||
if ($returnValue == '' || is_null($returnValue)) {
|
if ($returnValue == '' || is_null($returnValue)) {
|
||||||
@@ -108,13 +110,13 @@ class PHPExcel_Shared_File
|
|||||||
|
|
||||||
if ( !function_exists('sys_get_temp_dir')) {
|
if ( !function_exists('sys_get_temp_dir')) {
|
||||||
if ($temp = getenv('TMP') ) {
|
if ($temp = getenv('TMP') ) {
|
||||||
return realpath($temp);
|
if (file_exists($temp)) { return realpath($temp); }
|
||||||
}
|
}
|
||||||
if ($temp = getenv('TEMP') ) {
|
if ($temp = getenv('TEMP') ) {
|
||||||
return realpath($temp);
|
if (file_exists($temp)) { return realpath($temp); }
|
||||||
}
|
}
|
||||||
if ($temp = getenv('TMPDIR') ) {
|
if ($temp = getenv('TMPDIR') ) {
|
||||||
return realpath($temp);
|
if (file_exists($temp)) { return realpath($temp); }
|
||||||
}
|
}
|
||||||
|
|
||||||
// trick for creating a file in system's temporary dir
|
// trick for creating a file in system's temporary dir
|
||||||
@@ -126,10 +128,11 @@ class PHPExcel_Shared_File
|
|||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// use ordinary built-in PHP function
|
// use ordinary built-in PHP function
|
||||||
|
// There should be no problem with the 5.2.4 Suhosin realpath() bug, because this line should only
|
||||||
|
// be called if we're running 5.2.1 or earlier
|
||||||
return realpath(sys_get_temp_dir());
|
return realpath(sys_get_temp_dir());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared
|
* @package PHPExcel_Shared
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared_OLE
|
* @package PHPExcel_Shared_OLE
|
||||||
* @copyright Copyright (c) 2006 - 2007 Christian Schmidt
|
* @copyright Copyright (c) 2006 - 2007 Christian Schmidt
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared
|
* @package PHPExcel_Shared
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('IDENTIFIER_OLE', pack('CCCCCCCC', 0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1));
|
define('IDENTIFIER_OLE', pack('CCCCCCCC', 0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1));
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared
|
* @package PHPExcel_Shared
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared
|
* @package PHPExcel_Shared
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -507,7 +507,7 @@ class PHPExcel_Shared_String
|
|||||||
* @author Rasmus Andersson {@link http://rasmusandersson.se/}
|
* @author Rasmus Andersson {@link http://rasmusandersson.se/}
|
||||||
* @author vadik56
|
* @author vadik56
|
||||||
*/
|
*/
|
||||||
function utf16_decode( $str, $bom_be=true ) {
|
public static function utf16_decode( $str, $bom_be=true ) {
|
||||||
if( strlen($str) < 2 ) return $str;
|
if( strlen($str) < 2 ) return $str;
|
||||||
$c0 = ord($str{0});
|
$c0 = ord($str{0});
|
||||||
$c1 = ord($str{1});
|
$c1 = ord($str{1});
|
||||||
|
@@ -22,13 +22,18 @@
|
|||||||
* @package PHPExcel_Shared
|
* @package PHPExcel_Shared
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('DATE_W3C')) {
|
if (!defined('DATE_W3C')) {
|
||||||
define('DATE_W3C', 'Y-m-d\TH:i:sP');
|
define('DATE_W3C', 'Y-m-d\TH:i:sP');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!defined('DEBUGMODE_ENABLED')) {
|
||||||
|
define('DEBUGMODE_ENABLED', false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Shared_XMLWriter
|
* PHPExcel_Shared_XMLWriter
|
||||||
*
|
*
|
||||||
@@ -80,8 +85,10 @@ class PHPExcel_Shared_XMLWriter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set default values
|
// Set default values
|
||||||
|
if (DEBUGMODE_ENABLED) {
|
||||||
$this->_xmlWriter->setIndent(true);
|
$this->_xmlWriter->setIndent(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destructor
|
* Destructor
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared
|
* @package PHPExcel_Shared
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared_Best_Fit
|
* @package PHPExcel_Shared_Best_Fit
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared_Best_Fit
|
* @package PHPExcel_Shared_Best_Fit
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared_Best_Fit
|
* @package PHPExcel_Shared_Best_Fit
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared_Best_Fit
|
* @package PHPExcel_Shared_Best_Fit
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared_Best_Fit
|
* @package PHPExcel_Shared_Best_Fit
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Shared_Best_Fit
|
* @package PHPExcel_Shared_Best_Fit
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Style
|
* @package PHPExcel_Style
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -675,7 +675,7 @@ class PHPExcel_Style implements PHPExcel_IComparable
|
|||||||
public function __clone() {
|
public function __clone() {
|
||||||
$vars = get_object_vars($this);
|
$vars = get_object_vars($this);
|
||||||
foreach ($vars as $key => $value) {
|
foreach ($vars as $key => $value) {
|
||||||
if (is_object($value)) {
|
if ((is_object($value)) && ($key != '_parent')) {
|
||||||
$this->$key = clone $value;
|
$this->$key = clone $value;
|
||||||
} else {
|
} else {
|
||||||
$this->$key = $value;
|
$this->$key = $value;
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Style
|
* @package PHPExcel_Style
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -479,7 +479,7 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
|||||||
public function __clone() {
|
public function __clone() {
|
||||||
$vars = get_object_vars($this);
|
$vars = get_object_vars($this);
|
||||||
foreach ($vars as $key => $value) {
|
foreach ($vars as $key => $value) {
|
||||||
if (is_object($value)) {
|
if ((is_object($value)) && ($key != '_parent')) {
|
||||||
$this->$key = clone $value;
|
$this->$key = clone $value;
|
||||||
} else {
|
} else {
|
||||||
$this->$key = $value;
|
$this->$key = $value;
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Style
|
* @package PHPExcel_Style
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -372,7 +372,7 @@ class PHPExcel_Style_Border implements PHPExcel_IComparable
|
|||||||
public function __clone() {
|
public function __clone() {
|
||||||
$vars = get_object_vars($this);
|
$vars = get_object_vars($this);
|
||||||
foreach ($vars as $key => $value) {
|
foreach ($vars as $key => $value) {
|
||||||
if (is_object($value)) {
|
if ((is_object($value)) && ($key != '_parent')) {
|
||||||
$this->$key = clone $value;
|
$this->$key = clone $value;
|
||||||
} else {
|
} else {
|
||||||
$this->$key = $value;
|
$this->$key = $value;
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Style
|
* @package PHPExcel_Style
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -489,7 +489,7 @@ class PHPExcel_Style_Borders implements PHPExcel_IComparable
|
|||||||
public function __clone() {
|
public function __clone() {
|
||||||
$vars = get_object_vars($this);
|
$vars = get_object_vars($this);
|
||||||
foreach ($vars as $key => $value) {
|
foreach ($vars as $key => $value) {
|
||||||
if (is_object($value)) {
|
if ((is_object($value)) && ($key != '_parent')) {
|
||||||
$this->$key = clone $value;
|
$this->$key = clone $value;
|
||||||
} else {
|
} else {
|
||||||
$this->$key = $value;
|
$this->$key = $value;
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Style
|
* @package PHPExcel_Style
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -398,7 +398,7 @@ class PHPExcel_Style_Color implements PHPExcel_IComparable
|
|||||||
public function __clone() {
|
public function __clone() {
|
||||||
$vars = get_object_vars($this);
|
$vars = get_object_vars($this);
|
||||||
foreach ($vars as $key => $value) {
|
foreach ($vars as $key => $value) {
|
||||||
if (is_object($value)) {
|
if ((is_object($value)) && ($key != '_parent')) {
|
||||||
$this->$key = clone $value;
|
$this->$key = clone $value;
|
||||||
} else {
|
} else {
|
||||||
$this->$key = $value;
|
$this->$key = $value;
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Style
|
* @package PHPExcel_Style
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Style
|
* @package PHPExcel_Style
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -391,7 +391,7 @@ class PHPExcel_Style_Fill implements PHPExcel_IComparable
|
|||||||
public function __clone() {
|
public function __clone() {
|
||||||
$vars = get_object_vars($this);
|
$vars = get_object_vars($this);
|
||||||
foreach ($vars as $key => $value) {
|
foreach ($vars as $key => $value) {
|
||||||
if (is_object($value)) {
|
if ((is_object($value)) && ($key != '_parent')) {
|
||||||
$this->$key = clone $value;
|
$this->$key = clone $value;
|
||||||
} else {
|
} else {
|
||||||
$this->$key = $value;
|
$this->$key = $value;
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Style
|
* @package PHPExcel_Style
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -609,7 +609,7 @@ class PHPExcel_Style_Font implements PHPExcel_IComparable
|
|||||||
public function __clone() {
|
public function __clone() {
|
||||||
$vars = get_object_vars($this);
|
$vars = get_object_vars($this);
|
||||||
foreach ($vars as $key => $value) {
|
foreach ($vars as $key => $value) {
|
||||||
if (is_object($value)) {
|
if ((is_object($value)) && ($key != '_parent')) {
|
||||||
$this->$key = clone $value;
|
$this->$key = clone $value;
|
||||||
} else {
|
} else {
|
||||||
$this->$key = $value;
|
$this->$key = $value;
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Style
|
* @package PHPExcel_Style
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -443,7 +443,7 @@ class PHPExcel_Style_NumberFormat implements PHPExcel_IComparable
|
|||||||
{
|
{
|
||||||
$vars = get_object_vars($this);
|
$vars = get_object_vars($this);
|
||||||
foreach ($vars as $key => $value) {
|
foreach ($vars as $key => $value) {
|
||||||
if (is_object($value)) {
|
if ((is_object($value)) && ($key != '_parent')) {
|
||||||
$this->$key = clone $value;
|
$this->$key = clone $value;
|
||||||
} else {
|
} else {
|
||||||
$this->$key = $value;
|
$this->$key = $value;
|
||||||
|
@@ -271,7 +271,7 @@ class PHPExcel_Style_Protection implements PHPExcel_IComparable
|
|||||||
public function __clone() {
|
public function __clone() {
|
||||||
$vars = get_object_vars($this);
|
$vars = get_object_vars($this);
|
||||||
foreach ($vars as $key => $value) {
|
foreach ($vars as $key => $value) {
|
||||||
if (is_object($value)) {
|
if ((is_object($value)) && ($key != '_parent')) {
|
||||||
$this->$key = clone $value;
|
$this->$key = clone $value;
|
||||||
} else {
|
} else {
|
||||||
$this->$key = $value;
|
$this->$key = $value;
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Worksheet
|
* @package PHPExcel_Worksheet
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -2180,9 +2180,8 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
|
|||||||
$highestRow = 1;
|
$highestRow = 1;
|
||||||
|
|
||||||
// Find cells that can be cleaned
|
// Find cells that can be cleaned
|
||||||
foreach ($this->_cellCollection->getCellList() as $coordinate) {
|
foreach ($this->_cellCollection->getCellList() as $coord) {
|
||||||
preg_match('/^(\w+)(\d+)$/U',$coordinate,$matches);
|
list($col,$row) = sscanf($coord,'%[A-Z]%d');
|
||||||
list(,$col,$row) = $matches;
|
|
||||||
$column = PHPExcel_Cell::columnIndexFromString($col);
|
$column = PHPExcel_Cell::columnIndexFromString($col);
|
||||||
|
|
||||||
// Determine highest column and row
|
// Determine highest column and row
|
||||||
@@ -2468,8 +2467,14 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_object($val) || (is_array($val))) {
|
if (is_object($val) || (is_array($val))) {
|
||||||
|
if ($key == '_cellCollection') {
|
||||||
|
$newCollection = clone $this->_cellCollection;
|
||||||
|
$newCollection->copyCellCollection($this);
|
||||||
|
$this->_cellCollection = $newCollection;
|
||||||
|
} else {
|
||||||
$this->{$key} = unserialize(serialize($val));
|
$this->{$key} = unserialize(serialize($val));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Worksheet
|
* @package PHPExcel_Worksheet
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Worksheet
|
* @package PHPExcel_Worksheet
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Worksheet
|
* @package PHPExcel_Worksheet
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Worksheet_Drawing
|
* @package PHPExcel_Worksheet_Drawing
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Worksheet_Drawing
|
* @package PHPExcel_Worksheet_Drawing
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Worksheet
|
* @package PHPExcel_Worksheet
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Worksheet
|
* @package PHPExcel_Worksheet
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Worksheet
|
* @package PHPExcel_Worksheet
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Worksheet
|
* @package PHPExcel_Worksheet
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Worksheet
|
* @package PHPExcel_Worksheet
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -179,6 +179,11 @@ class PHPExcel_Worksheet_PageSetup
|
|||||||
const ORIENTATION_LANDSCAPE = 'landscape';
|
const ORIENTATION_LANDSCAPE = 'landscape';
|
||||||
const ORIENTATION_PORTRAIT = 'portrait';
|
const ORIENTATION_PORTRAIT = 'portrait';
|
||||||
|
|
||||||
|
/* Print Range Set Method */
|
||||||
|
const SETPRINTRANGE_OVERWRITE = 'O';
|
||||||
|
const SETPRINTRANGE_INSERT = 'I';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Paper size
|
* Paper size
|
||||||
*
|
*
|
||||||
@@ -572,39 +577,146 @@ class PHPExcel_Worksheet_PageSetup
|
|||||||
/**
|
/**
|
||||||
* Get print area
|
* Get print area
|
||||||
*
|
*
|
||||||
|
* @param int $index Identifier for a specific print area range if several ranges have been set
|
||||||
|
* 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
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getPrintArea() {
|
public function getPrintArea($index = 0) {
|
||||||
|
if ($index == 0) {
|
||||||
return $this->_printArea;
|
return $this->_printArea;
|
||||||
}
|
}
|
||||||
|
$printAreas = explode(',',$this->_printArea);
|
||||||
|
if (isset($printAreas[$index-1])) {
|
||||||
|
return $printAreas[$index-1];
|
||||||
|
}
|
||||||
|
throw new Exception("Requested Print Area does not exist");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is print area set?
|
* Is print area set?
|
||||||
*
|
*
|
||||||
|
* @param int $index Identifier for a specific print area range if several ranges have been set
|
||||||
|
* Default behaviour, or an index value of 0, will identify whether any print range is set
|
||||||
|
* Otherwise, existence of the range identified by the value of $index will be returned
|
||||||
|
* Print areas are numbered from 1
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function isPrintAreaSet() {
|
public function isPrintAreaSet($index = 0) {
|
||||||
|
if ($index == 0) {
|
||||||
return !is_null($this->_printArea);
|
return !is_null($this->_printArea);
|
||||||
}
|
}
|
||||||
|
$printAreas = explode(',',$this->_printArea);
|
||||||
|
return isset($printAreas[$index-1]);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set print area. E.g. 'A1:D10' or 'A1:D10,G5:M20'
|
* Clear a print area
|
||||||
|
*
|
||||||
|
* @param int $index Identifier for a specific print area range if several ranges have been set
|
||||||
|
* Default behaviour, or an index value of 0, will clear all print ranges that are set
|
||||||
|
* Otherwise, the range identified by the value of $index will be removed from the series
|
||||||
|
* Print areas are numbered from 1
|
||||||
|
* @return PHPExcel_Worksheet_PageSetup
|
||||||
|
*/
|
||||||
|
public function clearPrintArea($index = 0) {
|
||||||
|
if ($index == 0) {
|
||||||
|
$this->_printArea = NULL;
|
||||||
|
} else {
|
||||||
|
$printAreas = explode(',',$this->_printArea);
|
||||||
|
if (isset($printAreas[$index-1])) {
|
||||||
|
unset($printAreas[$index-1]);
|
||||||
|
$this->_printArea = implode(',',$printAreas);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set print area. e.g. 'A1:D10' or 'A1:D10,G5:M20'
|
||||||
*
|
*
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
* @param int $index Identifier for a specific print area range allowing several ranges to be set
|
||||||
|
* When the method is "O"verwrite, then a positive integer index will overwrite that indexed
|
||||||
|
* entry in the print areas list; a negative index value will identify which entry to
|
||||||
|
* overwrite working bacward through the print area to the list, with the last entry as -1.
|
||||||
|
* Specifying an index value of 0, will overwrite <b>all</b> existing print ranges.
|
||||||
|
* When the method is "I"nsert, then a positive index will insert after that indexed entry in
|
||||||
|
* the print areas list, while a negative index will insert before the indexed entry.
|
||||||
|
* Specifying an index value of 0, will always append the new print range at the end of the
|
||||||
|
* list.
|
||||||
|
* Print areas are numbered from 1
|
||||||
|
* @param string $method Determines the method used when setting multiple print areas
|
||||||
|
* 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
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
* @return PHPExcel_Worksheet_PageSetup
|
* @return PHPExcel_Worksheet_PageSetup
|
||||||
*/
|
*/
|
||||||
public function setPrintArea($value) {
|
public function setPrintArea($value, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) {
|
||||||
if (strpos($value,':') === false) {
|
if (strpos($value,'!') !== false) {
|
||||||
|
throw new 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 Exception('Cell coordinate must be a range of cells.');
|
||||||
} elseif (strpos($value,'$') !== false) {
|
} elseif (strpos($value,'$') !== false) {
|
||||||
throw new Exception('Cell coordinate must not be absolute.');
|
throw new Exception('Cell coordinate must not be absolute.');
|
||||||
} else {
|
|
||||||
$this->_printArea = strtoupper($value);
|
|
||||||
}
|
}
|
||||||
|
$value = strtoupper($value);
|
||||||
|
|
||||||
|
if ($method == self::SETPRINTRANGE_OVERWRITE) {
|
||||||
|
if ($index == 0) {
|
||||||
|
$this->_printArea = $value;
|
||||||
|
} else {
|
||||||
|
$printAreas = explode(',',$this->_printArea);
|
||||||
|
if($index < 0) {
|
||||||
|
$index = count($printAreas) - abs($index) + 1;
|
||||||
|
}
|
||||||
|
if (($index <= 0) || ($index > count($printAreas))) {
|
||||||
|
throw new Exception('Invalid index for setting print range.');
|
||||||
|
}
|
||||||
|
$printAreas[$index-1] = $value;
|
||||||
|
$this->_printArea = implode(',',$printAreas);
|
||||||
|
}
|
||||||
|
} elseif($method == self::SETPRINTRANGE_INSERT) {
|
||||||
|
if ($index == 0) {
|
||||||
|
$this->_printArea .= ($this->_printArea == '') ? $value : ','.$value;
|
||||||
|
} else {
|
||||||
|
$printAreas = explode(',',$this->_printArea);
|
||||||
|
if($index < 0) {
|
||||||
|
$index = abs($index) - 1;
|
||||||
|
}
|
||||||
|
if ($index > count($printAreas)) {
|
||||||
|
throw new 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.');
|
||||||
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new print area (e.g. 'A1:D10' or 'A1:D10,G5:M20') to the list of print areas
|
||||||
|
*
|
||||||
|
* @param string $value
|
||||||
|
* @param int $index Identifier for a specific print area range allowing several ranges to be set
|
||||||
|
* A positive index will insert after that indexed entry in the print areas list, while a
|
||||||
|
* negative index will insert before the indexed entry.
|
||||||
|
* Specifying an index value of 0, will always append the new print range at the end of the
|
||||||
|
* list.
|
||||||
|
* Print areas are numbered from 1
|
||||||
|
* @throws Exception
|
||||||
|
* @return PHPExcel_Worksheet_PageSetup
|
||||||
|
*/
|
||||||
|
public function addPrintArea($value, $index = -1) {
|
||||||
|
return $this->setPrintArea($value, $index, self::SETPRINTRANGE_INSERT);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set print area
|
* Set print area
|
||||||
*
|
*
|
||||||
@@ -612,11 +724,46 @@ class PHPExcel_Worksheet_PageSetup
|
|||||||
* @param int $row1 Row 1
|
* @param int $row1 Row 1
|
||||||
* @param int $column2 Column 2
|
* @param int $column2 Column 2
|
||||||
* @param int $row2 Row 2
|
* @param int $row2 Row 2
|
||||||
|
* @param int $index Identifier for a specific print area range allowing several ranges to be set
|
||||||
|
* When the method is "O"verwrite, then a positive integer index will overwrite that indexed
|
||||||
|
* entry in the print areas list; a negative index value will identify which entry to
|
||||||
|
* overwrite working bacward through the print area to the list, with the last entry as -1.
|
||||||
|
* Specifying an index value of 0, will overwrite <b>all</b> existing print ranges.
|
||||||
|
* When the method is "I"nsert, then a positive index will insert after that indexed entry in
|
||||||
|
* the print areas list, while a negative index will insert before the indexed entry.
|
||||||
|
* Specifying an index value of 0, will always append the new print range at the end of the
|
||||||
|
* list.
|
||||||
|
* Print areas are numbered from 1
|
||||||
|
* @param string $method Determines the method used when setting multiple print areas
|
||||||
|
* 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
|
||||||
|
* @throws Exception
|
||||||
* @return PHPExcel_Worksheet_PageSetup
|
* @return PHPExcel_Worksheet_PageSetup
|
||||||
*/
|
*/
|
||||||
public function setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2)
|
public function setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE)
|
||||||
{
|
{
|
||||||
return $this->setPrintArea(PHPExcel_Cell::stringFromColumnIndex($column1) . $row1 . ':' . PHPExcel_Cell::stringFromColumnIndex($column2) . $row2);
|
return $this->setPrintArea(PHPExcel_Cell::stringFromColumnIndex($column1) . $row1 . ':' . PHPExcel_Cell::stringFromColumnIndex($column2) . $row2, $index, $method);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new print area to the list of print areas
|
||||||
|
*
|
||||||
|
* @param int $column1 Column 1
|
||||||
|
* @param int $row1 Row 1
|
||||||
|
* @param int $column2 Column 2
|
||||||
|
* @param int $row2 Row 2
|
||||||
|
* @param int $index Identifier for a specific print area range allowing several ranges to be set
|
||||||
|
* A positive index will insert after that indexed entry in the print areas list, while a
|
||||||
|
* negative index will insert before the indexed entry.
|
||||||
|
* Specifying an index value of 0, will always append the new print range at the end of the
|
||||||
|
* list.
|
||||||
|
* Print areas are numbered from 1
|
||||||
|
* @throws Exception
|
||||||
|
* @return PHPExcel_Worksheet_PageSetup
|
||||||
|
*/
|
||||||
|
public function addPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = -1)
|
||||||
|
{
|
||||||
|
return $this->setPrintArea(PHPExcel_Cell::stringFromColumnIndex($column1) . $row1 . ':' . PHPExcel_Cell::stringFromColumnIndex($column2) . $row2, $index, self::SETPRINTRANGE_INSERT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Worksheet
|
* @package PHPExcel_Worksheet
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* @package PHPExcel_Worksheet
|
* @package PHPExcel_Worksheet
|
||||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 1.7.3c, 2010-06-01
|
* @version 1.7.4, 2010-08-26
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user