remove curly brace array access
This commit is contained in:
parent
28158dd29a
commit
cae4acf5b2
@ -250,16 +250,16 @@ class PHPExcel_Reader_Excel5_Escher
|
|||||||
$foDelay = PHPExcel_Reader_Excel5::_GetInt4d($recordData, 28);
|
$foDelay = PHPExcel_Reader_Excel5::_GetInt4d($recordData, 28);
|
||||||
|
|
||||||
// offset: 32; size: 1; unused1
|
// 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)
|
// 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
|
// offset: 34; size: 1; unused2
|
||||||
$unused2 = ord($recordData{34});
|
$unused2 = ord($recordData[34]);
|
||||||
|
|
||||||
// offset: 35; size: 1; unused3
|
// offset: 35; size: 1; unused3
|
||||||
$unused3 = ord($recordData{35});
|
$unused3 = ord($recordData[35]);
|
||||||
|
|
||||||
// offset: 36; size: $cbName; nameData
|
// offset: 36; size: $cbName; nameData
|
||||||
$nameData = substr($recordData, 36, $cbName);
|
$nameData = substr($recordData, 36, $cbName);
|
||||||
@ -301,7 +301,7 @@ class PHPExcel_Reader_Excel5_Escher
|
|||||||
}
|
}
|
||||||
|
|
||||||
// offset: var; size: 1; tag
|
// offset: var; size: 1; tag
|
||||||
$tag = ord($recordData{$pos});
|
$tag = ord($recordData[$pos]);
|
||||||
$pos += 1;
|
$pos += 1;
|
||||||
|
|
||||||
// offset: var; size: var; the raw image data
|
// offset: var; size: var; the raw image data
|
||||||
@ -342,7 +342,7 @@ class PHPExcel_Reader_Excel5_Escher
|
|||||||
}
|
}
|
||||||
|
|
||||||
// offset: var; size: 1; tag
|
// offset: var; size: 1; tag
|
||||||
$tag = ord($recordData{$pos});
|
$tag = ord($recordData[$pos]);
|
||||||
$pos += 1;
|
$pos += 1;
|
||||||
|
|
||||||
// offset: var; size: var; the raw image data
|
// offset: var; size: var; the raw image data
|
||||||
|
@ -287,7 +287,7 @@ class PHPExcel_Shared_OLE
|
|||||||
$pps = new PHPExcel_Shared_OLE_PPS_File($name);
|
$pps = new PHPExcel_Shared_OLE_PPS_File($name);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
fseek($fh, 1, SEEK_CUR);
|
fseek($fh, 1, SEEK_CUR);
|
||||||
$pps->Type = $type;
|
$pps->Type = $type;
|
||||||
@ -447,7 +447,7 @@ class PHPExcel_Shared_OLE
|
|||||||
{
|
{
|
||||||
$rawname = '';
|
$rawname = '';
|
||||||
for ($i = 0; $i < strlen($ascii); ++$i) {
|
for ($i = 0; $i < strlen($ascii); ++$i) {
|
||||||
$rawname .= $ascii{$i} . "\x00";
|
$rawname .= $ascii[$i] . "\x00";
|
||||||
}
|
}
|
||||||
return $rawname;
|
return $rawname;
|
||||||
}
|
}
|
||||||
|
@ -1021,7 +1021,7 @@ class PHPExcel_Writer_Excel5_Parser
|
|||||||
$col = 0;
|
$col = 0;
|
||||||
$col_ref_length = strlen($col_ref);
|
$col_ref_length = strlen($col_ref);
|
||||||
for ($i = 0; $i < $col_ref_length; ++$i) {
|
for ($i = 0; $i < $col_ref_length; ++$i) {
|
||||||
$col += (ord($col_ref{$i}) - 64) * pow(26, $expn);
|
$col += (ord($col_ref[$i]) - 64) * pow(26, $expn);
|
||||||
--$expn;
|
--$expn;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1043,21 +1043,21 @@ class PHPExcel_Writer_Excel5_Parser
|
|||||||
$formula_length = strlen($this->_formula);
|
$formula_length = strlen($this->_formula);
|
||||||
// eat up white spaces
|
// eat up white spaces
|
||||||
if ($i < $formula_length) {
|
if ($i < $formula_length) {
|
||||||
while ($this->_formula{$i} == " ") {
|
while ($this->_formula[$i] == " ") {
|
||||||
++$i;
|
++$i;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($i < ($formula_length - 1)) {
|
if ($i < ($formula_length - 1)) {
|
||||||
$this->_lookahead = $this->_formula{$i+1};
|
$this->_lookahead = $this->_formula[$i+1];
|
||||||
}
|
}
|
||||||
$token = '';
|
$token = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
while ($i < $formula_length) {
|
while ($i < $formula_length) {
|
||||||
$token .= $this->_formula{$i};
|
$token .= $this->_formula[$i];
|
||||||
|
|
||||||
if ($i < ($formula_length - 1)) {
|
if ($i < ($formula_length - 1)) {
|
||||||
$this->_lookahead = $this->_formula{$i+1};
|
$this->_lookahead = $this->_formula[$i+1];
|
||||||
} else {
|
} else {
|
||||||
$this->_lookahead = '';
|
$this->_lookahead = '';
|
||||||
}
|
}
|
||||||
@ -1072,7 +1072,7 @@ class PHPExcel_Writer_Excel5_Parser
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($i < ($formula_length - 2)) {
|
if ($i < ($formula_length - 2)) {
|
||||||
$this->_lookahead = $this->_formula{$i+2};
|
$this->_lookahead = $this->_formula[$i+2];
|
||||||
} else { // if we run out of characters _lookahead becomes empty
|
} else { // if we run out of characters _lookahead becomes empty
|
||||||
$this->_lookahead = '';
|
$this->_lookahead = '';
|
||||||
}
|
}
|
||||||
@ -1205,7 +1205,7 @@ class PHPExcel_Writer_Excel5_Parser
|
|||||||
{
|
{
|
||||||
$this->_current_char = 0;
|
$this->_current_char = 0;
|
||||||
$this->_formula = $formula;
|
$this->_formula = $formula;
|
||||||
$this->_lookahead = isset($formula{1}) ? $formula{1} : '';
|
$this->_lookahead = isset($formula[1]) ? $formula[1] : '';
|
||||||
$this->_advance();
|
$this->_advance();
|
||||||
$this->_parse_tree = $this->_condition();
|
$this->_parse_tree = $this->_condition();
|
||||||
return true;
|
return true;
|
||||||
|
@ -675,7 +675,7 @@ class PHPExcel_Writer_Excel5_Workbook extends PHPExcel_Writer_Excel5_BIFFwriter
|
|||||||
$formulaData = $this->_parser->toReversePolish();
|
$formulaData = $this->_parser->toReversePolish();
|
||||||
|
|
||||||
// make sure tRef3d is of type tRef3dR (0x3A)
|
// make sure tRef3d is of type tRef3dR (0x3A)
|
||||||
if (isset($formulaData{0}) and ($formulaData{0} == "\x7A" or $formulaData{0} == "\x5A")) {
|
if (isset($formulaData[0]) and ($formulaData[0] == "\x7A" or $formulaData[0] == "\x5A")) {
|
||||||
$formulaData = "\x3A" . substr($formulaData, 1);
|
$formulaData = "\x3A" . substr($formulaData, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -904,7 +904,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
|||||||
$unknown = 0x0000; // Must be zero
|
$unknown = 0x0000; // Must be zero
|
||||||
|
|
||||||
// Strip the '=' or '@' sign at the beginning of the formula string
|
// Strip the '=' or '@' sign at the beginning of the formula string
|
||||||
if ($formula{0} == '=') {
|
if ($formula[0] == '=') {
|
||||||
$formula = substr($formula,1);
|
$formula = substr($formula,1);
|
||||||
} else {
|
} else {
|
||||||
// Error handling
|
// Error handling
|
||||||
|
Loading…
Reference in New Issue
Block a user