diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/CachedObjectStorage/Memcache.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/CachedObjectStorage/Memcache.php index f1fc43c4..cf6c6719 100644 --- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/CachedObjectStorage/Memcache.php +++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/CachedObjectStorage/Memcache.php @@ -186,7 +186,7 @@ public function __construct(PHPExcel_Worksheet $parent, $arguments) { // Set a new Memcache object and connect to the Memcache server $this->_memcache = new Memcache(); - if (!$this->_memcache->addServer($memcacheServer, $memcachePort, false, 50, 5, 5, true, array($this, 'failureCallback')) { + if (!$this->_memcache->addServer($memcacheServer, $memcachePort, false, 50, 5, 5, true, array($this, 'failureCallback'))) { throw new Exception('Could not connect to Memcache server at '.$memcacheServer.':'.$memcachePort); } $this->_cacheTime = $cacheTime; @@ -197,7 +197,7 @@ public function __construct(PHPExcel_Worksheet $parent, $arguments) { public function failureCallback($host, $port) { - throw new Exception('memcache '.$host.':'.$port' failed'); + throw new Exception('memcache '.$host.':'.$port.' failed'); } diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation.php index bdbca4c4..3371b4c3 100644 --- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation.php +++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation.php @@ -2022,7 +2022,7 @@ public static function _wrapResult($value) { */ public static function _unwrapResult($value) { if (is_string($value)) { - if ((strlen($value) > 0) && ($value{0} == '"') && (substr($value,-1) == '"')) { + if ((strlen($value) > 0) && ($value[0] == '"') && (substr($value,-1) == '"')) { return substr($value,1,-1); } // Convert numeric errors to NaN error @@ -2130,7 +2130,7 @@ public function parseFormula($formula) { // Basic validation that this is indeed a formula // We return an empty array if not $formula = trim($formula); - if ((strlen($formula) == 0) || ($formula{0} != '=')) return array(); + if ((strlen($formula) == 0) || ($formula[0] != '=')) return array(); $formula = trim(substr($formula,1)); $formulaLength = strlen($formula); if ($formulaLength < 1) return array(); @@ -2186,7 +2186,7 @@ public function _calculateFormulaValue($formula, $cellID=null, PHPExcel_Cell $pC // Basic validation that this is indeed a formula // We simply return the "cell value" (formula) if not $formula = trim($formula); - if ($formula{0} != '=') return self::_wrapResult($formula); + if ($formula[0] != '=') return self::_wrapResult($formula); $formula = trim(substr($formula,1)); $formulaLength = strlen($formula); if ($formulaLength < 1) return self::_wrapResult($formula); @@ -2479,7 +2479,7 @@ private static function _showTypeDetails($value) { case 'string' : if ($value == '') { return 'an empty string'; - } elseif ($value{0} == '#') { + } elseif ($value[0] == '#') { return 'a '.$value.' error'; } else { $typeString = 'a string'; @@ -2602,10 +2602,10 @@ private function _parseFormula($formula) { // Loop through the formula extracting each operator and operand in turn while(True) { // echo 'Assessing Expression '.substr($formula, $index).'
'; - $opCharacter = $formula{$index}; // Get the first character of the value at the current index position + $opCharacter = $formula[$index]; // Get the first character of the value at the current index position // echo 'Initial character of expression block is '.$opCharacter.'
'; - if ((in_array($opCharacter, $comparisonOperators)) && (strlen($formula) > $index) && (in_array($formula{$index+1}, $comparisonOperators))) { - $opCharacter .= $formula{++$index}; + if ((in_array($opCharacter, $comparisonOperators)) && (strlen($formula) > $index) && (in_array($formula[$index+1], $comparisonOperators))) { + $opCharacter .= $formula[++$index]; // echo 'Initial character of expression block is comparison operator '.$opCharacter.'
'; } @@ -2832,11 +2832,11 @@ private function _parseFormula($formula) { } } // Ignore white space - while (($formula{$index} == "\n") || ($formula{$index} == "\r")) { + while (($formula[$index] == "\n") || ($formula[$index] == "\r")) { ++$index; } - if ($formula{$index} == ' ') { - while ($formula{$index} == ' ') { + if ($formula[$index] == ' ') { + while ($formula[$index] == ' ') { ++$index; } // If we're expecting an operator, but only have a space between the previous and next operands (and both are @@ -3220,7 +3220,7 @@ private function _processTokenStack($tokens, $cellID = null, PHPExcel_Cell $pCel // echo 'Token is a PHPExcel constant: '.$excelConstant.'
'; $stack->push('Constant Value',self::$_ExcelConstants[$excelConstant]); $this->_writeDebug('Evaluating Constant '.$excelConstant.' as '.self::_showTypeDetails(self::$_ExcelConstants[$excelConstant])); - } elseif ((is_numeric($token)) || (is_bool($token)) || (is_null($token)) || ($token == '') || ($token{0} == '"') || ($token{0} == '#')) { + } elseif ((is_numeric($token)) || (is_bool($token)) || (is_null($token)) || ($token == '') || ($token[0] == '"') || ($token[0] == '#')) { // echo 'Token is a number, boolean, string, null or an Excel error
'; $stack->push('Value',$token); // if the token is a named range, push the named range name onto the stack @@ -3255,11 +3255,11 @@ private function _validateBinaryOperand($cellID,&$operand,&$stack) { if (is_string($operand)) { // We only need special validations for the operand if it is a string // Start by stripping off the quotation marks we use to identify true excel string values internally - if ($operand > '' && $operand{0} == '"') { $operand = self::_unwrapResult($operand); } + if ($operand > '' && $operand[0] == '"') { $operand = self::_unwrapResult($operand); } // If the string is a numeric value, we treat it as a numeric, so no further testing if (!is_numeric($operand)) { // If not a numeric, test to see if the value is an Excel error, and so can't be used in normal binary operations - if ($operand > '' && $operand{0} == '#') { + if ($operand > '' && $operand[0] == '#') { $stack->push('Value', $operand); $this->_writeDebug('Evaluation Result is '.self::_showTypeDetails($operand)); return false; @@ -3312,8 +3312,8 @@ private function _executeBinaryComparisonOperation($cellID,$operand1,$operand2,$ } // Simple validate the two operands if they are string values - if (is_string($operand1) && $operand1 > '' && $operand1{0} == '"') { $operand1 = self::_unwrapResult($operand1); } - if (is_string($operand2) && $operand2 > '' && $operand2{0} == '"') { $operand2 = self::_unwrapResult($operand2); } + if (is_string($operand1) && $operand1 > '' && $operand1[0] == '"') { $operand1 = self::_unwrapResult($operand1); } + if (is_string($operand2) && $operand2 > '' && $operand2[0] == '"') { $operand2 = self::_unwrapResult($operand2); } // execute the necessary operation switch ($operation) { diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation/FormulaParser.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation/FormulaParser.php index a1f0c923..1fb9c02e 100644 --- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation/FormulaParser.php +++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation/FormulaParser.php @@ -159,7 +159,7 @@ private function _parseToTokens() { // Check if the formula has a valid starting = $formulaLength = strlen($this->_formula); - if ($formulaLength < 2 || $this->_formula{0} != '=') return; + if ($formulaLength < 2 || $this->_formula[0] != '=') return; // Helper variables $tokens1 = $tokens2 = $stack = array(); @@ -179,8 +179,8 @@ private function _parseToTokens() { // embeds are doubled // end marks token if ($inString) { - if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) { - if ((($index + 2) <= $formulaLength) && ($this->_formula{$index + 1} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE)) { + if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) { + if ((($index + 2) <= $formulaLength) && ($this->_formula[$index + 1] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE)) { $value .= PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE; ++$index; } else { @@ -189,7 +189,7 @@ private function _parseToTokens() { $value = ""; } } else { - $value .= $this->_formula{$index}; + $value .= $this->_formula[$index]; } ++$index; continue; @@ -199,15 +199,15 @@ private function _parseToTokens() { // embeds are double // end does not mark a token if ($inPath) { - if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) { - if ((($index + 2) <= $formulaLength) && ($this->_formula{$index + 1} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE)) { + if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) { + if ((($index + 2) <= $formulaLength) && ($this->_formula[$index + 1] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE)) { $value .= PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE; ++$index; } else { $inPath = false; } } else { - $value .= $this->_formula{$index}; + $value .= $this->_formula[$index]; } ++$index; continue; @@ -217,10 +217,10 @@ private function _parseToTokens() { // no embeds (changed to "()" by Excel) // end does not mark a token if ($inRange) { - if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::BRACKET_CLOSE) { + if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::BRACKET_CLOSE) { $inRange = false; } - $value .= $this->_formula{$index}; + $value .= $this->_formula[$index]; ++$index; continue; } @@ -228,7 +228,7 @@ private function _parseToTokens() { // error values // end marks a token, determined from absolute list of values if ($inError) { - $value .= $this->_formula{$index}; + $value .= $this->_formula[$index]; ++$index; if (in_array($value, $ERRORS)) { $inError = false; @@ -239,10 +239,10 @@ private function _parseToTokens() { } // scientific notation check - if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_SN, $this->_formula{$index}) !== false) { + if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_SN, $this->_formula[$index]) !== false) { if (strlen($value) > 1) { - if (preg_match("/^[1-9]{1}(\.[0-9]+)?E{1}$/", $this->_formula{$index}) != 0) { - $value .= $this->_formula{$index}; + if (preg_match("/^[1-9]{1}(\.[0-9]+)?E{1}$/", $this->_formula[$index]) != 0) { + $value .= $this->_formula[$index]; ++$index; continue; } @@ -252,7 +252,7 @@ private function _parseToTokens() { // independent character evaluation (order not important) // establish state-dependent character evaluations - if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) { + if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) { if (strlen($value > 0)) { // unexpected $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN); $value = ""; @@ -262,7 +262,7 @@ private function _parseToTokens() { continue; } - if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) { + if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) { if (strlen($value) > 0) { // unexpected $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN); $value = ""; @@ -272,14 +272,14 @@ private function _parseToTokens() { continue; } - if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::BRACKET_OPEN) { + if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::BRACKET_OPEN) { $inRange = true; $value .= PHPExcel_Calculation_FormulaParser::BRACKET_OPEN; ++$index; continue; } - if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::ERROR_START) { + if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::ERROR_START) { if (strlen($value) > 0) { // unexpected $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN); $value = ""; @@ -291,7 +291,7 @@ private function _parseToTokens() { } // mark start and end of arrays and array rows - if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::BRACE_OPEN) { + if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::BRACE_OPEN) { if (strlen($value) > 0) { // unexpected $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN); $value = ""; @@ -309,7 +309,7 @@ private function _parseToTokens() { continue; } - if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::SEMICOLON) { + if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::SEMICOLON) { if (strlen($value) > 0) { $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); $value = ""; @@ -331,7 +331,7 @@ private function _parseToTokens() { continue; } - if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::BRACE_CLOSE) { + if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::BRACE_CLOSE) { if (strlen($value) > 0) { $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); $value = ""; @@ -352,14 +352,14 @@ private function _parseToTokens() { } // trim white-space - if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::WHITESPACE) { + if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::WHITESPACE) { if (strlen($value) > 0) { $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); $value = ""; } $tokens1[] = new PHPExcel_Calculation_FormulaToken("", PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_WHITESPACE); ++$index; - while (($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::WHITESPACE) && ($index < $formulaLength)) { + while (($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::WHITESPACE) && ($index < $formulaLength)) { ++$index; } continue; @@ -379,29 +379,29 @@ private function _parseToTokens() { } // standard infix operators - if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_INFIX, $this->_formula{$index}) !== false) { + if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_INFIX, $this->_formula[$index]) !== false) { if (strlen($value) > 0) { $tokens1[] =new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); $value = ""; } - $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->_formula{$index}, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX); + $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->_formula[$index], PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX); ++$index; continue; } // standard postfix operators (only one) - if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_POSTFIX, $this->_formula{$index}) !== false) { + if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_POSTFIX, $this->_formula[$index]) !== false) { if (strlen($value) > 0) { $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); $value = ""; } - $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->_formula{$index}, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX); + $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->_formula[$index], PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX); ++$index; continue; } // start subexpression or function - if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::PAREN_OPEN) { + if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::PAREN_OPEN) { if (strlen($value) > 0) { $tmp = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_FUNCTION, PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_START); $tokens1[] = $tmp; @@ -417,7 +417,7 @@ private function _parseToTokens() { } // function, subexpression, or array parameters, or operand unions - if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::COMMA) { + if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::COMMA) { if (strlen($value) > 0) { $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); $value = ""; @@ -438,7 +438,7 @@ private function _parseToTokens() { } // stop subexpression - if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::PAREN_CLOSE) { + if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::PAREN_CLOSE) { if (strlen($value) > 0) { $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); $value = ""; @@ -454,7 +454,7 @@ private function _parseToTokens() { } // token accumulation - $value .= $this->_formula{$index}; + $value .= $this->_formula[$index]; ++$index; } diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation/Functions.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation/Functions.php index abecdb47..9e5a8b56 100644 --- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation/Functions.php +++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation/Functions.php @@ -596,7 +596,7 @@ public static function HYPERLINK($linkURL = '', $displayName = null, PHPExcel_Ce * ATAN2 * * This function calculates the arc tangent of the two variables x and y. It is similar to - * calculating the arc tangent of y ÷ x, except that the signs of both arguments are used + * calculating the arc tangent of y � x, except that the signs of both arguments are used * to determine the quadrant of the result. * The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and a * point with coordinates (xCoordinate, yCoordinate). The angle is given in radians between @@ -1027,7 +1027,7 @@ public static function MAXA() { private static function _ifCondition($condition) { $condition = self::flattenSingleValue($condition); - if (!in_array($condition{0},array('>', '<', '='))) { + if (!in_array($condition[0],array('>', '<', '='))) { if (!is_numeric($condition)) { $condition = PHPExcel_Calculation::_wrapResult(strtoupper($condition)); } return '='.$condition; } else { @@ -5111,19 +5111,19 @@ public static function CHARACTER($character) { private static function _uniord($c) { - if (ord($c{0}) >=0 && ord($c{0}) <= 127) - return ord($c{0}); - if (ord($c{0}) >= 192 && ord($c{0}) <= 223) - return (ord($c{0})-192)*64 + (ord($c{1})-128); - if (ord($c{0}) >= 224 && ord($c{0}) <= 239) - return (ord($c{0})-224)*4096 + (ord($c{1})-128)*64 + (ord($c{2})-128); - if (ord($c{0}) >= 240 && ord($c{0}) <= 247) - return (ord($c{0})-240)*262144 + (ord($c{1})-128)*4096 + (ord($c{2})-128)*64 + (ord($c{3})-128); - if (ord($c{0}) >= 248 && ord($c{0}) <= 251) - return (ord($c{0})-248)*16777216 + (ord($c{1})-128)*262144 + (ord($c{2})-128)*4096 + (ord($c{3})-128)*64 + (ord($c{4})-128); - if (ord($c{0}) >= 252 && ord($c{0}) <= 253) - return (ord($c{0})-252)*1073741824 + (ord($c{1})-128)*16777216 + (ord($c{2})-128)*262144 + (ord($c{3})-128)*4096 + (ord($c{4})-128)*64 + (ord($c{5})-128); - if (ord($c{0}) >= 254 && ord($c{0}) <= 255) //error + if (ord($c[0]) >=0 && ord($c[0]) <= 127) + return ord($c[0]); + if (ord($c[0]) >= 192 && ord($c[0]) <= 223) + return (ord($c[0])-192)*64 + (ord($c[1])-128); + if (ord($c[0]) >= 224 && ord($c[0]) <= 239) + return (ord($c[0])-224)*4096 + (ord($c[1])-128)*64 + (ord($c[2])-128); + if (ord($c[0]) >= 240 && ord($c[0]) <= 247) + return (ord($c[0])-240)*262144 + (ord($c[1])-128)*4096 + (ord($c[2])-128)*64 + (ord($c[3])-128); + if (ord($c[0]) >= 248 && ord($c[0]) <= 251) + return (ord($c[0])-248)*16777216 + (ord($c[1])-128)*262144 + (ord($c[2])-128)*4096 + (ord($c[3])-128)*64 + (ord($c[4])-128); + if (ord($c[0]) >= 252 && ord($c[0]) <= 253) + return (ord($c[0])-252)*1073741824 + (ord($c[1])-128)*16777216 + (ord($c[2])-128)*262144 + (ord($c[3])-128)*4096 + (ord($c[4])-128)*64 + (ord($c[5])-128); + if (ord($c[0]) >= 254 && ord($c[0]) <= 255) //error return self::$_errorCodes['value']; return 0; } // function _uniord() @@ -7241,7 +7241,7 @@ public static function _parseComplex($complexNumber) { // Split the input into its Real and Imaginary components $leadingSign = 0; if (strlen($workString) > 0) { - $leadingSign = (($workString{0} == '+') || ($workString{0} == '-')) ? 1 : 0; + $leadingSign = (($workString[0] == '+') || ($workString[0] == '-')) ? 1 : 0; } $power = ''; $realNumber = strtok($workString, '+-'); @@ -7276,10 +7276,10 @@ public static function _parseComplex($complexNumber) { private static function _cleanComplex($complexNumber) { - if ($complexNumber{0} == '+') $complexNumber = substr($complexNumber,1); - if ($complexNumber{0} == '0') $complexNumber = substr($complexNumber,1); - if ($complexNumber{0} == '.') $complexNumber = '0'.$complexNumber; - if ($complexNumber{0} == '+') $complexNumber = substr($complexNumber,1); + if ($complexNumber[0] == '+') $complexNumber = substr($complexNumber,1); + if ($complexNumber[0] == '0') $complexNumber = substr($complexNumber,1); + if ($complexNumber[0] == '.') $complexNumber = '0'.$complexNumber; + if ($complexNumber[0] == '+') $complexNumber = substr($complexNumber,1); return $complexNumber; } @@ -11337,7 +11337,7 @@ public static function N($value) { break; case 'string' : // Errors - if ((strlen($value) > 0) && ($value{0} == '#')) { + if ((strlen($value) > 0) && ($value[0] == '#')) { return $value; } break; @@ -11392,7 +11392,7 @@ public static function TYPE($value) { break; case 'string' : // Errors - if ((strlen($value) > 0) && ($value{0} == '#')) { + if ((strlen($value) > 0) && ($value[0] == '#')) { return 16; } return 2; diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Cell.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Cell.php index fdc36ffa..265264eb 100644 --- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Cell.php +++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Cell.php @@ -662,11 +662,11 @@ public static function columnIndexFromString($pString = 'A') $strLen = strlen($pString); // Convert column to integer if ($strLen == 1) { - return (ord($pString{0}) - 64); + return (ord($pString[0]) - 64); } elseif ($strLen == 2) { - return $result = ((1 + (ord($pString{0}) - 65)) * 26) + (ord($pString{1}) - 64); + return $result = ((1 + (ord($pString[0]) - 65)) * 26) + (ord($pString[1]) - 64); } elseif ($strLen == 3) { - return ((1 + (ord($pString{0}) - 65)) * 676) + ((1 + (ord($pString{1}) - 65)) * 26) + (ord($pString{2}) - 64); + return ((1 + (ord($pString[0]) - 65)) * 676) + ((1 + (ord($pString[1]) - 65)) * 26) + (ord($pString[2]) - 64); } else { throw new Exception("Column string index can not be " . ($strLen != 0 ? "longer than 3 characters" : "empty") . "."); } diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Cell/DefaultValueBinder.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Cell/DefaultValueBinder.php index 6b3e22e1..8f008aaf 100644 --- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Cell/DefaultValueBinder.php +++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Cell/DefaultValueBinder.php @@ -73,7 +73,7 @@ public static function dataTypeForValue($pValue = null) { } elseif ($pValue instanceof PHPExcel_RichText) { return PHPExcel_Cell_DataType::TYPE_STRING; - } elseif ($pValue{0} === '=' && strlen($pValue) > 1) { + } elseif ($pValue[0] === '=' && strlen($pValue) > 1) { return PHPExcel_Cell_DataType::TYPE_FORMULA; } elseif (is_bool($pValue)) { diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel2003XML.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel2003XML.php index 346996aa..40f30662 100644 --- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel2003XML.php +++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel2003XML.php @@ -618,12 +618,12 @@ public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel) // Empty R reference is the current row if ($rowReference == '') $rowReference = $rowID; // Bracketed R references are relative to the current row - if ($rowReference{0} == '[') $rowReference = $rowID + trim($rowReference,'[]'); + if ($rowReference[0] == '[') $rowReference = $rowID + trim($rowReference,'[]'); $columnReference = $cellReference[4][0]; // Empty C reference is the current column if ($columnReference == '') $columnReference = $columnNumber; // Bracketed C references are relative to the current column - if ($columnReference{0} == '[') $columnReference = $columnNumber + trim($columnReference,'[]'); + if ($columnReference[0] == '[') $columnReference = $columnNumber + trim($columnReference,'[]'); $A1CellReference = PHPExcel_Cell::stringFromColumnIndex($columnReference-1).$rowReference; $value = substr_replace($value,$A1CellReference,$cellReference[0][1],strlen($cellReference[0][0])); } diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel5.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel5.php index a4f20e7a..e8ee5e2d 100644 --- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel5.php +++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel5.php @@ -1174,7 +1174,7 @@ private function _readDateMode() // offset: 0; size: 2; 0 = base 1900, 1 = base 1904 PHPExcel_Shared_Date::setExcelCalendar(PHPExcel_Shared_Date::CALENDAR_WINDOWS_1900); - if (ord($recordData{0}) == 1) { + if (ord($recordData[0]) == 1) { PHPExcel_Shared_Date::setExcelCalendar(PHPExcel_Shared_Date::CALENDAR_MAC_1904); } } @@ -1232,7 +1232,7 @@ private function _readFont() } // offset: 10; size: 1; underline type - $underlineType = ord($recordData{10}); + $underlineType = ord($recordData[10]); switch ($underlineType) { case 0x00: break; // no underline @@ -1369,7 +1369,7 @@ private function _readXf() // offset: 6; size: 1; Alignment and text break // bit 2-0, mask 0x07; horizontal alignment - $horAlign = (0x07 & ord($recordData{6})) >> 0; + $horAlign = (0x07 & ord($recordData[6])) >> 0; switch ($horAlign) { case 0: $objStyle->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_GENERAL); @@ -1391,7 +1391,7 @@ private function _readXf() break; } // bit 3, mask 0x08; wrap text - $wrapText = (0x08 & ord($recordData{6})) >> 3; + $wrapText = (0x08 & ord($recordData[6])) >> 3; switch ($wrapText) { case 0: $objStyle->getAlignment()->setWrapText(false); @@ -1401,7 +1401,7 @@ private function _readXf() break; } // bit 6-4, mask 0x70; vertical alignment - $vertAlign = (0x70 & ord($recordData{6})) >> 4; + $vertAlign = (0x70 & ord($recordData[6])) >> 4; switch ($vertAlign) { case 0: $objStyle->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_TOP); @@ -1419,7 +1419,7 @@ private function _readXf() if ($this->_version == self::XLS_BIFF8) { // offset: 7; size: 1; XF_ROTATION: Text rotation angle - $angle = ord($recordData{7}); + $angle = ord($recordData[7]); $rotation = 0; if ($angle <= 90) { $rotation = $angle; @@ -1432,11 +1432,11 @@ private function _readXf() // offset: 8; size: 1; Indentation, shrink to cell size, and text direction // bit: 3-0; mask: 0x0F; indent level - $indent = (0x0F & ord($recordData{8})) >> 0; + $indent = (0x0F & ord($recordData[8])) >> 0; $objStyle->getAlignment()->setIndent($indent); // bit: 4; mask: 0x10; 1 = shrink content to fit into cell - $shrinkToFit = (0x10 & ord($recordData{8})) >> 4; + $shrinkToFit = (0x10 & ord($recordData[8])) >> 4; switch ($shrinkToFit) { case 0: $objStyle->getAlignment()->setShrinkToFit(false); @@ -1518,7 +1518,7 @@ private function _readXf() // BIFF5 // offset: 7; size: 1; Text orientation and flags - $orientationAndFlags = ord($recordData{7}); + $orientationAndFlags = ord($recordData[7]); // bit: 1-0; mask: 0x03; XF_ORIENTATION: Text orientation $xfOrientation = (0x03 & $orientationAndFlags) >> 0; @@ -1641,7 +1641,7 @@ private function _readXfExt() $xclrValue = substr($extData, 4, 4); // color value (value based on color type) if ($xclfType == 2) { - $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2})); + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); // modify the relevant style property if ( isset($this->_mapCellXfIndex[$ixfe]) ) { @@ -1657,7 +1657,7 @@ private function _readXfExt() $xclrValue = substr($extData, 4, 4); // color value (value based on color type) if ($xclfType == 2) { - $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2})); + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); // modify the relevant style property if ( isset($this->_mapCellXfIndex[$ixfe]) ) { @@ -1673,7 +1673,7 @@ private function _readXfExt() $xclrValue = substr($extData, 4, 4); // color value (value based on color type) if ($xclfType == 2) { - $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2})); + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); // modify the relevant style property if ( isset($this->_mapCellXfIndex[$ixfe]) ) { @@ -1689,7 +1689,7 @@ private function _readXfExt() $xclrValue = substr($extData, 4, 4); // color value (value based on color type) if ($xclfType == 2) { - $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2})); + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); // modify the relevant style property if ( isset($this->_mapCellXfIndex[$ixfe]) ) { @@ -1705,7 +1705,7 @@ private function _readXfExt() $xclrValue = substr($extData, 4, 4); // color value (value based on color type) if ($xclfType == 2) { - $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2})); + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); // modify the relevant style property if ( isset($this->_mapCellXfIndex[$ixfe]) ) { @@ -1721,7 +1721,7 @@ private function _readXfExt() $xclrValue = substr($extData, 4, 4); // color value (value based on color type) if ($xclfType == 2) { - $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2})); + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); // modify the relevant style property if ( isset($this->_mapCellXfIndex[$ixfe]) ) { @@ -1737,7 +1737,7 @@ private function _readXfExt() $xclrValue = substr($extData, 4, 4); // color value (value based on color type) if ($xclfType == 2) { - $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2})); + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); // modify the relevant style property if ( isset($this->_mapCellXfIndex[$ixfe]) ) { @@ -1753,7 +1753,7 @@ private function _readXfExt() $xclrValue = substr($extData, 4, 4); // color value (value based on color type) if ($xclfType == 2) { - $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2})); + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); // modify the relevant style property if ( isset($this->_mapCellXfIndex[$ixfe]) ) { @@ -1794,7 +1794,7 @@ private function _readStyle() if ($isBuiltIn) { // offset: 2; size: 1; identifier for built-in style - $builtInId = ord($recordData{2}); + $builtInId = ord($recordData[2]); switch ($builtInId) { case 0x00: @@ -1858,7 +1858,7 @@ private function _readSheet() $rec_offset = $this->_GetInt4d($recordData, 0); // offset: 4; size: 1; sheet state - switch (ord($recordData{4})) { + switch (ord($recordData[4])) { case 0x00: $sheetState = PHPExcel_Worksheet::SHEETSTATE_VISIBLE; break; case 0x01: $sheetState = PHPExcel_Worksheet::SHEETSTATE_HIDDEN; break; case 0x02: $sheetState = PHPExcel_Worksheet::SHEETSTATE_VERYHIDDEN; break; @@ -1866,7 +1866,7 @@ private function _readSheet() } // offset: 5; size: 1; sheet type - $sheetType = ord($recordData{5}); + $sheetType = ord($recordData[5]); // offset: 6; size: var; sheet name if ($this->_version == self::XLS_BIFF8) { @@ -2041,7 +2041,7 @@ private function _readDefinedName() // offset: 2; size: 1; keyboard shortcut // offset: 3; size: 1; length of the name (character count) - $nlen = ord($recordData{3}); + $nlen = ord($recordData[3]); // offset: 4; size: 2; size of the formula data (it can happen that this is zero) // note: there can also be additional data, this is not included in $flen @@ -2123,7 +2123,7 @@ private function _readSst() $pos += 2; // option flags - $optionFlags = ord($recordData{$pos}); + $optionFlags = ord($recordData[$pos]); ++$pos; // bit: 0; mask: 0x01; 0 = compressed; 1 = uncompressed @@ -2192,7 +2192,7 @@ private function _readSst() // repeated option flags // OpenOffice.org documentation 5.21 - $option = ord($recordData{$pos}); + $option = ord($recordData[$pos]); ++$pos; if ($isCompressed && ($option == 0)) { @@ -2216,7 +2216,7 @@ private function _readSst() // this fragment compressed $len = min($charsLeft, $limitpos - $pos); for ($j = 0; $j < $len; ++$j) { - $retstr .= $recordData{$pos + $j} . chr(0); + $retstr .= $recordData[$pos + $j] . chr(0); } $charsLeft -= $len; $isCompressed = false; @@ -3088,7 +3088,7 @@ private function _readFormula() // We can apparently not rely on $isPartOfSharedFormula. Even when $isPartOfSharedFormula = true // the formula data may be ordinary formula data, therefore we need to check // explicitly for the tExp token (0x01) - $isPartOfSharedFormula = $isPartOfSharedFormula && ord($formulaStructure{2}) == 0x01; + $isPartOfSharedFormula = $isPartOfSharedFormula && ord($formulaStructure[2]) == 0x01; if ($isPartOfSharedFormula) { // part of shared formula which means there will be a formula with a tExp token and nothing else @@ -3112,9 +3112,9 @@ private function _readFormula() $xfIndex = $this->_GetInt2d($recordData, 4); // offset: 6; size: 8; result of the formula - if ( (ord($recordData{6}) == 0) - && (ord($recordData{12}) == 255) - && (ord($recordData{13}) == 255) ) { + if ( (ord($recordData[6]) == 0) + && (ord($recordData[12]) == 255) + && (ord($recordData[13]) == 255) ) { // String formula. Result follows in appended STRING record $dataType = PHPExcel_Cell_DataType::TYPE_STRING; @@ -3128,25 +3128,25 @@ private function _readFormula() // read STRING record $value = $this->_readString(); - } elseif ((ord($recordData{6}) == 1) - && (ord($recordData{12}) == 255) - && (ord($recordData{13}) == 255)) { + } elseif ((ord($recordData[6]) == 1) + && (ord($recordData[12]) == 255) + && (ord($recordData[13]) == 255)) { // Boolean formula. Result is in +2; 0=false, 1=true $dataType = PHPExcel_Cell_DataType::TYPE_BOOL; - $value = (bool) ord($recordData{8}); + $value = (bool) ord($recordData[8]); - } elseif ((ord($recordData{6}) == 2) - && (ord($recordData{12}) == 255) - && (ord($recordData{13}) == 255)) { + } elseif ((ord($recordData[6]) == 2) + && (ord($recordData[12]) == 255) + && (ord($recordData[13]) == 255)) { // Error formula. Error code is in +2 $dataType = PHPExcel_Cell_DataType::TYPE_ERROR; - $value = $this->_mapErrorCode(ord($recordData{8})); + $value = $this->_mapErrorCode(ord($recordData[8])); - } elseif ((ord($recordData{6}) == 3) - && (ord($recordData{12}) == 255) - && (ord($recordData{13}) == 255)) { + } elseif ((ord($recordData[6]) == 3) + && (ord($recordData[12]) == 255) + && (ord($recordData[13]) == 255)) { // Formula result is a null string $dataType = PHPExcel_Cell_DataType::TYPE_NULL; @@ -3213,7 +3213,7 @@ private function _readSharedFmla() // offset: 6, size: 1; not used // offset: 7, size: 1; number of existing FORMULA records for this shared formula - $no = ord($recordData{7}); + $no = ord($recordData[7]); // offset: 8, size: var; Binary token array of the shared formula $formula = substr($recordData, 8); @@ -3278,10 +3278,10 @@ private function _readBoolErr() $xfIndex = $this->_GetInt2d($recordData, 4); // offset: 6; size: 1; the boolean value or error value - $boolErr = ord($recordData{6}); + $boolErr = ord($recordData[6]); // offset: 7; size: 1; 0=boolean; 1=error - $isError = ord($recordData{7}); + $isError = ord($recordData[7]); $cell = $this->_phpSheet->getCell($columnString . ($row + 1)); switch ($isError) { @@ -3564,7 +3564,7 @@ private function _readSelection() if (!$this->_readDataOnly) { // offset: 0; size: 1; pane identifier - $paneId = ord($recordData{0}); + $paneId = ord($recordData[0]); // offset: 1; size: 2; index to row of the active cell $r = $this->_GetInt2d($recordData, 1); @@ -3691,9 +3691,9 @@ private function _readHyperLink() $hyperlinkType = 'UNC'; } else if (!$isFileLinkOrUrl) { $hyperlinkType = 'workbook'; - } else if (ord($recordData{$offset}) == 0x03) { + } else if (ord($recordData[$offset]) == 0x03) { $hyperlinkType = 'local'; - } else if (ord($recordData{$offset}) == 0xE0) { + } else if (ord($recordData[$offset]) == 0xE0) { $hyperlinkType = 'URL'; } @@ -5216,10 +5216,10 @@ private function _readBIFF5CellRangeAddressFixed($subData) $lr = $this->_GetInt2d($subData, 2) + 1; // offset: 4; size: 1; index to first column - $fc = ord($subData{4}); + $fc = ord($subData[4]); // offset: 5; size: 1; index to last column - $lc = ord($subData{5}); + $lc = ord($subData[5]); // check values if ($fr > $lr || $fc > $lc) { @@ -5617,13 +5617,13 @@ private function _readBIFF8Constant($valueData) private function _readRGB($rgb) { // offset: 0; size 1; Red component - $r = ord($rgb{0}); + $r = ord($rgb[0]); // offset: 1; size: 1; Green component - $g = ord($rgb{1}); + $g = ord($rgb[1]); // offset: 2; size: 1; Blue component - $b = ord($rgb{2}); + $b = ord($rgb[2]); // HEX notation, e.g. 'FF00FC' $rgb = sprintf('%02X', $r) . sprintf('%02X', $g) . sprintf('%02X', $b); diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel5/Escher.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel5/Escher.php index d89f2054..9c70a3bb 100644 --- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel5/Escher.php +++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel5/Escher.php @@ -251,16 +251,16 @@ private function _readBSE() $foDelay = $this->_GetInt4d($recordData, 28); // offset: 32; size: 1; unused1 - $unused1 = ord($recordData{32}); + $unused1 = ord($recordData[32]); // offset: 33; size: 1; size of nameData in bytes (including null terminator) - $cbName = ord($recordData{33}); + $cbName = ord($recordData[33]); // offset: 34; size: 1; unused2 - $unused2 = ord($recordData{34}); + $unused2 = ord($recordData[34]); // offset: 35; size: 1; unused3 - $unused3 = ord($recordData{35}); + $unused3 = ord($recordData[35]); // offset: 36; size: $cbName; nameData $nameData = substr($recordData, 36, $cbName); @@ -302,7 +302,7 @@ private function _readBlipJPEG() } // offset: var; size: 1; tag - $tag = ord($recordData{$pos}); + $tag = ord($recordData[$pos]); $pos += 1; // offset: var; size: var; the raw image data @@ -343,7 +343,7 @@ private function _readBlipPNG() } // offset: var; size: 1; tag - $tag = ord($recordData{$pos}); + $tag = ord($recordData[$pos]); $pos += 1; // offset: var; size: var; the raw image data diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/SYLK.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/SYLK.php index c97f88ae..3e20caf3 100644 --- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/SYLK.php +++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/SYLK.php @@ -256,7 +256,7 @@ public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel) if ($dataType == 'P') { $formatArray = array(); foreach($rowData as $rowDatum) { - switch($rowDatum{0}) { + switch($rowDatum[0]) { case 'P' : $formatArray['numberformat']['code'] = str_replace($fromFormats,$toFormats,substr($rowDatum,1)); break; case 'E' : @@ -266,7 +266,7 @@ public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel) break; case 'S' : $styleSettings = substr($rowDatum,1); for ($i=0;$i. -// +// // See LICENSE.TXT file for more information. // ---------------------------------------------------------------------------- // -// Description : PHP class to creates array representations for +// Description : PHP class to creates array representations for // common 1D barcodes to be used with TCPDF. // // Author: Nicola Asuni @@ -60,15 +60,15 @@ * @license http://www.gnu.org/copyleft/lesser.html LGPL */ class TCPDFBarcode { - + /** * @var array representation of barcode. * @access protected */ protected $barcode_array; - + /** - * This is the class constructor. + * This is the class constructor. * Return an array representations for common 1D barcodes: