Skip Menu |

This queue is for tickets about the ODF-lpOD CPAN distribution.

Report information
The Basics
Id: 64466
Status: resolved
Priority: 0/
Queue: ODF-lpOD

People
Owner: Nobody in particular
Requestors: jmgdoc [...] cpan.org
Cc:
AdminCc:

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



Subject: add_column() fails when used off limits
The add_column() table method doesn't work properly when the new columns are inserted before the first one or after the last one. So the two following instructions fail: $table->add_column(number => $n); # after the last column $table->add_column(number => $n, before => 0); # before the 1st Workarounds: 1) When possible, insert additional columns within the table instead of before or after the existing columns; 2) If you really need to extend the table after the last existing column, use add_column() with an explicit 'after' parameter specifying the last position (-1): $table->add_column(number => $n, after => -1); You will get a lot of meaningless warnings "Cell nn out of range" but the job should be done. 3) If you really need to insert columns before the first one, the following hack (that replaces the position number of the 1st column by the 1st column object itself) should work: my $pos = $table->get_column(0); $table->add_column(number => $n, before => $pos); Note: The bug is locked in the development version.
Subject: Re: [rt.cpan.org #64466] AutoReply: add_column() fails when used off limits
Date: Tue, 4 Jan 2011 17:44:05 +0100 (CET)
To: bug-ODF-lpOD [...] rt.cpan.org
From: Jean-Marie Gouarné <jean.marie.gouarne [...] online.fr>
Check ----- "Bugs in ODF-lpOD via RT" <bug-ODF-lpOD@rt.cpan.org> a écrit : | Greetings, | | This message has been automatically generated in response to the | creation of a trouble ticket regarding: | "add_column() fails when used off limits", | 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 #64466]. Your ticket is accessible | on the web at: | | https://rt.cpan.org/Ticket/Display.html?id=64466 | | Please include the string: | | [rt.cpan.org #64466] | | in the subject line of all future correspondence about this issue. To | do so, | you may reply to this message. | | Thank you, | bug-ODF-lpOD@rt.cpan.org | | ------------------------------------------------------------------------- | The add_column() table method doesn't work properly when the new | columns | are inserted before the first one or after the last one. | | So the two following instructions fail: | | $table->add_column(number => $n); # after the last column | $table->add_column(number => $n, before => 0); # before the 1st | | Workarounds: | | 1) When possible, insert additional columns within the table instead | of | before or after the existing columns; | | 2) If you really need to extend the table after the last existing | column, use add_column() with an explicit 'after' parameter | specifying | the last position (-1): | $table->add_column(number => $n, after => -1); | You will get a lot of meaningless warnings "Cell nn out of range" but | the job should be done. | | 3) If you really need to insert columns before the first one, the | following hack (that replaces the position number of the 1st column | by | the 1st column object itself) should work: | | my $pos = $table->get_column(0); | $table->add_column(number => $n, before => $pos); | | Note: The bug is locked in the development version.