[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - bridges/source

Stephan Bergmann sbergman at redhat.com
Wed Jan 27 04:40:28 PST 2016


 bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

New commits:
commit b7937f1caf86cb68ba8d9b04fb4069934a754cf1
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jan 27 08:34:52 2016 +0100

    Quickfix for Win 64-bit C++ UNO bridge (more than 20 params)
    
    See <https://wiki.documentfoundation.org/Development/msvc-x86_64#Broken_C.2B.2B-UNO_Bridge>,
    increase the number of supported params to 32 to at least make the
    ooo.vba.excel.XApplication.Intersect case (and thus CppunitTest_sc_macros_test)
    work.  The true fix will be to abandon this simplistic approach, as elegant as
    it may have appeared.
    
    Change-Id: Ieeb17f682bd5ea8cb7a6188b89978698949461aa
    (cherry picked from commit ef99aad5868b308e1a421c3eaa8221f8f78d80d5)
    Reviewed-on: https://gerrit.libreoffice.org/21834
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: David Tardon <dtardon at redhat.com>

diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx
index ada3623..65ca1ee 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx
@@ -52,7 +52,7 @@ static bool cpp_call(
     void * pUnoArgs[],
     uno_Any ** ppUnoExc ) throw ()
 {
-    const int MAXPARAMS = 20;
+    const int MAXPARAMS = 32;
 
     if ( nParams > MAXPARAMS )
     {
@@ -206,14 +206,20 @@ static bool cpp_call(
                           aCppParams[4].i, aCppParams[5].i, aCppParams[6].i, aCppParams[7].i,
                           aCppParams[8].i, aCppParams[9].i, aCppParams[10].i, aCppParams[11].i,
                           aCppParams[12].i, aCppParams[13].i, aCppParams[14].i, aCppParams[15].i,
-                          aCppParams[16].i, aCppParams[17].i, aCppParams[18].i, aCppParams[19].i );
+                          aCppParams[16].i, aCppParams[17].i, aCppParams[18].i, aCppParams[19].i,
+                          aCppParams[20].i, aCppParams[21].i, aCppParams[22].i, aCppParams[23].i,
+                          aCppParams[24].i, aCppParams[25].i, aCppParams[26].i, aCppParams[27].i,
+                          aCppParams[28].i, aCppParams[29].i, aCppParams[30].i, aCppParams[31].i );
         else
             uRetVal.i =
                 pIMethod (aCppParams[0].i, aCppParams[1].d, aCppParams[2].d, aCppParams[3].d,
                           aCppParams[4].i, aCppParams[5].i, aCppParams[6].i, aCppParams[7].i,
                           aCppParams[8].i, aCppParams[9].i, aCppParams[10].i, aCppParams[11].i,
                           aCppParams[12].i, aCppParams[13].i, aCppParams[14].i, aCppParams[15].i,
-                          aCppParams[16].i, aCppParams[17].i, aCppParams[18].i, aCppParams[19].i );
+                          aCppParams[16].i, aCppParams[17].i, aCppParams[18].i, aCppParams[19].i,
+                          aCppParams[20].i, aCppParams[21].i, aCppParams[22].i, aCppParams[23].i,
+                          aCppParams[24].i, aCppParams[25].i, aCppParams[26].i, aCppParams[27].i,
+                          aCppParams[28].i, aCppParams[29].i, aCppParams[30].i, aCppParams[31].i );
     }
     __except (CPPU_CURRENT_NAMESPACE::mscx_filterCppException(
                   GetExceptionInformation(),


More information about the Libreoffice-commits mailing list