How can I insert text (or anything) at the cursor's position?
I've recovered the cursor position doing this:
mxRemoteServiceManager = getRemoteServiceManager();
Object desktop =
mxRemoteServiceManager.createInstanceWithContext(com.sun.star.frame.Des
ktop, mxRemoteContext);
XDesktop xDesktop =
Hi Joan,
But now, how I manage to write something in that position?
I use the method below to paste text on the position of a bookmark. You
will also find the answer to you question in the developers guide.
Greetings, Tobias
-%-
/**
* Sets the Cursor to a bookmark position and
for it?
(Imagine OO embedded into an applet and when you click a button, some
text is inserted where the cursor was)
Joan
-Mensaje original-
De: Tobias Krais [mailto:[EMAIL PROTECTED]
Enviado el: lunes, 13 de noviembre de 2006 13:23
Para: dev@api.openoffice.org
Asunto: Re: [api-dev] Newbie inserting
Hi
Do you mean the TextDocuments.java in the guide? It works fine if you
want to go to the start, then jump some sentences and a few words and
then write. But I'd like to write where the cursor (the blinking one)
is, do you think it's possible? Or... Can anybody tell me where to look
for it?
in the grey selection that is shown in the
document?
Thx in advance,
Joan
-Mensaje original-
De: Alamo Vallejo, Joan
Enviado el: lunes, 13 de noviembre de 2006 14:12
Para: dev@api.openoffice.org
Asunto: RE: [api-dev] Newbie inserting text where the cursor is (java)
Do you mean