diff options
author | shubhamtibra <shubh.tibra@gmail.com> | 2016-01-16 21:50:24 +0530 |
---|---|---|
committer | jan iversen <jani@documentfoundation.org> | 2016-01-16 17:55:31 +0000 |
commit | 5d4f1f6f630d4382679087a4fb0da364c9c9692b (patch) | |
tree | 17db99a3d7753c9a1e9a9f573b83b70668f04f99 | |
parent | ae33a9f9ebe8b7e54835158a44744b5a4da5bcc5 (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>
-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 3db9b6db1484..090b9812c8ce 100644 --- a/framework/inc/dispatch/interceptionhelper.hxx +++ b/framework/inc/dispatch/interceptionhelper.hxx @@ -142,10 +142,6 @@ class InterceptionHelper : public ::cppu::WeakImplHelper< /** @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 bfb7b578478c..c09e67210908 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(); |