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 = (XDesktop)UnoRuntime.queryInterface(XDesktop.class,
desktop);
XComponent xCurrentComponent = xDesktop.getCurrentComponent();
XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class,
xCurrentComponent);
XController xController = xModel.getCurrentController();
XTextViewCursorSupplier xViewCursorSupplier =
(XTextViewCursorSupplier)UnoRuntime.queryInterface(XTextViewCursorSuppli
er.class, xController);                         
XTextViewCursor xViewCursor = xViewCursorSupplier.getViewCursor();

But now, how I manage to write something in that position?

Joan

This e-mail may contain confidential or privileged information. Any unauthorised
copying, use or distribution of this information is strictly prohibited.

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

Reply via email to