https://bugs.documentfoundation.org/show_bug.cgi?id=166751
--- Comment #6 from Mike Kaganski <[email protected]> --- Strictly speaking, this is not a bug. The previous behavior was incorrect. As explained in the documentation of the XDispatch::dispatch() method [1], which is what eventually gets run when XDispatchHelper::executeDispatch is called: > By default, and absent any arguments, "SynchronMode" is considered FALSE and > the execution is performed asynchronously (i.e. dispatch() returns > immediately, > and the action is performed in the background). But when set to TRUE, > dispatch() > processes the request synchronously". So the change that Noel has implemented can be seen as an *improvement* and making the default processing to comply with the specification. But the following code, which should be the actual subject of this bug, also calls MessageBox immediately, and doesn't wait for the .uno:InsertSheetFromFile to finish: Sub testSyncDispatch document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") Dim sync(0) As New com.sun.star.beans.PropertyValue sync(0).Name = "SynchronMode" sync(0).Value = true dispatcher.executeDispatch(document, ".uno:InsertSheetFromFile", "", 0, sync()) MsgBox "Done" end sub So it should be worded something like "dispatch doesn't honor SynchronMode". [1] https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1frame_1_1XDispatch.html#a42beb1ea2ddae35c076b6e65867025ea -- You are receiving this mail because: You are the assignee for the bug.
