Bug #17766 Patch: Avoid deprecated split
git-svn-id: https://svn.php.net/repository/pear/packages/Spreadsheet_Excel_Writer/trunk@302674 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
7803f30184
commit
9642009762
|
|
@ -673,9 +673,9 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
// TODO: possible class value 0,1,2 check Formula.pm
|
// TODO: possible class value 0,1,2 check Formula.pm
|
||||||
// Split the range into 2 cell refs
|
// Split the range into 2 cell refs
|
||||||
if (preg_match("/^([A-Ia-i]?[A-Za-z])(\d+)\:([A-Ia-i]?[A-Za-z])(\d+)$/", $range)) {
|
if (preg_match("/^([A-Ia-i]?[A-Za-z])(\d+)\:([A-Ia-i]?[A-Za-z])(\d+)$/", $range)) {
|
||||||
list($cell1, $cell2) = split(':', $range);
|
list($cell1, $cell2) = explode(':', $range);
|
||||||
} elseif (preg_match("/^([A-Ia-i]?[A-Za-z])(\d+)\.\.([A-Ia-i]?[A-Za-z])(\d+)$/", $range)) {
|
} elseif (preg_match("/^([A-Ia-i]?[A-Za-z])(\d+)\.\.([A-Ia-i]?[A-Za-z])(\d+)$/", $range)) {
|
||||||
list($cell1, $cell2) = split('\.\.', $range);
|
list($cell1, $cell2) = explode('..', $range);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// TODO: use real error codes
|
// TODO: use real error codes
|
||||||
|
|
@ -721,7 +721,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
$class = 2; // as far as I know, this is magick.
|
$class = 2; // as far as I know, this is magick.
|
||||||
|
|
||||||
// Split the ref at the ! symbol
|
// Split the ref at the ! symbol
|
||||||
list($ext_ref, $range) = split('!', $token);
|
list($ext_ref, $range) = explode('!', $token);
|
||||||
|
|
||||||
// Convert the external reference part (different for BIFF8)
|
// Convert the external reference part (different for BIFF8)
|
||||||
if ($this->_BIFF_version == 0x0500) {
|
if ($this->_BIFF_version == 0x0500) {
|
||||||
|
|
@ -737,7 +737,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
}
|
}
|
||||||
|
|
||||||
// Split the range into 2 cell refs
|
// Split the range into 2 cell refs
|
||||||
list($cell1, $cell2) = split(':', $range);
|
list($cell1, $cell2) = explode(':', $range);
|
||||||
|
|
||||||
// Convert the cell references
|
// Convert the cell references
|
||||||
if (preg_match("/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)$/", $cell1)) {
|
if (preg_match("/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)$/", $cell1)) {
|
||||||
|
|
@ -818,7 +818,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
$class = 2; // as far as I know, this is magick.
|
$class = 2; // as far as I know, this is magick.
|
||||||
|
|
||||||
// Split the ref at the ! symbol
|
// Split the ref at the ! symbol
|
||||||
list($ext_ref, $cell) = split('!', $cell);
|
list($ext_ref, $cell) = explode('!', $cell);
|
||||||
|
|
||||||
// Convert the external reference part (different for BIFF8)
|
// Convert the external reference part (different for BIFF8)
|
||||||
if ($this->_BIFF_version == 0x0500) {
|
if ($this->_BIFF_version == 0x0500) {
|
||||||
|
|
@ -865,7 +865,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
|
|
||||||
// Check if there is a sheet range eg., Sheet1:Sheet2.
|
// Check if there is a sheet range eg., Sheet1:Sheet2.
|
||||||
if (preg_match("/:/", $ext_ref)) {
|
if (preg_match("/:/", $ext_ref)) {
|
||||||
list($sheet_name1, $sheet_name2) = split(':', $ext_ref);
|
list($sheet_name1, $sheet_name2) = explode(':', $ext_ref);
|
||||||
|
|
||||||
$sheet1 = $this->_getSheetIndex($sheet_name1);
|
$sheet1 = $this->_getSheetIndex($sheet_name1);
|
||||||
if ($sheet1 == -1) {
|
if ($sheet1 == -1) {
|
||||||
|
|
@ -911,7 +911,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
|
|
||||||
// Check if there is a sheet range eg., Sheet1:Sheet2.
|
// Check if there is a sheet range eg., Sheet1:Sheet2.
|
||||||
if (preg_match("/:/", $ext_ref)) {
|
if (preg_match("/:/", $ext_ref)) {
|
||||||
list($sheet_name1, $sheet_name2) = split(':', $ext_ref);
|
list($sheet_name1, $sheet_name2) = explode(':', $ext_ref);
|
||||||
|
|
||||||
$sheet1 = $this->_getSheetIndex($sheet_name1);
|
$sheet1 = $this->_getSheetIndex($sheet_name1);
|
||||||
if ($sheet1 == -1) {
|
if ($sheet1 == -1) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue