Skip Menu |

This queue is for tickets about the OpenOffice-OODoc CPAN distribution.

Report information
The Basics
Id: 21687
Status: resolved
Priority: 0/
Queue: OpenOffice-OODoc

People
Owner: Nobody in particular
Requestors: ostrochovsky [...] rec.uniba.sk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



CC: duricka [...] sdjdr.uniba.sk
Subject: numeric sheet names do not work properly (probably bug)
Date: Mon, 25 Sep 2006 11:42:32 +0200
To: bug-OpenOffice-OODoc [...] rt.cpan.org
From: Jan Ostrochovsky <ostrochovsky [...] rec.uniba.sk>
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. Thanks in advance, have a nice day and good luck! ostry
Download testbug1.ZIP
application/zip 6.4k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #21687] AutoReply: numeric sheet names do not work properly (probably bug)
Date: Mon, 25 Sep 2006 13:26:18 +0200
To: bug-OpenOffice-OODoc [...] rt.cpan.org
From: Jan Ostrochovsky <ostrochovsky [...] rec.uniba.sk>
Hello, I forgot to write information about creator of ods-file: OpenOffice 2.0.2 (Slovak) at SUSE Linux 10.1 (Slovak environment, UTF-8) ostry On Po, 2006-09-25 at 05:40 -0400, Bugs in OpenOffice-OODoc via RT wrote: Show quoted text
> Greetings, > > This message has been automatically generated in response to the > creation of a trouble ticket regarding: > "numeric sheet names do not work properly (probably bug)", > a summary of which appears below. > > There is no need to reply to this message right now. Your ticket has been > assigned an ID of [rt.cpan.org #21687]. Your ticket is accessible > on the web at: > > http://rt.cpan.org/Ticket/Display.html?id=21687 > > Please include the string: > > [rt.cpan.org #21687] > > in the subject line of all future correspondence about this issue. To do so, > you may reply to this message. > > Thank you, > bug-OpenOffice-OODoc@rt.cpan.org > > ------------------------------------------------------------------------- > 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. > > Thanks in advance, have a nice day and good luck! > > ostry >
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
Subject: Re: [rt.cpan.org #21687] numeric sheet names do not work properly (probably bug)
Date: Mon, 25 Sep 2006 18:49:20 +0200
To: bug-OpenOffice-OODoc [...] rt.cpan.org
From: Jan Ostrochovsky <ostrochovsky [...] rec.uniba.sk>
Hello, On Po, 2006-09-25 at 12:06 -0400, via RT wrote: Show quoted text
> 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.
Thanks for clarification! Show quoted text
> 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!
I respect your authority with resolution of this issue. I already know, where was the problem and I will avoid to meet it again (numeric sheet names aren't mission critical in my business case), but enabling numeric sheet names could help others to save the time, which I invested into troubleshooting. More general solution could be more sympatic for them. Thanks again and have a nice evening! ostry
From: JMGDOC [...] cpan.org
Le Lun. Sep. 25 12:47:29 2006, ostrochovsky@rec.uniba.sk a écrit : Show quoted text
> Hello, > > On Po, 2006-09-25 at 12:06 -0400, via RT wrote:
> > 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.
> > Thanks for clarification! >
> > 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!
> > I respect your authority with resolution of this issue. I already know, > where was the problem and I will avoid to meet it again (numeric sheet > names aren't mission critical in my business case), but enabling numeric > sheet names could help others to save the time, which I invested into > troubleshooting. More general solution could be more sympatic for them. > > Thanks again and have a nice evening! > > ostry >
Let me suggest you a possible (ugly but effective) workaround for the present time. You could use a direct XPath query, like that: my $table = $doc->getNodeByXPath ("//table:table[\@table:name=\"$name\"]"); where $name is, of course, the name (numeric or not) or an existing table. The returned value is a valid table object which can be used as a table identifier with any table-oriented method. Good luck