summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-06-06 12:34:08 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-06-06 14:30:38 +0200
commit651eea40e6fa80ec0a64adaa0d6ff42bee829dd4 (patch)
tree3d45f9f6b3483a7be85809cbe86ce6ca3e194d63
parent14a27ac51d52c7741c8597a2603d2683572e5254 (diff)
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. Reviewed-on: https://gerrit.libreoffice.org/25961 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit b0d819ac5667a07f629f2acb5d3c542fa76d348b) Conflicts: sw/source/uibase/inc/unodispatch.hxx Change-Id: I92897f2c8baa264dc9ccbc11b63f415da30a910d
-rw-r--r--sw/source/uibase/inc/unodispatch.hxx7
-rw-r--r--sw/source/uibase/uno/unodispatch.cxx10
2 files changed, 16 insertions, 1 deletions
diff --git a/sw/source/uibase/inc/unodispatch.hxx b/sw/source/uibase/inc/unodispatch.hxx
index 3871d3c18257..952fc7535d19 100644
--- a/sw/source/uibase/inc/unodispatch.hxx
+++ b/sw/source/uibase/inc/unodispatch.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/view/XSelectionChangeListener.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
+#include <com/sun/star/frame/XInterceptorInfo.hpp>
#include <cppuhelper/implbase.hxx>
#include <list>
#include <vcl/svapp.hxx>
@@ -35,7 +36,8 @@ class SwXDispatchProviderInterceptor : public cppu::WeakImplHelper
<
::com::sun::star::frame::XDispatchProviderInterceptor,
::com::sun::star::lang::XEventListener,
- ::com::sun::star::lang::XUnoTunnel
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::frame::XInterceptorInfo
>
{
class DispatchMutexLock_Impl
@@ -83,6 +85,9 @@ public:
static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+ // XInterceptorInfo
+ virtual css::uno::Sequence<OUString> 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 07f783ae3bbf..ffd41e837025 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<OUString> SAL_CALL SwXDispatchProviderInterceptor::getInterceptedURLs() throw (uno::RuntimeException, std::exception)
+{
+ uno::Sequence<OUString> 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)
{