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 2005-09-16 02:10:10-07 by bob
Setting Style with: appendItemList()
I would like to create a list formatted using a style called '10_point' contained in the template document.

I created a list of style names (just to be certain that '10_point' was there).

While the list contains the style '10_point', the OpenOffice document uses the style 'default' for the list. For example:
Example
Am I doing something imcorrectly ?
#!/usr/local/bin/perl5.8.7 use OpenOffice::OODoc; $style_file="/varsav/office/template"; my $archive = ooFile("$style_file"); my $content = ooDocument(archive => $archive); my $meta = ooMeta(archive => $archive); my $style = ooDocument(archive => $archive,member=>STYLES); my @style_list=$style->getNamedStyleList(); my @s_list; for (@style_list) { push (@s_list, $style->styleName($_)."\n"); } my $list1 = $content->appendItemList( type => 'ordered', style => '10_point'); $content->setText($list1, @s_list); my $date=`date '+%Y-%m-%d-%T'`; chomp $date;$date=~s/:/./g; my $save_it="/varsav/office/templates/$date.basic_styles".$$.".sxw"; $archive->save("$save_it");


Thanks again.
Bob
Direct Responses: Write a response