ninjai has asked for the wisdom of the Perl Monks concerning the following question:

I am mid-way through a perl script that formats some data, but I cannot add in tab stops which I need. Is there any way I can do this?
  • Comment on Can OpenOffice::OODoc create tab stops?

Replies are listed 'Best First'.
Re: Can OpenOffice::OODoc create tab stops?
by GrandFather (Saint) on Jun 08, 2010 at 00:02 UTC

    \t maybe?

    True laziness is hard work
Re: Can OpenOffice::OODoc create tab stops?
by brap (Pilgrim) on Jun 08, 2010 at 12:34 UTC
    The documentation for updateDefaultStyle mentions adjusting the tab stop distance. Maybe that's what you're looking for, or at least hopefully points you in the right direction?
      Though propably too late for the original requester, here is how I do this:
      my $tab_stops = self->getStylesRef()->createElement('<style:tab-stops> +'. '<style:tab-stop style:position="0.9839in"/>'. '<style:tab-stop style:position="1.102in"/>'. '</style:tab-stops>'); $styleStore{$styleName} = $self->getStylesRef()->createStyle($styleNam +e, #category => 'named', #namespace => ..., #type => ..., family => "paragraph", #class => ..., check => 'true', parent => $self->getStyleElement('Dashitem1'), #next => ..., properties => { 'fo:margin-left' => "0.3154in", 'fo:margin-right' => "0in", 'fo:margin-top' => "0.0201in", 'fo:margin-bottom' => "0.0193in", 'fo:text-indent' => "0in", 'style:auto-text-indent' => "false", }); my $props = $styleStore{$styleName}->selectChildElement('style:paragra +ph-properties'); $props->appendChild($tab_stops);
      Thought it might be of interest to all googlers dealing with a similar issue.