Hello ashok,
you forgot to define the needed set of properties.
Where InsertText should retrieve the text for inserting ?
BTW: Using the dispatch API in combination with ".uno:" URLs
isnt a stable feature. Means the dispatch API itself will be
stable ... but the implementation of such ".uno:" Command
can be changed ... because it's a direct link to the underlying
application core.
The right way to work with a model is using of it's normal UNO API.
Regards
Andreas
Hello there:
I have a Java UNO client application, which connects to an instance of
OOo and sends dispatches using executeDispatch(). Unfortunately
nothing happens, and I dont get an exception or an error message, in
fact everything seems to run smoothly only that nothing happens to the
document (I tried sending simple .uno:StyleApply and .uno:InsertText
dispatches....).
What could be the problem? Is it something to do with the Java UNO
client and OOo running as different processes ?
Here is the code for the dispatch :
try {
final XModel docModel = this.getDocumentModel();
XController docController = docModel.getCurrentController();
final XFrame docFrame = docController.getFrame();
XDispatchProvider docDispatchProvider =
ooQueryInterface.XDispatchProvider(docFrame);
final Object oDispatchHelper =
this.getRemoteServiceManager().createInstanceWithContext("com.sun.star.frame.DispatchHelper",
this.m_xComponentContext);
if (oDispatchHelper == null )
log.debug("executeDispatch oDispatchHelper is null!!");
XDispatchHelper xdispatchHelper =
ooQueryInterface.XDispatchHelper(oDispatchHelper);
xdispatchHelper.executeDispatch(docDispatchProvider, cmd, "",
0, oProperties);
} catch (com.sun.star.uno.Exception ex){
log.debug("error in exeucteDispatch "
+ex.getLocalizedMessage(), ex);
}
thanks
Ashok
---------------------------------------------------------------------
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]