diff options
author | shubhamtibra <shubh.tibra@gmail.com> | 2016-01-16 21:50:24 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-01 17:00:16 +0200 |
commit | 6f99f4f201e3bd9216d5ec46934473ba1ab0850c (patch) | |
tree | b5df458afe255dc223a98a0dde279a0b1d40df08 | |
parent | 47868edf430cd3917c3591f4eb30ccc6487ddddf (diff) |
tdf#96949 Remove global static variable m_bPreferrFirstInterceptor and unused code
Remove global static variable "m_bPreferrFirstInterceptor" which is always true,
and remove the ifs where it is false.
Change-Id: I54dcea7a6010c825a66020ec3f7448bb32d120b8
Reviewed-on: https://gerrit.libreoffice.org/21519
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
(cherry picked from commit 5d4f1f6f630d4382679087a4fb0da364c9c9692b)
-rw-r--r-- | framework/inc/dispatch/interceptionhelper.hxx | 4 | ||||
-rw-r--r-- | framework/source/dispatch/interceptionhelper.cxx | 19 |
2 files changed, 1 insertions, 22 deletions
diff --git a/framework/inc/dispatch/interceptionhelper.hxx b/framework/inc/dispatch/interceptionhelper.hxx index e032017d280c..cfbfd96ac81e 100644 --- a/framework/inc/dispatch/interceptionhelper.hxx +++ b/framework/inc/dispatch/interceptionhelper.hxx @@ -143,10 +143,6 @@ class InterceptionHelper : public ::cppu::WeakImplHelper3< /** @short contains all registered interceptor objects. */ InterceptorList m_lInterceptionRegs; - /** @short it regulates, which interceptor is used first. - The last or the first registered one. */ - static bool m_bPreferrFirstInterceptor; - // native interface public: diff --git a/framework/source/dispatch/interceptionhelper.cxx b/framework/source/dispatch/interceptionhelper.cxx index 49ff66cd01f1..ca438acb1079 100644 --- a/framework/source/dispatch/interceptionhelper.cxx +++ b/framework/source/dispatch/interceptionhelper.cxx @@ -25,8 +25,6 @@ namespace framework{ -bool InterceptionHelper::m_bPreferrFirstInterceptor = true; - InterceptionHelper::InterceptionHelper(const css::uno::Reference< css::frame::XFrame >& xOwner, const css::uno::Reference< css::frame::XDispatchProvider >& xSlave) : m_xOwnerWeak (xOwner ) @@ -134,9 +132,8 @@ void SAL_CALL InterceptionHelper::registerDispatchProviderInterceptor(const css: // because we created it. But we have to look for the static bool which // regulate direction of using of interceptor objects! - // b1) If "m_bPreferrFirstInterceptor" is set to true, we have to // insert it behind any other existing interceptor - means at the end of our list. - else if (m_bPreferrFirstInterceptor) + else { css::uno::Reference< css::frame::XDispatchProvider > xMasterD = m_lInterceptionRegs.rbegin()->xInterceptor; css::uno::Reference< css::frame::XDispatchProviderInterceptor > xMasterI (xMasterD, css::uno::UNO_QUERY); @@ -148,20 +145,6 @@ void SAL_CALL InterceptionHelper::registerDispatchProviderInterceptor(const css: m_lInterceptionRegs.push_back(aInfo); } - // b2) If "m_bPreferrFirstInterceptor" is set to false, we have to - // insert it before any other existing interceptor - means at the beginning of our list. - else - { - 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(xThis ); - xInterceptor->setSlaveDispatchProvider (xSlaveD ); - xSlaveI->setMasterDispatchProvider (aInfo.xInterceptor); - - m_lInterceptionRegs.push_front(aInfo); - } - css::uno::Reference< css::frame::XFrame > xOwner(m_xOwnerWeak.get(), css::uno::UNO_QUERY); aWriteLock.clear(); |