Hi!
I try to implement a table of content. I have searched the mailing list
archieve and I found an example. I tried to includes this in my programm code
but I have some questions how to implement it in the right way.
-- create table of content
contentInd = xDMsf~createInstance("com.sun.star.text.ContentIndex")
contentProps = contentInd~XPropertySet
xText~setString("Table of Content")
contentProps~setPropertyValue("CreateFromOutline",box("boolean", .true))
contentProps~setPropertyValue("Level",box("short", 2))
contentTextContent = contentInd~xTextContent()
xText~insertTextContent(xText~getEnd, contentTextContent, .false )
-- xText~insertTextContent(xText, contentTextContent, .false )
xTextCursor = xText~createTextCursor -- create a text cursor
xTextCursor~gotoEnd(.false)
With this code I insert the table of content into the document. But when I
insert it the whole text is marked and I don't get the real table. I think I
have to specify which headline should be included in the table of content but I
dont know how to do this.
Can someone give me an example or a hint where I can find one?
Thanks.
Nicole
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]