I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-11-26 15:54:52-08 by dhoworth in response to 9433
Re: infinite loop in normalizeSheet
I hacked a method together. Here it is in case it's any use:
=head2 position ($row, $col) = $table_cell->position; =cut *OpenOffice::OODoc::Element::position = sub { my $self = shift; confess "$self is wrong class" unless $self->isa('OpenOffice::OODoc::Element'); confess "$self is not a cell (".$self->getName.")" unless $self->getName eq 'table:table-cell' or $self->getName eq 'table:covered-table-cell'; # Get column number # my $col = 1; for my $s ( $self->prev_siblings ) { my $tag = $s->getName; next unless $tag eq 'table:table-cell' or $tag eq 'table:covered-table-cell'; my $attr = $s->getAttribute('table:number-columns-repeated'); $col += $attr ? $attr : 1; } # Get row number # my $row = 1; for my $s ( $self->parent->prev_siblings ) { next unless $s->getName eq 'table:table-row'; my $attr = $s->getAttribute('table:number-rows-repeated'); $row += $attr ? $attr : 1; } return ($row, $col); };
It seems to be working for me with my big SS, but no warranty is expressed or implied :)
Direct Responses: 9438 | Write a response