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

I have created a fairly complex ODF document from a database using the OpenOffice::OODoc perl module. I have been tagging key headings in the generated document as "toc" - Table Of Contents entries. This works fine - however I've merely created the index entries, not the actual Table of Contents (toc) itself within the document.

If I load up the resulting document in LibreOffice and go to Insert -> Indexes and Tables -> Indexes and Tables, it defaults to adding a Table of Contents of the layout I want so I just need to click [OK].

However I would prefer to be able to automatically add the toc (Table of Contents) to the document from within OODoc and not have to do it manually in LibreOffice later. Thus far I've been reading the documentation and doing all the web searches I can think of but can find no clues on how I should be doing this.

Can someone please suggest a code snippet that would add this table to my document from within OODoc?

Thank you!

  • Comment on How to add A Table Of Contents / toc object in OpenOffice::OODoc?

Replies are listed 'Best First'.
Re: How to add A Table Of Contents / toc object in OpenOffice::OODoc?
by stefbv (Priest) on Oct 23, 2015 at 08:12 UTC

    Another module ODF::lpOD by the same author has this capability and is documented.

    It also has a better API and fewer bugs.

Re: How to add A Table Of Contents / toc object in OpenOffice::OODoc?
by ww (Archbishop) on Oct 22, 2015 at 22:11 UTC
Re: How to add A Table Of Contents / toc object in OpenOffice::OODoc?
by Anonymous Monk on Oct 22, 2015 at 22:25 UTC