summaryrefslogtreecommitdiff
path: root/sfx2/inc
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-06-30 13:26:59 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2021-06-30 18:40:27 +0200
commit7cbd6d768d282077053c354254315f3dc89bf254 (patch)
tree4597c9027fa53e63dd6418adc98241bd1c2601f6 /sfx2/inc
parent738f7a8cb971a884f74766da0cbf7e59ef8b90e7 (diff)
sfx2: try to fix lifecycle of SfxOfficeDispatch
This can be created either from the global SfxApplication, or from a SfxViewFrame. Particularly in the latter case, the SfxDispatcher and SfxBindings members are owned by SfxViewFrame, so in case that is destroyed, the SfxOfficeDispatch must clear its pointers. It looks like the member pointers are checked before access already everywhere, so just listen at the SfxViewFrame. Change-Id: If08825734e94dd54e32cb77546684fd583c336ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118162 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sfx2/inc')
-rw-r--r--sfx2/inc/unoctitm.hxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sfx2/inc/unoctitm.hxx b/sfx2/inc/unoctitm.hxx
index 805ff22b3124..9e6bc19da488 100644
--- a/sfx2/inc/unoctitm.hxx
+++ b/sfx2/inc/unoctitm.hxx
@@ -25,6 +25,7 @@
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/weakref.hxx>
+#include <svl/lstner.hxx>
#include <sfx2/ctrlitem.hxx>
#include <osl/mutex.hxx>
@@ -101,7 +102,9 @@ public:
SfxDispatcher* GetDispatcher_Impl();
};
-class SfxDispatchController_Impl final : public SfxControllerItem
+class SfxDispatchController_Impl final
+ : public SfxControllerItem
+ , public SfxListener
{
css::util::URL aDispatchURL;
SfxDispatcher* pDispatcher;
@@ -126,6 +129,8 @@ public:
const css::util::URL& rURL );
virtual ~SfxDispatchController_Impl() override;
+ virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
+
static OUString getSlaveCommand( const css::util::URL& rURL );
void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState, SfxSlotServer const * pServ );