[Libreoffice-commits] core.git: Branch 'feature/cib_contract935' - 3 commits - desktop/Executable_soffice_bin.mk framework/inc framework/source

Thorsten Behrens Thorsten.Behrens at CIB.de
Tue Mar 13 13:30:35 UTC 2018


 desktop/Executable_soffice_bin.mk                |    2 +-
 framework/inc/dispatch/interceptionhelper.hxx    |    4 ++++
 framework/source/dispatch/interceptionhelper.cxx |   19 ++++++++++++++++++-
 3 files changed, 23 insertions(+), 2 deletions(-)

New commits:
commit eacb222cac1883c98da4a76b235916f5eda1a82f
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date:   Tue Mar 13 14:28:29 2018 +0100

    soffice.bin: increase stack-size tenfold
    
    Due to recursive UNO calls, and the bridges putting UNO data structs
    on the stack via alloca, need more space here.
    
    Change-Id: I0360e6c1baff84902bb5d6a82e8097996b66675c

diff --git a/desktop/Executable_soffice_bin.mk b/desktop/Executable_soffice_bin.mk
index f18e9dcd1fd8..a314aed72f0f 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -43,7 +43,7 @@ $(eval $(call gb_Executable_add_nativeres,soffice_bin,sofficebin/officeloader))
 ifeq ($(COM),MSC)
 
 $(eval $(call gb_Executable_add_ldflags,soffice_bin,\
-    /STACK:10000000 \
+    /STACK:100000000 \
 ))
 
 endif
commit 0aa69524ab15aa9c1d89d64d3d0347301b073e52
Author: Thorsten Behrens <thorsten.behrens at cib.de>
Date:   Thu Feb 25 12:06:56 2016 +0100

    Make last interceptor be the first in the list.
    
    This prevents the swriter dispatchinterceptor from being
    the first that's called, then calling out to java
    
    Change-Id: I22533511645d33ac80ea3b45b0c6138d67669902

diff --git a/framework/source/dispatch/interceptionhelper.cxx b/framework/source/dispatch/interceptionhelper.cxx
index 9d4f6da03631..c7ef6cf62448 100644
--- a/framework/source/dispatch/interceptionhelper.cxx
+++ b/framework/source/dispatch/interceptionhelper.cxx
@@ -25,7 +25,7 @@
 
 namespace framework{
 
-bool InterceptionHelper::m_bPreferrFirstInterceptor = true;
+bool InterceptionHelper::m_bPreferrFirstInterceptor = false;
 
 InterceptionHelper::InterceptionHelper(const css::uno::Reference< css::frame::XFrame >&            xOwner,
                                        const css::uno::Reference< css::frame::XDispatchProvider >& xSlave)
commit 8485fec269179cd0f19ddb46c13d823cab7d5c8b
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date:   Tue Mar 13 14:24:03 2018 +0100

    Revert "tdf#96949 Remove global m_bPreferrFirstInterceptor"
    
    This reverts commit 5d4f1f6f630d4382679087a4fb0da364c9c9692b.
    
    Change-Id: Iad47f0658900e9f548f83314976ac67cb4b20828

diff --git a/framework/inc/dispatch/interceptionhelper.hxx b/framework/inc/dispatch/interceptionhelper.hxx
index 7462303abb1f..ee6ae9db1b97 100644
--- a/framework/inc/dispatch/interceptionhelper.hxx
+++ b/framework/inc/dispatch/interceptionhelper.hxx
@@ -142,6 +142,10 @@ 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 f3736dee80e5..9d4f6da03631 100644
--- a/framework/source/dispatch/interceptionhelper.cxx
+++ b/framework/source/dispatch/interceptionhelper.cxx
@@ -25,6 +25,8 @@
 
 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                       )
@@ -138,7 +140,22 @@ void SAL_CALL InterceptionHelper::registerDispatchProviderInterceptor(const css:
     //    It's slave and it's master must be valid references ...
     //    because we created it.
 
-    // insert it before any other existing interceptor - means at the beginning of our list.
+    // 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)
+    {
+        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);
+    }
+
+    // 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;


More information about the Libreoffice-commits mailing list