mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Merged from McMasterReports branch
This commit is contained in:
@@ -1207,7 +1207,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||
default:
|
||||
// if it's a reference
|
||||
if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?[0-9]+$/',$token) and
|
||||
!ereg("[0-9]",$this->_lookahead) and
|
||||
!preg_match("/[0-9]/",$this->_lookahead) and
|
||||
($this->_lookahead != ':') and ($this->_lookahead != '.') and
|
||||
($this->_lookahead != '!'))
|
||||
{
|
||||
@@ -1215,39 +1215,39 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||
}
|
||||
// If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1)
|
||||
elseif (preg_match("/^\w+(\:\w+)?\![A-Ia-i]?[A-Za-z][0-9]+$/u",$token) and
|
||||
!ereg("[0-9]",$this->_lookahead) and
|
||||
!preg_match("/[0-9]/",$this->_lookahead) and
|
||||
($this->_lookahead != ':') and ($this->_lookahead != '.'))
|
||||
{
|
||||
return $token;
|
||||
}
|
||||
// If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1)
|
||||
elseif (preg_match("/^'[\w -]+(\:[\w -]+)?'\![A-Ia-i]?[A-Za-z][0-9]+$/u",$token) and
|
||||
!ereg("[0-9]",$this->_lookahead) and
|
||||
!preg_match("/[0-9]/",$this->_lookahead) and
|
||||
($this->_lookahead != ':') and ($this->_lookahead != '.'))
|
||||
{
|
||||
return $token;
|
||||
}
|
||||
// if it's a range (A1:A2)
|
||||
elseif (preg_match("/^(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+:(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+$/",$token) and
|
||||
!ereg("[0-9]",$this->_lookahead))
|
||||
!preg_match("/[0-9]/",$this->_lookahead))
|
||||
{
|
||||
return $token;
|
||||
}
|
||||
// if it's a range (A1..A2)
|
||||
elseif (preg_match("/^(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+\.\.(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+$/",$token) and
|
||||
!ereg("[0-9]",$this->_lookahead))
|
||||
!preg_match("/[0-9]/",$this->_lookahead))
|
||||
{
|
||||
return $token;
|
||||
}
|
||||
// If it's an external range like Sheet1!A1 or Sheet1:Sheet2!A1:B2
|
||||
elseif (preg_match("/^\w+(\:\w+)?\!([A-Ia-i]?[A-Za-z])?[0-9]+:([A-Ia-i]?[A-Za-z])?[0-9]+$/u",$token) and
|
||||
!ereg("[0-9]",$this->_lookahead))
|
||||
!preg_match("/[0-9]/",$this->_lookahead))
|
||||
{
|
||||
return $token;
|
||||
}
|
||||
// If it's an external range like 'Sheet1'!A1 or 'Sheet1:Sheet2'!A1:B2
|
||||
elseif (preg_match("/^'[\w -]+(\:[\w -]+)?'\!([A-Ia-i]?[A-Za-z])?[0-9]+:([A-Ia-i]?[A-Za-z])?[0-9]+$/u",$token) and
|
||||
!ereg("[0-9]",$this->_lookahead))
|
||||
!preg_match("/[0-9]/",$this->_lookahead))
|
||||
{
|
||||
return $token;
|
||||
}
|
||||
@@ -1259,12 +1259,12 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||
return $token;
|
||||
}
|
||||
// If it's a string (of maximum 255 characters)
|
||||
elseif (ereg("^\"[^\"]{0,255}\"$",$token))
|
||||
elseif (preg_match("/^\"[^\"]{0,255}\"$/",$token))
|
||||
{
|
||||
return $token;
|
||||
}
|
||||
// if it's a function call
|
||||
elseif (eregi("^[A-Z0-9\xc0-\xdc\.]+$",$token) and ($this->_lookahead == "("))
|
||||
elseif (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/i",$token) and ($this->_lookahead == "("))
|
||||
{
|
||||
return $token;
|
||||
}
|
||||
@@ -1364,7 +1364,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||
function _expression()
|
||||
{
|
||||
// If it's a string return a string node
|
||||
if (ereg("^\"[^\"]{0,255}\"$", $this->_current_token)) {
|
||||
if (preg_match("/^\"[^\"]{0,255}\"$/", $this->_current_token)) {
|
||||
$result = $this->_createTree($this->_current_token, '', '');
|
||||
$this->_advance();
|
||||
return $result;
|
||||
@@ -1522,7 +1522,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||
return $result;
|
||||
}
|
||||
// if it's a function call
|
||||
elseif (eregi("^[A-Z0-9\xc0-\xdc\.]+$",$this->_current_token))
|
||||
elseif (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/i",$this->_current_token))
|
||||
{
|
||||
$result = $this->_func();
|
||||
return $result;
|
||||
|
||||
@@ -184,7 +184,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
|
||||
$this->Spreadsheet_Excel_Writer_BIFFwriter();
|
||||
|
||||
$this->_filename = $filename;
|
||||
$this->_parser =& new Spreadsheet_Excel_Writer_Parser($this->_byte_order, $this->_BIFF_version);
|
||||
$this->_parser = new Spreadsheet_Excel_Writer_Parser($this->_byte_order, $this->_BIFF_version);
|
||||
$this->_1904 = 0;
|
||||
$this->_activesheet = 0;
|
||||
$this->_firstsheet = 0;
|
||||
@@ -193,7 +193,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
|
||||
$this->_fileclosed = 0;
|
||||
$this->_biffsize = 0;
|
||||
$this->_sheetname = 'Sheet';
|
||||
$this->_tmp_format =& new Spreadsheet_Excel_Writer_Format($this->_BIFF_version);
|
||||
$this->_tmp_format = new Spreadsheet_Excel_Writer_Format($this->_BIFF_version);
|
||||
$this->_worksheets = array();
|
||||
$this->_sheetnames = array();
|
||||
$this->_formats = array();
|
||||
|
||||
Reference in New Issue
Block a user