Update library PHPExcel to version 1.7.4
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
* @package PHPExcel_CachedObjectStorage
|
||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
* @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;
|
||||
}
|
||||
|
||||
if (isset($this->_cellCache[$pCoord])) {
|
||||
if (is_object($this->_cellCache[$pCoord])) {
|
||||
$this->_cellCache[$pCoord]->detach();
|
||||
unset($this->_cellCache[$pCoord]);
|
||||
}
|
||||
@@ -141,13 +141,34 @@ class PHPExcel_CachedObjectStorage_CacheBase {
|
||||
public function getSortedCellList() {
|
||||
$sortKeys = array();
|
||||
foreach ($this->_cellCache as $coord => $value) {
|
||||
preg_match('/^(\w+)(\d+)$/U',$coord,$matches);
|
||||
list(,$colNum,$rowNum) = $matches;
|
||||
$sortKeys[$coord] = str_pad($rowNum . str_pad($colNum,3,'@',STR_PAD_LEFT),12,'0',STR_PAD_LEFT);
|
||||
list($colNum,$rowNum) = sscanf($coord,'%[A-Z]%d');
|
||||
$sortKeys[sprintf('%09d%3s',$rowNum,$colNum)] = $coord;
|
||||
}
|
||||
asort($sortKeys);
|
||||
ksort($sortKeys);
|
||||
|
||||
return array_keys($sortKeys);
|
||||
return array_values($sortKeys);
|
||||
} // 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()
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user