Apache OpenOffice (AOO) Bugzilla – Issue 75226
Extensin Manager: startExecuteModal not properly implemented.
Last modified: 2013-08-07 15:31:14 UTC
The service com.sun.star.deployment.ui.PackageManagerDialog implements com.sun.star.ui.dialogs.XAsynchronousExecutableDialog. To start the dialog one has to call XAsynchronousExecutableDialog.startExecuteModal. This call must not block and return immediately. The function takes an XDialogClosedListener which is called by the implementation when the dialog has closed. The current implementation of startExecuteModal blocks in the case when the service needs to start VCL itself, for example, because it was used from unopkg.exe and no office is runnging. Then the call to Application::Execute prevents the return of startExecuteModal. When the dialog is closed and Application::Execute returns then the XDialogClosedListener is called correctly. When the service is created in an office process then Application::Execute is not called and immedialted XDialogClosedListener.dialogClosed is called. This is wrong, because the dialog is still open. So there are actually two issues here. First, startExecuteModal may block and second dialogClosed may be called too early. To fix this one could move the initialization of VCL out of the service into unopkg or consequently use the AWT.
Created attachment 43596 [details] basic code which installe an extension
The basic code demonstrates that the listener is called too early. The path to the extension needs to be adapted.
Retargeted to 2.4
Retargeted to 3.0.
.