|
Hopefully, you should not need to patch O::O::Text in order to change the size of the area to be normalized. In order to control this size, you can provide getTable() with the appropriate values as optional arguments. Example:
my $table = $doc->getTable($tablename, $height, $width);
my $text = $doc->getTableText($table);
When called with optional size arguments, getTable() automatically calls normalizeSheet() with the given values (and the default size is ignored).
In order to make the table more safe for getTableText(), you could, *after* the code above, delete every possible extra row. Example:
my ($h, $w) = $doc->getTableSize($table);
for (my $i = $height ; $i < $h ; $i++)
{
$doc->deleteRow($table, $i);
}
In addition, it's possible to remove the extra cells (if any) in each row in the normalized area, according the difference between the normalized width ($width) and the external width ($w) returned by getTableSize().
|