* Fix bug #1730 Wrong operand class used for A1:A2

# currently works only with ranges such as A1:B5. Not supported is A:B


git-svn-id: https://svn.php.net/repository/pear/packages/Spreadsheet_Excel_Writer/trunk@221235 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mika Tuupola 2006-10-06 07:58:07 +00:00
parent d57a7729f6
commit d4956f5b63
1 changed files with 2 additions and 2 deletions

View File

@ -663,10 +663,10 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @access private * @access private
* @param string $range An Excel range in the A1:A2 or A1..A2 format. * @param string $range An Excel range in the A1:A2 or A1..A2 format.
*/ */
function _convertRange2d($range) function _convertRange2d($range, $class=0)
{ {
$class = 2; // as far as I know, this is magick.
// 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) = split(':', $range);