Apache OpenOffice (AOO) Bugzilla – Issue 104476
Request for standardized QuickStarter control interface.
Last modified: 2014-02-04 12:48:34 UTC
When creating an installer for an extension I was trying to find a way to close the Quickstarter on Windows before installing or upgrading the extension. The reason I need to completely close OpenOffice before installing the extension is that an extension upgrade may be blocked if the extension is loaded by OpenOffice - it is using a DLL and the Quickstarter may keep that extension DLL loaded. You can follow the discussion at http://api.openoffice.org/servlets/ReadMsg?list=dev&msgNo=21638 where the apparently unpublished interface "com.sun.star.office.Quickstart" is being used. Is there a chance that this interface may become standardized across platforms and published so there is a clean way of making the Quickstarter exit ? Currently I have regressed to a good-old PostMessage() routine after diving into the source at http://svn.services.openoffice.org/opengrok/xref/DEV300_m55/sfx2/source/appl/shutdowniconw32.cxx and found a working Windows-only,probably-OOo-version-specific solution that way - code follows. Delphi code to close the Quickstarter on Windows: const QUICKSTART_CLASSNAME = 'SO Listener Class'; // QUICKSTART_WINDOWNAME = 'SO Listener Window'; // The window name of the listener window is not set to anything // in the OpenOffice Quickstarter that I have running according to Microsoft Spy++. // I run OOO310m11. QUICKSTART_WINDOWNAME = nil; // Window name is not set in my OOo 3.1. SHUTDOWN_QUICKSTART_MESSAGE = 'SO KillTray'; procedure TMainForm.PostExitMessageButtonClick(Sender: TObject); var QckStWinHandle: THandle; ShutdownMsg: DWORD; begin QckStWinHandle := FindWindow(QUICKSTART_CLASSNAME, QUICKSTART_WINDOWNAME); if QckStWinHandle = 0 then raise Exception.Create('QuickStarter is not running.'); ShutdownMsg := RegisterWindowMessage( SHUTDOWN_QUICKSTART_MESSAGE ); PostMessage(QckStWinHandle, ShutdownMsg, 0, 0); end;
ab->cd: as discussed
.