php8.0 버전 호환 코드 적용 및 PHP 끝 태그 삭제 일괄적용
This commit is contained in:
@ -1020,7 +1020,7 @@ class PHPExcel_Writer_Excel5_Parser
|
||||
$col = 0;
|
||||
$col_ref_length = strlen($col_ref);
|
||||
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;
|
||||
}
|
||||
|
||||
@ -1042,28 +1042,28 @@ class PHPExcel_Writer_Excel5_Parser
|
||||
$formula_length = strlen($this->formula);
|
||||
// eat up white spaces
|
||||
if ($i < $formula_length) {
|
||||
while ($this->formula{$i} == " ") {
|
||||
while ($this->formula[$i] == " ") {
|
||||
++$i;
|
||||
}
|
||||
|
||||
if ($i < ($formula_length - 1)) {
|
||||
$this->lookAhead = $this->formula{$i+1};
|
||||
$this->lookAhead = $this->formula[$i+1];
|
||||
}
|
||||
$token = '';
|
||||
}
|
||||
|
||||
while ($i < $formula_length) {
|
||||
$token .= $this->formula{$i};
|
||||
$token .= $this->formula[$i];
|
||||
|
||||
if ($i < ($formula_length - 1)) {
|
||||
$this->lookAhead = $this->formula{$i+1};
|
||||
$this->lookAhead = $this->formula[$i+1];
|
||||
} else {
|
||||
$this->lookAhead = '';
|
||||
}
|
||||
|
||||
if ($this->match($token) != '') {
|
||||
//if ($i < strlen($this->formula) - 1) {
|
||||
// $this->lookAhead = $this->formula{$i+1};
|
||||
// $this->lookAhead = $this->formula[$i+1];
|
||||
//}
|
||||
$this->currentCharacter = $i + 1;
|
||||
$this->currentToken = $token;
|
||||
@ -1071,7 +1071,7 @@ class PHPExcel_Writer_Excel5_Parser
|
||||
}
|
||||
|
||||
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
|
||||
$this->lookAhead = '';
|
||||
}
|
||||
@ -1172,7 +1172,7 @@ class PHPExcel_Writer_Excel5_Parser
|
||||
{
|
||||
$this->currentCharacter = 0;
|
||||
$this->formula = $formula;
|
||||
$this->lookAhead = isset($formula{1}) ? $formula{1} : '';
|
||||
$this->lookAhead = isset($formula[1]) ? $formula[1] : '';
|
||||
$this->advance();
|
||||
$this->parseTree = $this->condition();
|
||||
return true;
|
||||
|
||||
@ -664,7 +664,7 @@ class PHPExcel_Writer_Excel5_Workbook extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||
$formulaData = $this->parser->toReversePolish();
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
||||
@ -876,7 +876,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||
$unknown = 0x0000; // Must be zero
|
||||
|
||||
// Strip the '=' or '@' sign at the beginning of the formula string
|
||||
if ($formula{0} == '=') {
|
||||
if ($formula[0] == '=') {
|
||||
$formula = substr($formula, 1);
|
||||
} else {
|
||||
// Error handling
|
||||
|
||||
Reference in New Issue
Block a user