fixing CS mostly
git-svn-id: https://svn.php.net/repository/pear/packages/Spreadsheet_Excel_Writer/trunk@127335 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
55adf72e43
commit
fa2cf697ef
|
|
@ -652,13 +652,13 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
|
|
||||||
// Convert the cell references
|
// Convert the cell references
|
||||||
$cell_array1 = $this->_cellToPackedRowcol($cell1);
|
$cell_array1 = $this->_cellToPackedRowcol($cell1);
|
||||||
if($this->isError($cell_array1)) {
|
if (PEAR::isError($cell_array1)) {
|
||||||
return($cell_array1);
|
return $cell_array1;
|
||||||
}
|
}
|
||||||
list($row1, $col1) = $cell_array1; //$this->_cellToPackedRowcol($cell1);
|
list($row1, $col1) = $cell_array1; //$this->_cellToPackedRowcol($cell1);
|
||||||
$cell_array2 = $this->_cellToPackedRowcol($cell2);
|
$cell_array2 = $this->_cellToPackedRowcol($cell2);
|
||||||
if($this->isError($cell_array2)) {
|
if (PEAR::isError($cell_array2)) {
|
||||||
return($cell_array2);
|
return $cell_array2;
|
||||||
}
|
}
|
||||||
list($row2, $col2) = $cell_array2; //$this->_cellToPackedRowcol($cell2);
|
list($row2, $col2) = $cell_array2; //$this->_cellToPackedRowcol($cell2);
|
||||||
|
|
||||||
|
|
@ -676,7 +676,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
// TODO: use real error codes
|
// TODO: use real error codes
|
||||||
$this->raiseError("Unknown class $class", 0, PEAR_ERROR_DIE);
|
$this->raiseError("Unknown class $class", 0, PEAR_ERROR_DIE);
|
||||||
}
|
}
|
||||||
return($ptgArea . $row1 . $row2 . $col1. $col2);
|
return $ptgArea . $row1 . $row2 . $col1. $col2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -754,8 +754,8 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
|
|
||||||
// Convert the cell reference
|
// Convert the cell reference
|
||||||
$cell_array = $this->_cellToPackedRowcol($cell);
|
$cell_array = $this->_cellToPackedRowcol($cell);
|
||||||
if($this->isError($cell_array)) {
|
if (PEAR::isError($cell_array)) {
|
||||||
return($cell_array);
|
return $cell_array;
|
||||||
}
|
}
|
||||||
list($row, $col) = $cell_array;
|
list($row, $col) = $cell_array;
|
||||||
|
|
||||||
|
|
@ -773,7 +773,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
// TODO: use real error codes
|
// TODO: use real error codes
|
||||||
$this->raiseError("Unknown class $class", 0, PEAR_ERROR_DIE);
|
$this->raiseError("Unknown class $class", 0, PEAR_ERROR_DIE);
|
||||||
}
|
}
|
||||||
return($ptgRef.$row.$col);
|
return $ptgRef.$row.$col;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1178,14 +1178,14 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
function _condition()
|
function _condition()
|
||||||
{
|
{
|
||||||
$result = $this->_expression();
|
$result = $this->_expression();
|
||||||
if($this->isError($result)) {
|
if (PEAR::isError($result)) {
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
if ($this->_current_token == SPREADSHEET_EXCEL_WRITER_LT)
|
if ($this->_current_token == SPREADSHEET_EXCEL_WRITER_LT)
|
||||||
{
|
{
|
||||||
$this->_advance();
|
$this->_advance();
|
||||||
$result2 = $this->_expression();
|
$result2 = $this->_expression();
|
||||||
if($this->isError($result2)) {
|
if (PEAR::isError($result2)) {
|
||||||
return $result2;
|
return $result2;
|
||||||
}
|
}
|
||||||
$result = $this->_createTree('ptgLT', $result, $result2);
|
$result = $this->_createTree('ptgLT', $result, $result2);
|
||||||
|
|
@ -1194,7 +1194,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
{
|
{
|
||||||
$this->_advance();
|
$this->_advance();
|
||||||
$result2 = $this->_expression();
|
$result2 = $this->_expression();
|
||||||
if($this->isError($result2)) {
|
if (PEAR::isError($result2)) {
|
||||||
return $result2;
|
return $result2;
|
||||||
}
|
}
|
||||||
$result = $this->_createTree('ptgGT', $result, $result2);
|
$result = $this->_createTree('ptgGT', $result, $result2);
|
||||||
|
|
@ -1203,7 +1203,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
{
|
{
|
||||||
$this->_advance();
|
$this->_advance();
|
||||||
$result2 = $this->_expression();
|
$result2 = $this->_expression();
|
||||||
if($this->isError($result2)) {
|
if (PEAR::isError($result2)) {
|
||||||
return $result2;
|
return $result2;
|
||||||
}
|
}
|
||||||
$result = $this->_createTree('ptgLE', $result, $result2);
|
$result = $this->_createTree('ptgLE', $result, $result2);
|
||||||
|
|
@ -1212,7 +1212,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
{
|
{
|
||||||
$this->_advance();
|
$this->_advance();
|
||||||
$result2 = $this->_expression();
|
$result2 = $this->_expression();
|
||||||
if($this->isError($result2)) {
|
if (PEAR::isError($result2)) {
|
||||||
return $result2;
|
return $result2;
|
||||||
}
|
}
|
||||||
$result = $this->_createTree('ptgGE', $result, $result2);
|
$result = $this->_createTree('ptgGE', $result, $result2);
|
||||||
|
|
@ -1221,7 +1221,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
{
|
{
|
||||||
$this->_advance();
|
$this->_advance();
|
||||||
$result2 = $this->_expression();
|
$result2 = $this->_expression();
|
||||||
if($this->isError($result2)) {
|
if (PEAR::isError($result2)) {
|
||||||
return $result2;
|
return $result2;
|
||||||
}
|
}
|
||||||
$result = $this->_createTree('ptgEQ', $result, $result2);
|
$result = $this->_createTree('ptgEQ', $result, $result2);
|
||||||
|
|
@ -1230,7 +1230,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
{
|
{
|
||||||
$this->_advance();
|
$this->_advance();
|
||||||
$result2 = $this->_expression();
|
$result2 = $this->_expression();
|
||||||
if($this->isError($result2)) {
|
if (PEAR::isError($result2)) {
|
||||||
return $result2;
|
return $result2;
|
||||||
}
|
}
|
||||||
$result = $this->_createTree('ptgNE', $result, $result2);
|
$result = $this->_createTree('ptgNE', $result, $result2);
|
||||||
|
|
@ -1251,11 +1251,11 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
{
|
{
|
||||||
$result = $this->_createTree($this->_current_token, '', '');
|
$result = $this->_createTree($this->_current_token, '', '');
|
||||||
$this->_advance();
|
$this->_advance();
|
||||||
return($result);
|
return $result;
|
||||||
}
|
}
|
||||||
$result = $this->_term();
|
$result = $this->_term();
|
||||||
if($this->isError($result)) {
|
if (PEAR::isError($result)) {
|
||||||
return($result);
|
return $result;
|
||||||
}
|
}
|
||||||
while (($this->_current_token == SPREADSHEET_EXCEL_WRITER_ADD) or
|
while (($this->_current_token == SPREADSHEET_EXCEL_WRITER_ADD) or
|
||||||
($this->_current_token == SPREADSHEET_EXCEL_WRITER_SUB))
|
($this->_current_token == SPREADSHEET_EXCEL_WRITER_SUB))
|
||||||
|
|
@ -1264,8 +1264,8 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
{
|
{
|
||||||
$this->_advance();
|
$this->_advance();
|
||||||
$result2 = $this->_term();
|
$result2 = $this->_term();
|
||||||
if($this->isError($result2)) {
|
if (PEAR::isError($result2)) {
|
||||||
return($result2);
|
return $result2;
|
||||||
}
|
}
|
||||||
$result = $this->_createTree('ptgAdd', $result, $result2);
|
$result = $this->_createTree('ptgAdd', $result, $result2);
|
||||||
}
|
}
|
||||||
|
|
@ -1273,13 +1273,13 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
{
|
{
|
||||||
$this->_advance();
|
$this->_advance();
|
||||||
$result2 = $this->_term();
|
$result2 = $this->_term();
|
||||||
if($this->isError($result2)) {
|
if (PEAR::isError($result2)) {
|
||||||
return($result2);
|
return $result2;
|
||||||
}
|
}
|
||||||
$result = $this->_createTree('ptgSub', $result, $result2);
|
$result = $this->_createTree('ptgSub', $result, $result2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return($result);
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1293,7 +1293,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
function _parenthesizedExpression()
|
function _parenthesizedExpression()
|
||||||
{
|
{
|
||||||
$result = $this->_createTree('ptgParen', $this->_expression(), '');
|
$result = $this->_createTree('ptgParen', $this->_expression(), '');
|
||||||
return($result);
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1306,8 +1306,8 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
function _term()
|
function _term()
|
||||||
{
|
{
|
||||||
$result = $this->_fact();
|
$result = $this->_fact();
|
||||||
if($this->isError($result)) {
|
if (PEAR::isError($result)) {
|
||||||
return($result);
|
return $result;
|
||||||
}
|
}
|
||||||
while (($this->_current_token == SPREADSHEET_EXCEL_WRITER_MUL) or
|
while (($this->_current_token == SPREADSHEET_EXCEL_WRITER_MUL) or
|
||||||
($this->_current_token == SPREADSHEET_EXCEL_WRITER_DIV))
|
($this->_current_token == SPREADSHEET_EXCEL_WRITER_DIV))
|
||||||
|
|
@ -1316,8 +1316,8 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
{
|
{
|
||||||
$this->_advance();
|
$this->_advance();
|
||||||
$result2 = $this->_fact();
|
$result2 = $this->_fact();
|
||||||
if($this->isError($result2)) {
|
if (PEAR::isError($result2)) {
|
||||||
return($result2);
|
return $result2;
|
||||||
}
|
}
|
||||||
$result = $this->_createTree('ptgMul', $result, $result2);
|
$result = $this->_createTree('ptgMul', $result, $result2);
|
||||||
}
|
}
|
||||||
|
|
@ -1325,13 +1325,13 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
{
|
{
|
||||||
$this->_advance();
|
$this->_advance();
|
||||||
$result2 = $this->_fact();
|
$result2 = $this->_fact();
|
||||||
if($this->isError($result2)) {
|
if (PEAR::isError($result2)) {
|
||||||
return($result2);
|
return $result2;
|
||||||
}
|
}
|
||||||
$result = $this->_createTree('ptgDiv', $result, $result2);
|
$result = $this->_createTree('ptgDiv', $result, $result2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return($result);
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1426,16 +1426,16 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
"function $function, {$num_args}º arg");
|
"function $function, {$num_args}º arg");
|
||||||
}
|
}
|
||||||
$result2 = $this->_condition();
|
$result2 = $this->_condition();
|
||||||
if($this->isError($result2)) {
|
if (PEAR::isError($result2)) {
|
||||||
return($result2);
|
return $result2;
|
||||||
}
|
}
|
||||||
$result = $this->_createTree('arg', $result, $result2);
|
$result = $this->_createTree('arg', $result, $result2);
|
||||||
}
|
}
|
||||||
else // first argument
|
else // first argument
|
||||||
{
|
{
|
||||||
$result2 = $this->_condition();
|
$result2 = $this->_condition();
|
||||||
if($this->isError($result2)) {
|
if (PEAR::isError($result2)) {
|
||||||
return($result2);
|
return $result2;
|
||||||
}
|
}
|
||||||
$result = $this->_createTree('arg', '', $result2);
|
$result = $this->_createTree('arg', '', $result2);
|
||||||
}
|
}
|
||||||
|
|
@ -1450,7 +1450,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
|
|
||||||
$result = $this->_createTree($function, $result, $num_args);
|
$result = $this->_createTree($function, $result, $num_args);
|
||||||
$this->_advance(); // eat the ")"
|
$this->_advance(); // eat the ")"
|
||||||
return($result);
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1504,32 +1504,32 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
if (is_array($tree['left']))
|
if (is_array($tree['left']))
|
||||||
{
|
{
|
||||||
$converted_tree = $this->toReversePolish($tree['left']);
|
$converted_tree = $this->toReversePolish($tree['left']);
|
||||||
if($this->isError($converted_tree)) {
|
if (PEAR::isError($converted_tree)) {
|
||||||
return($converted_tree);
|
return $converted_tree;
|
||||||
}
|
}
|
||||||
$polish .= $converted_tree;
|
$polish .= $converted_tree;
|
||||||
}
|
}
|
||||||
elseif($tree['left'] != '') // It's a final node
|
elseif($tree['left'] != '') // It's a final node
|
||||||
{
|
{
|
||||||
$converted_tree = $this->_convert($tree['left']);
|
$converted_tree = $this->_convert($tree['left']);
|
||||||
if($this->isError($converted_tree)) {
|
if (PEAR::isError($converted_tree)) {
|
||||||
return($converted_tree);
|
return $converted_tree;
|
||||||
}
|
}
|
||||||
$polish .= $converted_tree;
|
$polish .= $converted_tree;
|
||||||
}
|
}
|
||||||
if (is_array($tree['right']))
|
if (is_array($tree['right']))
|
||||||
{
|
{
|
||||||
$converted_tree = $this->toReversePolish($tree['right']);
|
$converted_tree = $this->toReversePolish($tree['right']);
|
||||||
if($this->isError($converted_tree)) {
|
if (PEAR::isError($converted_tree)) {
|
||||||
return($converted_tree);
|
return $converted_tree;
|
||||||
}
|
}
|
||||||
$polish .= $converted_tree;
|
$polish .= $converted_tree;
|
||||||
}
|
}
|
||||||
elseif($tree['right'] != '') // It's a final node
|
elseif($tree['right'] != '') // It's a final node
|
||||||
{
|
{
|
||||||
$converted_tree = $this->_convert($tree['right']);
|
$converted_tree = $this->_convert($tree['right']);
|
||||||
if($this->isError($converted_tree)) {
|
if (PEAR::isError($converted_tree)) {
|
||||||
return($converted_tree);
|
return $converted_tree;
|
||||||
}
|
}
|
||||||
$polish .= $converted_tree;
|
$polish .= $converted_tree;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue