Subject: | undefined $table in getTableCell |
Source:
my $doc = ooDocument(file => $filename);
my $sheet = $doc->getTable(0, 10, 10);
my $obsah=$doc->getCellValue($sheet, 1, 1);
Result:
Can't call method "child" on an undefined value at /usr/local/share/perl/5.8.4/OpenOffice/OODoc/Text.pm line 1906.
Note:
Used to be OK in 2.017.
Solution:
Apply the attached patch.
--- OpenOffice/OODoc/Text.pm.orig 2006-01-02 14:48:24.432408063 +0100
+++ OpenOffice/OODoc/Text.pm 2006-01-02 14:46:35.554357417 +0100
@@ -1897,12 +1897,16 @@
@_ = OpenOffice::OODoc::Text::_coord_conversion(@_);
my $r = shift || 0;
my $c = shift || 0;
- unless (ref $p1)
+ if (! ref $p1)
{
my $context = shift;
$table = $self->getTable($p1, $context)
or return undef;
}
+ else {
+ $table=$p1;
+ }
+
$row = $table->child($r, 'table:table-row')
or return undef;
$cell = $row->selectChildElement