summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2016-05-20 16:48:00 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-06-01 17:00:16 +0200
commit7283f2e2ddb7a2b7dac2d2a2417a1de866eb7124 (patch)
tree46762f7563ef4717607c2f694edb41e1aa50cc70 /framework
parentc87170c8d3c206722a5b2bb2c2eb826abac06608 (diff)
framework: last dispatchInterceptor gets asked first
Align implementation with API contract as spelled out in offapi/com/sun/star/frame/XDispatchProviderInterception.idl - no idea why this change happenend in 2003: Date: Fri Apr 4 16:16:05 2003 +0000 INTEGRATION: CWS fwk01 (1.1.72); FILE MERGED 2003/04/01 12:40:09 as 1.1.72.1: #107642# change order of used interception objects At any rate, with this change extensions actually get a chance to see dispatch requests first, and process/ignore at will. Change-Id: I58876150ee6d67e592f41b3e82a9ffc314e091a3 Reviewed-on: https://gerrit.libreoffice.org/25215 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 08cf2fd01064306eef7fdbb5b62320947c4d1089)
Diffstat (limited to 'framework')
-rw-r--r--framework/source/dispatch/interceptionhelper.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/framework/source/dispatch/interceptionhelper.cxx b/framework/source/dispatch/interceptionhelper.cxx
index 4935e3dd9277..6e5ff131fbdb 100644
--- a/framework/source/dispatch/interceptionhelper.cxx
+++ b/framework/source/dispatch/interceptionhelper.cxx
@@ -136,20 +136,19 @@ void SAL_CALL InterceptionHelper::registerDispatchProviderInterceptor(const css:
// b) OK - there is at least one interceptor already registered.
// It's slave and it's master must be valid references ...
- // because we created it. But we have to look for the static bool which
- // regulate direction of using of interceptor objects!
+ // because we created it.
- // insert it behind any other existing interceptor - means at the end of our list.
+ // insert it before any other existing interceptor - means at the beginning of our list.
else
{
- css::uno::Reference< css::frame::XDispatchProvider > xMasterD = m_lInterceptionRegs.rbegin()->xInterceptor;
- css::uno::Reference< css::frame::XDispatchProviderInterceptor > xMasterI (xMasterD, css::uno::UNO_QUERY);
+ css::uno::Reference< css::frame::XDispatchProvider > xSlaveD = m_lInterceptionRegs.begin()->xInterceptor;
+ css::uno::Reference< css::frame::XDispatchProviderInterceptor > xSlaveI (xSlaveD , css::uno::UNO_QUERY);
- xInterceptor->setMasterDispatchProvider(xMasterD );
- xInterceptor->setSlaveDispatchProvider (m_xSlave );
- xMasterI->setSlaveDispatchProvider (aInfo.xInterceptor);
+ xInterceptor->setMasterDispatchProvider(xThis );
+ xInterceptor->setSlaveDispatchProvider (xSlaveD );
+ xSlaveI->setMasterDispatchProvider (aInfo.xInterceptor);
- m_lInterceptionRegs.push_back(aInfo);
+ m_lInterceptionRegs.push_front(aInfo);
}
css::uno::Reference< css::frame::XFrame > xOwner(m_xOwnerWeak.get(), css::uno::UNO_QUERY);