A lot of namespacing work
This commit is contained in:
parent
fff1f247f6
commit
c2f5bd844d
|
@ -34,7 +34,8 @@ class Autoloader
|
||||||
* Register the Autoloader with SPL
|
* Register the Autoloader with SPL
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function register() {
|
public static function register()
|
||||||
|
{
|
||||||
if (function_exists('__autoload')) {
|
if (function_exists('__autoload')) {
|
||||||
// Register any existing autoloader function with SPL, so we don't get any clashes
|
// Register any existing autoloader function with SPL, so we don't get any clashes
|
||||||
spl_autoload_register('__autoload');
|
spl_autoload_register('__autoload');
|
||||||
|
@ -49,7 +50,8 @@ class Autoloader
|
||||||
*
|
*
|
||||||
* @param string $className Name of the object to load
|
* @param string $className Name of the object to load
|
||||||
*/
|
*/
|
||||||
public static function load($className) {
|
public static function load($className)
|
||||||
|
{
|
||||||
if ((class_exists($className, false)) || (strpos($className, 'PHPExcel\\') !== 0)) {
|
if ((class_exists($className, false)) || (strpos($className, 'PHPExcel\\') !== 0)) {
|
||||||
// Either already loaded, or not a PHPExcel class request
|
// Either already loaded, or not a PHPExcel class request
|
||||||
return false;
|
return false;
|
||||||
|
@ -66,4 +68,4 @@ class Autoloader
|
||||||
}
|
}
|
||||||
require($classFilePath);
|
require($classFilePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,81 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
PHPExcel_Autoloader::register();
|
|
||||||
// As we always try to run the autoloader before anything else, we can use it to do a few
|
|
||||||
// simple checks and initialisations
|
|
||||||
//PHPExcel_Shared_ZipStreamWrapper::register();
|
|
||||||
// check mbstring.func_overload
|
|
||||||
if (ini_get('mbstring.func_overload') & 2) {
|
|
||||||
throw new PHPExcel_Exception('Multibyte function overloading in PHP must be disabled for string functions (2).');
|
|
||||||
}
|
|
||||||
PHPExcel_Shared_String::buildCharacterSets();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PHPExcel
|
|
||||||
*
|
|
||||||
* Copyright (c) 2006 - 2015 PHPExcel
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* @category PHPExcel
|
|
||||||
* @package PHPExcel
|
|
||||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
|
||||||
* @version ##VERSION##, ##DATE##
|
|
||||||
*/
|
|
||||||
class PHPExcel_Autoloader
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Register the Autoloader with SPL
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public static function register()
|
|
||||||
{
|
|
||||||
if (function_exists('__autoload')) {
|
|
||||||
// Register any existing autoloader function with SPL, so we don't get any clashes
|
|
||||||
spl_autoload_register('__autoload');
|
|
||||||
}
|
|
||||||
// Register ourselves with SPL
|
|
||||||
if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
|
|
||||||
return spl_autoload_register(array('PHPExcel_Autoloader', 'load'), true, true);
|
|
||||||
} else {
|
|
||||||
return spl_autoload_register(array('PHPExcel_Autoloader', 'load'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Autoload a class identified by name
|
|
||||||
*
|
|
||||||
* @param string $pClassName Name of the object to load
|
|
||||||
*/
|
|
||||||
public static function load($pClassName)
|
|
||||||
{
|
|
||||||
if ((class_exists($pClassName, false)) || (strpos($pClassName, 'PHPExcel') !== 0)) {
|
|
||||||
// Either already loaded, or not a PHPExcel class request
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$pClassFilePath = PHPEXCEL_ROOT .
|
|
||||||
str_replace('_', DIRECTORY_SEPARATOR, $pClassName) .
|
|
||||||
'.php';
|
|
||||||
|
|
||||||
if ((file_exists($pClassFilePath) === false) || (is_readable($pClassFilePath) === false)) {
|
|
||||||
// Can't load
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
require($pClassFilePath);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\CachedObjectStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_CachedObjectStorage_APC
|
* PHPExcel_CachedObjectStorage_APC
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache
|
class APC extends CacheBase implements ICache
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Prefix used to uniquely identify cache data for this worksheet
|
* Prefix used to uniquely identify cache data for this worksheet
|
||||||
|
@ -48,8 +50,7 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach
|
||||||
* and the 'nullify' the current cell object
|
* and the 'nullify' the current cell object
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
* @return void
|
* @throws \PHPExcel\Exception
|
||||||
* @throws PHPExcel_Exception
|
|
||||||
*/
|
*/
|
||||||
protected function storeData()
|
protected function storeData()
|
||||||
{
|
{
|
||||||
|
@ -62,7 +63,7 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach
|
||||||
$this->cacheTime
|
$this->cacheTime
|
||||||
)) {
|
)) {
|
||||||
$this->__destruct();
|
$this->__destruct();
|
||||||
throw new PHPExcel_Exception('Failed to store cell ' . $this->currentObjectID . ' in APC');
|
throw new \PHPExcel\Exception('Failed to store cell ' . $this->currentObjectID . ' in APC');
|
||||||
}
|
}
|
||||||
$this->currentCellIsDirty = false;
|
$this->currentCellIsDirty = false;
|
||||||
}
|
}
|
||||||
|
@ -74,11 +75,11 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $pCoord Coordinate address of the cell to update
|
* @param string $pCoord Coordinate address of the cell to update
|
||||||
* @param PHPExcel_Cell $cell Cell to update
|
* @param \PHPExcel\Cell $cell Cell to update
|
||||||
* @return PHPExcel_Cell
|
* @return \PHPExcel\Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function addCacheData($pCoord, PHPExcel_Cell $cell)
|
public function addCacheData($pCoord, \PHPExcel\Cell $cell)
|
||||||
{
|
{
|
||||||
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
||||||
$this->storeData();
|
$this->storeData();
|
||||||
|
@ -97,7 +98,7 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $pCoord Coordinate address of the cell to check
|
* @param string $pCoord Coordinate address of the cell to check
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function isDataSet($pCoord)
|
public function isDataSet($pCoord)
|
||||||
|
@ -112,7 +113,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 PHPExcel_Exception('Cell entry '.$pCoord.' no longer exists in APC cache');
|
throw new \PHPExcel\Exception('Cell entry '.$pCoord.' no longer exists in APC cache');
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -191,11 +192,10 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach
|
||||||
* Clone the cell collection
|
* Clone the cell collection
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param PHPExcel_Worksheet $parent The new worksheet
|
* @param \PHPExcel\Worksheet $parent The new worksheet that we're copying to
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function copyCellCollection(PHPExcel_Worksheet $parent)
|
public function copyCellCollection(\PHPExcel\Worksheet $parent)
|
||||||
{
|
{
|
||||||
parent::copyCellCollection($parent);
|
parent::copyCellCollection($parent);
|
||||||
// Get a new id for the new file name
|
// Get a new id for the new file name
|
||||||
|
@ -208,11 +208,11 @@ 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($cellID);
|
parent::deleteCacheData($cellID);
|
||||||
throw new PHPExcel_Exception('Cell entry ' . $cellID . ' no longer exists in APC');
|
throw new \PHPExcel\Exception('Cell entry ' . $cellID . ' no longer exists in APC');
|
||||||
}
|
}
|
||||||
if (!apc_store($newCachePrefix . $cellID . '.cache', $obj, $this->cacheTime)) {
|
if (!apc_store($newCachePrefix . $cellID . '.cache', $obj, $this->cacheTime)) {
|
||||||
$this->__destruct();
|
$this->__destruct();
|
||||||
throw new PHPExcel_Exception('Failed to store cell ' . $cellID . ' in APC');
|
throw new \PHPExcel\Exception('Failed to store cell ' . $cellID . ' in APC');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\CachedObjectStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_CachedObjectStorage_CacheBase
|
* PHPExcel_CachedObjectStorage_CacheBase
|
||||||
*
|
*
|
||||||
|
@ -25,19 +27,19 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
abstract class PHPExcel_CachedObjectStorage_CacheBase
|
abstract class CacheBase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Parent worksheet
|
* Parent worksheet
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Worksheet
|
* @var \PHPExcel\Worksheet
|
||||||
*/
|
*/
|
||||||
protected $parent;
|
protected $parent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The currently active Cell
|
* The currently active Cell
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Cell
|
* @var \PHPExcel\Cell
|
||||||
*/
|
*/
|
||||||
protected $currentObject = null;
|
protected $currentObject = null;
|
||||||
|
|
||||||
|
@ -66,12 +68,12 @@ abstract class PHPExcel_CachedObjectStorage_CacheBase
|
||||||
/**
|
/**
|
||||||
* Initialise this new cell collection
|
* Initialise this new cell collection
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $parent The worksheet for this cell collection
|
* @param \PHPExcel\Worksheet $parent The worksheet for this cell collection
|
||||||
*/
|
*/
|
||||||
public function __construct(PHPExcel_Worksheet $parent)
|
public function __construct(\PHPExcel\Worksheet $parent)
|
||||||
{
|
{
|
||||||
// Set our parent worksheet.
|
// Set our parent worksheet.
|
||||||
// This is maintained within the cache controller to facilitate re-attaching it to PHPExcel_Cell objects when
|
// This is maintained within the cache controller to facilitate re-attaching it to \PHPExcel\Cell objects when
|
||||||
// they are woken from a serialized state
|
// they are woken from a serialized state
|
||||||
$this->parent = $parent;
|
$this->parent = $parent;
|
||||||
}
|
}
|
||||||
|
@ -79,7 +81,7 @@ abstract class PHPExcel_CachedObjectStorage_CacheBase
|
||||||
/**
|
/**
|
||||||
* Return the parent worksheet for this cell collection
|
* Return the parent worksheet for this cell collection
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Worksheet
|
* @return \PHPExcel\Worksheet
|
||||||
*/
|
*/
|
||||||
public function getParent()
|
public function getParent()
|
||||||
{
|
{
|
||||||
|
@ -87,7 +89,7 @@ abstract class PHPExcel_CachedObjectStorage_CacheBase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell?
|
* Is a value set in the current \PHPExcel\CachedObjectStorage\ICache for an indexed cell?
|
||||||
*
|
*
|
||||||
* @param string $pCoord Coordinate address of the cell to check
|
* @param string $pCoord Coordinate address of the cell to check
|
||||||
* @return boolean
|
* @return boolean
|
||||||
|
@ -125,11 +127,11 @@ abstract class PHPExcel_CachedObjectStorage_CacheBase
|
||||||
/**
|
/**
|
||||||
* Add or Update a cell in cache
|
* Add or Update a cell in cache
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Cell $cell Cell to update
|
* @param \PHPExcel\Cell $cell Cell to update
|
||||||
* @return PHPExcel_Cell
|
* @return \PHPExcel\Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function updateCacheData(PHPExcel_Cell $cell)
|
public function updateCacheData(\PHPExcel\Cell $cell)
|
||||||
{
|
{
|
||||||
return $this->addCacheData($cell->getCoordinate(), $cell);
|
return $this->addCacheData($cell->getCoordinate(), $cell);
|
||||||
}
|
}
|
||||||
|
@ -138,7 +140,7 @@ abstract class PHPExcel_CachedObjectStorage_CacheBase
|
||||||
* Delete a cell in cache identified by coordinate address
|
* Delete a cell in cache identified by coordinate address
|
||||||
*
|
*
|
||||||
* @param string $pCoord Coordinate address of the cell to delete
|
* @param string $pCoord Coordinate address of the cell to delete
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function deleteCacheData($pCoord)
|
public function deleteCacheData($pCoord)
|
||||||
{
|
{
|
||||||
|
@ -260,9 +262,9 @@ abstract class PHPExcel_CachedObjectStorage_CacheBase
|
||||||
if ($r != $row) {
|
if ($r != $row) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$columnList[] = PHPExcel_Cell::columnIndexFromString($c);
|
$columnList[] = \PHPExcel\Cell::columnIndexFromString($c);
|
||||||
}
|
}
|
||||||
return PHPExcel_Cell::stringFromColumnIndex(max($columnList) - 1);
|
return \PHPExcel\Cell::stringFromColumnIndex(max($columnList) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -309,10 +311,9 @@ abstract class PHPExcel_CachedObjectStorage_CacheBase
|
||||||
/**
|
/**
|
||||||
* Clone the cell collection
|
* Clone the cell collection
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $parent The new worksheet
|
* @param \PHPExcel\Worksheet $parent The new worksheet that we're copying to
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function copyCellCollection(PHPExcel_Worksheet $parent)
|
public function copyCellCollection(\PHPExcel\Worksheet $parent)
|
||||||
{
|
{
|
||||||
$this->currentCellIsDirty;
|
$this->currentCellIsDirty;
|
||||||
$this->storeData();
|
$this->storeData();
|
||||||
|
@ -321,7 +322,7 @@ abstract class PHPExcel_CachedObjectStorage_CacheBase
|
||||||
if (($this->currentObject !== null) && (is_object($this->currentObject))) {
|
if (($this->currentObject !== null) && (is_object($this->currentObject))) {
|
||||||
$this->currentObject->attach($this);
|
$this->currentObject->attach($this);
|
||||||
}
|
}
|
||||||
} // function copyCellCollection()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove a row, deleting all cells in that row
|
* Remove a row, deleting all cells in that row
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\CachedObjectStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_CachedObjectStorage_DiscISAM
|
* PHPExcel_CachedObjectStorage_DiscISAM
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache
|
class DiscISAM extends CacheBase implements ICache
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Name of the file for this cache
|
* Name of the file for this cache
|
||||||
|
@ -75,11 +77,11 @@ class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage
|
||||||
* Add or Update a cell in cache identified by coordinate address
|
* Add or Update a cell in cache identified by coordinate address
|
||||||
*
|
*
|
||||||
* @param string $pCoord Coordinate address of the cell to update
|
* @param string $pCoord Coordinate address of the cell to update
|
||||||
* @param PHPExcel_Cell $cell Cell to update
|
* @param \PHPExcel\Cell $cell Cell to update
|
||||||
* @return PHPExcel_Cell
|
* @return \PHPExcel\Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function addCacheData($pCoord, PHPExcel_Cell $cell)
|
public function addCacheData($pCoord, \PHPExcel\Cell $cell)
|
||||||
{
|
{
|
||||||
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
||||||
$this->storeData();
|
$this->storeData();
|
||||||
|
@ -140,9 +142,9 @@ class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage
|
||||||
/**
|
/**
|
||||||
* Clone the cell collection
|
* Clone the cell collection
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $parent The new worksheet
|
* @param \PHPExcel\Worksheet $parent The new worksheet that we're copying to
|
||||||
*/
|
*/
|
||||||
public function copyCellCollection(PHPExcel_Worksheet $parent)
|
public function copyCellCollection(\PHPExcel\Worksheet $parent)
|
||||||
{
|
{
|
||||||
parent::copyCellCollection($parent);
|
parent::copyCellCollection($parent);
|
||||||
// Get a new id for the new file name
|
// Get a new id for the new file name
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\CachedObjectStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_CachedObjectStorage_ICache
|
* PHPExcel_CachedObjectStorage_ICache
|
||||||
*
|
*
|
||||||
|
@ -25,26 +27,26 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
interface PHPExcel_CachedObjectStorage_ICache
|
interface ICache
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Add or Update a cell in cache identified by coordinate address
|
* Add or Update a cell in cache identified by coordinate address
|
||||||
*
|
*
|
||||||
* @param string $pCoord Coordinate address of the cell to update
|
* @param string $pCoord Coordinate address of the cell to update
|
||||||
* @param PHPExcel_Cell $cell Cell to update
|
* @param \PHPExcel\Cell $cell Cell to update
|
||||||
* @return PHPExcel_Cell
|
* @return \PHPExcel\Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function addCacheData($pCoord, PHPExcel_Cell $cell);
|
public function addCacheData($pCoord, \PHPExcel\Cell $cell);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add or Update a cell in cache
|
* Add or Update a cell in cache
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Cell $cell Cell to update
|
* @param \PHPExcel\Cell $cell Cell to update
|
||||||
* @return PHPExcel_Cell
|
* @return \PHPExcel\Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function updateCacheData(PHPExcel_Cell $cell);
|
public function updateCacheData(\PHPExcel\Cell $cell);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch a cell from cache identified by coordinate address
|
* Fetch a cell from cache identified by coordinate address
|
||||||
|
@ -88,10 +90,9 @@ interface PHPExcel_CachedObjectStorage_ICache
|
||||||
/**
|
/**
|
||||||
* Clone the cell collection
|
* Clone the cell collection
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $parent The new worksheet
|
* @param \PHPExcel\Worksheet $parent The new worksheet that we're copying to
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function copyCellCollection(PHPExcel_Worksheet $parent);
|
public function copyCellCollection(\PHPExcel\Worksheet $parent);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Identify whether the caching method is currently available
|
* Identify whether the caching method is currently available
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\CachedObjectStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_CachedObjectStorage_Igbinary
|
* PHPExcel_CachedObjectStorage_Igbinary
|
||||||
*
|
*
|
||||||
|
@ -25,14 +27,14 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_CachedObjectStorage_Igbinary extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache
|
class Igbinary extends CacheBase implements ICache
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Store cell data in cache for the current cell object if it's "dirty",
|
* Store cell data in cache for the current cell object if it's "dirty",
|
||||||
* and the 'nullify' the current cell object
|
* and the 'nullify' the current cell object
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
protected function storeData()
|
protected function storeData()
|
||||||
{
|
{
|
||||||
|
@ -49,12 +51,12 @@ class PHPExcel_CachedObjectStorage_Igbinary extends PHPExcel_CachedObjectStorage
|
||||||
/**
|
/**
|
||||||
* Add or Update a cell in cache identified by coordinate address
|
* Add or Update a cell in cache identified by coordinate address
|
||||||
*
|
*
|
||||||
* @param string $pCoord Coordinate address of the cell to update
|
* @param string $pCoord Coordinate address of the cell to update
|
||||||
* @param PHPExcel_Cell $cell Cell to update
|
* @param \PHPExcel\Cell $cell Cell to update
|
||||||
* @return PHPExcel_Cell
|
* @return \PHPExcel\Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function addCacheData($pCoord, PHPExcel_Cell $cell)
|
public function addCacheData($pCoord, \PHPExcel\Cell $cell)
|
||||||
{
|
{
|
||||||
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
||||||
$this->storeData();
|
$this->storeData();
|
||||||
|
@ -65,15 +67,15 @@ class PHPExcel_CachedObjectStorage_Igbinary extends PHPExcel_CachedObjectStorage
|
||||||
$this->currentCellIsDirty = true;
|
$this->currentCellIsDirty = true;
|
||||||
|
|
||||||
return $cell;
|
return $cell;
|
||||||
} // function addCacheData()
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get cell at a specific coordinate
|
* Get cell at a specific coordinate
|
||||||
*
|
*
|
||||||
* @param string $pCoord Coordinate of the cell
|
* @param string $pCoord Coordinate of the cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return PHPExcel_Cell Cell that was found, or null if not found
|
* @return \PHPExcel\Cell Cell that was found, or null if not found
|
||||||
*/
|
*/
|
||||||
public function getCacheData($pCoord)
|
public function getCacheData($pCoord)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\CachedObjectStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_CachedObjectStorage_Memcache
|
* PHPExcel_CachedObjectStorage_Memcache
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache
|
class Memcache extends CacheBase implements ICache
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Prefix used to uniquely identify cache data for this worksheet
|
* Prefix used to uniquely identify cache data for this worksheet
|
||||||
|
@ -53,8 +55,7 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage
|
||||||
* Store cell data in cache for the current cell object if it's "dirty",
|
* Store cell data in cache for the current cell object if it's "dirty",
|
||||||
* and the 'nullify' the current cell object
|
* and the 'nullify' the current cell object
|
||||||
*
|
*
|
||||||
* @return void
|
* @throws \PHPExcel\Exception
|
||||||
* @throws PHPExcel_Exception
|
|
||||||
*/
|
*/
|
||||||
protected function storeData()
|
protected function storeData()
|
||||||
{
|
{
|
||||||
|
@ -65,24 +66,24 @@ 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 PHPExcel_Exception("Failed to store cell {$this->currentObjectID} in MemCache");
|
throw new \PHPExcel\Exception("Failed to store cell {$this->currentObjectID} in MemCache");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->currentCellIsDirty = false;
|
$this->currentCellIsDirty = false;
|
||||||
}
|
}
|
||||||
$this->currentObjectID = $this->currentObject = null;
|
$this->currentObjectID = $this->currentObject = null;
|
||||||
} // function _storeData()
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add or Update a cell in cache identified by coordinate address
|
* Add or Update a cell in cache identified by coordinate address
|
||||||
*
|
*
|
||||||
* @param string $pCoord Coordinate address of the cell to update
|
* @param string $pCoord Coordinate address of the cell to update
|
||||||
* @param PHPExcel_Cell $cell Cell to update
|
* @param \PHPExcel\Cell $cell Cell to update
|
||||||
* @return PHPExcel_Cell
|
* @return \PHPExcel\Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function addCacheData($pCoord, PHPExcel_Cell $cell)
|
public function addCacheData($pCoord, \PHPExcel\Cell $cell)
|
||||||
{
|
{
|
||||||
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
||||||
$this->storeData();
|
$this->storeData();
|
||||||
|
@ -94,7 +95,7 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage
|
||||||
$this->currentCellIsDirty = true;
|
$this->currentCellIsDirty = true;
|
||||||
|
|
||||||
return $cell;
|
return $cell;
|
||||||
} // function addCacheData()
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -193,10 +194,9 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage
|
||||||
/**
|
/**
|
||||||
* Clone the cell collection
|
* Clone the cell collection
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $parent The new worksheet
|
* @param \PHPExcel\Worksheet $parent The new worksheet that we're copying to
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function copyCellCollection(PHPExcel_Worksheet $parent)
|
public function copyCellCollection(\PHPExcel\Worksheet $parent)
|
||||||
{
|
{
|
||||||
parent::copyCellCollection($parent);
|
parent::copyCellCollection($parent);
|
||||||
// Get a new id for the new file name
|
// Get a new id for the new file name
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\CachedObjectStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_CachedObjectStorage_Memory
|
* PHPExcel_CachedObjectStorage_Memory
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_CachedObjectStorage_Memory extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache
|
class Memory extends CacheBase implements ICache
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Dummy method callable from CacheBase, but unused by Memory cache
|
* Dummy method callable from CacheBase, but unused by Memory cache
|
||||||
|
@ -39,12 +41,12 @@ class PHPExcel_CachedObjectStorage_Memory extends PHPExcel_CachedObjectStorage_C
|
||||||
/**
|
/**
|
||||||
* Add or Update a cell in cache identified by coordinate address
|
* Add or Update a cell in cache identified by coordinate address
|
||||||
*
|
*
|
||||||
* @param string $pCoord Coordinate address of the cell to update
|
* @param string $pCoord Coordinate address of the cell to update
|
||||||
* @param PHPExcel_Cell $cell Cell to update
|
* @param \PHPExcel\Cell $cell Cell to update
|
||||||
* @return PHPExcel_Cell
|
* @return \PHPExcel\Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function addCacheData($pCoord, PHPExcel_Cell $cell)
|
public function addCacheData($pCoord, \PHPExcel\Cell $cell)
|
||||||
{
|
{
|
||||||
$this->cellCache[$pCoord] = $cell;
|
$this->cellCache[$pCoord] = $cell;
|
||||||
|
|
||||||
|
@ -82,9 +84,9 @@ class PHPExcel_CachedObjectStorage_Memory extends PHPExcel_CachedObjectStorage_C
|
||||||
/**
|
/**
|
||||||
* Clone the cell collection
|
* Clone the cell collection
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $parent The new worksheet
|
* @param \PHPExcel\Worksheet $parent The new worksheet that we're copying to
|
||||||
*/
|
*/
|
||||||
public function copyCellCollection(PHPExcel_Worksheet $parent)
|
public function copyCellCollection(\PHPExcel\Worksheet $parent)
|
||||||
{
|
{
|
||||||
parent::copyCellCollection($parent);
|
parent::copyCellCollection($parent);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\CachedObjectStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_CachedObjectStorage_MemoryGZip
|
* PHPExcel_CachedObjectStorage_MemoryGZip
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_CachedObjectStorage_MemoryGZip extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache
|
class MemoryGZip extends CacheBase implements ICache
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Store cell data in cache for the current cell object if it's "dirty",
|
* Store cell data in cache for the current cell object if it's "dirty",
|
||||||
|
@ -49,12 +51,12 @@ class PHPExcel_CachedObjectStorage_MemoryGZip extends PHPExcel_CachedObjectStora
|
||||||
/**
|
/**
|
||||||
* Add or Update a cell in cache identified by coordinate address
|
* Add or Update a cell in cache identified by coordinate address
|
||||||
*
|
*
|
||||||
* @param string $pCoord Coordinate address of the cell to update
|
* @param string $pCoord Coordinate address of the cell to update
|
||||||
* @param PHPExcel_Cell $cell Cell to update
|
* @param \PHPExcel\Cell $cell Cell to update
|
||||||
* @return PHPExcel_Cell
|
* @return \PHPExcel\Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function addCacheData($pCoord, PHPExcel_Cell $cell)
|
public function addCacheData($pCoord, \PHPExcel\Cell $cell)
|
||||||
{
|
{
|
||||||
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
||||||
$this->storeData();
|
$this->storeData();
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\CachedObjectStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_CachedObjectStorage_MemorySerialized
|
* PHPExcel_CachedObjectStorage_MemorySerialized
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_CachedObjectStorage_MemorySerialized extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache
|
class MemorySerialized extends CacheBase implements ICache
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Store cell data in cache for the current cell object if it's "dirty",
|
* Store cell data in cache for the current cell object if it's "dirty",
|
||||||
|
@ -48,12 +50,12 @@ class PHPExcel_CachedObjectStorage_MemorySerialized extends PHPExcel_CachedObjec
|
||||||
/**
|
/**
|
||||||
* Add or Update a cell in cache identified by coordinate address
|
* Add or Update a cell in cache identified by coordinate address
|
||||||
*
|
*
|
||||||
* @param string $pCoord Coordinate address of the cell to update
|
* @param string $pCoord Coordinate address of the cell to update
|
||||||
* @param PHPExcel_Cell $cell Cell to update
|
* @param \PHPExcel\Cell $cell Cell to update
|
||||||
* @return PHPExcel_Cell
|
* @return \PHPExcel\Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function addCacheData($pCoord, PHPExcel_Cell $cell)
|
public function addCacheData($pCoord, \PHPExcel\Cell $cell)
|
||||||
{
|
{
|
||||||
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
||||||
$this->storeData();
|
$this->storeData();
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\CachedObjectStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_CachedObjectStorage_PHPTemp
|
* PHPExcel_CachedObjectStorage_PHPTemp
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache
|
class PHPTemp extends CacheBase implements ICache
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Name of the file for this cache
|
* Name of the file for this cache
|
||||||
|
@ -45,8 +47,7 @@ class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_
|
||||||
* Store cell data in cache for the current cell object if it's "dirty",
|
* Store cell data in cache for the current cell object if it's "dirty",
|
||||||
* and the 'nullify' the current cell object
|
* and the 'nullify' the current cell object
|
||||||
*
|
*
|
||||||
* @return void
|
* @throws \PHPExcel\Exception
|
||||||
* @throws PHPExcel_Exception
|
|
||||||
*/
|
*/
|
||||||
protected function storeData()
|
protected function storeData()
|
||||||
{
|
{
|
||||||
|
@ -68,12 +69,12 @@ class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_
|
||||||
/**
|
/**
|
||||||
* Add or Update a cell in cache identified by coordinate address
|
* Add or Update a cell in cache identified by coordinate address
|
||||||
*
|
*
|
||||||
* @param string $pCoord Coordinate address of the cell to update
|
* @param string $pCoord Coordinate address of the cell to update
|
||||||
* @param PHPExcel_Cell $cell Cell to update
|
* @param \PHPExcel\Cell $cell Cell to update
|
||||||
* @return PHPExcel_Cell
|
* @return \PHPExcel\Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function addCacheData($pCoord, PHPExcel_Cell $cell)
|
public function addCacheData($pCoord, \PHPExcel\Cell $cell)
|
||||||
{
|
{
|
||||||
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
||||||
$this->storeData();
|
$this->storeData();
|
||||||
|
@ -135,10 +136,9 @@ class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_
|
||||||
/**
|
/**
|
||||||
* Clone the cell collection
|
* Clone the cell collection
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $parent The new worksheet
|
* @param \PHPExcel\Worksheet $parent The new worksheet that we're copying to
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function copyCellCollection(PHPExcel_Worksheet $parent)
|
public function copyCellCollection(\PHPExcel\Worksheet $parent)
|
||||||
{
|
{
|
||||||
parent::copyCellCollection($parent);
|
parent::copyCellCollection($parent);
|
||||||
// Open a new stream for the cell cache data
|
// Open a new stream for the cell cache data
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\CachedObjectStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_CachedObjectStorage_SQLite
|
* PHPExcel_CachedObjectStorage_SQLite
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache
|
class SQLite extends CacheBase implements ICache
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Database table name
|
* Database table name
|
||||||
|
@ -45,8 +47,7 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C
|
||||||
* Store cell data in cache for the current cell object if it's "dirty",
|
* Store cell data in cache for the current cell object if it's "dirty",
|
||||||
* and the 'nullify' the current cell object
|
* and the 'nullify' the current cell object
|
||||||
*
|
*
|
||||||
* @return void
|
* @throws \PHPExcel\Exception
|
||||||
* @throws PHPExcel_Exception
|
|
||||||
*/
|
*/
|
||||||
protected function storeData()
|
protected function storeData()
|
||||||
{
|
{
|
||||||
|
@ -54,7 +55,7 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C
|
||||||
$this->currentObject->detach();
|
$this->currentObject->detach();
|
||||||
|
|
||||||
if (!$this->DBHandle->queryExec("INSERT OR REPLACE INTO kvp_".$this->TableName." VALUES('".$this->currentObjectID."','".sqlite_escape_string(serialize($this->currentObject))."')")) {
|
if (!$this->DBHandle->queryExec("INSERT OR REPLACE INTO kvp_".$this->TableName." VALUES('".$this->currentObjectID."','".sqlite_escape_string(serialize($this->currentObject))."')")) {
|
||||||
throw new PHPExcel_Exception(sqlite_error_string($this->DBHandle->lastError()));
|
throw new \PHPExcel\Exception(sqlite_error_string($this->DBHandle->lastError()));
|
||||||
}
|
}
|
||||||
$this->currentCellIsDirty = false;
|
$this->currentCellIsDirty = false;
|
||||||
}
|
}
|
||||||
|
@ -64,12 +65,12 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C
|
||||||
/**
|
/**
|
||||||
* Add or Update a cell in cache identified by coordinate address
|
* Add or Update a cell in cache identified by coordinate address
|
||||||
*
|
*
|
||||||
* @param string $pCoord Coordinate address of the cell to update
|
* @param string $pCoord Coordinate address of the cell to update
|
||||||
* @param PHPExcel_Cell $cell Cell to update
|
* @param \PHPExcel\Cell $cell Cell to update
|
||||||
* @return PHPExcel_Cell
|
* @return \PHPExcel\Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function addCacheData($pCoord, PHPExcel_Cell $cell)
|
public function addCacheData($pCoord, \PHPExcel\Cell $cell)
|
||||||
{
|
{
|
||||||
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
||||||
$this->storeData();
|
$this->storeData();
|
||||||
|
@ -85,9 +86,9 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C
|
||||||
/**
|
/**
|
||||||
* Get cell at a specific coordinate
|
* Get cell at a specific coordinate
|
||||||
*
|
*
|
||||||
* @param string $pCoord Coordinate of the cell
|
* @param string $pCoord Coordinate of the cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return PHPExcel_Cell Cell that was found, or null if not found
|
* @return \PHPExcel\Cell Cell that was found, or null if not found
|
||||||
*/
|
*/
|
||||||
public function getCacheData($pCoord)
|
public function getCacheData($pCoord)
|
||||||
{
|
{
|
||||||
|
@ -219,10 +220,9 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C
|
||||||
/**
|
/**
|
||||||
* Clone the cell collection
|
* Clone the cell collection
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $parent The new worksheet
|
* @param \PHPExcel\Worksheet $parent The new worksheet that we're copying to
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function copyCellCollection(PHPExcel_Worksheet $parent)
|
public function copyCellCollection(\PHPExcel\Worksheet $parent)
|
||||||
{
|
{
|
||||||
$this->currentCellIsDirty;
|
$this->currentCellIsDirty;
|
||||||
$this->storeData();
|
$this->storeData();
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\CachedObjectStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_CachedObjectStorage_SQLite3
|
* PHPExcel_CachedObjectStorage_SQLite3
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache
|
class SQLite3 extends CacheBase implements ICache
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Database table name
|
* Database table name
|
||||||
|
@ -73,8 +75,7 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_
|
||||||
* Store cell data in cache for the current cell object if it's "dirty",
|
* Store cell data in cache for the current cell object if it's "dirty",
|
||||||
* and the 'nullify' the current cell object
|
* and the 'nullify' the current cell object
|
||||||
*
|
*
|
||||||
* @return void
|
* @throws \PHPExcel\Exception
|
||||||
* @throws PHPExcel_Exception
|
|
||||||
*/
|
*/
|
||||||
protected function storeData()
|
protected function storeData()
|
||||||
{
|
{
|
||||||
|
@ -85,7 +86,7 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_
|
||||||
$this->insertQuery->bindValue('data', serialize($this->currentObject), SQLITE3_BLOB);
|
$this->insertQuery->bindValue('data', serialize($this->currentObject), SQLITE3_BLOB);
|
||||||
$result = $this->insertQuery->execute();
|
$result = $this->insertQuery->execute();
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
throw new PHPExcel_Exception($this->DBHandle->lastErrorMsg());
|
throw new \PHPExcel\Exception($this->DBHandle->lastErrorMsg());
|
||||||
}
|
}
|
||||||
$this->currentCellIsDirty = false;
|
$this->currentCellIsDirty = false;
|
||||||
}
|
}
|
||||||
|
@ -95,10 +96,10 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_
|
||||||
/**
|
/**
|
||||||
* Add or Update a cell in cache identified by coordinate address
|
* Add or Update a cell in cache identified by coordinate address
|
||||||
*
|
*
|
||||||
* @param string $pCoord Coordinate address of the cell to update
|
* @param string $pCoord Coordinate address of the cell to update
|
||||||
* @param PHPExcel_Cell $cell Cell to update
|
* @param \PHPExcel\Cell $cell Cell to update
|
||||||
* @return PHPExcel_Cell
|
* @return \PHPExcel\Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function addCacheData($pCoord, PHPExcel_Cell $cell)
|
public function addCacheData($pCoord, PHPExcel_Cell $cell)
|
||||||
{
|
{
|
||||||
|
@ -252,10 +253,9 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_
|
||||||
/**
|
/**
|
||||||
* Clone the cell collection
|
* Clone the cell collection
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $parent The new worksheet
|
* @param \PHPExcel\Worksheet $parent The new worksheet that we're copying to
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function copyCellCollection(PHPExcel_Worksheet $parent)
|
public function copyCellCollection(\PHPExcel\Worksheet $parent)
|
||||||
{
|
{
|
||||||
$this->currentCellIsDirty;
|
$this->currentCellIsDirty;
|
||||||
$this->storeData();
|
$this->storeData();
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\CachedObjectStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_CachedObjectStorage_Wincache
|
* PHPExcel_CachedObjectStorage_Wincache
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache
|
class Wincache extends CacheBase implements ICache
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Prefix used to uniquely identify cache data for this worksheet
|
* Prefix used to uniquely identify cache data for this worksheet
|
||||||
|
@ -75,12 +77,12 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage
|
||||||
/**
|
/**
|
||||||
* Add or Update a cell in cache identified by coordinate address
|
* Add or Update a cell in cache identified by coordinate address
|
||||||
*
|
*
|
||||||
* @param string $pCoord Coordinate address of the cell to update
|
* @param string $pCoord Coordinate address of the cell to update
|
||||||
* @param PHPExcel_Cell $cell Cell to update
|
* @param \PHPExcel\Cell $cell Cell to update
|
||||||
* @return PHPExcel_Cell
|
* @return \PHPExcel\Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function addCacheData($pCoord, PHPExcel_Cell $cell)
|
public function addCacheData($pCoord, \PHPExcel\Cell $cell)
|
||||||
{
|
{
|
||||||
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) {
|
||||||
$this->storeData();
|
$this->storeData();
|
||||||
|
@ -192,10 +194,9 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage
|
||||||
/**
|
/**
|
||||||
* Clone the cell collection
|
* Clone the cell collection
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $parent The new worksheet
|
* @param \PHPExcel\Worksheet $parent The new worksheet that we're copying to
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function copyCellCollection(PHPExcel_Worksheet $parent)
|
public function copyCellCollection(\PHPExcel\Worksheet $parent)
|
||||||
{
|
{
|
||||||
parent::copyCellCollection($parent);
|
parent::copyCellCollection($parent);
|
||||||
// Get a new id for the new file name
|
// Get a new id for the new file name
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_CachedObjectStorageFactory
|
* PHPExcel_CachedObjectStorageFactory
|
||||||
*
|
*
|
||||||
|
@ -25,91 +27,91 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_CachedObjectStorageFactory
|
class CachedObjectStorageFactory
|
||||||
{
|
{
|
||||||
const cache_in_memory = 'Memory';
|
const CACHE_IN_MEMORY = 'Memory';
|
||||||
const cache_in_memory_gzip = 'MemoryGZip';
|
const CACHE_IN_MEMORY_GZIP = 'MemoryGZip';
|
||||||
const cache_in_memory_serialized = 'MemorySerialized';
|
const CACHE_IN_MEMORY_SERIALIZED = 'MemorySerialized';
|
||||||
const cache_igbinary = 'Igbinary';
|
const CACHE_IGBINARY = 'Igbinary';
|
||||||
const cache_to_discISAM = 'DiscISAM';
|
const CACHE_TO_DISCISAM = 'DiscISAM';
|
||||||
const cache_to_apc = 'APC';
|
const CACHE_TO_APC = 'APC';
|
||||||
const cache_to_memcache = 'Memcache';
|
const CACHE_TO_MEMCACHE = 'Memcache';
|
||||||
const cache_to_phpTemp = 'PHPTemp';
|
const CACHE_TO_PHPTEMP = 'PHPTemp';
|
||||||
const cache_to_wincache = 'Wincache';
|
const CACHE_TO_WINCACHE = 'Wincache';
|
||||||
const cache_to_sqlite = 'SQLite';
|
const CACHE_TO_SQLITE = 'SQLite';
|
||||||
const cache_to_sqlite3 = 'SQLite3';
|
const CACHE_TO_SQLITE3 = 'SQLite3';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of the method used for cell cacheing
|
* Name of the method used for cell cacheing
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private static $cacheStorageMethod = null;
|
private static $cacheStorageMethod;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of the class used for cell cacheing
|
* Name of the class used for cell cacheing
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private static $cacheStorageClass = null;
|
private static $cacheStorageClass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of all possible cache storage methods
|
* List of all possible cache storage methods
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
private static $storageMethods = array(
|
private static $storageMethods = [
|
||||||
self::cache_in_memory,
|
self::CACHE_IN_MEMORY,
|
||||||
self::cache_in_memory_gzip,
|
self::CACHE_IN_MEMORY_GZIP,
|
||||||
self::cache_in_memory_serialized,
|
self::CACHE_IN_MEMORY_SERIALIZED,
|
||||||
self::cache_igbinary,
|
self::CACHE_IGBINARY,
|
||||||
self::cache_to_phpTemp,
|
self::CACHE_TO_PHPTEMP,
|
||||||
self::cache_to_discISAM,
|
self::CACHE_TO_DISCISAM,
|
||||||
self::cache_to_apc,
|
self::CACHE_TO_APC,
|
||||||
self::cache_to_memcache,
|
self::CACHE_TO_MEMCACHE,
|
||||||
self::cache_to_wincache,
|
self::CACHE_TO_WINCACHE,
|
||||||
self::cache_to_sqlite,
|
self::CACHE_TO_SQLITE,
|
||||||
self::cache_to_sqlite3,
|
self::CACHE_TO_SQLITE3,
|
||||||
);
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default arguments for each cache storage method
|
* Default arguments for each cache storage method
|
||||||
*
|
*
|
||||||
* @var array of mixed array
|
* @var array of mixed array
|
||||||
*/
|
*/
|
||||||
private static $storageMethodDefaultParameters = array(
|
private static $storageMethodDefaultParameters = [
|
||||||
self::cache_in_memory => array(
|
self::CACHE_IN_MEMORY => [],
|
||||||
),
|
self::CACHE_IN_MEMORY_GZIP => [],
|
||||||
self::cache_in_memory_gzip => array(
|
self::CACHE_IN_MEMORY_SERIALIZED => [],
|
||||||
),
|
self::CACHE_IGBINARY => [],
|
||||||
self::cache_in_memory_serialized => array(
|
self::CACHE_TO_PHPTEMP => [
|
||||||
),
|
'memoryCacheSize' => '1MB',
|
||||||
self::cache_igbinary => array(
|
],
|
||||||
),
|
self::CACHE_TO_DISCISAM => [
|
||||||
self::cache_to_phpTemp => array( 'memoryCacheSize' => '1MB'
|
'dir' => null,
|
||||||
),
|
],
|
||||||
self::cache_to_discISAM => array( 'dir' => null
|
self::CACHE_TO_APC => [
|
||||||
),
|
'cacheTime' => 600,
|
||||||
self::cache_to_apc => array( 'cacheTime' => 600
|
],
|
||||||
),
|
self::CACHE_TO_MEMCACHE => [
|
||||||
self::cache_to_memcache => array( 'memcacheServer' => 'localhost',
|
'memcacheServer' => 'localhost',
|
||||||
'memcachePort' => 11211,
|
'memcachePort' => 11211,
|
||||||
'cacheTime' => 600
|
'cacheTime' => 600,
|
||||||
),
|
],
|
||||||
self::cache_to_wincache => array( 'cacheTime' => 600
|
self::CACHE_TO_WINCACHE => [
|
||||||
),
|
'cacheTime' => 600,
|
||||||
self::cache_to_sqlite => array(
|
],
|
||||||
),
|
self::CACHE_TO_SQLITE => [],
|
||||||
self::cache_to_sqlite3 => array(
|
self::CACHE_TO_SQLITE3 => [],
|
||||||
),
|
];
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Arguments for the active cache storage method
|
* Arguments for the active cache storage method
|
||||||
*
|
*
|
||||||
* @var array of mixed array
|
* @var mixed[]
|
||||||
*/
|
*/
|
||||||
private static $storageMethodParameters = array();
|
private static $storageMethodParameters = [];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the current cache storage method
|
* Return the current cache storage method
|
||||||
|
@ -124,7 +126,7 @@ class PHPExcel_CachedObjectStorageFactory
|
||||||
/**
|
/**
|
||||||
* Return the current cache storage class
|
* Return the current cache storage class
|
||||||
*
|
*
|
||||||
* @return PHPExcel_CachedObjectStorage_ICache|null
|
* @return \CachedObjectStorage\ICache|null
|
||||||
**/
|
**/
|
||||||
public static function getCacheStorageClass()
|
public static function getCacheStorageClass()
|
||||||
{
|
{
|
||||||
|
@ -161,32 +163,31 @@ class PHPExcel_CachedObjectStorageFactory
|
||||||
/**
|
/**
|
||||||
* Identify the cache storage method to use
|
* Identify the cache storage method to use
|
||||||
*
|
*
|
||||||
* @param string $method Name of the method to use for cell cacheing
|
* @param string $method Name of the method to use for cell cacheing
|
||||||
* @param array of mixed $arguments Additional arguments to pass to the cell caching class
|
* @param mixed[] $arguments Additional arguments to pass to the cell caching class
|
||||||
* when instantiating
|
* when instantiating
|
||||||
* @return boolean
|
* @return boolean
|
||||||
**/
|
**/
|
||||||
public static function initialize($method = self::cache_in_memory, $arguments = array())
|
public static function initialize($method = self::CACHE_IN_MEMORY, $arguments = [])
|
||||||
{
|
{
|
||||||
if (!in_array($method, self::$storageMethods)) {
|
if (!in_array($method, self::$storageMethods)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$cacheStorageClass = 'PHPExcel_CachedObjectStorage_'.$method;
|
$cacheStorageClass = '\\PHPExcel\\CachedObjectStorage\\'.$method;
|
||||||
if (!call_user_func(array( $cacheStorageClass,
|
if (!call_user_func([$cacheStorageClass, 'cacheMethodIsAvailable'])) {
|
||||||
'cacheMethodIsAvailable'))) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
self::$storageMethodParameters[$method] = self::$storageMethodDefaultParameters[$method];
|
self::$storageMethodParameters[$method] = self::$storageMethodDefaultParameters[$method];
|
||||||
foreach ($arguments as $k => $v) {
|
foreach ($arguments as $argument => $value) {
|
||||||
if (array_key_exists($k, self::$storageMethodParameters[$method])) {
|
if (array_key_exists($argument, self::$storageMethodParameters[$method])) {
|
||||||
self::$storageMethodParameters[$method][$k] = $v;
|
self::$storageMethodParameters[$method][$argument] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self::$cacheStorageMethod === null) {
|
if (self::$cacheStorageMethod === null) {
|
||||||
self::$cacheStorageClass = 'PHPExcel_CachedObjectStorage_' . $method;
|
self::$cacheStorageClass = '\\PHPExcel\\CachedObjectStorage\\' . $method;
|
||||||
self::$cacheStorageMethod = $method;
|
self::$cacheStorageMethod = $method;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -195,10 +196,10 @@ class PHPExcel_CachedObjectStorageFactory
|
||||||
/**
|
/**
|
||||||
* Initialise the cache storage
|
* Initialise the cache storage
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $parent Enable cell caching for this worksheet
|
* @param Worksheet $parent Enable cell caching for this worksheet
|
||||||
* @return PHPExcel_CachedObjectStorage_ICache
|
* @return CachedObjectStorage\ICache
|
||||||
**/
|
**/
|
||||||
public static function getInstance(PHPExcel_Worksheet $parent)
|
public static function getInstance(Worksheet $parent)
|
||||||
{
|
{
|
||||||
$cacheMethodIsAvailable = true;
|
$cacheMethodIsAvailable = true;
|
||||||
if (self::$cacheStorageMethod === null) {
|
if (self::$cacheStorageMethod === null) {
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\CalcEngine;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_CalcEngine_CyclicReferenceStack
|
* PHPExcel_CalcEngine_CyclicReferenceStack
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_CalcEngine_CyclicReferenceStack
|
class CyclicReferenceStack
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The call stack for calculated cells
|
* The call stack for calculated cells
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\CalcEngine;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_CalcEngine_Logger
|
* PHPExcel_CalcEngine_Logger
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_CalcEngine_Logger
|
class Logger
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Flag to determine whether a debug log should be generated by the calculation engine
|
* Flag to determine whether a debug log should be generated by the calculation engine
|
||||||
|
@ -65,7 +67,7 @@ class PHPExcel_CalcEngine_Logger
|
||||||
*
|
*
|
||||||
* @param PHPExcel_CalcEngine_CyclicReferenceStack $stack
|
* @param PHPExcel_CalcEngine_CyclicReferenceStack $stack
|
||||||
*/
|
*/
|
||||||
public function __construct(PHPExcel_CalcEngine_CyclicReferenceStack $stack)
|
public function __construct(CyclicReferenceStack $stack)
|
||||||
{
|
{
|
||||||
$this->cellStack = $stack;
|
$this->cellStack = $stack;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,150 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Calculation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHPExcel_Calculation_Categories
|
||||||
|
*
|
||||||
|
* Copyright (c) 2006 - 2015 PHPExcel
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* @category PHPExcel
|
||||||
|
* @package PHPExcel_Calculation
|
||||||
|
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||||
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
|
* @version ##VERSION##, ##DATE##
|
||||||
|
*/
|
||||||
|
class Categories
|
||||||
|
{
|
||||||
|
/* Function categories */
|
||||||
|
const CATEGORY_CUBE = 'Cube';
|
||||||
|
const CATEGORY_DATABASE = 'Database';
|
||||||
|
const CATEGORY_DATE_AND_TIME = 'Date and Time';
|
||||||
|
const CATEGORY_ENGINEERING = 'Engineering';
|
||||||
|
const CATEGORY_FINANCIAL = 'Financial';
|
||||||
|
const CATEGORY_INFORMATION = 'Information';
|
||||||
|
const CATEGORY_LOGICAL = 'Logical';
|
||||||
|
const CATEGORY_LOOKUP_AND_REFERENCE = 'Lookup and Reference';
|
||||||
|
const CATEGORY_MATH_AND_TRIG = 'Math and Trig';
|
||||||
|
const CATEGORY_STATISTICAL = 'Statistical';
|
||||||
|
const CATEGORY_TEXT_AND_DATA = 'Text and Data';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Category (represented by CATEGORY_*)
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $category;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Excel name
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $excelName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHPExcel name
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $phpExcelName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new PHPExcel_Calculation_Function
|
||||||
|
*
|
||||||
|
* @param string $pCategory Category (represented by CATEGORY_*)
|
||||||
|
* @param string $pExcelName Excel function name
|
||||||
|
* @param string $pPHPExcelName PHPExcel function mapping
|
||||||
|
* @throws PHPExcel_Calculation_Exception
|
||||||
|
*/
|
||||||
|
public function __construct($pCategory = null, $pExcelName = null, $pPHPExcelName = null)
|
||||||
|
{
|
||||||
|
if (($pCategory !== null) && ($pExcelName !== null) && ($pPHPExcelName !== null)) {
|
||||||
|
// Initialise values
|
||||||
|
$this->category = $pCategory;
|
||||||
|
$this->excelName = $pExcelName;
|
||||||
|
$this->phpExcelName = $pPHPExcelName;
|
||||||
|
} else {
|
||||||
|
throw new PHPExcel_Calculation_Exception("Invalid parameters passed.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Category (represented by CATEGORY_*)
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getCategory()
|
||||||
|
{
|
||||||
|
return $this->category;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set Category (represented by CATEGORY_*)
|
||||||
|
*
|
||||||
|
* @param string $value
|
||||||
|
* @throws PHPExcel_Calculation_Exception
|
||||||
|
*/
|
||||||
|
public function setCategory($value = null)
|
||||||
|
{
|
||||||
|
if (!is_null($value)) {
|
||||||
|
$this->category = $value;
|
||||||
|
} else {
|
||||||
|
throw new PHPExcel_Calculation_Exception("Invalid parameter passed.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Excel name
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getExcelName()
|
||||||
|
{
|
||||||
|
return $this->excelName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set Excel name
|
||||||
|
*
|
||||||
|
* @param string $value
|
||||||
|
*/
|
||||||
|
public function setExcelName($value)
|
||||||
|
{
|
||||||
|
$this->excelName = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get PHPExcel name
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getPHPExcelName()
|
||||||
|
{
|
||||||
|
return $this->phpExcelName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set PHPExcel name
|
||||||
|
*
|
||||||
|
* @param string $value
|
||||||
|
*/
|
||||||
|
public function setPHPExcelName($value)
|
||||||
|
{
|
||||||
|
$this->phpExcelName = $value;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,13 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** PHPExcel root directory */
|
namespace PHPExcel\Calculation;
|
||||||
if (!defined('PHPEXCEL_ROOT')) {
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
|
||||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Calculation_Database
|
* PHPExcel_Calculation_Database
|
||||||
|
@ -34,7 +27,7 @@ if (!defined('PHPEXCEL_ROOT')) {
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Calculation_Database
|
class Database
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* fieldExtract
|
* fieldExtract
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** PHPExcel root directory */
|
namespace PHPExcel\Calculation;
|
||||||
if (!defined('PHPEXCEL_ROOT')) {
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
|
||||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Calculation_DateTime
|
* PHPExcel_Calculation_DateTime
|
||||||
|
@ -34,7 +27,7 @@ if (!defined('PHPEXCEL_ROOT')) {
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Calculation_DateTime
|
class DateTime
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Identify if a year is a leap year or not
|
* Identify if a year is a leap year or not
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** PHPExcel root directory */
|
namespace PHPExcel\Calculation;
|
||||||
if (!defined('PHPEXCEL_ROOT')) {
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
|
||||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
/** EULER */
|
/** EULER */
|
||||||
define('EULER', 2.71828182845904523536);
|
define('EULER', 2.71828182845904523536);
|
||||||
|
@ -37,7 +30,7 @@ define('EULER', 2.71828182845904523536);
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Calculation_Engineering
|
class Engineering
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Details of the Units of measure that can be used in CONVERTUOM()
|
* Details of the Units of measure that can be used in CONVERTUOM()
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Calculation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Calculation_Exception
|
* PHPExcel_Calculation_Exception
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Calculation_Exception extends PHPExcel_Exception
|
class Exception extends \PHPExcel\Exception
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Error handler callback
|
* Error handler callback
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Calculation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Calculation_ExceptionHandler
|
* PHPExcel_Calculation_ExceptionHandler
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Calculation_ExceptionHandler
|
class ExceptionHandler
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Register errorhandler
|
* Register errorhandler
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** PHPExcel root directory */
|
namespace PHPExcel\Calculation;
|
||||||
if (!defined('PHPEXCEL_ROOT')) {
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
|
||||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
/** FINANCIAL_MAX_ITERATIONS */
|
/** FINANCIAL_MAX_ITERATIONS */
|
||||||
define('FINANCIAL_MAX_ITERATIONS', 128);
|
define('FINANCIAL_MAX_ITERATIONS', 128);
|
||||||
|
@ -40,7 +33,7 @@ define('FINANCIAL_PRECISION', 1.0e-08);
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Calculation_Financial
|
class Financial
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* isLastDayOfMonth
|
* isLastDayOfMonth
|
||||||
|
|
|
@ -1,27 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
namespace PHPExcel\Calculation;
|
||||||
PARTLY BASED ON:
|
|
||||||
Copyright (c) 2007 E. W. Bachtal, Inc.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
|
||||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
|
||||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
||||||
subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
||||||
portions of the Software.
|
|
||||||
|
|
||||||
The software is provided "as is", without warranty of any kind, express or implied, including but not
|
|
||||||
limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In
|
|
||||||
no event shall the authors or copyright holders be liable for any claim, damages or other liability,
|
|
||||||
whether in an action of contract, tort or otherwise, arising from, out of or in connection with the
|
|
||||||
software or the use or other dealings in the software.
|
|
||||||
|
|
||||||
http://ewbi.blogs.com/develops/2007/03/excel_formula_p.html
|
|
||||||
http://ewbi.blogs.com/develops/2004/12/excel_formula_p.html
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Calculation_FormulaParser
|
* PHPExcel_Calculation_FormulaParser
|
||||||
|
@ -48,9 +27,29 @@ PARTLY BASED ON:
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
|
PARTLY BASED ON:
|
||||||
|
Copyright (c) 2007 E. W. Bachtal, Inc.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||||
|
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||||
|
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
class PHPExcel_Calculation_FormulaParser
|
The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||||
|
portions of the Software.
|
||||||
|
|
||||||
|
The software is provided "as is", without warranty of any kind, express or implied, including but not
|
||||||
|
limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In
|
||||||
|
no event shall the authors or copyright holders be liable for any claim, damages or other liability,
|
||||||
|
whether in an action of contract, tort or otherwise, arising from, out of or in connection with the
|
||||||
|
software or the use or other dealings in the software.
|
||||||
|
|
||||||
|
http://ewbi.blogs.com/develops/2007/03/excel_formula_p.html
|
||||||
|
http://ewbi.blogs.com/develops/2004/12/excel_formula_p.html
|
||||||
|
*/
|
||||||
|
class FormulaParser
|
||||||
{
|
{
|
||||||
/* Character constants */
|
/* Character constants */
|
||||||
const QUOTE_DOUBLE = '"';
|
const QUOTE_DOUBLE = '"';
|
||||||
|
|
|
@ -1,27 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
namespace PHPExcel\Calculation;
|
||||||
PARTLY BASED ON:
|
|
||||||
Copyright (c) 2007 E. W. Bachtal, Inc.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
|
||||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
|
||||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
||||||
subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
||||||
portions of the Software.
|
|
||||||
|
|
||||||
The software is provided "as is", without warranty of any kind, express or implied, including but not
|
|
||||||
limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In
|
|
||||||
no event shall the authors or copyright holders be liable for any claim, damages or other liability,
|
|
||||||
whether in an action of contract, tort or otherwise, arising from, out of or in connection with the
|
|
||||||
software or the use or other dealings in the software.
|
|
||||||
|
|
||||||
http://ewbi.blogs.com/develops/2007/03/excel_formula_p.html
|
|
||||||
http://ewbi.blogs.com/develops/2004/12/excel_formula_p.html
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Calculation_FormulaToken
|
* PHPExcel_Calculation_FormulaToken
|
||||||
|
@ -48,9 +27,30 @@ PARTLY BASED ON:
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
|
PARTLY BASED ON:
|
||||||
|
Copyright (c) 2007 E. W. Bachtal, Inc.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||||
|
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||||
|
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
class PHPExcel_Calculation_FormulaToken
|
The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||||
|
portions of the Software.
|
||||||
|
|
||||||
|
The software is provided "as is", without warranty of any kind, express or implied, including but not
|
||||||
|
limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In
|
||||||
|
no event shall the authors or copyright holders be liable for any claim, damages or other liability,
|
||||||
|
whether in an action of contract, tort or otherwise, arising from, out of or in connection with the
|
||||||
|
software or the use or other dealings in the software.
|
||||||
|
|
||||||
|
http://ewbi.blogs.com/develops/2007/03/excel_formula_p.html
|
||||||
|
http://ewbi.blogs.com/develops/2004/12/excel_formula_p.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
class FormulaToken
|
||||||
{
|
{
|
||||||
/* Token types */
|
/* Token types */
|
||||||
const TOKEN_TYPE_NOOP = 'Noop';
|
const TOKEN_TYPE_NOOP = 'Noop';
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Calculation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Calculation_Function
|
* PHPExcel_Calculation_Function
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Calculation_Function
|
class Function
|
||||||
{
|
{
|
||||||
/* Function categories */
|
/* Function categories */
|
||||||
const CATEGORY_CUBE = 'Cube';
|
const CATEGORY_CUBE = 'Cube';
|
||||||
|
|
|
@ -1,14 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** PHPExcel root directory */
|
namespace PHPExcel\Calculation;
|
||||||
if (!defined('PHPEXCEL_ROOT')) {
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
|
||||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/** MAX_VALUE */
|
/** MAX_VALUE */
|
||||||
define('MAX_VALUE', 1.2e308);
|
define('MAX_VALUE', 1.2e308);
|
||||||
|
@ -48,7 +40,7 @@ define('PRECISION', 8.88E-016);
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Calculation_Functions
|
class Functions
|
||||||
{
|
{
|
||||||
|
|
||||||
/** constants */
|
/** constants */
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** PHPExcel root directory */
|
namespace PHPExcel\Calculation;
|
||||||
if (!defined('PHPEXCEL_ROOT')) {
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
|
||||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Calculation_Logical
|
* PHPExcel_Calculation_Logical
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** PHPExcel root directory */
|
namespace PHPExcel\Calculation;
|
||||||
if (!defined('PHPEXCEL_ROOT')) {
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
|
||||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Calculation_LookupRef
|
* PHPExcel_Calculation_LookupRef
|
||||||
|
@ -34,7 +27,7 @@ if (!defined('PHPEXCEL_ROOT')) {
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Calculation_LookupRef
|
class LookupRef
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* CELL_ADDRESS
|
* CELL_ADDRESS
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** PHPExcel root directory */
|
namespace PHPExcel\Calculation;
|
||||||
if (!defined('PHPEXCEL_ROOT')) {
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
|
||||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Calculation_MathTrig
|
* PHPExcel_Calculation_MathTrig
|
||||||
|
@ -34,7 +27,7 @@ if (!defined('PHPEXCEL_ROOT')) {
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Calculation_MathTrig
|
class MathTrig
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Private method to return an array of the factors of the input value
|
// Private method to return an array of the factors of the input value
|
||||||
|
|
|
@ -1,14 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** PHPExcel root directory */
|
namespace PHPExcel\Calculation;
|
||||||
if (!defined('PHPEXCEL_ROOT')) {
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
|
||||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/trend/trendClass.php';
|
require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/trend/trendClass.php';
|
||||||
|
|
||||||
|
@ -50,7 +42,7 @@ define('SQRT2PI', 2.5066282746310005024157652848110452530069867406099);
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Calculation_Statistical
|
class Statistical
|
||||||
{
|
{
|
||||||
private static function checkTrendArrays(&$array1, &$array2)
|
private static function checkTrendArrays(&$array1, &$array2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** PHPExcel root directory */
|
namespace PHPExcel\Calculation;
|
||||||
if (!defined('PHPEXCEL_ROOT')) {
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
|
||||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Calculation_TextData
|
* PHPExcel_Calculation_TextData
|
||||||
|
@ -28,13 +21,13 @@ if (!defined('PHPEXCEL_ROOT')) {
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
* @category PHPExcel
|
* @category PHPExcel
|
||||||
* @package PHPExcel_Calculation
|
* @package PHPExcel_Calculation
|
||||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2015 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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Calculation_TextData
|
class TextData
|
||||||
{
|
{
|
||||||
private static $invalidChars;
|
private static $invalidChars;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Cell
|
* PHPExcel_Cell
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Cell
|
class Cell
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Default range variable constant
|
* Default range variable constant
|
||||||
|
@ -37,7 +39,7 @@ class PHPExcel_Cell
|
||||||
/**
|
/**
|
||||||
* Value binder to use
|
* Value binder to use
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Cell_IValueBinder
|
* @var Cell\IValueBinder
|
||||||
*/
|
*/
|
||||||
private static $valueBinder;
|
private static $valueBinder;
|
||||||
|
|
||||||
|
@ -70,7 +72,7 @@ class PHPExcel_Cell
|
||||||
/**
|
/**
|
||||||
* Parent worksheet
|
* Parent worksheet
|
||||||
*
|
*
|
||||||
* @var PHPExcel_CachedObjectStorage_CacheBase
|
* @var CachedObjectStorage\CacheBase
|
||||||
*/
|
*/
|
||||||
private $parent;
|
private $parent;
|
||||||
|
|
||||||
|
@ -105,7 +107,7 @@ class PHPExcel_Cell
|
||||||
$this->parent = null;
|
$this->parent = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function attach(PHPExcel_CachedObjectStorage_CacheBase $parent)
|
public function attach(CachedObjectStorage\CacheBase $parent)
|
||||||
{
|
{
|
||||||
$this->parent = $parent;
|
$this->parent = $parent;
|
||||||
}
|
}
|
||||||
|
@ -116,10 +118,10 @@ class PHPExcel_Cell
|
||||||
*
|
*
|
||||||
* @param mixed $pValue
|
* @param mixed $pValue
|
||||||
* @param string $pDataType
|
* @param string $pDataType
|
||||||
* @param PHPExcel_Worksheet $pSheet
|
* @param Worksheet $pSheet
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function __construct($pValue = null, $pDataType = null, PHPExcel_Worksheet $pSheet = null)
|
public function __construct($pValue = null, $pDataType = null, Worksheet $pSheet = null)
|
||||||
{
|
{
|
||||||
// Initialise cell value
|
// Initialise cell value
|
||||||
$this->value = $pValue;
|
$this->value = $pValue;
|
||||||
|
@ -129,12 +131,12 @@ class PHPExcel_Cell
|
||||||
|
|
||||||
// Set datatype?
|
// Set datatype?
|
||||||
if ($pDataType !== null) {
|
if ($pDataType !== null) {
|
||||||
if ($pDataType == PHPExcel_Cell_DataType::TYPE_STRING2) {
|
if ($pDataType == Cell\DataType::TYPE_STRING2) {
|
||||||
$pDataType = PHPExcel_Cell_DataType::TYPE_STRING;
|
$pDataType = Cell\DataType::TYPE_STRING;
|
||||||
}
|
}
|
||||||
$this->dataType = $pDataType;
|
$this->dataType = $pDataType;
|
||||||
} elseif (!self::getValueBinder()->bindValue($this, $pValue)) {
|
} elseif (!self::getValueBinder()->bindValue($this, $pValue)) {
|
||||||
throw new PHPExcel_Exception("Value could not be bound to cell.");
|
throw new Exception("Value could not be bound to cell.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +187,7 @@ class PHPExcel_Cell
|
||||||
*/
|
*/
|
||||||
public function getFormattedValue()
|
public function getFormattedValue()
|
||||||
{
|
{
|
||||||
return (string) PHPExcel_Style_NumberFormat::toFormattedString(
|
return (string) Style\NumberFormat::toFormattedString(
|
||||||
$this->getCalculatedValue(),
|
$this->getCalculatedValue(),
|
||||||
$this->getStyle()
|
$this->getStyle()
|
||||||
->getNumberFormat()->getFormatCode()
|
->getNumberFormat()->getFormatCode()
|
||||||
|
@ -198,13 +200,13 @@ class PHPExcel_Cell
|
||||||
* Sets the value for a cell, automatically determining the datatype using the value binder
|
* Sets the value for a cell, automatically determining the datatype using the value binder
|
||||||
*
|
*
|
||||||
* @param mixed $pValue Value
|
* @param mixed $pValue Value
|
||||||
* @return PHPExcel_Cell
|
* @return Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function setValue($pValue = null)
|
public function setValue($pValue = null)
|
||||||
{
|
{
|
||||||
if (!self::getValueBinder()->bindValue($this, $pValue)) {
|
if (!self::getValueBinder()->bindValue($this, $pValue)) {
|
||||||
throw new PHPExcel_Exception("Value could not be bound to cell.");
|
throw new Exception("Value could not be bound to cell.");
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -214,39 +216,39 @@ class PHPExcel_Cell
|
||||||
*
|
*
|
||||||
* @param mixed $pValue Value
|
* @param mixed $pValue Value
|
||||||
* @param string $pDataType Explicit data type
|
* @param string $pDataType Explicit data type
|
||||||
* @return PHPExcel_Cell
|
* @return Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function setValueExplicit($pValue = null, $pDataType = PHPExcel_Cell_DataType::TYPE_STRING)
|
public function setValueExplicit($pValue = null, $pDataType = Cell\DataType::TYPE_STRING)
|
||||||
{
|
{
|
||||||
// set the value according to data type
|
// set the value according to data type
|
||||||
switch ($pDataType) {
|
switch ($pDataType) {
|
||||||
case PHPExcel_Cell_DataType::TYPE_NULL:
|
case Cell\DataType::TYPE_NULL:
|
||||||
$this->value = $pValue;
|
$this->value = $pValue;
|
||||||
break;
|
break;
|
||||||
case PHPExcel_Cell_DataType::TYPE_STRING2:
|
case Cell\DataType::TYPE_STRING2:
|
||||||
$pDataType = PHPExcel_Cell_DataType::TYPE_STRING;
|
$pDataType = Cell\DataType::TYPE_STRING;
|
||||||
// no break
|
// no break
|
||||||
case PHPExcel_Cell_DataType::TYPE_STRING:
|
case Cell\DataType::TYPE_STRING:
|
||||||
// Synonym for string
|
// Synonym for string
|
||||||
case PHPExcel_Cell_DataType::TYPE_INLINE:
|
case Cell\DataType::TYPE_INLINE:
|
||||||
// Rich text
|
// Rich text
|
||||||
$this->value = PHPExcel_Cell_DataType::checkString($pValue);
|
$this->value = Cell\DataType::checkString($pValue);
|
||||||
break;
|
break;
|
||||||
case PHPExcel_Cell_DataType::TYPE_NUMERIC:
|
case Cell\DataType::TYPE_NUMERIC:
|
||||||
$this->value = (float) $pValue;
|
$this->value = (float) $pValue;
|
||||||
break;
|
break;
|
||||||
case PHPExcel_Cell_DataType::TYPE_FORMULA:
|
case Cell\DataType::TYPE_FORMULA:
|
||||||
$this->value = (string) $pValue;
|
$this->value = (string) $pValue;
|
||||||
break;
|
break;
|
||||||
case PHPExcel_Cell_DataType::TYPE_BOOL:
|
case Cell\DataType::TYPE_BOOL:
|
||||||
$this->value = (bool) $pValue;
|
$this->value = (bool) $pValue;
|
||||||
break;
|
break;
|
||||||
case PHPExcel_Cell_DataType::TYPE_ERROR:
|
case Cell\DataType::TYPE_ERROR:
|
||||||
$this->value = PHPExcel_Cell_DataType::checkErrorCode($pValue);
|
$this->value = Cell\DataType::checkErrorCode($pValue);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new PHPExcel_Exception('Invalid datatype: ' . $pDataType);
|
throw new Exception('Invalid datatype: ' . $pDataType);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,15 +265,15 @@ class PHPExcel_Cell
|
||||||
*
|
*
|
||||||
* @param boolean $resetLog Whether the calculation engine logger should be reset or not
|
* @param boolean $resetLog Whether the calculation engine logger should be reset or not
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
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().PHP_EOL;
|
//echo 'Cell '.$this->getCoordinate().' value is a '.$this->dataType.' with a value of '.$this->getValue().PHP_EOL;
|
||||||
if ($this->dataType == PHPExcel_Cell_DataType::TYPE_FORMULA) {
|
if ($this->dataType == Cell\DataType::TYPE_FORMULA) {
|
||||||
try {
|
try {
|
||||||
//echo 'Cell value for '.$this->getCoordinate().' is a formula: Calculating value'.PHP_EOL;
|
//echo 'Cell value for '.$this->getCoordinate().' is a formula: Calculating value'.PHP_EOL;
|
||||||
$result = PHPExcel_Calculation::getInstance(
|
$result = Calculation::getInstance(
|
||||||
$this->getWorksheet()->getParent()
|
$this->getWorksheet()->getParent()
|
||||||
)->calculateCellValue($this, $resetLog);
|
)->calculateCellValue($this, $resetLog);
|
||||||
//echo $this->getCoordinate().' calculation result is '.$result.PHP_EOL;
|
//echo $this->getCoordinate().' calculation result is '.$result.PHP_EOL;
|
||||||
|
@ -281,14 +283,14 @@ class PHPExcel_Cell
|
||||||
$result = array_pop($result);
|
$result = array_pop($result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (PHPExcel_Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
if (($ex->getMessage() === 'Unable to access External Workbook') && ($this->calculatedValue !== null)) {
|
if (($ex->getMessage() === 'Unable to access External Workbook') && ($this->calculatedValue !== null)) {
|
||||||
//echo 'Returning fallback value of '.$this->calculatedValue.' for cell '.$this->getCoordinate().PHP_EOL;
|
//echo 'Returning fallback value of '.$this->calculatedValue.' for cell '.$this->getCoordinate().PHP_EOL;
|
||||||
return $this->calculatedValue; // Fallback for calculations referencing external files.
|
return $this->calculatedValue; // Fallback for calculations referencing external files.
|
||||||
}
|
}
|
||||||
//echo 'Calculation Exception: '.$ex->getMessage().PHP_EOL;
|
//echo 'Calculation Exception: '.$ex->getMessage().PHP_EOL;
|
||||||
$result = '#N/A';
|
$result = '#N/A';
|
||||||
throw new PHPExcel_Calculation_Exception(
|
throw new Calculation\Exception(
|
||||||
$this->getWorksheet()->getTitle().'!'.$this->getCoordinate().' -> '.$ex->getMessage()
|
$this->getWorksheet()->getTitle().'!'.$this->getCoordinate().' -> '.$ex->getMessage()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -299,7 +301,7 @@ class PHPExcel_Cell
|
||||||
}
|
}
|
||||||
//echo 'Returning calculated value of '.$result.' for cell '.$this->getCoordinate().PHP_EOL;
|
//echo 'Returning calculated value of '.$result.' for cell '.$this->getCoordinate().PHP_EOL;
|
||||||
return $result;
|
return $result;
|
||||||
} elseif ($this->value instanceof PHPExcel_RichText) {
|
} elseif ($this->value instanceof RichText) {
|
||||||
// echo 'Cell value for '.$this->getCoordinate().' is rich text: Returning data value of '.$this->value.'<br />';
|
// echo 'Cell value for '.$this->getCoordinate().' is rich text: Returning data value of '.$this->value.'<br />';
|
||||||
return $this->value->getPlainText();
|
return $this->value->getPlainText();
|
||||||
}
|
}
|
||||||
|
@ -311,7 +313,7 @@ class PHPExcel_Cell
|
||||||
* Set old calculated value (cached)
|
* Set old calculated value (cached)
|
||||||
*
|
*
|
||||||
* @param mixed $pValue Value
|
* @param mixed $pValue Value
|
||||||
* @return PHPExcel_Cell
|
* @return Cell
|
||||||
*/
|
*/
|
||||||
public function setCalculatedValue($pValue = null)
|
public function setCalculatedValue($pValue = null)
|
||||||
{
|
{
|
||||||
|
@ -351,12 +353,12 @@ class PHPExcel_Cell
|
||||||
* Set cell data type
|
* Set cell data type
|
||||||
*
|
*
|
||||||
* @param string $pDataType
|
* @param string $pDataType
|
||||||
* @return PHPExcel_Cell
|
* @return Cell
|
||||||
*/
|
*/
|
||||||
public function setDataType($pDataType = PHPExcel_Cell_DataType::TYPE_STRING)
|
public function setDataType($pDataType = Cell\DataType::TYPE_STRING)
|
||||||
{
|
{
|
||||||
if ($pDataType == PHPExcel_Cell_DataType::TYPE_STRING2) {
|
if ($pDataType == Cell\DataType::TYPE_STRING2) {
|
||||||
$pDataType = PHPExcel_Cell_DataType::TYPE_STRING;
|
$pDataType = Cell\DataType::TYPE_STRING;
|
||||||
}
|
}
|
||||||
$this->dataType = $pDataType;
|
$this->dataType = $pDataType;
|
||||||
|
|
||||||
|
@ -370,19 +372,19 @@ class PHPExcel_Cell
|
||||||
*/
|
*/
|
||||||
public function isFormula()
|
public function isFormula()
|
||||||
{
|
{
|
||||||
return $this->dataType == PHPExcel_Cell_DataType::TYPE_FORMULA;
|
return $this->dataType == Cell\DataType::TYPE_FORMULA;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does this cell contain Data validation rules?
|
* Does this cell contain Data validation rules?
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function hasDataValidation()
|
public function hasDataValidation()
|
||||||
{
|
{
|
||||||
if (!isset($this->parent)) {
|
if (!isset($this->parent)) {
|
||||||
throw new PHPExcel_Exception('Cannot check for data validation when cell is not bound to a worksheet');
|
throw new Exception('Cannot check for data validation when cell is not bound to a worksheet');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->getWorksheet()->dataValidationExists($this->getCoordinate());
|
return $this->getWorksheet()->dataValidationExists($this->getCoordinate());
|
||||||
|
@ -391,13 +393,13 @@ class PHPExcel_Cell
|
||||||
/**
|
/**
|
||||||
* Get Data validation rules
|
* Get Data validation rules
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Cell_DataValidation
|
* @return Cell\DataValidation
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getDataValidation()
|
public function getDataValidation()
|
||||||
{
|
{
|
||||||
if (!isset($this->parent)) {
|
if (!isset($this->parent)) {
|
||||||
throw new PHPExcel_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');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->getWorksheet()->getDataValidation($this->getCoordinate());
|
return $this->getWorksheet()->getDataValidation($this->getCoordinate());
|
||||||
|
@ -406,14 +408,14 @@ class PHPExcel_Cell
|
||||||
/**
|
/**
|
||||||
* Set Data validation rules
|
* Set Data validation rules
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Cell_DataValidation $pDataValidation
|
* @param Cell\DataValidation $pDataValidation
|
||||||
* @return PHPExcel_Cell
|
* @return Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function setDataValidation(PHPExcel_Cell_DataValidation $pDataValidation = null)
|
public function setDataValidation(Cell\DataValidation $pDataValidation = null)
|
||||||
{
|
{
|
||||||
if (!isset($this->parent)) {
|
if (!isset($this->parent)) {
|
||||||
throw new PHPExcel_Exception('Cannot set data validation for cell that is not bound to a worksheet');
|
throw new Exception('Cannot set data validation for cell that is not bound to a worksheet');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->getWorksheet()->setDataValidation($this->getCoordinate(), $pDataValidation);
|
$this->getWorksheet()->setDataValidation($this->getCoordinate(), $pDataValidation);
|
||||||
|
@ -425,12 +427,12 @@ class PHPExcel_Cell
|
||||||
* Does this cell contain a Hyperlink?
|
* Does this cell contain a Hyperlink?
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function hasHyperlink()
|
public function hasHyperlink()
|
||||||
{
|
{
|
||||||
if (!isset($this->parent)) {
|
if (!isset($this->parent)) {
|
||||||
throw new PHPExcel_Exception('Cannot check for hyperlink when cell is not bound to a worksheet');
|
throw new Exception('Cannot check for hyperlink when cell is not bound to a worksheet');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->getWorksheet()->hyperlinkExists($this->getCoordinate());
|
return $this->getWorksheet()->hyperlinkExists($this->getCoordinate());
|
||||||
|
@ -439,13 +441,13 @@ class PHPExcel_Cell
|
||||||
/**
|
/**
|
||||||
* Get Hyperlink
|
* Get Hyperlink
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Cell_Hyperlink
|
* @return Cell\Hyperlink
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getHyperlink()
|
public function getHyperlink()
|
||||||
{
|
{
|
||||||
if (!isset($this->parent)) {
|
if (!isset($this->parent)) {
|
||||||
throw new PHPExcel_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');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->getWorksheet()->getHyperlink($this->getCoordinate());
|
return $this->getWorksheet()->getHyperlink($this->getCoordinate());
|
||||||
|
@ -454,14 +456,14 @@ class PHPExcel_Cell
|
||||||
/**
|
/**
|
||||||
* Set Hyperlink
|
* Set Hyperlink
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Cell_Hyperlink $pHyperlink
|
* @param Cell\Hyperlink $pHyperlink
|
||||||
* @return PHPExcel_Cell
|
* @return Cell
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function setHyperlink(PHPExcel_Cell_Hyperlink $pHyperlink = null)
|
public function setHyperlink(Cell\Hyperlink $pHyperlink = null)
|
||||||
{
|
{
|
||||||
if (!isset($this->parent)) {
|
if (!isset($this->parent)) {
|
||||||
throw new PHPExcel_Exception('Cannot set hyperlink for cell that is not bound to a worksheet');
|
throw new Exception('Cannot set hyperlink for cell that is not bound to a worksheet');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->getWorksheet()->setHyperlink($this->getCoordinate(), $pHyperlink);
|
$this->getWorksheet()->setHyperlink($this->getCoordinate(), $pHyperlink);
|
||||||
|
@ -472,7 +474,7 @@ class PHPExcel_Cell
|
||||||
/**
|
/**
|
||||||
* Get parent worksheet
|
* Get parent worksheet
|
||||||
*
|
*
|
||||||
* @return PHPExcel_CachedObjectStorage_CacheBase
|
* @return CachedObjectStorage\CacheBase
|
||||||
*/
|
*/
|
||||||
public function getParent()
|
public function getParent()
|
||||||
{
|
{
|
||||||
|
@ -482,7 +484,7 @@ class PHPExcel_Cell
|
||||||
/**
|
/**
|
||||||
* Get parent worksheet
|
* Get parent worksheet
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Worksheet
|
* @return Worksheet
|
||||||
*/
|
*/
|
||||||
public function getWorksheet()
|
public function getWorksheet()
|
||||||
{
|
{
|
||||||
|
@ -507,7 +509,7 @@ class PHPExcel_Cell
|
||||||
public function isMergeRangeValueCell()
|
public function isMergeRangeValueCell()
|
||||||
{
|
{
|
||||||
if ($mergeRange = $this->getMergeRange()) {
|
if ($mergeRange = $this->getMergeRange()) {
|
||||||
$mergeRange = PHPExcel_Cell::splitRange($mergeRange);
|
$mergeRange = Cell::splitRange($mergeRange);
|
||||||
list($startCell) = $mergeRange[0];
|
list($startCell) = $mergeRange[0];
|
||||||
if ($this->getCoordinate() === $startCell) {
|
if ($this->getCoordinate() === $startCell) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -534,7 +536,7 @@ class PHPExcel_Cell
|
||||||
/**
|
/**
|
||||||
* Get cell style
|
* Get cell style
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style
|
* @return Style
|
||||||
*/
|
*/
|
||||||
public function getStyle()
|
public function getStyle()
|
||||||
{
|
{
|
||||||
|
@ -544,10 +546,10 @@ class PHPExcel_Cell
|
||||||
/**
|
/**
|
||||||
* Re-bind parent
|
* Re-bind parent
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $parent
|
* @param Worksheet $parent
|
||||||
* @return PHPExcel_Cell
|
* @return Cell
|
||||||
*/
|
*/
|
||||||
public function rebindParent(PHPExcel_Worksheet $parent)
|
public function rebindParent(Worksheet $parent)
|
||||||
{
|
{
|
||||||
$this->parent = $parent->getCellCacheController();
|
$this->parent = $parent->getCellCacheController();
|
||||||
|
|
||||||
|
@ -579,19 +581,19 @@ class PHPExcel_Cell
|
||||||
*
|
*
|
||||||
* @param string $pCoordinateString
|
* @param string $pCoordinateString
|
||||||
* @return array Array containing column and row (indexes 0 and 1)
|
* @return array Array containing column and row (indexes 0 and 1)
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function coordinateFromString($pCoordinateString = 'A1')
|
public static function coordinateFromString($pCoordinateString = 'A1')
|
||||||
{
|
{
|
||||||
if (preg_match("/^([$]?[A-Z]{1,3})([$]?\d{1,7})$/", $pCoordinateString, $matches)) {
|
if (preg_match("/^([$]?[A-Z]{1,3})([$]?\d{1,7})$/", $pCoordinateString, $matches)) {
|
||||||
return array($matches[1],$matches[2]);
|
return array($matches[1],$matches[2]);
|
||||||
} elseif ((strpos($pCoordinateString, ':') !== false) || (strpos($pCoordinateString, ',') !== false)) {
|
} elseif ((strpos($pCoordinateString, ':') !== false) || (strpos($pCoordinateString, ',') !== false)) {
|
||||||
throw new PHPExcel_Exception('Cell coordinate string can not be a range of cells');
|
throw new Exception('Cell coordinate string can not be a range of cells');
|
||||||
} elseif ($pCoordinateString == '') {
|
} elseif ($pCoordinateString == '') {
|
||||||
throw new PHPExcel_Exception('Cell coordinate can not be zero-length string');
|
throw new Exception('Cell coordinate can not be zero-length string');
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new PHPExcel_Exception('Invalid cell coordinate '.$pCoordinateString);
|
throw new Exception('Invalid cell coordinate '.$pCoordinateString);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -600,7 +602,7 @@ class PHPExcel_Cell
|
||||||
* @param string $pCoordinateString e.g. 'A' or '1' or 'A1'
|
* @param string $pCoordinateString e.g. 'A' or '1' or 'A1'
|
||||||
* Note that this value can be a row or column reference as well as a cell reference
|
* Note that this value can be a row or column reference as well as a cell reference
|
||||||
* @return string Absolute coordinate e.g. '$A' or '$1' or '$A$1'
|
* @return string Absolute coordinate e.g. '$A' or '$1' or '$A$1'
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function absoluteReference($pCoordinateString = 'A1')
|
public static function absoluteReference($pCoordinateString = 'A1')
|
||||||
{
|
{
|
||||||
|
@ -624,7 +626,7 @@ class PHPExcel_Cell
|
||||||
return $worksheet . self::absoluteCoordinate($pCoordinateString);
|
return $worksheet . self::absoluteCoordinate($pCoordinateString);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new PHPExcel_Exception('Cell coordinate string can not be a range of cells');
|
throw new Exception('Cell coordinate string can not be a range of cells');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -632,7 +634,7 @@ class PHPExcel_Cell
|
||||||
*
|
*
|
||||||
* @param string $pCoordinateString e.g. 'A1'
|
* @param string $pCoordinateString e.g. 'A1'
|
||||||
* @return string Absolute coordinate e.g. '$A$1'
|
* @return string Absolute coordinate e.g. '$A$1'
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function absoluteCoordinate($pCoordinateString = 'A1')
|
public static function absoluteCoordinate($pCoordinateString = 'A1')
|
||||||
{
|
{
|
||||||
|
@ -654,7 +656,7 @@ class PHPExcel_Cell
|
||||||
return $worksheet . '$' . $column . '$' . $row;
|
return $worksheet . '$' . $column . '$' . $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new PHPExcel_Exception('Cell coordinate string can not be a range of cells');
|
throw new Exception('Cell coordinate string can not be a range of cells');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -685,13 +687,13 @@ class PHPExcel_Cell
|
||||||
*
|
*
|
||||||
* @param array $pRange Array containg one or more arrays containing one or two coordinate strings
|
* @param array $pRange Array containg one or more arrays containing one or two coordinate strings
|
||||||
* @return string String representation of $pRange
|
* @return string String representation of $pRange
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function buildRange($pRange)
|
public static function buildRange($pRange)
|
||||||
{
|
{
|
||||||
// Verify range
|
// Verify range
|
||||||
if (!is_array($pRange) || empty($pRange) || !is_array($pRange[0])) {
|
if (!is_array($pRange) || empty($pRange) || !is_array($pRange[0])) {
|
||||||
throw new PHPExcel_Exception('Range does not contain any information');
|
throw new Exception('Range does not contain any information');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build range
|
// Build range
|
||||||
|
@ -821,7 +823,7 @@ class PHPExcel_Cell
|
||||||
return $_indexCache[$pString];
|
return $_indexCache[$pString];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new PHPExcel_Exception("Column string index can not be " . ((isset($pString{0})) ? "longer than 3 characters" : "empty"));
|
throw new Exception("Column string index can not be " . ((isset($pString{0})) ? "longer than 3 characters" : "empty"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -919,11 +921,11 @@ class PHPExcel_Cell
|
||||||
/**
|
/**
|
||||||
* Compare 2 cells
|
* Compare 2 cells
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Cell $a Cell a
|
* @param Cell $a Cell a
|
||||||
* @param PHPExcel_Cell $b Cell b
|
* @param Cell $b Cell b
|
||||||
* @return int Result of comparison (always -1 or 1, never zero!)
|
* @return int Result of comparison (always -1 or 1, never zero!)
|
||||||
*/
|
*/
|
||||||
public static function compareCells(PHPExcel_Cell $a, PHPExcel_Cell $b)
|
public static function compareCells(Cell $a, Cell $b)
|
||||||
{
|
{
|
||||||
if ($a->getRow() < $b->getRow()) {
|
if ($a->getRow() < $b->getRow()) {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -939,12 +941,12 @@ class PHPExcel_Cell
|
||||||
/**
|
/**
|
||||||
* Get value binder to use
|
* Get value binder to use
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Cell_IValueBinder
|
* @return Cell\IValueBinder
|
||||||
*/
|
*/
|
||||||
public static function getValueBinder()
|
public static function getValueBinder()
|
||||||
{
|
{
|
||||||
if (self::$valueBinder === null) {
|
if (self::$valueBinder === null) {
|
||||||
self::$valueBinder = new PHPExcel_Cell_DefaultValueBinder();
|
self::$valueBinder = new Cell\DefaultValueBinder();
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::$valueBinder;
|
return self::$valueBinder;
|
||||||
|
@ -953,13 +955,13 @@ class PHPExcel_Cell
|
||||||
/**
|
/**
|
||||||
* Set value binder to use
|
* Set value binder to use
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Cell_IValueBinder $binder
|
* @param Cell\IValueBinder $binder
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function setValueBinder(PHPExcel_Cell_IValueBinder $binder = null)
|
public static function setValueBinder(Cell\IValueBinder $binder = null)
|
||||||
{
|
{
|
||||||
if ($binder === null) {
|
if ($binder === null) {
|
||||||
throw new PHPExcel_Exception("A PHPExcel_Cell_IValueBinder is required for PHPExcel to function correctly.");
|
throw new Exception("A \\PHPExcel\\Cell\\IValueBinder is required for PHPExcel to function correctly.");
|
||||||
}
|
}
|
||||||
|
|
||||||
self::$valueBinder = $binder;
|
self::$valueBinder = $binder;
|
||||||
|
@ -994,7 +996,7 @@ class PHPExcel_Cell
|
||||||
* Set index to cellXf
|
* Set index to cellXf
|
||||||
*
|
*
|
||||||
* @param int $pValue
|
* @param int $pValue
|
||||||
* @return PHPExcel_Cell
|
* @return Cell
|
||||||
*/
|
*/
|
||||||
public function setXfIndex($pValue = 0)
|
public function setXfIndex($pValue = 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** PHPExcel root directory */
|
namespace PHPExcel\Cell;
|
||||||
if (!defined('PHPEXCEL_ROOT')) {
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
|
||||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Cell_AdvancedValueBinder
|
* PHPExcel_Cell_AdvancedValueBinder
|
||||||
|
@ -34,7 +27,7 @@ if (!defined('PHPEXCEL_ROOT')) {
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Cell_AdvancedValueBinder extends PHPExcel_Cell_DefaultValueBinder implements PHPExcel_Cell_IValueBinder
|
class AdvancedValueBinder extends DefaultValueBinder implements IValueBinder
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Bind value to a cell
|
* Bind value to a cell
|
||||||
|
@ -43,7 +36,7 @@ class PHPExcel_Cell_AdvancedValueBinder extends PHPExcel_Cell_DefaultValueBinder
|
||||||
* @param mixed $value Value to bind in cell
|
* @param mixed $value Value to bind in cell
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function bindValue(PHPExcel_Cell $cell, $value = null)
|
public function bindValue(\PHPExcel\Cell $cell, $value = null)
|
||||||
{
|
{
|
||||||
// sanitize UTF-8 strings
|
// sanitize UTF-8 strings
|
||||||
if (is_string($value)) {
|
if (is_string($value)) {
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Cell;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Cell_DataType
|
* PHPExcel_Cell_DataType
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Cell_DataType
|
class DataType
|
||||||
{
|
{
|
||||||
/* Data types */
|
/* Data types */
|
||||||
const TYPE_STRING2 = 'str';
|
const TYPE_STRING2 = 'str';
|
||||||
|
@ -71,7 +73,7 @@ class PHPExcel_Cell_DataType
|
||||||
*/
|
*/
|
||||||
public static function dataTypeForValue($pValue = null)
|
public static function dataTypeForValue($pValue = null)
|
||||||
{
|
{
|
||||||
return PHPExcel_Cell_DefaultValueBinder::dataTypeForValue($pValue);
|
return DefaultValueBinder::dataTypeForValue($pValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -82,13 +84,13 @@ class PHPExcel_Cell_DataType
|
||||||
*/
|
*/
|
||||||
public static function checkString($pValue = null)
|
public static function checkString($pValue = null)
|
||||||
{
|
{
|
||||||
if ($pValue instanceof PHPExcel_RichText) {
|
if ($pValue instanceof \PHPExcel\RichText) {
|
||||||
// TODO: Sanitize Rich-Text string (max. character count is 32,767)
|
// TODO: Sanitize Rich-Text string (max. character count is 32,767)
|
||||||
return $pValue;
|
return $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// string must never be longer than 32,767 characters, truncate if necessary
|
// string must never be longer than 32,767 characters, truncate if necessary
|
||||||
$pValue = PHPExcel_Shared_String::Substring($pValue, 0, 32767);
|
$pValue = \PHPExcel\Shared\String::Substring($pValue, 0, 32767);
|
||||||
|
|
||||||
// we require that newline is represented as "\n" in core, not as "\r\n" or "\r"
|
// we require that newline is represented as "\n" in core, not as "\r\n" or "\r"
|
||||||
$pValue = str_replace(array("\r\n", "\r"), "\n", $pValue);
|
$pValue = str_replace(array("\r\n", "\r"), "\n", $pValue);
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Cell;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Cell_DataValidation
|
* PHPExcel_Cell_DataValidation
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Cell_DataValidation
|
class DataValidation
|
||||||
{
|
{
|
||||||
/* Data validation types */
|
/* Data validation types */
|
||||||
const TYPE_NONE = 'none';
|
const TYPE_NONE = 'none';
|
||||||
|
@ -57,111 +59,97 @@ class PHPExcel_Cell_DataValidation
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $formula1;
|
private $formula1 = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Formula 2
|
* Formula 2
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $formula2;
|
private $formula2 = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type
|
* Type
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $type = PHPExcel_Cell_DataValidation::TYPE_NONE;
|
private $type = DataValidation::TYPE_NONE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Error style
|
* Error style
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $errorStyle = PHPExcel_Cell_DataValidation::STYLE_STOP;
|
private $errorStyle = DataValidation::STYLE_STOP;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operator
|
* Operator
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $operator;
|
private $operator = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allow Blank
|
* Allow Blank
|
||||||
*
|
*
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*/
|
*/
|
||||||
private $allowBlank;
|
private $allowBlank = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show DropDown
|
* Show DropDown
|
||||||
*
|
*
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*/
|
*/
|
||||||
private $showDropDown;
|
private $showDropDown = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show InputMessage
|
* Show InputMessage
|
||||||
*
|
*
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*/
|
*/
|
||||||
private $showInputMessage;
|
private $showInputMessage = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show ErrorMessage
|
* Show ErrorMessage
|
||||||
*
|
*
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*/
|
*/
|
||||||
private $showErrorMessage;
|
private $showErrorMessage = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Error title
|
* Error title
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $errorTitle;
|
private $errorTitle = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Error
|
* Error
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $error;
|
private $error = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prompt title
|
* Prompt title
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $promptTitle;
|
private $promptTitle = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prompt
|
* Prompt
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $prompt;
|
private $prompt = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_Cell_DataValidation
|
* Create a new PHPExcel_Cell_DataValidation
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
// Initialise member variables
|
|
||||||
$this->formula1 = '';
|
|
||||||
$this->formula2 = '';
|
|
||||||
$this->type = PHPExcel_Cell_DataValidation::TYPE_NONE;
|
|
||||||
$this->errorStyle = PHPExcel_Cell_DataValidation::STYLE_STOP;
|
|
||||||
$this->operator = '';
|
|
||||||
$this->allowBlank = false;
|
|
||||||
$this->showDropDown = false;
|
|
||||||
$this->showInputMessage = false;
|
|
||||||
$this->showErrorMessage = false;
|
|
||||||
$this->errorTitle = '';
|
|
||||||
$this->error = '';
|
|
||||||
$this->promptTitle = '';
|
|
||||||
$this->prompt = '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** PHPExcel root directory */
|
namespace PHPExcel\Cell;
|
||||||
if (!defined('PHPEXCEL_ROOT')) {
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
|
||||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Cell_DefaultValueBinder
|
* PHPExcel_Cell_DefaultValueBinder
|
||||||
|
@ -34,25 +27,25 @@ if (!defined('PHPEXCEL_ROOT')) {
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Cell_DefaultValueBinder implements PHPExcel_Cell_IValueBinder
|
class DefaultValueBinder implements IValueBinder
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Bind value to a cell
|
* Bind value to a cell
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Cell $cell Cell to bind value to
|
* @param \PHPExcel\Cell $cell Cell to bind value to
|
||||||
* @param mixed $value Value to bind in cell
|
* @param mixed $value Value to bind in cell
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function bindValue(PHPExcel_Cell $cell, $value = null)
|
public function bindValue(\PHPExcel\Cell $cell, $value = null)
|
||||||
{
|
{
|
||||||
// sanitize UTF-8 strings
|
// sanitize UTF-8 strings
|
||||||
if (is_string($value)) {
|
if (is_string($value)) {
|
||||||
$value = PHPExcel_Shared_String::SanitizeUTF8($value);
|
$value = \PHPExcel\Shared\String::SanitizeUTF8($value);
|
||||||
} elseif (is_object($value)) {
|
} elseif (is_object($value)) {
|
||||||
// Handle any objects that might be injected
|
// Handle any objects that might be injected
|
||||||
if ($value instanceof DateTime) {
|
if ($value instanceof DateTime) {
|
||||||
$value = $value->format('Y-m-d H:i:s');
|
$value = $value->format('Y-m-d H:i:s');
|
||||||
} elseif (!($value instanceof PHPExcel_RichText)) {
|
} elseif (!($value instanceof \PHPExcel\RichText)) {
|
||||||
$value = (string) $value;
|
$value = (string) $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,29 +67,29 @@ class PHPExcel_Cell_DefaultValueBinder implements PHPExcel_Cell_IValueBinder
|
||||||
{
|
{
|
||||||
// Match the value against a few data types
|
// Match the value against a few data types
|
||||||
if ($pValue === null) {
|
if ($pValue === null) {
|
||||||
return PHPExcel_Cell_DataType::TYPE_NULL;
|
return DataType::TYPE_NULL;
|
||||||
} elseif ($pValue === '') {
|
} elseif ($pValue === '') {
|
||||||
return PHPExcel_Cell_DataType::TYPE_STRING;
|
return DataType::TYPE_STRING;
|
||||||
} elseif ($pValue instanceof PHPExcel_RichText) {
|
} elseif ($pValue instanceof \PHPExcel\RichText) {
|
||||||
return PHPExcel_Cell_DataType::TYPE_INLINE;
|
return DataType::TYPE_INLINE;
|
||||||
} elseif ($pValue{0} === '=' && strlen($pValue) > 1) {
|
} elseif ($pValue{0} === '=' && strlen($pValue) > 1) {
|
||||||
return PHPExcel_Cell_DataType::TYPE_FORMULA;
|
return DataType::TYPE_FORMULA;
|
||||||
} elseif (is_bool($pValue)) {
|
} elseif (is_bool($pValue)) {
|
||||||
return PHPExcel_Cell_DataType::TYPE_BOOL;
|
return DataType::TYPE_BOOL;
|
||||||
} elseif (is_float($pValue) || is_int($pValue)) {
|
} elseif (is_float($pValue) || is_int($pValue)) {
|
||||||
return PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
return DataType::TYPE_NUMERIC;
|
||||||
} elseif (preg_match('/^[\+\-]?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)([Ee][\-\+]?[0-2]?\d{1,3})?$/', $pValue)) {
|
} elseif (preg_match('/^[\+\-]?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)([Ee][\-\+]?[0-2]?\d{1,3})?$/', $pValue)) {
|
||||||
$tValue = ltrim($pValue, '+-');
|
$tValue = ltrim($pValue, '+-');
|
||||||
if (is_string($pValue) && $tValue{0} === '0' && strlen($tValue) > 1 && $tValue{1} !== '.') {
|
if (is_string($pValue) && $tValue{0} === '0' && strlen($tValue) > 1 && $tValue{1} !== '.') {
|
||||||
return PHPExcel_Cell_DataType::TYPE_STRING;
|
return DataType::TYPE_STRING;
|
||||||
} elseif ((strpos($pValue, '.') === false) && ($pValue > PHP_INT_MAX)) {
|
} elseif ((strpos($pValue, '.') === false) && ($pValue > PHP_INT_MAX)) {
|
||||||
return PHPExcel_Cell_DataType::TYPE_STRING;
|
return DataType::TYPE_STRING;
|
||||||
}
|
}
|
||||||
return PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
return DataType::TYPE_NUMERIC;
|
||||||
} elseif (is_string($pValue) && array_key_exists($pValue, PHPExcel_Cell_DataType::getErrorCodes())) {
|
} elseif (is_string($pValue) && array_key_exists($pValue, DataType::getErrorCodes())) {
|
||||||
return PHPExcel_Cell_DataType::TYPE_ERROR;
|
return DataType::TYPE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
return PHPExcel_Cell_DataType::TYPE_STRING;
|
return DataType::TYPE_STRING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Cell;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Cell_Hyperlink
|
* PHPExcel_Cell_Hyperlink
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Cell_Hyperlink
|
class Hyperlink
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* URL to link the cell to
|
* URL to link the cell to
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Cell;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel
|
* PHPExcel_Cell_IValueBinder
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006 - 2015 PHPExcel
|
* Copyright (c) 2006 - 2015 PHPExcel
|
||||||
*
|
*
|
||||||
|
@ -25,16 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
|
interface IValueBinder
|
||||||
|
|
||||||
/**
|
|
||||||
* PHPExcel_Cell_IValueBinder
|
|
||||||
*
|
|
||||||
* @category PHPExcel
|
|
||||||
* @package PHPExcel_Cell
|
|
||||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
|
||||||
*/
|
|
||||||
interface PHPExcel_Cell_IValueBinder
|
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Bind value to a cell
|
* Bind value to a cell
|
||||||
|
@ -43,5 +36,5 @@ interface PHPExcel_Cell_IValueBinder
|
||||||
* @param mixed $value Value to bind in cell
|
* @param mixed $value Value to bind in cell
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function bindValue(PHPExcel_Cell $cell, $value = null);
|
public function bindValue(\PHPExcel\Cell $cell, $value = null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Chart
|
* PHPExcel_Chart
|
||||||
*
|
*
|
||||||
|
@ -20,12 +22,12 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
* @category PHPExcel
|
* @category PHPExcel
|
||||||
* @package PHPExcel_Chart
|
* @package PHPExcel_Chart
|
||||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2015 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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Chart
|
class Chart
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Chart Name
|
* Chart Name
|
||||||
|
@ -37,7 +39,7 @@ class PHPExcel_Chart
|
||||||
/**
|
/**
|
||||||
* Worksheet
|
* Worksheet
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Worksheet
|
* @var \PHPExcel\Worksheet
|
||||||
*/
|
*/
|
||||||
private $worksheet;
|
private $worksheet;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Chart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by PhpStorm.
|
* Created by PhpStorm.
|
||||||
* User: Wiktor Trzonkowski
|
* User: Wiktor Trzonkowski
|
||||||
|
@ -7,7 +9,7 @@
|
||||||
* Time: 12:11 PM
|
* Time: 12:11 PM
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
class Axis extends Properties
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Axis Number
|
* Axis Number
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Chart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel
|
* PHPExcel_Chart_DataSeries
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006 - 2015 PHPExcel
|
* Copyright (c) 2006 - 2015 PHPExcel
|
||||||
*
|
*
|
||||||
|
@ -24,15 +27,6 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PHPExcel_Chart_DataSeries
|
|
||||||
*
|
|
||||||
* @category PHPExcel
|
|
||||||
* @package PHPExcel_Chart
|
|
||||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
|
||||||
*/
|
|
||||||
class PHPExcel_Chart_DataSeries
|
class PHPExcel_Chart_DataSeries
|
||||||
{
|
{
|
||||||
const TYPE_BARCHART = 'barChart';
|
const TYPE_BARCHART = 'barChart';
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Chart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Chart_DataSeriesValues
|
* PHPExcel_Chart_DataSeriesValues
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Chart_DataSeriesValues
|
class DataSeriesValues
|
||||||
{
|
{
|
||||||
|
|
||||||
const DATASERIES_TYPE_STRING = 'String';
|
const DATASERIES_TYPE_STRING = 'String';
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Chart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Chart_Exception
|
* PHPExcel_Chart_Exception
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Chart_Exception extends PHPExcel_Exception
|
class Exception extends PHPExcel_Exception
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Error handler callback
|
* Error handler callback
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Chart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by PhpStorm.
|
* Created by PhpStorm.
|
||||||
* User: Wiktor Trzonkowski
|
* User: Wiktor Trzonkowski
|
||||||
|
@ -7,7 +9,7 @@
|
||||||
* Time: 2:36 PM
|
* Time: 2:36 PM
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class PHPExcel_Chart_GridLines extends PHPExcel_Chart_Properties
|
class GridLines extends Properties
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Chart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel
|
* PHPExcel_Chart_Layout
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006 - 2015 PHPExcel
|
* Copyright (c) 2006 - 2015 PHPExcel
|
||||||
*
|
*
|
||||||
|
@ -24,16 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
|
class Layout
|
||||||
|
|
||||||
/**
|
|
||||||
* PHPExcel_Chart_Layout
|
|
||||||
*
|
|
||||||
* @category PHPExcel
|
|
||||||
* @package PHPExcel_Chart
|
|
||||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
|
||||||
*/
|
|
||||||
class PHPExcel_Chart_Layout
|
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* layoutTarget
|
* layoutTarget
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Chart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Chart_Legend
|
* PHPExcel_Chart_Legend
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Chart_Legend
|
class Legend
|
||||||
{
|
{
|
||||||
/** Legend positions */
|
/** Legend positions */
|
||||||
const xlLegendPositionBottom = -4107; // Below the chart.
|
const xlLegendPositionBottom = -4107; // Below the chart.
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Chart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Chart_PlotArea
|
* PHPExcel_Chart_PlotArea
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Chart_PlotArea
|
class PlotArea
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* PlotArea Layout
|
* PlotArea Layout
|
||||||
|
@ -44,7 +46,7 @@ class PHPExcel_Chart_PlotArea
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_Chart_PlotArea
|
* Create a new PHPExcel_Chart_PlotArea
|
||||||
*/
|
*/
|
||||||
public function __construct(PHPExcel_Chart_Layout $layout = null, $plotSeries = array())
|
public function __construct(Layout $layout = null, $plotSeries = array())
|
||||||
{
|
{
|
||||||
$this->layout = $layout;
|
$this->layout = $layout;
|
||||||
$this->plotSeries = $plotSeries;
|
$this->plotSeries = $plotSeries;
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Chart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by PhpStorm.
|
* Created by PhpStorm.
|
||||||
* User: nhw2h8s
|
* User: nhw2h8s
|
||||||
|
@ -6,7 +9,7 @@
|
||||||
* Time: 5:45 PM
|
* Time: 5:45 PM
|
||||||
*/
|
*/
|
||||||
|
|
||||||
abstract class PHPExcel_Chart_Properties
|
abstract class Properties
|
||||||
{
|
{
|
||||||
const
|
const
|
||||||
EXCEL_COLOR_TYPE_STANDARD = 'prstClr',
|
EXCEL_COLOR_TYPE_STANDARD = 'prstClr',
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Chart\Renderer;
|
||||||
|
|
||||||
require_once(PHPExcel_Settings::getChartRendererPath().'/jpgraph.php');
|
require_once(PHPExcel_Settings::getChartRendererPath().'/jpgraph.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,21 +29,21 @@ require_once(PHPExcel_Settings::getChartRendererPath().'/jpgraph.php');
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Chart_Renderer_jpgraph
|
class jpgraph
|
||||||
{
|
{
|
||||||
private static $width = 640;
|
private static $width = 640;
|
||||||
|
|
||||||
private static $height = 480;
|
private static $height = 480;
|
||||||
|
|
||||||
private static $colourSet = array(
|
private static $colourSet = [
|
||||||
'mediumpurple1', 'palegreen3', 'gold1', 'cadetblue1',
|
'mediumpurple1', 'palegreen3', 'gold1', 'cadetblue1',
|
||||||
'darkmagenta', 'coral', 'dodgerblue3', 'eggplant',
|
'darkmagenta', 'coral', 'dodgerblue3', 'eggplant',
|
||||||
'mediumblue', 'magenta', 'sandybrown', 'cyan',
|
'mediumblue', 'magenta', 'sandybrown', 'cyan',
|
||||||
'firebrick1', 'forestgreen', 'deeppink4', 'darkolivegreen',
|
'firebrick1', 'forestgreen', 'deeppink4', 'darkolivegreen',
|
||||||
'goldenrod2'
|
'goldenrod2'
|
||||||
);
|
];
|
||||||
|
|
||||||
private static $markSet = array(
|
private static $markSet = [
|
||||||
'diamond' => MARK_DIAMOND,
|
'diamond' => MARK_DIAMOND,
|
||||||
'square' => MARK_SQUARE,
|
'square' => MARK_SQUARE,
|
||||||
'triangle' => MARK_UTRIANGLE,
|
'triangle' => MARK_UTRIANGLE,
|
||||||
|
@ -51,7 +53,7 @@ class PHPExcel_Chart_Renderer_jpgraph
|
||||||
'dash' => MARK_DTRIANGLE,
|
'dash' => MARK_DTRIANGLE,
|
||||||
'circle' => MARK_CIRCLE,
|
'circle' => MARK_CIRCLE,
|
||||||
'plus' => MARK_CROSS
|
'plus' => MARK_CROSS
|
||||||
);
|
];
|
||||||
|
|
||||||
|
|
||||||
private $chart;
|
private $chart;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Chart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Chart_Title
|
* PHPExcel_Chart_Title
|
||||||
*
|
*
|
||||||
|
@ -19,13 +21,13 @@
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
* @category PHPExcel
|
* @category PHPExcel
|
||||||
* @package PHPExcel_Chart
|
* @package PHPExcel_Chart
|
||||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
* @copyright Copyright (c) 2006 - 2015 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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Chart_Title
|
class Title
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,7 +47,7 @@ class PHPExcel_Chart_Title
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_Chart_Title
|
* Create a new PHPExcel_Chart_Title
|
||||||
*/
|
*/
|
||||||
public function __construct($caption = null, PHPExcel_Chart_Layout $layout = null)
|
public function __construct($caption = null, Layout $layout = null)
|
||||||
{
|
{
|
||||||
$this->caption = $caption;
|
$this->caption = $caption;
|
||||||
$this->layout = $layout;
|
$this->layout = $layout;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Comment
|
* PHPExcel_Comment
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Comment implements PHPExcel_IComparable
|
class Comment implements IComparable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Author
|
* Author
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Document;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_DocumentProperties
|
* PHPExcel_Document_Properties
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006 - 2015 PHPExcel
|
* Copyright (c) 2006 - 2015 PHPExcel
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_DocumentProperties
|
class Properties
|
||||||
{
|
{
|
||||||
/** constants */
|
/** constants */
|
||||||
const PROPERTY_TYPE_BOOLEAN = 'b';
|
const PROPERTY_TYPE_BOOLEAN = 'b';
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Document;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_DocumentSecurity
|
* PHPExcel_Document_Security
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006 - 2015 PHPExcel
|
* Copyright (c) 2006 - 2015 PHPExcel
|
||||||
*
|
*
|
||||||
|
@ -25,54 +27,48 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_DocumentSecurity
|
class Security
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* LockRevision
|
* LockRevision
|
||||||
*
|
*
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*/
|
*/
|
||||||
private $lockRevision;
|
private $lockRevision = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LockStructure
|
* LockStructure
|
||||||
*
|
*
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*/
|
*/
|
||||||
private $lockStructure;
|
private $lockStructure = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LockWindows
|
* LockWindows
|
||||||
*
|
*
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*/
|
*/
|
||||||
private $lockWindows;
|
private $lockWindows = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RevisionsPassword
|
* RevisionsPassword
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $revisionsPassword;
|
private $revisionsPassword = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WorkbookPassword
|
* WorkbookPassword
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $workbookPassword;
|
private $workbookPassword = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_DocumentSecurity
|
* Create a new PHPExcel_DocumentSecurity
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
// Initialise values
|
|
||||||
$this->lockRevision = false;
|
|
||||||
$this->lockStructure = false;
|
|
||||||
$this->lockWindows = false;
|
|
||||||
$this->revisionsPassword = '';
|
|
||||||
$this->workbookPassword = '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel
|
* PHPExcel\Exception
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006 - 2015 PHPExcel
|
* Copyright (c) 2006 - 2015 PHPExcel
|
||||||
*
|
*
|
||||||
|
@ -24,16 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
|
class Exception extends \Exception
|
||||||
|
|
||||||
/**
|
|
||||||
* PHPExcel_Exception
|
|
||||||
*
|
|
||||||
* @category PHPExcel
|
|
||||||
* @package PHPExcel
|
|
||||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
|
||||||
*/
|
|
||||||
class PHPExcel_Exception extends Exception
|
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Error handler callback
|
* Error handler callback
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_HashTable
|
* PHPExcel\HashTable
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006 - 2015 PHPExcel
|
* Copyright (c) 2006 - 2015 PHPExcel
|
||||||
*
|
*
|
||||||
|
@ -25,27 +27,27 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_HashTable
|
class HashTable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* HashTable elements
|
* HashTable elements
|
||||||
*
|
*
|
||||||
* @var array
|
* @var mixed[]
|
||||||
*/
|
*/
|
||||||
protected $items = array();
|
protected $items = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HashTable key map
|
* HashTable key map
|
||||||
*
|
*
|
||||||
* @var array
|
* @var mixed[]
|
||||||
*/
|
*/
|
||||||
protected $keyMap = array();
|
protected $keyMap = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_HashTable
|
* Create a new \PHPExcel\HashTable
|
||||||
*
|
*
|
||||||
* @param PHPExcel_IComparable[] $pSource Optional source array to create HashTable from
|
* @param IComparable[] $pSource Optional source array to create HashTable from
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function __construct($pSource = null)
|
public function __construct($pSource = null)
|
||||||
{
|
{
|
||||||
|
@ -58,8 +60,8 @@ class PHPExcel_HashTable
|
||||||
/**
|
/**
|
||||||
* Add HashTable items from source
|
* Add HashTable items from source
|
||||||
*
|
*
|
||||||
* @param PHPExcel_IComparable[] $pSource Source array to create HashTable from
|
* @param IComparable[] $pSource Source array to create HashTable from
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function addFromSource($pSource = null)
|
public function addFromSource($pSource = null)
|
||||||
{
|
{
|
||||||
|
@ -79,7 +81,7 @@ class PHPExcel_HashTable
|
||||||
* Add HashTable item
|
* Add HashTable item
|
||||||
*
|
*
|
||||||
* @param PHPExcel_IComparable $pSource Item to add
|
* @param PHPExcel_IComparable $pSource Item to add
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function add(PHPExcel_IComparable $pSource = null)
|
public function add(PHPExcel_IComparable $pSource = null)
|
||||||
{
|
{
|
||||||
|
@ -93,8 +95,8 @@ class PHPExcel_HashTable
|
||||||
/**
|
/**
|
||||||
* Remove HashTable item
|
* Remove HashTable item
|
||||||
*
|
*
|
||||||
* @param PHPExcel_IComparable $pSource Item to remove
|
* @param IComparable $pSource Item to remove
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function remove(PHPExcel_IComparable $pSource = null)
|
public function remove(PHPExcel_IComparable $pSource = null)
|
||||||
{
|
{
|
||||||
|
@ -140,7 +142,7 @@ class PHPExcel_HashTable
|
||||||
* Get index for hash code
|
* Get index for hash code
|
||||||
*
|
*
|
||||||
* @param string $pHashCode
|
* @param string $pHashCode
|
||||||
* @return int Index
|
* @return int Index
|
||||||
*/
|
*/
|
||||||
public function getIndexForHashCode($pHashCode = '')
|
public function getIndexForHashCode($pHashCode = '')
|
||||||
{
|
{
|
||||||
|
@ -151,7 +153,7 @@ class PHPExcel_HashTable
|
||||||
* Get by index
|
* Get by index
|
||||||
*
|
*
|
||||||
* @param int $pIndex
|
* @param int $pIndex
|
||||||
* @return PHPExcel_IComparable
|
* @return IComparable
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function getByIndex($pIndex = 0)
|
public function getByIndex($pIndex = 0)
|
||||||
|
@ -167,7 +169,7 @@ class PHPExcel_HashTable
|
||||||
* Get by hashcode
|
* Get by hashcode
|
||||||
*
|
*
|
||||||
* @param string $pHashCode
|
* @param string $pHashCode
|
||||||
* @return PHPExcel_IComparable
|
* @return IComparable
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function getByHashCode($pHashCode = '')
|
public function getByHashCode($pHashCode = '')
|
||||||
|
@ -182,7 +184,7 @@ class PHPExcel_HashTable
|
||||||
/**
|
/**
|
||||||
* HashTable to array
|
* HashTable to array
|
||||||
*
|
*
|
||||||
* @return PHPExcel_IComparable[]
|
* @return IComparable[]
|
||||||
*/
|
*/
|
||||||
public function toArray()
|
public function toArray()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
class PHPExcel_Helper_HTML
|
namespace PHPExcel\Helper;
|
||||||
|
|
||||||
|
class HTML
|
||||||
{
|
{
|
||||||
protected static $colourMap = array(
|
protected static $colourMap = [
|
||||||
'aliceblue' => 'f0f8ff',
|
'aliceblue' => 'f0f8ff',
|
||||||
'antiquewhite' => 'faebd7',
|
'antiquewhite' => 'faebd7',
|
||||||
'antiquewhite1' => 'ffefdb',
|
'antiquewhite1' => 'ffefdb',
|
||||||
|
@ -520,7 +522,7 @@ class PHPExcel_Helper_HTML
|
||||||
'yellow3' => 'cdcd00',
|
'yellow3' => 'cdcd00',
|
||||||
'yellow4' => '8b8b00',
|
'yellow4' => '8b8b00',
|
||||||
'yellowgreen' => '9acd32',
|
'yellowgreen' => '9acd32',
|
||||||
);
|
];
|
||||||
|
|
||||||
protected $face;
|
protected $face;
|
||||||
protected $size;
|
protected $size;
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** PHPExcel root directory */
|
namespace PHPExcel;
|
||||||
if (!defined('PHPEXCEL_ROOT')) {
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../');
|
|
||||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_IOFactory
|
* PHPExcel_IOFactory
|
||||||
|
@ -34,7 +27,7 @@ if (!defined('PHPEXCEL_ROOT')) {
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_IOFactory
|
class IOFactory
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Search locations
|
* Search locations
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_NamedRange
|
* PHPExcel_NamedRange
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_NamedRange
|
class NamedRange
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Range name
|
* Range name
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_ReferenceHelper (Singleton)
|
* PHPExcel_ReferenceHelper (Singleton)
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_ReferenceHelper
|
class ReferenceHelper
|
||||||
{
|
{
|
||||||
/** Constants */
|
/** Constants */
|
||||||
/** Regular Expressions */
|
/** Regular Expressions */
|
||||||
|
@ -37,26 +39,26 @@ class PHPExcel_ReferenceHelper
|
||||||
/**
|
/**
|
||||||
* Instance of this class
|
* Instance of this class
|
||||||
*
|
*
|
||||||
* @var PHPExcel_ReferenceHelper
|
* @var ReferenceHelper
|
||||||
*/
|
*/
|
||||||
private static $instance;
|
private static $instance;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get an instance of this class
|
* Get an instance of this class
|
||||||
*
|
*
|
||||||
* @return PHPExcel_ReferenceHelper
|
* @return ReferenceHelper
|
||||||
*/
|
*/
|
||||||
public static function getInstance()
|
public static function getInstance()
|
||||||
{
|
{
|
||||||
if (!isset(self::$instance) || (self::$instance === null)) {
|
if (!isset(self::$instance) || (self::$instance === null)) {
|
||||||
self::$instance = new PHPExcel_ReferenceHelper();
|
self::$instance = new ReferenceHelper();
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::$instance;
|
return self::$instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_ReferenceHelper
|
* Create a new ReferenceHelper
|
||||||
*/
|
*/
|
||||||
protected function __construct()
|
protected function __construct()
|
||||||
{
|
{
|
||||||
|
@ -138,8 +140,8 @@ class PHPExcel_ReferenceHelper
|
||||||
*/
|
*/
|
||||||
private static function cellAddressInDeleteRange($cellAddress, $beforeRow, $pNumRows, $beforeColumnIndex, $pNumCols)
|
private static function cellAddressInDeleteRange($cellAddress, $beforeRow, $pNumRows, $beforeColumnIndex, $pNumCols)
|
||||||
{
|
{
|
||||||
list($cellColumn, $cellRow) = PHPExcel_Cell::coordinateFromString($cellAddress);
|
list($cellColumn, $cellRow) = Cell::coordinateFromString($cellAddress);
|
||||||
$cellColumnIndex = PHPExcel_Cell::columnIndexFromString($cellColumn);
|
$cellColumnIndex = Cell::columnIndexFromString($cellColumn);
|
||||||
// Is cell within the range of rows/columns if we're deleting
|
// Is cell within the range of rows/columns if we're deleting
|
||||||
if ($pNumRows < 0 &&
|
if ($pNumRows < 0 &&
|
||||||
($cellRow >= ($beforeRow + $pNumRows)) &&
|
($cellRow >= ($beforeRow + $pNumRows)) &&
|
||||||
|
@ -156,32 +158,32 @@ class PHPExcel_ReferenceHelper
|
||||||
/**
|
/**
|
||||||
* Update page breaks when inserting/deleting rows/columns
|
* Update page breaks when inserting/deleting rows/columns
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $pSheet The worksheet that we're editing
|
* @param Worksheet $pSheet The worksheet that we're editing
|
||||||
* @param string $pBefore Insert/Delete before this cell address (e.g. 'A1')
|
* @param string $pBefore Insert/Delete before this cell address (e.g. 'A1')
|
||||||
* @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before
|
* @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before
|
||||||
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
||||||
* @param integer $beforeRow Number of the row we're inserting/deleting before
|
* @param integer $beforeRow Number of the row we're inserting/deleting before
|
||||||
* @param integer $pNumRows Number of rows to insert/delete (negative values indicate deletion)
|
* @param integer $pNumRows Number of rows to insert/delete (negative values indicate deletion)
|
||||||
*/
|
*/
|
||||||
protected function adjustPageBreaks(PHPExcel_Worksheet $pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows)
|
protected function adjustPageBreaks(Worksheet $pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows)
|
||||||
{
|
{
|
||||||
$aBreaks = $pSheet->getBreaks();
|
$aBreaks = $pSheet->getBreaks();
|
||||||
($pNumCols > 0 || $pNumRows > 0) ?
|
($pNumCols > 0 || $pNumRows > 0) ?
|
||||||
uksort($aBreaks, array('PHPExcel_ReferenceHelper','cellReverseSort')) :
|
uksort($aBreaks, array('self','cellReverseSort')) :
|
||||||
uksort($aBreaks, array('PHPExcel_ReferenceHelper','cellSort'));
|
uksort($aBreaks, array('self','cellSort'));
|
||||||
|
|
||||||
foreach ($aBreaks as $key => $value) {
|
foreach ($aBreaks as $key => $value) {
|
||||||
if (self::cellAddressInDeleteRange($key, $beforeRow, $pNumRows, $beforeColumnIndex, $pNumCols)) {
|
if (self::cellAddressInDeleteRange($key, $beforeRow, $pNumRows, $beforeColumnIndex, $pNumCols)) {
|
||||||
// If we're deleting, then clear any defined breaks that are within the range
|
// If we're deleting, then clear any defined breaks that are within the range
|
||||||
// of rows/columns that we're deleting
|
// of rows/columns that we're deleting
|
||||||
$pSheet->setBreak($key, PHPExcel_Worksheet::BREAK_NONE);
|
$pSheet->setBreak($key, Worksheet::BREAK_NONE);
|
||||||
} else {
|
} else {
|
||||||
// Otherwise update any affected breaks by inserting a new break at the appropriate point
|
// Otherwise update any affected breaks by inserting a new break at the appropriate point
|
||||||
// and removing the old affected break
|
// and removing the old affected break
|
||||||
$newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows);
|
$newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows);
|
||||||
if ($key != $newReference) {
|
if ($key != $newReference) {
|
||||||
$pSheet->setBreak($newReference, $value)
|
$pSheet->setBreak($newReference, $value)
|
||||||
->setBreak($key, PHPExcel_Worksheet::BREAK_NONE);
|
->setBreak($key, Worksheet::BREAK_NONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,7 +192,7 @@ class PHPExcel_ReferenceHelper
|
||||||
/**
|
/**
|
||||||
* Update cell comments when inserting/deleting rows/columns
|
* Update cell comments when inserting/deleting rows/columns
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $pSheet The worksheet that we're editing
|
* @param Worksheet $pSheet The worksheet that we're editing
|
||||||
* @param string $pBefore Insert/Delete before this cell address (e.g. 'A1')
|
* @param string $pBefore Insert/Delete before this cell address (e.g. 'A1')
|
||||||
* @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before
|
* @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before
|
||||||
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
||||||
|
@ -217,7 +219,7 @@ class PHPExcel_ReferenceHelper
|
||||||
/**
|
/**
|
||||||
* Update hyperlinks when inserting/deleting rows/columns
|
* Update hyperlinks when inserting/deleting rows/columns
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $pSheet The worksheet that we're editing
|
* @param Worksheet $pSheet The worksheet that we're editing
|
||||||
* @param string $pBefore Insert/Delete before this cell address (e.g. 'A1')
|
* @param string $pBefore Insert/Delete before this cell address (e.g. 'A1')
|
||||||
* @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before
|
* @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before
|
||||||
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
||||||
|
@ -227,7 +229,9 @@ class PHPExcel_ReferenceHelper
|
||||||
protected function adjustHyperlinks($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows)
|
protected function adjustHyperlinks($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows)
|
||||||
{
|
{
|
||||||
$aHyperlinkCollection = $pSheet->getHyperlinkCollection();
|
$aHyperlinkCollection = $pSheet->getHyperlinkCollection();
|
||||||
($pNumCols > 0 || $pNumRows > 0) ? uksort($aHyperlinkCollection, array('PHPExcel_ReferenceHelper','cellReverseSort')) : uksort($aHyperlinkCollection, array('PHPExcel_ReferenceHelper','cellSort'));
|
($pNumCols > 0 || $pNumRows > 0) ?
|
||||||
|
uksort($aHyperlinkCollection, array('self','cellReverseSort')) :
|
||||||
|
uksort($aHyperlinkCollection, array('self','cellSort'));
|
||||||
|
|
||||||
foreach ($aHyperlinkCollection as $key => $value) {
|
foreach ($aHyperlinkCollection as $key => $value) {
|
||||||
$newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows);
|
$newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows);
|
||||||
|
@ -241,7 +245,7 @@ class PHPExcel_ReferenceHelper
|
||||||
/**
|
/**
|
||||||
* Update data validations when inserting/deleting rows/columns
|
* Update data validations when inserting/deleting rows/columns
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $pSheet The worksheet that we're editing
|
* @param Worksheet $pSheet The worksheet that we're editing
|
||||||
* @param string $pBefore Insert/Delete before this cell address (e.g. 'A1')
|
* @param string $pBefore Insert/Delete before this cell address (e.g. 'A1')
|
||||||
* @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before
|
* @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before
|
||||||
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
||||||
|
@ -251,7 +255,9 @@ class PHPExcel_ReferenceHelper
|
||||||
protected function adjustDataValidations($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows)
|
protected function adjustDataValidations($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows)
|
||||||
{
|
{
|
||||||
$aDataValidationCollection = $pSheet->getDataValidationCollection();
|
$aDataValidationCollection = $pSheet->getDataValidationCollection();
|
||||||
($pNumCols > 0 || $pNumRows > 0) ? uksort($aDataValidationCollection, array('PHPExcel_ReferenceHelper','cellReverseSort')) : uksort($aDataValidationCollection, array('PHPExcel_ReferenceHelper','cellSort'));
|
($pNumCols > 0 || $pNumRows > 0) ?
|
||||||
|
uksort($aDataValidationCollection, array('self','cellReverseSort')) :
|
||||||
|
uksort($aDataValidationCollection, array('self','cellSort'));
|
||||||
|
|
||||||
foreach ($aDataValidationCollection as $key => $value) {
|
foreach ($aDataValidationCollection as $key => $value) {
|
||||||
$newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows);
|
$newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows);
|
||||||
|
@ -265,7 +271,7 @@ class PHPExcel_ReferenceHelper
|
||||||
/**
|
/**
|
||||||
* Update merged cells when inserting/deleting rows/columns
|
* Update merged cells when inserting/deleting rows/columns
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $pSheet The worksheet that we're editing
|
* @param Worksheet $pSheet The worksheet that we're editing
|
||||||
* @param string $pBefore Insert/Delete before this cell address (e.g. 'A1')
|
* @param string $pBefore Insert/Delete before this cell address (e.g. 'A1')
|
||||||
* @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before
|
* @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before
|
||||||
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
||||||
|
@ -286,7 +292,7 @@ class PHPExcel_ReferenceHelper
|
||||||
/**
|
/**
|
||||||
* Update protected cells when inserting/deleting rows/columns
|
* Update protected cells when inserting/deleting rows/columns
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $pSheet The worksheet that we're editing
|
* @param Worksheet $pSheet The worksheet that we're editing
|
||||||
* @param string $pBefore Insert/Delete before this cell address (e.g. 'A1')
|
* @param string $pBefore Insert/Delete before this cell address (e.g. 'A1')
|
||||||
* @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before
|
* @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before
|
||||||
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
||||||
|
@ -297,8 +303,8 @@ class PHPExcel_ReferenceHelper
|
||||||
{
|
{
|
||||||
$aProtectedCells = $pSheet->getProtectedCells();
|
$aProtectedCells = $pSheet->getProtectedCells();
|
||||||
($pNumCols > 0 || $pNumRows > 0) ?
|
($pNumCols > 0 || $pNumRows > 0) ?
|
||||||
uksort($aProtectedCells, array('PHPExcel_ReferenceHelper','cellReverseSort')) :
|
uksort($aProtectedCells, array('self','cellReverseSort')) :
|
||||||
uksort($aProtectedCells, array('PHPExcel_ReferenceHelper','cellSort'));
|
uksort($aProtectedCells, array('self','cellSort'));
|
||||||
foreach ($aProtectedCells as $key => $value) {
|
foreach ($aProtectedCells as $key => $value) {
|
||||||
$newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows);
|
$newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows);
|
||||||
if ($key != $newReference) {
|
if ($key != $newReference) {
|
||||||
|
@ -311,7 +317,7 @@ class PHPExcel_ReferenceHelper
|
||||||
/**
|
/**
|
||||||
* Update column dimensions when inserting/deleting rows/columns
|
* Update column dimensions when inserting/deleting rows/columns
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $pSheet The worksheet that we're editing
|
* @param Worksheet $pSheet The worksheet that we're editing
|
||||||
* @param string $pBefore Insert/Delete before this cell address (e.g. 'A1')
|
* @param string $pBefore Insert/Delete before this cell address (e.g. 'A1')
|
||||||
* @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before
|
* @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before
|
||||||
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
||||||
|
@ -324,7 +330,7 @@ class PHPExcel_ReferenceHelper
|
||||||
if (!empty($aColumnDimensions)) {
|
if (!empty($aColumnDimensions)) {
|
||||||
foreach ($aColumnDimensions as $objColumnDimension) {
|
foreach ($aColumnDimensions as $objColumnDimension) {
|
||||||
$newReference = $this->updateCellReference($objColumnDimension->getColumnIndex() . '1', $pBefore, $pNumCols, $pNumRows);
|
$newReference = $this->updateCellReference($objColumnDimension->getColumnIndex() . '1', $pBefore, $pNumCols, $pNumRows);
|
||||||
list($newReference) = PHPExcel_Cell::coordinateFromString($newReference);
|
list($newReference) = Cell::coordinateFromString($newReference);
|
||||||
if ($objColumnDimension->getColumnIndex() != $newReference) {
|
if ($objColumnDimension->getColumnIndex() != $newReference) {
|
||||||
$objColumnDimension->setColumnIndex($newReference);
|
$objColumnDimension->setColumnIndex($newReference);
|
||||||
}
|
}
|
||||||
|
@ -336,7 +342,7 @@ class PHPExcel_ReferenceHelper
|
||||||
/**
|
/**
|
||||||
* Update row dimensions when inserting/deleting rows/columns
|
* Update row dimensions when inserting/deleting rows/columns
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $pSheet The worksheet that we're editing
|
* @param Worksheet $pSheet The worksheet that we're editing
|
||||||
* @param string $pBefore Insert/Delete before this cell address (e.g. 'A1')
|
* @param string $pBefore Insert/Delete before this cell address (e.g. 'A1')
|
||||||
* @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before
|
* @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before
|
||||||
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
||||||
|
@ -349,7 +355,7 @@ class PHPExcel_ReferenceHelper
|
||||||
if (!empty($aRowDimensions)) {
|
if (!empty($aRowDimensions)) {
|
||||||
foreach ($aRowDimensions as $objRowDimension) {
|
foreach ($aRowDimensions as $objRowDimension) {
|
||||||
$newReference = $this->updateCellReference('A' . $objRowDimension->getRowIndex(), $pBefore, $pNumCols, $pNumRows);
|
$newReference = $this->updateCellReference('A' . $objRowDimension->getRowIndex(), $pBefore, $pNumCols, $pNumRows);
|
||||||
list(, $newReference) = PHPExcel_Cell::coordinateFromString($newReference);
|
list(, $newReference) = Cell::coordinateFromString($newReference);
|
||||||
if ($objRowDimension->getRowIndex() != $newReference) {
|
if ($objRowDimension->getRowIndex() != $newReference) {
|
||||||
$objRowDimension->setRowIndex($newReference);
|
$objRowDimension->setRowIndex($newReference);
|
||||||
}
|
}
|
||||||
|
@ -373,10 +379,10 @@ class PHPExcel_ReferenceHelper
|
||||||
* @param string $pBefore Insert before this cell address (e.g. 'A1')
|
* @param string $pBefore Insert before this cell address (e.g. 'A1')
|
||||||
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
* @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion)
|
||||||
* @param integer $pNumRows Number of rows to insert/delete (negative values indicate deletion)
|
* @param integer $pNumRows Number of rows to insert/delete (negative values indicate deletion)
|
||||||
* @param PHPExcel_Worksheet $pSheet The worksheet that we're editing
|
* @param Worksheet $pSheet The worksheet that we're editing
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function insertNewBefore($pBefore = 'A1', $pNumCols = 0, $pNumRows = 0, PHPExcel_Worksheet $pSheet = null)
|
public function insertNewBefore($pBefore = 'A1', $pNumCols = 0, $pNumRows = 0, Worksheet $pSheet = null)
|
||||||
{
|
{
|
||||||
$remove = ($pNumCols < 0 || $pNumRows < 0);
|
$remove = ($pNumCols < 0 || $pNumRows < 0);
|
||||||
$aCellCollection = $pSheet->getCellCollection();
|
$aCellCollection = $pSheet->getCellCollection();
|
||||||
|
@ -384,8 +390,8 @@ class PHPExcel_ReferenceHelper
|
||||||
// Get coordinates of $pBefore
|
// Get coordinates of $pBefore
|
||||||
$beforeColumn = 'A';
|
$beforeColumn = 'A';
|
||||||
$beforeRow = 1;
|
$beforeRow = 1;
|
||||||
list($beforeColumn, $beforeRow) = PHPExcel_Cell::coordinateFromString($pBefore);
|
list($beforeColumn, $beforeRow) = Cell::coordinateFromString($pBefore);
|
||||||
$beforeColumnIndex = PHPExcel_Cell::columnIndexFromString($beforeColumn);
|
$beforeColumnIndex = Cell::columnIndexFromString($beforeColumn);
|
||||||
|
|
||||||
// Clear cells if we are removing columns or rows
|
// Clear cells if we are removing columns or rows
|
||||||
$highestColumn = $pSheet->getHighestColumn();
|
$highestColumn = $pSheet->getHighestColumn();
|
||||||
|
@ -395,10 +401,10 @@ class PHPExcel_ReferenceHelper
|
||||||
if ($pNumCols < 0 && $beforeColumnIndex - 2 + $pNumCols > 0) {
|
if ($pNumCols < 0 && $beforeColumnIndex - 2 + $pNumCols > 0) {
|
||||||
for ($i = 1; $i <= $highestRow - 1; ++$i) {
|
for ($i = 1; $i <= $highestRow - 1; ++$i) {
|
||||||
for ($j = $beforeColumnIndex - 1 + $pNumCols; $j <= $beforeColumnIndex - 2; ++$j) {
|
for ($j = $beforeColumnIndex - 1 + $pNumCols; $j <= $beforeColumnIndex - 2; ++$j) {
|
||||||
$coordinate = PHPExcel_Cell::stringFromColumnIndex($j) . $i;
|
$coordinate = Cell::stringFromColumnIndex($j) . $i;
|
||||||
$pSheet->removeConditionalStyles($coordinate);
|
$pSheet->removeConditionalStyles($coordinate);
|
||||||
if ($pSheet->cellExists($coordinate)) {
|
if ($pSheet->cellExists($coordinate)) {
|
||||||
$pSheet->getCell($coordinate)->setValueExplicit('', PHPExcel_Cell_DataType::TYPE_NULL);
|
$pSheet->getCell($coordinate)->setValueExplicit('', Cell\DataType::TYPE_NULL);
|
||||||
$pSheet->getCell($coordinate)->setXfIndex(0);
|
$pSheet->getCell($coordinate)->setXfIndex(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -407,12 +413,12 @@ class PHPExcel_ReferenceHelper
|
||||||
|
|
||||||
// 2. Clear row strips if we are removing rows
|
// 2. Clear row strips if we are removing rows
|
||||||
if ($pNumRows < 0 && $beforeRow - 1 + $pNumRows > 0) {
|
if ($pNumRows < 0 && $beforeRow - 1 + $pNumRows > 0) {
|
||||||
for ($i = $beforeColumnIndex - 1; $i <= PHPExcel_Cell::columnIndexFromString($highestColumn) - 1; ++$i) {
|
for ($i = $beforeColumnIndex - 1; $i <= Cell::columnIndexFromString($highestColumn) - 1; ++$i) {
|
||||||
for ($j = $beforeRow + $pNumRows; $j <= $beforeRow - 1; ++$j) {
|
for ($j = $beforeRow + $pNumRows; $j <= $beforeRow - 1; ++$j) {
|
||||||
$coordinate = PHPExcel_Cell::stringFromColumnIndex($i) . $j;
|
$coordinate = Cell::stringFromColumnIndex($i) . $j;
|
||||||
$pSheet->removeConditionalStyles($coordinate);
|
$pSheet->removeConditionalStyles($coordinate);
|
||||||
if ($pSheet->cellExists($coordinate)) {
|
if ($pSheet->cellExists($coordinate)) {
|
||||||
$pSheet->getCell($coordinate)->setValueExplicit('', PHPExcel_Cell_DataType::TYPE_NULL);
|
$pSheet->getCell($coordinate)->setValueExplicit('', Cell\DataType::TYPE_NULL);
|
||||||
$pSheet->getCell($coordinate)->setXfIndex(0);
|
$pSheet->getCell($coordinate)->setXfIndex(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -426,14 +432,14 @@ class PHPExcel_ReferenceHelper
|
||||||
}
|
}
|
||||||
while ($cellID = array_pop($aCellCollection)) {
|
while ($cellID = array_pop($aCellCollection)) {
|
||||||
$cell = $pSheet->getCell($cellID);
|
$cell = $pSheet->getCell($cellID);
|
||||||
$cellIndex = PHPExcel_Cell::columnIndexFromString($cell->getColumn());
|
$cellIndex = Cell::columnIndexFromString($cell->getColumn());
|
||||||
|
|
||||||
if ($cellIndex-1 + $pNumCols < 0) {
|
if ($cellIndex-1 + $pNumCols < 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// New coordinates
|
// New coordinates
|
||||||
$newCoordinates = PHPExcel_Cell::stringFromColumnIndex($cellIndex-1 + $pNumCols) . ($cell->getRow() + $pNumRows);
|
$newCoordinates = Cell::stringFromColumnIndex($cellIndex-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 (($cellIndex >= $beforeColumnIndex) && ($cell->getRow() >= $beforeRow)) {
|
if (($cellIndex >= $beforeColumnIndex) && ($cell->getRow() >= $beforeRow)) {
|
||||||
|
@ -441,7 +447,7 @@ class PHPExcel_ReferenceHelper
|
||||||
$pSheet->getCell($newCoordinates)->setXfIndex($cell->getXfIndex());
|
$pSheet->getCell($newCoordinates)->setXfIndex($cell->getXfIndex());
|
||||||
|
|
||||||
// Insert this cell at its new location
|
// Insert this cell at its new location
|
||||||
if ($cell->getDataType() == PHPExcel_Cell_DataType::TYPE_FORMULA) {
|
if ($cell->getDataType() == 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, $pSheet->getTitle()));
|
->setValue($this->updateFormulaReferences($cell->getValue(), $pBefore, $pNumCols, $pNumRows, $pSheet->getTitle()));
|
||||||
|
@ -455,7 +461,7 @@ class PHPExcel_ReferenceHelper
|
||||||
} else {
|
} else {
|
||||||
/* We don't need to update styles for rows/columns before our insertion position,
|
/* We don't need to update styles for rows/columns before our insertion position,
|
||||||
but we do still need to adjust any formulae in those cells */
|
but we do still need to adjust any formulae in those cells */
|
||||||
if ($cell->getDataType() == PHPExcel_Cell_DataType::TYPE_FORMULA) {
|
if ($cell->getDataType() == Cell\DataType::TYPE_FORMULA) {
|
||||||
// Formula should be adjusted
|
// Formula should be adjusted
|
||||||
$cell->setValue($this->updateFormulaReferences($cell->getValue(), $pBefore, $pNumCols, $pNumRows, $pSheet->getTitle()));
|
$cell->setValue($this->updateFormulaReferences($cell->getValue(), $pBefore, $pNumCols, $pNumRows, $pSheet->getTitle()));
|
||||||
}
|
}
|
||||||
|
@ -470,7 +476,7 @@ class PHPExcel_ReferenceHelper
|
||||||
if ($pNumCols > 0 && $beforeColumnIndex - 2 > 0) {
|
if ($pNumCols > 0 && $beforeColumnIndex - 2 > 0) {
|
||||||
for ($i = $beforeRow; $i <= $highestRow - 1; ++$i) {
|
for ($i = $beforeRow; $i <= $highestRow - 1; ++$i) {
|
||||||
// Style
|
// Style
|
||||||
$coordinate = PHPExcel_Cell::stringFromColumnIndex($beforeColumnIndex - 2) . $i;
|
$coordinate = Cell::stringFromColumnIndex($beforeColumnIndex - 2) . $i;
|
||||||
if ($pSheet->cellExists($coordinate)) {
|
if ($pSheet->cellExists($coordinate)) {
|
||||||
$xfIndex = $pSheet->getCell($coordinate)->getXfIndex();
|
$xfIndex = $pSheet->getCell($coordinate)->getXfIndex();
|
||||||
$conditionalStyles = $pSheet->conditionalStylesExists($coordinate) ?
|
$conditionalStyles = $pSheet->conditionalStylesExists($coordinate) ?
|
||||||
|
@ -482,7 +488,7 @@ class PHPExcel_ReferenceHelper
|
||||||
foreach ($conditionalStyles as $conditionalStyle) {
|
foreach ($conditionalStyles as $conditionalStyle) {
|
||||||
$cloned[] = clone $conditionalStyle;
|
$cloned[] = clone $conditionalStyle;
|
||||||
}
|
}
|
||||||
$pSheet->setConditionalStyles(PHPExcel_Cell::stringFromColumnIndex($j) . $i, $cloned);
|
$pSheet->setConditionalStyles(Cell::stringFromColumnIndex($j) . $i, $cloned);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -491,21 +497,21 @@ class PHPExcel_ReferenceHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($pNumRows > 0 && $beforeRow - 1 > 0) {
|
if ($pNumRows > 0 && $beforeRow - 1 > 0) {
|
||||||
for ($i = $beforeColumnIndex - 1; $i <= PHPExcel_Cell::columnIndexFromString($highestColumn) - 1; ++$i) {
|
for ($i = $beforeColumnIndex - 1; $i <= Cell::columnIndexFromString($highestColumn) - 1; ++$i) {
|
||||||
// Style
|
// Style
|
||||||
$coordinate = PHPExcel_Cell::stringFromColumnIndex($i) . ($beforeRow - 1);
|
$coordinate = Cell::stringFromColumnIndex($i) . ($beforeRow - 1);
|
||||||
if ($pSheet->cellExists($coordinate)) {
|
if ($pSheet->cellExists($coordinate)) {
|
||||||
$xfIndex = $pSheet->getCell($coordinate)->getXfIndex();
|
$xfIndex = $pSheet->getCell($coordinate)->getXfIndex();
|
||||||
$conditionalStyles = $pSheet->conditionalStylesExists($coordinate) ?
|
$conditionalStyles = $pSheet->conditionalStylesExists($coordinate) ?
|
||||||
$pSheet->getConditionalStyles($coordinate) : false;
|
$pSheet->getConditionalStyles($coordinate) : false;
|
||||||
for ($j = $beforeRow; $j <= $beforeRow - 1 + $pNumRows; ++$j) {
|
for ($j = $beforeRow; $j <= $beforeRow - 1 + $pNumRows; ++$j) {
|
||||||
$pSheet->getCell(PHPExcel_Cell::stringFromColumnIndex($i) . $j)->setXfIndex($xfIndex);
|
$pSheet->getCell(Cell::stringFromColumnIndex($i) . $j)->setXfIndex($xfIndex);
|
||||||
if ($conditionalStyles) {
|
if ($conditionalStyles) {
|
||||||
$cloned = array();
|
$cloned = array();
|
||||||
foreach ($conditionalStyles as $conditionalStyle) {
|
foreach ($conditionalStyles as $conditionalStyle) {
|
||||||
$cloned[] = clone $conditionalStyle;
|
$cloned[] = clone $conditionalStyle;
|
||||||
}
|
}
|
||||||
$pSheet->setConditionalStyles(PHPExcel_Cell::stringFromColumnIndex($i) . $j, $cloned);
|
$pSheet->setConditionalStyles(Cell::stringFromColumnIndex($i) . $j, $cloned);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -544,8 +550,8 @@ class PHPExcel_ReferenceHelper
|
||||||
$autoFilterColumns = array_keys($autoFilter->getColumns());
|
$autoFilterColumns = array_keys($autoFilter->getColumns());
|
||||||
if (count($autoFilterColumns) > 0) {
|
if (count($autoFilterColumns) > 0) {
|
||||||
sscanf($pBefore, '%[A-Z]%d', $column, $row);
|
sscanf($pBefore, '%[A-Z]%d', $column, $row);
|
||||||
$columnIndex = PHPExcel_Cell::columnIndexFromString($column);
|
$columnIndex = Cell::columnIndexFromString($column);
|
||||||
list($rangeStart, $rangeEnd) = PHPExcel_Cell::rangeBoundaries($autoFilterRange);
|
list($rangeStart, $rangeEnd) = Cell::rangeBoundaries($autoFilterRange);
|
||||||
if ($columnIndex <= $rangeEnd[0]) {
|
if ($columnIndex <= $rangeEnd[0]) {
|
||||||
if ($pNumCols < 0) {
|
if ($pNumCols < 0) {
|
||||||
// If we're actually deleting any columns that fall within the autofilter range,
|
// If we're actually deleting any columns that fall within the autofilter range,
|
||||||
|
@ -553,8 +559,8 @@ class PHPExcel_ReferenceHelper
|
||||||
$deleteColumn = $columnIndex + $pNumCols - 1;
|
$deleteColumn = $columnIndex + $pNumCols - 1;
|
||||||
$deleteCount = abs($pNumCols);
|
$deleteCount = abs($pNumCols);
|
||||||
for ($i = 1; $i <= $deleteCount; ++$i) {
|
for ($i = 1; $i <= $deleteCount; ++$i) {
|
||||||
if (in_array(PHPExcel_Cell::stringFromColumnIndex($deleteColumn), $autoFilterColumns)) {
|
if (in_array(Cell::stringFromColumnIndex($deleteColumn), $autoFilterColumns)) {
|
||||||
$autoFilter->clearColumn(PHPExcel_Cell::stringFromColumnIndex($deleteColumn));
|
$autoFilter->clearColumn(Cell::stringFromColumnIndex($deleteColumn));
|
||||||
}
|
}
|
||||||
++$deleteColumn;
|
++$deleteColumn;
|
||||||
}
|
}
|
||||||
|
@ -564,24 +570,24 @@ class PHPExcel_ReferenceHelper
|
||||||
// Shuffle columns in autofilter range
|
// Shuffle columns in autofilter range
|
||||||
if ($pNumCols > 0) {
|
if ($pNumCols > 0) {
|
||||||
// For insert, we shuffle from end to beginning to avoid overwriting
|
// For insert, we shuffle from end to beginning to avoid overwriting
|
||||||
$startColID = PHPExcel_Cell::stringFromColumnIndex($startCol-1);
|
$startColID = Cell::stringFromColumnIndex($startCol-1);
|
||||||
$toColID = PHPExcel_Cell::stringFromColumnIndex($startCol+$pNumCols-1);
|
$toColID = Cell::stringFromColumnIndex($startCol+$pNumCols-1);
|
||||||
$endColID = PHPExcel_Cell::stringFromColumnIndex($rangeEnd[0]);
|
$endColID = Cell::stringFromColumnIndex($rangeEnd[0]);
|
||||||
|
|
||||||
$startColRef = $startCol;
|
$startColRef = $startCol;
|
||||||
$endColRef = $rangeEnd[0];
|
$endColRef = $rangeEnd[0];
|
||||||
$toColRef = $rangeEnd[0]+$pNumCols;
|
$toColRef = $rangeEnd[0]+$pNumCols;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
$autoFilter->shiftColumn(PHPExcel_Cell::stringFromColumnIndex($endColRef-1), PHPExcel_Cell::stringFromColumnIndex($toColRef-1));
|
$autoFilter->shiftColumn(Cell::stringFromColumnIndex($endColRef-1), Cell::stringFromColumnIndex($toColRef-1));
|
||||||
--$endColRef;
|
--$endColRef;
|
||||||
--$toColRef;
|
--$toColRef;
|
||||||
} while ($startColRef <= $endColRef);
|
} while ($startColRef <= $endColRef);
|
||||||
} else {
|
} else {
|
||||||
// For delete, we shuffle from beginning to end to avoid overwriting
|
// For delete, we shuffle from beginning to end to avoid overwriting
|
||||||
$startColID = PHPExcel_Cell::stringFromColumnIndex($startCol-1);
|
$startColID = Cell::stringFromColumnIndex($startCol-1);
|
||||||
$toColID = PHPExcel_Cell::stringFromColumnIndex($startCol+$pNumCols-1);
|
$toColID = Cell::stringFromColumnIndex($startCol+$pNumCols-1);
|
||||||
$endColID = PHPExcel_Cell::stringFromColumnIndex($rangeEnd[0]);
|
$endColID = Cell::stringFromColumnIndex($rangeEnd[0]);
|
||||||
do {
|
do {
|
||||||
$autoFilter->shiftColumn($startColID, $toColID);
|
$autoFilter->shiftColumn($startColID, $toColID);
|
||||||
++$startColID;
|
++$startColID;
|
||||||
|
@ -635,7 +641,7 @@ class PHPExcel_ReferenceHelper
|
||||||
* @param int $pNumRows Number of rows to insert
|
* @param int $pNumRows Number of rows to insert
|
||||||
* @param string $sheetName Worksheet name/title
|
* @param string $sheetName Worksheet name/title
|
||||||
* @return string Updated formula
|
* @return string Updated formula
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function updateFormulaReferences($pFormula = '', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0, $sheetName = '')
|
public function updateFormulaReferences($pFormula = '', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0, $sheetName = '')
|
||||||
{
|
{
|
||||||
|
@ -686,7 +692,7 @@ class PHPExcel_ReferenceHelper
|
||||||
$toString = ($match[2] > '') ? $match[2].'!' : '';
|
$toString = ($match[2] > '') ? $match[2].'!' : '';
|
||||||
$toString .= $modified3.':'.$modified4;
|
$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(trim($match[3], '$')) + 100000;
|
$column = Cell::columnIndexFromString(trim($match[3], '$')) + 100000;
|
||||||
$row = 10000000;
|
$row = 10000000;
|
||||||
$cellIndex = $column.$row;
|
$cellIndex = $column.$row;
|
||||||
|
|
||||||
|
@ -710,9 +716,9 @@ class PHPExcel_ReferenceHelper
|
||||||
if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) {
|
if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) {
|
||||||
$toString = ($match[2] > '') ? $match[2].'!' : '';
|
$toString = ($match[2] > '') ? $match[2].'!' : '';
|
||||||
$toString .= $modified3.':'.$modified4;
|
$toString .= $modified3.':'.$modified4;
|
||||||
list($column, $row) = PHPExcel_Cell::coordinateFromString($match[3]);
|
list($column, $row) = 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
|
// 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;
|
$column = Cell::columnIndexFromString(trim($column, '$')) + 100000;
|
||||||
$row = trim($row, '$') + 10000000;
|
$row = trim($row, '$') + 10000000;
|
||||||
$cellIndex = $column.$row;
|
$cellIndex = $column.$row;
|
||||||
|
|
||||||
|
@ -736,9 +742,9 @@ class PHPExcel_ReferenceHelper
|
||||||
if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) {
|
if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) {
|
||||||
$toString = ($match[2] > '') ? $match[2].'!' : '';
|
$toString = ($match[2] > '') ? $match[2].'!' : '';
|
||||||
$toString .= $modified3;
|
$toString .= $modified3;
|
||||||
list($column, $row) = PHPExcel_Cell::coordinateFromString($match[3]);
|
list($column, $row) = 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
|
// 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;
|
$column = Cell::columnIndexFromString(trim($column, '$')) + 100000;
|
||||||
$row = trim($row, '$') + 10000000;
|
$row = trim($row, '$') + 10000000;
|
||||||
$cellIndex = $row . $column;
|
$cellIndex = $row . $column;
|
||||||
|
|
||||||
|
@ -775,7 +781,7 @@ class PHPExcel_ReferenceHelper
|
||||||
* @param int $pNumCols Number of columns to increment
|
* @param int $pNumCols Number of columns to increment
|
||||||
* @param int $pNumRows Number of rows to increment
|
* @param int $pNumRows Number of rows to increment
|
||||||
* @return string Updated cell range
|
* @return string Updated cell range
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function updateCellReference($pCellRange = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0)
|
public function updateCellReference($pCellRange = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0)
|
||||||
{
|
{
|
||||||
|
@ -802,7 +808,7 @@ class PHPExcel_ReferenceHelper
|
||||||
* @param string $oldName Old name (name to replace)
|
* @param string $oldName Old name (name to replace)
|
||||||
* @param string $newName New name
|
* @param string $newName New name
|
||||||
*/
|
*/
|
||||||
public function updateNamedFormulas(PHPExcel $pPhpExcel, $oldName = '', $newName = '')
|
public function updateNamedFormulas(Spreadsheet $pPhpExcel, $oldName = '', $newName = '')
|
||||||
{
|
{
|
||||||
if ($oldName == '') {
|
if ($oldName == '') {
|
||||||
return;
|
return;
|
||||||
|
@ -811,12 +817,12 @@ class PHPExcel_ReferenceHelper
|
||||||
foreach ($pPhpExcel->getWorksheetIterator() as $sheet) {
|
foreach ($pPhpExcel->getWorksheetIterator() as $sheet) {
|
||||||
foreach ($sheet->getCellCollection(false) as $cellID) {
|
foreach ($sheet->getCellCollection(false) as $cellID) {
|
||||||
$cell = $sheet->getCell($cellID);
|
$cell = $sheet->getCell($cellID);
|
||||||
if (($cell !== null) && ($cell->getDataType() == PHPExcel_Cell_DataType::TYPE_FORMULA)) {
|
if (($cell !== null) && ($cell->getDataType() == Cell\DataType::TYPE_FORMULA)) {
|
||||||
$formula = $cell->getValue();
|
$formula = $cell->getValue();
|
||||||
if (strpos($formula, $oldName) !== false) {
|
if (strpos($formula, $oldName) !== false) {
|
||||||
$formula = str_replace("'" . $oldName . "'!", "'" . $newName . "'!", $formula);
|
$formula = str_replace("'" . $oldName . "'!", "'" . $newName . "'!", $formula);
|
||||||
$formula = str_replace($oldName . "!", $newName . "!", $formula);
|
$formula = str_replace($oldName . "!", $newName . "!", $formula);
|
||||||
$cell->setValueExplicit($formula, PHPExcel_Cell_DataType::TYPE_FORMULA);
|
$cell->setValueExplicit($formula, Cell\DataType::TYPE_FORMULA);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -831,22 +837,22 @@ class PHPExcel_ReferenceHelper
|
||||||
* @param int $pNumCols Number of columns to increment
|
* @param int $pNumCols Number of columns to increment
|
||||||
* @param int $pNumRows Number of rows to increment
|
* @param int $pNumRows Number of rows to increment
|
||||||
* @return string Updated cell range
|
* @return string Updated cell range
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private function updateCellRange($pCellRange = 'A1:A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0)
|
private function updateCellRange($pCellRange = 'A1:A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0)
|
||||||
{
|
{
|
||||||
if (strpos($pCellRange, ':') !== false || strpos($pCellRange, ',') !== false) {
|
if (strpos($pCellRange, ':') !== false || strpos($pCellRange, ',') !== false) {
|
||||||
// Update range
|
// Update range
|
||||||
$range = PHPExcel_Cell::splitRange($pCellRange);
|
$range = Cell::splitRange($pCellRange);
|
||||||
$ic = count($range);
|
$ic = count($range);
|
||||||
for ($i = 0; $i < $ic; ++$i) {
|
for ($i = 0; $i < $ic; ++$i) {
|
||||||
$jc = count($range[$i]);
|
$jc = count($range[$i]);
|
||||||
for ($j = 0; $j < $jc; ++$j) {
|
for ($j = 0; $j < $jc; ++$j) {
|
||||||
if (ctype_alpha($range[$i][$j])) {
|
if (ctype_alpha($range[$i][$j])) {
|
||||||
$r = PHPExcel_Cell::coordinateFromString($this->updateSingleCellReference($range[$i][$j].'1', $pBefore, $pNumCols, $pNumRows));
|
$r = Cell::coordinateFromString($this->updateSingleCellReference($range[$i][$j].'1', $pBefore, $pNumCols, $pNumRows));
|
||||||
$range[$i][$j] = $r[0];
|
$range[$i][$j] = $r[0];
|
||||||
} elseif (ctype_digit($range[$i][$j])) {
|
} elseif (ctype_digit($range[$i][$j])) {
|
||||||
$r = PHPExcel_Cell::coordinateFromString($this->updateSingleCellReference('A'.$range[$i][$j], $pBefore, $pNumCols, $pNumRows));
|
$r = Cell::coordinateFromString($this->updateSingleCellReference('A'.$range[$i][$j], $pBefore, $pNumCols, $pNumRows));
|
||||||
$range[$i][$j] = $r[1];
|
$range[$i][$j] = $r[1];
|
||||||
} else {
|
} else {
|
||||||
$range[$i][$j] = $this->updateSingleCellReference($range[$i][$j], $pBefore, $pNumCols, $pNumRows);
|
$range[$i][$j] = $this->updateSingleCellReference($range[$i][$j], $pBefore, $pNumCols, $pNumRows);
|
||||||
|
@ -855,9 +861,9 @@ class PHPExcel_ReferenceHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recreate range string
|
// Recreate range string
|
||||||
return PHPExcel_Cell::buildRange($range);
|
return Cell::buildRange($range);
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Exception("Only cell ranges may be passed to this method.");
|
throw new Exception("Only cell ranges may be passed to this method.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -869,24 +875,24 @@ class PHPExcel_ReferenceHelper
|
||||||
* @param int $pNumCols Number of columns to increment
|
* @param int $pNumCols Number of columns to increment
|
||||||
* @param int $pNumRows Number of rows to increment
|
* @param int $pNumRows Number of rows to increment
|
||||||
* @return string Updated cell reference
|
* @return string Updated cell reference
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private function updateSingleCellReference($pCellReference = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0)
|
private function updateSingleCellReference($pCellReference = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0)
|
||||||
{
|
{
|
||||||
if (strpos($pCellReference, ':') === false && strpos($pCellReference, ',') === false) {
|
if (strpos($pCellReference, ':') === false && strpos($pCellReference, ',') === false) {
|
||||||
// Get coordinates of $pBefore
|
// Get coordinates of $pBefore
|
||||||
list($beforeColumn, $beforeRow) = PHPExcel_Cell::coordinateFromString($pBefore);
|
list($beforeColumn, $beforeRow) = Cell::coordinateFromString($pBefore);
|
||||||
|
|
||||||
// Get coordinates of $pCellReference
|
// Get coordinates of $pCellReference
|
||||||
list($newColumn, $newRow) = PHPExcel_Cell::coordinateFromString($pCellReference);
|
list($newColumn, $newRow) = Cell::coordinateFromString($pCellReference);
|
||||||
|
|
||||||
// Verify which parts should be updated
|
// Verify which parts should be updated
|
||||||
$updateColumn = (($newColumn{0} != '$') && ($beforeColumn{0} != '$') && (PHPExcel_Cell::columnIndexFromString($newColumn) >= PHPExcel_Cell::columnIndexFromString($beforeColumn)));
|
$updateColumn = (($newColumn{0} != '$') && ($beforeColumn{0} != '$') && (Cell::columnIndexFromString($newColumn) >= Cell::columnIndexFromString($beforeColumn)));
|
||||||
$updateRow = (($newRow{0} != '$') && ($beforeRow{0} != '$') && $newRow >= $beforeRow);
|
$updateRow = (($newRow{0} != '$') && ($beforeRow{0} != '$') && $newRow >= $beforeRow);
|
||||||
|
|
||||||
// Create new column reference
|
// Create new column reference
|
||||||
if ($updateColumn) {
|
if ($updateColumn) {
|
||||||
$newColumn = PHPExcel_Cell::stringFromColumnIndex(PHPExcel_Cell::columnIndexFromString($newColumn) - 1 + $pNumCols);
|
$newColumn = Cell::stringFromColumnIndex(Cell::columnIndexFromString($newColumn) - 1 + $pNumCols);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create new row reference
|
// Create new row reference
|
||||||
|
@ -897,17 +903,17 @@ class PHPExcel_ReferenceHelper
|
||||||
// Return new reference
|
// Return new reference
|
||||||
return $newColumn . $newRow;
|
return $newColumn . $newRow;
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Exception("Only single cell references may be passed to this method.");
|
throw new Exception("Only single cell references may be passed to this method.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __clone implementation. Cloning should not be allowed in a Singleton!
|
* __clone implementation. Cloning should not be allowed in a Singleton!
|
||||||
*
|
*
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
final public function __clone()
|
final public function __clone()
|
||||||
{
|
{
|
||||||
throw new PHPExcel_Exception("Cloning a Singleton is not allowed!");
|
throw new Exception("Cloning a Singleton is not allowed!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_RichText
|
* PHPExcel_RichText
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_RichText implements PHPExcel_IComparable
|
class RichText implements PHPExcel_IComparable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Rich text elements
|
* Rich text elements
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\RichText;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_RichText_ITextElement
|
* PHPExcel_RichText_ITextElement
|
||||||
*
|
*
|
||||||
|
@ -23,7 +25,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
interface PHPExcel_RichText_ITextElement
|
interface ITextElement
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Get text
|
* Get text
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\RichText;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_RichText_Run
|
* PHPExcel_RichText_Run
|
||||||
*
|
*
|
||||||
|
@ -23,7 +25,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_RichText_Run extends PHPExcel_RichText_TextElement implements PHPExcel_RichText_ITextElement
|
class Run extends TextElement implements ITextElement
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Font
|
* Font
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\RichText;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_RichText_TextElement
|
* PHPExcel_RichText_TextElement
|
||||||
*
|
*
|
||||||
|
@ -23,7 +25,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_RichText_TextElement implements PHPExcel_RichText_ITextElement
|
class TextElement implements ITextElement
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Text
|
* Text
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** PHPExcel root directory */
|
namespace PHPExcel;
|
||||||
if (!defined('PHPEXCEL_ROOT')) {
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../');
|
|
||||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Settings
|
* PHPExcel_Settings
|
||||||
|
@ -34,7 +27,7 @@ if (!defined('PHPEXCEL_ROOT')) {
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Settings
|
class Settings
|
||||||
{
|
{
|
||||||
/** constants */
|
/** constants */
|
||||||
/** Available Zip library classes */
|
/** Available Zip library classes */
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Shared;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Shared_CodePage
|
* PHPExcel_Shared_CodePage
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Shared_CodePage
|
class CodePage
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Convert Microsoft Code Page Identifier to Code Page Name which iconv
|
* Convert Microsoft Code Page Identifier to Code Page Name which iconv
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Shared;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Shared_Date
|
* PHPExcel_Shared_Date
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Shared_Date
|
class Date
|
||||||
{
|
{
|
||||||
/** constants */
|
/** constants */
|
||||||
const CALENDAR_WINDOWS_1900 = 1900; // Base date of 1st Jan 1900 = 1.0
|
const CALENDAR_WINDOWS_1900 = 1900; // Base date of 1st Jan 1900 = 1.0
|
||||||
|
@ -38,7 +40,7 @@ class PHPExcel_Shared_Date
|
||||||
* @public
|
* @public
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
public static $monthNames = array(
|
public static $monthNames = [
|
||||||
'Jan' => 'January',
|
'Jan' => 'January',
|
||||||
'Feb' => 'February',
|
'Feb' => 'February',
|
||||||
'Mar' => 'March',
|
'Mar' => 'March',
|
||||||
|
@ -51,7 +53,7 @@ class PHPExcel_Shared_Date
|
||||||
'Oct' => 'October',
|
'Oct' => 'October',
|
||||||
'Nov' => 'November',
|
'Nov' => 'November',
|
||||||
'Dec' => 'December',
|
'Dec' => 'December',
|
||||||
);
|
];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Names of the months of the year, indexed by shortname
|
* Names of the months of the year, indexed by shortname
|
||||||
|
@ -60,12 +62,12 @@ class PHPExcel_Shared_Date
|
||||||
* @public
|
* @public
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
public static $numberSuffixes = array(
|
public static $numberSuffixes = [
|
||||||
'st',
|
'st',
|
||||||
'nd',
|
'nd',
|
||||||
'rd',
|
'rd',
|
||||||
'th',
|
'th',
|
||||||
);
|
];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Base calendar year to use for calculations
|
* Base calendar year to use for calculations
|
||||||
|
@ -150,7 +152,7 @@ class PHPExcel_Shared_Date
|
||||||
* Convert a date from Excel to a PHP Date/Time object
|
* Convert a date from Excel to a PHP Date/Time object
|
||||||
*
|
*
|
||||||
* @param integer $dateValue Excel date/time value
|
* @param integer $dateValue Excel date/time value
|
||||||
* @return DateTime PHP date/time object
|
* @return \DateTime PHP date/time object
|
||||||
*/
|
*/
|
||||||
public static function ExcelToPHPObject($dateValue = 0)
|
public static function ExcelToPHPObject($dateValue = 0)
|
||||||
{
|
{
|
||||||
|
@ -183,7 +185,7 @@ class PHPExcel_Shared_Date
|
||||||
$saveTimeZone = date_default_timezone_get();
|
$saveTimeZone = date_default_timezone_get();
|
||||||
date_default_timezone_set('UTC');
|
date_default_timezone_set('UTC');
|
||||||
$retValue = false;
|
$retValue = false;
|
||||||
if ((is_object($dateValue)) && ($dateValue instanceof DateTime)) {
|
if ((is_object($dateValue)) && ($dateValue instanceof \DateTime)) {
|
||||||
$retValue = self::FormattedPHPToExcel($dateValue->format('Y'), $dateValue->format('m'), $dateValue->format('d'), $dateValue->format('H'), $dateValue->format('i'), $dateValue->format('s'));
|
$retValue = self::FormattedPHPToExcel($dateValue->format('Y'), $dateValue->format('m'), $dateValue->format('d'), $dateValue->format('H'), $dateValue->format('i'), $dateValue->format('s'));
|
||||||
} elseif (is_numeric($dateValue)) {
|
} elseif (is_numeric($dateValue)) {
|
||||||
$retValue = self::FormattedPHPToExcel(date('Y', $dateValue), date('m', $dateValue), date('d', $dateValue), date('H', $dateValue), date('i', $dateValue), date('s', $dateValue));
|
$retValue = self::FormattedPHPToExcel(date('Y', $dateValue), date('m', $dateValue), date('d', $dateValue), date('H', $dateValue), date('i', $dateValue), date('s', $dateValue));
|
||||||
|
@ -247,7 +249,7 @@ class PHPExcel_Shared_Date
|
||||||
* @param PHPExcel_Cell $pCell
|
* @param PHPExcel_Cell $pCell
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public static function isDateTime(PHPExcel_Cell $pCell)
|
public static function isDateTime(\PHPExcel\Cell $pCell)
|
||||||
{
|
{
|
||||||
return self::isDateTimeFormat(
|
return self::isDateTimeFormat(
|
||||||
$pCell->getWorksheet()->getStyle(
|
$pCell->getWorksheet()->getStyle(
|
||||||
|
@ -263,7 +265,7 @@ class PHPExcel_Shared_Date
|
||||||
* @param PHPExcel_Style_NumberFormat $pFormat
|
* @param PHPExcel_Style_NumberFormat $pFormat
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public static function isDateTimeFormat(PHPExcel_Style_NumberFormat $pFormat)
|
public static function isDateTimeFormat(\PHPExcel\Style\NumberFormat $pFormat)
|
||||||
{
|
{
|
||||||
return self::isDateTimeFormatCode($pFormat->getFormatCode());
|
return self::isDateTimeFormatCode($pFormat->getFormatCode());
|
||||||
}
|
}
|
||||||
|
@ -358,15 +360,15 @@ class PHPExcel_Shared_Date
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$dateValueNew = PHPExcel_Calculation_DateTime::DATEVALUE($dateValue);
|
$dateValueNew = \PHPExcel\Calculation\DateTime::DATEVALUE($dateValue);
|
||||||
|
|
||||||
if ($dateValueNew === PHPExcel_Calculation_Functions::VALUE()) {
|
if ($dateValueNew === \PHPExcel\Calculation\Functions::VALUE()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strpos($dateValue, ':') !== false) {
|
if (strpos($dateValue, ':') !== false) {
|
||||||
$timeValue = PHPExcel_Calculation_DateTime::TIMEVALUE($dateValue);
|
$timeValue = \PHPExcel\Calculation\DateTime::TIMEVALUE($dateValue);
|
||||||
if ($timeValue === PHPExcel_Calculation_Functions::VALUE()) {
|
if ($timeValue === \PHPExcel\Calculation\Functions::VALUE()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$dateValueNew += $timeValue;
|
$dateValueNew += $timeValue;
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Shared;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel
|
* PHPExcel_Shared_Drawing
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006 - 2015 PHPExcel
|
* Copyright (c) 2006 - 2015 PHPExcel
|
||||||
*
|
*
|
||||||
|
@ -24,15 +27,6 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PHPExcel_Shared_Drawing
|
|
||||||
*
|
|
||||||
* @category PHPExcel
|
|
||||||
* @package PHPExcel_Shared
|
|
||||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
|
||||||
*/
|
|
||||||
class PHPExcel_Shared_Drawing
|
class PHPExcel_Shared_Drawing
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Shared;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Shared_Escher
|
* PHPExcel_Shared_Escher
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Shared_Escher
|
class Escher
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Drawing Group Container
|
* Drawing Group Container
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Shared;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Shared_Excel5
|
* PHPExcel_Shared_Excel5
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Shared_Excel5
|
class Excel5
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Get the width of a column in pixels. We use the relationship y = ceil(7x) where
|
* Get the width of a column in pixels. We use the relationship y = ceil(7x) where
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Shared;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Shared_File
|
* PHPExcel_Shared_File
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Shared_File
|
class File
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Use Temp or File Upload Temp for temporary files
|
* Use Temp or File Upload Temp for temporary files
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Shared;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel
|
* PHPExcel_Shared_Font
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006 - 2015 PHPExcel
|
* Copyright (c) 2006 - 2015 PHPExcel
|
||||||
*
|
*
|
||||||
|
@ -24,16 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
|
class Font
|
||||||
|
|
||||||
/**
|
|
||||||
* PHPExcel_Shared_Font
|
|
||||||
*
|
|
||||||
* @category PHPExcel
|
|
||||||
* @package PHPExcel_Shared
|
|
||||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
|
||||||
*/
|
|
||||||
class PHPExcel_Shared_Font
|
|
||||||
{
|
{
|
||||||
/* Methods for resolving autosize value */
|
/* Methods for resolving autosize value */
|
||||||
const AUTOSIZE_METHOD_APPROX = 'approx';
|
const AUTOSIZE_METHOD_APPROX = 'approx';
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Shared;
|
||||||
|
|
||||||
/* vim: set expandtab tabstop=4 shiftwidth=4: */
|
/* vim: set expandtab tabstop=4 shiftwidth=4: */
|
||||||
// +----------------------------------------------------------------------+
|
// +----------------------------------------------------------------------+
|
||||||
// | PHP Version 4 |
|
// | PHP Version 4 |
|
||||||
|
@ -35,7 +38,7 @@ $GLOBALS['_OLE_INSTANCES'] = array();
|
||||||
* @category PHPExcel
|
* @category PHPExcel
|
||||||
* @package PHPExcel_Shared_OLE
|
* @package PHPExcel_Shared_OLE
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Shared_OLE
|
class OLE
|
||||||
{
|
{
|
||||||
const OLE_PPS_TYPE_ROOT = 5;
|
const OLE_PPS_TYPE_ROOT = 5;
|
||||||
const OLE_PPS_TYPE_DIR = 1;
|
const OLE_PPS_TYPE_DIR = 1;
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Shared;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel
|
* PHPExcel
|
||||||
*
|
*
|
||||||
|
@ -28,7 +31,7 @@
|
||||||
defined('IDENTIFIER_OLE') ||
|
defined('IDENTIFIER_OLE') ||
|
||||||
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));
|
||||||
|
|
||||||
class PHPExcel_Shared_OLERead
|
class OLERead
|
||||||
{
|
{
|
||||||
private $data = '';
|
private $data = '';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Shared;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel
|
* PHPExcel_Shared_PasswordHasher
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006 - 2015 PHPExcel
|
* Copyright (c) 2006 - 2015 PHPExcel
|
||||||
*
|
*
|
||||||
|
@ -24,16 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
|
class PasswordHasher
|
||||||
|
|
||||||
/**
|
|
||||||
* PHPExcel_Shared_PasswordHasher
|
|
||||||
*
|
|
||||||
* @category PHPExcel
|
|
||||||
* @package PHPExcel_Shared
|
|
||||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
|
||||||
*/
|
|
||||||
class PHPExcel_Shared_PasswordHasher
|
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Create a password hash from a given string.
|
* Create a password hash from a given string.
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Shared;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Shared_String
|
* PHPExcel_Shared_String
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Shared_String
|
class String
|
||||||
{
|
{
|
||||||
/** Constants */
|
/** Constants */
|
||||||
/** Regular Expressions */
|
/** Regular Expressions */
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Shared;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel
|
* PHPExcel_Shared_TimeZone
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006 - 2015 PHPExcel
|
* Copyright (c) 2006 - 2015 PHPExcel
|
||||||
*
|
*
|
||||||
|
@ -25,16 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
|
class TimeZone
|
||||||
|
|
||||||
/**
|
|
||||||
* PHPExcel_Shared_TimeZone
|
|
||||||
*
|
|
||||||
* @category PHPExcel
|
|
||||||
* @package PHPExcel_Shared
|
|
||||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
|
||||||
*/
|
|
||||||
class PHPExcel_Shared_TimeZone
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Default Timezone used for date/time conversions
|
* Default Timezone used for date/time conversions
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Shared;
|
||||||
|
|
||||||
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');
|
||||||
}
|
}
|
||||||
|
@ -33,7 +35,7 @@ if (!defined('DEBUGMODE_ENABLED')) {
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Shared_XMLWriter extends XMLWriter
|
class XMLWriter extends \XMLWriter
|
||||||
{
|
{
|
||||||
/** Temporary storage method */
|
/** Temporary storage method */
|
||||||
const STORAGE_MEMORY = 1;
|
const STORAGE_MEMORY = 1;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Shared;
|
||||||
|
|
||||||
if (!defined('PCLZIP_TEMPORARY_DIR')) {
|
if (!defined('PCLZIP_TEMPORARY_DIR')) {
|
||||||
define('PCLZIP_TEMPORARY_DIR', PHPExcel_Shared_File::sys_get_temp_dir() . DIRECTORY_SEPARATOR);
|
define('PCLZIP_TEMPORARY_DIR', PHPExcel_Shared_File::sys_get_temp_dir() . DIRECTORY_SEPARATOR);
|
||||||
}
|
}
|
||||||
|
@ -30,7 +32,7 @@ require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/PCLZip/pclzip.lib.php';
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Shared_ZipArchive
|
class ZipArchive
|
||||||
{
|
{
|
||||||
|
|
||||||
/** constants */
|
/** constants */
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Shared;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Shared_ZipStreamWrapper
|
* PHPExcel_Shared_ZipStreamWrapper
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Shared_ZipStreamWrapper
|
class ZipStreamWrapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Internal ZipAcrhive
|
* Internal ZipAcrhive
|
||||||
|
|
|
@ -157,12 +157,12 @@ class Spreadsheet
|
||||||
/**
|
/**
|
||||||
* Set the macros code
|
* Set the macros code
|
||||||
*
|
*
|
||||||
* @param string $MacrosCode string|null
|
* @param string $macroCode string|null
|
||||||
*/
|
*/
|
||||||
public function setMacrosCode($MacrosCode = null)
|
public function setMacrosCode($macroCode = null)
|
||||||
{
|
{
|
||||||
$this->macrosCode=$MacrosCode;
|
$this->macrosCode = $macroCode;
|
||||||
$this->setHasMacros(!is_null($MacrosCode));
|
$this->setHasMacros(!is_null($macroCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -180,9 +180,9 @@ class Spreadsheet
|
||||||
*
|
*
|
||||||
* @param string|null $Certificate
|
* @param string|null $Certificate
|
||||||
*/
|
*/
|
||||||
public function setMacrosCertificate($Certificate = null)
|
public function setMacrosCertificate($certificate = null)
|
||||||
{
|
{
|
||||||
$this->macrosCertificate=$Certificate;
|
$this->macrosCertificate = $certificate;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -211,19 +211,19 @@ class Spreadsheet
|
||||||
*/
|
*/
|
||||||
public function discardMacros()
|
public function discardMacros()
|
||||||
{
|
{
|
||||||
$this->hasMacros=false;
|
$this->hasMacros = false;
|
||||||
$this->macrosCode=null;
|
$this->macrosCode = null;
|
||||||
$this->macrosCertificate=null;
|
$this->macrosCertificate = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set ribbon XML data
|
* set ribbon XML data
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function setRibbonXMLData($Target = null, $XMLData = null)
|
public function setRibbonXMLData($target = null, $xmlData = null)
|
||||||
{
|
{
|
||||||
if (!is_null($Target) && !is_null($XMLData)) {
|
if (!is_null($target) && !is_null($xmlData)) {
|
||||||
$this->ribbonXMLData = array('target' => $Target, 'data' => $XMLData);
|
$this->ribbonXMLData = array('target' => $target, 'data' => $xmlData);
|
||||||
} else {
|
} else {
|
||||||
$this->ribbonXMLData = null;
|
$this->ribbonXMLData = null;
|
||||||
}
|
}
|
||||||
|
@ -234,23 +234,23 @@ class Spreadsheet
|
||||||
*
|
*
|
||||||
* return string|null|array
|
* return string|null|array
|
||||||
*/
|
*/
|
||||||
public function getRibbonXMLData($What = 'all') //we need some constants here...
|
public function getRibbonXMLData($what = 'all') //we need some constants here...
|
||||||
{
|
{
|
||||||
$ReturnData = null;
|
$returnData = null;
|
||||||
$What = strtolower($What);
|
$what = strtolower($what);
|
||||||
switch ($What){
|
switch ($what){
|
||||||
case 'all':
|
case 'all':
|
||||||
$ReturnData = $this->ribbonXMLData;
|
$returnData = $this->ribbonXMLData;
|
||||||
break;
|
break;
|
||||||
case 'target':
|
case 'target':
|
||||||
case 'data':
|
case 'data':
|
||||||
if (is_array($this->ribbonXMLData) && array_key_exists($What, $this->ribbonXMLData)) {
|
if (is_array($this->ribbonXMLData) && array_key_exists($what, $this->ribbonXMLData)) {
|
||||||
$ReturnData = $this->ribbonXMLData[$What];
|
$returnData = $this->ribbonXMLData[$what];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $ReturnData;
|
return $returnData;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Style
|
* PHPExcel_Style
|
||||||
*
|
*
|
||||||
|
@ -25,54 +27,54 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable
|
class Style extends Style\Supervisor implements IComparable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Font
|
* Font
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Font
|
* @var Style\Font
|
||||||
*/
|
*/
|
||||||
protected $font;
|
protected $font;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fill
|
* Fill
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Fill
|
* @var Style\Fill
|
||||||
*/
|
*/
|
||||||
protected $fill;
|
protected $fill;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Borders
|
* Borders
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Borders
|
* @var Style\Borders
|
||||||
*/
|
*/
|
||||||
protected $borders;
|
protected $borders;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Alignment
|
* Alignment
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Alignment
|
* @var Style\Alignment
|
||||||
*/
|
*/
|
||||||
protected $alignment;
|
protected $alignment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number Format
|
* Number Format
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_NumberFormat
|
* @var Style\NumberFormat
|
||||||
*/
|
*/
|
||||||
protected $numberFormat;
|
protected $numberFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Conditional styles
|
* Conditional styles
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Conditional[]
|
* @var Style\Conditional[]
|
||||||
*/
|
*/
|
||||||
protected $conditionalStyles;
|
protected $conditionalStyles;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Protection
|
* Protection
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Protection
|
* @var Style\Protection
|
||||||
*/
|
*/
|
||||||
protected $protection;
|
protected $protection;
|
||||||
|
|
||||||
|
@ -91,7 +93,7 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
protected $quotePrefix = false;
|
protected $quotePrefix = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_Style
|
* Create a new Style
|
||||||
*
|
*
|
||||||
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
||||||
* Leave this value at default unless you understand exactly what
|
* Leave this value at default unless you understand exactly what
|
||||||
|
@ -107,12 +109,12 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
|
|
||||||
// Initialise values
|
// Initialise values
|
||||||
$this->conditionalStyles = array();
|
$this->conditionalStyles = array();
|
||||||
$this->font = new PHPExcel_Style_Font($isSupervisor, $isConditional);
|
$this->font = new Style\Font($isSupervisor, $isConditional);
|
||||||
$this->fill = new PHPExcel_Style_Fill($isSupervisor, $isConditional);
|
$this->fill = new Style\Fill($isSupervisor, $isConditional);
|
||||||
$this->borders = new PHPExcel_Style_Borders($isSupervisor, $isConditional);
|
$this->borders = new Style\Borders($isSupervisor, $isConditional);
|
||||||
$this->alignment = new PHPExcel_Style_Alignment($isSupervisor, $isConditional);
|
$this->alignment = new Style\Alignment($isSupervisor, $isConditional);
|
||||||
$this->numberFormat = new PHPExcel_Style_NumberFormat($isSupervisor, $isConditional);
|
$this->numberFormat = new Style\NumberFormat($isSupervisor, $isConditional);
|
||||||
$this->protection = new PHPExcel_Style_Protection($isSupervisor, $isConditional);
|
$this->protection = new Style\Protection($isSupervisor, $isConditional);
|
||||||
|
|
||||||
// bind parent if we are a supervisor
|
// bind parent if we are a supervisor
|
||||||
if ($isSupervisor) {
|
if ($isSupervisor) {
|
||||||
|
@ -129,7 +131,7 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
* Get the shared style component for the currently active cell in currently active sheet.
|
* Get the shared style component for the currently active cell in currently active sheet.
|
||||||
* Only used for style supervisor
|
* Only used for style supervisor
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style
|
* @return Style
|
||||||
*/
|
*/
|
||||||
public function getSharedComponent()
|
public function getSharedComponent()
|
||||||
{
|
{
|
||||||
|
@ -176,7 +178,7 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
* 'name' => 'Arial',
|
* 'name' => 'Arial',
|
||||||
* 'bold' => true,
|
* 'bold' => true,
|
||||||
* 'italic' => false,
|
* 'italic' => false,
|
||||||
* 'underline' => PHPExcel_Style_Font::UNDERLINE_DOUBLE,
|
* 'underline' => \PHPExcel\Style\Font::UNDERLINE_DOUBLE,
|
||||||
* 'strike' => false,
|
* 'strike' => false,
|
||||||
* 'color' => array(
|
* 'color' => array(
|
||||||
* 'rgb' => '808080'
|
* 'rgb' => '808080'
|
||||||
|
@ -184,13 +186,13 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
* ),
|
* ),
|
||||||
* 'borders' => array(
|
* 'borders' => array(
|
||||||
* 'bottom' => array(
|
* 'bottom' => array(
|
||||||
* 'style' => PHPExcel_Style_Border::BORDER_DASHDOT,
|
* 'style' => \PHPExcel\Style\Border::BORDER_DASHDOT,
|
||||||
* 'color' => array(
|
* 'color' => array(
|
||||||
* 'rgb' => '808080'
|
* 'rgb' => '808080'
|
||||||
* )
|
* )
|
||||||
* ),
|
* ),
|
||||||
* 'top' => array(
|
* 'top' => array(
|
||||||
* 'style' => PHPExcel_Style_Border::BORDER_DASHDOT,
|
* 'style' => \PHPExcel\Style\Border::BORDER_DASHDOT,
|
||||||
* 'color' => array(
|
* 'color' => array(
|
||||||
* 'rgb' => '808080'
|
* 'rgb' => '808080'
|
||||||
* )
|
* )
|
||||||
|
@ -201,10 +203,10 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
* );
|
* );
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param array $pStyles Array containing style information
|
* @param array $pStyles Array containing style information
|
||||||
* @param boolean $pAdvanced Advanced mode for setting borders.
|
* @param boolean $pAdvanced Advanced mode for setting borders.
|
||||||
* @throws PHPExcel_Exception
|
* @throws Exception
|
||||||
* @return PHPExcel_Style
|
* @return Style
|
||||||
*/
|
*/
|
||||||
public function applyFromArray($pStyles = null, $pAdvanced = true)
|
public function applyFromArray($pStyles = null, $pAdvanced = true)
|
||||||
{
|
{
|
||||||
|
@ -224,12 +226,12 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculate range outer borders
|
// Calculate range outer borders
|
||||||
$rangeStart = PHPExcel_Cell::coordinateFromString($rangeA);
|
$rangeStart = Cell::coordinateFromString($rangeA);
|
||||||
$rangeEnd = PHPExcel_Cell::coordinateFromString($rangeB);
|
$rangeEnd = Cell::coordinateFromString($rangeB);
|
||||||
|
|
||||||
// Translate column into index
|
// Translate column into index
|
||||||
$rangeStart[0] = PHPExcel_Cell::columnIndexFromString($rangeStart[0]) - 1;
|
$rangeStart[0] = Cell::columnIndexFromString($rangeStart[0]) - 1;
|
||||||
$rangeEnd[0] = PHPExcel_Cell::columnIndexFromString($rangeEnd[0]) - 1;
|
$rangeEnd[0] = Cell::columnIndexFromString($rangeEnd[0]) - 1;
|
||||||
|
|
||||||
// Make sure we can loop upwards on rows and columns
|
// Make sure we can loop upwards on rows and columns
|
||||||
if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) {
|
if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) {
|
||||||
|
@ -278,12 +280,12 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
for ($x = 1; $x <= $xMax; ++$x) {
|
for ($x = 1; $x <= $xMax; ++$x) {
|
||||||
// start column index for region
|
// start column index for region
|
||||||
$colStart = ($x == 3) ?
|
$colStart = ($x == 3) ?
|
||||||
PHPExcel_Cell::stringFromColumnIndex($rangeEnd[0])
|
Cell::stringFromColumnIndex($rangeEnd[0])
|
||||||
: PHPExcel_Cell::stringFromColumnIndex($rangeStart[0] + $x - 1);
|
: Cell::stringFromColumnIndex($rangeStart[0] + $x - 1);
|
||||||
// end column index for region
|
// end column index for region
|
||||||
$colEnd = ($x == 1) ?
|
$colEnd = ($x == 1) ?
|
||||||
PHPExcel_Cell::stringFromColumnIndex($rangeStart[0])
|
Cell::stringFromColumnIndex($rangeStart[0])
|
||||||
: PHPExcel_Cell::stringFromColumnIndex($rangeEnd[0] - $xMax + $x);
|
: Cell::stringFromColumnIndex($rangeEnd[0] - $xMax + $x);
|
||||||
|
|
||||||
for ($y = 1; $y <= $yMax; ++$y) {
|
for ($y = 1; $y <= $yMax; ++$y) {
|
||||||
// which edges are touching the region
|
// which edges are touching the region
|
||||||
|
@ -464,7 +466,7 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Exception("Invalid style array passed.");
|
throw new Exception("Invalid style array passed.");
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -472,7 +474,7 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
/**
|
/**
|
||||||
* Get Fill
|
* Get Fill
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Fill
|
* @return Style\Fill
|
||||||
*/
|
*/
|
||||||
public function getFill()
|
public function getFill()
|
||||||
{
|
{
|
||||||
|
@ -482,7 +484,7 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
/**
|
/**
|
||||||
* Get Font
|
* Get Font
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Font
|
* @return Style\Font
|
||||||
*/
|
*/
|
||||||
public function getFont()
|
public function getFont()
|
||||||
{
|
{
|
||||||
|
@ -492,10 +494,10 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
/**
|
/**
|
||||||
* Set font
|
* Set font
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Style_Font $font
|
* @param Style\Font $font
|
||||||
* @return PHPExcel_Style
|
* @return Style
|
||||||
*/
|
*/
|
||||||
public function setFont(PHPExcel_Style_Font $font)
|
public function setFont(Style\Font $font)
|
||||||
{
|
{
|
||||||
$this->font = $font;
|
$this->font = $font;
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -504,7 +506,7 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
/**
|
/**
|
||||||
* Get Borders
|
* Get Borders
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Borders
|
* @return Style\Borders
|
||||||
*/
|
*/
|
||||||
public function getBorders()
|
public function getBorders()
|
||||||
{
|
{
|
||||||
|
@ -514,7 +516,7 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
/**
|
/**
|
||||||
* Get Alignment
|
* Get Alignment
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Alignment
|
* @return Style\Alignment
|
||||||
*/
|
*/
|
||||||
public function getAlignment()
|
public function getAlignment()
|
||||||
{
|
{
|
||||||
|
@ -524,7 +526,7 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
/**
|
/**
|
||||||
* Get Number Format
|
* Get Number Format
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_NumberFormat
|
* @return Style\NumberFormat
|
||||||
*/
|
*/
|
||||||
public function getNumberFormat()
|
public function getNumberFormat()
|
||||||
{
|
{
|
||||||
|
@ -534,7 +536,7 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
/**
|
/**
|
||||||
* Get Conditional Styles. Only used on supervisor.
|
* Get Conditional Styles. Only used on supervisor.
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Conditional[]
|
* @return Style\Conditional[]
|
||||||
*/
|
*/
|
||||||
public function getConditionalStyles()
|
public function getConditionalStyles()
|
||||||
{
|
{
|
||||||
|
@ -544,8 +546,8 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
/**
|
/**
|
||||||
* Set Conditional Styles. Only used on supervisor.
|
* Set Conditional Styles. Only used on supervisor.
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Style_Conditional[] $pValue Array of condtional styles
|
* @param Style\Conditional[] $pValue Array of condtional styles
|
||||||
* @return PHPExcel_Style
|
* @return Style
|
||||||
*/
|
*/
|
||||||
public function setConditionalStyles($pValue = null)
|
public function setConditionalStyles($pValue = null)
|
||||||
{
|
{
|
||||||
|
@ -558,7 +560,7 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
|
||||||
/**
|
/**
|
||||||
* Get Protection
|
* Get Protection
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Protection
|
* @return Style\Protection
|
||||||
*/
|
*/
|
||||||
public function getProtection()
|
public function getProtection()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Style;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Style_Alignment
|
* PHPExcel_Style_Alignment
|
||||||
*
|
*
|
||||||
|
@ -24,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Style_Alignment extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable
|
class Alignment extends Supervisor implements \PHPExcel\IComparable
|
||||||
{
|
{
|
||||||
/* Horizontal alignment styles */
|
/* Horizontal alignment styles */
|
||||||
const HORIZONTAL_GENERAL = 'general';
|
const HORIZONTAL_GENERAL = 'general';
|
||||||
|
@ -53,14 +56,14 @@ class PHPExcel_Style_Alignment extends PHPExcel_Style_Supervisor implements PHPE
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $horizontal = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL;
|
protected $horizontal = self::HORIZONTAL_GENERAL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vertical alignment
|
* Vertical alignment
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $vertical = PHPExcel_Style_Alignment::VERTICAL_BOTTOM;
|
protected $vertical = self::VERTICAL_BOTTOM;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Text rotation
|
* Text rotation
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Style;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Style_Border
|
* PHPExcel_Style_Border
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Style_Border extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable
|
class Border extends Supervisor implements \PHPExcel\IComparable
|
||||||
{
|
{
|
||||||
/* Border style */
|
/* Border style */
|
||||||
const BORDER_NONE = 'none';
|
const BORDER_NONE = 'none';
|
||||||
|
@ -48,7 +50,7 @@ class PHPExcel_Style_Border extends PHPExcel_Style_Supervisor implements PHPExce
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $borderStyle = PHPExcel_Style_Border::BORDER_NONE;
|
protected $borderStyle = self::BORDER_NONE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Border color
|
* Border color
|
||||||
|
@ -65,7 +67,7 @@ class PHPExcel_Style_Border extends PHPExcel_Style_Supervisor implements PHPExce
|
||||||
protected $parentPropertyName;
|
protected $parentPropertyName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_Style_Border
|
* Create a new Border
|
||||||
*
|
*
|
||||||
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
||||||
* Leave this value at default unless you understand exactly what
|
* Leave this value at default unless you understand exactly what
|
||||||
|
@ -80,7 +82,7 @@ class PHPExcel_Style_Border extends PHPExcel_Style_Supervisor implements PHPExce
|
||||||
parent::__construct($isSupervisor);
|
parent::__construct($isSupervisor);
|
||||||
|
|
||||||
// Initialise values
|
// Initialise values
|
||||||
$this->color = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor);
|
$this->color = new Color(Color::COLOR_BLACK, $isSupervisor);
|
||||||
|
|
||||||
// bind parent if we are a supervisor
|
// bind parent if we are a supervisor
|
||||||
if ($isSupervisor) {
|
if ($isSupervisor) {
|
||||||
|
@ -91,9 +93,9 @@ class PHPExcel_Style_Border extends PHPExcel_Style_Supervisor implements PHPExce
|
||||||
/**
|
/**
|
||||||
* Bind parent. Only used for supervisor
|
* Bind parent. Only used for supervisor
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Style_Borders $parent
|
* @param Borders $parent
|
||||||
* @param string $parentPropertyName
|
* @param string $parentPropertyName
|
||||||
* @return PHPExcel_Style_Border
|
* @return Border
|
||||||
*/
|
*/
|
||||||
public function bindParent($parent, $parentPropertyName = null)
|
public function bindParent($parent, $parentPropertyName = null)
|
||||||
{
|
{
|
||||||
|
@ -106,7 +108,7 @@ class PHPExcel_Style_Border extends PHPExcel_Style_Supervisor implements PHPExce
|
||||||
* Get the shared style component for the currently active cell in currently active sheet.
|
* Get the shared style component for the currently active cell in currently active sheet.
|
||||||
* Only used for style supervisor
|
* Only used for style supervisor
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Border
|
* @return Border
|
||||||
* @throws PHPExcel_Exception
|
* @throws PHPExcel_Exception
|
||||||
*/
|
*/
|
||||||
public function getSharedComponent()
|
public function getSharedComponent()
|
||||||
|
@ -117,7 +119,7 @@ class PHPExcel_Style_Border extends PHPExcel_Style_Supervisor implements PHPExce
|
||||||
case 'inside':
|
case 'inside':
|
||||||
case 'outline':
|
case 'outline':
|
||||||
case 'vertical':
|
case 'vertical':
|
||||||
throw new PHPExcel_Exception('Cannot get shared component for a pseudo-border.');
|
throw new \PHPExcel\Exception('Cannot get shared component for a pseudo-border.');
|
||||||
break;
|
break;
|
||||||
case 'bottom':
|
case 'bottom':
|
||||||
return $this->parent->getSharedComponent()->getBottom();
|
return $this->parent->getSharedComponent()->getBottom();
|
||||||
|
@ -163,7 +165,7 @@ class PHPExcel_Style_Border extends PHPExcel_Style_Supervisor implements PHPExce
|
||||||
* <code>
|
* <code>
|
||||||
* $objPHPExcel->getActiveSheet()->getStyle('B2')->getBorders()->getTop()->applyFromArray(
|
* $objPHPExcel->getActiveSheet()->getStyle('B2')->getBorders()->getTop()->applyFromArray(
|
||||||
* array(
|
* array(
|
||||||
* 'style' => PHPExcel_Style_Border::BORDER_DASHDOT,
|
* 'style' => \PHPExcel\Style\Border::BORDER_DASHDOT,
|
||||||
* 'color' => array(
|
* 'color' => array(
|
||||||
* 'rgb' => '808080'
|
* 'rgb' => '808080'
|
||||||
* )
|
* )
|
||||||
|
@ -173,7 +175,7 @@ class PHPExcel_Style_Border extends PHPExcel_Style_Supervisor implements PHPExce
|
||||||
*
|
*
|
||||||
* @param array $pStyles Array containing style information
|
* @param array $pStyles Array containing style information
|
||||||
* @throws PHPExcel_Exception
|
* @throws PHPExcel_Exception
|
||||||
* @return PHPExcel_Style_Border
|
* @return Border
|
||||||
*/
|
*/
|
||||||
public function applyFromArray($pStyles = null)
|
public function applyFromArray($pStyles = null)
|
||||||
{
|
{
|
||||||
|
@ -189,7 +191,7 @@ class PHPExcel_Style_Border extends PHPExcel_Style_Supervisor implements PHPExce
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Exception("Invalid style array passed.");
|
throw new \PHPExcel\Exception("Invalid style array passed.");
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -211,17 +213,17 @@ class PHPExcel_Style_Border extends PHPExcel_Style_Supervisor implements PHPExce
|
||||||
* Set Border style
|
* Set Border style
|
||||||
*
|
*
|
||||||
* @param string|boolean $pValue
|
* @param string|boolean $pValue
|
||||||
* When passing a boolean, FALSE equates PHPExcel_Style_Border::BORDER_NONE
|
* When passing a boolean, FALSE equates Border::BORDER_NONE
|
||||||
* and TRUE to PHPExcel_Style_Border::BORDER_MEDIUM
|
* and TRUE to Border::BORDER_MEDIUM
|
||||||
* @return PHPExcel_Style_Border
|
* @return Border
|
||||||
*/
|
*/
|
||||||
public function setBorderStyle($pValue = PHPExcel_Style_Border::BORDER_NONE)
|
public function setBorderStyle($pValue = Border::BORDER_NONE)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (empty($pValue)) {
|
if (empty($pValue)) {
|
||||||
$pValue = PHPExcel_Style_Border::BORDER_NONE;
|
$pValue = Border::BORDER_NONE;
|
||||||
} elseif (is_bool($pValue) && $pValue) {
|
} elseif (is_bool($pValue) && $pValue) {
|
||||||
$pValue = PHPExcel_Style_Border::BORDER_MEDIUM;
|
$pValue = Border::BORDER_MEDIUM;
|
||||||
}
|
}
|
||||||
if ($this->isSupervisor) {
|
if ($this->isSupervisor) {
|
||||||
$styleArray = $this->getStyleArray(array('style' => $pValue));
|
$styleArray = $this->getStyleArray(array('style' => $pValue));
|
||||||
|
@ -247,7 +249,7 @@ class PHPExcel_Style_Border extends PHPExcel_Style_Supervisor implements PHPExce
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Style_Color $pValue
|
* @param PHPExcel_Style_Color $pValue
|
||||||
* @throws PHPExcel_Exception
|
* @throws PHPExcel_Exception
|
||||||
* @return PHPExcel_Style_Border
|
* @return Border
|
||||||
*/
|
*/
|
||||||
public function setColor(PHPExcel_Style_Color $pValue = null)
|
public function setColor(PHPExcel_Style_Color $pValue = null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Style;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Style_Borders
|
* PHPExcel_Style_Borders
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable
|
class Borders extends Supervisor implements \PHPExcel\IComparable
|
||||||
{
|
{
|
||||||
/* Diagonal directions */
|
/* Diagonal directions */
|
||||||
const DIAGONAL_NONE = 0;
|
const DIAGONAL_NONE = 0;
|
||||||
|
@ -36,35 +38,35 @@ class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExc
|
||||||
/**
|
/**
|
||||||
* Left
|
* Left
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Border
|
* @var Border
|
||||||
*/
|
*/
|
||||||
protected $left;
|
protected $left;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Right
|
* Right
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Border
|
* @var Border
|
||||||
*/
|
*/
|
||||||
protected $right;
|
protected $right;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Top
|
* Top
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Border
|
* @var Border
|
||||||
*/
|
*/
|
||||||
protected $top;
|
protected $top;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bottom
|
* Bottom
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Border
|
* @var Border
|
||||||
*/
|
*/
|
||||||
protected $bottom;
|
protected $bottom;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Diagonal
|
* Diagonal
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Border
|
* @var Border
|
||||||
*/
|
*/
|
||||||
protected $diagonal;
|
protected $diagonal;
|
||||||
|
|
||||||
|
@ -78,40 +80,40 @@ class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExc
|
||||||
/**
|
/**
|
||||||
* All borders psedo-border. Only applies to supervisor.
|
* All borders psedo-border. Only applies to supervisor.
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Border
|
* @var Border
|
||||||
*/
|
*/
|
||||||
protected $allBorders;
|
protected $allBorders;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Outline psedo-border. Only applies to supervisor.
|
* Outline psedo-border. Only applies to supervisor.
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Border
|
* @var Border
|
||||||
*/
|
*/
|
||||||
protected $outline;
|
protected $outline;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inside psedo-border. Only applies to supervisor.
|
* Inside psedo-border. Only applies to supervisor.
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Border
|
* @var Border
|
||||||
*/
|
*/
|
||||||
protected $inside;
|
protected $inside;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vertical pseudo-border. Only applies to supervisor.
|
* Vertical pseudo-border. Only applies to supervisor.
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Border
|
* @var Border
|
||||||
*/
|
*/
|
||||||
protected $vertical;
|
protected $vertical;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Horizontal pseudo-border. Only applies to supervisor.
|
* Horizontal pseudo-border. Only applies to supervisor.
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Border
|
* @var Border
|
||||||
*/
|
*/
|
||||||
protected $horizontal;
|
protected $horizontal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_Style_Borders
|
* Create a new Borders
|
||||||
*
|
*
|
||||||
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
||||||
* Leave this value at default unless you understand exactly what
|
* Leave this value at default unless you understand exactly what
|
||||||
|
@ -126,21 +128,21 @@ class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExc
|
||||||
parent::__construct($isSupervisor);
|
parent::__construct($isSupervisor);
|
||||||
|
|
||||||
// Initialise values
|
// Initialise values
|
||||||
$this->left = new PHPExcel_Style_Border($isSupervisor, $isConditional);
|
$this->left = new Border($isSupervisor, $isConditional);
|
||||||
$this->right = new PHPExcel_Style_Border($isSupervisor, $isConditional);
|
$this->right = new Border($isSupervisor, $isConditional);
|
||||||
$this->top = new PHPExcel_Style_Border($isSupervisor, $isConditional);
|
$this->top = new Border($isSupervisor, $isConditional);
|
||||||
$this->bottom = new PHPExcel_Style_Border($isSupervisor, $isConditional);
|
$this->bottom = new Border($isSupervisor, $isConditional);
|
||||||
$this->diagonal = new PHPExcel_Style_Border($isSupervisor, $isConditional);
|
$this->diagonal = new Border($isSupervisor, $isConditional);
|
||||||
$this->diagonalDirection = PHPExcel_Style_Borders::DIAGONAL_NONE;
|
$this->diagonalDirection = self::DIAGONAL_NONE;
|
||||||
|
|
||||||
// Specially for supervisor
|
// Specially for supervisor
|
||||||
if ($isSupervisor) {
|
if ($isSupervisor) {
|
||||||
// Initialize pseudo-borders
|
// Initialize pseudo-borders
|
||||||
$this->allBorders = new PHPExcel_Style_Border(true);
|
$this->allBorders = new Border(true);
|
||||||
$this->outline = new PHPExcel_Style_Border(true);
|
$this->outline = new Border(true);
|
||||||
$this->inside = new PHPExcel_Style_Border(true);
|
$this->inside = new Border(true);
|
||||||
$this->vertical = new PHPExcel_Style_Border(true);
|
$this->vertical = new Border(true);
|
||||||
$this->horizontal = new PHPExcel_Style_Border(true);
|
$this->horizontal = new Border(true);
|
||||||
|
|
||||||
// bind parent if we are a supervisor
|
// bind parent if we are a supervisor
|
||||||
$this->left->bindParent($this, 'left');
|
$this->left->bindParent($this, 'left');
|
||||||
|
@ -160,7 +162,7 @@ class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExc
|
||||||
* Get the shared style component for the currently active cell in currently active sheet.
|
* Get the shared style component for the currently active cell in currently active sheet.
|
||||||
* Only used for style supervisor
|
* Only used for style supervisor
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Borders
|
* @return Borders
|
||||||
*/
|
*/
|
||||||
public function getSharedComponent()
|
public function getSharedComponent()
|
||||||
{
|
{
|
||||||
|
@ -185,13 +187,13 @@ class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExc
|
||||||
* $objPHPExcel->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray(
|
* $objPHPExcel->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray(
|
||||||
* array(
|
* array(
|
||||||
* 'bottom' => array(
|
* 'bottom' => array(
|
||||||
* 'style' => PHPExcel_Style_Border::BORDER_DASHDOT,
|
* 'style' => \PHPExcel\Style\Border::BORDER_DASHDOT,
|
||||||
* 'color' => array(
|
* 'color' => array(
|
||||||
* 'rgb' => '808080'
|
* 'rgb' => '808080'
|
||||||
* )
|
* )
|
||||||
* ),
|
* ),
|
||||||
* 'top' => array(
|
* 'top' => array(
|
||||||
* 'style' => PHPExcel_Style_Border::BORDER_DASHDOT,
|
* 'style' => \PHPExcel\Style\Border::BORDER_DASHDOT,
|
||||||
* 'color' => array(
|
* 'color' => array(
|
||||||
* 'rgb' => '808080'
|
* 'rgb' => '808080'
|
||||||
* )
|
* )
|
||||||
|
@ -203,7 +205,7 @@ class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExc
|
||||||
* $objPHPExcel->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray(
|
* $objPHPExcel->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray(
|
||||||
* array(
|
* array(
|
||||||
* 'allborders' => array(
|
* 'allborders' => array(
|
||||||
* 'style' => PHPExcel_Style_Border::BORDER_DASHDOT,
|
* 'style' => \PHPExcel\Style\Border::BORDER_DASHDOT,
|
||||||
* 'color' => array(
|
* 'color' => array(
|
||||||
* 'rgb' => '808080'
|
* 'rgb' => '808080'
|
||||||
* )
|
* )
|
||||||
|
@ -214,7 +216,7 @@ class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExc
|
||||||
*
|
*
|
||||||
* @param array $pStyles Array containing style information
|
* @param array $pStyles Array containing style information
|
||||||
* @throws PHPExcel_Exception
|
* @throws PHPExcel_Exception
|
||||||
* @return PHPExcel_Style_Borders
|
* @return Borders
|
||||||
*/
|
*/
|
||||||
public function applyFromArray($pStyles = null)
|
public function applyFromArray($pStyles = null)
|
||||||
{
|
{
|
||||||
|
@ -256,7 +258,7 @@ class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExc
|
||||||
/**
|
/**
|
||||||
* Get Left
|
* Get Left
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Border
|
* @return Border
|
||||||
*/
|
*/
|
||||||
public function getLeft()
|
public function getLeft()
|
||||||
{
|
{
|
||||||
|
@ -266,7 +268,7 @@ class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExc
|
||||||
/**
|
/**
|
||||||
* Get Right
|
* Get Right
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Border
|
* @return Border
|
||||||
*/
|
*/
|
||||||
public function getRight()
|
public function getRight()
|
||||||
{
|
{
|
||||||
|
@ -276,7 +278,7 @@ class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExc
|
||||||
/**
|
/**
|
||||||
* Get Top
|
* Get Top
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Border
|
* @return Border
|
||||||
*/
|
*/
|
||||||
public function getTop()
|
public function getTop()
|
||||||
{
|
{
|
||||||
|
@ -286,7 +288,7 @@ class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExc
|
||||||
/**
|
/**
|
||||||
* Get Bottom
|
* Get Bottom
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Border
|
* @return Border
|
||||||
*/
|
*/
|
||||||
public function getBottom()
|
public function getBottom()
|
||||||
{
|
{
|
||||||
|
@ -296,7 +298,7 @@ class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExc
|
||||||
/**
|
/**
|
||||||
* Get Diagonal
|
* Get Diagonal
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Border
|
* @return Border
|
||||||
*/
|
*/
|
||||||
public function getDiagonal()
|
public function getDiagonal()
|
||||||
{
|
{
|
||||||
|
@ -306,7 +308,7 @@ class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExc
|
||||||
/**
|
/**
|
||||||
* Get AllBorders (pseudo-border). Only applies to supervisor.
|
* Get AllBorders (pseudo-border). Only applies to supervisor.
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Border
|
* @return Border
|
||||||
* @throws PHPExcel_Exception
|
* @throws PHPExcel_Exception
|
||||||
*/
|
*/
|
||||||
public function getAllBorders()
|
public function getAllBorders()
|
||||||
|
@ -348,7 +350,7 @@ class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExc
|
||||||
/**
|
/**
|
||||||
* Get Vertical (pseudo-border). Only applies to supervisor.
|
* Get Vertical (pseudo-border). Only applies to supervisor.
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Border
|
* @return Border
|
||||||
* @throws PHPExcel_Exception
|
* @throws PHPExcel_Exception
|
||||||
*/
|
*/
|
||||||
public function getVertical()
|
public function getVertical()
|
||||||
|
@ -362,7 +364,7 @@ class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExc
|
||||||
/**
|
/**
|
||||||
* Get Horizontal (pseudo-border). Only applies to supervisor.
|
* Get Horizontal (pseudo-border). Only applies to supervisor.
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Border
|
* @return Border
|
||||||
* @throws PHPExcel_Exception
|
* @throws PHPExcel_Exception
|
||||||
*/
|
*/
|
||||||
public function getHorizontal()
|
public function getHorizontal()
|
||||||
|
@ -390,12 +392,12 @@ class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExc
|
||||||
* Set DiagonalDirection
|
* Set DiagonalDirection
|
||||||
*
|
*
|
||||||
* @param int $pValue
|
* @param int $pValue
|
||||||
* @return PHPExcel_Style_Borders
|
* @return Borders
|
||||||
*/
|
*/
|
||||||
public function setDiagonalDirection($pValue = PHPExcel_Style_Borders::DIAGONAL_NONE)
|
public function setDiagonalDirection($pValue = Borders::DIAGONAL_NONE)
|
||||||
{
|
{
|
||||||
if ($pValue == '') {
|
if ($pValue == '') {
|
||||||
$pValue = PHPExcel_Style_Borders::DIAGONAL_NONE;
|
$pValue = Borders::DIAGONAL_NONE;
|
||||||
}
|
}
|
||||||
if ($this->isSupervisor) {
|
if ($this->isSupervisor) {
|
||||||
$styleArray = $this->getStyleArray(array('diagonaldirection' => $pValue));
|
$styleArray = $this->getStyleArray(array('diagonaldirection' => $pValue));
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Style;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Style_Color
|
* PHPExcel_Style_Color
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Style_Color extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable
|
class Color extends Supervisor implements \PHPExcel\IComparable
|
||||||
{
|
{
|
||||||
/* Colors */
|
/* Colors */
|
||||||
const COLOR_BLACK = 'FF000000';
|
const COLOR_BLACK = 'FF000000';
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Style;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel
|
* PHPExcel_Style_Conditional
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006 - 2015 PHPExcel
|
* Copyright (c) 2006 - 2015 PHPExcel
|
||||||
*
|
*
|
||||||
|
@ -24,16 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
|
class Conditional implements \PHPExcel\IComparable
|
||||||
|
|
||||||
/**
|
|
||||||
* PHPExcel_Style_Conditional
|
|
||||||
*
|
|
||||||
* @category PHPExcel
|
|
||||||
* @package PHPExcel_Style
|
|
||||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
|
||||||
*/
|
|
||||||
class PHPExcel_Style_Conditional implements PHPExcel_IComparable
|
|
||||||
{
|
{
|
||||||
/* Condition types */
|
/* Condition types */
|
||||||
const CONDITION_NONE = 'none';
|
const CONDITION_NONE = 'none';
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Style;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Style_Fill
|
* PHPExcel_Style_Fill
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Style_Fill extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable
|
class Fill extends Supervisor implements \PHPExcel\IComparable
|
||||||
{
|
{
|
||||||
/* Fill types */
|
/* Fill types */
|
||||||
const FILL_NONE = 'none';
|
const FILL_NONE = 'none';
|
||||||
|
@ -55,7 +57,7 @@ class PHPExcel_Style_Fill extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $fillType = PHPExcel_Style_Fill::FILL_NONE;
|
protected $fillType = self::FILL_NONE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rotation
|
* Rotation
|
||||||
|
@ -67,19 +69,19 @@ class PHPExcel_Style_Fill extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
/**
|
/**
|
||||||
* Start color
|
* Start color
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Color
|
* @var Color
|
||||||
*/
|
*/
|
||||||
protected $startColor;
|
protected $startColor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* End color
|
* End color
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Color
|
* @var Color
|
||||||
*/
|
*/
|
||||||
protected $endColor;
|
protected $endColor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_Style_Fill
|
* Create a new Fill
|
||||||
*
|
*
|
||||||
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
||||||
* Leave this value at default unless you understand exactly what
|
* Leave this value at default unless you understand exactly what
|
||||||
|
@ -97,8 +99,8 @@ class PHPExcel_Style_Fill extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
if ($isConditional) {
|
if ($isConditional) {
|
||||||
$this->fillType = null;
|
$this->fillType = null;
|
||||||
}
|
}
|
||||||
$this->startColor = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_WHITE, $isSupervisor, $isConditional);
|
$this->startColor = new Color(Color::COLOR_WHITE, $isSupervisor, $isConditional);
|
||||||
$this->endColor = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor, $isConditional);
|
$this->endColor = new Color(Color::COLOR_BLACK, $isSupervisor, $isConditional);
|
||||||
|
|
||||||
// bind parent if we are a supervisor
|
// bind parent if we are a supervisor
|
||||||
if ($isSupervisor) {
|
if ($isSupervisor) {
|
||||||
|
@ -111,7 +113,7 @@ class PHPExcel_Style_Fill extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
* Get the shared style component for the currently active cell in currently active sheet.
|
* Get the shared style component for the currently active cell in currently active sheet.
|
||||||
* Only used for style supervisor
|
* Only used for style supervisor
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Fill
|
* @return Fill
|
||||||
*/
|
*/
|
||||||
public function getSharedComponent()
|
public function getSharedComponent()
|
||||||
{
|
{
|
||||||
|
@ -135,7 +137,7 @@ class PHPExcel_Style_Fill extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
* <code>
|
* <code>
|
||||||
* $objPHPExcel->getActiveSheet()->getStyle('B2')->getFill()->applyFromArray(
|
* $objPHPExcel->getActiveSheet()->getStyle('B2')->getFill()->applyFromArray(
|
||||||
* array(
|
* array(
|
||||||
* 'type' => PHPExcel_Style_Fill::FILL_GRADIENT_LINEAR,
|
* 'type' => \PHPExcel\Style\Fill::FILL_GRADIENT_LINEAR,
|
||||||
* 'rotation' => 0,
|
* 'rotation' => 0,
|
||||||
* 'startcolor' => array(
|
* 'startcolor' => array(
|
||||||
* 'rgb' => '000000'
|
* 'rgb' => '000000'
|
||||||
|
@ -147,9 +149,9 @@ class PHPExcel_Style_Fill extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
* );
|
* );
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param array $pStyles Array containing style information
|
* @param array $pStyles Array containing style information
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return PHPExcel_Style_Fill
|
* @return Fill
|
||||||
*/
|
*/
|
||||||
public function applyFromArray($pStyles = null)
|
public function applyFromArray($pStyles = null)
|
||||||
{
|
{
|
||||||
|
@ -174,7 +176,7 @@ class PHPExcel_Style_Fill extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Exception("Invalid style array passed.");
|
throw new \PHPExcel\Exception("Invalid style array passed.");
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -195,10 +197,10 @@ class PHPExcel_Style_Fill extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
/**
|
/**
|
||||||
* Set Fill Type
|
* Set Fill Type
|
||||||
*
|
*
|
||||||
* @param string $pValue PHPExcel_Style_Fill fill type
|
* @param string $pValue Fill type
|
||||||
* @return PHPExcel_Style_Fill
|
* @return Fill
|
||||||
*/
|
*/
|
||||||
public function setFillType($pValue = PHPExcel_Style_Fill::FILL_NONE)
|
public function setFillType($pValue = Fill::FILL_NONE)
|
||||||
{
|
{
|
||||||
if ($this->isSupervisor) {
|
if ($this->isSupervisor) {
|
||||||
$styleArray = $this->getStyleArray(array('type' => $pValue));
|
$styleArray = $this->getStyleArray(array('type' => $pValue));
|
||||||
|
@ -226,7 +228,7 @@ class PHPExcel_Style_Fill extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
* Set Rotation
|
* Set Rotation
|
||||||
*
|
*
|
||||||
* @param double $pValue
|
* @param double $pValue
|
||||||
* @return PHPExcel_Style_Fill
|
* @return Fill
|
||||||
*/
|
*/
|
||||||
public function setRotation($pValue = 0)
|
public function setRotation($pValue = 0)
|
||||||
{
|
{
|
||||||
|
@ -242,7 +244,7 @@ class PHPExcel_Style_Fill extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
/**
|
/**
|
||||||
* Get Start Color
|
* Get Start Color
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Color
|
* @return Color
|
||||||
*/
|
*/
|
||||||
public function getStartColor()
|
public function getStartColor()
|
||||||
{
|
{
|
||||||
|
@ -252,11 +254,11 @@ class PHPExcel_Style_Fill extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
/**
|
/**
|
||||||
* Set Start Color
|
* Set Start Color
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Style_Color $pValue
|
* @param Color $pValue
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return PHPExcel_Style_Fill
|
* @return Fill
|
||||||
*/
|
*/
|
||||||
public function setStartColor(PHPExcel_Style_Color $pValue = null)
|
public function setStartColor(Color $pValue = null)
|
||||||
{
|
{
|
||||||
// make sure parameter is a real color and not a supervisor
|
// make sure parameter is a real color and not a supervisor
|
||||||
$color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue;
|
$color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue;
|
||||||
|
@ -273,7 +275,7 @@ class PHPExcel_Style_Fill extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
/**
|
/**
|
||||||
* Get End Color
|
* Get End Color
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Color
|
* @return Color
|
||||||
*/
|
*/
|
||||||
public function getEndColor()
|
public function getEndColor()
|
||||||
{
|
{
|
||||||
|
@ -283,11 +285,11 @@ class PHPExcel_Style_Fill extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
/**
|
/**
|
||||||
* Set End Color
|
* Set End Color
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Style_Color $pValue
|
* @param Color $pValue
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return PHPExcel_Style_Fill
|
* @return Fill
|
||||||
*/
|
*/
|
||||||
public function setEndColor(PHPExcel_Style_Color $pValue = null)
|
public function setEndColor(Color $pValue = null)
|
||||||
{
|
{
|
||||||
// make sure parameter is a real color and not a supervisor
|
// make sure parameter is a real color and not a supervisor
|
||||||
$color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue;
|
$color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Style;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Style_Font
|
* PHPExcel_Style_Font
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable
|
class Font extends Supervisor implements \PHPExcel\IComparable
|
||||||
{
|
{
|
||||||
/* Underline types */
|
/* Underline types */
|
||||||
const UNDERLINE_NONE = 'none';
|
const UNDERLINE_NONE = 'none';
|
||||||
|
@ -93,12 +95,12 @@ class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
/**
|
/**
|
||||||
* Foreground color
|
* Foreground color
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Color
|
* @var Color
|
||||||
*/
|
*/
|
||||||
protected $color;
|
protected $color;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_Style_Font
|
* Create a new Font
|
||||||
*
|
*
|
||||||
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
||||||
* Leave this value at default unless you understand exactly what
|
* Leave this value at default unless you understand exactly what
|
||||||
|
@ -122,9 +124,9 @@ class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
$this->subScript = null;
|
$this->subScript = null;
|
||||||
$this->underline = null;
|
$this->underline = null;
|
||||||
$this->strikethrough = null;
|
$this->strikethrough = null;
|
||||||
$this->color = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor, $isConditional);
|
$this->color = new Color(Color::COLOR_BLACK, $isSupervisor, $isConditional);
|
||||||
} else {
|
} else {
|
||||||
$this->color = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor);
|
$this->color = new Color(Color::COLOR_BLACK, $isSupervisor);
|
||||||
}
|
}
|
||||||
// bind parent if we are a supervisor
|
// bind parent if we are a supervisor
|
||||||
if ($isSupervisor) {
|
if ($isSupervisor) {
|
||||||
|
@ -136,7 +138,7 @@ class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
* Get the shared style component for the currently active cell in currently active sheet.
|
* Get the shared style component for the currently active cell in currently active sheet.
|
||||||
* Only used for style supervisor
|
* Only used for style supervisor
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Font
|
* @return Font
|
||||||
*/
|
*/
|
||||||
public function getSharedComponent()
|
public function getSharedComponent()
|
||||||
{
|
{
|
||||||
|
@ -163,7 +165,7 @@ class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
* 'name' => 'Arial',
|
* 'name' => 'Arial',
|
||||||
* 'bold' => TRUE,
|
* 'bold' => TRUE,
|
||||||
* 'italic' => FALSE,
|
* 'italic' => FALSE,
|
||||||
* 'underline' => PHPExcel_Style_Font::UNDERLINE_DOUBLE,
|
* 'underline' => \PHPExcel\Style\Font::UNDERLINE_DOUBLE,
|
||||||
* 'strike' => FALSE,
|
* 'strike' => FALSE,
|
||||||
* 'color' => array(
|
* 'color' => array(
|
||||||
* 'rgb' => '808080'
|
* 'rgb' => '808080'
|
||||||
|
@ -172,9 +174,9 @@ class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
* );
|
* );
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param array $pStyles Array containing style information
|
* @param array $pStyles Array containing style information
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return PHPExcel_Style_Font
|
* @return Font
|
||||||
*/
|
*/
|
||||||
public function applyFromArray($pStyles = null)
|
public function applyFromArray($pStyles = null)
|
||||||
{
|
{
|
||||||
|
@ -211,7 +213,7 @@ class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Exception("Invalid style array passed.");
|
throw new \PHPExcel\Exception("Invalid style array passed.");
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -233,7 +235,7 @@ class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
* Set Name
|
* Set Name
|
||||||
*
|
*
|
||||||
* @param string $pValue
|
* @param string $pValue
|
||||||
* @return PHPExcel_Style_Font
|
* @return Font
|
||||||
*/
|
*/
|
||||||
public function setName($pValue = 'Calibri')
|
public function setName($pValue = 'Calibri')
|
||||||
{
|
{
|
||||||
|
@ -266,7 +268,7 @@ class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
* Set Size
|
* Set Size
|
||||||
*
|
*
|
||||||
* @param double $pValue
|
* @param double $pValue
|
||||||
* @return PHPExcel_Style_Font
|
* @return Font
|
||||||
*/
|
*/
|
||||||
public function setSize($pValue = 10)
|
public function setSize($pValue = 10)
|
||||||
{
|
{
|
||||||
|
@ -299,7 +301,7 @@ class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
* Set Bold
|
* Set Bold
|
||||||
*
|
*
|
||||||
* @param boolean $pValue
|
* @param boolean $pValue
|
||||||
* @return PHPExcel_Style_Font
|
* @return Font
|
||||||
*/
|
*/
|
||||||
public function setBold($pValue = false)
|
public function setBold($pValue = false)
|
||||||
{
|
{
|
||||||
|
@ -332,7 +334,7 @@ class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
* Set Italic
|
* Set Italic
|
||||||
*
|
*
|
||||||
* @param boolean $pValue
|
* @param boolean $pValue
|
||||||
* @return PHPExcel_Style_Font
|
* @return Font
|
||||||
*/
|
*/
|
||||||
public function setItalic($pValue = false)
|
public function setItalic($pValue = false)
|
||||||
{
|
{
|
||||||
|
@ -365,7 +367,7 @@ class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
* Set SuperScript
|
* Set SuperScript
|
||||||
*
|
*
|
||||||
* @param boolean $pValue
|
* @param boolean $pValue
|
||||||
* @return PHPExcel_Style_Font
|
* @return Font
|
||||||
*/
|
*/
|
||||||
public function setSuperScript($pValue = false)
|
public function setSuperScript($pValue = false)
|
||||||
{
|
{
|
||||||
|
@ -399,7 +401,7 @@ class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
* Set SubScript
|
* Set SubScript
|
||||||
*
|
*
|
||||||
* @param boolean $pValue
|
* @param boolean $pValue
|
||||||
* @return PHPExcel_Style_Font
|
* @return Font
|
||||||
*/
|
*/
|
||||||
public function setSubScript($pValue = false)
|
public function setSubScript($pValue = false)
|
||||||
{
|
{
|
||||||
|
@ -432,10 +434,10 @@ class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
/**
|
/**
|
||||||
* Set Underline
|
* Set Underline
|
||||||
*
|
*
|
||||||
* @param string|boolean $pValue PHPExcel_Style_Font underline type
|
* @param string|boolean $pValue \PHPExcel\Style\Font underline type
|
||||||
* If a boolean is passed, then TRUE equates to UNDERLINE_SINGLE,
|
* If a boolean is passed, then TRUE equates to UNDERLINE_SINGLE,
|
||||||
* false equates to UNDERLINE_NONE
|
* false equates to UNDERLINE_NONE
|
||||||
* @return PHPExcel_Style_Font
|
* @return Font
|
||||||
*/
|
*/
|
||||||
public function setUnderline($pValue = self::UNDERLINE_NONE)
|
public function setUnderline($pValue = self::UNDERLINE_NONE)
|
||||||
{
|
{
|
||||||
|
@ -470,7 +472,7 @@ class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
* Set Strikethrough
|
* Set Strikethrough
|
||||||
*
|
*
|
||||||
* @param boolean $pValue
|
* @param boolean $pValue
|
||||||
* @return PHPExcel_Style_Font
|
* @return Font
|
||||||
*/
|
*/
|
||||||
public function setStrikethrough($pValue = false)
|
public function setStrikethrough($pValue = false)
|
||||||
{
|
{
|
||||||
|
@ -489,7 +491,7 @@ class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
/**
|
/**
|
||||||
* Get Color
|
* Get Color
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Color
|
* @return Color
|
||||||
*/
|
*/
|
||||||
public function getColor()
|
public function getColor()
|
||||||
{
|
{
|
||||||
|
@ -499,11 +501,11 @@ class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_
|
||||||
/**
|
/**
|
||||||
* Set Color
|
* Set Color
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Style_Color $pValue
|
* @param Color $pValue
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return PHPExcel_Style_Font
|
* @return Font
|
||||||
*/
|
*/
|
||||||
public function setColor(PHPExcel_Style_Color $pValue = null)
|
public function setColor(Color $pValue = null)
|
||||||
{
|
{
|
||||||
// make sure parameter is a real color and not a supervisor
|
// make sure parameter is a real color and not a supervisor
|
||||||
$color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue;
|
$color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Style;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Style_NumberFormat
|
* PHPExcel_Style_NumberFormat
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Style_NumberFormat extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable
|
class NumberFormat extends Supervisor implements \PHPExcel\IComparable
|
||||||
{
|
{
|
||||||
/* Pre-defined formats */
|
/* Pre-defined formats */
|
||||||
const FORMAT_GENERAL = 'General';
|
const FORMAT_GENERAL = 'General';
|
||||||
|
@ -86,7 +88,7 @@ class PHPExcel_Style_NumberFormat extends PHPExcel_Style_Supervisor implements P
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $formatCode = PHPExcel_Style_NumberFormat::FORMAT_GENERAL;
|
protected $formatCode = self::FORMAT_GENERAL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Built-in format Code
|
* Built-in format Code
|
||||||
|
@ -96,7 +98,7 @@ class PHPExcel_Style_NumberFormat extends PHPExcel_Style_Supervisor implements P
|
||||||
protected $builtInFormatCode = 0;
|
protected $builtInFormatCode = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_Style_NumberFormat
|
* Create a new NumberFormat
|
||||||
*
|
*
|
||||||
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
||||||
* Leave this value at default unless you understand exactly what
|
* Leave this value at default unless you understand exactly what
|
||||||
|
@ -120,7 +122,7 @@ class PHPExcel_Style_NumberFormat extends PHPExcel_Style_Supervisor implements P
|
||||||
* Get the shared style component for the currently active cell in currently active sheet.
|
* Get the shared style component for the currently active cell in currently active sheet.
|
||||||
* Only used for style supervisor
|
* Only used for style supervisor
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_NumberFormat
|
* @return NumberFormat
|
||||||
*/
|
*/
|
||||||
public function getSharedComponent()
|
public function getSharedComponent()
|
||||||
{
|
{
|
||||||
|
@ -144,14 +146,14 @@ class PHPExcel_Style_NumberFormat extends PHPExcel_Style_Supervisor implements P
|
||||||
* <code>
|
* <code>
|
||||||
* $objPHPExcel->getActiveSheet()->getStyle('B2')->getNumberFormat()->applyFromArray(
|
* $objPHPExcel->getActiveSheet()->getStyle('B2')->getNumberFormat()->applyFromArray(
|
||||||
* array(
|
* array(
|
||||||
* 'code' => PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE
|
* 'code' => \PHPExcel\Style\NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE
|
||||||
* )
|
* )
|
||||||
* );
|
* );
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param array $pStyles Array containing style information
|
* @param array $pStyles Array containing style information
|
||||||
* @throws PHPExcel_Exception
|
* @throws PHPExcel_Exception
|
||||||
* @return PHPExcel_Style_NumberFormat
|
* @return NumberFormat
|
||||||
*/
|
*/
|
||||||
public function applyFromArray($pStyles = null)
|
public function applyFromArray($pStyles = null)
|
||||||
{
|
{
|
||||||
|
@ -189,12 +191,12 @@ class PHPExcel_Style_NumberFormat extends PHPExcel_Style_Supervisor implements P
|
||||||
* Set Format Code
|
* Set Format Code
|
||||||
*
|
*
|
||||||
* @param string $pValue
|
* @param string $pValue
|
||||||
* @return PHPExcel_Style_NumberFormat
|
* @return NumberFormat
|
||||||
*/
|
*/
|
||||||
public function setFormatCode($pValue = PHPExcel_Style_NumberFormat::FORMAT_GENERAL)
|
public function setFormatCode($pValue = NumberFormat::FORMAT_GENERAL)
|
||||||
{
|
{
|
||||||
if ($pValue == '') {
|
if ($pValue == '') {
|
||||||
$pValue = PHPExcel_Style_NumberFormat::FORMAT_GENERAL;
|
$pValue = NumberFormat::FORMAT_GENERAL;
|
||||||
}
|
}
|
||||||
if ($this->isSupervisor) {
|
if ($this->isSupervisor) {
|
||||||
$styleArray = $this->getStyleArray(array('code' => $pValue));
|
$styleArray = $this->getStyleArray(array('code' => $pValue));
|
||||||
|
@ -223,7 +225,7 @@ class PHPExcel_Style_NumberFormat extends PHPExcel_Style_Supervisor implements P
|
||||||
* Set Built-In Format Code
|
* Set Built-In Format Code
|
||||||
*
|
*
|
||||||
* @param int $pValue
|
* @param int $pValue
|
||||||
* @return PHPExcel_Style_NumberFormat
|
* @return NumberFormat
|
||||||
*/
|
*/
|
||||||
public function setBuiltInFormatCode($pValue = 0)
|
public function setBuiltInFormatCode($pValue = 0)
|
||||||
{
|
{
|
||||||
|
@ -248,7 +250,7 @@ class PHPExcel_Style_NumberFormat extends PHPExcel_Style_Supervisor implements P
|
||||||
self::$builtInFormats = array();
|
self::$builtInFormats = array();
|
||||||
|
|
||||||
// General
|
// General
|
||||||
self::$builtInFormats[0] = PHPExcel_Style_NumberFormat::FORMAT_GENERAL;
|
self::$builtInFormats[0] = NumberFormat::FORMAT_GENERAL;
|
||||||
self::$builtInFormats[1] = '0';
|
self::$builtInFormats[1] = '0';
|
||||||
self::$builtInFormats[2] = '0.00';
|
self::$builtInFormats[2] = '0.00';
|
||||||
self::$builtInFormats[3] = '#,##0';
|
self::$builtInFormats[3] = '#,##0';
|
||||||
|
@ -538,7 +540,7 @@ class PHPExcel_Style_NumberFormat extends PHPExcel_Style_Supervisor implements P
|
||||||
* @param array $callBack Callback function for additional formatting of string
|
* @param array $callBack Callback function for additional formatting of string
|
||||||
* @return string Formatted string
|
* @return string Formatted string
|
||||||
*/
|
*/
|
||||||
public static function toFormattedString($value = '0', $format = PHPExcel_Style_NumberFormat::FORMAT_GENERAL, $callBack = null)
|
public static function toFormattedString($value = '0', $format = NumberFormat::FORMAT_GENERAL, $callBack = null)
|
||||||
{
|
{
|
||||||
// For now we do not treat strings although section 4 of a format code affects strings
|
// For now we do not treat strings although section 4 of a format code affects strings
|
||||||
if (!is_numeric($value)) {
|
if (!is_numeric($value)) {
|
||||||
|
@ -547,7 +549,7 @@ class PHPExcel_Style_NumberFormat extends PHPExcel_Style_Supervisor implements P
|
||||||
|
|
||||||
// For 'General' format code, we just pass the value although this is not entirely the way Excel does it,
|
// For 'General' format code, we just pass the value although this is not entirely the way Excel does it,
|
||||||
// it seems to round numbers to a total of 10 digits.
|
// it seems to round numbers to a total of 10 digits.
|
||||||
if (($format === PHPExcel_Style_NumberFormat::FORMAT_GENERAL) || ($format === PHPExcel_Style_NumberFormat::FORMAT_TEXT)) {
|
if (($format === NumberFormat::FORMAT_GENERAL) || ($format === NumberFormat::FORMAT_TEXT)) {
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Style;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Style_Protection
|
* PHPExcel_Style_Protection
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Style_Protection extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable
|
class Protection extends Supervisor implements \PHPExcel\IComparable
|
||||||
{
|
{
|
||||||
/** Protection styles */
|
/** Protection styles */
|
||||||
const PROTECTION_INHERIT = 'inherit';
|
const PROTECTION_INHERIT = 'inherit';
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Style;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Style_Supervisor
|
* PHPExcel_Style_Supervisor
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
abstract class PHPExcel_Style_Supervisor
|
abstract class Supervisor
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Supervisor?
|
* Supervisor?
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Worksheet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Worksheet_AutoFilter
|
* PHPExcel_Worksheet_AutoFilter
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Worksheet_AutoFilter
|
class AutoFilter
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Autofilter Worksheet
|
* Autofilter Worksheet
|
||||||
|
@ -57,7 +59,7 @@ class PHPExcel_Worksheet_AutoFilter
|
||||||
* @param string $pRange Cell range (i.e. A1:E10)
|
* @param string $pRange Cell range (i.e. A1:E10)
|
||||||
* @param PHPExcel_Worksheet $pSheet
|
* @param PHPExcel_Worksheet $pSheet
|
||||||
*/
|
*/
|
||||||
public function __construct($pRange = '', PHPExcel_Worksheet $pSheet = null)
|
public function __construct($pRange = '', \PHPExcel\Worksheet $pSheet = null)
|
||||||
{
|
{
|
||||||
$this->range = $pRange;
|
$this->range = $pRange;
|
||||||
$this->workSheet = $pSheet;
|
$this->workSheet = $pSheet;
|
||||||
|
@ -79,7 +81,7 @@ class PHPExcel_Worksheet_AutoFilter
|
||||||
* @param PHPExcel_Worksheet $pSheet
|
* @param PHPExcel_Worksheet $pSheet
|
||||||
* @return PHPExcel_Worksheet_AutoFilter
|
* @return PHPExcel_Worksheet_AutoFilter
|
||||||
*/
|
*/
|
||||||
public function setParent(PHPExcel_Worksheet $pSheet = null)
|
public function setParent(\PHPExcel\Worksheet $pSheet = null)
|
||||||
{
|
{
|
||||||
$this->workSheet = $pSheet;
|
$this->workSheet = $pSheet;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Worksheet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Worksheet_BaseDrawing
|
* PHPExcel_Worksheet_BaseDrawing
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable
|
class BaseDrawing implements \PHPExcel\IComparable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Image counter
|
* Image counter
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Worksheet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Worksheet_CellIterator
|
* PHPExcel_Worksheet_CellIterator
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
abstract class PHPExcel_Worksheet_CellIterator
|
abstract class CellIterator
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Worksheet to iterate
|
* PHPExcel_Worksheet to iterate
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace PHPExcel\Worksheet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Worksheet_Column
|
* PHPExcel_Worksheet_Column
|
||||||
*
|
*
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
* @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 ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
class PHPExcel_Worksheet_Column
|
class Column
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Worksheet
|
* PHPExcel_Worksheet
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue