Merge branch 'psr2' into develop
This commit is contained in:
commit
547d495247
|
@ -2407,7 +2407,7 @@ class PHPExcel_Calculation
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static function _translateSeparator($fromSeparator, $toSeparator, $formula, &$inBraces)
|
public static function translateSeparator($fromSeparator, $toSeparator, $formula, &$inBraces)
|
||||||
{
|
{
|
||||||
$strlen = mb_strlen($formula);
|
$strlen = mb_strlen($formula);
|
||||||
for ($i = 0; $i < $strlen; ++$i) {
|
for ($i = 0; $i < $strlen; ++$i) {
|
||||||
|
@ -2428,7 +2428,7 @@ class PHPExcel_Calculation
|
||||||
return $formula;
|
return $formula;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function _translateFormula($from, $to, $formula, $fromSeparator, $toSeparator)
|
private static function translateFormula($from, $to, $formula, $fromSeparator, $toSeparator)
|
||||||
{
|
{
|
||||||
// Convert any Excel function names to the required language
|
// Convert any Excel function names to the required language
|
||||||
if (self::$localeLanguage !== 'en_us') {
|
if (self::$localeLanguage !== 'en_us') {
|
||||||
|
@ -2443,7 +2443,7 @@ class PHPExcel_Calculation
|
||||||
// Only count/replace in alternating array entries
|
// Only count/replace in alternating array entries
|
||||||
if ($i = !$i) {
|
if ($i = !$i) {
|
||||||
$value = preg_replace($from, $to, $value);
|
$value = preg_replace($from, $to, $value);
|
||||||
$value = self::_translateSeparator($fromSeparator, $toSeparator, $value, $inBraces);
|
$value = self::translateSeparator($fromSeparator, $toSeparator, $value, $inBraces);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($value);
|
unset($value);
|
||||||
|
@ -2452,7 +2452,7 @@ class PHPExcel_Calculation
|
||||||
} else {
|
} else {
|
||||||
// If there's no quoted strings, then we do a simple count/replace
|
// If there's no quoted strings, then we do a simple count/replace
|
||||||
$formula = preg_replace($from, $to, $formula);
|
$formula = preg_replace($from, $to, $formula);
|
||||||
$formula = self::_translateSeparator($fromSeparator, $toSeparator, $formula, $inBraces);
|
$formula = self::translateSeparator($fromSeparator, $toSeparator, $formula, $inBraces);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2485,7 +2485,7 @@ class PHPExcel_Calculation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::_translateFormula(self::$functionReplaceFromExcel, self::$functionReplaceToLocale, $formula, ',', self::$localeArgumentSeparator);
|
return self::translateFormula(self::$functionReplaceFromExcel, self::$functionReplaceToLocale, $formula, ',', self::$localeArgumentSeparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2514,7 +2514,7 @@ class PHPExcel_Calculation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::_translateFormula(self::$functionReplaceFromLocale, self::$functionReplaceToExcel, $formula, self::$localeArgumentSeparator, ',');
|
return self::translateFormula(self::$functionReplaceFromLocale, self::$functionReplaceToExcel, $formula, self::$localeArgumentSeparator, ',');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3503,7 +3503,7 @@ class PHPExcel_Calculation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static function _dataTestReference(&$operandData)
|
private static function dataTestReference(&$operandData)
|
||||||
{
|
{
|
||||||
$operand = $operandData['value'];
|
$operand = $operandData['value'];
|
||||||
if (($operandData['reference'] === null) && (is_array($operand))) {
|
if (($operandData['reference'] === null) && (is_array($operand))) {
|
||||||
|
@ -3548,8 +3548,8 @@ class PHPExcel_Calculation
|
||||||
return $this->raiseFormulaError('Internal error - Operand value missing from stack');
|
return $this->raiseFormulaError('Internal error - Operand value missing from stack');
|
||||||
}
|
}
|
||||||
|
|
||||||
$operand1 = self::_dataTestReference($operand1Data);
|
$operand1 = self::dataTestReference($operand1Data);
|
||||||
$operand2 = self::_dataTestReference($operand2Data);
|
$operand2 = self::dataTestReference($operand2Data);
|
||||||
|
|
||||||
// Log what we're doing
|
// Log what we're doing
|
||||||
if ($token == ':') {
|
if ($token == ':') {
|
||||||
|
|
|
@ -426,7 +426,13 @@ class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPEx
|
||||||
} else {
|
} else {
|
||||||
$expression = $this->expressions[$ExprID];
|
$expression = $this->expressions[$ExprID];
|
||||||
|
|
||||||
$cell = $this->referenceHelper->updateFormulaReferences($expression['formula'], 'A1', $cellAttributes->Col - $expression['column'], $cellAttributes->Row - $expression['row'], $worksheetName);
|
$cell = $this->referenceHelper->updateFormulaReferences(
|
||||||
|
$expression['formula'],
|
||||||
|
'A1',
|
||||||
|
$cellAttributes->Col - $expression['column'],
|
||||||
|
$cellAttributes->Row - $expression['row'],
|
||||||
|
$worksheetName
|
||||||
|
);
|
||||||
// echo 'SHARED EXPRESSION ', $ExprID,'<br />';
|
// echo 'SHARED EXPRESSION ', $ExprID,'<br />';
|
||||||
// echo 'New Value is ', $cell,'<br />';
|
// echo 'New Value is ', $cell,'<br />';
|
||||||
}
|
}
|
||||||
|
@ -441,8 +447,8 @@ class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPEx
|
||||||
$cell = ($cell == 'TRUE') ? true: false;
|
$cell = ($cell == 'TRUE') ? true: false;
|
||||||
break;
|
break;
|
||||||
case '30': // Integer
|
case '30': // Integer
|
||||||
// Excel 2007+ doesn't differentiate between integer and float, so set the value and dropthru to the next (numeric) case
|
|
||||||
$cell = intval($cell);
|
$cell = intval($cell);
|
||||||
|
// Excel 2007+ doesn't differentiate between integer and float, so set the value and dropthru to the next (numeric) case
|
||||||
case '40': // Float
|
case '40': // Float
|
||||||
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -179,31 +179,31 @@ class PHPExcel_Reader_HTML extends PHPExcel_Reader_Abstract implements PHPExcel_
|
||||||
}
|
}
|
||||||
|
|
||||||
// Data Array used for testing only, should write to PHPExcel object on completion of tests
|
// Data Array used for testing only, should write to PHPExcel object on completion of tests
|
||||||
protected $_dataArray = array();
|
protected $dataArray = array();
|
||||||
protected $_tableLevel = 0;
|
protected $tableLevel = 0;
|
||||||
protected $_nestedColumn = array('A');
|
protected $nestedColumn = array('A');
|
||||||
|
|
||||||
protected function setTableStartColumn($column)
|
protected function setTableStartColumn($column)
|
||||||
{
|
{
|
||||||
if ($this->_tableLevel == 0) {
|
if ($this->tableLevel == 0) {
|
||||||
$column = 'A';
|
$column = 'A';
|
||||||
}
|
}
|
||||||
++$this->_tableLevel;
|
++$this->tableLevel;
|
||||||
$this->_nestedColumn[$this->_tableLevel] = $column;
|
$this->nestedColumn[$this->tableLevel] = $column;
|
||||||
|
|
||||||
return $this->_nestedColumn[$this->_tableLevel];
|
return $this->nestedColumn[$this->tableLevel];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getTableStartColumn()
|
protected function getTableStartColumn()
|
||||||
{
|
{
|
||||||
return $this->_nestedColumn[$this->_tableLevel];
|
return $this->nestedColumn[$this->tableLevel];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function releaseTableStartColumn()
|
protected function releaseTableStartColumn()
|
||||||
{
|
{
|
||||||
--$this->_tableLevel;
|
--$this->tableLevel;
|
||||||
|
|
||||||
return array_pop($this->_nestedColumn);
|
return array_pop($this->nestedColumn);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function flushCell($sheet, $column, $row, &$cellContent)
|
protected function flushCell($sheet, $column, $row, &$cellContent)
|
||||||
|
@ -216,12 +216,12 @@ class PHPExcel_Reader_HTML extends PHPExcel_Reader_Abstract implements PHPExcel_
|
||||||
// Write to worksheet to be done here...
|
// Write to worksheet to be done here...
|
||||||
// ... we return the cell so we can mess about with styles more easily
|
// ... we return the cell so we can mess about with styles more easily
|
||||||
$sheet->setCellValue($column . $row, $cellContent, true);
|
$sheet->setCellValue($column . $row, $cellContent, true);
|
||||||
$this->_dataArray[$row][$column] = $cellContent;
|
$this->dataArray[$row][$column] = $cellContent;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// We have a Rich Text run
|
// We have a Rich Text run
|
||||||
// TODO
|
// TODO
|
||||||
$this->_dataArray[$row][$column] = 'RICH TEXT: ' . $cellContent;
|
$this->dataArray[$row][$column] = 'RICH TEXT: ' . $cellContent;
|
||||||
}
|
}
|
||||||
$cellContent = (string) '';
|
$cellContent = (string) '';
|
||||||
}
|
}
|
||||||
|
@ -291,8 +291,9 @@ class PHPExcel_Reader_HTML extends PHPExcel_Reader_Abstract implements PHPExcel_
|
||||||
$this->flushCell($sheet, $column, $row, $cellContent);
|
$this->flushCell($sheet, $column, $row, $cellContent);
|
||||||
}
|
}
|
||||||
++$row;
|
++$row;
|
||||||
|
// Add a break after a horizontal rule, simply by allowing the code to dropthru
|
||||||
case 'br':
|
case 'br':
|
||||||
if ($this->_tableLevel > 0) {
|
if ($this->tableLevel > 0) {
|
||||||
// If we're inside a table, replace with a \n
|
// If we're inside a table, replace with a \n
|
||||||
$cellContent .= "\n";
|
$cellContent .= "\n";
|
||||||
} else {
|
} else {
|
||||||
|
@ -328,7 +329,7 @@ class PHPExcel_Reader_HTML extends PHPExcel_Reader_Abstract implements PHPExcel_
|
||||||
case 'ol':
|
case 'ol':
|
||||||
case 'ul':
|
case 'ul':
|
||||||
case 'p':
|
case 'p':
|
||||||
if ($this->_tableLevel > 0) {
|
if ($this->tableLevel > 0) {
|
||||||
// If we're inside a table, replace with a \n
|
// If we're inside a table, replace with a \n
|
||||||
$cellContent .= "\n";
|
$cellContent .= "\n";
|
||||||
// echo 'LIST ENTRY: ' , '<br />';
|
// echo 'LIST ENTRY: ' , '<br />';
|
||||||
|
@ -353,7 +354,7 @@ class PHPExcel_Reader_HTML extends PHPExcel_Reader_Abstract implements PHPExcel_
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'li':
|
case 'li':
|
||||||
if ($this->_tableLevel > 0) {
|
if ($this->tableLevel > 0) {
|
||||||
// If we're inside a table, replace with a \n
|
// If we're inside a table, replace with a \n
|
||||||
$cellContent .= "\n";
|
$cellContent .= "\n";
|
||||||
// echo 'LIST ENTRY: ' , '<br />';
|
// echo 'LIST ENTRY: ' , '<br />';
|
||||||
|
@ -374,14 +375,14 @@ class PHPExcel_Reader_HTML extends PHPExcel_Reader_Abstract implements PHPExcel_
|
||||||
case 'table':
|
case 'table':
|
||||||
$this->flushCell($sheet, $column, $row, $cellContent);
|
$this->flushCell($sheet, $column, $row, $cellContent);
|
||||||
$column = $this->setTableStartColumn($column);
|
$column = $this->setTableStartColumn($column);
|
||||||
// echo 'START OF TABLE LEVEL ' , $this->_tableLevel , '<br />';
|
// echo 'START OF TABLE LEVEL ' , $this->tableLevel , '<br />';
|
||||||
if ($this->_tableLevel > 1) {
|
if ($this->tableLevel > 1) {
|
||||||
--$row;
|
--$row;
|
||||||
}
|
}
|
||||||
$this->processDomElement($child, $sheet, $row, $column, $cellContent);
|
$this->processDomElement($child, $sheet, $row, $column, $cellContent);
|
||||||
// echo 'END OF TABLE LEVEL ' , $this->_tableLevel , '<br />';
|
// echo 'END OF TABLE LEVEL ' , $this->tableLevel , '<br />';
|
||||||
$column = $this->releaseTableStartColumn();
|
$column = $this->releaseTableStartColumn();
|
||||||
if ($this->_tableLevel > 1) {
|
if ($this->tableLevel > 1) {
|
||||||
++$column;
|
++$column;
|
||||||
} else {
|
} else {
|
||||||
++$row;
|
++$row;
|
||||||
|
@ -394,16 +395,16 @@ class PHPExcel_Reader_HTML extends PHPExcel_Reader_Abstract implements PHPExcel_
|
||||||
case 'tr':
|
case 'tr':
|
||||||
$column = $this->getTableStartColumn();
|
$column = $this->getTableStartColumn();
|
||||||
$cellContent = '';
|
$cellContent = '';
|
||||||
// echo 'START OF TABLE ' , $this->_tableLevel , ' ROW<br />';
|
// echo 'START OF TABLE ' , $this->tableLevel , ' ROW<br />';
|
||||||
$this->processDomElement($child, $sheet, $row, $column, $cellContent);
|
$this->processDomElement($child, $sheet, $row, $column, $cellContent);
|
||||||
++$row;
|
++$row;
|
||||||
// echo 'END OF TABLE ' , $this->_tableLevel , ' ROW<br />';
|
// echo 'END OF TABLE ' , $this->tableLevel , ' ROW<br />';
|
||||||
break;
|
break;
|
||||||
case 'th':
|
case 'th':
|
||||||
case 'td':
|
case 'td':
|
||||||
// echo 'START OF TABLE ' , $this->_tableLevel , ' CELL<br />';
|
// echo 'START OF TABLE ' , $this->tableLevel , ' CELL<br />';
|
||||||
$this->processDomElement($child, $sheet, $row, $column, $cellContent);
|
$this->processDomElement($child, $sheet, $row, $column, $cellContent);
|
||||||
// echo 'END OF TABLE ' , $this->_tableLevel , ' CELL<br />';
|
// echo 'END OF TABLE ' , $this->tableLevel , ' CELL<br />';
|
||||||
|
|
||||||
while (isset($this->rowspan[$column . $row])) {
|
while (isset($this->rowspan[$column . $row])) {
|
||||||
++$column;
|
++$column;
|
||||||
|
@ -453,7 +454,7 @@ class PHPExcel_Reader_HTML extends PHPExcel_Reader_Abstract implements PHPExcel_
|
||||||
$row = 1;
|
$row = 1;
|
||||||
$column = 'A';
|
$column = 'A';
|
||||||
$content = '';
|
$content = '';
|
||||||
$this->_tableLevel = 0;
|
$this->tableLevel = 0;
|
||||||
$this->processDomElement($child, $sheet, $row, $column, $cellContent);
|
$this->processDomElement($child, $sheet, $row, $column, $cellContent);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -619,7 +619,7 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
$value = preg_replace('/\[([^\.]+)\.([^\.]+)\]/Ui', '$1!$2', $value); // Cell reference in another sheet
|
$value = preg_replace('/\[([^\.]+)\.([^\.]+)\]/Ui', '$1!$2', $value); // Cell reference in another sheet
|
||||||
$value = preg_replace('/\[\.([^\.]+):\.([^\.]+)\]/Ui', '$1:$2', $value); // Cell range reference
|
$value = preg_replace('/\[\.([^\.]+):\.([^\.]+)\]/Ui', '$1:$2', $value); // Cell range reference
|
||||||
$value = preg_replace('/\[\.([^\.]+)\]/Ui', '$1', $value); // Simple cell reference
|
$value = preg_replace('/\[\.([^\.]+)\]/Ui', '$1', $value); // Simple cell reference
|
||||||
$value = PHPExcel_Calculation::_translateSeparator(';', ',', $value, $inBraces);
|
$value = PHPExcel_Calculation::translateSeparator(';', ',', $value, $inBraces);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($value);
|
unset($value);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel
|
* PHPExcel_Shared_File
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006 - 2015 PHPExcel
|
* Copyright (c) 2006 - 2015 PHPExcel
|
||||||
*
|
*
|
||||||
|
@ -24,15 +25,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_File
|
|
||||||
*
|
|
||||||
* @category PHPExcel
|
|
||||||
* @package PHPExcel_Shared
|
|
||||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
|
||||||
*/
|
|
||||||
class PHPExcel_Shared_File
|
class PHPExcel_Shared_File
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -41,7 +33,7 @@ class PHPExcel_Shared_File
|
||||||
* @protected
|
* @protected
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*/
|
*/
|
||||||
protected static $_useUploadTempDirectory = false;
|
protected static $useUploadTempDirectory = false;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,7 +43,7 @@ class PHPExcel_Shared_File
|
||||||
*/
|
*/
|
||||||
public static function setUseUploadTempDirectory($useUploadTempDir = false)
|
public static function setUseUploadTempDirectory($useUploadTempDir = false)
|
||||||
{
|
{
|
||||||
self::$_useUploadTempDirectory = (boolean) $useUploadTempDir;
|
self::$useUploadTempDirectory = (boolean) $useUploadTempDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,7 +54,7 @@ class PHPExcel_Shared_File
|
||||||
*/
|
*/
|
||||||
public static function getUseUploadTempDirectory()
|
public static function getUseUploadTempDirectory()
|
||||||
{
|
{
|
||||||
return self::$_useUploadTempDirectory;
|
return self::$useUploadTempDirectory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -138,7 +130,7 @@ class PHPExcel_Shared_File
|
||||||
*/
|
*/
|
||||||
public static function sys_get_temp_dir()
|
public static function sys_get_temp_dir()
|
||||||
{
|
{
|
||||||
if (self::$_useUploadTempDirectory) {
|
if (self::$useUploadTempDirectory) {
|
||||||
// use upload-directory when defined to allow running on environments having very restricted
|
// use upload-directory when defined to allow running on environments having very restricted
|
||||||
// open_basedir configs
|
// open_basedir configs
|
||||||
if (ini_get('upload_tmp_dir') !== false) {
|
if (ini_get('upload_tmp_dir') !== false) {
|
||||||
|
|
|
@ -111,7 +111,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
||||||
}
|
}
|
||||||
} // function __construct()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getArray
|
* getArray
|
||||||
|
@ -121,7 +121,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
public function getArray()
|
public function getArray()
|
||||||
{
|
{
|
||||||
return $this->A;
|
return $this->A;
|
||||||
} // function getArray()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getRowDimension
|
* getRowDimension
|
||||||
|
@ -131,7 +131,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
public function getRowDimension()
|
public function getRowDimension()
|
||||||
{
|
{
|
||||||
return $this->m;
|
return $this->m;
|
||||||
} // function getRowDimension()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getColumnDimension
|
* getColumnDimension
|
||||||
|
@ -141,7 +141,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
public function getColumnDimension()
|
public function getColumnDimension()
|
||||||
{
|
{
|
||||||
return $this->n;
|
return $this->n;
|
||||||
} // function getColumnDimension()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get
|
* get
|
||||||
|
@ -154,7 +154,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
public function get($i = null, $j = null)
|
public function get($i = null, $j = null)
|
||||||
{
|
{
|
||||||
return $this->A[$i][$j];
|
return $this->A[$i][$j];
|
||||||
} // function get()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getMatrix
|
* getMatrix
|
||||||
|
@ -306,7 +306,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
||||||
}
|
}
|
||||||
} // function getMatrix()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* checkMatrixDimensions
|
* checkMatrixDimensions
|
||||||
|
@ -354,7 +354,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
public function identity($m = null, $n = null)
|
public function identity($m = null, $n = null)
|
||||||
{
|
{
|
||||||
return $this->diagonal($m, $n, 1);
|
return $this->diagonal($m, $n, 1);
|
||||||
} // function identity()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* diagonal
|
* diagonal
|
||||||
|
@ -372,7 +372,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
$R->set($i, $i, $c);
|
$R->set($i, $i, $c);
|
||||||
}
|
}
|
||||||
return $R;
|
return $R;
|
||||||
} // function diagonal()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getMatrixByRow
|
* getMatrixByRow
|
||||||
|
@ -393,7 +393,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException);
|
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException);
|
||||||
}
|
}
|
||||||
} // function getMatrixByRow()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getMatrixByCol
|
* getMatrixByCol
|
||||||
|
@ -414,7 +414,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException);
|
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException);
|
||||||
}
|
}
|
||||||
} // function getMatrixByCol()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* transpose
|
* transpose
|
||||||
|
@ -447,7 +447,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
$s += $this->A[$i][$i];
|
$s += $this->A[$i][$i];
|
||||||
}
|
}
|
||||||
return $s;
|
return $s;
|
||||||
} // function trace()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* uminus
|
* uminus
|
||||||
|
@ -457,7 +457,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
*/
|
*/
|
||||||
public function uminus()
|
public function uminus()
|
||||||
{
|
{
|
||||||
} // function uminus()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* plus
|
* plus
|
||||||
|
@ -497,7 +497,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
||||||
}
|
}
|
||||||
} // function plus()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* plusEquals
|
* plusEquals
|
||||||
|
@ -551,7 +551,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
||||||
}
|
}
|
||||||
} // function plusEquals()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* minus
|
* minus
|
||||||
|
@ -591,7 +591,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
||||||
}
|
}
|
||||||
} // function minus()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* minusEquals
|
* minusEquals
|
||||||
|
@ -645,7 +645,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
||||||
}
|
}
|
||||||
} // function minusEquals()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* arrayTimes
|
* arrayTimes
|
||||||
|
@ -686,7 +686,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
||||||
}
|
}
|
||||||
} // function arrayTimes()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* arrayTimesEquals
|
* arrayTimesEquals
|
||||||
|
@ -741,7 +741,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
||||||
}
|
}
|
||||||
} // function arrayTimesEquals()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* arrayRightDivide
|
* arrayRightDivide
|
||||||
|
@ -801,7 +801,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
||||||
}
|
}
|
||||||
} // function arrayRightDivide()
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -843,7 +843,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
||||||
}
|
}
|
||||||
} // function arrayRightDivideEquals()
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -885,7 +885,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
||||||
}
|
}
|
||||||
} // function arrayLeftDivide()
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -927,7 +927,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
||||||
}
|
}
|
||||||
} // function arrayLeftDivideEquals()
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1023,7 +1023,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
||||||
}
|
}
|
||||||
} // function times()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* power
|
* power
|
||||||
|
@ -1077,7 +1077,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
||||||
}
|
}
|
||||||
} // function power()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* concat
|
* concat
|
||||||
|
@ -1116,7 +1116,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
|
||||||
}
|
}
|
||||||
} // function concat()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Solve A*X = B.
|
* Solve A*X = B.
|
||||||
|
@ -1133,7 +1133,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
$QR = new PHPExcel_Shared_JAMA_QRDecomposition($this);
|
$QR = new PHPExcel_Shared_JAMA_QRDecomposition($this);
|
||||||
return $QR->solve($B);
|
return $QR->solve($B);
|
||||||
}
|
}
|
||||||
} // function solve()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Matrix inverse or pseudoinverse.
|
* Matrix inverse or pseudoinverse.
|
||||||
|
@ -1143,7 +1143,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
public function inverse()
|
public function inverse()
|
||||||
{
|
{
|
||||||
return $this->solve($this->identity($this->m, $this->m));
|
return $this->solve($this->identity($this->m, $this->m));
|
||||||
} // function inverse()
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* det
|
* det
|
||||||
|
@ -1155,5 +1155,5 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
{
|
{
|
||||||
$L = new PHPExcel_Shared_JAMA_LUDecomposition($this);
|
$L = new PHPExcel_Shared_JAMA_LUDecomposition($this);
|
||||||
return $L->det();
|
return $L->det();
|
||||||
} // function det()
|
}
|
||||||
} // class PHPExcel_Shared_JAMA_Matrix
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ class PHPExcel_Shared_OLE_PPS_Root extends PHPExcel_Shared_OLE_PPS
|
||||||
* Directory for temporary files
|
* Directory for temporary files
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $_tmp_dir = null;
|
protected $tempDirectory = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param integer $time_1st A timestamp
|
* @param integer $time_1st A timestamp
|
||||||
|
@ -63,20 +63,20 @@ class PHPExcel_Shared_OLE_PPS_Root extends PHPExcel_Shared_OLE_PPS
|
||||||
// Initial Setting for saving
|
// Initial Setting for saving
|
||||||
$this->_BIG_BLOCK_SIZE = pow(
|
$this->_BIG_BLOCK_SIZE = pow(
|
||||||
2,
|
2,
|
||||||
(isset($this->_BIG_BLOCK_SIZE))? self::_adjust2($this->_BIG_BLOCK_SIZE) : 9
|
(isset($this->_BIG_BLOCK_SIZE))? self::adjust2($this->_BIG_BLOCK_SIZE) : 9
|
||||||
);
|
);
|
||||||
$this->_SMALL_BLOCK_SIZE= pow(
|
$this->_SMALL_BLOCK_SIZE= pow(
|
||||||
2,
|
2,
|
||||||
(isset($this->_SMALL_BLOCK_SIZE))? self::_adjust2($this->_SMALL_BLOCK_SIZE) : 6
|
(isset($this->_SMALL_BLOCK_SIZE))? self::adjust2($this->_SMALL_BLOCK_SIZE) : 6
|
||||||
);
|
);
|
||||||
|
|
||||||
if (is_resource($filename)) {
|
if (is_resource($filename)) {
|
||||||
$this->_FILEH_ = $filename;
|
$this->_FILEH_ = $filename;
|
||||||
} elseif ($filename == '-' || $filename == '') {
|
} elseif ($filename == '-' || $filename == '') {
|
||||||
if ($this->_tmp_dir === null) {
|
if ($this->tempDirectory === null) {
|
||||||
$this->_tmp_dir = PHPExcel_Shared_File::sys_get_temp_dir();
|
$this->tempDirectory = PHPExcel_Shared_File::sys_get_temp_dir();
|
||||||
}
|
}
|
||||||
$this->_tmp_filename = tempnam($this->_tmp_dir, "OLE_PPS_Root");
|
$this->_tmp_filename = tempnam($this->tempDirectory, "OLE_PPS_Root");
|
||||||
$this->_FILEH_ = fopen($this->_tmp_filename, "w+b");
|
$this->_FILEH_ = fopen($this->_tmp_filename, "w+b");
|
||||||
if ($this->_FILEH_ == false) {
|
if ($this->_FILEH_ == false) {
|
||||||
throw new PHPExcel_Writer_Exception("Can't create temporary file.");
|
throw new PHPExcel_Writer_Exception("Can't create temporary file.");
|
||||||
|
@ -158,7 +158,7 @@ class PHPExcel_Shared_OLE_PPS_Root extends PHPExcel_Shared_OLE_PPS
|
||||||
* @see save()
|
* @see save()
|
||||||
* @return integer
|
* @return integer
|
||||||
*/
|
*/
|
||||||
private static function _adjust2($i2)
|
private static function adjust2($i2)
|
||||||
{
|
{
|
||||||
$iWk = log($i2)/log(2);
|
$iWk = log($i2)/log(2);
|
||||||
return ($iWk > floor($iWk))? floor($iWk)+1:$iWk;
|
return ($iWk > floor($iWk))? floor($iWk)+1:$iWk;
|
||||||
|
|
|
@ -190,19 +190,19 @@ define('PCLZIP_CB_POST_DELETE', 78008);
|
||||||
class PclZip
|
class PclZip
|
||||||
{
|
{
|
||||||
// ----- Filename of the zip file
|
// ----- Filename of the zip file
|
||||||
var $zipname = '';
|
public $zipname = '';
|
||||||
|
|
||||||
// ----- File descriptor of the zip file
|
// ----- File descriptor of the zip file
|
||||||
var $zip_fd = 0;
|
public $zip_fd = 0;
|
||||||
|
|
||||||
// ----- Internal error handling
|
// ----- Internal error handling
|
||||||
var $error_code = 1;
|
public $error_code = 1;
|
||||||
var $error_string = '';
|
public $error_string = '';
|
||||||
|
|
||||||
// ----- Current status of the magic_quotes_runtime
|
// ----- Current status of the magic_quotes_runtime
|
||||||
// This value store the php configuration for magic_quotes
|
// This value store the php configuration for magic_quotes
|
||||||
// The class can then disable the magic_quotes and reset it after
|
// The class can then disable the magic_quotes and reset it after
|
||||||
var $magic_quotes_status;
|
public $magic_quotes_status;
|
||||||
|
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
// Function : PclZip()
|
// Function : PclZip()
|
||||||
|
@ -212,7 +212,7 @@ class PclZip
|
||||||
// Note that no real action is taken, if the archive does not exist it is not
|
// Note that no real action is taken, if the archive does not exist it is not
|
||||||
// created. Use create() for that.
|
// created. Use create() for that.
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function PclZip($p_zipname)
|
public function PclZip($p_zipname)
|
||||||
{
|
{
|
||||||
|
|
||||||
// ----- Tests the zlib
|
// ----- Tests the zlib
|
||||||
|
@ -267,7 +267,7 @@ class PclZip
|
||||||
// The list of the added files, with a status of the add action.
|
// The list of the added files, with a status of the add action.
|
||||||
// (see PclZip::listContent() for list entry format)
|
// (see PclZip::listContent() for list entry format)
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function create($p_filelist)
|
public function create($p_filelist)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -433,7 +433,7 @@ class PclZip
|
||||||
// The list of the added files, with a status of the add action.
|
// The list of the added files, with a status of the add action.
|
||||||
// (see PclZip::listContent() for list entry format)
|
// (see PclZip::listContent() for list entry format)
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function add($p_filelist)
|
public function add($p_filelist)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -607,7 +607,7 @@ class PclZip
|
||||||
// 0 on an unrecoverable failure,
|
// 0 on an unrecoverable failure,
|
||||||
// The list of the files in the archive.
|
// The list of the files in the archive.
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function listContent()
|
public function listContent()
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -663,7 +663,7 @@ class PclZip
|
||||||
// The list of the extracted files, with a status of the action.
|
// The list of the extracted files, with a status of the action.
|
||||||
// (see PclZip::listContent() for list entry format)
|
// (see PclZip::listContent() for list entry format)
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function extract()
|
public function extract()
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -814,7 +814,7 @@ class PclZip
|
||||||
// (see PclZip::listContent() for list entry format)
|
// (see PclZip::listContent() for list entry format)
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
//function extractByIndex($p_index, options...)
|
//function extractByIndex($p_index, options...)
|
||||||
function extractByIndex($p_index)
|
public function extractByIndex($p_index)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -957,7 +957,7 @@ class PclZip
|
||||||
// The list of the files which are still present in the archive.
|
// The list of the files which are still present in the archive.
|
||||||
// (see PclZip::listContent() for list entry format)
|
// (see PclZip::listContent() for list entry format)
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function delete()
|
public function delete()
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -1017,7 +1017,7 @@ class PclZip
|
||||||
// ***** Deprecated *****
|
// ***** Deprecated *****
|
||||||
// delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefered.
|
// delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefered.
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function deleteByIndex($p_index)
|
public function deleteByIndex($p_index)
|
||||||
{
|
{
|
||||||
|
|
||||||
$p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index);
|
$p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index);
|
||||||
|
@ -1041,7 +1041,7 @@ class PclZip
|
||||||
// 0 on failure,
|
// 0 on failure,
|
||||||
// An array with the archive properties.
|
// An array with the archive properties.
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function properties()
|
public function properties()
|
||||||
{
|
{
|
||||||
|
|
||||||
// ----- Reset the error handler
|
// ----- Reset the error handler
|
||||||
|
@ -1111,7 +1111,7 @@ class PclZip
|
||||||
// 1 on success.
|
// 1 on success.
|
||||||
// 0 or a negative value on error (error code).
|
// 0 or a negative value on error (error code).
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function duplicate($p_archive)
|
public function duplicate($p_archive)
|
||||||
{
|
{
|
||||||
$v_result = 1;
|
$v_result = 1;
|
||||||
|
|
||||||
|
@ -1160,7 +1160,7 @@ class PclZip
|
||||||
// 1 on success,
|
// 1 on success,
|
||||||
// 0 or negative values on error (see below).
|
// 0 or negative values on error (see below).
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function merge($p_archive_to_add)
|
public function merge($p_archive_to_add)
|
||||||
{
|
{
|
||||||
$v_result = 1;
|
$v_result = 1;
|
||||||
|
|
||||||
|
@ -1202,7 +1202,7 @@ class PclZip
|
||||||
// Description :
|
// Description :
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function errorCode()
|
public function errorCode()
|
||||||
{
|
{
|
||||||
if (PCLZIP_ERROR_EXTERNAL == 1) {
|
if (PCLZIP_ERROR_EXTERNAL == 1) {
|
||||||
return(PclErrorCode());
|
return(PclErrorCode());
|
||||||
|
@ -1217,7 +1217,7 @@ class PclZip
|
||||||
// Description :
|
// Description :
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function errorName($p_with_code = false)
|
public function errorName($p_with_code = false)
|
||||||
{
|
{
|
||||||
$v_name = array(
|
$v_name = array(
|
||||||
PCLZIP_ERR_NO_ERROR => 'PCLZIP_ERR_NO_ERROR',
|
PCLZIP_ERR_NO_ERROR => 'PCLZIP_ERR_NO_ERROR',
|
||||||
|
@ -1262,7 +1262,7 @@ class PclZip
|
||||||
// Description :
|
// Description :
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function errorInfo($p_full = false)
|
public function errorInfo($p_full = false)
|
||||||
{
|
{
|
||||||
if (PCLZIP_ERROR_EXTERNAL == 1) {
|
if (PCLZIP_ERROR_EXTERNAL == 1) {
|
||||||
return(PclErrorString());
|
return(PclErrorString());
|
||||||
|
@ -1299,7 +1299,7 @@ class PclZip
|
||||||
// true on success,
|
// true on success,
|
||||||
// false on error, the error code is set.
|
// false on error, the error code is set.
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privCheckFormat($p_level = 0)
|
public function privCheckFormat($p_level = 0)
|
||||||
{
|
{
|
||||||
$v_result = true;
|
$v_result = true;
|
||||||
|
|
||||||
|
@ -1352,7 +1352,7 @@ class PclZip
|
||||||
// 1 on success.
|
// 1 on success.
|
||||||
// 0 on failure.
|
// 0 on failure.
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options = false)
|
public function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options = false)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -1714,7 +1714,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privOptionDefaultThreshold(&$p_options)
|
public function privOptionDefaultThreshold(&$p_options)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -1759,7 +1759,7 @@ class PclZip
|
||||||
// 1 on success.
|
// 1 on success.
|
||||||
// 0 on failure.
|
// 0 on failure.
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options = false)
|
public function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options = false)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -1875,7 +1875,7 @@ class PclZip
|
||||||
// 1 on success.
|
// 1 on success.
|
||||||
// 0 on failure.
|
// 0 on failure.
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privFileDescrExpand(&$p_filedescr_list, &$p_options)
|
public function privFileDescrExpand(&$p_filedescr_list, &$p_options)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -1986,7 +1986,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privCreate($p_filedescr_list, &$p_result_list, &$p_options)
|
public function privCreate($p_filedescr_list, &$p_result_list, &$p_options)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
$v_list_detail = array();
|
$v_list_detail = array();
|
||||||
|
@ -2020,7 +2020,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privAdd($p_filedescr_list, &$p_result_list, &$p_options)
|
public function privAdd($p_filedescr_list, &$p_result_list, &$p_options)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
$v_list_detail = array();
|
$v_list_detail = array();
|
||||||
|
@ -2189,7 +2189,7 @@ class PclZip
|
||||||
// Description :
|
// Description :
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privOpenFd($p_mode)
|
public function privOpenFd($p_mode)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -2221,7 +2221,7 @@ class PclZip
|
||||||
// Description :
|
// Description :
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privCloseFd()
|
public function privCloseFd()
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -2248,8 +2248,8 @@ class PclZip
|
||||||
// $p_remove_dir : Path to remove in the filename path archived
|
// $p_remove_dir : Path to remove in the filename path archived
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
// function privAddList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
|
// public function privAddList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
|
||||||
function privAddList($p_filedescr_list, &$p_result_list, &$p_options)
|
public function privAddList($p_filedescr_list, &$p_result_list, &$p_options)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -2310,7 +2310,7 @@ class PclZip
|
||||||
// $p_result_list : list of added files with their properties (specially the status field)
|
// $p_result_list : list of added files with their properties (specially the status field)
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privAddFileList($p_filedescr_list, &$p_result_list, &$p_options)
|
public function privAddFileList($p_filedescr_list, &$p_result_list, &$p_options)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
$v_header = array();
|
$v_header = array();
|
||||||
|
@ -2362,7 +2362,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privAddFile($p_filedescr, &$p_header, &$p_options)
|
public function privAddFile($p_filedescr, &$p_header, &$p_options)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -2606,7 +2606,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options)
|
public function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options)
|
||||||
{
|
{
|
||||||
$v_result=PCLZIP_ERR_NO_ERROR;
|
$v_result=PCLZIP_ERR_NO_ERROR;
|
||||||
|
|
||||||
|
@ -2716,7 +2716,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privCalculateStoredFilename(&$p_filedescr, &$p_options)
|
public function privCalculateStoredFilename(&$p_filedescr, &$p_options)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -2814,7 +2814,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privWriteFileHeader(&$p_header)
|
public function privWriteFileHeader(&$p_header)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -2851,7 +2851,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privWriteCentralFileHeader(&$p_header)
|
public function privWriteCentralFileHeader(&$p_header)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -2893,7 +2893,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment)
|
public function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment)
|
||||||
{
|
{
|
||||||
$v_result = 1;
|
$v_result = 1;
|
||||||
|
|
||||||
|
@ -2919,7 +2919,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privList(&$p_list)
|
public function privList(&$p_list)
|
||||||
{
|
{
|
||||||
$v_result = 1;
|
$v_result = 1;
|
||||||
|
|
||||||
|
@ -3001,7 +3001,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privConvertHeader2FileInfo($p_header, &$p_info)
|
public function privConvertHeader2FileInfo($p_header, &$p_info)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -3040,7 +3040,7 @@ class PclZip
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// 1 on success,0 or less on error (see error code list)
|
// 1 on success,0 or less on error (see error code list)
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
|
public function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -3314,7 +3314,7 @@ class PclZip
|
||||||
// 1 : ... ?
|
// 1 : ... ?
|
||||||
// PCLZIP_ERR_USER_ABORTED(2) : User ask for extraction stop in callback
|
// PCLZIP_ERR_USER_ABORTED(2) : User ask for extraction stop in callback
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
|
public function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -3591,7 +3591,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privExtractFileUsingTempFile(&$p_entry, &$p_options)
|
public function privExtractFileUsingTempFile(&$p_entry, &$p_options)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -3664,7 +3664,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privExtractFileInOutput(&$p_entry, &$p_options)
|
public function privExtractFileInOutput(&$p_entry, &$p_options)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -3768,7 +3768,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privExtractFileAsString(&$p_entry, &$p_string, &$p_options)
|
public function privExtractFileAsString(&$p_entry, &$p_string, &$p_options)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -3877,7 +3877,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privReadFileHeader(&$p_header)
|
public function privReadFileHeader(&$p_header)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -3973,7 +3973,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privReadCentralFileHeader(&$p_header)
|
public function privReadCentralFileHeader(&$p_header)
|
||||||
{
|
{
|
||||||
$v_result = 1;
|
$v_result = 1;
|
||||||
|
|
||||||
|
@ -4078,7 +4078,7 @@ class PclZip
|
||||||
// 1 on success,
|
// 1 on success,
|
||||||
// 0 on error;
|
// 0 on error;
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privCheckFileHeaders(&$p_local_header, &$p_central_header)
|
public function privCheckFileHeaders(&$p_local_header, &$p_central_header)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -4115,7 +4115,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privReadEndCentralDir(&$p_central_dir)
|
public function privReadEndCentralDir(&$p_central_dir)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -4261,7 +4261,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privDeleteByRule(&$p_result_list, &$p_options)
|
public function privDeleteByRule(&$p_result_list, &$p_options)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
$v_list_detail = array();
|
$v_list_detail = array();
|
||||||
|
@ -4526,7 +4526,7 @@ class PclZip
|
||||||
// 1 : OK
|
// 1 : OK
|
||||||
// -1 : Unable to create directory
|
// -1 : Unable to create directory
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privDirCheck($p_dir, $p_is_dir = false)
|
public function privDirCheck($p_dir, $p_is_dir = false)
|
||||||
{
|
{
|
||||||
$v_result = 1;
|
$v_result = 1;
|
||||||
|
|
||||||
|
@ -4574,7 +4574,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privMerge(&$p_archive_to_add)
|
public function privMerge(&$p_archive_to_add)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -4745,7 +4745,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privDuplicate($p_archive_filename)
|
public function privDuplicate($p_archive_filename)
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -4800,7 +4800,7 @@ class PclZip
|
||||||
// Description :
|
// Description :
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privErrorLog($p_error_code = 0, $p_error_string = '')
|
public function privErrorLog($p_error_code = 0, $p_error_string = '')
|
||||||
{
|
{
|
||||||
if (PCLZIP_ERROR_EXTERNAL == 1) {
|
if (PCLZIP_ERROR_EXTERNAL == 1) {
|
||||||
PclError($p_error_code, $p_error_string);
|
PclError($p_error_code, $p_error_string);
|
||||||
|
@ -4816,7 +4816,7 @@ class PclZip
|
||||||
// Description :
|
// Description :
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privErrorReset()
|
public function privErrorReset()
|
||||||
{
|
{
|
||||||
if (PCLZIP_ERROR_EXTERNAL == 1) {
|
if (PCLZIP_ERROR_EXTERNAL == 1) {
|
||||||
PclErrorReset();
|
PclErrorReset();
|
||||||
|
@ -4833,7 +4833,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privDisableMagicQuotes()
|
public function privDisableMagicQuotes()
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
@ -4866,7 +4866,7 @@ class PclZip
|
||||||
// Parameters :
|
// Parameters :
|
||||||
// Return Values :
|
// Return Values :
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
function privSwapBackMagicQuotes()
|
public function privSwapBackMagicQuotes()
|
||||||
{
|
{
|
||||||
$v_result=1;
|
$v_result=1;
|
||||||
|
|
||||||
|
|
|
@ -416,7 +416,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
|
||||||
* @return string The valid string
|
* @return string The valid string
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private static function _checkSheetCodeName($pValue)
|
private static function checkSheetCodeName($pValue)
|
||||||
{
|
{
|
||||||
$CharCount = PHPExcel_Shared_String::CountCharacters($pValue);
|
$CharCount = PHPExcel_Shared_String::CountCharacters($pValue);
|
||||||
if ($CharCount == 0) {
|
if ($CharCount == 0) {
|
||||||
|
@ -444,7 +444,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
|
||||||
* @return string The valid string
|
* @return string The valid string
|
||||||
* @throws PHPExcel_Exception
|
* @throws PHPExcel_Exception
|
||||||
*/
|
*/
|
||||||
private static function _checkSheetTitle($pValue)
|
private static function checkSheetTitle($pValue)
|
||||||
{
|
{
|
||||||
// Some of the printable ASCII characters are invalid: * : / \ ? [ ]
|
// Some of the printable ASCII characters are invalid: * : / \ ? [ ]
|
||||||
if (str_replace(self::$invalidCharacters, '', $pValue) !== $pValue) {
|
if (str_replace(self::$invalidCharacters, '', $pValue) !== $pValue) {
|
||||||
|
@ -825,7 +825,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
|
||||||
}
|
}
|
||||||
|
|
||||||
// Syntax check
|
// Syntax check
|
||||||
self::_checkSheetTitle($pValue);
|
self::checkSheetTitle($pValue);
|
||||||
|
|
||||||
// Old title
|
// Old title
|
||||||
$oldTitle = $this->getTitle();
|
$oldTitle = $this->getTitle();
|
||||||
|
@ -1173,7 +1173,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create new cell object
|
// Create new cell object
|
||||||
return $this->_createNewCell($pCoordinate);
|
return $this->createNewCell($pCoordinate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1192,7 +1192,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
|
||||||
return $this->cellCollection->getCacheData($coordinate);
|
return $this->cellCollection->getCacheData($coordinate);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->_createNewCell($coordinate);
|
return $this->createNewCell($coordinate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1201,7 +1201,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
|
||||||
* @param string $pCoordinate Coordinate of the cell
|
* @param string $pCoordinate Coordinate of the cell
|
||||||
* @return PHPExcel_Cell Cell that was created
|
* @return PHPExcel_Cell Cell that was created
|
||||||
*/
|
*/
|
||||||
private function _createNewCell($pCoordinate)
|
private function createNewCell($pCoordinate)
|
||||||
{
|
{
|
||||||
$cell = $this->cellCollection->addCacheData(
|
$cell = $this->cellCollection->addCacheData(
|
||||||
$pCoordinate,
|
$pCoordinate,
|
||||||
|
@ -2906,7 +2906,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
|
||||||
$pValue = str_replace(' ', '_', $pValue);//Excel does this automatically without flinching, we are doing the same
|
$pValue = str_replace(' ', '_', $pValue);//Excel does this automatically without flinching, we are doing the same
|
||||||
// Syntax check
|
// Syntax check
|
||||||
// throw an exception if not valid
|
// throw an exception if not valid
|
||||||
self::_checkSheetCodeName($pValue);
|
self::checkSheetCodeName($pValue);
|
||||||
|
|
||||||
// We use the same code that setTitle to find a valid codeName else not using a space (Excel don't like) but a '_'
|
// We use the same code that setTitle to find a valid codeName else not using a space (Excel don't like) but a '_'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue