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 2006-04-10 09:50:10-07 by dave
Problem using extendText
In the following test script I am expecting the second sentence in paragraph 2 to be in the Emphasis style (italicised), but it remains in the default style. Does anyone know why? I think that I am following the documentation correctly. (Perl 5.8.7, Openoffice::OODoc 2.02 on Windows XP with OpenOffice 2.0).
use strict; use warnings; use OpenOffice::OODoc; my $document = ooDocument(file => 'test.odt', create => 'text'); my $para1 = $document->appendParagraph( text => 'Heading', style => 'Heading 1' ); my $para2 = $document->appendParagraph( text => 'First sentence para2. ', style => 'default' ); my $para3 = $document->appendParagraph( text => 'First sentence para3. ', style => 'default' ); $document->extendText($para2, 'Second sentence para2.', 'Emphasis'); $document->save;
Direct Responses: 2139 | Write a response
Posted on 2006-04-10 14:13:20-07 by jeunice in response to 2132
Re: Problem using extendText
This snippet works as expected (with sentence 2 of para 2 italicized) on my system. My OpenOffice::OODoc is version 2.023, and other details (Windows XP, late model Perl, recent drop of OpenOffice, etc.) are similar. You might want to update your OpenOffice::OODoc modules. I see from http://cpan.uwinnipeg.ca/htdocs/OpenOffice-OODoc/Changes.html a fairly recent comment 'Text.pm: added an improved version of extendText()' that could affect your code.
Direct Responses: 2145 | Write a response
Posted on 2006-04-11 08:32:27-07 by dave in response to 2139
Re: Problem using extendText
Thanks, I thought I had the most recent as I had updated yesterday with ppm, but the ppm source was a little behind (2.021 rather than 2.023). It gave me Text.pm 2.219, and the extendText() improvement I was relying on came in in 2.222. It is a bit confusing as each module has it's own version number. I have now updated and it works.
Direct Responses: Write a response