Association between ToC index object and its paragraph content

Miklos Vajna vmiklos at
Tue Dec 12 09:37:09 UTC 2017

Hi Jens,

On Mon, Dec 11, 2017 at 11:32:49PM +0100, Jens Tröger <jens.troeger at> wrote:
> How can I correlate these index_par objects with the paragraphs that I
> visit using the document's paragraph enumeration:
>   parenum = document.Text.createEnumeration()                                                     
>   while parenum.hasMoreElements():                                                                
>       par = parenum.nextElement()                                                                  
>       # par is a paragraph (XTextContext) in the document
> At some point a given `par` and `index_par` represent the same
> paragraph in the document, but how do I know?  Or does such an
> association not or very loosely exist?
has code samples on how the reference-to-bookmark is represented as a
HyperlinkURL property, and how the bookmark is a Bookmark text portion.
There is no closer connection between these two, I think.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <>

More information about the LibreOffice mailing list