| View previous topic :: View next topic |
| Author |
Message |
parc Power User

Joined: 09 Nov 2007 Posts: 55 Location: Hamburg
|
Posted: Wed Feb 02, 2011 12:52 pm Post subject: XDispatchProvider - .uno:Print - behaviour changed ... |
|
|
I noticed, that the behaviour of the following code changed from 3.2.x to 3.3:
| Code: | XFrame aFrame = this.aOOoInstance.mxDocument.getCurrentController().getFrame();
XDispatchHelper aDispatchHelper = (XDispatchHelper) this.aOOoInstance.mxMSFactory.createInstance("com.sun.star.frame.DispatchHelper");
aDispatchHelper.executeDispatch((XDispatchProvider) aFrame, ".uno:Print", "", 0, new PropertyValue[0]);
return;
|
Up to 3.2.1 the executeDispatch was a blocking call - that means, that return is executed, if the dispatched command has been finished.
With 3.3. the dispatched command is executed asynchronous ...
We used this stuff to offer the user to print out a document with a hidden OpenOffice and only the printer dialog comes up, then the user selected the printer, the document was printed and we could close the application from our application again.
This is not possible any more, because the printer dialog is opened, our main application carries on at once and closes the document - and does not get any veto from swriter.
Then the user selects a printer and swriter crashes hard .... |
|
| Back to top |
|
 |
darwinwhaley Newbie

Joined: 01 Mar 2011 Posts: 2
|
Posted: Tue Mar 01, 2011 1:14 pm Post subject: uno:print issues |
|
|
| I am seeing the same behavior, Parc. It is problematic because we update a field in our application after the method returns successfully. Now, that field is not being updated. Can anyone clarify what new method we should be calling, or how we know that the print command completed successfully? |
|
| Back to top |
|
 |
parc Power User

Joined: 09 Nov 2007 Posts: 55 Location: Hamburg
|
|
| Back to top |
|
 |
darwinwhaley Newbie

Joined: 01 Mar 2011 Posts: 2
|
Posted: Thu Mar 03, 2011 5:56 am Post subject: |
|
|
| Thank you, Parc! |
|
| Back to top |
|
 |
|