Thank you, Stephan. I will try it.

Regards,

Yu
----------------------原邮件-------------------
Hi Yu,

> Thus the annotition will gone with the text. Can we do 
the 
> same( only without remove the text) with OOo API? I've 
> tried with quering XEnumerationAccess interface from 
> XModel.getCurrentSelection(), as shown in the following 
> code, but failed at the first place: the selection 
doesn't 
> seem to support XEnumerationAccess.Here's the code:

the returned selection a SwXTextRanges object, from this 
you can get the
first one using the XIndexAccess and this will give you a 
SwXTextRange.
You can then create an enumeration for this Range and you 
will get the
ParagraphEnumeration. For each element therein you can 
create another
Enumeration and you will get the TextPortionEnumeration.
In the second enumeration you can ask the element if it 
supports a
"css.text.TextField" and if so you can get the 
property "TextField" from
this element and ask if it supports 
a "css.text.TextField.Annotation".

Hope that helps

Regards

Stephan

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



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

Reply via email to