summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/inc/dispatch/dispatchprovider.hxx2
-rw-r--r--framework/inc/dispatch/interceptionhelper.hxx2
-rw-r--r--framework/source/services/frame.cxx11
3 files changed, 15 insertions, 0 deletions
diff --git a/framework/inc/dispatch/dispatchprovider.hxx b/framework/inc/dispatch/dispatchprovider.hxx
index 3b544807337c..c6656948ebee 100644
--- a/framework/inc/dispatch/dispatchprovider.hxx
+++ b/framework/inc/dispatch/dispatchprovider.hxx
@@ -88,6 +88,8 @@ class DispatchProvider final : public ::cppu::WeakImplHelper< css::frame::XDispa
sal_Int32 nSearchFlags ) override;
virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches( const css::uno::Sequence< css::frame::DispatchDescriptor >& lDescriptions ) override;
+ void ClearProtocolHandlers() { m_aProtocolHandlers.clear(); }
+
/* helper */
private:
// Let him protected! So nobody can use us as base ...
diff --git a/framework/inc/dispatch/interceptionhelper.hxx b/framework/inc/dispatch/interceptionhelper.hxx
index 391986ff549f..681f69c6d013 100644
--- a/framework/inc/dispatch/interceptionhelper.hxx
+++ b/framework/inc/dispatch/interceptionhelper.hxx
@@ -244,6 +244,8 @@ class InterceptionHelper final : public ::cppu::WeakImplHelper<
*/
virtual void SAL_CALL disposing(const css::lang::EventObject& aEvent) override;
+ css::uno::Reference<css::frame::XDispatchProvider> GetSlave() const { return m_xSlave; }
+
}; // class InterceptionHelper
} // namespace framework
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 7e8ea9b8823b..b658874b865f 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -1473,6 +1473,17 @@ sal_Bool SAL_CALL XFrameImpl::setComponent(const css::uno::Reference< css::awt::
{
SolarMutexGuard aWriteLock;
m_xController = nullptr;
+
+ auto pInterceptionHelper = dynamic_cast<InterceptionHelper*>(m_xDispatchHelper.get());
+ if (pInterceptionHelper)
+ {
+ css::uno::Reference<css::frame::XDispatchProvider> xDispatchProvider = pInterceptionHelper->GetSlave();
+ auto pDispatchProvider = dynamic_cast<DispatchProvider*>(xDispatchProvider.get());
+ if (pDispatchProvider)
+ {
+ pDispatchProvider->ClearProtocolHandlers();
+ }
+ }
}
/* } SAFE */