Hi all,

A customer needs to migrate many Word documents containing a content index based on the document structure (outline) AND from some bookmarks in the document.

All the index voices are linked to the corresponding text position in the document.

In OpenOffice.org Writer is not possible to generate indexes voices from bookmarks, so we have proposed the use of Index Marks (com.sun.star.text.ContentIndexMarks)

The problem is that you cannot define a link property for index voices generated from indexmarks

So, I'm trying to find a workaround based on API.

The idea is more or less:

1) get the document index object
2) obtain the collection of index marks
3) from each index mark create a bookmark pointing to the same textrange (let's call it "mybkmrk_<n>" where <n> is an integer)

4) from the content-index get the anchor text
5) process it paragraph by paragraph
6) when you find the voices from index mark set the property
HyperlinkURL = "#" & mybkmrk_<n>


Steps 1, 2, 3, 4, 5, are easy, no problem here.

6 (six) would be easy too, but unfortunately I could not find any safe way to identify an index voice (or better: the corresponding textrange) having the index mark

I'm sorry for the long post but I was unable to describe the problem in a shorter way.

Thanks for any help
Paolo Mantovani


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org

Reply via email to