Hi!

I have created a table of content. Now I would like to hyperlink the entries in 
the TOC. I found some examples and tried to integrate this code. 

As I found in the documentation I have to create an arry with the elements 
which are included in the TOC. Here is my code:

 -- TOC
   contentInd = xDMsf~createInstance("com.sun.star.text.ContentIndex")
   contentProps = contentInd~XPropertySet

  propsToc = bsf.createArray(.UNO~PropertyValue, 1)
  propsToc[1] = .UNO~PropertyValue~new
  propsToc[1]~name="TokenType"
  propsToc[1]~value = "TokenHyperlinkStart"
  propsToc[1]~name="TokenType"
  propsToc[1]~value = "TokenText"
  propsToc[1]~name="TokenType"
  propsToc[1]~value = "TokenHyperlinkEnd"

  contentProps~setPropertyValue("CreateFromOutline",box("boolean", .true))
  contentProps~setPropertyValue("Level",box("short", 2))
  contentProps~setPropertyValue("Title","Table of Content")
  contentProps~setPropertyValue("IsProtected",box("boolean", .false))

Then I have to get the LevelFormat and replace it with my properties. But here 
I get the error that the method replaceByIndex does not exist or there is an 
exception.

  LevelFormat = contentProps~getPropertyValue("LevelFormat")
  LevelFormat~xIndexAccess~xIndexReplace~replaceByIndex(box("long", 1), 
propsToc) 

Can someone give me a hint where I have the mistake?

Thanks
Nicole
-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to