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 /framework/inc | |
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 'framework/inc')
-rw-r--r-- | framework/inc/services/desktop.hxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/framework/inc/services/desktop.hxx b/framework/inc/services/desktop.hxx index ff578c49bb3a..1f0f7911e98f 100644 --- a/framework/inc/services/desktop.hxx +++ b/framework/inc/services/desktop.hxx @@ -30,6 +30,7 @@ #include <com/sun/star/frame/XUntitledNumbers.hpp> #include <com/sun/star/frame/XController.hpp> #include <com/sun/star/frame/XDesktop2.hpp> +#include <com/sun/star/frame/XDesktopInternal.hpp> #include <com/sun/star/frame/XTerminateListener.hpp> #include <com/sun/star/frame/XTask.hpp> #include <com/sun/star/frame/XFramesSupplier.hpp> @@ -89,6 +90,7 @@ enum ELoadState typedef cppu::WeakComponentImplHelper< css::lang::XServiceInfo , css::frame::XDesktop2 , + css::frame::XDesktopInternal, css::frame::XTasksSupplier , css::frame::XDispatchResultListener , // => XEventListener css::task::XInteractionHandler , @@ -283,6 +285,8 @@ class Desktop final : private cppu::BaseMutex, /// @throws css::uno::RuntimeException bool terminateQuickstarterToo(); + virtual void SAL_CALL shutdown() override; + private: // OPropertySetHelper @@ -311,14 +315,11 @@ class Desktop final : private cppu::BaseMutex, * Those list will be used to inform all called listener * about cancel this termination request. * - * @param [out] bVeto - * will be true if at least one listener threw a veto exception; - * false otherwise. + * @return true if no one vetoed the termination. * * @see impl_sendCancelTerminationEvent() */ - void impl_sendQueryTerminationEvent(TTerminateListenerList& lCalledListener, - bool& bVeto ); + bool impl_sendQueryTerminationEvent(TTerminateListenerList& lCalledListener); /** calls cancelTermination() on every termination listener * where queryTermination() was called before. @@ -373,10 +374,14 @@ class Desktop final : private cppu::BaseMutex, mutable TransactionManager m_aTransactionManager; + /** check flag to protect against multiple terminate runs + */ + bool m_bIsTerminated; + /** check flag to protect us against dispose before terminate! * see dispose() for further information! */ - bool m_bIsTerminated; + bool m_bIsShutdown; /** when true, the call came from session manager * the method is Desktop::terminateQuickstarterToo() |