From f09f52e4add4999264bbf960a3a7af6a6b7a8285 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Fri, 21 Sep 2012 14:29:16 +0300 Subject: [PATCH] Need also uno_ext_getMapping for Java when DISABLE_DYNLOADING Change-Id: I65f09e54c80df4e96e24548692eeb3a57e1de517 --- bridges/source/jni_uno/jni_bridge.cxx | 4 ++++ cppu/inc/uno/mapping.h | 10 ++++++++++ cppu/source/uno/lbmap.cxx | 5 +++++ 3 files changed, 19 insertions(+) diff --git a/bridges/source/jni_uno/jni_bridge.cxx b/bridges/source/jni_uno/jni_bridge.cxx index f8fdbce87875..f9cfffcc5ad3 100644 --- a/bridges/source/jni_uno/jni_bridge.cxx +++ b/bridges/source/jni_uno/jni_bridge.cxx @@ -474,6 +474,10 @@ void SAL_CALL uno_initEnvironment( uno_Environment * java_env ) machine->acquire(); } +#ifdef DISABLE_DYNLOADING +#define uno_ext_getMapping java_uno_ext_getMapping +#endif + //------------------------------------------------------------------------------ void SAL_CALL uno_ext_getMapping( uno_Mapping ** ppMapping, uno_Environment * pFrom, uno_Environment * pTo ) diff --git a/cppu/inc/uno/mapping.h b/cppu/inc/uno/mapping.h index 7d021790e209..1f3828a597d3 100644 --- a/cppu/inc/uno/mapping.h +++ b/cppu/inc/uno/mapping.h @@ -193,6 +193,16 @@ void SAL_CALL CPPU_ENV_uno_ext_getMapping( struct _uno_Environment * pFrom, struct _uno_Environment * pTo ) SAL_THROW_EXTERN_C(); + +#ifdef SOLAR_JAVA +/* This is the uno_ext_getMapping function in the Java/UNO bridge */ +void SAL_CALL java_uno_ext_getMapping( + struct _uno_Mapping ** ppMapping, + struct _uno_Environment * pFrom, + struct _uno_Environment * pTo ) + SAL_THROW_EXTERN_C(); +#endif + #endif #ifdef __cplusplus diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx index 2720811d0bea..e6892d453d9d 100644 --- a/cppu/source/uno/lbmap.cxx +++ b/cppu/source/uno/lbmap.cxx @@ -329,6 +329,11 @@ static uno_ext_getMappingFunc selectMapFunc( const OUString & rBridgeName ) { if (rBridgeName.equalsAscii( CPPU_CURRENT_LANGUAGE_BINDING_NAME "_uno" )) return CPPU_ENV_uno_ext_getMapping; +#ifdef SOLAR_JAVA + if (rBridgeName.equalsAscii( "java" "_uno" )) + return java_uno_ext_getMapping; +#endif + #if 0 // I don't think the affine or log bridges will be needed on any // DISABLE_DYNLOADING platform (iOS at least, possibly Android), but if