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
XTextDocument? Thank you!
Regards,
Yu
----------------------原邮件-------------------
Hi,
which service factory do you use? Is xMSF the global
service factory or
the text document factory. Not all services can be
instantiated at the
global service factory (service manager). Query your text
document
object for XMultiServiceFactory and use this interface to
create the
text field.
Juergen
Liao Yu wrote:
> 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
> ("com.sun.star.text.textfield.Annotation"));
> xText.insertTextContent(xText.getEnd(),
> aNote, true);
>
> }
> catch(com.sun.star.uno.Exception e){
> System.out.println("111");
> }
> ...
> However, what I get is no more than the
> com.sun.star.uno.Exception that createInstance() throws.
> Could anyone please tell me what's going wrong with that
> piece of code? Thank you!
>
> Regards,
>
> Yu
>
> ----------------------------------------------------------
-----------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: dev-
[EMAIL PROTECTED]
>
------------------------------------------------------------
---------
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]