OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

XDispatchProvider - .uno:Print - behaviour changed ...

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
parc
Power User
Power User


Joined: 09 Nov 2007
Posts: 55
Location: Hamburg

PostPosted: Wed Feb 02, 2011 12:52 pm    Post subject: XDispatchProvider - .uno:Print - behaviour changed ... Reply with quote

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
View user's profile Send private message Visit poster's website
darwinwhaley
Newbie
Newbie


Joined: 01 Mar 2011
Posts: 2

PostPosted: Tue Mar 01, 2011 1:14 pm    Post subject: uno:print issues Reply with quote

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
View user's profile Send private message
parc
Power User
Power User


Joined: 09 Nov 2007
Posts: 55
Location: Hamburg

PostPosted: Thu Mar 03, 2011 1:34 am    Post subject: Re: uno:print issues Reply with quote

I opened a bug report: http://openoffice.org/bugzilla/show_bug.cgi?id=117180

darwinwhaley wrote:
I am seeing the same behavior, Parc.
Back to top
View user's profile Send private message Visit poster's website
darwinwhaley
Newbie
Newbie


Joined: 01 Mar 2011
Posts: 2

PostPosted: Thu Mar 03, 2011 5:56 am    Post subject: Reply with quote

Thank you, Parc!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group