Quantcast
Channel: Apache OpenOffice Community Forum
Viewing all articles
Browse latest Browse all 1281

Advanced Uses • Re: Reporting Writer Annotation contents

$
0
0
Thank you for the useful hints!

FWIW, the following works for me (pseudo code):

Code:

texts = par.createEnumeration()while texts.hasMoreElements():    text = texts.nextElement()     if text.TextPortionType == 'Annotation':  # Or 'AnnotationEnd' for the span.        # text.getString() seems always empty for 'Annotation', it's just a marker/anchor, I guess.        field = text.TextField  # As per JeJe's comment implements the Annotation service, does not exist for 'AnnotationEnd'.        comment = field.Content
See also the Annotation service (as per Hubert’s suggestion).

I also assume that there always must be an 'AnnotationEnd' type portion paired with an 'Annotation' type portion? That would make sense to establish the text that’s spanned by a comment (which might span multiple paragraphs, etc.)

Statistics: Posted by _savage — Sun Aug 11, 2024 9:57 pm



Viewing all articles
Browse latest Browse all 1281

Trending Articles