From b0d819ac5667a07f629f2acb5d3c542fa76d348b Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 6 Jun 2016 12:34:08 +0200 Subject: SwXDispatchProviderInterceptor: implement frame::XInterceptorInfo With this, framework::InterceptionHelper can make a better decision what interceptor to call: it can avoid calling SwXDispatchProviderInterceptor when the sw code would just call the previous interceptor anyway. Change-Id: I92897f2c8baa264dc9ccbc11b63f415da30a910d Reviewed-on: https://gerrit.libreoffice.org/25961 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sw/source/uibase/inc/unodispatch.hxx | 7 ++++++- sw/source/uibase/uno/unodispatch.cxx | 10 ++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'sw') diff --git a/sw/source/uibase/inc/unodispatch.hxx b/sw/source/uibase/inc/unodispatch.hxx index 0124c2edc404..d7411512a1f5 100644 --- a/sw/source/uibase/inc/unodispatch.hxx +++ b/sw/source/uibase/inc/unodispatch.hxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -35,7 +36,8 @@ class SwXDispatchProviderInterceptor : public cppu::WeakImplHelper < css::frame::XDispatchProviderInterceptor, css::lang::XEventListener, - css::lang::XUnoTunnel + css::lang::XUnoTunnel, + css::frame::XInterceptorInfo > { class DispatchMutexLock_Impl @@ -82,6 +84,9 @@ public: static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId(); virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw(css::uno::RuntimeException, std::exception) override; + // XInterceptorInfo + virtual css::uno::Sequence SAL_CALL getInterceptedURLs() throw (css::uno::RuntimeException, std::exception) override; + // view destroyed void Invalidate(); }; diff --git a/sw/source/uibase/uno/unodispatch.cxx b/sw/source/uibase/uno/unodispatch.cxx index 985f28387e2b..3335eebc4dfd 100644 --- a/sw/source/uibase/uno/unodispatch.cxx +++ b/sw/source/uibase/uno/unodispatch.cxx @@ -88,6 +88,16 @@ uno::Reference< frame::XDispatch > SwXDispatchProviderInterceptor::queryDispatch return xResult; } +uno::Sequence SAL_CALL SwXDispatchProviderInterceptor::getInterceptedURLs() throw (uno::RuntimeException, std::exception) +{ + uno::Sequence aRet = + { + OUString(".uno:DataSourceBrowser/*") + }; + + return aRet; +} + uno::Sequence< uno::Reference< frame::XDispatch > > SwXDispatchProviderInterceptor::queryDispatches( const uno::Sequence< frame::DispatchDescriptor >& aDescripts ) throw(uno::RuntimeException, std::exception) { -- cgit