OpenOffice-OODoc - create a new empty odt file and change the style properties

Posted on Thu Sep 14 19:30:32 2006 by littleslinux
create a new empty odt file and change the style properties
I want to write a script file to create new odt file with modified style as :
$document = ooDocument ( file => 'test.odt', create => 'text' ) or print " can not create $filename! \n"; $document->save; $style = ooDocument ( file => 'test.odt', member => 'styles', ) or print " can not open document.odt styles ! \n"; $style->updateStyle ( 'Text body', properties => { 'area' => 'text', 'fo:font-size' => "8pt", 'style:font-name' => 'Times' } ) or print " can updateStyle $LINE!\n" ; $style->save("test.odt"); $content->appendParagraph ( text => 'Text body content', style => 'Text body' ); $content->save("test.odt");
error message as :
[OpenOffice::OODoc::Styles::updateStyle] Unknown style
It seems can't change 'Text body' properties in this way?????????? Thanks, LL
Direct Responses: 3032 | Write a response