summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-01-27 08:34:52 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-01-27 08:34:52 +0100
commitef99aad5868b308e1a421c3eaa8221f8f78d80d5 (patch)
tree82c72e55688a80025d256921a17f313689eccb8b /bridges
parent0a25aa68abfba0582aa5d9fa84d4fd71711d62e9 (diff)
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
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx12
1 files changed, 9 insertions, 3 deletions
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 ada36234eefd..65ca1ee20e9a 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(),