Re: [api-dev] How to insert and remove annotation?

2005-06-06 Thread Liao Yu
I've just changed the 2 letters into upper case and the annotation came out at last! Thank you, Juergen. REgards, Yu - Hi, it seems to be a documentation problem. In IDL it is com.sun.star.textfield.Annotation but in real life you have to use

Re: [api-dev] How to insert and remove annotation?

2005-06-05 Thread Liao Yu
Hi Juergen, Is there any difference between a global service factory and a text document factory? I opened the text document from that xMSF multiservice factory, so I guess it's a global one. Would you be so kind to tell me how to query a text ducument object for XMultiServiceFactory from a

Re: [api-dev] How to insert and remove annotation?

2005-06-01 Thread Liao Yu
Thanks, Andrew. There's one thing strange that I couldn't find the package textfield in module com.sun.star.text of unoil.jar. Anyone has any idea? Regards, Yu - Liao Yu wrote: Hi, We can hide and show annotations in a text document via OOo API, but

Re: [api-dev] How to insert and remove annotation?

2005-06-01 Thread Stephan Bergmann
Liao Yu wrote: Thanks, Stephan. So the package com.sun.star.text.textfield is not available in Java. Then do we have the chance to insert an annotation or other textfield via Java? If we do, how? Thank you in advance. That there is no Java package com.sun.star.text.textfield does not mean

Re: [api-dev] How to insert and remove annotation?

2005-06-01 Thread Liao Yu
Here is the code that I wrote to insert an annotation, referring to the example in section 7.3.5 of Developer's Guide: ... try { com.sun.star.text.XTextField aNote= (com.sun.star.text.XTextField)UnoRuntime.queryInterface (XTextField.class, xMSF.createInstance

Re: [api-dev] How to insert and remove annotation?

2005-05-31 Thread Liao Yu
Hi Paolo, Actually there's a service com.sun.star.text.ViewSettings, with boolean property ShowAnnotations, which controls the visibility of annotations. You can access to ViewSettings with com.sun.star.view.XViewSettingsSupplier.getViewSettings (). You can refer to section 7.5 of

Re: [api-dev] How to insert and remove annotation?

2005-05-31 Thread Andrew Douglas Pitonyak
Liao Yu wrote: Hi, We can hide and show annotations in a text document via OOo API, but how can we insert or remove one with API? Regards, Yu An annotation is just a text field, you can remove it as any other text field. -- Andrew Pitonyak My Macro Document: