Skip to content

Commit

Permalink
Changed feature: Updated phpExcel to 1.7.6
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@10146 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed May 29, 2011
1 parent 261f8ea commit 35fb65a
Show file tree
Hide file tree
Showing 163 changed files with 24,361 additions and 16,481 deletions.
16 changes: 5 additions & 11 deletions admin/classes/phpexcel/PHPExcel.php
Expand Up @@ -2,7 +2,7 @@
/**
* PHPExcel
*
* Copyright (c) 2006 - 2010 PHPExcel
* Copyright (c) 2006 - 2011 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -20,22 +20,16 @@
*
* @category PHPExcel
* @package PHPExcel
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 1.7.4, 2010-08-26
* @version 1.7.6, 2011-02-27
*/


/** PHPExcel root directory */
if (!defined('PHPEXCEL_ROOT')) {
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/');
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
PHPExcel_Autoloader::Register();
PHPExcel_Shared_ZipStreamWrapper::register();
// check mbstring.func_overload
if (ini_get('mbstring.func_overload') & 2) {
throw new Exception('Multibyte function overloading in PHP must be disabled for string functions (2).');
}
}


Expand All @@ -44,7 +38,7 @@
*
* @category PHPExcel
* @package PHPExcel
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel
{
Expand Down Expand Up @@ -628,7 +622,7 @@ public function removeCellXfByIndex($pIndex = 0)
// then update cellXf indexes for cells
foreach ($this->_workSheetCollection as $worksheet) {
foreach ($worksheet->getCellCollection(false) as $cellID) {
$cell = $sheet->getCell($cellID);
$cell = $worksheet->getCell($cellID);
$xfIndex = $cell->getXfIndex();
if ($xfIndex > $pIndex ) {
// decrease xf index by 1
Expand Down
15 changes: 12 additions & 3 deletions admin/classes/phpexcel/PHPExcel/Autoloader.php
Expand Up @@ -2,7 +2,7 @@
/**
* PHPExcel
*
* Copyright (c) 2006 - 2010 PHPExcel
* Copyright (c) 2006 - 2011 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -20,11 +20,20 @@
*
* @category PHPExcel
* @package PHPExcel
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 1.7.4, 2010-08-26
* @version 1.7.6, 2011-02-27
*/

PHPExcel_Autoloader::Register();
PHPExcel_Shared_ZipStreamWrapper::register();
// check mbstring.func_overload
if (ini_get('mbstring.func_overload') & 2) {
throw new Exception('Multibyte function overloading in PHP must be disabled for string functions (2).');
}
PHPExcel_Shared_String::buildCharacterSets();


class PHPExcel_Autoloader
{
public static function Register() {
Expand Down
8 changes: 4 additions & 4 deletions admin/classes/phpexcel/PHPExcel/CachedObjectStorage/APC.php
Expand Up @@ -2,7 +2,7 @@
/**
* PHPExcel
*
* Copyright (c) 2006 - 2010 PHPExcel
* Copyright (c) 2006 - 2011 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -20,9 +20,9 @@
*
* @category PHPExcel
* @package PHPExcel_CachedObjectStorage
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 1.7.4, 2010-08-26
* @version 1.7.6, 2011-02-27
*/


Expand All @@ -31,7 +31,7 @@
*
* @category PHPExcel
* @package PHPExcel_CachedObjectStorage
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache {

Expand Down
18 changes: 8 additions & 10 deletions admin/classes/phpexcel/PHPExcel/CachedObjectStorage/CacheBase.php
Expand Up @@ -2,7 +2,7 @@
/**
* PHPExcel
*
* Copyright (c) 2006 - 2010 PHPExcel
* Copyright (c) 2006 - 2011 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -20,9 +20,9 @@
*
* @category PHPExcel
* @package PHPExcel_CachedObjectStorage
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 1.7.4, 2010-08-26
* @version 1.7.6, 2011-02-27
*/


Expand All @@ -31,7 +31,7 @@
*
* @category PHPExcel
* @package PHPExcel_CachedObjectStorage
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_CachedObjectStorage_CacheBase {

Expand Down Expand Up @@ -98,9 +98,7 @@ public function isDataSet($pCoord) {
* @throws Exception
*/
public function updateCacheData(PHPExcel_Cell $cell) {
$pCoord = $cell->getCoordinate();

return $this->addCacheData($pCoord,$cell);
return $this->addCacheData($cell->getCoordinate(),$cell);
} // function updateCacheData()


Expand Down Expand Up @@ -140,9 +138,9 @@ public function getCellList() {
*/
public function getSortedCellList() {
$sortKeys = array();
foreach ($this->_cellCache as $coord => $value) {
list($colNum,$rowNum) = sscanf($coord,'%[A-Z]%d');
$sortKeys[sprintf('%09d%3s',$rowNum,$colNum)] = $coord;
foreach (array_keys($this->_cellCache) as $coord) {
list($column,$row) = sscanf($coord,'%[A-Z]%d');
$sortKeys[sprintf('%09d%3s',$row,$column)] = $coord;
}
ksort($sortKeys);

Expand Down
12 changes: 6 additions & 6 deletions admin/classes/phpexcel/PHPExcel/CachedObjectStorage/DiscISAM.php
Expand Up @@ -2,7 +2,7 @@
/**
* PHPExcel
*
* Copyright (c) 2006 - 2010 PHPExcel
* Copyright (c) 2006 - 2011 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -20,9 +20,9 @@
*
* @category PHPExcel
* @package PHPExcel_CachedObjectStorage
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 1.7.4, 2010-08-26
* @version 1.7.6, 2011-02-27
*/


Expand All @@ -31,7 +31,7 @@
*
* @category PHPExcel
* @package PHPExcel_CachedObjectStorage
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache {

Expand Down Expand Up @@ -112,7 +112,7 @@ 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';
$newFileName = PHPExcel_Shared_File::sys_get_temp_dir().'/PHPExcel.'.$baseUnique.'.cache';
// Copy the existing cell cache file
copy ($this->_fileName,$newFileName);
$this->_fileName = $newFileName;
Expand Down Expand Up @@ -140,7 +140,7 @@ public function __construct(PHPExcel_Worksheet $parent) {
parent::__construct($parent);
if (is_null($this->_fileHandle)) {
$baseUnique = $this->_getUniqueID();
$this->_fileName = sys_get_temp_dir().'/PHPExcel.'.$baseUnique.'.cache';
$this->_fileName = PHPExcel_Shared_File::sys_get_temp_dir().'/PHPExcel.'.$baseUnique.'.cache';
$this->_fileHandle = fopen($this->_fileName,'a+');
}
} // function __construct()
Expand Down
Expand Up @@ -2,7 +2,7 @@
/**
* PHPExcel
*
* Copyright (c) 2006 - 2010 PHPExcel
* Copyright (c) 2006 - 2011 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -20,9 +20,9 @@
*
* @category PHPExcel
* @package PHPExcel_CachedObjectStorage
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 1.7.4, 2010-08-26
* @version 1.7.6, 2011-02-27
*/


Expand All @@ -31,7 +31,7 @@
*
* @category PHPExcel
* @package PHPExcel_CachedObjectStorage
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
interface PHPExcel_CachedObjectStorage_ICache
{
Expand Down
11 changes: 4 additions & 7 deletions admin/classes/phpexcel/PHPExcel/CachedObjectStorage/Memcache.php
Expand Up @@ -2,7 +2,7 @@
/**
* PHPExcel
*
* Copyright (c) 2006 - 2010 PHPExcel
* Copyright (c) 2006 - 2011 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -20,9 +20,9 @@
*
* @category PHPExcel
* @package PHPExcel_CachedObjectStorage
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 1.7.4, 2010-08-26
* @version 1.7.6, 2011-02-27
*/


Expand All @@ -31,7 +31,7 @@
*
* @category PHPExcel
* @package PHPExcel_CachedObjectStorage
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache {

Expand Down Expand Up @@ -234,6 +234,3 @@ public function __destruct() {
} // function __destruct()

}


?>
21 changes: 17 additions & 4 deletions admin/classes/phpexcel/PHPExcel/CachedObjectStorage/Memory.php
Expand Up @@ -2,7 +2,7 @@
/**
* PHPExcel
*
* Copyright (c) 2006 - 2010 PHPExcel
* Copyright (c) 2006 - 2011 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -20,9 +20,9 @@
*
* @category PHPExcel
* @package PHPExcel_CachedObjectStorage
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 1.7.4, 2010-08-26
* @version 1.7.6, 2011-02-27
*/


Expand All @@ -31,7 +31,7 @@
*
* @category PHPExcel
* @package PHPExcel_CachedObjectStorage
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_CachedObjectStorage_Memory extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache {

Expand Down Expand Up @@ -68,6 +68,19 @@ public function getCacheData($pCoord) {
} // function getCacheData()


public function copyCellCollection(PHPExcel_Worksheet $parent) {
parent::copyCellCollection($parent);

$newCollection = array();
foreach($this->_cellCache as $k => &$cell) {
$newCollection[$k] = clone $cell;
$newCollection[$k]->attach($parent);
}

$this->_cellCache = $newCollection;
}


public function unsetWorksheetCells() {
// Because cells are all stored as intact objects in memory, we need to detach each one from the parent
foreach($this->_cellCache as $k => &$cell) {
Expand Down
Expand Up @@ -2,7 +2,7 @@
/**
* PHPExcel
*
* Copyright (c) 2006 - 2010 PHPExcel
* Copyright (c) 2006 - 2011 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -20,9 +20,9 @@
*
* @category PHPExcel
* @package PHPExcel_CachedObjectStorage
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 1.7.4, 2010-08-26
* @version 1.7.6, 2011-02-27
*/


Expand All @@ -31,7 +31,7 @@
*
* @category PHPExcel
* @package PHPExcel_CachedObjectStorage
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_CachedObjectStorage_MemoryGZip extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache {

Expand Down
Expand Up @@ -2,7 +2,7 @@
/**
* PHPExcel
*
* Copyright (c) 2006 - 2010 PHPExcel
* Copyright (c) 2006 - 2011 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -20,9 +20,9 @@
*
* @category PHPExcel
* @package PHPExcel_CachedObjectStorage
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 1.7.4, 2010-08-26
* @version 1.7.6, 2011-02-27
*/


Expand All @@ -31,7 +31,7 @@
*
* @category PHPExcel
* @package PHPExcel_CachedObjectStorage
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_CachedObjectStorage_MemorySerialized extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache {

Expand Down

0 comments on commit 35fb65a

Please sign in to comment.