openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 程建宏 <>
Subject Re: How update table of contents in document?
Date Fri, 01 Jun 2012 03:10:38 GMT
Hi Oner,
Aoo provides APIs to update the table of contents of an odt document.Please
access to
download the OO3.1 Dev Guide and go to page 851..The type
"" of Index is for table of contents..Then
you can access
refer services of ContentIndex,BaseIndex and TextDocument, and also UNO
interface of XDocumentIndex and XTextDocument.

In your sample,you have gotten the TextDocument instance,and then you will
be able to instance the ContentIndex through TextDocument..Thus, you can
use the API "update" provided by  XDocumentIndex to update the table of
contents of the odt document...

I don't write the script like yours, and just provide their relations and
rough method..I hope it helpful to solve your problem...Thanks.

On Thu, May 31, 2012 at 10:38 PM, Олег Малёваный <> wrote:

> Hi!
> I am developing a script that will generate the document. provided in
> the template "Table of Contents" of the document.
> In development, I use perl and module
> Can I by means of this module, update the "Table of Contents" in a
> document?
> If not, then how can one way to run a macro that will update the table
> of contents with the help of this module or the unix command line?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message