diff options
author | Jan-Marek Glogowski <jan-marek.glogowski@extern.cib.de> | 2020-02-14 20:24:04 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2020-02-22 09:14:52 +0100 |
commit | f0a50d230756fc0a60780d992b807f9eb82106c2 (patch) | |
tree | e0d8d927c79190d52928919a1309abb5d6c9a9c0 /desktop | |
parent | 4fe30879af391c32074a003a7a6ddd45431d212a (diff) |
tdf#127205 split Desktop::terminate process
Trying to somehow keep stuff correctly alive, truned out to be
rather futile. Originally I tried the same way Caolan did in the
attached patch to tdf#88985, when he finally settled on adding a
special terminate listener.
But this is not enough to handle in-process scripted extensions,
like Java, Python or even Basic macros themself.
So this separates the module shutdown and SfxApplication cleanup
from the rest of the terminate call.
Change-Id: Ice59816080c922a17511b68afe59348a662600c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88835
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/inc/app.hxx | 1 | ||||
-rw-r--r-- | desktop/source/app/app.cxx | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx index 1dc5f8a790ab..4e61b58e7422 100644 --- a/desktop/inc/app.hxx +++ b/desktop/inc/app.hxx @@ -75,6 +75,7 @@ class Desktop final : public Application virtual void InitFinished() override; virtual void DeInit() override; virtual bool QueryExit() override; + virtual void Shutdown() override; virtual void Exception(ExceptionCategory nCategory) override; virtual void OverrideSystemSettings( AllSettings& rSettings ) override; virtual void AppEvent( const ApplicationEvent& rAppEvent ) override; diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 6d0fe6e0cb48..c00885433eac 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -76,6 +76,7 @@ #include <com/sun/star/office/Quickstart.hpp> #include <com/sun/star/system/XSystemShellExecute.hpp> #include <com/sun/star/system/SystemShellExecute.hpp> +#include <com/sun/star/frame/XDesktopInternal.hpp> #include <desktop/exithelper.h> #include <sal/log.hxx> @@ -606,6 +607,13 @@ bool Desktop::QueryExit() return bExit; } +void Desktop::Shutdown() +{ + Reference<XDesktop2> xDesktop = css::frame::Desktop::create(::comphelper::getProcessComponentContext()); + Reference<XDesktopInternal> xDesktopInternal(xDesktop, UNO_QUERY_THROW); + xDesktopInternal->shutdown(); +} + void Desktop::HandleBootstrapPathErrors( ::utl::Bootstrap::Status aBootstrapStatus, const OUString& aDiagnosticMessage ) { if ( aBootstrapStatus != ::utl::Bootstrap::DATA_OK ) |