mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-22 05:16:06 +03:00
More PSR-2 changes, and fixes for a couple of breakages introduced by the last commit
This commit is contained in:
parent
4f8c9bfc96
commit
b8f67c6f4d
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
PHPExcel_Autoloader::Register();
|
||||
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();
|
||||
@ -41,7 +41,7 @@ class PHPExcel_Autoloader
|
||||
* Register the Autoloader with SPL
|
||||
*
|
||||
*/
|
||||
public static function Register()
|
||||
public static function register()
|
||||
{
|
||||
if (function_exists('__autoload')) {
|
||||
// Register any existing autoloader function with SPL, so we don't get any clashes
|
||||
@ -49,9 +49,9 @@ class PHPExcel_Autoloader
|
||||
}
|
||||
// Register ourselves with SPL
|
||||
if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
|
||||
return spl_autoload_register(array('PHPExcel_Autoloader', 'Load'), true, true);
|
||||
return spl_autoload_register(array('PHPExcel_Autoloader', 'load'), true, true);
|
||||
} else {
|
||||
return spl_autoload_register(array('PHPExcel_Autoloader', 'Load'));
|
||||
return spl_autoload_register(array('PHPExcel_Autoloader', 'load'));
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ class PHPExcel_Autoloader
|
||||
*
|
||||
* @param string $pClassName Name of the object to load
|
||||
*/
|
||||
public static function Load($pClassName)
|
||||
public static function load($pClassName)
|
||||
{
|
||||
if ((class_exists($pClassName, false)) || (strpos($pClassName, 'PHPExcel') !== 0)) {
|
||||
// Either already loaded, or not a PHPExcel class request
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -21,8 +21,8 @@
|
||||
* @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##
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
|
||||
@ -34,19 +34,19 @@
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Calculation_Exception extends PHPExcel_Exception {
|
||||
/**
|
||||
* Error handler callback
|
||||
*
|
||||
* @param mixed $code
|
||||
* @param mixed $string
|
||||
* @param mixed $file
|
||||
* @param mixed $line
|
||||
* @param mixed $context
|
||||
*/
|
||||
public static function errorHandlerCallback($code, $string, $file, $line, $context) {
|
||||
$e = new self($string, $code);
|
||||
$e->line = $line;
|
||||
$e->file = $file;
|
||||
throw $e;
|
||||
}
|
||||
/**
|
||||
* Error handler callback
|
||||
*
|
||||
* @param mixed $code
|
||||
* @param mixed $string
|
||||
* @param mixed $file
|
||||
* @param mixed $line
|
||||
* @param mixed $context
|
||||
*/
|
||||
public static function errorHandlerCallback($code, $string, $file, $line, $context) {
|
||||
$e = new self($string, $code);
|
||||
$e->line = $line;
|
||||
$e->file = $file;
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
@ -21,8 +21,8 @@
|
||||
* @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##
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -33,17 +33,17 @@
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Calculation_ExceptionHandler {
|
||||
/**
|
||||
* Register errorhandler
|
||||
*/
|
||||
public function __construct() {
|
||||
set_error_handler(array('PHPExcel_Calculation_Exception', 'errorHandlerCallback'), E_ALL);
|
||||
}
|
||||
/**
|
||||
* Register errorhandler
|
||||
*/
|
||||
public function __construct() {
|
||||
set_error_handler(array('PHPExcel_Calculation_Exception', 'errorHandlerCallback'), E_ALL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregister errorhandler
|
||||
*/
|
||||
public function __destruct() {
|
||||
restore_error_handler();
|
||||
}
|
||||
/**
|
||||
* Unregister errorhandler
|
||||
*/
|
||||
public function __destruct() {
|
||||
restore_error_handler();
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -21,32 +21,32 @@
|
||||
* @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
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
PARTLY BASED ON:
|
||||
Copyright (c) 2007 E. W. Bachtal, Inc.
|
||||
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:
|
||||
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 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.
|
||||
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
|
||||
http://ewbi.blogs.com/develops/2007/03/excel_formula_p.html
|
||||
http://ewbi.blogs.com/develops/2004/12/excel_formula_p.html
|
||||
*/
|
||||
|
||||
|
||||
@ -58,66 +58,66 @@ PARTLY BASED ON:
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Calculation_FormulaToken {
|
||||
/* Token types */
|
||||
const TOKEN_TYPE_NOOP = 'Noop';
|
||||
const TOKEN_TYPE_OPERAND = 'Operand';
|
||||
const TOKEN_TYPE_FUNCTION = 'Function';
|
||||
const TOKEN_TYPE_SUBEXPRESSION = 'Subexpression';
|
||||
const TOKEN_TYPE_ARGUMENT = 'Argument';
|
||||
const TOKEN_TYPE_OPERATORPREFIX = 'OperatorPrefix';
|
||||
const TOKEN_TYPE_OPERATORINFIX = 'OperatorInfix';
|
||||
const TOKEN_TYPE_OPERATORPOSTFIX = 'OperatorPostfix';
|
||||
const TOKEN_TYPE_WHITESPACE = 'Whitespace';
|
||||
const TOKEN_TYPE_UNKNOWN = 'Unknown';
|
||||
/* Token types */
|
||||
const TOKEN_TYPE_NOOP = 'Noop';
|
||||
const TOKEN_TYPE_OPERAND = 'Operand';
|
||||
const TOKEN_TYPE_FUNCTION = 'Function';
|
||||
const TOKEN_TYPE_SUBEXPRESSION = 'Subexpression';
|
||||
const TOKEN_TYPE_ARGUMENT = 'Argument';
|
||||
const TOKEN_TYPE_OPERATORPREFIX = 'OperatorPrefix';
|
||||
const TOKEN_TYPE_OPERATORINFIX = 'OperatorInfix';
|
||||
const TOKEN_TYPE_OPERATORPOSTFIX = 'OperatorPostfix';
|
||||
const TOKEN_TYPE_WHITESPACE = 'Whitespace';
|
||||
const TOKEN_TYPE_UNKNOWN = 'Unknown';
|
||||
|
||||
/* Token subtypes */
|
||||
const TOKEN_SUBTYPE_NOTHING = 'Nothing';
|
||||
const TOKEN_SUBTYPE_START = 'Start';
|
||||
const TOKEN_SUBTYPE_STOP = 'Stop';
|
||||
const TOKEN_SUBTYPE_TEXT = 'Text';
|
||||
const TOKEN_SUBTYPE_NUMBER = 'Number';
|
||||
const TOKEN_SUBTYPE_LOGICAL = 'Logical';
|
||||
const TOKEN_SUBTYPE_ERROR = 'Error';
|
||||
const TOKEN_SUBTYPE_RANGE = 'Range';
|
||||
const TOKEN_SUBTYPE_MATH = 'Math';
|
||||
const TOKEN_SUBTYPE_CONCATENATION = 'Concatenation';
|
||||
const TOKEN_SUBTYPE_INTERSECTION = 'Intersection';
|
||||
const TOKEN_SUBTYPE_UNION = 'Union';
|
||||
/* Token subtypes */
|
||||
const TOKEN_SUBTYPE_NOTHING = 'Nothing';
|
||||
const TOKEN_SUBTYPE_START = 'Start';
|
||||
const TOKEN_SUBTYPE_STOP = 'Stop';
|
||||
const TOKEN_SUBTYPE_TEXT = 'Text';
|
||||
const TOKEN_SUBTYPE_NUMBER = 'Number';
|
||||
const TOKEN_SUBTYPE_LOGICAL = 'Logical';
|
||||
const TOKEN_SUBTYPE_ERROR = 'Error';
|
||||
const TOKEN_SUBTYPE_RANGE = 'Range';
|
||||
const TOKEN_SUBTYPE_MATH = 'Math';
|
||||
const TOKEN_SUBTYPE_CONCATENATION = 'Concatenation';
|
||||
const TOKEN_SUBTYPE_INTERSECTION = 'Intersection';
|
||||
const TOKEN_SUBTYPE_UNION = 'Union';
|
||||
|
||||
/**
|
||||
* Value
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_value;
|
||||
/**
|
||||
* Value
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_value;
|
||||
|
||||
/**
|
||||
* Token Type (represented by TOKEN_TYPE_*)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_tokenType;
|
||||
/**
|
||||
* Token Type (represented by TOKEN_TYPE_*)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_tokenType;
|
||||
|
||||
/**
|
||||
* Token SubType (represented by TOKEN_SUBTYPE_*)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_tokenSubType;
|
||||
/**
|
||||
* Token SubType (represented by TOKEN_SUBTYPE_*)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_tokenSubType;
|
||||
|
||||
/**
|
||||
* Create a new PHPExcel_Calculation_FormulaToken
|
||||
*
|
||||
* @param string $pValue
|
||||
* @param string $pTokenType Token type (represented by TOKEN_TYPE_*)
|
||||
* @param string $pTokenSubType Token Subtype (represented by TOKEN_SUBTYPE_*)
|
||||
* @param string $pValue
|
||||
* @param string $pTokenType Token type (represented by TOKEN_TYPE_*)
|
||||
* @param string $pTokenSubType Token Subtype (represented by TOKEN_SUBTYPE_*)
|
||||
*/
|
||||
public function __construct($pValue, $pTokenType = PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN, $pTokenSubType = PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_NOTHING)
|
||||
{
|
||||
// Initialise values
|
||||
$this->_value = $pValue;
|
||||
$this->_tokenType = $pTokenType;
|
||||
$this->_tokenSubType = $pTokenSubType;
|
||||
// Initialise values
|
||||
$this->_value = $pValue;
|
||||
$this->_tokenType = $pTokenType;
|
||||
$this->_tokenSubType = $pTokenSubType;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -126,16 +126,16 @@ class PHPExcel_Calculation_FormulaToken {
|
||||
* @return string
|
||||
*/
|
||||
public function getValue() {
|
||||
return $this->_value;
|
||||
return $this->_value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Value
|
||||
*
|
||||
* @param string $value
|
||||
* @param string $value
|
||||
*/
|
||||
public function setValue($value) {
|
||||
$this->_value = $value;
|
||||
$this->_value = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -144,16 +144,16 @@ class PHPExcel_Calculation_FormulaToken {
|
||||
* @return string
|
||||
*/
|
||||
public function getTokenType() {
|
||||
return $this->_tokenType;
|
||||
return $this->_tokenType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Token Type
|
||||
*
|
||||
* @param string $value
|
||||
* @param string $value
|
||||
*/
|
||||
public function setTokenType($value = PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN) {
|
||||
$this->_tokenType = $value;
|
||||
$this->_tokenType = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -162,15 +162,15 @@ class PHPExcel_Calculation_FormulaToken {
|
||||
* @return string
|
||||
*/
|
||||
public function getTokenSubType() {
|
||||
return $this->_tokenSubType;
|
||||
return $this->_tokenSubType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Token SubType
|
||||
*
|
||||
* @param string $value
|
||||
* @param string $value
|
||||
*/
|
||||
public function setTokenSubType($value = PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_NOTHING) {
|
||||
$this->_tokenSubType = $value;
|
||||
$this->_tokenSubType = $value;
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
* @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
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
@ -34,58 +34,58 @@
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Calculation_Function {
|
||||
/* 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';
|
||||
/* 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;
|
||||
/**
|
||||
* Category (represented by CATEGORY_*)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_category;
|
||||
|
||||
/**
|
||||
* Excel name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_excelName;
|
||||
/**
|
||||
* Excel name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_excelName;
|
||||
|
||||
/**
|
||||
* PHPExcel name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_phpExcelName;
|
||||
/**
|
||||
* 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
|
||||
* @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.");
|
||||
}
|
||||
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.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -94,21 +94,21 @@ class PHPExcel_Calculation_Function {
|
||||
* @return string
|
||||
*/
|
||||
public function getCategory() {
|
||||
return $this->_category;
|
||||
return $this->_category;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Category (represented by CATEGORY_*)
|
||||
*
|
||||
* @param string $value
|
||||
* @throws PHPExcel_Calculation_Exception
|
||||
* @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.");
|
||||
}
|
||||
if (!is_null($value)) {
|
||||
$this->_category = $value;
|
||||
} else {
|
||||
throw new PHPExcel_Calculation_Exception("Invalid parameter passed.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -117,16 +117,16 @@ class PHPExcel_Calculation_Function {
|
||||
* @return string
|
||||
*/
|
||||
public function getExcelName() {
|
||||
return $this->_excelName;
|
||||
return $this->_excelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Excel name
|
||||
*
|
||||
* @param string $value
|
||||
* @param string $value
|
||||
*/
|
||||
public function setExcelName($value) {
|
||||
$this->_excelName = $value;
|
||||
$this->_excelName = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -135,15 +135,15 @@ class PHPExcel_Calculation_Function {
|
||||
* @return string
|
||||
*/
|
||||
public function getPHPExcelName() {
|
||||
return $this->_phpExcelName;
|
||||
return $this->_phpExcelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set PHPExcel name
|
||||
*
|
||||
* @param string $value
|
||||
* @param string $value
|
||||
*/
|
||||
public function setPHPExcelName($value) {
|
||||
$this->_phpExcelName = $value;
|
||||
$this->_phpExcelName = $value;
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -18,271 +18,271 @@
|
||||
* 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##
|
||||
* @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##
|
||||
*/
|
||||
|
||||
|
||||
/** PHPExcel root directory */
|
||||
if (!defined('PHPEXCEL_ROOT')) {
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* PHPExcel_Calculation_Logical
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_Calculation
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_Calculation
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Calculation_Logical {
|
||||
|
||||
/**
|
||||
* TRUE
|
||||
*
|
||||
* Returns the boolean TRUE.
|
||||
*
|
||||
* Excel Function:
|
||||
* =TRUE()
|
||||
*
|
||||
* @access public
|
||||
* @category Logical Functions
|
||||
* @return boolean True
|
||||
*/
|
||||
public static function TRUE() {
|
||||
return TRUE;
|
||||
} // function TRUE()
|
||||
/**
|
||||
* TRUE
|
||||
*
|
||||
* Returns the boolean TRUE.
|
||||
*
|
||||
* Excel Function:
|
||||
* =TRUE()
|
||||
*
|
||||
* @access public
|
||||
* @category Logical Functions
|
||||
* @return boolean True
|
||||
*/
|
||||
public static function TRUE() {
|
||||
return TRUE;
|
||||
} // function TRUE()
|
||||
|
||||
|
||||
/**
|
||||
* FALSE
|
||||
*
|
||||
* Returns the boolean FALSE.
|
||||
*
|
||||
* Excel Function:
|
||||
* =FALSE()
|
||||
*
|
||||
* @access public
|
||||
* @category Logical Functions
|
||||
* @return boolean False
|
||||
*/
|
||||
public static function FALSE() {
|
||||
return FALSE;
|
||||
} // function FALSE()
|
||||
/**
|
||||
* FALSE
|
||||
*
|
||||
* Returns the boolean FALSE.
|
||||
*
|
||||
* Excel Function:
|
||||
* =FALSE()
|
||||
*
|
||||
* @access public
|
||||
* @category Logical Functions
|
||||
* @return boolean False
|
||||
*/
|
||||
public static function FALSE() {
|
||||
return FALSE;
|
||||
} // function FALSE()
|
||||
|
||||
|
||||
/**
|
||||
* LOGICAL_AND
|
||||
*
|
||||
* Returns boolean TRUE if all its arguments are TRUE; returns FALSE if one or more argument is FALSE.
|
||||
*
|
||||
* Excel Function:
|
||||
* =AND(logical1[,logical2[, ...]])
|
||||
*
|
||||
* The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays
|
||||
* or references that contain logical values.
|
||||
*
|
||||
* Boolean arguments are treated as True or False as appropriate
|
||||
* Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False
|
||||
* If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds
|
||||
* the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
|
||||
*
|
||||
* @access public
|
||||
* @category Logical Functions
|
||||
* @param mixed $arg,... Data values
|
||||
* @return boolean The logical AND of the arguments.
|
||||
*/
|
||||
public static function LOGICAL_AND() {
|
||||
// Return value
|
||||
$returnValue = TRUE;
|
||||
/**
|
||||
* LOGICAL_AND
|
||||
*
|
||||
* Returns boolean TRUE if all its arguments are TRUE; returns FALSE if one or more argument is FALSE.
|
||||
*
|
||||
* Excel Function:
|
||||
* =AND(logical1[,logical2[, ...]])
|
||||
*
|
||||
* The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays
|
||||
* or references that contain logical values.
|
||||
*
|
||||
* Boolean arguments are treated as True or False as appropriate
|
||||
* Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False
|
||||
* If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds
|
||||
* the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
|
||||
*
|
||||
* @access public
|
||||
* @category Logical Functions
|
||||
* @param mixed $arg,... Data values
|
||||
* @return boolean The logical AND of the arguments.
|
||||
*/
|
||||
public static function LOGICAL_AND() {
|
||||
// Return value
|
||||
$returnValue = TRUE;
|
||||
|
||||
// Loop through the arguments
|
||||
$aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args());
|
||||
$argCount = -1;
|
||||
foreach ($aArgs as $argCount => $arg) {
|
||||
// Is it a boolean value?
|
||||
if (is_bool($arg)) {
|
||||
$returnValue = $returnValue && $arg;
|
||||
} elseif ((is_numeric($arg)) && (!is_string($arg))) {
|
||||
$returnValue = $returnValue && ($arg != 0);
|
||||
} elseif (is_string($arg)) {
|
||||
$arg = strtoupper($arg);
|
||||
if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) {
|
||||
$arg = TRUE;
|
||||
} elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) {
|
||||
$arg = FALSE;
|
||||
} else {
|
||||
return PHPExcel_Calculation_Functions::VALUE();
|
||||
}
|
||||
$returnValue = $returnValue && ($arg != 0);
|
||||
}
|
||||
}
|
||||
// Loop through the arguments
|
||||
$aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args());
|
||||
$argCount = -1;
|
||||
foreach ($aArgs as $argCount => $arg) {
|
||||
// Is it a boolean value?
|
||||
if (is_bool($arg)) {
|
||||
$returnValue = $returnValue && $arg;
|
||||
} elseif ((is_numeric($arg)) && (!is_string($arg))) {
|
||||
$returnValue = $returnValue && ($arg != 0);
|
||||
} elseif (is_string($arg)) {
|
||||
$arg = strtoupper($arg);
|
||||
if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) {
|
||||
$arg = TRUE;
|
||||
} elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) {
|
||||
$arg = FALSE;
|
||||
} else {
|
||||
return PHPExcel_Calculation_Functions::VALUE();
|
||||
}
|
||||
$returnValue = $returnValue && ($arg != 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Return
|
||||
if ($argCount < 0) {
|
||||
return PHPExcel_Calculation_Functions::VALUE();
|
||||
}
|
||||
return $returnValue;
|
||||
} // function LOGICAL_AND()
|
||||
// Return
|
||||
if ($argCount < 0) {
|
||||
return PHPExcel_Calculation_Functions::VALUE();
|
||||
}
|
||||
return $returnValue;
|
||||
} // function LOGICAL_AND()
|
||||
|
||||
|
||||
/**
|
||||
* LOGICAL_OR
|
||||
*
|
||||
* Returns boolean TRUE if any argument is TRUE; returns FALSE if all arguments are FALSE.
|
||||
*
|
||||
* Excel Function:
|
||||
* =OR(logical1[,logical2[, ...]])
|
||||
*
|
||||
* The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays
|
||||
* or references that contain logical values.
|
||||
*
|
||||
* Boolean arguments are treated as True or False as appropriate
|
||||
* Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False
|
||||
* If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds
|
||||
* the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
|
||||
*
|
||||
* @access public
|
||||
* @category Logical Functions
|
||||
* @param mixed $arg,... Data values
|
||||
* @return boolean The logical OR of the arguments.
|
||||
*/
|
||||
public static function LOGICAL_OR() {
|
||||
// Return value
|
||||
$returnValue = FALSE;
|
||||
/**
|
||||
* LOGICAL_OR
|
||||
*
|
||||
* Returns boolean TRUE if any argument is TRUE; returns FALSE if all arguments are FALSE.
|
||||
*
|
||||
* Excel Function:
|
||||
* =OR(logical1[,logical2[, ...]])
|
||||
*
|
||||
* The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays
|
||||
* or references that contain logical values.
|
||||
*
|
||||
* Boolean arguments are treated as True or False as appropriate
|
||||
* Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False
|
||||
* If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds
|
||||
* the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
|
||||
*
|
||||
* @access public
|
||||
* @category Logical Functions
|
||||
* @param mixed $arg,... Data values
|
||||
* @return boolean The logical OR of the arguments.
|
||||
*/
|
||||
public static function LOGICAL_OR() {
|
||||
// Return value
|
||||
$returnValue = FALSE;
|
||||
|
||||
// Loop through the arguments
|
||||
$aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args());
|
||||
$argCount = -1;
|
||||
foreach ($aArgs as $argCount => $arg) {
|
||||
// Is it a boolean value?
|
||||
if (is_bool($arg)) {
|
||||
$returnValue = $returnValue || $arg;
|
||||
} elseif ((is_numeric($arg)) && (!is_string($arg))) {
|
||||
$returnValue = $returnValue || ($arg != 0);
|
||||
} elseif (is_string($arg)) {
|
||||
$arg = strtoupper($arg);
|
||||
if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) {
|
||||
$arg = TRUE;
|
||||
} elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) {
|
||||
$arg = FALSE;
|
||||
} else {
|
||||
return PHPExcel_Calculation_Functions::VALUE();
|
||||
}
|
||||
$returnValue = $returnValue || ($arg != 0);
|
||||
}
|
||||
}
|
||||
// Loop through the arguments
|
||||
$aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args());
|
||||
$argCount = -1;
|
||||
foreach ($aArgs as $argCount => $arg) {
|
||||
// Is it a boolean value?
|
||||
if (is_bool($arg)) {
|
||||
$returnValue = $returnValue || $arg;
|
||||
} elseif ((is_numeric($arg)) && (!is_string($arg))) {
|
||||
$returnValue = $returnValue || ($arg != 0);
|
||||
} elseif (is_string($arg)) {
|
||||
$arg = strtoupper($arg);
|
||||
if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) {
|
||||
$arg = TRUE;
|
||||
} elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) {
|
||||
$arg = FALSE;
|
||||
} else {
|
||||
return PHPExcel_Calculation_Functions::VALUE();
|
||||
}
|
||||
$returnValue = $returnValue || ($arg != 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Return
|
||||
if ($argCount < 0) {
|
||||
return PHPExcel_Calculation_Functions::VALUE();
|
||||
}
|
||||
return $returnValue;
|
||||
} // function LOGICAL_OR()
|
||||
// Return
|
||||
if ($argCount < 0) {
|
||||
return PHPExcel_Calculation_Functions::VALUE();
|
||||
}
|
||||
return $returnValue;
|
||||
} // function LOGICAL_OR()
|
||||
|
||||
|
||||
/**
|
||||
* NOT
|
||||
*
|
||||
* Returns the boolean inverse of the argument.
|
||||
*
|
||||
* Excel Function:
|
||||
* =NOT(logical)
|
||||
*
|
||||
* The argument must evaluate to a logical value such as TRUE or FALSE
|
||||
*
|
||||
* Boolean arguments are treated as True or False as appropriate
|
||||
* Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False
|
||||
* If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds
|
||||
* the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
|
||||
*
|
||||
* @access public
|
||||
* @category Logical Functions
|
||||
* @param mixed $logical A value or expression that can be evaluated to TRUE or FALSE
|
||||
* @return boolean The boolean inverse of the argument.
|
||||
*/
|
||||
public static function NOT($logical=FALSE) {
|
||||
$logical = PHPExcel_Calculation_Functions::flattenSingleValue($logical);
|
||||
if (is_string($logical)) {
|
||||
$logical = strtoupper($logical);
|
||||
if (($logical == 'TRUE') || ($logical == PHPExcel_Calculation::getTRUE())) {
|
||||
return FALSE;
|
||||
} elseif (($logical == 'FALSE') || ($logical == PHPExcel_Calculation::getFALSE())) {
|
||||
return TRUE;
|
||||
} else {
|
||||
return PHPExcel_Calculation_Functions::VALUE();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* NOT
|
||||
*
|
||||
* Returns the boolean inverse of the argument.
|
||||
*
|
||||
* Excel Function:
|
||||
* =NOT(logical)
|
||||
*
|
||||
* The argument must evaluate to a logical value such as TRUE or FALSE
|
||||
*
|
||||
* Boolean arguments are treated as True or False as appropriate
|
||||
* Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False
|
||||
* If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds
|
||||
* the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
|
||||
*
|
||||
* @access public
|
||||
* @category Logical Functions
|
||||
* @param mixed $logical A value or expression that can be evaluated to TRUE or FALSE
|
||||
* @return boolean The boolean inverse of the argument.
|
||||
*/
|
||||
public static function NOT($logical=FALSE) {
|
||||
$logical = PHPExcel_Calculation_Functions::flattenSingleValue($logical);
|
||||
if (is_string($logical)) {
|
||||
$logical = strtoupper($logical);
|
||||
if (($logical == 'TRUE') || ($logical == PHPExcel_Calculation::getTRUE())) {
|
||||
return FALSE;
|
||||
} elseif (($logical == 'FALSE') || ($logical == PHPExcel_Calculation::getFALSE())) {
|
||||
return TRUE;
|
||||
} else {
|
||||
return PHPExcel_Calculation_Functions::VALUE();
|
||||
}
|
||||
}
|
||||
|
||||
return !$logical;
|
||||
} // function NOT()
|
||||
return !$logical;
|
||||
} // function NOT()
|
||||
|
||||
/**
|
||||
* STATEMENT_IF
|
||||
*
|
||||
* Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.
|
||||
*
|
||||
* Excel Function:
|
||||
* =IF(condition[,returnIfTrue[,returnIfFalse]])
|
||||
*
|
||||
* Condition is any value or expression that can be evaluated to TRUE or FALSE.
|
||||
* For example, A10=100 is a logical expression; if the value in cell A10 is equal to 100,
|
||||
* the expression evaluates to TRUE. Otherwise, the expression evaluates to FALSE.
|
||||
* This argument can use any comparison calculation operator.
|
||||
* ReturnIfTrue is the value that is returned if condition evaluates to TRUE.
|
||||
* For example, if this argument is the text string "Within budget" and the condition argument evaluates to TRUE,
|
||||
* then the IF function returns the text "Within budget"
|
||||
* If condition is TRUE and ReturnIfTrue is blank, this argument returns 0 (zero). To display the word TRUE, use
|
||||
* the logical value TRUE for this argument.
|
||||
* ReturnIfTrue can be another formula.
|
||||
* ReturnIfFalse is the value that is returned if condition evaluates to FALSE.
|
||||
* For example, if this argument is the text string "Over budget" and the condition argument evaluates to FALSE,
|
||||
* then the IF function returns the text "Over budget".
|
||||
* If condition is FALSE and ReturnIfFalse is omitted, then the logical value FALSE is returned.
|
||||
* If condition is FALSE and ReturnIfFalse is blank, then the value 0 (zero) is returned.
|
||||
* ReturnIfFalse can be another formula.
|
||||
*
|
||||
* @access public
|
||||
* @category Logical Functions
|
||||
* @param mixed $condition Condition to evaluate
|
||||
* @param mixed $returnIfTrue Value to return when condition is true
|
||||
* @param mixed $returnIfFalse Optional value to return when condition is false
|
||||
* @return mixed The value of returnIfTrue or returnIfFalse determined by condition
|
||||
*/
|
||||
public static function STATEMENT_IF($condition = TRUE, $returnIfTrue = 0, $returnIfFalse = FALSE) {
|
||||
$condition = (is_null($condition)) ? TRUE : (boolean) PHPExcel_Calculation_Functions::flattenSingleValue($condition);
|
||||
$returnIfTrue = (is_null($returnIfTrue)) ? 0 : PHPExcel_Calculation_Functions::flattenSingleValue($returnIfTrue);
|
||||
$returnIfFalse = (is_null($returnIfFalse)) ? FALSE : PHPExcel_Calculation_Functions::flattenSingleValue($returnIfFalse);
|
||||
/**
|
||||
* STATEMENT_IF
|
||||
*
|
||||
* Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.
|
||||
*
|
||||
* Excel Function:
|
||||
* =IF(condition[,returnIfTrue[,returnIfFalse]])
|
||||
*
|
||||
* Condition is any value or expression that can be evaluated to TRUE or FALSE.
|
||||
* For example, A10=100 is a logical expression; if the value in cell A10 is equal to 100,
|
||||
* the expression evaluates to TRUE. Otherwise, the expression evaluates to FALSE.
|
||||
* This argument can use any comparison calculation operator.
|
||||
* ReturnIfTrue is the value that is returned if condition evaluates to TRUE.
|
||||
* For example, if this argument is the text string "Within budget" and the condition argument evaluates to TRUE,
|
||||
* then the IF function returns the text "Within budget"
|
||||
* If condition is TRUE and ReturnIfTrue is blank, this argument returns 0 (zero). To display the word TRUE, use
|
||||
* the logical value TRUE for this argument.
|
||||
* ReturnIfTrue can be another formula.
|
||||
* ReturnIfFalse is the value that is returned if condition evaluates to FALSE.
|
||||
* For example, if this argument is the text string "Over budget" and the condition argument evaluates to FALSE,
|
||||
* then the IF function returns the text "Over budget".
|
||||
* If condition is FALSE and ReturnIfFalse is omitted, then the logical value FALSE is returned.
|
||||
* If condition is FALSE and ReturnIfFalse is blank, then the value 0 (zero) is returned.
|
||||
* ReturnIfFalse can be another formula.
|
||||
*
|
||||
* @access public
|
||||
* @category Logical Functions
|
||||
* @param mixed $condition Condition to evaluate
|
||||
* @param mixed $returnIfTrue Value to return when condition is true
|
||||
* @param mixed $returnIfFalse Optional value to return when condition is false
|
||||
* @return mixed The value of returnIfTrue or returnIfFalse determined by condition
|
||||
*/
|
||||
public static function STATEMENT_IF($condition = TRUE, $returnIfTrue = 0, $returnIfFalse = FALSE) {
|
||||
$condition = (is_null($condition)) ? TRUE : (boolean) PHPExcel_Calculation_Functions::flattenSingleValue($condition);
|
||||
$returnIfTrue = (is_null($returnIfTrue)) ? 0 : PHPExcel_Calculation_Functions::flattenSingleValue($returnIfTrue);
|
||||
$returnIfFalse = (is_null($returnIfFalse)) ? FALSE : PHPExcel_Calculation_Functions::flattenSingleValue($returnIfFalse);
|
||||
|
||||
return ($condition) ? $returnIfTrue : $returnIfFalse;
|
||||
} // function STATEMENT_IF()
|
||||
return ($condition) ? $returnIfTrue : $returnIfFalse;
|
||||
} // function STATEMENT_IF()
|
||||
|
||||
|
||||
/**
|
||||
* IFERROR
|
||||
*
|
||||
* Excel Function:
|
||||
* =IFERROR(testValue,errorpart)
|
||||
*
|
||||
* @access public
|
||||
* @category Logical Functions
|
||||
* @param mixed $testValue Value to check, is also the value returned when no error
|
||||
* @param mixed $errorpart Value to return when testValue is an error condition
|
||||
* @return mixed The value of errorpart or testValue determined by error condition
|
||||
*/
|
||||
public static function IFERROR($testValue = '', $errorpart = '') {
|
||||
$testValue = (is_null($testValue)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($testValue);
|
||||
$errorpart = (is_null($errorpart)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($errorpart);
|
||||
/**
|
||||
* IFERROR
|
||||
*
|
||||
* Excel Function:
|
||||
* =IFERROR(testValue,errorpart)
|
||||
*
|
||||
* @access public
|
||||
* @category Logical Functions
|
||||
* @param mixed $testValue Value to check, is also the value returned when no error
|
||||
* @param mixed $errorpart Value to return when testValue is an error condition
|
||||
* @return mixed The value of errorpart or testValue determined by error condition
|
||||
*/
|
||||
public static function IFERROR($testValue = '', $errorpart = '') {
|
||||
$testValue = (is_null($testValue)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($testValue);
|
||||
$errorpart = (is_null($errorpart)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($errorpart);
|
||||
|
||||
return self::STATEMENT_IF(PHPExcel_Calculation_Functions::IS_ERROR($testValue), $errorpart, $testValue);
|
||||
} // function IFERROR()
|
||||
return self::STATEMENT_IF(PHPExcel_Calculation_Functions::IS_ERROR($testValue), $errorpart, $testValue);
|
||||
} // function IFERROR()
|
||||
|
||||
} // class PHPExcel_Calculation_Logical
|
||||
} // class PHPExcel_Calculation_Logical
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHPExcel_Calculation_Token_Stack
|
||||
*
|
||||
|
@ -1,6 +1,16 @@
|
||||
<?php
|
||||
|
||||
/** PHPExcel root directory */
|
||||
if (!defined('PHPEXCEL_ROOT')) {
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* PHPExcel
|
||||
* PHPExcel_Cell_AdvancedValueBinder
|
||||
*
|
||||
* Copyright (c) 2006 - 2015 PHPExcel
|
||||
*
|
||||
@ -24,25 +34,6 @@
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
|
||||
/** PHPExcel root directory */
|
||||
if (!defined('PHPEXCEL_ROOT')) {
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* PHPExcel_Cell_AdvancedValueBinder
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_Cell
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Cell_AdvancedValueBinder extends PHPExcel_Cell_DefaultValueBinder implements PHPExcel_Cell_IValueBinder
|
||||
{
|
||||
/**
|
||||
@ -66,16 +57,16 @@ class PHPExcel_Cell_AdvancedValueBinder extends PHPExcel_Cell_DefaultValueBinder
|
||||
if ($dataType === PHPExcel_Cell_DataType::TYPE_STRING && !$value instanceof PHPExcel_RichText) {
|
||||
// Test for booleans using locale-setting
|
||||
if ($value == PHPExcel_Calculation::getTRUE()) {
|
||||
$cell->setValueExplicit( TRUE, PHPExcel_Cell_DataType::TYPE_BOOL);
|
||||
$cell->setValueExplicit(true, PHPExcel_Cell_DataType::TYPE_BOOL);
|
||||
return true;
|
||||
} elseif($value == PHPExcel_Calculation::getFALSE()) {
|
||||
$cell->setValueExplicit( FALSE, PHPExcel_Cell_DataType::TYPE_BOOL);
|
||||
$cell->setValueExplicit(false, PHPExcel_Cell_DataType::TYPE_BOOL);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check for number in scientific format
|
||||
if (preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_NUMBER.'$/', $value)) {
|
||||
$cell->setValueExplicit( (float) $value, PHPExcel_Cell_DataType::TYPE_NUMERIC);
|
||||
$cell->setValueExplicit((float) $value, PHPExcel_Cell_DataType::TYPE_NUMERIC);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -84,7 +75,7 @@ class PHPExcel_Cell_AdvancedValueBinder extends PHPExcel_Cell_DefaultValueBinder
|
||||
// Convert value to number
|
||||
$value = $matches[2] / $matches[3];
|
||||
if ($matches[1] == '-') $value = 0 - $value;
|
||||
$cell->setValueExplicit( (float) $value, PHPExcel_Cell_DataType::TYPE_NUMERIC);
|
||||
$cell->setValueExplicit((float) $value, PHPExcel_Cell_DataType::TYPE_NUMERIC);
|
||||
// Set style
|
||||
$cell->getWorksheet()->getStyle( $cell->getCoordinate() )
|
||||
->getNumberFormat()->setFormatCode( '??/??' );
|
||||
@ -93,7 +84,7 @@ class PHPExcel_Cell_AdvancedValueBinder extends PHPExcel_Cell_DefaultValueBinder
|
||||
// Convert value to number
|
||||
$value = $matches[2] + ($matches[3] / $matches[4]);
|
||||
if ($matches[1] == '-') $value = 0 - $value;
|
||||
$cell->setValueExplicit( (float) $value, PHPExcel_Cell_DataType::TYPE_NUMERIC);
|
||||
$cell->setValueExplicit((float) $value, PHPExcel_Cell_DataType::TYPE_NUMERIC);
|
||||
// Set style
|
||||
$cell->getWorksheet()->getStyle( $cell->getCoordinate() )
|
||||
->getNumberFormat()->setFormatCode( '# ??/??' );
|
||||
@ -107,7 +98,7 @@ class PHPExcel_Cell_AdvancedValueBinder extends PHPExcel_Cell_DefaultValueBinder
|
||||
$cell->setValueExplicit( $value, PHPExcel_Cell_DataType::TYPE_NUMERIC);
|
||||
// Set style
|
||||
$cell->getWorksheet()->getStyle( $cell->getCoordinate() )
|
||||
->getNumberFormat()->setFormatCode( PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00 );
|
||||
->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -122,7 +113,7 @@ class PHPExcel_Cell_AdvancedValueBinder extends PHPExcel_Cell_DefaultValueBinder
|
||||
// Set style
|
||||
$cell->getWorksheet()->getStyle( $cell->getCoordinate() )
|
||||
->getNumberFormat()->setFormatCode(
|
||||
str_replace('$', $currencyCode, PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE )
|
||||
str_replace('$', $currencyCode, PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE)
|
||||
);
|
||||
return true;
|
||||
} elseif (preg_match('/^\$ *(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$/', $value)) {
|
||||
@ -131,7 +122,7 @@ class PHPExcel_Cell_AdvancedValueBinder extends PHPExcel_Cell_DefaultValueBinder
|
||||
$cell->setValueExplicit( $value, PHPExcel_Cell_DataType::TYPE_NUMERIC);
|
||||
// Set style
|
||||
$cell->getWorksheet()->getStyle( $cell->getCoordinate() )
|
||||
->getNumberFormat()->setFormatCode( PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE );
|
||||
->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -143,7 +134,7 @@ class PHPExcel_Cell_AdvancedValueBinder extends PHPExcel_Cell_DefaultValueBinder
|
||||
$cell->setValueExplicit($days, PHPExcel_Cell_DataType::TYPE_NUMERIC);
|
||||
// Set style
|
||||
$cell->getWorksheet()->getStyle( $cell->getCoordinate() )
|
||||
->getNumberFormat()->setFormatCode( PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME3 );
|
||||
->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME3);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -156,7 +147,7 @@ class PHPExcel_Cell_AdvancedValueBinder extends PHPExcel_Cell_DefaultValueBinder
|
||||
$cell->setValueExplicit($days, PHPExcel_Cell_DataType::TYPE_NUMERIC);
|
||||
// Set style
|
||||
$cell->getWorksheet()->getStyle( $cell->getCoordinate() )
|
||||
->getNumberFormat()->setFormatCode( PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME4 );
|
||||
->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME4);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -176,12 +167,12 @@ class PHPExcel_Cell_AdvancedValueBinder extends PHPExcel_Cell_DefaultValueBinder
|
||||
}
|
||||
|
||||
// Check for newline character "\n"
|
||||
if (strpos($value, "\n") !== FALSE) {
|
||||
if (strpos($value, "\n") !== false) {
|
||||
$value = PHPExcel_Shared_String::SanitizeUTF8($value);
|
||||
$cell->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_STRING);
|
||||
// Set style
|
||||
$cell->getWorksheet()->getStyle( $cell->getCoordinate() )
|
||||
->getAlignment()->setWrapText(TRUE);
|
||||
$cell->getWorksheet()->getStyle($cell->getCoordinate())
|
||||
->getAlignment()->setWrapText(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHPExcel
|
||||
* PHPExcel_Cell_DataType
|
||||
*
|
||||
* Copyright (c) 2006 - 2015 PHPExcel
|
||||
*
|
||||
@ -24,15 +25,6 @@
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* PHPExcel_Cell_DataType
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_Cell
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Cell_DataType
|
||||
{
|
||||
/* Data types */
|
||||
@ -50,7 +42,7 @@ class PHPExcel_Cell_DataType
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $_errorCodes = array(
|
||||
private static $errorCodes = array(
|
||||
'#NULL!' => 0,
|
||||
'#DIV/0!' => 1,
|
||||
'#VALUE!' => 2,
|
||||
@ -65,8 +57,9 @@ class PHPExcel_Cell_DataType
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getErrorCodes() {
|
||||
return self::$_errorCodes;
|
||||
public static function getErrorCodes()
|
||||
{
|
||||
return self::$errorCodes;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -76,7 +69,8 @@ class PHPExcel_Cell_DataType
|
||||
* @param mixed $pValue
|
||||
* @return string
|
||||
*/
|
||||
public static function dataTypeForValue($pValue = null) {
|
||||
public static function dataTypeForValue($pValue = null)
|
||||
{
|
||||
return PHPExcel_Cell_DefaultValueBinder::dataTypeForValue($pValue);
|
||||
}
|
||||
|
||||
@ -112,7 +106,7 @@ class PHPExcel_Cell_DataType
|
||||
{
|
||||
$pValue = (string) $pValue;
|
||||
|
||||
if ( !array_key_exists($pValue, self::$_errorCodes) ) {
|
||||
if (!array_key_exists($pValue, self::$errorCodes)) {
|
||||
$pValue = '#NULL!';
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHPExcel
|
||||
* PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* Copyright (c) 2006 - 2015 PHPExcel
|
||||
*
|
||||
@ -24,15 +25,6 @@
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_Cell
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Cell_DataValidation
|
||||
{
|
||||
/* Data validation types */
|
||||
|
@ -1,6 +1,16 @@
|
||||
<?php
|
||||
|
||||
/** PHPExcel root directory */
|
||||
if (!defined('PHPEXCEL_ROOT')) {
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* PHPExcel
|
||||
* PHPExcel_Cell_DefaultValueBinder
|
||||
*
|
||||
* Copyright (c) 2006 - 2015 PHPExcel
|
||||
*
|
||||
@ -24,25 +34,6 @@
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
|
||||
/** PHPExcel root directory */
|
||||
if (!defined('PHPEXCEL_ROOT')) {
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* PHPExcel_Cell_DefaultValueBinder
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_Cell
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Cell_DefaultValueBinder implements PHPExcel_Cell_IValueBinder
|
||||
{
|
||||
/**
|
||||
@ -67,7 +58,7 @@ class PHPExcel_Cell_DefaultValueBinder implements PHPExcel_Cell_IValueBinder
|
||||
}
|
||||
|
||||
// Set value explicit
|
||||
$cell->setValueExplicit( $value, self::dataTypeForValue($value) );
|
||||
$cell->setValueExplicit($value, self::dataTypeForValue($value));
|
||||
|
||||
// Done!
|
||||
return true;
|
||||
@ -79,7 +70,8 @@ class PHPExcel_Cell_DefaultValueBinder implements PHPExcel_Cell_IValueBinder
|
||||
* @param mixed $pValue
|
||||
* @return string
|
||||
*/
|
||||
public static function dataTypeForValue($pValue = null) {
|
||||
public static function dataTypeForValue($pValue = null)
|
||||
{
|
||||
// Match the value against a few data types
|
||||
if ($pValue === null) {
|
||||
return PHPExcel_Cell_DataType::TYPE_NULL;
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHPExcel
|
||||
* PHPExcel_Cell_Hyperlink
|
||||
*
|
||||
* Copyright (c) 2006 - 2015 PHPExcel
|
||||
*
|
||||
@ -24,15 +25,6 @@
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* PHPExcel_Cell_Hyperlink
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_Cell
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Cell_Hyperlink
|
||||
{
|
||||
/**
|
||||
@ -40,14 +32,14 @@ class PHPExcel_Cell_Hyperlink
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_url;
|
||||
private $url;
|
||||
|
||||
/**
|
||||
* Tooltip to display on the hyperlink
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_tooltip;
|
||||
private $tooltip;
|
||||
|
||||
/**
|
||||
* Create a new PHPExcel_Cell_Hyperlink
|
||||
@ -58,8 +50,8 @@ class PHPExcel_Cell_Hyperlink
|
||||
public function __construct($pUrl = '', $pTooltip = '')
|
||||
{
|
||||
// Initialise member variables
|
||||
$this->_url = $pUrl;
|
||||
$this->_tooltip = $pTooltip;
|
||||
$this->url = $pUrl;
|
||||
$this->tooltip = $pTooltip;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -67,8 +59,9 @@ class PHPExcel_Cell_Hyperlink
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUrl() {
|
||||
return $this->_url;
|
||||
public function getUrl()
|
||||
{
|
||||
return $this->url;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -77,8 +70,9 @@ class PHPExcel_Cell_Hyperlink
|
||||
* @param string $value
|
||||
* @return PHPExcel_Cell_Hyperlink
|
||||
*/
|
||||
public function setUrl($value = '') {
|
||||
$this->_url = $value;
|
||||
public function setUrl($value = '')
|
||||
{
|
||||
$this->url = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@ -87,8 +81,9 @@ class PHPExcel_Cell_Hyperlink
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTooltip() {
|
||||
return $this->_tooltip;
|
||||
public function getTooltip()
|
||||
{
|
||||
return $this->tooltip;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -97,8 +92,9 @@ class PHPExcel_Cell_Hyperlink
|
||||
* @param string $value
|
||||
* @return PHPExcel_Cell_Hyperlink
|
||||
*/
|
||||
public function setTooltip($value = '') {
|
||||
$this->_tooltip = $value;
|
||||
public function setTooltip($value = '')
|
||||
{
|
||||
$this->tooltip = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@ -107,8 +103,9 @@ class PHPExcel_Cell_Hyperlink
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isInternal() {
|
||||
return strpos($this->_url, 'sheet://') !== false;
|
||||
public function isInternal()
|
||||
{
|
||||
return strpos($this->url, 'sheet://') !== false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -116,11 +113,12 @@ class PHPExcel_Cell_Hyperlink
|
||||
*
|
||||
* @return string Hash code
|
||||
*/
|
||||
public function getHashCode() {
|
||||
public function getHashCode()
|
||||
{
|
||||
return md5(
|
||||
$this->_url
|
||||
. $this->_tooltip
|
||||
. __CLASS__
|
||||
$this->url .
|
||||
$this->tooltip .
|
||||
__CLASS__
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHPExcel
|
||||
*
|
||||
@ -42,5 +43,5 @@ interface PHPExcel_Cell_IValueBinder
|
||||
* @param mixed $value Value to bind in cell
|
||||
* @return boolean
|
||||
*/
|
||||
public function bindValue(PHPExcel_Cell $cell, $value = NULL);
|
||||
public function bindValue(PHPExcel_Cell $cell, $value = null);
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ class PHPExcel_RichText_Run extends PHPExcel_RichText_TextElement implements PHP
|
||||
{
|
||||
return md5(
|
||||
$this->getText() .
|
||||
$this->_font->getHashCode() .
|
||||
$this->font->getHashCode() .
|
||||
__CLASS__
|
||||
);
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ class PHPExcel_RichText_TextElement implements PHPExcel_RichText_ITextElement
|
||||
public function getHashCode()
|
||||
{
|
||||
return md5(
|
||||
$this->_text .
|
||||
$this->text .
|
||||
__CLASS__
|
||||
);
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ class PHPExcel_Settings
|
||||
if (!in_array($libraryName, self::$pdfRenderers)) {
|
||||
return false;
|
||||
}
|
||||
self::$_pdfRendererName = $libraryName;
|
||||
self::$pdfRendererName = $libraryName;
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -365,7 +365,7 @@ class PHPExcel_Settings
|
||||
if (version_compare(PHP_VERSION, '5.2.11') >= 0) {
|
||||
@libxml_disable_entity_loader($options == (LIBXML_DTDLOAD | LIBXML_DTDATTR));
|
||||
}
|
||||
self::$_libXmlLoaderOptions = $options;
|
||||
self::$libXmlLoaderOptions = $options;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -376,12 +376,12 @@ class PHPExcel_Settings
|
||||
*/
|
||||
public static function getLibXmlLoaderOptions()
|
||||
{
|
||||
if (is_null(self::$_libXmlLoaderOptions) && defined(LIBXML_DTDLOAD)) {
|
||||
if (is_null(self::$libXmlLoaderOptions) && defined(LIBXML_DTDLOAD)) {
|
||||
self::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR);
|
||||
}
|
||||
if (version_compare(PHP_VERSION, '5.2.11') >= 0) {
|
||||
@libxml_disable_entity_loader(self::$libXmlLoaderOptions == (LIBXML_DTDLOAD | LIBXML_DTDATTR));
|
||||
}
|
||||
return self::$_libXmlLoaderOptions;
|
||||
return self::$libXmlLoaderOptions;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHPExcel
|
||||
* PHPExcel_Writer_PDF
|
||||
*
|
||||
* Copyright (c) 2006 - 2015 PHPExcel
|
||||
*
|
||||
@ -24,15 +25,6 @@
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* PHPExcel_Writer_PDF
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_Writer_PDF
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Writer_PDF implements PHPExcel_Writer_IWriter
|
||||
{
|
||||
|
||||
@ -41,7 +33,7 @@ class PHPExcel_Writer_PDF implements PHPExcel_Writer_IWriter
|
||||
*
|
||||
* @var PHPExcel_Writer_PDF_Core
|
||||
*/
|
||||
private $_renderer = NULL;
|
||||
private $renderer = null;
|
||||
|
||||
/**
|
||||
* Instantiate a new renderer of the configured type within this container class
|
||||
@ -67,7 +59,7 @@ class PHPExcel_Writer_PDF implements PHPExcel_Writer_IWriter
|
||||
}
|
||||
|
||||
$rendererName = 'PHPExcel_Writer_PDF_' . $pdfLibraryName;
|
||||
$this->_renderer = new $rendererName($phpExcel);
|
||||
$this->renderer = new $rendererName($phpExcel);
|
||||
}
|
||||
|
||||
|
||||
@ -80,11 +72,11 @@ class PHPExcel_Writer_PDF implements PHPExcel_Writer_IWriter
|
||||
*/
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
if ($this->_renderer === NULL) {
|
||||
if ($this->renderer === null) {
|
||||
throw new PHPExcel_Writer_Exception("PDF Rendering library has not been defined.");
|
||||
}
|
||||
|
||||
return call_user_func_array(array($this->_renderer, $name), $arguments);
|
||||
return call_user_func_array(array($this->renderer, $name), $arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -92,6 +84,6 @@ class PHPExcel_Writer_PDF implements PHPExcel_Writer_IWriter
|
||||
*/
|
||||
public function save($pFilename = null)
|
||||
{
|
||||
$this->_renderer->save($pFilename);
|
||||
$this->renderer->save($pFilename);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHPExcel
|
||||
* PHPExcel_Writer_PDF_Core
|
||||
*
|
||||
* Copyright (c) 2006 - 2015 PHPExcel
|
||||
*
|
||||
@ -24,15 +25,6 @@
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* PHPExcel_Writer_PDF_Core
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_Writer_PDF
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
abstract class PHPExcel_Writer_PDF_Core extends PHPExcel_Writer_HTML
|
||||
{
|
||||
/**
|
||||
@ -54,14 +46,14 @@ abstract class PHPExcel_Writer_PDF_Core extends PHPExcel_Writer_HTML
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_orientation = NULL;
|
||||
protected $orientation;
|
||||
|
||||
/**
|
||||
* Paper size (Over-ride)
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $_paperSize = NULL;
|
||||
protected $paperSize;
|
||||
|
||||
|
||||
/**
|
||||
@ -69,14 +61,14 @@ abstract class PHPExcel_Writer_PDF_Core extends PHPExcel_Writer_HTML
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_saveArrayReturnType;
|
||||
private $saveArrayReturnType;
|
||||
|
||||
/**
|
||||
* Paper Sizes xRef List
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected static $_paperSizes = array(
|
||||
protected static $paperSizes = array(
|
||||
PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER
|
||||
=> 'LETTER', // (8.5 in. by 11 in.)
|
||||
PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER_SMALL
|
||||
@ -219,7 +211,7 @@ abstract class PHPExcel_Writer_PDF_Core extends PHPExcel_Writer_HTML
|
||||
public function __construct(PHPExcel $phpExcel)
|
||||
{
|
||||
parent::__construct($phpExcel);
|
||||
$this->setUseInlineCss(TRUE);
|
||||
$this->setUseInlineCss(true);
|
||||
$this->_tempDir = PHPExcel_Shared_File::sys_get_temp_dir();
|
||||
}
|
||||
|
||||
@ -255,7 +247,7 @@ abstract class PHPExcel_Writer_PDF_Core extends PHPExcel_Writer_HTML
|
||||
*/
|
||||
public function getPaperSize()
|
||||
{
|
||||
return $this->_paperSize;
|
||||
return $this->paperSize;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -266,7 +258,7 @@ abstract class PHPExcel_Writer_PDF_Core extends PHPExcel_Writer_HTML
|
||||
*/
|
||||
public function setPaperSize($pValue = PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER)
|
||||
{
|
||||
$this->_paperSize = $pValue;
|
||||
$this->paperSize = $pValue;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@ -277,7 +269,7 @@ abstract class PHPExcel_Writer_PDF_Core extends PHPExcel_Writer_HTML
|
||||
*/
|
||||
public function getOrientation()
|
||||
{
|
||||
return $this->_orientation;
|
||||
return $this->orientation;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -288,7 +280,7 @@ abstract class PHPExcel_Writer_PDF_Core extends PHPExcel_Writer_HTML
|
||||
*/
|
||||
public function setOrientation($pValue = PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT)
|
||||
{
|
||||
$this->_orientation = $pValue;
|
||||
$this->orientation = $pValue;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@ -325,24 +317,24 @@ abstract class PHPExcel_Writer_PDF_Core extends PHPExcel_Writer_HTML
|
||||
* @param string $pFilename Name of the file to save as
|
||||
* @throws PHPExcel_Writer_Exception
|
||||
*/
|
||||
protected function prepareForSave($pFilename = NULL)
|
||||
protected function prepareForSave($pFilename = null)
|
||||
{
|
||||
// garbage collect
|
||||
$this->_phpExcel->garbageCollect();
|
||||
|
||||
$this->_saveArrayReturnType = PHPExcel_Calculation::getArrayReturnType();
|
||||
$this->saveArrayReturnType = PHPExcel_Calculation::getArrayReturnType();
|
||||
PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_VALUE);
|
||||
|
||||
// Open file
|
||||
$fileHandle = fopen($pFilename, 'w');
|
||||
if ($fileHandle === FALSE) {
|
||||
if ($fileHandle === false) {
|
||||
throw new PHPExcel_Writer_Exception("Could not open file $pFilename for writing.");
|
||||
}
|
||||
|
||||
// Set PDF
|
||||
$this->_isPdf = TRUE;
|
||||
$this->_isPdf = true;
|
||||
// Build CSS
|
||||
$this->buildCSS(TRUE);
|
||||
$this->buildCSS(true);
|
||||
|
||||
return $fileHandle;
|
||||
}
|
||||
@ -358,7 +350,6 @@ abstract class PHPExcel_Writer_PDF_Core extends PHPExcel_Writer_HTML
|
||||
// Close file
|
||||
fclose($fileHandle);
|
||||
|
||||
PHPExcel_Calculation::setArrayReturnType($this->_saveArrayReturnType);
|
||||
PHPExcel_Calculation::setArrayReturnType($this->saveArrayReturnType);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,15 @@
|
||||
<?php
|
||||
|
||||
/** Require DomPDF library */
|
||||
$pdfRendererClassFile = PHPExcel_Settings::getPdfRendererPath() . '/dompdf_config.inc.php';
|
||||
if (file_exists($pdfRendererClassFile)) {
|
||||
require_once $pdfRendererClassFile;
|
||||
} else {
|
||||
throw new PHPExcel_Writer_Exception('Unable to load PDF Rendering library');
|
||||
}
|
||||
|
||||
/**
|
||||
* PHPExcel
|
||||
* PHPExcel_Writer_PDF_DomPDF
|
||||
*
|
||||
* Copyright (c) 2006 - 2015 PHPExcel
|
||||
*
|
||||
@ -24,23 +33,6 @@
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
|
||||
/** Require DomPDF library */
|
||||
$pdfRendererClassFile = PHPExcel_Settings::getPdfRendererPath() . '/dompdf_config.inc.php';
|
||||
if (file_exists($pdfRendererClassFile)) {
|
||||
require_once $pdfRendererClassFile;
|
||||
} else {
|
||||
throw new PHPExcel_Writer_Exception('Unable to load PDF Rendering library');
|
||||
}
|
||||
|
||||
/**
|
||||
* PHPExcel_Writer_PDF_DomPDF
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_Writer_PDF
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Writer_PDF_DomPDF extends PHPExcel_Writer_PDF_Core implements PHPExcel_Writer_IWriter
|
||||
{
|
||||
/**
|
||||
@ -59,7 +51,7 @@ class PHPExcel_Writer_PDF_DomPDF extends PHPExcel_Writer_PDF_Core implements PHP
|
||||
* @param string $pFilename Name of the file to save as
|
||||
* @throws PHPExcel_Writer_Exception
|
||||
*/
|
||||
public function save($pFilename = NULL)
|
||||
public function save($pFilename = null)
|
||||
{
|
||||
$fileHandle = parent::prepareForSave($pFilename);
|
||||
|
||||
@ -69,20 +61,15 @@ class PHPExcel_Writer_PDF_DomPDF extends PHPExcel_Writer_PDF_Core implements PHP
|
||||
// Check for paper size and page orientation
|
||||
if (is_null($this->getSheetIndex())) {
|
||||
$orientation = ($this->_phpExcel->getSheet(0)->getPageSetup()->getOrientation()
|
||||
== PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE)
|
||||
? 'L'
|
||||
: 'P';
|
||||
== PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P';
|
||||
$printPaperSize = $this->_phpExcel->getSheet(0)->getPageSetup()->getPaperSize();
|
||||
$printMargins = $this->_phpExcel->getSheet(0)->getPageMargins();
|
||||
} else {
|
||||
$orientation = ($this->_phpExcel->getSheet($this->getSheetIndex())->getPageSetup()->getOrientation()
|
||||
== PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE)
|
||||
? 'L'
|
||||
: 'P';
|
||||
== PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P';
|
||||
$printPaperSize = $this->_phpExcel->getSheet($this->getSheetIndex())->getPageSetup()->getPaperSize();
|
||||
$printMargins = $this->_phpExcel->getSheet($this->getSheetIndex())->getPageMargins();
|
||||
}
|
||||
|
||||
|
||||
$orientation = ($orientation == 'L') ? 'landscape' : 'portrait';
|
||||
|
||||
@ -97,8 +84,8 @@ class PHPExcel_Writer_PDF_DomPDF extends PHPExcel_Writer_PDF_Core implements PHP
|
||||
$printPaperSize = $this->getPaperSize();
|
||||
}
|
||||
|
||||
if (isset(self::$_paperSizes[$printPaperSize])) {
|
||||
$paperSize = self::$_paperSizes[$printPaperSize];
|
||||
if (isset(self::$paperSizes[$printPaperSize])) {
|
||||
$paperSize = self::$paperSizes[$printPaperSize];
|
||||
}
|
||||
|
||||
|
||||
@ -107,7 +94,7 @@ class PHPExcel_Writer_PDF_DomPDF extends PHPExcel_Writer_PDF_Core implements PHP
|
||||
$pdf->set_paper(strtolower($paperSize), $orientation);
|
||||
|
||||
$pdf->load_html(
|
||||
$this->generateHTMLHeader(FALSE) .
|
||||
$this->generateHTMLHeader(false) .
|
||||
$this->generateSheetData() .
|
||||
$this->generateHTMLFooter()
|
||||
);
|
||||
@ -116,7 +103,6 @@ class PHPExcel_Writer_PDF_DomPDF extends PHPExcel_Writer_PDF_Core implements PHP
|
||||
// Write to file
|
||||
fwrite($fileHandle, $pdf->output());
|
||||
|
||||
parent::restoreStateAfterSave($fileHandle);
|
||||
parent::restoreStateAfterSave($fileHandle);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,15 @@
|
||||
<?php
|
||||
|
||||
/** Require mPDF library */
|
||||
$pdfRendererClassFile = PHPExcel_Settings::getPdfRendererPath() . '/mpdf.php';
|
||||
if (file_exists($pdfRendererClassFile)) {
|
||||
require_once $pdfRendererClassFile;
|
||||
} else {
|
||||
throw new PHPExcel_Writer_Exception('Unable to load PDF Rendering library');
|
||||
}
|
||||
|
||||
/**
|
||||
* PHPExcel
|
||||
* PHPExcel_Writer_PDF_mPDF
|
||||
*
|
||||
* Copyright (c) 2006 - 2015 PHPExcel
|
||||
*
|
||||
@ -24,23 +33,6 @@
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
|
||||
/** Require mPDF library */
|
||||
$pdfRendererClassFile = PHPExcel_Settings::getPdfRendererPath() . '/mpdf.php';
|
||||
if (file_exists($pdfRendererClassFile)) {
|
||||
require_once $pdfRendererClassFile;
|
||||
} else {
|
||||
throw new PHPExcel_Writer_Exception('Unable to load PDF Rendering library');
|
||||
}
|
||||
|
||||
/**
|
||||
* PHPExcel_Writer_PDF_mPDF
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_Writer_PDF
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Writer_PDF_mPDF extends PHPExcel_Writer_PDF_Core implements PHPExcel_Writer_IWriter
|
||||
{
|
||||
/**
|
||||
@ -59,7 +51,7 @@ class PHPExcel_Writer_PDF_mPDF extends PHPExcel_Writer_PDF_Core implements PHPEx
|
||||
* @param string $pFilename Name of the file to save as
|
||||
* @throws PHPExcel_Writer_Exception
|
||||
*/
|
||||
public function save($pFilename = NULL)
|
||||
public function save($pFilename = null)
|
||||
{
|
||||
$fileHandle = parent::prepareForSave($pFilename);
|
||||
|
||||
@ -69,16 +61,12 @@ class PHPExcel_Writer_PDF_mPDF extends PHPExcel_Writer_PDF_Core implements PHPEx
|
||||
// Check for paper size and page orientation
|
||||
if (is_null($this->getSheetIndex())) {
|
||||
$orientation = ($this->_phpExcel->getSheet(0)->getPageSetup()->getOrientation()
|
||||
== PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE)
|
||||
? 'L'
|
||||
: 'P';
|
||||
== PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P';
|
||||
$printPaperSize = $this->_phpExcel->getSheet(0)->getPageSetup()->getPaperSize();
|
||||
$printMargins = $this->_phpExcel->getSheet(0)->getPageMargins();
|
||||
} else {
|
||||
$orientation = ($this->_phpExcel->getSheet($this->getSheetIndex())->getPageSetup()->getOrientation()
|
||||
== PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE)
|
||||
? 'L'
|
||||
: 'P';
|
||||
== PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P';
|
||||
$printPaperSize = $this->_phpExcel->getSheet($this->getSheetIndex())->getPageSetup()->getPaperSize();
|
||||
$printMargins = $this->_phpExcel->getSheet($this->getSheetIndex())->getPageMargins();
|
||||
}
|
||||
@ -97,10 +85,11 @@ class PHPExcel_Writer_PDF_mPDF extends PHPExcel_Writer_PDF_Core implements PHPEx
|
||||
$printPaperSize = $this->getPaperSize();
|
||||
}
|
||||
|
||||
if (isset(self::$_paperSizes[$printPaperSize])) {
|
||||
$paperSize = self::$_paperSizes[$printPaperSize];
|
||||
if (isset(self::$paperSizes[$printPaperSize])) {
|
||||
$paperSize = self::$paperSizes[$printPaperSize];
|
||||
}
|
||||
|
||||
|
||||
// Create PDF
|
||||
$pdf = new mpdf();
|
||||
$ortmp = $orientation;
|
||||
@ -116,7 +105,7 @@ class PHPExcel_Writer_PDF_mPDF extends PHPExcel_Writer_PDF_Core implements PHPEx
|
||||
$pdf->SetCreator($this->_phpExcel->getProperties()->getCreator());
|
||||
|
||||
$pdf->WriteHTML(
|
||||
$this->generateHTMLHeader(FALSE) .
|
||||
$this->generateHTMLHeader(false) .
|
||||
$this->generateSheetData() .
|
||||
$this->generateHTMLFooter()
|
||||
);
|
||||
@ -124,7 +113,6 @@ class PHPExcel_Writer_PDF_mPDF extends PHPExcel_Writer_PDF_Core implements PHPEx
|
||||
// Write to file
|
||||
fwrite($fileHandle, $pdf->Output('', 'S'));
|
||||
|
||||
parent::restoreStateAfterSave($fileHandle);
|
||||
parent::restoreStateAfterSave($fileHandle);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,16 @@
|
||||
<?php
|
||||
|
||||
/** Require tcPDF library */
|
||||
$pdfRendererClassFile = PHPExcel_Settings::getPdfRendererPath() . '/tcpdf.php';
|
||||
if (file_exists($pdfRendererClassFile)) {
|
||||
$k_path_url = PHPExcel_Settings::getPdfRendererPath();
|
||||
require_once $pdfRendererClassFile;
|
||||
} else {
|
||||
throw new PHPExcel_Writer_Exception('Unable to load PDF Rendering library');
|
||||
}
|
||||
|
||||
/**
|
||||
* PHPExcel
|
||||
* PHPExcel_Writer_PDF_tcPDF
|
||||
*
|
||||
* Copyright (c) 2006 - 2015 PHPExcel
|
||||
*
|
||||
@ -24,24 +34,6 @@
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
|
||||
/** Require tcPDF library */
|
||||
$pdfRendererClassFile = PHPExcel_Settings::getPdfRendererPath() . '/tcpdf.php';
|
||||
if (file_exists($pdfRendererClassFile)) {
|
||||
$k_path_url = PHPExcel_Settings::getPdfRendererPath();
|
||||
require_once $pdfRendererClassFile;
|
||||
} else {
|
||||
throw new PHPExcel_Writer_Exception('Unable to load PDF Rendering library');
|
||||
}
|
||||
|
||||
/**
|
||||
* PHPExcel_Writer_PDF_tcPDF
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_Writer_PDF
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Writer_PDF_tcPDF extends PHPExcel_Writer_PDF_Core implements PHPExcel_Writer_IWriter
|
||||
{
|
||||
/**
|
||||
@ -60,7 +52,7 @@ class PHPExcel_Writer_PDF_tcPDF extends PHPExcel_Writer_PDF_Core implements PHPE
|
||||
* @param string $pFilename Name of the file to save as
|
||||
* @throws PHPExcel_Writer_Exception
|
||||
*/
|
||||
public function save($pFilename = NULL)
|
||||
public function save($pFilename = null)
|
||||
{
|
||||
$fileHandle = parent::prepareForSave($pFilename);
|
||||
|
||||
@ -70,16 +62,12 @@ class PHPExcel_Writer_PDF_tcPDF extends PHPExcel_Writer_PDF_Core implements PHPE
|
||||
// Check for paper size and page orientation
|
||||
if (is_null($this->getSheetIndex())) {
|
||||
$orientation = ($this->_phpExcel->getSheet(0)->getPageSetup()->getOrientation()
|
||||
== PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE)
|
||||
? 'L'
|
||||
: 'P';
|
||||
== PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P';
|
||||
$printPaperSize = $this->_phpExcel->getSheet(0)->getPageSetup()->getPaperSize();
|
||||
$printMargins = $this->_phpExcel->getSheet(0)->getPageMargins();
|
||||
} else {
|
||||
$orientation = ($this->_phpExcel->getSheet($this->getSheetIndex())->getPageSetup()->getOrientation()
|
||||
== PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE)
|
||||
? 'L'
|
||||
: 'P';
|
||||
== PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P';
|
||||
$printPaperSize = $this->_phpExcel->getSheet($this->getSheetIndex())->getPageSetup()->getPaperSize();
|
||||
$printMargins = $this->_phpExcel->getSheet($this->getSheetIndex())->getPageMargins();
|
||||
}
|
||||
@ -95,27 +83,27 @@ class PHPExcel_Writer_PDF_tcPDF extends PHPExcel_Writer_PDF_Core implements PHPE
|
||||
$printPaperSize = $this->getPaperSize();
|
||||
}
|
||||
|
||||
if (isset(self::$_paperSizes[$printPaperSize])) {
|
||||
$paperSize = self::$_paperSizes[$printPaperSize];
|
||||
if (isset(self::$paperSizes[$printPaperSize])) {
|
||||
$paperSize = self::$paperSizes[$printPaperSize];
|
||||
}
|
||||
|
||||
|
||||
// Create PDF
|
||||
$pdf = new TCPDF($orientation, 'pt', $paperSize);
|
||||
$pdf->setFontSubsetting(FALSE);
|
||||
$pdf->setFontSubsetting(false);
|
||||
// Set margins, converting inches to points (using 72 dpi)
|
||||
$pdf->SetMargins($printMargins->getLeft() * 72, $printMargins->getTop() * 72, $printMargins->getRight() * 72);
|
||||
$pdf->SetAutoPageBreak(TRUE, $printMargins->getBottom() * 72);
|
||||
$pdf->SetAutoPageBreak(true, $printMargins->getBottom() * 72);
|
||||
|
||||
$pdf->setPrintHeader(FALSE);
|
||||
$pdf->setPrintFooter(FALSE);
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
|
||||
$pdf->AddPage();
|
||||
|
||||
// Set the appropriate font
|
||||
$pdf->SetFont($this->getFont());
|
||||
$pdf->writeHTML(
|
||||
$this->generateHTMLHeader(FALSE) .
|
||||
$this->generateHTMLHeader(false) .
|
||||
$this->generateSheetData() .
|
||||
$this->generateHTMLFooter()
|
||||
);
|
||||
@ -130,7 +118,6 @@ class PHPExcel_Writer_PDF_tcPDF extends PHPExcel_Writer_PDF_Core implements PHPE
|
||||
// Write to file
|
||||
fwrite($fileHandle, $pdf->output($pFilename, 'S'));
|
||||
|
||||
parent::restoreStateAfterSave($fileHandle);
|
||||
parent::restoreStateAfterSave($fileHandle);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user