OpenOffice-OODoc - Problem using extendText

Posted on Mon Apr 10 12:50:10 2006 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