framework/inc/dispatch/interceptionhelper.hxx | 4 ---- framework/source/dispatch/interceptionhelper.cxx | 19 +------------------ 2 files changed, 1 insertion(+), 22 deletions(-)
New commits: commit 5d4f1f6f630d4382679087a4fb0da364c9c9692b Author: shubhamtibra <[email protected]> Date: Sat Jan 16 21:50:24 2016 +0530 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 <[email protected]> Tested-by: jan iversen <[email protected]> diff --git a/framework/inc/dispatch/interceptionhelper.hxx b/framework/inc/dispatch/interceptionhelper.hxx index 3db9b6d..090b981 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 bfb7b57..c09e672 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(); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
