Le Lun. Sep. 25 05:40:24 2006, ostrochovsky@rec.uniba.sk a écrit :
Show quoted text> Hello,
>
> I am very happy to use OpenOffice::OODoc and want to help to make it
> more perfect, so:
>
> OpenOffice::OODoc 2.028
> Perl: v5.8.7
> Mandrake Linux 9.1 2.4.21-0.13mdk
>
> When sheet name is numeric (444 in attached example), script is unable
> to parse it. When renamed to alphanumeric (VLAN444 in attached example),
> it works.
Hello Ostry,
This issue is probably a limit, but it's not a bug; see getTable() in
the OpenOffice::OODoc::Text manual chapter.
getTable() method, as well as every other method accepting a table
identifier as its first argument, such as getcell(), etc, attempts to
adapt its behavior according to the type of this argument. If the
argument is a previously retrieved table object identifier, no problem.
If it's an alphanumeric string, getTable() executes an XPath query in
order to select the table object according to its name attribute. But if
the argument is made of digits, its functional type is ambiguous,
because it could be the position of the table as well as its name.
By design, we decided to allow numeric addressing, because it's very
useful for some applications. Such queries as "the first/last/Nth table
of the document" or "all the tables from $start to $end" often help.
As a consequence, if the application provides "444" as the table
identifier, getTable() interprets this argument in the same way as, say,
getParagraph(), and many other getXxx() methods of the API, i.e. as "the
445th table". I guess your document doesn't contain such a number of
sheets, so it returns a null value.
If numeric table names are very important for you and others, a future
release could provide a new getTableByName() method; but the numeric
(non-name) table selection feature should not be sacrificed.
So I suggest you to close the bug and, of course, feel free to open an
item in the wishlist !
Best Rgds,
jmgdoc