summaryrefslogtreecommitdiff
path: root/bridges/source
diff options
context:
space:
mode:
Diffstat (limited to 'bridges/source')
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_intel/cc50_solaris_intel.hxx2
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_intel/cpp2uno.cxx11
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_intel/except.cxx15
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_intel/hash.cxx5
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx8
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/cc50_solaris_sparc.hxx2
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx23
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx16
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx3
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/hash.cxx5
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/makefile.mk2
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx8
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/callvirtualmethod.hxx3
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.cxx3
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.hxx3
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.hxx3
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/fp.hxx3
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.cxx3
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.hxx3
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx3
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/vtableslotcall.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx660
-rw-r--r--bridges/source/cpp_uno/gcc3_aix_powerpc/except.cxx (renamed from bridges/source/cpp_uno/gcc3_netbsd_intel/except.cxx)153
-rw-r--r--bridges/source/cpp_uno/gcc3_aix_powerpc/makefile.mk (renamed from bridges/source/cpp_uno/gcc3_netbsd_intel/makefile.mk)20
-rw-r--r--bridges/source/cpp_uno/gcc3_aix_powerpc/share.hxx (renamed from bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx)13
-rw-r--r--bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx499
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_intel/call.s268
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx490
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx338
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx444
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_x86-64/abi.cxx803
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_x86-64/abi.hxx67
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_x86-64/call.s93
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_x86-64/cpp2uno.cxx541
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx338
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_x86-64/makefile.mk80
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx90
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx558
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx31
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx8
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_alpha/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_alpha/uno2cpp.cxx14
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx13
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_arm/except.cxx15
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_arm/share.hxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx9
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/call.cxx5
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx31
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx15
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/uno2cpp.cxx9
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx43
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_ia64/except.cxx8
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_ia64/share.hxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx40
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx68
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/except.cxx24
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk8
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/share.hxx9
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx70
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx28
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx15
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_m68k/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx11
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx10
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_mips/except.cxx14
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_mips/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_mips/uno2cpp.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx12
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx6
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx5
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx43
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx6
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx36
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx15
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390/except.cxx8
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390/share.hxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx8
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx31
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx8
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390x/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx14
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx11
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx14
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_sparc/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx10
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx460
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/abi.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx13
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx22
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk8
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx11
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx14
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_intel/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_intel/uno2cpp.cxx7
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx10
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_powerpc/except.cxx6
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_powerpc/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx5
-rw-r--r--bridges/source/cpp_uno/gcc3_netbsd_intel/cpp2uno.cxx563
-rw-r--r--bridges/source/cpp_uno/gcc3_netbsd_intel/share.hxx86
-rw-r--r--bridges/source/cpp_uno/gcc3_netbsd_intel/uno2cpp.cxx433
-rw-r--r--bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx525
-rw-r--r--bridges/source/cpp_uno/gcc3_os2_intel/defs/gcc3_uno.def915
-rw-r--r--bridges/source/cpp_uno/gcc3_os2_intel/except.cxx349
-rw-r--r--bridges/source/cpp_uno/gcc3_os2_intel/makefile.mk73
-rw-r--r--bridges/source/cpp_uno/gcc3_os2_intel/share.hxx90
-rw-r--r--bridges/source/cpp_uno/gcc3_os2_intel/uno2cpp.cxx451
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx11
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx14
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_intel/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx5
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx11
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx14
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_sparc/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx10
-rw-r--r--bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx11
-rw-r--r--bridges/source/cpp_uno/mingw_intel/dllinit.cxx3
-rw-r--r--bridges/source/cpp_uno/mingw_intel/except.cxx14
-rw-r--r--bridges/source/cpp_uno/mingw_intel/share.hxx3
-rw-r--r--bridges/source/cpp_uno/mingw_intel/smallstruct.cxx3
-rw-r--r--bridges/source/cpp_uno/mingw_intel/smallstruct.hxx3
-rw-r--r--bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx5
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx11
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx3
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/except.cxx8
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/makefile.mk2
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/msci.hxx2
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/uno2cpp.cxx5
-rw-r--r--bridges/source/cpp_uno/msvc_win32_x86-64/call.asm133
-rw-r--r--bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx582
-rw-r--r--bridges/source/cpp_uno/msvc_win32_x86-64/dllinit.cxx61
-rw-r--r--bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx850
-rw-r--r--bridges/source/cpp_uno/msvc_win32_x86-64/makefile.mk (renamed from bridges/source/cpp_uno/gcc3_freebsd_intel/makefile.mk)30
-rw-r--r--bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx62
-rw-r--r--bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx450
-rw-r--r--bridges/source/cpp_uno/shared/bridge.cxx3
-rw-r--r--bridges/source/cpp_uno/shared/component.cxx7
-rw-r--r--bridges/source/cpp_uno/shared/component.hxx3
-rw-r--r--bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx3
-rw-r--r--bridges/source/cpp_uno/shared/guardedarray.hxx3
-rw-r--r--bridges/source/cpp_uno/shared/types.cxx3
-rw-r--r--bridges/source/cpp_uno/shared/unointerfaceproxy.cxx3
-rw-r--r--bridges/source/cpp_uno/shared/vtablefactory.cxx34
-rw-r--r--bridges/source/cpp_uno/shared/vtables.cxx3
-rw-r--r--bridges/source/jni_uno/jni_base.h9
-rw-r--r--bridges/source/jni_uno/jni_bridge.cxx22
-rw-r--r--bridges/source/jni_uno/jni_bridge.h3
-rw-r--r--bridges/source/jni_uno/jni_data.cxx47
-rw-r--r--bridges/source/jni_uno/jni_helper.h3
-rw-r--r--bridges/source/jni_uno/jni_info.cxx3
-rw-r--r--bridges/source/jni_uno/jni_info.h7
-rw-r--r--bridges/source/jni_uno/jni_java2uno.cxx18
-rw-r--r--bridges/source/jni_uno/jni_uno2java.cxx26
-rw-r--r--bridges/source/jni_uno/nativethreadpool.cxx3
171 files changed, 4274 insertions, 8672 deletions
diff --git a/bridges/source/cpp_uno/cc50_solaris_intel/cc50_solaris_intel.hxx b/bridges/source/cpp_uno/cc50_solaris_intel/cc50_solaris_intel.hxx
index 7abd0ffa2375..8e938e2c8105 100644
--- a/bridges/source/cpp_uno/cc50_solaris_intel/cc50_solaris_intel.hxx
+++ b/bridges/source/cpp_uno/cc50_solaris_intel/cc50_solaris_intel.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,3 +72,4 @@ void cc50_solaris_intel_fillUnoException(
uno_Any*, uno_Mapping * pCpp2Uno );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc50_solaris_intel/cpp2uno.cxx b/bridges/source/cpp_uno/cc50_solaris_intel/cpp2uno.cxx
index 06df5289bc00..1a57355f4890 100644
--- a/bridges/source/cpp_uno/cc50_solaris_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_intel/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -159,7 +160,7 @@ void cpp2uno_call(
(*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case no exception occured...
+ // in case no exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -178,7 +179,7 @@ void cpp2uno_call(
&aUnoExc, pThis->getBridge()->getUno2Cpp() );
// has to destruct the any
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -250,7 +251,7 @@ extern "C" void cpp_vtable_call(
"### illegal vtable index!" );
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
- throw RuntimeException( rtl::OUString::createFromAscii("illegal vtable index!"), (XInterface *)pThis );
+ throw RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )), (XInterface *)pThis );
}
// determine called method
@@ -339,7 +340,7 @@ extern "C" void cpp_vtable_call(
}
default:
{
- throw RuntimeException( rtl::OUString::createFromAscii("no member description found!"), (XInterface *)pThis );
+ throw RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )), (XInterface *)pThis );
}
}
}
@@ -525,3 +526,5 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
void bridges::cpp_uno::shared::VtableFactory::flushCode(
unsigned char const *, unsigned char const *)
{}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx b/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx
index c598934b81b1..6a9b923a4e26 100644
--- a/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,7 +49,11 @@
#include <hash.cxx>
// need a += operator for OString and sal_Char
-namespace rtl
+using ::rtl::OUString;
+using ::rtl::OString;
+using ::rtl::OStringBuffer;
+using ::rtl::OUStringToOString;
+using ::rtl::OStringToOUString;
{
inline OString& operator+=( OString& rString, sal_Char cAdd )
{
@@ -61,7 +66,6 @@ namespace rtl
using namespace std;
using namespace osl;
-using namespace rtl;
using namespace com::sun::star::uno;
namespace CPPU_CURRENT_NAMESPACE
@@ -333,7 +337,7 @@ void cc50_solaris_intel_raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cp
OUStringToOString(
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
+ fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() );
#endif
bridges::cpp_uno::shared::ArrayPointer< unsigned char > thunkPtr(
new unsigned char[24]);
@@ -428,13 +432,13 @@ void cc50_solaris_intel_fillUnoException(
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString(
aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
return;
}
#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "> c++ exception occured: %s\n",
+ fprintf( stderr, "> c++ exception occurred: %s\n",
::rtl::OUStringToOString(
pExcTypeDescr->pTypeName,
RTL_TEXTENCODING_ASCII_US ).getStr() );
@@ -447,3 +451,4 @@ void cc50_solaris_intel_fillUnoException(
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc50_solaris_intel/hash.cxx b/bridges/source/cpp_uno/cc50_solaris_intel/hash.cxx
index 37f53da11141..c1c2c2dc8eb6 100644
--- a/bridges/source/cpp_uno/cc50_solaris_intel/hash.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_intel/hash.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#ifndef TEST
-#ifndef _SAL_TYPES_H_
#include <sal/types.h>
-#endif
#else
typedef unsigned int sal_uInt32;
#endif
@@ -261,3 +260,5 @@ int main( int argc, const char** argv )
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx b/bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx
index 401f77873c90..287ca5deadd7 100644
--- a/bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,9 +42,10 @@
#include "cc50_solaris_intel.hxx"
-using namespace rtl;
using namespace com::sun::star::uno;
+using ::rtl::OUString;
+
namespace
{
@@ -212,7 +214,7 @@ static inline void cpp_call(
nStackLongs
);
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -416,3 +418,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/cc50_solaris_sparc.hxx b/bridges/source/cpp_uno/cc50_solaris_sparc/cc50_solaris_sparc.hxx
index d327d0307c51..06667e4a366c 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/cc50_solaris_sparc.hxx
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/cc50_solaris_sparc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,3 +86,4 @@ void cc50_solaris_sparc_fillUnoException(
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx b/bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx
index df16b62bdf27..6076f66093d1 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -162,7 +163,7 @@ static typelib_TypeClass cpp2uno_call(
(*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case no exception occured...
+ // in case no exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -183,7 +184,7 @@ static typelib_TypeClass cpp2uno_call(
// is here for dummy
return typelib_TypeClass_VOID;
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -259,13 +260,6 @@ static typelib_TypeClass cpp_mediate(
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex,
"### illegal vtable index!" );
-// if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
-// {
-// RuntimeException aExc;
-// aExc.Message = OUString::createFromAscii("illegal vtable index!");
-// aExc.Context = (XInterface *)pThis;
-// throw aExc;
-// }
// determine called method
sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
@@ -355,15 +349,6 @@ static typelib_TypeClass cpp_mediate(
}
break;
}
-// default:
-// {
-// RuntimeException aExc;
-// aExc.Message = OUString::createFromAscii("no member description found!");
-// aExc.Context = (XInterface *)pThis;
-// throw aExc;
-// // is here for dummy
-// eRet = typelib_TypeClass_VOID;
-// }
}
return eRet;
@@ -528,3 +513,5 @@ void bridges::cpp_uno::shared::VtableFactory::flushCode(
{
bridges::cpp_uno::cc50_solaris_sparc::flushCode(begin, end);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx b/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx
index 2ee6bb3614b6..84ce64ee1841 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,7 +50,12 @@
#include <hash.cxx>
// need a += operator for OString and sal_Char
-namespace rtl
+using ::rtl::OUString;
+using ::rtl::OString;
+using ::rtl::OStringBuffer;
+using ::rtl::OUStringToOString;
+using ::rtl::OStringToOUString;
+
{
inline OString& operator+=( OString& rString, sal_Char cAdd )
{
@@ -62,7 +68,6 @@ namespace rtl
using namespace std;
using namespace osl;
-using namespace rtl;
using namespace com::sun::star::uno;
namespace CPPU_CURRENT_NAMESPACE
@@ -334,7 +339,7 @@ void cc50_solaris_sparc_raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cp
OUStringToOString(
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
+ fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() );
#endif
bridges::cpp_uno::shared::ArrayPointer< unsigned int > thunkPtr(
new unsigned int[6]);
@@ -421,13 +426,13 @@ void cc50_solaris_sparc_fillUnoException(
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString(
aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
return;
}
#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "> c++ exception occured: %s\n",
+ fprintf( stderr, "> c++ exception occurred: %s\n",
::rtl::OUStringToOString(
pExcTypeDescr->pTypeName,
RTL_TEXTENCODING_ASCII_US ).getStr() );
@@ -443,3 +448,4 @@ void cc50_solaris_sparc_fillUnoException(
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx b/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx
index af0c551f10df..5d89d81efed8 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,3 +47,5 @@ inline void flushCode(void const * begin, void const * end) {
} } }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/hash.cxx b/bridges/source/cpp_uno/cc50_solaris_sparc/hash.cxx
index 0d1c49a23c11..29064c19a28f 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/hash.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/hash.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#ifndef TEST
-#ifndef _SAL_TYPES_H_
#include <sal/types.h>
-#endif
#else
typedef unsigned int sal_uInt32;
#endif
@@ -262,3 +261,5 @@ int main( int argc, const char** argv )
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/makefile.mk b/bridges/source/cpp_uno/cc50_solaris_sparc/makefile.mk
index 2af2f29a02a3..74d156abbf75 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/makefile.mk
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/makefile.mk
@@ -44,8 +44,6 @@ CHECKFORPIC=
.IF "$(COM)" == "C52" && "$(CPU)"=="S"
-#CFLAGS += -O5 -xO5
-
.IF "$(cppu_no_leak)" == ""
CFLAGS += -DLEAK_STATIC_DATA
.ENDIF
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx b/bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx
index 896695540f90..9d0d139850ec 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,9 +42,10 @@
#include "cc50_solaris_sparc.hxx"
-using namespace rtl;
using namespace com::sun::star::uno;
+using ::rtl::OUString;
+
namespace
{
@@ -203,7 +205,7 @@ static void cpp_call(
nStackLongs
);
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -394,3 +396,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/callvirtualmethod.hxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/callvirtualmethod.hxx
index 889df40a5b40..16f6c1090ff2 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/callvirtualmethod.hxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/callvirtualmethod.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,3 +35,5 @@ extern "C" void callVirtualMethod(
unsigned long function, long * stack, sal_Int32 excess);
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/cpp2uno.cxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/cpp2uno.cxx
index 19be97baf7fa..c49330b2223f 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -609,3 +610,5 @@ void bridges::cpp_uno::shared::VtableFactory::flushCode(
{
bridges::cpp_uno::cc5_solaris_sparc64::flushCode(begin, end);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.cxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.cxx
index 020cdea27333..bf6b1512a41d 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.cxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -457,3 +458,5 @@ void fillUnoException(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.hxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.hxx
index 7a0963bc695d..8ba17dad842f 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.hxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,3 +71,5 @@ void fillUnoException(
} } }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.hxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.hxx
index bdce67c4da89..de7028d3faa2 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.hxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,3 +47,5 @@ inline void flushCode(void const * begin, void const * end) {
} } }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/fp.hxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/fp.hxx
index 84bdbc74bf15..ba32b141d338 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/fp.hxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/fp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -111,3 +112,5 @@ void fp_stored30(double *);
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.cxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.cxx
index f2af8103417c..9b004078c35f 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.cxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,3 +80,5 @@ bool isDirectReturnType(typelib_TypeDescriptionReference * type) {
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.hxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.hxx
index a5c182cf7985..f9741a8898a5 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.hxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,3 +40,5 @@ bool isDirectReturnType(typelib_TypeDescriptionReference * type);
} } }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx
index 05733f2bd9ed..e6646dca42a1 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -507,3 +508,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/vtableslotcall.hxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/vtableslotcall.hxx
index 9ccc4a517f82..c63f674c1549 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/vtableslotcall.hxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/vtableslotcall.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,3 +34,5 @@
extern "C" void vtableSlotCall();
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx
new file mode 100644
index 000000000000..b343edee7048
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx
@@ -0,0 +1,660 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_bridges.hxx"
+
+#include <com/sun/star/uno/genfunc.hxx>
+#include <uno/data.h>
+#include <typelib/typedescription.hxx>
+
+#include "bridges/cpp_uno/shared/bridge.hxx"
+#include "bridges/cpp_uno/shared/cppinterfaceproxy.hxx"
+#include "bridges/cpp_uno/shared/types.hxx"
+#include "bridges/cpp_uno/shared/vtablefactory.hxx"
+
+#include "share.hxx"
+
+#include <string.h>
+
+using namespace ::com::sun::star::uno;
+
+namespace
+{
+
+//==================================================================================================
+static typelib_TypeClass cpp2uno_call(
+ bridges::cpp_uno::shared::CppInterfaceProxy * pThis,
+ const typelib_TypeDescription * pMemberTypeDescr,
+ typelib_TypeDescriptionReference * pReturnTypeRef, // 0 indicates void return
+ sal_Int32 nParams, typelib_MethodParameter * pParams,
+ void ** gpreg, double * fpreg, void ** ovrflw,
+ sal_uInt64 * pRegisterReturn /* space for register return */ )
+{
+ // gpreg: [ret *], this, [gpr params]
+ // fpreg: [fpr params]
+ // ovrflw: [remainder of params]
+
+ // return
+ typelib_TypeDescription * pReturnTypeDescr = 0;
+ if (pReturnTypeRef)
+ TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
+
+ void * pUnoReturn = 0;
+ void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
+
+ sal_Int32 ng = 0;
+ sal_Int32 nf = 0;
+
+ ovrflw -= ppc::MAX_GPR_REGS;
+
+ if (pReturnTypeDescr)
+ {
+ if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
+ pUnoReturn = pRegisterReturn; // direct way for simple types
+ else // complex return via ptr (pCppReturn)
+ {
+ pCppReturn = *gpreg;
+ ++gpreg;
+ ++ng;
+ ++ovrflw;
+
+ pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
+ ? __builtin_alloca( pReturnTypeDescr->nSize )
+ : pCppReturn); // direct way
+ }
+ }
+ // pop this
+ ++gpreg;
+ ++ng;
+ ++ovrflw;
+
+ // stack space
+ OSL_ENSURE( sizeof(void *) == sizeof(sal_Int32), "### unexpected size!" );
+ // parameters
+ void ** pUnoArgs = (void **)__builtin_alloca( 4 * sizeof(void *) * nParams );
+ void ** pCppArgs = pUnoArgs + nParams;
+
+ // indizes of values this have to be converted (interface conversion cpp<=>uno)
+ sal_Int32 * pTempIndizes = (sal_Int32 *)(pUnoArgs + (2 * nParams));
+
+ // type descriptions for reconversions
+ typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pUnoArgs + (3 * nParams));
+
+ sal_Int32 nTempIndizes = 0;
+
+ for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
+ {
+ const typelib_MethodParameter & rParam = pParams[nPos];
+ typelib_TypeDescription * pParamTypeDescr = 0;
+ TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
+
+ if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
+ // value
+ {
+ switch (pParamTypeDescr->eTypeClass)
+ {
+ case typelib_TypeClass_BOOLEAN:
+ case typelib_TypeClass_BYTE:
+ if (ng < ppc::MAX_GPR_REGS)
+ {
+ *ovrflw = *gpreg++;
+ ++ng;
+ }
+ pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)ovrflw) + (sizeof(void*)-1));
+ ++ovrflw;
+ break;
+ case typelib_TypeClass_CHAR:
+ case typelib_TypeClass_SHORT:
+ case typelib_TypeClass_UNSIGNED_SHORT:
+ if (ng < ppc::MAX_GPR_REGS)
+ {
+ *ovrflw = *gpreg++;
+ ++ng;
+ }
+ pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)ovrflw) + (sizeof(void*)-2));
+ ++ovrflw;
+ break;
+ case typelib_TypeClass_HYPER:
+ case typelib_TypeClass_UNSIGNED_HYPER:
+ pCppArgs[nPos] = pUnoArgs[nPos] = ovrflw;
+ for (int i = 0; i < 2; ++i)
+ {
+ if (ng < ppc::MAX_GPR_REGS)
+ {
+ *ovrflw = *gpreg++;
+ ++ng;
+ }
+ ++ovrflw;
+ }
+ break;
+ case typelib_TypeClass_DOUBLE:
+ if (nf < ppc::MAX_SSE_REGS)
+ {
+ pCppArgs[nPos] = pUnoArgs[nPos] = fpreg;
+ ++fpreg;
+ ++nf;
+ }
+ else
+ {
+ pCppArgs[nPos] = pUnoArgs[nPos] = ovrflw;
+ }
+ if (ng < ppc::MAX_GPR_REGS)
+ {
+ ng+=2;
+ gpreg+=2;
+ }
+ ovrflw+=2;
+ break;
+ case typelib_TypeClass_FLOAT:
+ if (nf < ppc::MAX_SSE_REGS)
+ {
+ pCppArgs[nPos] = pUnoArgs[nPos] = fpreg;
+ ++fpreg;
+ ++nf;
+ }
+ else
+ {
+ pCppArgs[nPos] = pUnoArgs[nPos] = ovrflw;
+ }
+ if (ng < ppc::MAX_GPR_REGS)
+ {
+ ++gpreg;
+ ++ng;
+ }
+ ++ovrflw;
+ break;
+ default:
+ if (ng < ppc::MAX_GPR_REGS)
+ {
+ *ovrflw = *gpreg++;
+ ++ng;
+ }
+ pCppArgs[nPos] = pUnoArgs[nPos] = ovrflw;
+ ++ovrflw;
+ break;
+ }
+
+ // no longer needed
+ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
+ }
+ else // ptr to complex value | ref
+ {
+ void *pCppStack; //temporary stack pointer
+
+ if (ng < ppc::MAX_GPR_REGS)
+ {
+ *ovrflw = *gpreg++;
+ ++ng;
+ }
+ pCppArgs[nPos] = pCppStack = *ovrflw++;
+
+ if (! rParam.bIn) // is pure out
+ {
+ // uno out is unconstructed mem!
+ pUnoArgs[nPos] = __builtin_alloca( pParamTypeDescr->nSize );
+ pTempIndizes[nTempIndizes] = nPos;
+ // will be released at reconversion
+ ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
+ }
+ // is in/inout
+ else if (bridges::cpp_uno::shared::relatesToInterfaceType( pParamTypeDescr ))
+ {
+ uno_copyAndConvertData( pUnoArgs[nPos] = __builtin_alloca( pParamTypeDescr->nSize ),
+ pCppStack, pParamTypeDescr,
+ pThis->getBridge()->getCpp2Uno() );
+ pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
+ // will be released at reconversion
+ ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
+ }
+ else // direct way
+ {
+ pUnoArgs[nPos] = pCppStack;
+ // no longer needed
+ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
+ }
+ }
+ }
+
+ // ExceptionHolder
+ uno_Any aUnoExc; // Any will be constructed by callee
+ uno_Any * pUnoExc = &aUnoExc;
+
+ // invoke uno dispatch call
+ (*pThis->getUnoI()->pDispatcher)(
+ pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
+
+ // in case an exception occurred...
+ if (pUnoExc)
+ {
+ // destruct temporary in/inout params
+ for ( ; nTempIndizes--; )
+ {
+ sal_Int32 nIndex = pTempIndizes[nTempIndizes];
+
+ if (pParams[nIndex].bIn) // is in/inout => was constructed
+ uno_destructData( pUnoArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], 0 );
+ TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
+ }
+ if (pReturnTypeDescr)
+ TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
+
+ CPPU_CURRENT_NAMESPACE::raiseException(
+ &aUnoExc, pThis->getBridge()->getUno2Cpp() );
+ // has to destruct the any
+ // is here for dummy
+ return typelib_TypeClass_VOID;
+ }
+ else // else no exception occurred...
+ {
+ // temporary params
+ for ( ; nTempIndizes--; )
+ {
+ sal_Int32 nIndex = pTempIndizes[nTempIndizes];
+ typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
+
+ if (pParams[nIndex].bOut) // inout/out
+ {
+ // convert and assign
+ uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
+ uno_copyAndConvertData( pCppArgs[nIndex], pUnoArgs[nIndex], pParamTypeDescr,
+ pThis->getBridge()->getUno2Cpp() );
+ }
+ // destroy temp uno param
+ uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
+
+ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
+ }
+ // return
+ if (pCppReturn) // has complex return
+ {
+ if (pUnoReturn != pCppReturn) // needs reconversion
+ {
+ uno_copyAndConvertData( pCppReturn, pUnoReturn, pReturnTypeDescr,
+ pThis->getBridge()->getUno2Cpp() );
+ // destroy temp uno return
+ uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
+ }
+ // complex return ptr is set to return reg
+ *(void **)pRegisterReturn = pCppReturn;
+ }
+ if (pReturnTypeDescr)
+ {
+ typelib_TypeClass eRet = (typelib_TypeClass)pReturnTypeDescr->eTypeClass;
+ TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
+ return eRet;
+ }
+ else
+ return typelib_TypeClass_VOID;
+ }
+}
+
+
+//==================================================================================================
+static typelib_TypeClass cpp_mediate(
+ sal_Int32 nFunctionIndex,
+ sal_Int32 nVtableOffset,
+ void ** gpreg, double * fpreg, void ** ovrflw,
+ sal_uInt64 * pRegisterReturn /* space for register return */ )
+{
+ OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
+
+ // gpreg: [ret *], this, [other gpr params]
+ // fpreg: [fpr params]
+ // ovrflw: [gpr or fpr params (in space allocated for all params properly aligned)]
+
+ void * pThis;
+ if( nFunctionIndex & 0x8000 )
+ {
+ nFunctionIndex &= 0x7fff;
+ pThis = gpreg[1];
+ }
+ else
+ {
+ pThis = gpreg[0];
+ }
+
+ pThis = static_cast< char * >(pThis) - nVtableOffset;
+
+ bridges::cpp_uno::shared::CppInterfaceProxy * pCppI
+ = bridges::cpp_uno::shared::CppInterfaceProxy::castInterfaceToProxy(pThis);
+
+ typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
+
+ OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
+ if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
+ {
+ throw RuntimeException(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )),
+ (XInterface *)pThis );
+ }
+
+ // determine called method
+ sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
+ OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member index!" );
+
+ TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
+
+ typelib_TypeClass eRet;
+ switch (aMemberDescr.get()->eTypeClass)
+ {
+ case typelib_TypeClass_INTERFACE_ATTRIBUTE:
+ {
+ if (pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos] == nFunctionIndex)
+ {
+ // is GET method
+ eRet = cpp2uno_call(
+ pCppI, aMemberDescr.get(),
+ ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef,
+ 0, 0, // no params
+ gpreg, fpreg, ovrflw, pRegisterReturn );
+ }
+ else
+ {
+ // is SET method
+ typelib_MethodParameter aParam;
+ aParam.pTypeRef =
+ ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
+ eRet = cpp2uno_call(
+ pCppI, aMemberDescr.get(),
+ 0, // indicates void return
+ 1, &aParam,
+ gpreg, fpreg, ovrflw, pRegisterReturn );
+ }
+ break;
+ }
+ case typelib_TypeClass_INTERFACE_METHOD:
+ {
+ // is METHOD
+ switch (nFunctionIndex)
+ {
+ case 1: // acquire()
+ pCppI->acquireProxy(); // non virtual call!
+ eRet = typelib_TypeClass_VOID;
+ break;
+ case 2: // release()
+ pCppI->releaseProxy(); // non virtual call!
+ eRet = typelib_TypeClass_VOID;
+ break;
+ case 0: // queryInterface() opt
+ {
+ typelib_TypeDescription * pTD = 0;
+ TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( gpreg[2] )->getTypeLibType() );
+ if (pTD)
+ {
+ XInterface * pInterface = 0;
+ (*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
+ pCppI->getBridge()->getCppEnv(),
+ (void **)&pInterface, pCppI->getOid().pData, (typelib_InterfaceTypeDescription *)pTD );
+
+ if (pInterface)
+ {
+ ::uno_any_construct(
+ reinterpret_cast< uno_Any * >( gpreg[0] ),
+ &pInterface, pTD, cpp_acquire );
+ pInterface->release();
+ TYPELIB_DANGER_RELEASE( pTD );
+ *(void **)pRegisterReturn = gpreg[0];
+ eRet = typelib_TypeClass_ANY;
+ break;
+ }
+ TYPELIB_DANGER_RELEASE( pTD );
+ }
+ } // else perform queryInterface()
+ default:
+ eRet = cpp2uno_call(
+ pCppI, aMemberDescr.get(),
+ ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pReturnTypeRef,
+ ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->nParams,
+ ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pParams,
+ gpreg, fpreg, ovrflw, pRegisterReturn );
+ }
+ break;
+ }
+ default:
+ {
+ throw RuntimeException(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )),
+ (XInterface *)pThis );
+ // is here for dummy
+ eRet = typelib_TypeClass_VOID;
+ }
+ }
+
+ return eRet;
+}
+
+//==================================================================================================
+/**
+ * is called on incoming vtable calls
+ * (called by asm snippets)
+ */
+static sal_uInt64 cpp_vtable_call(sal_Int32 r3, sal_Int32 r4, sal_Int32 r5,
+ sal_Int32 r6, sal_Int32 r7, sal_Int32 r8, sal_Int32 r9,
+ sal_Int32 r10, sal_Int32 firstonstack)
+{
+ volatile unsigned long nOffsetAndIndex;
+
+ __asm__ __volatile__(
+ "mr %0, 11\n\t"
+ : "=r" (nOffsetAndIndex) : );
+
+ sal_Int32 nVtableOffset = (nOffsetAndIndex >> 16);
+ sal_Int32 nFunctionIndex = (nOffsetAndIndex & 0xFFFF);
+
+ void ** ovrflw = (void**)&firstonstack;
+
+ sal_Int32 gpreg[ppc::MAX_GPR_REGS];
+ gpreg[0] = r3;
+ gpreg[1] = r4;
+ gpreg[2] = r5;
+ gpreg[3] = r6;
+ gpreg[4] = r7;
+ gpreg[5] = r8;
+ gpreg[6] = r9;
+ gpreg[7] = r10;
+
+ double fpreg[ppc::MAX_SSE_REGS];
+ register double d0 asm("fr1"); fpreg[0] = d0;
+ register double d1 asm("fr2"); fpreg[1] = d1;
+ register double d2 asm("fr3"); fpreg[2] = d2;
+ register double d3 asm("fr4"); fpreg[3] = d3;
+ register double d4 asm("fr5"); fpreg[4] = d4;
+ register double d5 asm("fr6"); fpreg[5] = d5;
+ register double d6 asm("fr7"); fpreg[6] = d6;
+ register double d7 asm("fr8"); fpreg[7] = d7;
+ register double d8 asm("fr9"); fpreg[8] = d8;
+ register double d9 asm("fr10"); fpreg[9] = d9;
+ register double d10 asm("fr11"); fpreg[10] = d10;
+ register double d11 asm("fr12"); fpreg[11] = d11;
+ register double d12 asm("fr13"); fpreg[12] = d12;
+
+#if OSL_DEBUG_LEVEL > 2
+ for(int i = 0; i < 8; ++i)
+ {
+ fprintf(stderr, "general reg %d is %x\n", i, gpreg[i]);
+ }
+ for(int i = 0; i < 13; ++i)
+ {
+ fprintf(stderr, "sse reg %d is %f\n", i, fpreg[i]);
+ fprintf(stderr, "sse reg %d is %llx\n", i, fpreg[i]);
+ }
+ for(int i = -8; i < 8; ++i)
+ {
+ fprintf(stderr, "overflow arg %d is %x\n", i, ovrflw[i]);
+ }
+#endif
+ sal_uInt64 nRegReturn=0;
+
+ typelib_TypeClass aType =
+ cpp_mediate( nFunctionIndex, nVtableOffset, (void**)gpreg, fpreg, ovrflw, &nRegReturn );
+
+ sal_uInt32 *pRegReturn = (sal_uInt32*)&nRegReturn;
+ switch( aType )
+ {
+ case typelib_TypeClass_BOOLEAN:
+ pRegReturn[0] = (sal_uInt32)(*(char *)pRegReturn);
+ break;
+ case typelib_TypeClass_BYTE:
+ pRegReturn[0] = (sal_Int32)(*(unsigned char *)pRegReturn);
+ break;
+ case typelib_TypeClass_SHORT:
+ pRegReturn[0] = (sal_Int32)(*(short *)pRegReturn);
+ break;
+ case typelib_TypeClass_CHAR:
+ case typelib_TypeClass_UNSIGNED_SHORT:
+ pRegReturn[0] = (sal_uInt32)(*(unsigned short *)pRegReturn);
+ break;
+ case typelib_TypeClass_FLOAT:
+ __asm__("lfs 1,%0\n\t" : : "m"(*((float*)&nRegReturn)));
+ break;
+ case typelib_TypeClass_DOUBLE:
+ __asm__("lfd 1,%0\n\t" : : "m"(*((double*)&nRegReturn)));
+ break;
+ case typelib_TypeClass_HYPER:
+ case typelib_TypeClass_UNSIGNED_HYPER:
+ break;
+ default:
+ pRegReturn[0] = (sal_uInt32)(*(unsigned int*)pRegReturn);
+ break;
+ }
+ return nRegReturn;
+}
+
+
+int const codeSnippetSize = 3 * sizeof(void*);
+
+unsigned char * codeSnippet( unsigned char * code, sal_Int16 functionIndex,
+ sal_Int16 vtableOffset, bool simpleRetType )
+{
+ sal_uInt32 nOffsetAndIndex = ( ( vtableOffset ) << 16 ) | (functionIndex );
+ if (! simpleRetType )
+ nOffsetAndIndex |= 0x8000;
+
+ void **raw = (void**)&code[0];
+ memcpy(raw, (char*)cpp_vtable_call, 2 * sizeof(void*));
+ raw[2] = (void*)nOffsetAndIndex;
+
+ return (code + codeSnippetSize);
+}
+
+}
+
+void bridges::cpp_uno::shared::VtableFactory::flushCode(unsigned char const * bptr, unsigned char const * eptr)
+{
+ int const lineSize = 32;
+ for (unsigned char const * p = bptr; p < eptr + lineSize; p += lineSize) {
+ __asm__ volatile ("dcbst 0, %0" : : "r"(p) : "memory");
+ }
+ __asm__ volatile ("sync" : : : "memory");
+ for (unsigned char const * p = bptr; p < eptr + lineSize; p += lineSize) {
+ __asm__ volatile ("icbi 0, %0" : : "r"(p) : "memory");
+ }
+ __asm__ volatile ("isync" : : : "memory");
+}
+
+struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
+
+bridges::cpp_uno::shared::VtableFactory::Slot *
+bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
+{
+ return static_cast< Slot * >(block) + 2;
+}
+
+sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
+ sal_Int32 slotCount)
+{
+ return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
+}
+
+bridges::cpp_uno::shared::VtableFactory::Slot *
+bridges::cpp_uno::shared::VtableFactory::initializeBlock(
+ void * block, sal_Int32 slotCount)
+{
+ Slot * slots = mapBlockToVtable(block);
+ slots[-2].fn = 0;
+ slots[-1].fn = 0;
+ return slots + slotCount;
+}
+
+unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
+ Slot ** slots, unsigned char * code,
+ typelib_InterfaceTypeDescription const * type, sal_Int32 functionOffset,
+ sal_Int32 functionCount, sal_Int32 vtableOffset)
+{
+ (*slots) -= functionCount;
+ Slot * s = *slots;
+
+ for (sal_Int32 i = 0; i < type->nMembers; ++i) {
+ typelib_TypeDescription * member = 0;
+ TYPELIB_DANGER_GET(&member, type->ppMembers[i]);
+ OSL_ASSERT(member != 0);
+ switch (member->eTypeClass) {
+ case typelib_TypeClass_INTERFACE_ATTRIBUTE:
+ // Getter:
+ (s++)->fn = code;
+ code = codeSnippet(
+ code, functionOffset++, vtableOffset,
+ bridges::cpp_uno::shared::isSimpleType(
+ reinterpret_cast<
+ typelib_InterfaceAttributeTypeDescription * >(
+ member)->pAttributeTypeRef));
+
+ // Setter:
+ if (!reinterpret_cast<
+ typelib_InterfaceAttributeTypeDescription * >(
+ member)->bReadOnly)
+ {
+ (s++)->fn = code;
+ code = codeSnippet(code, functionOffset++, vtableOffset, true);
+ }
+ break;
+
+ case typelib_TypeClass_INTERFACE_METHOD:
+ (s++)->fn = code;
+ code = codeSnippet(
+ code, functionOffset++, vtableOffset,
+ bridges::cpp_uno::shared::isSimpleType(
+ reinterpret_cast<
+ typelib_InterfaceMethodTypeDescription * >(
+ member)->pReturnTypeRef));
+ break;
+
+ default:
+ OSL_ASSERT(false);
+ break;
+ }
+ TYPELIB_DANGER_RELEASE(member);
+ }
+ return code;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_netbsd_intel/except.cxx b/bridges/source/cpp_uno/gcc3_aix_powerpc/except.cxx
index be5686af2807..2086ef7e7bba 100644
--- a/bridges/source/cpp_uno/gcc3_netbsd_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_aix_powerpc/except.cxx
@@ -1,8 +1,9 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
@@ -31,22 +32,20 @@
#include <stdio.h>
#include <dlfcn.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
-#include <bridges/cpp_uno/bridge.hxx>
+#include <com/sun/star/uno/genfunc.hxx>
#include <typelib/typedescription.hxx>
#include <uno/any2.h>
#include "share.hxx"
+#include <string.h>
-#ifndef RTLD_DEFAULT
-#define RTLD_DEFAULT ((void *) -2)
-#endif
using namespace ::std;
using namespace ::osl;
@@ -65,7 +64,7 @@ void dummy_can_throw_anything( char const * )
//==================================================================================================
static OUString toUNOname( char const * p ) SAL_THROW( () )
{
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG
char const * start = p;
#endif
@@ -90,7 +89,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
buf.append( (sal_Unicode)'.' );
}
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG
OUString ret( buf.makeStringAndClear() );
OString c_ret( OUStringToOString( ret, RTL_TEXTENCODING_ASCII_US ) );
fprintf( stderr, "> toUNOname(): %s => %s\n", start, c_ret.getStr() );
@@ -103,10 +102,10 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
//==================================================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
- t_rtti_map m_rttis;
+ t_rtti_map m_rttis;
t_rtti_map m_generatedRttis;
void * m_hApp;
@@ -119,7 +118,7 @@ public:
};
//__________________________________________________________________________________________________
RTTI::RTTI() SAL_THROW( () )
- : m_hApp( dlopen( 0 , RTLD_LAZY ) )
+ : m_hApp( dlopen( 0, RTLD_LAZY ) )
{
}
//__________________________________________________________________________________________________
@@ -154,7 +153,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
buf.append( 'E' );
OString symName( buf.makeStringAndClear() );
- rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() );
+ rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
if (rtti)
{
@@ -165,14 +164,14 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
else
{
// try to lookup the symbol in the generated rtti map
- t_rtti_map::const_iterator iFind( m_generatedRttis.find( unoName ) );
- if (iFind == m_generatedRttis.end())
+ t_rtti_map::const_iterator iiFind( m_generatedRttis.find( unoName ) );
+ if (iiFind == m_generatedRttis.end())
{
// we must generate it !
// symbol and rtti-name is nearly identical,
// the symbol is prefixed with _ZTI
char const * rttiName = symName.getStr() +4;
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG
fprintf( stderr,"generated rtti for %s\n", rttiName );
#endif
if (pTypeDescr->pBaseTypeDescription)
@@ -195,7 +194,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
}
else // taking already generated rtti
{
- rtti = iFind->second;
+ rtti = iiFind->second;
}
}
}
@@ -203,7 +202,6 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
{
rtti = iFind->second;
}
-
return rtti;
}
@@ -217,115 +215,74 @@ static void deleteException( void * pExc )
OSL_ENSURE( pTD, "### unknown exception type! leaving out destruction => leaking!!!" );
if (pTD)
{
- ::uno_destructData( pExc, pTD, cpp_release );
- ::typelib_typedescription_release( pTD );
- }
+ ::uno_destructData( pExc, pTD, cpp_release );
+ ::typelib_typedescription_release( pTD );
+ }
}
//==================================================================================================
void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
-#if defined DEBUG
- OString cstr(
- OUStringToOString(
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
-#endif
void * pCppExc;
type_info * rtti;
{
// construct cpp exception object
- typelib_TypeDescription * pTypeDescr = 0;
- TYPELIB_DANGER_GET( &pTypeDescr, pUnoExc->pType );
- OSL_ASSERT( pTypeDescr );
- if (! pTypeDescr)
- {
- throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("cannot get typedescription for type ") ) +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
- }
-
- pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
- ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp );
-
- // destruct uno exception
- ::uno_any_destruct( pUnoExc, 0 );
- // avoiding locked counts
- static RTTI * s_rtti = 0;
- if (! s_rtti)
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
+ typelib_TypeDescription * pTypeDescr = 0;
+ TYPELIB_DANGER_GET( &pTypeDescr, pUnoExc->pType );
+ OSL_ASSERT( pTypeDescr );
+ if (! pTypeDescr)
+ terminate();
+
+ pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
+ ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp );
+
+ // destruct uno exception
+ ::uno_any_destruct( pUnoExc, 0 );
+ // avoiding locked counts
+ static RTTI * s_rtti = 0;
if (! s_rtti)
{
+ MutexGuard guard( Mutex::getGlobalMutex() );
+ if (! s_rtti)
+ {
#ifdef LEAK_STATIC_DATA
- s_rtti = new RTTI();
+ s_rtti = new RTTI();
#else
- static RTTI rtti_data;
- s_rtti = &rtti_data;
+ static RTTI rtti_data;
+ s_rtti = &rtti_data;
#endif
+ }
}
- }
- rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
- if (! rtti)
- {
- throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("no rtti for type ") ) +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
- }
+ rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
+ TYPELIB_DANGER_RELEASE( pTypeDescr );
+ OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
+ if (! rtti)
+ terminate();
}
__cxa_throw( pCppExc, rtti, deleteException );
}
//==================================================================================================
-void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping * pCpp2Uno )
+void fillUnoException( __cxa_exception * header, uno_Any * pExc, uno_Mapping * pCpp2Uno )
{
+ OSL_ENSURE( header, "### no exception header!!!" );
if (! header)
- {
- RuntimeException aRE(
- OUString( RTL_CONSTASCII_USTRINGPARAM("no exception header!") ),
- Reference< XInterface >() );
- Type const & rType = ::getCppuType( &aRE );
- uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
-#if defined _DEBUG
- OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
-#endif
- return;
- }
+ terminate();
typelib_TypeDescription * pExcTypeDescr = 0;
OUString unoName( toUNOname( header->exceptionType->name() ) );
-#if defined DEBUG
- OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
-#endif
- typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
- if (0 == pExcTypeDescr)
- {
- RuntimeException aRE(
- OUString( RTL_CONSTASCII_USTRINGPARAM("exception type not found: ") ) + unoName,
- Reference< XInterface >() );
- Type const & rType = ::getCppuType( &aRE );
- uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
-#if defined _DEBUG
- OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
-#endif
- }
- else
- {
- // construct uno exception any
- uno_any_constructAndConvert( pUnoExc, header->adjustedPtr, pExcTypeDescr, pCpp2Uno );
- typelib_typedescription_release( pExcTypeDescr );
- }
+ ::typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
+ OSL_ENSURE( pExcTypeDescr, "### can not get type description for exception!!!" );
+ if (! pExcTypeDescr)
+ terminate();
+
+ // construct uno exception any
+ ::uno_any_constructAndConvert( pExc, header->adjustedPtr, pExcTypeDescr, pCpp2Uno );
+ ::typelib_typedescription_release( pExcTypeDescr );
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_netbsd_intel/makefile.mk b/bridges/source/cpp_uno/gcc3_aix_powerpc/makefile.mk
index 794501d0b5f3..48c51c138d4d 100644
--- a/bridges/source/cpp_uno/gcc3_netbsd_intel/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_aix_powerpc/makefile.mk
@@ -1,8 +1,8 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -38,12 +38,16 @@ ENABLE_EXCEPTIONS=TRUE
# --- Files --------------------------------------------------------
-.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCNETBSDIgcc3"
+.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCAIXPgcc3"
.IF "$(cppu_no_leak)" == ""
CFLAGS += -DLEAK_STATIC_DATA
.ENDIF
+NOOPTFILES= \
+ $(SLO)$/uno2cpp.obj \
+ $(SLO)$/cpp2uno.obj
+
CFLAGSNOOPT=-O0
SLOFILES= \
@@ -58,18 +62,16 @@ SHL1IMPLIB=i$(TARGET)
SHL1VERSIONMAP=..$/..$/bridge_exports.map
SHL1RPATH=URELIB
-SHL1OBJS= \
- $(SLO)$/except.obj \
- $(SLO)$/cpp2uno.obj \
- $(SLO)$/uno2cpp.obj
+SHL1OBJS= $(SLOFILES)
+SHL1LIBS = $(SLB)$/cpp_uno_shared.lib
SHL1STDLIBS= \
$(CPPULIB) \
- $(SALLIB)
+ $(SALLIB) \
+ -ldl
.ENDIF
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
-
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx b/bridges/source/cpp_uno/gcc3_aix_powerpc/share.hxx
index 930094738b20..e3f8370d501f 100644
--- a/bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_aix_powerpc/share.hxx
@@ -1,8 +1,9 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
@@ -34,7 +35,8 @@
namespace CPPU_CURRENT_NAMESPACE
{
-void dummy_can_throw_anything( char const * );
+ void dummy_can_throw_anything( char const * );
+
// ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
@@ -88,3 +90,10 @@ void raiseException(
void fillUnoException(
__cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
}
+
+namespace ppc
+{
+ enum ppclimits { MAX_GPR_REGS = 8, MAX_SSE_REGS = 13 };
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx
new file mode 100644
index 000000000000..dcb4793e98d3
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx
@@ -0,0 +1,499 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_bridges.hxx"
+
+#include <sys/types.h>
+#include <sys/malloc.h>
+
+#include <com/sun/star/uno/genfunc.hxx>
+#include <uno/data.h>
+
+#include "bridges/cpp_uno/shared/bridge.hxx"
+#include "bridges/cpp_uno/shared/types.hxx"
+#include "bridges/cpp_uno/shared/unointerfaceproxy.hxx"
+#include "bridges/cpp_uno/shared/vtables.hxx"
+
+#include "share.hxx"
+#include <stdio.h>
+#include <string.h>
+
+
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+
+namespace
+{
+
+void MapReturn(sal_uInt32 r3, sal_uInt32 r4, double dret, typelib_TypeClass eReturnType, void *pRegisterReturn)
+{
+ switch( eReturnType )
+ {
+ case typelib_TypeClass_HYPER:
+ case typelib_TypeClass_UNSIGNED_HYPER:
+ ((long*)pRegisterReturn)[1] = r4;
+ // fall through on purpose
+ case typelib_TypeClass_LONG:
+ case typelib_TypeClass_UNSIGNED_LONG:
+ case typelib_TypeClass_ENUM:
+ ((long*)pRegisterReturn)[0] = r3;
+ break;
+ case typelib_TypeClass_CHAR:
+ case typelib_TypeClass_SHORT:
+ case typelib_TypeClass_UNSIGNED_SHORT:
+ *(unsigned short*)pRegisterReturn = (unsigned short)r3;
+ break;
+ case typelib_TypeClass_BOOLEAN:
+ case typelib_TypeClass_BYTE:
+ *(unsigned char*)pRegisterReturn = (unsigned char)r3;
+ break;
+ case typelib_TypeClass_FLOAT:
+ *(float*)pRegisterReturn = (float)dret;
+ break;
+ case typelib_TypeClass_DOUBLE:
+ *(double*)pRegisterReturn = dret;
+ break;
+ default:
+ break;
+ }
+}
+
+#define DISPLACEMENT -2
+
+static void callVirtualMethod(
+ void * pThis,
+ sal_uInt32 nVtableIndex,
+ void * pRegisterReturn,
+ typelib_TypeClass eReturnType,
+ sal_uInt32 * pStack,
+ sal_uInt32 nStack,
+ double *pFPR,
+ sal_uInt32 nFPR)
+{
+ sal_uInt32 nStackWords = nStack;
+ if (nStackWords < ppc::MAX_GPR_REGS)
+ nStackWords = 0;
+ else
+ nStackWords-=ppc::MAX_GPR_REGS;
+ if (nStackWords)
+ nStackWords = ( nStackWords + 1) & ~1;
+ sal_uInt32 *stack = (sal_uInt32*)__builtin_alloca( nStackWords * sizeof(sal_uInt32) );
+ memcpy(stack+DISPLACEMENT, pStack+ppc::MAX_GPR_REGS, nStack * sizeof(sal_uInt32));
+
+ // Get pointer to method
+ sal_uInt32 pMethod = *((sal_uInt32 *)pThis);
+ pMethod += 4 * nVtableIndex;
+ pMethod = *((sal_uInt32 *)pMethod);
+
+ typedef void (* FunctionCall )( sal_uInt32, sal_uInt32, sal_uInt32, sal_uInt32, sal_uInt32, sal_uInt32, sal_uInt32, sal_uInt32 );
+ FunctionCall pFunc = (FunctionCall)pMethod;
+
+ register double d0 asm("fr1"); d0 = pFPR[0];
+ register double d1 asm("fr2"); d1 = pFPR[1];
+ register double d2 asm("fr3"); d2 = pFPR[2];
+ register double d3 asm("fr4"); d3 = pFPR[3];
+ register double d4 asm("fr5"); d4 = pFPR[4];
+ register double d5 asm("fr6"); d5 = pFPR[5];
+ register double d6 asm("fr7"); d6 = pFPR[6];
+ register double d7 asm("fr8"); d7 = pFPR[7];
+ register double d8 asm("fr9"); d8 = pFPR[8];
+ register double d9 asm("fr10"); d9 = pFPR[9];
+ register double d10 asm("fr11"); d10 = pFPR[10];
+ register double d11 asm("fr12"); d11 = pFPR[11];
+ register double d12 asm("fr13"); d12 = pFPR[12];
+
+ (*pFunc)(pStack[0], pStack[1], pStack[2], pStack[3], pStack[4], pStack[5], pStack[6], pStack[7]);
+
+ register sal_uInt32 r3 asm("r3");
+ register sal_uInt32 r4 asm("r4");
+ MapReturn(r3, r4, d0, eReturnType, pRegisterReturn);
+}
+
+#define INSERT_INT32(pSV, pDS) \
+{ \
+ *pDS++ = *reinterpret_cast<sal_uInt32 *>(pSV); \
+}
+
+#define INSERT_INT16(pSV, pDS) \
+{ \
+ *pDS++ = *reinterpret_cast<sal_uInt16 *>(pSV); \
+}
+
+#define INSERT_INT8(pSV, pDS) \
+{ \
+ *pDS++ = *reinterpret_cast<sal_uInt8 *>(pSV); \
+}
+
+#define INSERT_FLOAT(pSV, nr, pFPR, pDS) \
+{ \
+ if (nr < ppc::MAX_SSE_REGS) \
+ { \
+ sal_uInt32 *pDouble = (sal_uInt32 *)&(pFPR[nr++]); \
+ pDouble[0] = *reinterpret_cast<sal_uInt32 *>(pSV); \
+ } \
+ *pDS++ = *reinterpret_cast<sal_uInt32 *>(pSV); \
+}
+
+#define INSERT_DOUBLE(pSV, nr, pFPR, pDS) \
+{ \
+ if (nr < ppc::MAX_SSE_REGS) \
+ { \
+ pFPR[nr++] = *reinterpret_cast<double *>(pSV); \
+ } \
+ *pDS++ = reinterpret_cast<sal_uInt32 *>(pSV)[1]; \
+ *pDS++ = reinterpret_cast<sal_uInt32 *>(pSV)[0]; \
+}
+
+#define INSERT_INT64(pSV, pDS) \
+{ \
+ INSERT_INT32(pSV, pDS) \
+ INSERT_INT32(((sal_uInt32*)pSV)+1, pDS) \
+}
+//==================================================================================================
+static void cpp_call(
+ bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
+ bridges::cpp_uno::shared::VtableSlot aVtableSlot,
+ typelib_TypeDescriptionReference * pReturnTypeRef,
+ sal_Int32 nParams, typelib_MethodParameter * pParams,
+ void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
+{
+ // max space for: [complex ret ptr], values|ptr ...
+ sal_uInt32 * pStack = (sal_uInt32*)__builtin_alloca( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
+ sal_uInt32 * pStackStart = pStack;
+
+ double pFPR[ppc::MAX_SSE_REGS];
+ sal_uInt32 nFPR = 0;
+
+ // return
+ typelib_TypeDescription * pReturnTypeDescr = 0;
+ TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
+ OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
+
+ void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
+
+ if (pReturnTypeDescr)
+ {
+ if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
+ {
+ pCppReturn = pUnoReturn; // direct way for simple types
+ }
+ else
+ {
+ // complex return via ptr
+ pCppReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
+ ? __builtin_alloca( pReturnTypeDescr->nSize )
+ : pUnoReturn); // direct way
+ INSERT_INT32(&pCppReturn, pStack);
+ }
+ }
+ // push this
+ void * pAdjustedThisPtr = reinterpret_cast< void ** >(pThis->getCppI()) + aVtableSlot.offset;
+ INSERT_INT32(&pAdjustedThisPtr, pStack);
+
+ // stack space
+ OSL_ENSURE( sizeof(void *) == sizeof(sal_Int32), "### unexpected size!" );
+ // args
+ void ** pCppArgs = (void **)__builtin_alloca( 3 * sizeof(void *) * nParams );
+ // indizes of values this have to be converted (interface conversion cpp<=>uno)
+ sal_Int32 * pTempIndizes = (sal_Int32 *)(pCppArgs + nParams);
+ // type descriptions for reconversions
+ typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
+
+ sal_Int32 nTempIndizes = 0;
+
+ for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
+ {
+ const typelib_MethodParameter & rParam = pParams[nPos];
+ typelib_TypeDescription * pParamTypeDescr = 0;
+ TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
+
+ if (!rParam.bOut
+ && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
+ {
+ uno_copyAndConvertData( pCppArgs[nPos] = pStack, pUnoArgs[nPos], pParamTypeDescr,
+ pThis->getBridge()->getUno2Cpp() );
+
+ switch (pParamTypeDescr->eTypeClass)
+ {
+ case typelib_TypeClass_LONG:
+ case typelib_TypeClass_UNSIGNED_LONG:
+ case typelib_TypeClass_ENUM:
+ INSERT_INT32(pCppArgs[nPos], pStack);
+ break;
+ case typelib_TypeClass_SHORT:
+ case typelib_TypeClass_CHAR:
+ case typelib_TypeClass_UNSIGNED_SHORT:
+ INSERT_INT16(pCppArgs[nPos], pStack);
+ break;
+ case typelib_TypeClass_BOOLEAN:
+ case typelib_TypeClass_BYTE:
+ INSERT_INT8(pCppArgs[nPos], pStack);
+ break;
+ case typelib_TypeClass_FLOAT:
+ INSERT_FLOAT(pCppArgs[nPos], nFPR, pFPR, pStack);
+ break;
+ case typelib_TypeClass_DOUBLE:
+ INSERT_DOUBLE(pCppArgs[nPos], nFPR, pFPR, pStack);
+ break;
+ case typelib_TypeClass_HYPER:
+ case typelib_TypeClass_UNSIGNED_HYPER:
+ INSERT_INT64(pCppArgs[nPos], pStack);
+ break;
+ default:
+ break;
+ }
+
+ // no longer needed
+ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
+ }
+ else // ptr to complex value | ref
+ {
+ if (! rParam.bIn) // is pure out
+ {
+ // cpp out is constructed mem, uno out is not!
+ uno_constructData(
+ pCppArgs[nPos] = __builtin_alloca( pParamTypeDescr->nSize ),
+ pParamTypeDescr );
+ pTempIndizes[nTempIndizes] = nPos; // default constructed for cpp call
+ // will be released at reconversion
+ ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
+ }
+ // is in/inout
+ else if (bridges::cpp_uno::shared::relatesToInterfaceType( pParamTypeDescr ))
+ {
+ uno_copyAndConvertData(
+ pCppArgs[nPos] = __builtin_alloca( pParamTypeDescr->nSize ),
+ pUnoArgs[nPos], pParamTypeDescr, pThis->getBridge()->getUno2Cpp() );
+
+ pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
+ // will be released at reconversion
+ ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
+ }
+ else // direct way
+ {
+ pCppArgs[nPos] = pUnoArgs[nPos];
+ // no longer needed
+ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
+ }
+ INSERT_INT32(&(pCppArgs[nPos]), pStack);
+ }
+ }
+
+ try
+ {
+ OSL_ENSURE( !( (pCppStack - pCppStackStart ) & 3), "UNALIGNED STACK !!! (Please DO panic)" );
+ callVirtualMethod(
+ pAdjustedThisPtr, aVtableSlot.index,
+ pCppReturn, pReturnTypeDescr->eTypeClass,
+ pStackStart, (pStack - pStackStart), pFPR, nFPR );
+ // NO exception occurred...
+ *ppUnoExc = 0;
+
+ // reconvert temporary params
+ for ( ; nTempIndizes--; )
+ {
+ sal_Int32 nIndex = pTempIndizes[nTempIndizes];
+ typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
+
+ if (pParams[nIndex].bIn)
+ {
+ if (pParams[nIndex].bOut) // inout
+ {
+ uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 ); // destroy uno value
+ uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
+ pThis->getBridge()->getCpp2Uno() );
+ }
+ }
+ else // pure out
+ {
+ uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
+ pThis->getBridge()->getCpp2Uno() );
+ }
+ // destroy temp cpp param => cpp: every param was constructed
+ uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
+
+ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
+ }
+ // return value
+ if (pCppReturn && pUnoReturn != pCppReturn)
+ {
+ uno_copyAndConvertData( pUnoReturn, pCppReturn, pReturnTypeDescr,
+ pThis->getBridge()->getCpp2Uno() );
+ uno_destructData( pCppReturn, pReturnTypeDescr, cpp_release );
+ }
+ }
+ catch (...)
+ {
+ // fill uno exception
+ fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
+
+ // temporary params
+ for ( ; nTempIndizes--; )
+ {
+ sal_Int32 nIndex = pTempIndizes[nTempIndizes];
+ // destroy temp cpp param => cpp: every param was constructed
+ uno_destructData( pCppArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], cpp_release );
+ TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
+ }
+ // return type
+ if (pReturnTypeDescr)
+ TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
+ }
+}
+
+}
+
+namespace bridges { namespace cpp_uno { namespace shared {
+
+void unoInterfaceProxyDispatch(
+ uno_Interface * pUnoI, const typelib_TypeDescription * pMemberDescr,
+ void * pReturn, void * pArgs[], uno_Any ** ppException )
+{
+ // is my surrogate
+ bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
+ = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * > (pUnoI);
+ // typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
+
+ switch (pMemberDescr->eTypeClass)
+ {
+ case typelib_TypeClass_INTERFACE_ATTRIBUTE:
+ {
+
+ VtableSlot aVtableSlot(
+ getVtableSlot(
+ reinterpret_cast<
+ typelib_InterfaceAttributeTypeDescription const * >(
+ pMemberDescr)));
+
+ if (pReturn)
+ {
+ // dependent dispatch
+ cpp_call(
+ pThis, aVtableSlot,
+ ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef,
+ 0, 0, // no params
+ pReturn, pArgs, ppException );
+ }
+ else
+ {
+ // is SET
+ typelib_MethodParameter aParam;
+ aParam.pTypeRef =
+ ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
+ typelib_TypeDescriptionReference * pReturnTypeRef = 0;
+ OUString aVoidName( RTL_CONSTASCII_USTRINGPARAM("void") );
+ typelib_typedescriptionreference_new(
+ &pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
+
+ // dependent dispatch
+ aVtableSlot.index += 1; //get then set method
+ cpp_call(
+ pThis, aVtableSlot,
+ pReturnTypeRef,
+ 1, &aParam,
+ pReturn, pArgs, ppException );
+
+ typelib_typedescriptionreference_release( pReturnTypeRef );
+ }
+
+ break;
+ }
+ case typelib_TypeClass_INTERFACE_METHOD:
+ {
+
+ VtableSlot aVtableSlot(
+ getVtableSlot(
+ reinterpret_cast<
+ typelib_InterfaceMethodTypeDescription const * >(
+ pMemberDescr)));
+ switch (aVtableSlot.index)
+ {
+ // standard calls
+ case 1: // acquire uno interface
+ (*pUnoI->acquire)( pUnoI );
+ *ppException = 0;
+ break;
+ case 2: // release uno interface
+ (*pUnoI->release)( pUnoI );
+ *ppException = 0;
+ break;
+ case 0: // queryInterface() opt
+ {
+ typelib_TypeDescription * pTD = 0;
+ TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pArgs[0] )->getTypeLibType() );
+ if (pTD)
+ {
+ uno_Interface * pInterface = 0;
+ (*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
+ pThis->pBridge->getUnoEnv(),
+ (void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
+
+ if (pInterface)
+ {
+ ::uno_any_construct(
+ reinterpret_cast< uno_Any * >( pReturn ),
+ &pInterface, pTD, 0 );
+ (*pInterface->release)( pInterface );
+ TYPELIB_DANGER_RELEASE( pTD );
+ *ppException = 0;
+ break;
+ }
+ TYPELIB_DANGER_RELEASE( pTD );
+ }
+ } // else perform queryInterface()
+ default:
+ // dependent dispatch
+ cpp_call(
+ pThis, aVtableSlot,
+ ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pReturnTypeRef,
+ ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->nParams,
+ ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pParams,
+ pReturn, pArgs, ppException );
+ }
+ break;
+ }
+ default:
+ {
+ ::com::sun::star::uno::RuntimeException aExc(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
+
+ Type const & rExcType = ::getCppuType( &aExc );
+ // binary identical null reference
+ ::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
+ }
+ }
+}
+
+} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_intel/call.s b/bridges/source/cpp_uno/gcc3_freebsd_intel/call.s
deleted file mode 100644
index f345e3a764ac..000000000000
--- a/bridges/source/cpp_uno/gcc3_freebsd_intel/call.s
+++ /dev/null
@@ -1,268 +0,0 @@
- .text
-
-.globl privateSnippetExecutorGeneral
- .type privateSnippetExecutorGeneral,@function
-privateSnippetExecutorGeneral:
-.LFBg:
- movl %esp,%ecx
- pushl %ebp # proper stack frame needed for exception handling
-.LCFIg0:
- movl %esp,%ebp
-.LCFIg1:
- subl $0x4,%esp # 32bit returnValue
- pushl %esp # 32bit &returnValue
- pushl %ecx # 32bit pCallStack
- pushl %edx # 32bit nVtableOffset
- pushl %eax # 32bit nFunctionIndex
- call cpp_vtable_call
- movl 16(%esp),%eax # 32bit returnValue
- leave
- ret
-.LFEg:
- .size privateSnippetExecutorGeneral,.-privateSnippetExecutorGeneral
-
-.globl privateSnippetExecutorVoid
- .type privateSnippetExecutorVoid,@function
-privateSnippetExecutorVoid:
-.LFBv:
- movl %esp,%ecx
- pushl %ebp # proper stack frame needed for exception handling
-.LCFIv0:
- movl %esp,%ebp
-.LCFIv1:
- pushl $0 # 32bit null pointer (returnValue not used)
- pushl %ecx # 32bit pCallStack
- pushl %edx # 32bit nVtableOffset
- pushl %eax # 32bit nFunctionIndex
- call cpp_vtable_call
- leave
- ret
-.LFEv:
- .size privateSnippetExecutorVoid,.-privateSnippetExecutorVoid
-
-.globl privateSnippetExecutorHyper
- .type privateSnippetExecutorHyper,@function
-privateSnippetExecutorHyper:
-.LFBh:
- movl %esp,%ecx
- pushl %ebp # proper stack frame needed for exception handling
-.LCFIh0:
- movl %esp,%ebp
-.LCFIh1:
- subl $0x8,%esp # 64bit returnValue
- pushl %esp # 32bit &returnValue
- pushl %ecx # 32bit pCallStack
- pushl %edx # 32bit nVtableOffset
- pushl %eax # 32bit nFunctionIndex
- call cpp_vtable_call
- movl 16(%esp),%eax # 64bit returnValue, lower half
- movl 20(%esp),%edx # 64bit returnValue, upper half
- leave
- ret
-.LFEh:
- .size privateSnippetExecutorHyper,.-privateSnippetExecutorHyper
-
-.globl privateSnippetExecutorFloat
- .type privateSnippetExecutorFloat,@function
-privateSnippetExecutorFloat:
-.LFBf:
- movl %esp,%ecx
- pushl %ebp # proper stack frame needed for exception handling
-.LCFIf0:
- movl %esp,%ebp
-.LCFIf1:
- subl $0x4,%esp # 32bit returnValue
- pushl %esp # 32bit &returnValue
- pushl %ecx # 32bit pCallStack
- pushl %edx # 32bit nVtableOffset
- pushl %eax # 32bit nFunctionIndex
- call cpp_vtable_call
- flds 16(%esp) # 32bit returnValue
- leave
- ret
-.LFEf:
- .size privateSnippetExecutorFloat,.-privateSnippetExecutorFloat
-
-.globl privateSnippetExecutorDouble
- .type privateSnippetExecutorDouble,@function
-privateSnippetExecutorDouble:
-.LFBd:
- movl %esp,%ecx
- pushl %ebp # proper stack frame needed for exception handling
-.LCFId0:
- movl %esp,%ebp
-.LCFId1:
- subl $0x8,%esp # 64bit returnValue
- pushl %esp # 32bit &returnValue
- pushl %ecx # 32bit pCallStack
- pushl %edx # 32bit nVtableOffset
- pushl %eax # 32bit nFunctionIndex
- call cpp_vtable_call
- fldl 16(%esp) # 64bit returnValue
- leave
- ret
-.LFEd:
- .size privateSnippetExecutorDouble,.-privateSnippetExecutorDouble
-
-.globl privateSnippetExecutorClass
- .type privateSnippetExecutorClass,@function
-privateSnippetExecutorClass:
-.LFBc:
- movl %esp,%ecx
- pushl %ebp # proper stack frame needed for exception handling
-.LCFIc0:
- movl %esp,%ebp
-.LCFIc1:
- subl $0x4,%esp # 32bit returnValue
- pushl %esp # 32bit &returnValue
- pushl %ecx # 32bit pCallStack
- pushl %edx # 32bit nVtableOffset
- pushl %eax # 32bit nFunctionIndex
- call cpp_vtable_call
- movl 16(%esp),%eax # 32bit returnValue
- leave
- ret $4
-.LFEc:
- .size privateSnippetExecutorClass,.-privateSnippetExecutorClass
-
- .section .eh_frame,"a",@progbits
-.Lframe1:
- .long .LECIE1-.LSCIE1 # length
-.LSCIE1:
- .long 0 # CIE_ID
- .byte 1 # version
- .string "zR" # augmentation
- .uleb128 1 # code_alignment_factor
- .sleb128 -4 # data_alignment_factor
- .byte 8 # return_address_register
- .uleb128 1 # augmentation size 1:
- .byte 0x1B # FDE Encoding (pcrel sdata4)
- # initial_instructions:
- .byte 0x0C # DW_CFA_def_cfa %esp, 4
- .uleb128 4
- .uleb128 4
- .byte 0x88 # DW_CFA_offset ret, 1
- .uleb128 1
- .align 4
-.LECIE1:
-.LSFDEg:
- .long .LEFDEg-.LASFDEg # length
-.LASFDEg:
- .long .LASFDEg-.Lframe1 # CIE_pointer
- .long .LFBg-. # initial_location
- .long .LFEg-.LFBg # address_range
- .uleb128 0 # augmentation size 0
- # instructions:
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIg0-.LFBg
- .byte 0x0E # DW_CFA_def_cfa_offset 8
- .uleb128 8
- .byte 0x85 # DW_CFA_offset %ebp, 2
- .uleb128 2
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIg1-.LCFIg0
- .byte 0x0D # DW_CFA_def_cfa_register %ebp
- .uleb128 5
- .align 4
-.LEFDEg:
-.LSFDEv:
- .long .LEFDEv-.LASFDEv # length
-.LASFDEv:
- .long .LASFDEv-.Lframe1 # CIE_pointer
- .long .LFBv-. # initial_location
- .long .LFEv-.LFBv # address_range
- .uleb128 0 # augmentation size 0
- # instructions:
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIv0-.LFBv
- .byte 0x0E # DW_CFA_def_cfa_offset 8
- .uleb128 8
- .byte 0x85 # DW_CFA_offset %ebp, 2
- .uleb128 2
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIv1-.LCFIv0
- .byte 0x0D # DW_CFA_def_cfa_register %ebp
- .uleb128 5
- .align 4
-.LEFDEv:
-.LSFDEh:
- .long .LEFDEh-.LASFDEh # length
-.LASFDEh:
- .long .LASFDEh-.Lframe1 # CIE_pointer
- .long .LFBh-. # initial_location
- .long .LFEh-.LFBh # address_range
- .uleb128 0 # augmentation size 0
- # instructions:
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIh0-.LFBh
- .byte 0x0E # DW_CFA_def_cfa_offset 8
- .uleb128 8
- .byte 0x85 # DW_CFA_offset %ebp, 2
- .uleb128 2
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIh1-.LCFIh0
- .byte 0x0D # DW_CFA_def_cfa_register %ebp
- .uleb128 5
- .align 4
-.LEFDEh:
-.LSFDEf:
- .long .LEFDEf-.LASFDEf # length
-.LASFDEf:
- .long .LASFDEf-.Lframe1 # CIE_pointer
- .long .LFBf-. # initial_location
- .long .LFEf-.LFBf # address_range
- .uleb128 0 # augmentation size 0
- # instructions:
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIf0-.LFBf
- .byte 0x0E # DW_CFA_def_cfa_offset 8
- .uleb128 8
- .byte 0x85 # DW_CFA_offset %ebp, 2
- .uleb128 2
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIf1-.LCFIf0
- .byte 0x0D # DW_CFA_def_cfa_register %ebp
- .uleb128 5
- .align 4
-.LEFDEf:
-.LSFDEd:
- .long .LEFDEd-.LASFDEd # length
-.LASFDEd:
- .long .LASFDEd-.Lframe1 # CIE_pointer
- .long .LFBd-. # initial_location
- .long .LFEd-.LFBd # address_range
- .uleb128 0 # augmentation size 0
- # instructions:
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFId0-.LFBd
- .byte 0x0E # DW_CFA_def_cfa_offset 8
- .uleb128 8
- .byte 0x85 # DW_CFA_offset %ebp, 2
- .uleb128 2
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFId1-.LCFId0
- .byte 0x0D # DW_CFA_def_cfa_register %ebp
- .uleb128 5
- .align 4
-.LEFDEd:
-.LSFDEc:
- .long .LEFDEc-.LASFDEc # length
-.LASFDEc:
- .long .LASFDEc-.Lframe1 # CIE_pointer
- .long .LFBc-. # initial_location
- .long .LFEc-.LFBc # address_range
- .uleb128 0 # augmentation size 0
- # instructions:
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIc0-.LFBc
- .byte 0x0E # DW_CFA_def_cfa_offset 8
- .uleb128 8
- .byte 0x85 # DW_CFA_offset %ebp, 2
- .uleb128 2
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIc1-.LCFIc0
- .byte 0x0D # DW_CFA_def_cfa_register %ebp
- .uleb128 5
- .align 4
-.LEFDEc:
- .section .note.GNU-stack,"",@progbits
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx
deleted file mode 100644
index 5740b27d9871..000000000000
--- a/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx
+++ /dev/null
@@ -1,490 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_bridges.hxx"
-
-#include <com/sun/star/uno/genfunc.hxx>
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include <uno/data.h>
-#include <typelib/typedescription.hxx>
-
-#include "bridges/cpp_uno/shared/bridge.hxx"
-#include "bridges/cpp_uno/shared/cppinterfaceproxy.hxx"
-#include "bridges/cpp_uno/shared/types.hxx"
-#include "bridges/cpp_uno/shared/vtablefactory.hxx"
-
-#include "share.hxx"
-
-using namespace ::com::sun::star::uno;
-
-namespace
-{
-
-//==================================================================================================
-void cpp2uno_call(
- bridges::cpp_uno::shared::CppInterfaceProxy * pThis,
- const typelib_TypeDescription * pMemberTypeDescr,
- typelib_TypeDescriptionReference * pReturnTypeRef, // 0 indicates void return
- sal_Int32 nParams, typelib_MethodParameter * pParams,
- void ** pCallStack,
- void * pReturnValue )
-{
- // pCallStack: ret, [return ptr], this, params
- char * pCppStack = (char *)(pCallStack +1);
-
- // return
- typelib_TypeDescription * pReturnTypeDescr = 0;
- if (pReturnTypeRef)
- TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
- void * pUnoReturn = 0;
- void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
-
- if (pReturnTypeDescr)
- {
- if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
- {
- pUnoReturn = pReturnValue; // direct way for simple types
- }
- else // complex return via ptr (pCppReturn)
- {
- pCppReturn = *(void **)pCppStack;
- pCppStack += sizeof(void *);
-
- pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType(
- pReturnTypeDescr )
- ? alloca( pReturnTypeDescr->nSize )
- : pCppReturn); // direct way
- }
- }
- // pop this
- pCppStack += sizeof( void* );
-
- // stack space
- OSL_ENSURE( sizeof(void *) == sizeof(sal_Int32), "### unexpected size!" );
- // parameters
- void ** pUnoArgs = (void **)alloca( 4 * sizeof(void *) * nParams );
- void ** pCppArgs = pUnoArgs + nParams;
- // indizes of values this have to be converted (interface conversion cpp<=>uno)
- sal_Int32 * pTempIndizes = (sal_Int32 *)(pUnoArgs + (2 * nParams));
- // type descriptions for reconversions
- typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pUnoArgs + (3 * nParams));
-
- sal_Int32 nTempIndizes = 0;
-
- for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
- {
- const typelib_MethodParameter & rParam = pParams[nPos];
- typelib_TypeDescription * pParamTypeDescr = 0;
- TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
- if (!rParam.bOut
- && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
- // value
- {
- pCppArgs[nPos] = pCppStack;
- pUnoArgs[nPos] = pCppStack;
- switch (pParamTypeDescr->eTypeClass)
- {
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- case typelib_TypeClass_DOUBLE:
- pCppStack += sizeof(sal_Int32); // extra long
- break;
- default:
- break;
- }
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- else // ptr to complex value | ref
- {
- pCppArgs[nPos] = *(void **)pCppStack;
-
- if (! rParam.bIn) // is pure out
- {
- // uno out is unconstructed mem!
- pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize );
- pTempIndizes[nTempIndizes] = nPos;
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
- }
- // is in/inout
- else if (bridges::cpp_uno::shared::relatesToInterfaceType(
- pParamTypeDescr ))
- {
- uno_copyAndConvertData( pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- *(void **)pCppStack, pParamTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
- }
- else // direct way
- {
- pUnoArgs[nPos] = *(void **)pCppStack;
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- }
- pCppStack += sizeof(sal_Int32); // standard parameter length
- }
-
- // ExceptionHolder
- uno_Any aUnoExc; // Any will be constructed by callee
- uno_Any * pUnoExc = &aUnoExc;
-
- // invoke uno dispatch call
- (*pThis->getUnoI()->pDispatcher)(
- pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
-
- // in case an exception occured...
- if (pUnoExc)
- {
- // destruct temporary in/inout params
- for ( ; nTempIndizes--; )
- {
- sal_Int32 nIndex = pTempIndizes[nTempIndizes];
-
- if (pParams[nIndex].bIn) // is in/inout => was constructed
- uno_destructData( pUnoArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], 0 );
- TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
- }
- if (pReturnTypeDescr)
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
-
- CPPU_CURRENT_NAMESPACE::raiseException(
- &aUnoExc, pThis->getBridge()->getUno2Cpp() );
- // has to destruct the any
- }
- else // else no exception occured...
- {
- // temporary params
- for ( ; nTempIndizes--; )
- {
- sal_Int32 nIndex = pTempIndizes[nTempIndizes];
- typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
- if (pParams[nIndex].bOut) // inout/out
- {
- // convert and assign
- uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
- uno_copyAndConvertData( pCppArgs[nIndex], pUnoArgs[nIndex], pParamTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
- }
- // destroy temp uno param
- uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- // return
- if (pCppReturn) // has complex return
- {
- if (pUnoReturn != pCppReturn) // needs reconversion
- {
- uno_copyAndConvertData( pCppReturn, pUnoReturn, pReturnTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
- // destroy temp uno return
- uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
- }
- // complex return ptr is set to eax
- *static_cast< void ** >(pReturnValue) = pCppReturn;
- }
- if (pReturnTypeDescr)
- {
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
- }
- }
-}
-
-
-//==================================================================================================
-extern "C" void cpp_vtable_call(
- int nFunctionIndex, int nVtableOffset, void** pCallStack,
- void * pReturnValue )
-{
- OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
-
- // pCallStack: ret adr, [ret *], this, params
- void * pThis;
- if( nFunctionIndex & 0x80000000 )
- {
- nFunctionIndex &= 0x7fffffff;
- pThis = pCallStack[2];
- }
- else
- {
- pThis = pCallStack[1];
- }
- pThis = static_cast< char * >(pThis) - nVtableOffset;
- bridges::cpp_uno::shared::CppInterfaceProxy * pCppI
- = bridges::cpp_uno::shared::CppInterfaceProxy::castInterfaceToProxy(
- pThis);
-
- typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
-
- OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
- if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
- {
- throw RuntimeException(
- rtl::OUString::createFromAscii("illegal vtable index!"),
- (XInterface *)pThis );
- }
-
- // determine called method
- sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
- OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member index!" );
-
- TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
-
- switch (aMemberDescr.get()->eTypeClass)
- {
- case typelib_TypeClass_INTERFACE_ATTRIBUTE:
- {
- if (pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos] == nFunctionIndex)
- {
- // is GET method
- cpp2uno_call(
- pCppI, aMemberDescr.get(),
- ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef,
- 0, 0, // no params
- pCallStack, pReturnValue );
- }
- else
- {
- // is SET method
- typelib_MethodParameter aParam;
- aParam.pTypeRef =
- ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
- cpp2uno_call(
- pCppI, aMemberDescr.get(),
- 0, // indicates void return
- 1, &aParam,
- pCallStack, pReturnValue );
- }
- break;
- }
- case typelib_TypeClass_INTERFACE_METHOD:
- {
- // is METHOD
- switch (nFunctionIndex)
- {
- case 1: // acquire()
- pCppI->acquireProxy(); // non virtual call!
- break;
- case 2: // release()
- pCppI->releaseProxy(); // non virtual call!
- break;
- case 0: // queryInterface() opt
- {
- typelib_TypeDescription * pTD = 0;
- TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pCallStack[3] )->getTypeLibType() );
- if (pTD)
- {
- XInterface * pInterface = 0;
- (*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
- pCppI->getBridge()->getCppEnv(),
- (void **)&pInterface, pCppI->getOid().pData,
- (typelib_InterfaceTypeDescription *)pTD );
-
- if (pInterface)
- {
- ::uno_any_construct(
- reinterpret_cast< uno_Any * >( pCallStack[1] ),
- &pInterface, pTD, cpp_acquire );
- pInterface->release();
- TYPELIB_DANGER_RELEASE( pTD );
- *static_cast< void ** >(pReturnValue) = pCallStack[1];
- break;
- }
- TYPELIB_DANGER_RELEASE( pTD );
- }
- } // else perform queryInterface()
- default:
- cpp2uno_call(
- pCppI, aMemberDescr.get(),
- ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pReturnTypeRef,
- ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->nParams,
- ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pParams,
- pCallStack, pReturnValue );
- }
- break;
- }
- default:
- {
- throw RuntimeException(
- rtl::OUString::createFromAscii("no member description found!"),
- (XInterface *)pThis );
- }
- }
-}
-
-//==================================================================================================
-extern "C" void privateSnippetExecutorGeneral();
-extern "C" void privateSnippetExecutorVoid();
-extern "C" void privateSnippetExecutorHyper();
-extern "C" void privateSnippetExecutorFloat();
-extern "C" void privateSnippetExecutorDouble();
-extern "C" void privateSnippetExecutorClass();
-extern "C" typedef void (*PrivateSnippetExecutor)();
-
-int const codeSnippetSize = 16;
-
-unsigned char * codeSnippet(
- unsigned char * code, sal_Int32 functionIndex, sal_Int32 vtableOffset,
- typelib_TypeClass returnTypeClass)
-{
- if (!bridges::cpp_uno::shared::isSimpleType(returnTypeClass)) {
- functionIndex |= 0x80000000;
- }
- PrivateSnippetExecutor exec;
- switch (returnTypeClass) {
- case typelib_TypeClass_VOID:
- exec = privateSnippetExecutorVoid;
- break;
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- exec = privateSnippetExecutorHyper;
- break;
- case typelib_TypeClass_FLOAT:
- exec = privateSnippetExecutorFloat;
- break;
- case typelib_TypeClass_DOUBLE:
- exec = privateSnippetExecutorDouble;
- break;
- case typelib_TypeClass_STRING:
- case typelib_TypeClass_TYPE:
- case typelib_TypeClass_ANY:
- case typelib_TypeClass_SEQUENCE:
- case typelib_TypeClass_STRUCT:
- case typelib_TypeClass_INTERFACE:
- exec = privateSnippetExecutorClass;
- break;
- default:
- exec = privateSnippetExecutorGeneral;
- break;
- }
- unsigned char * p = code;
- OSL_ASSERT(sizeof (sal_Int32) == 4);
- // mov function_index, %eax:
- *p++ = 0xB8;
- *reinterpret_cast< sal_Int32 * >(p) = functionIndex;
- p += sizeof (sal_Int32);
- // mov vtable_offset, %edx:
- *p++ = 0xBA;
- *reinterpret_cast< sal_Int32 * >(p) = vtableOffset;
- p += sizeof (sal_Int32);
- // jmp privateSnippetExecutor:
- *p++ = 0xE9;
- *reinterpret_cast< sal_Int32 * >(p)
- = ((unsigned char *) exec) - p - sizeof (sal_Int32);
- p += sizeof (sal_Int32);
- OSL_ASSERT(p - code <= codeSnippetSize);
- return code + codeSnippetSize;
-}
-
-}
-
-struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
-
-bridges::cpp_uno::shared::VtableFactory::Slot *
-bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
-{
- return static_cast< Slot * >(block) + 2;
-}
-
-sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
- sal_Int32 slotCount)
-{
- return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
-}
-
-bridges::cpp_uno::shared::VtableFactory::Slot *
-bridges::cpp_uno::shared::VtableFactory::initializeBlock(
- void * block, sal_Int32 slotCount)
-{
- Slot * slots = mapBlockToVtable(block);
- slots[-2].fn = 0;
- slots[-1].fn = 0;
- return slots + slotCount;
-}
-
-unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
- Slot ** slots, unsigned char * code,
- typelib_InterfaceTypeDescription const * type, sal_Int32 functionOffset,
- sal_Int32 functionCount, sal_Int32 vtableOffset)
-{
- (*slots) -= functionCount;
- Slot * s = *slots;
- for (sal_Int32 i = 0; i < type->nMembers; ++i) {
- typelib_TypeDescription * member = 0;
- TYPELIB_DANGER_GET(&member, type->ppMembers[i]);
- OSL_ASSERT(member != 0);
- switch (member->eTypeClass) {
- case typelib_TypeClass_INTERFACE_ATTRIBUTE:
- // Getter:
- (s++)->fn = code;
- code = codeSnippet(
- code, functionOffset++, vtableOffset,
- reinterpret_cast< typelib_InterfaceAttributeTypeDescription * >(
- member)->pAttributeTypeRef->eTypeClass);
- // Setter:
- if (!reinterpret_cast<
- typelib_InterfaceAttributeTypeDescription * >(
- member)->bReadOnly)
- {
- (s++)->fn = code;
- code = codeSnippet(
- code, functionOffset++, vtableOffset,
- typelib_TypeClass_VOID);
- }
- break;
-
- case typelib_TypeClass_INTERFACE_METHOD:
- (s++)->fn = code;
- code = codeSnippet(
- code, functionOffset++, vtableOffset,
- reinterpret_cast< typelib_InterfaceMethodTypeDescription * >(
- member)->pReturnTypeRef->eTypeClass);
- break;
-
- default:
- OSL_ASSERT(false);
- break;
- }
- TYPELIB_DANGER_RELEASE(member);
- }
- return code;
-}
-
-void bridges::cpp_uno::shared::VtableFactory::flushCode(
- unsigned char const *, unsigned char const *)
-{}
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx b/bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx
deleted file mode 100644
index c2287b9b6fa9..000000000000
--- a/bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx
+++ /dev/null
@@ -1,338 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_bridges.hxx"
-
-#include <stdio.h>
-#include <dlfcn.h>
-#include <cxxabi.h>
-#include <hash_map>
-#include <sys/param.h>
-
-#include <rtl/strbuf.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <osl/diagnose.h>
-#include <osl/mutex.hxx>
-
-#include <com/sun/star/uno/genfunc.hxx>
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include <typelib/typedescription.hxx>
-#include <uno/any2.h>
-
-#include "share.hxx"
-
-
-using namespace ::std;
-using namespace ::osl;
-using namespace ::rtl;
-using namespace ::com::sun::star::uno;
-using namespace ::__cxxabiv1;
-
-
-namespace CPPU_CURRENT_NAMESPACE
-{
-
-void dummy_can_throw_anything( char const * )
-{
-}
-
-//==================================================================================================
-static OUString toUNOname( char const * p ) SAL_THROW( () )
-{
-#if OSL_DEBUG_LEVEL > 1
- char const * start = p;
-#endif
-
- // example: N3com3sun4star4lang24IllegalArgumentExceptionE
-
- OUStringBuffer buf( 64 );
- OSL_ASSERT( 'N' == *p );
- ++p; // skip N
-
- while ('E' != *p)
- {
- // read chars count
- long n = (*p++ - '0');
- while ('0' <= *p && '9' >= *p)
- {
- n *= 10;
- n += (*p++ - '0');
- }
- buf.appendAscii( p, n );
- p += n;
- if ('E' != *p)
- buf.append( (sal_Unicode)'.' );
- }
-
-#if OSL_DEBUG_LEVEL > 1
- OUString ret( buf.makeStringAndClear() );
- OString c_ret( OUStringToOString( ret, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> toUNOname(): %s => %s\n", start, c_ret.getStr() );
- return ret;
-#else
- return buf.makeStringAndClear();
-#endif
-}
-
-//==================================================================================================
-class RTTI
-{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
-
- Mutex m_mutex;
- t_rtti_map m_rttis;
- t_rtti_map m_generatedRttis;
-
- void * m_hApp;
-
-public:
- RTTI() SAL_THROW( () );
- ~RTTI() SAL_THROW( () );
-
- type_info * getRTTI( typelib_CompoundTypeDescription * ) SAL_THROW( () );
-};
-//__________________________________________________________________________________________________
-RTTI::RTTI() SAL_THROW( () )
-#if __FreeBSD_version < 602103
- : m_hApp( dlopen( 0, RTLD_NOW | RTLD_GLOBAL ) )
-#else
- : m_hApp( dlopen( 0, RTLD_LAZY ) )
-#endif
-{
-}
-//__________________________________________________________________________________________________
-RTTI::~RTTI() SAL_THROW( () )
-{
- dlclose( m_hApp );
-}
-
-//__________________________________________________________________________________________________
-type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THROW( () )
-{
- type_info * rtti;
-
- OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName;
-
- MutexGuard guard( m_mutex );
- t_rtti_map::const_iterator iRttiFind( m_rttis.find( unoName ) );
- if (iRttiFind == m_rttis.end())
- {
- // RTTI symbol
- OStringBuffer buf( 64 );
- buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") );
- sal_Int32 index = 0;
- do
- {
- OUString token( unoName.getToken( 0, '.', index ) );
- buf.append( token.getLength() );
- OString c_token( OUStringToOString( token, RTL_TEXTENCODING_ASCII_US ) );
- buf.append( c_token );
- }
- while (index >= 0);
- buf.append( 'E' );
-
- OString symName( buf.makeStringAndClear() );
-#if __FreeBSD_version < 602103 /* #i22253# */
- rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() );
-#else
- rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
-#endif
-
- if (rtti)
- {
- pair< t_rtti_map::iterator, bool > insertion(
- m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
- OSL_ENSURE( insertion.second, "### inserting new rtti failed?!" );
- }
- else
- {
- // try to lookup the symbol in the generated rtti map
- t_rtti_map::const_iterator iFind( m_generatedRttis.find( unoName ) );
- if (iFind == m_generatedRttis.end())
- {
- // we must generate it !
- // symbol and rtti-name is nearly identical,
- // the symbol is prefixed with _ZTI
- char const * rttiName = symName.getStr() +4;
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr,"generated rtti for %s\n", rttiName );
-#endif
- if (pTypeDescr->pBaseTypeDescription)
- {
- // ensure availability of base
- type_info * base_rtti = getRTTI(
- (typelib_CompoundTypeDescription *)pTypeDescr->pBaseTypeDescription );
- rtti = new __si_class_type_info(
- strdup( rttiName ), (__class_type_info *)base_rtti );
- }
- else
- {
- // this class has no base class
- rtti = new __class_type_info( strdup( rttiName ) );
- }
-
- pair< t_rtti_map::iterator, bool > insertion(
- m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
- OSL_ENSURE( insertion.second, "### inserting new generated rtti failed?!" );
- }
- else // taking already generated rtti
- {
- rtti = iFind->second;
- }
- }
- }
- else
- {
- rtti = iRttiFind->second;
- }
-
- return rtti;
-}
-
-//--------------------------------------------------------------------------------------------------
-static void deleteException( void * pExc )
-{
- __cxa_exception const * header = ((__cxa_exception const *)pExc - 1);
- typelib_TypeDescription * pTD = 0;
- OUString unoName( toUNOname( header->exceptionType->name() ) );
- ::typelib_typedescription_getByName( &pTD, unoName.pData );
- OSL_ENSURE( pTD, "### unknown exception type! leaving out destruction => leaking!!!" );
- if (pTD)
- {
- ::uno_destructData( pExc, pTD, cpp_release );
- ::typelib_typedescription_release( pTD );
- }
-}
-
-//==================================================================================================
-void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
-{
-#if OSL_DEBUG_LEVEL > 1
- OString cstr(
- OUStringToOString(
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
-#endif
- void * pCppExc;
- type_info * rtti;
-
- {
- // construct cpp exception object
- typelib_TypeDescription * pTypeDescr = 0;
- TYPELIB_DANGER_GET( &pTypeDescr, pUnoExc->pType );
- OSL_ASSERT( pTypeDescr );
- if (! pTypeDescr)
- {
- throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("cannot get typedescription for type ") ) +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
- }
-
- pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
- ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp );
-
- // destruct uno exception
- ::uno_any_destruct( pUnoExc, 0 );
- // avoiding locked counts
- static RTTI * s_rtti = 0;
- if (! s_rtti)
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if (! s_rtti)
- {
-#ifdef LEAK_STATIC_DATA
- s_rtti = new RTTI();
-#else
- static RTTI rtti_data;
- s_rtti = &rtti_data;
-#endif
- }
- }
- rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
- if (! rtti)
- {
- throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("no rtti for type ") ) +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
- }
- }
-
- __cxa_throw( pCppExc, rtti, deleteException );
-}
-
-//==================================================================================================
-void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping * pCpp2Uno )
-{
- if (! header)
- {
- RuntimeException aRE(
- OUString( RTL_CONSTASCII_USTRINGPARAM("no exception header!") ),
- Reference< XInterface >() );
- Type const & rType = ::getCppuType( &aRE );
- uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
-#if OSL_DEBUG_LEVEL > 0
- OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
-#endif
- return;
- }
-
- typelib_TypeDescription * pExcTypeDescr = 0;
- OUString unoName( toUNOname( header->exceptionType->name() ) );
-#if OSL_DEBUG_LEVEL > 1
- OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
-#endif
- typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
- if (0 == pExcTypeDescr)
- {
- RuntimeException aRE(
- OUString( RTL_CONSTASCII_USTRINGPARAM("exception type not found: ") ) + unoName,
- Reference< XInterface >() );
- Type const & rType = ::getCppuType( &aRE );
- uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
-#if OSL_DEBUG_LEVEL > 0
- OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
-#endif
- }
- else
- {
- // construct uno exception any
- uno_any_constructAndConvert( pUnoExc, header->adjustedPtr, pExcTypeDescr, pCpp2Uno );
- typelib_typedescription_release( pExcTypeDescr );
- }
-}
-
-}
-
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx
deleted file mode 100644
index 094a1d1d0177..000000000000
--- a/bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx
+++ /dev/null
@@ -1,444 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_bridges.hxx"
-
-#include <stdlib.h>
-
-#include <com/sun/star/uno/genfunc.hxx>
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include <uno/data.h>
-
-#include "bridges/cpp_uno/shared/bridge.hxx"
-#include "bridges/cpp_uno/shared/types.hxx"
-#include "bridges/cpp_uno/shared/unointerfaceproxy.hxx"
-#include "bridges/cpp_uno/shared/vtables.hxx"
-
-#include "share.hxx"
-
-using namespace ::rtl;
-using namespace ::com::sun::star::uno;
-
-namespace
-{
-
-//==================================================================================================
-// The call instruction within the asm section of callVirtualMethod may throw
-// exceptions. So that the compiler handles this correctly, it is important
-// that (a) callVirtualMethod might call dummy_can_throw_anything (although this
-// never happens at runtime), which in turn can throw exceptions, and (b)
-// callVirtualMethod is not inlined at its call site (so that any exceptions are
-// caught which are thrown from the instruction calling callVirtualMethod):
-void callVirtualMethod(
- void * pAdjustedThisPtr,
- sal_Int32 nVtableIndex,
- void * pRegisterReturn,
- typelib_TypeClass eReturnType,
- sal_Int32 * pStackLongs,
- sal_Int32 nStackLongs ) __attribute__((noinline));
-
-void callVirtualMethod(
- void * pAdjustedThisPtr,
- sal_Int32 nVtableIndex,
- void * pRegisterReturn,
- typelib_TypeClass eReturnType,
- sal_Int32 * pStackLongs,
- sal_Int32 nStackLongs )
-{
- // parameter list is mixed list of * and values
- // reference parameters are pointers
-
- OSL_ENSURE( pStackLongs && pAdjustedThisPtr, "### null ptr!" );
- OSL_ENSURE( (sizeof(void *) == 4) && (sizeof(sal_Int32) == 4), "### unexpected size of int!" );
- OSL_ENSURE( nStackLongs && pStackLongs, "### no stack in callVirtualMethod !" );
-
- // never called
- if (! pAdjustedThisPtr) CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something
-
- volatile long edx = 0, eax = 0; // for register returns
- void * stackptr;
- asm volatile (
- "mov %%esp, %6\n\t"
- // copy values
- "mov %0, %%eax\n\t"
- "mov %%eax, %%edx\n\t"
- "dec %%edx\n\t"
- "shl $2, %%edx\n\t"
- "add %1, %%edx\n"
- "Lcopy:\n\t"
- "pushl 0(%%edx)\n\t"
- "sub $4, %%edx\n\t"
- "dec %%eax\n\t"
- "jne Lcopy\n\t"
- // do the actual call
- "mov %2, %%edx\n\t"
- "mov 0(%%edx), %%edx\n\t"
- "mov %3, %%eax\n\t"
- "shl $2, %%eax\n\t"
- "add %%eax, %%edx\n\t"
- "mov 0(%%edx), %%edx\n\t"
- "call *%%edx\n\t"
- // save return registers
- "mov %%eax, %4\n\t"
- "mov %%edx, %5\n\t"
- // cleanup stack
- "mov %6, %%esp\n\t"
- :
- : "m"(nStackLongs), "m"(pStackLongs), "m"(pAdjustedThisPtr),
- "m"(nVtableIndex), "m"(eax), "m"(edx), "m"(stackptr)
- : "eax", "edx" );
- switch( eReturnType )
- {
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- ((long*)pRegisterReturn)[1] = edx;
- case typelib_TypeClass_LONG:
- case typelib_TypeClass_UNSIGNED_LONG:
- case typelib_TypeClass_CHAR:
- case typelib_TypeClass_ENUM:
- ((long*)pRegisterReturn)[0] = eax;
- break;
- case typelib_TypeClass_SHORT:
- case typelib_TypeClass_UNSIGNED_SHORT:
- *(unsigned short*)pRegisterReturn = eax;
- break;
- case typelib_TypeClass_BOOLEAN:
- case typelib_TypeClass_BYTE:
- *(unsigned char*)pRegisterReturn = eax;
- break;
- case typelib_TypeClass_FLOAT:
- asm ( "fstps %0" : : "m"(*(char *)pRegisterReturn) );
- break;
- case typelib_TypeClass_DOUBLE:
- asm ( "fstpl %0\n\t" : : "m"(*(char *)pRegisterReturn) );
- break;
- default:
- break;
- }
-}
-
-//==================================================================================================
-static void cpp_call(
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
- bridges::cpp_uno::shared::VtableSlot aVtableSlot,
- typelib_TypeDescriptionReference * pReturnTypeRef,
- sal_Int32 nParams, typelib_MethodParameter * pParams,
- void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
-{
- // max space for: [complex ret ptr], values|ptr ...
- char * pCppStack =
- (char *)alloca( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
- char * pCppStackStart = pCppStack;
-
- // return
- typelib_TypeDescription * pReturnTypeDescr = 0;
- TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
- OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
-
- void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
-
- if (pReturnTypeDescr)
- {
- if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
- {
- pCppReturn = pUnoReturn; // direct way for simple types
- }
- else
- {
- // complex return via ptr
- pCppReturn = *(void **)pCppStack
- = (bridges::cpp_uno::shared::relatesToInterfaceType(
- pReturnTypeDescr )
- ? alloca( pReturnTypeDescr->nSize )
- : pUnoReturn); // direct way
- pCppStack += sizeof(void *);
- }
- }
- // push this
- void * pAdjustedThisPtr = reinterpret_cast< void ** >(pThis->getCppI())
- + aVtableSlot.offset;
- *(void**)pCppStack = pAdjustedThisPtr;
- pCppStack += sizeof( void* );
-
- // stack space
- OSL_ENSURE( sizeof(void *) == sizeof(sal_Int32), "### unexpected size!" );
- // args
- void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams );
- // indizes of values this have to be converted (interface conversion cpp<=>uno)
- sal_Int32 * pTempIndizes = (sal_Int32 *)(pCppArgs + nParams);
- // type descriptions for reconversions
- typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
-
- sal_Int32 nTempIndizes = 0;
-
- for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
- {
- const typelib_MethodParameter & rParam = pParams[nPos];
- typelib_TypeDescription * pParamTypeDescr = 0;
- TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
- if (!rParam.bOut
- && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
- {
- uno_copyAndConvertData( pCppArgs[nPos] = pCppStack, pUnoArgs[nPos], pParamTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
-
- switch (pParamTypeDescr->eTypeClass)
- {
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- case typelib_TypeClass_DOUBLE:
- pCppStack += sizeof(sal_Int32); // extra long
- break;
- default:
- break;
- }
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- else // ptr to complex value | ref
- {
- if (! rParam.bIn) // is pure out
- {
- // cpp out is constructed mem, uno out is not!
- uno_constructData(
- *(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- pParamTypeDescr );
- pTempIndizes[nTempIndizes] = nPos; // default constructed for cpp call
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
- }
- // is in/inout
- else if (bridges::cpp_uno::shared::relatesToInterfaceType(
- pParamTypeDescr ))
- {
- uno_copyAndConvertData(
- *(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- pUnoArgs[nPos], pParamTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
-
- pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
- }
- else // direct way
- {
- *(void **)pCppStack = pCppArgs[nPos] = pUnoArgs[nPos];
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- }
- pCppStack += sizeof(sal_Int32); // standard parameter length
- }
-
- try
- {
- OSL_ENSURE( !( (pCppStack - pCppStackStart ) & 3), "UNALIGNED STACK !!! (Please DO panic)" );
- callVirtualMethod(
- pAdjustedThisPtr, aVtableSlot.index,
- pCppReturn, pReturnTypeDescr->eTypeClass,
- (sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
- // NO exception occured...
- *ppUnoExc = 0;
-
- // reconvert temporary params
- for ( ; nTempIndizes--; )
- {
- sal_Int32 nIndex = pTempIndizes[nTempIndizes];
- typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
- if (pParams[nIndex].bIn)
- {
- if (pParams[nIndex].bOut) // inout
- {
- uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 ); // destroy uno value
- uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- }
- }
- else // pure out
- {
- uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- }
- // destroy temp cpp param => cpp: every param was constructed
- uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- // return value
- if (pCppReturn && pUnoReturn != pCppReturn)
- {
- uno_copyAndConvertData( pUnoReturn, pCppReturn, pReturnTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- uno_destructData( pCppReturn, pReturnTypeDescr, cpp_release );
- }
- }
- catch (...)
- {
- // fill uno exception
- fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
- // temporary params
- for ( ; nTempIndizes--; )
- {
- sal_Int32 nIndex = pTempIndizes[nTempIndizes];
- // destroy temp cpp param => cpp: every param was constructed
- uno_destructData( pCppArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], cpp_release );
- TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
- }
- // return type
- if (pReturnTypeDescr)
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
- }
-}
-
-}
-
-namespace bridges { namespace cpp_uno { namespace shared {
-
-void unoInterfaceProxyDispatch(
- uno_Interface * pUnoI, const typelib_TypeDescription * pMemberDescr,
- void * pReturn, void * pArgs[], uno_Any ** ppException )
-{
- // is my surrogate
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
- = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI);
-
- switch (pMemberDescr->eTypeClass)
- {
- case typelib_TypeClass_INTERFACE_ATTRIBUTE:
- {
- VtableSlot aVtableSlot(
- getVtableSlot(
- reinterpret_cast<
- typelib_InterfaceAttributeTypeDescription const * >(
- pMemberDescr)));
- if (pReturn)
- {
- // dependent dispatch
- cpp_call(
- pThis, aVtableSlot,
- ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef,
- 0, 0, // no params
- pReturn, pArgs, ppException );
- }
- else
- {
- // is SET
- typelib_MethodParameter aParam;
- aParam.pTypeRef =
- ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
- typelib_TypeDescriptionReference * pReturnTypeRef = 0;
- OUString aVoidName( RTL_CONSTASCII_USTRINGPARAM("void") );
- typelib_typedescriptionreference_new(
- &pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
-
- // dependent dispatch
- aVtableSlot.index += 1; // get, then set method
- cpp_call(
- pThis, aVtableSlot,
- pReturnTypeRef,
- 1, &aParam,
- pReturn, pArgs, ppException );
-
- typelib_typedescriptionreference_release( pReturnTypeRef );
- }
-
- break;
- }
- case typelib_TypeClass_INTERFACE_METHOD:
- {
- VtableSlot aVtableSlot(
- getVtableSlot(
- reinterpret_cast<
- typelib_InterfaceMethodTypeDescription const * >(
- pMemberDescr)));
- switch (aVtableSlot.index)
- {
- // standard calls
- case 1: // acquire uno interface
- (*pUnoI->acquire)( pUnoI );
- *ppException = 0;
- break;
- case 2: // release uno interface
- (*pUnoI->release)( pUnoI );
- *ppException = 0;
- break;
- case 0: // queryInterface() opt
- {
- typelib_TypeDescription * pTD = 0;
- TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pArgs[0] )->getTypeLibType() );
- if (pTD)
- {
- uno_Interface * pInterface = 0;
- (*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
- pThis->pBridge->getUnoEnv(),
- (void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
- if (pInterface)
- {
- ::uno_any_construct(
- reinterpret_cast< uno_Any * >( pReturn ),
- &pInterface, pTD, 0 );
- (*pInterface->release)( pInterface );
- TYPELIB_DANGER_RELEASE( pTD );
- *ppException = 0;
- break;
- }
- TYPELIB_DANGER_RELEASE( pTD );
- }
- } // else perform queryInterface()
- default:
- // dependent dispatch
- cpp_call(
- pThis, aVtableSlot,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pReturnTypeRef,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->nParams,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pParams,
- pReturn, pArgs, ppException );
- }
- break;
- }
- default:
- {
- ::com::sun::star::uno::RuntimeException aExc(
- OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
- Type const & rExcType = ::getCppuType( &aExc );
- // binary identical null reference
- ::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
- }
- }
-}
-
-} } }
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/abi.cxx b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/abi.cxx
deleted file mode 100644
index 937af0152d90..000000000000
--- a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/abi.cxx
+++ /dev/null
@@ -1,803 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_bridges.hxx"
-
-// This is an implementation of the x86-64 ABI as described in 'System V
-// Application Binary Interface, AMD64 Architecture Processor Supplement'
-// (http://www.x86-64.org/documentation/abi-0.95.pdf)
-//
-// The code in this file is a modification of src/x86/ffi64.c from libffi
-// (http://sources.redhat.com/libffi/) which is under the following license:
-
-/* -----------------------------------------------------------------------
- ffi.c - Copyright (c) 2002 Bo Thorsen <bo@suse.de>
-
- x86-64 Foreign Function Interface
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- ``Software''), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
- ----------------------------------------------------------------------- */
-
-#include <abi.hxx>
-
-#include <rtl/ustring.hxx>
-
-using namespace x86_64;
-
-typedef struct
-{
- /* Registers for argument passing. */
- long gpr[MAX_GPR_REGS];
- __int128_t sse[MAX_SSE_REGS];
-
- /* Stack space for arguments. */
- char argspace[0];
-} stackLayout;
-
-/* Register class used for passing given 64bit part of the argument.
- These represent classes as documented by the PS ABI, with the exception
- of SSESF, SSEDF classes, that are basically SSE class, just gcc will
- use SF or DFmode move instead of DImode to avoid reformating penalties.
-
- Similary we play games with INTEGERSI_CLASS to use cheaper SImode moves
- whenever possible (upper half does contain padding).
- */
-enum x86_64_reg_class
-{
- X86_64_NO_CLASS,
- X86_64_INTEGER_CLASS,
- X86_64_INTEGERSI_CLASS,
- X86_64_SSE_CLASS,
- X86_64_SSESF_CLASS,
- X86_64_SSEDF_CLASS,
- X86_64_SSEUP_CLASS,
- X86_64_X87_CLASS,
- X86_64_X87UP_CLASS,
- X86_64_MEMORY_CLASS
-};
-
-#define MAX_CLASSES 4
-
-#define ALIGN(v, a) (((((size_t) (v))-1) | ((a)-1))+1)
-
-/* x86-64 register passing implementation. See x86-64 ABI for details. Goal
- of this code is to classify each 8bytes of incoming argument by the register
- class and assign registers accordingly. */
-
-/* Return the union class of CLASS1 and CLASS2.
- See the x86-64 PS ABI for details. */
-
-static enum x86_64_reg_class
-merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
-{
- /* Rule #1: If both classes are equal, this is the resulting class. */
- if (class1 == class2)
- return class1;
-
- /* Rule #2: If one of the classes is NO_CLASS, the resulting class is
- the other class. */
- if (class1 == X86_64_NO_CLASS)
- return class2;
- if (class2 == X86_64_NO_CLASS)
- return class1;
-
- /* Rule #3: If one of the classes is MEMORY, the result is MEMORY. */
- if (class1 == X86_64_MEMORY_CLASS || class2 == X86_64_MEMORY_CLASS)
- return X86_64_MEMORY_CLASS;
-
- /* Rule #4: If one of the classes is INTEGER, the result is INTEGER. */
- if ((class1 == X86_64_INTEGERSI_CLASS && class2 == X86_64_SSESF_CLASS)
- || (class2 == X86_64_INTEGERSI_CLASS && class1 == X86_64_SSESF_CLASS))
- return X86_64_INTEGERSI_CLASS;
- if (class1 == X86_64_INTEGER_CLASS || class1 == X86_64_INTEGERSI_CLASS
- || class2 == X86_64_INTEGER_CLASS || class2 == X86_64_INTEGERSI_CLASS)
- return X86_64_INTEGER_CLASS;
-
- /* Rule #5: If one of the classes is X87 or X87UP class, MEMORY is used. */
- if (class1 == X86_64_X87_CLASS || class1 == X86_64_X87UP_CLASS
- || class2 == X86_64_X87_CLASS || class2 == X86_64_X87UP_CLASS)
- return X86_64_MEMORY_CLASS;
-
- /* Rule #6: Otherwise class SSE is used. */
- return X86_64_SSE_CLASS;
-}
-
-/* Classify the argument of type TYPE and mode MODE.
- CLASSES will be filled by the register class used to pass each word
- of the operand. The number of words is returned. In case the parameter
- should be passed in memory, 0 is returned. As a special case for zero
- sized containers, classes[0] will be NO_CLASS and 1 is returned.
-
- See the x86-64 PS ABI for details.
-*/
-static int
-classify_argument( typelib_TypeDescriptionReference *pTypeRef, enum x86_64_reg_class classes[], int &rByteOffset )
-{
- /* First, align to the right place. */
- rByteOffset = ALIGN( rByteOffset, pTypeRef->pType->nAlignment );
-
- switch ( pTypeRef->eTypeClass )
- {
- case typelib_TypeClass_VOID:
- classes[0] = X86_64_NO_CLASS;
- return 1;
- case typelib_TypeClass_CHAR:
- case typelib_TypeClass_BOOLEAN:
- case typelib_TypeClass_BYTE:
- case typelib_TypeClass_SHORT:
- case typelib_TypeClass_UNSIGNED_SHORT:
- case typelib_TypeClass_LONG:
- case typelib_TypeClass_UNSIGNED_LONG:
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- case typelib_TypeClass_ENUM:
- if ( ( rByteOffset % 8 + pTypeRef->pType->nSize ) <= 4 )
- classes[0] = X86_64_INTEGERSI_CLASS;
- else
- classes[0] = X86_64_INTEGER_CLASS;
- return 1;
- case typelib_TypeClass_FLOAT:
- if ( ( rByteOffset % 8 ) == 0 )
- classes[0] = X86_64_SSESF_CLASS;
- else
- classes[0] = X86_64_SSE_CLASS;
- return 1;
- case typelib_TypeClass_DOUBLE:
- classes[0] = X86_64_SSEDF_CLASS;
- return 1;
- /*case LONGDOUBLE:
- classes[0] = X86_64_X87_CLASS;
- classes[1] = X86_64_X87UP_CLASS;
- return 2;*/
- case typelib_TypeClass_STRING:
- case typelib_TypeClass_TYPE:
- case typelib_TypeClass_ANY:
- case typelib_TypeClass_TYPEDEF:
- case typelib_TypeClass_UNION:
- case typelib_TypeClass_SEQUENCE:
- case typelib_TypeClass_ARRAY:
- case typelib_TypeClass_INTERFACE:
- return 0;
- case typelib_TypeClass_STRUCT:
- case typelib_TypeClass_EXCEPTION:
- {
- typelib_TypeDescription * pTypeDescr = 0;
- TYPELIB_DANGER_GET( &pTypeDescr, pTypeRef );
-
- const int UNITS_PER_WORD = 8;
- int words = ( pTypeDescr->nSize + UNITS_PER_WORD - 1 ) / UNITS_PER_WORD;
- enum x86_64_reg_class subclasses[MAX_CLASSES];
-
- /* If the struct is larger than 16 bytes, pass it on the stack. */
- if ( pTypeDescr->nSize > 16 )
- {
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- return 0;
- }
-
- for ( int i = 0; i < words; i++ )
- classes[i] = X86_64_NO_CLASS;
-
- const typelib_CompoundTypeDescription *pStruct = reinterpret_cast<const typelib_CompoundTypeDescription*>( pTypeDescr );
-
- /* Merge the fields of structure. */
- for ( sal_Int32 nMember = 0; nMember < pStruct->nMembers; ++nMember )
- {
- typelib_TypeDescriptionReference *pTypeInStruct = pStruct->ppTypeRefs[ nMember ];
-
- int num = classify_argument( pTypeInStruct, subclasses, rByteOffset );
-
- if ( num == 0 )
- {
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- return 0;
- }
-
- for ( int i = 0; i < num; i++ )
- {
- int pos = rByteOffset / 8;
- classes[i + pos] = merge_classes( subclasses[i], classes[i + pos] );
- }
-
- if ( pTypeInStruct->eTypeClass != typelib_TypeClass_STRUCT )
- rByteOffset = pStruct->pMemberOffsets[ nMember ];
- }
-
- TYPELIB_DANGER_RELEASE( pTypeDescr );
-
- /* Final merger cleanup. */
- for ( int i = 0; i < words; i++ )
- {
- /* If one class is MEMORY, everything should be passed in
- memory. */
- if ( classes[i] == X86_64_MEMORY_CLASS )
- return 0;
-
- /* The X86_64_SSEUP_CLASS should be always preceded by
- X86_64_SSE_CLASS. */
- if ( classes[i] == X86_64_SSEUP_CLASS
- && ( i == 0 || classes[i - 1] != X86_64_SSE_CLASS ) )
- classes[i] = X86_64_SSE_CLASS;
-
- /* X86_64_X87UP_CLASS should be preceded by X86_64_X87_CLASS. */
- if ( classes[i] == X86_64_X87UP_CLASS
- && ( i == 0 || classes[i - 1] != X86_64_X87_CLASS ) )
- classes[i] = X86_64_SSE_CLASS;
- }
- return words;
- }
-
- default:
-#if OSL_DEBUG_LEVEL > 1
- OSL_TRACE( "Unhandled case: pType->eTypeClass == %d\n", pTypeRef->eTypeClass );
-#endif
- OSL_ASSERT(0);
- }
- return 0; /* Never reached. */
-}
-
-/* Examine the argument and return set number of register required in each
- class. Return 0 iff parameter should be passed in memory. */
-bool x86_64::examine_argument( typelib_TypeDescriptionReference *pTypeRef, bool bInReturn, int &nUsedGPR, int &nUsedSSE )
-{
- enum x86_64_reg_class classes[MAX_CLASSES];
- int offset = 0;
- int n;
-
- n = classify_argument( pTypeRef, classes, offset );
-
- if ( n == 0 )
- return false;
-
- nUsedGPR = 0;
- nUsedSSE = 0;
- for ( n--; n >= 0; n-- )
- switch ( classes[n] )
- {
- case X86_64_INTEGER_CLASS:
- case X86_64_INTEGERSI_CLASS:
- nUsedGPR++;
- break;
- case X86_64_SSE_CLASS:
- case X86_64_SSESF_CLASS:
- case X86_64_SSEDF_CLASS:
- nUsedSSE++;
- break;
- case X86_64_NO_CLASS:
- case X86_64_SSEUP_CLASS:
- break;
- case X86_64_X87_CLASS:
- case X86_64_X87UP_CLASS:
- if ( !bInReturn )
- return false;
- break;
- default:
-#if OSL_DEBUG_LEVEL > 1
- OSL_TRACE( "Unhandled case: classes[n] == %d\n", classes[n] );
-#endif
- OSL_ASSERT(0);
- }
- return true;
-}
-
-bool x86_64::return_in_hidden_param( typelib_TypeDescriptionReference *pTypeRef )
-{
- int g, s;
-
- return examine_argument( pTypeRef, true, g, s ) == 0;
-}
-
-void x86_64::fill_struct( typelib_TypeDescriptionReference *pTypeRef, void * const *pGPR, void * const *pSSE, void *pStruct )
-{
- enum x86_64_reg_class classes[MAX_CLASSES];
- int offset = 0;
- int n;
-
- n = classify_argument( pTypeRef, classes, offset );
-
- sal_uInt64 *pStructAlign = reinterpret_cast<sal_uInt64 *>( pStruct );
- for ( n--; n >= 0; n-- )
- switch ( classes[n] )
- {
- case X86_64_INTEGER_CLASS:
- case X86_64_INTEGERSI_CLASS:
- *pStructAlign++ = *reinterpret_cast<sal_uInt64 *>( *pGPR++ );
- break;
- case X86_64_SSE_CLASS:
- case X86_64_SSESF_CLASS:
- case X86_64_SSEDF_CLASS:
- *pStructAlign++ = *reinterpret_cast<sal_uInt64 *>( *pSSE++ );
- break;
- }
-}
-
-#if 0
-
-/* Functions to load floats and double to an SSE register placeholder. */
-extern void float2sse (float, __int128_t *);
-extern void double2sse (double, __int128_t *);
-extern void floatfloat2sse (void *, __int128_t *);
-
-/* Functions to put the floats and doubles back. */
-extern float sse2float (__int128_t *);
-extern double sse2double (__int128_t *);
-extern void sse2floatfloat(__int128_t *, void *);
-
-/*@-exportheader@*/
-void
-ffi_prep_args (stackLayout *stack, extended_cif *ecif)
-/*@=exportheader@*/
-{
- int gprcount, ssecount, i, g, s;
- void **p_argv;
- void *argp = &stack->argspace;
- ffi_type **p_arg;
-
- /* First check if the return value should be passed in memory. If so,
- pass the pointer as the first argument. */
- gprcount = ssecount = 0;
- if (ecif->cif->rtype->type != FFI_TYPE_VOID
- && examine_argument (ecif->cif->rtype, 1, &g, &s) == 0)
- (void *)stack->gpr[gprcount++] = ecif->rvalue;
-
- for (i=ecif->cif->nargs, p_arg=ecif->cif->arg_types, p_argv = ecif->avalue;
- i!=0; i--, p_arg++, p_argv++)
- {
- int in_register = 0;
-
- switch ((*p_arg)->type)
- {
- case FFI_TYPE_SINT8:
- case FFI_TYPE_SINT16:
- case FFI_TYPE_SINT32:
- case FFI_TYPE_SINT64:
- case FFI_TYPE_UINT8:
- case FFI_TYPE_UINT16:
- case FFI_TYPE_UINT32:
- case FFI_TYPE_UINT64:
- case FFI_TYPE_POINTER:
- if (gprcount < MAX_GPR_REGS)
- {
- stack->gpr[gprcount] = 0;
- stack->gpr[gprcount++] = *(long long *)(*p_argv);
- in_register = 1;
- }
- break;
-
- case FFI_TYPE_FLOAT:
- if (ssecount < MAX_SSE_REGS)
- {
- float2sse (*(float *)(*p_argv), &stack->sse[ssecount++]);
- in_register = 1;
- }
- break;
-
- case FFI_TYPE_DOUBLE:
- if (ssecount < MAX_SSE_REGS)
- {
- double2sse (*(double *)(*p_argv), &stack->sse[ssecount++]);
- in_register = 1;
- }
- break;
- }
-
- if (in_register)
- continue;
-
- /* Either all places in registers where filled, or this is a
- type that potentially goes into a memory slot. */
- if (examine_argument (*p_arg, 0, &g, &s) == 0
- || gprcount + g > MAX_GPR_REGS || ssecount + s > MAX_SSE_REGS)
- {
- /* Pass this argument in memory. */
- argp = (void *)ALIGN(argp, (*p_arg)->alignment);
- memcpy (argp, *p_argv, (*p_arg)->size);
- argp += (*p_arg)->size;
- }
- else
- {
- /* All easy cases are eliminated. Now fire the big guns. */
-
- enum x86_64_reg_class classes[MAX_CLASSES];
- int offset = 0, j, num;
- void *a;
-
- num = classify_argument (*p_arg, classes, &offset);
- for (j=0, a=*p_argv; j<num; j++, a+=8)
- {
- switch (classes[j])
- {
- case X86_64_INTEGER_CLASS:
- case X86_64_INTEGERSI_CLASS:
- stack->gpr[gprcount++] = *(long long *)a;
- break;
- case X86_64_SSE_CLASS:
- floatfloat2sse (a, &stack->sse[ssecount++]);
- break;
- case X86_64_SSESF_CLASS:
- float2sse (*(float *)a, &stack->sse[ssecount++]);
- break;
- case X86_64_SSEDF_CLASS:
- double2sse (*(double *)a, &stack->sse[ssecount++]);
- break;
- default:
- abort();
- }
- }
- }
- }
-}
-
-/* Perform machine dependent cif processing. */
-ffi_status
-ffi_prep_cif_machdep (ffi_cif *cif)
-{
- int gprcount, ssecount, i, g, s;
-
- gprcount = ssecount = 0;
-
- /* Reset the byte count. We handle this size estimation here. */
- cif->bytes = 0;
-
- /* If the return value should be passed in memory, pass the pointer
- as the first argument. The actual memory isn't allocated here. */
- if (cif->rtype->type != FFI_TYPE_VOID
- && examine_argument (cif->rtype, 1, &g, &s) == 0)
- gprcount = 1;
-
- /* Go over all arguments and determine the way they should be passed.
- If it's in a register and there is space for it, let that be so. If
- not, add it's size to the stack byte count. */
- for (i=0; i<cif->nargs; i++)
- {
- if (examine_argument (cif->arg_types[i], 0, &g, &s) == 0
- || gprcount + g > MAX_GPR_REGS || ssecount + s > MAX_SSE_REGS)
- {
- /* This is passed in memory. First align to the basic type. */
- cif->bytes = ALIGN(cif->bytes, cif->arg_types[i]->alignment);
-
- /* Stack arguments are *always* at least 8 byte aligned. */
- cif->bytes = ALIGN(cif->bytes, 8);
-
- /* Now add the size of this argument. */
- cif->bytes += cif->arg_types[i]->size;
- }
- else
- {
- gprcount += g;
- ssecount += s;
- }
- }
-
- /* Set the flag for the closures return. */
- switch (cif->rtype->type)
- {
- case FFI_TYPE_VOID:
- case FFI_TYPE_STRUCT:
- case FFI_TYPE_SINT64:
- case FFI_TYPE_FLOAT:
- case FFI_TYPE_DOUBLE:
- case FFI_TYPE_LONGDOUBLE:
- cif->flags = (unsigned) cif->rtype->type;
- break;
-
- case FFI_TYPE_UINT64:
- cif->flags = FFI_TYPE_SINT64;
- break;
-
- default:
- cif->flags = FFI_TYPE_INT;
- break;
- }
-
- return FFI_OK;
-}
-
-typedef struct
-{
- long gpr[2];
- __int128_t sse[2];
- long double st0;
-} return_value;
-
-//#endif
-
-void
-ffi_fill_return_value (return_value *rv, extended_cif *ecif)
-{
- enum x86_64_reg_class classes[MAX_CLASSES];
- int i = 0, num;
- long *gpr = rv->gpr;
- __int128_t *sse = rv->sse;
- signed char sc;
- signed short ss;
-
- /* This is needed because of the way x86-64 handles signed short
- integers. */
- switch (ecif->cif->rtype->type)
- {
- case FFI_TYPE_SINT8:
- sc = *(signed char *)gpr;
- *(long long *)ecif->rvalue = (long long)sc;
- return;
- case FFI_TYPE_SINT16:
- ss = *(signed short *)gpr;
- *(long long *)ecif->rvalue = (long long)ss;
- return;
- default:
- /* Just continue. */
- ;
- }
-
- num = classify_argument (ecif->cif->rtype, classes, &i);
-
- if (num == 0)
- /* Return in memory. */
- ecif->rvalue = (void *) rv->gpr[0];
- else if (num == 2 && classes[0] == X86_64_X87_CLASS &&
- classes[1] == X86_64_X87UP_CLASS)
- /* This is a long double (this is easiest to handle this way instead
- of an eightbyte at a time as in the loop below. */
- *((long double *)ecif->rvalue) = rv->st0;
- else
- {
- void *a;
-
- for (i=0, a=ecif->rvalue; i<num; i++, a+=8)
- {
- switch (classes[i])
- {
- case X86_64_INTEGER_CLASS:
- case X86_64_INTEGERSI_CLASS:
- *(long long *)a = *gpr;
- gpr++;
- break;
- case X86_64_SSE_CLASS:
- sse2floatfloat (sse++, a);
- break;
- case X86_64_SSESF_CLASS:
- *(float *)a = sse2float (sse++);
- break;
- case X86_64_SSEDF_CLASS:
- *(double *)a = sse2double (sse++);
- break;
- default:
- abort();
- }
- }
- }
-}
-
-//#if 0
-
-/*@-declundef@*/
-/*@-exportheader@*/
-extern void ffi_call_UNIX64(void (*)(stackLayout *, extended_cif *),
- void (*) (return_value *, extended_cif *),
- /*@out@*/ extended_cif *,
- unsigned, /*@out@*/ unsigned *, void (*fn)());
-/*@=declundef@*/
-/*@=exportheader@*/
-
-void ffi_call(/*@dependent@*/ ffi_cif *cif,
- void (*fn)(),
- /*@out@*/ void *rvalue,
- /*@dependent@*/ void **avalue)
-{
- extended_cif ecif;
- int dummy;
-
- ecif.cif = cif;
- ecif.avalue = avalue;
-
- /* If the return value is a struct and we don't have a return */
- /* value address then we need to make one */
-
- if ((rvalue == NULL) &&
- (examine_argument (cif->rtype, 1, &dummy, &dummy) == 0))
- {
- /*@-sysunrecog@*/
- ecif.rvalue = alloca(cif->rtype->size);
- /*@=sysunrecog@*/
- }
- else
- ecif.rvalue = rvalue;
-
- /* Stack must always be 16byte aligned. Make it so. */
- cif->bytes = ALIGN(cif->bytes, 16);
-
- switch (cif->abi)
- {
- case FFI_SYSV:
- /* Calling 32bit code from 64bit is not possible */
- FFI_ASSERT(0);
- break;
-
- case FFI_UNIX64:
- /*@-usedef@*/
- ffi_call_UNIX64 (ffi_prep_args, ffi_fill_return_value, &ecif,
- cif->bytes, ecif.rvalue, fn);
- /*@=usedef@*/
- break;
-
- default:
- FFI_ASSERT(0);
- break;
- }
-}
-
-extern void ffi_closure_UNIX64(void);
-
-ffi_status
-ffi_prep_closure (ffi_closure* closure,
- ffi_cif* cif,
- void (*fun)(ffi_cif*, void*, void**, void*),
- void *user_data)
-{
- volatile unsigned short *tramp;
-
- /* FFI_ASSERT (cif->abi == FFI_OSF); */
-
- tramp = (volatile unsigned short *) &closure->tramp[0];
- tramp[0] = 0xbb49; /* mov <code>, %r11 */
- tramp[5] = 0xba49; /* mov <data>, %r10 */
- tramp[10] = 0xff49; /* jmp *%r11 */
- tramp[11] = 0x00e3;
- *(void * volatile *) &tramp[1] = ffi_closure_UNIX64;
- *(void * volatile *) &tramp[6] = closure;
-
- closure->cif = cif;
- closure->fun = fun;
- closure->user_data = user_data;
-
- return FFI_OK;
-}
-
-int
-ffi_closure_UNIX64_inner(ffi_closure *closure, va_list l, void *rp)
-{
- ffi_cif *cif;
- void **avalue;
- ffi_type **arg_types;
- long i, avn, argn;
-
- cif = closure->cif;
- avalue = alloca(cif->nargs * sizeof(void *));
-
- argn = 0;
-
- i = 0;
- avn = cif->nargs;
- arg_types = cif->arg_types;
-
- /* Grab the addresses of the arguments from the stack frame. */
- while (i < avn)
- {
- switch (arg_types[i]->type)
- {
- case FFI_TYPE_SINT8:
- case FFI_TYPE_UINT8:
- case FFI_TYPE_SINT16:
- case FFI_TYPE_UINT16:
- case FFI_TYPE_SINT32:
- case FFI_TYPE_UINT32:
- case FFI_TYPE_SINT64:
- case FFI_TYPE_UINT64:
- case FFI_TYPE_POINTER:
- {
- if (l->gp_offset > 48-8)
- {
- avalue[i] = l->overflow_arg_area;
- l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
- }
- else
- {
- avalue[i] = (char *)l->reg_save_area + l->gp_offset;
- l->gp_offset += 8;
- }
- }
- break;
-
- case FFI_TYPE_STRUCT:
- /* FIXME */
- FFI_ASSERT(0);
- break;
-
- case FFI_TYPE_DOUBLE:
- {
- if (l->fp_offset > 176-16)
- {
- avalue[i] = l->overflow_arg_area;
- l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
- }
- else
- {
- avalue[i] = (char *)l->reg_save_area + l->fp_offset;
- l->fp_offset += 16;
- }
- }
-#if DEBUG_FFI
- fprintf (stderr, "double arg %d = %g\n", i, *(double *)avalue[i]);
-#endif
- break;
-
- case FFI_TYPE_FLOAT:
- {
- if (l->fp_offset > 176-16)
- {
- avalue[i] = l->overflow_arg_area;
- l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
- }
- else
- {
- avalue[i] = (char *)l->reg_save_area + l->fp_offset;
- l->fp_offset += 16;
- }
- }
-#if DEBUG_FFI
- fprintf (stderr, "float arg %d = %g\n", i, *(float *)avalue[i]);
-#endif
- break;
-
- default:
- FFI_ASSERT(0);
- }
-
- argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG;
- i++;
- }
-
- /* Invoke the closure. */
- (closure->fun) (cif, rp, avalue, closure->user_data);
-
- /* FIXME: Structs not supported. */
- FFI_ASSERT(cif->rtype->type != FFI_TYPE_STRUCT);
-
- /* Tell ffi_closure_UNIX64 how to perform return type promotions. */
-
- return cif->rtype->type;
-}
-
-#endif
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/abi.hxx b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/abi.hxx
deleted file mode 100644
index 1e2bc64fff93..000000000000
--- a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/abi.hxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _BRIDGES_CPP_UNO_X86_64_ABI_HXX_
-#define _BRIDGES_CPP_UNO_X86_64_ABI_HXX_
-
-// This is an implementation of the x86-64 ABI as described in 'System V
-// Application Binary Interface, AMD64 Architecture Processor Supplement'
-// (http://www.x86-64.org/documentation/abi-0.95.pdf)
-
-#include <typelib/typedescription.hxx>
-
-namespace x86_64
-{
-
-/* 6 general purpose registers are used for parameter passing */
-const sal_uInt32 MAX_GPR_REGS = 6;
-
-/* 8 SSE registers are used for parameter passing */
-const sal_uInt32 MAX_SSE_REGS = 8;
-
-/* Count number of required registers.
-
- Examine the argument and return set number of register required in each
- class.
-
- Return false iff parameter should be passed in memory.
-*/
-bool examine_argument( typelib_TypeDescriptionReference *pTypeRef, bool bInReturn, int &nUsedGPR, int &nUsedSSE );
-
-/** Does function that returns this type use a hidden parameter, or registers?
-
- The value can be returned either in a hidden 1st parameter (which is a
- pointer to a structure allocated by the caller), or in registers (rax, rdx
- for the integers, xmm0, xmm1 for the floating point numbers).
-*/
-bool return_in_hidden_param( typelib_TypeDescriptionReference *pTypeRef );
-
-void fill_struct( typelib_TypeDescriptionReference *pTypeRef, void * const *pGPR, void * const *pSSE, void *pStruct );
-
-} // namespace x86_64
-
-#endif // _BRIDGES_CPP_UNO_X86_64_ABI_HXX_
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/call.s b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/call.s
deleted file mode 100644
index 736230705d5a..000000000000
--- a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/call.s
+++ /dev/null
@@ -1,93 +0,0 @@
- .text
- .align 2
-.globl privateSnippetExecutor
- .type privateSnippetExecutor, @function
-privateSnippetExecutor:
-.LFB3:
- pushq %rbp
-.LCFI0:
- movq %rsp, %rbp
-.LCFI1:
- subq $160, %rsp
-.LCFI2:
- movq %r10, -152(%rbp) # Save (nVtableOffset << 32) + nFunctionIndex
-
- movq %rdi, -112(%rbp) # Save GP registers
- movq %rsi, -104(%rbp)
- movq %rdx, -96(%rbp)
- movq %rcx, -88(%rbp)
- movq %r8 , -80(%rbp)
- movq %r9 , -72(%rbp)
-
- movsd %xmm0, -64(%rbp) # Save FP registers
- movsd %xmm1, -56(%rbp)
- movsd %xmm2, -48(%rbp)
- movsd %xmm3, -40(%rbp)
- movsd %xmm4, -32(%rbp)
- movsd %xmm5, -24(%rbp)
- movsd %xmm6, -16(%rbp)
- movsd %xmm7, -8(%rbp)
-
- leaq -144(%rbp), %r9 # 6th param: sal_uInt64 * pRegisterReturn
- leaq 16(%rbp), %r8 # 5rd param: void ** ovrflw
- leaq -64(%rbp), %rcx # 4th param: void ** fpreg
- leaq -112(%rbp), %rdx # 3rd param: void ** gpreg
- movl -148(%rbp), %esi # 2nd param: sal_int32 nVtableOffset
- movl -152(%rbp), %edi # 1st param: sal_int32 nFunctionIndex
-
- call cpp_vtable_call
-
- cmp $10, %rax # typelib_TypeClass_FLOAT
- je .Lfloat
- cmp $11, %rax # typelib_TypeClass_DOUBLE
- je .Lfloat
-
- movq -144(%rbp), %rax # Return value (int case)
- jmp .Lfinish
-.Lfloat:
- movlpd -144(%rbp), %xmm0 # Return value (float/double case)
-
-.Lfinish:
- leave
- ret
-.LFE3:
- .size privateSnippetExecutor, .-privateSnippetExecutor
- .section .eh_frame,"a",@progbits
-.Lframe1:
- .long .LECIE1-.LSCIE1
-.LSCIE1:
- .long 0x0
- .byte 0x1
- .string "zR"
- .uleb128 0x1
- .sleb128 -8
- .byte 0x10
- .uleb128 0x1
- .byte 0x1b
- .byte 0xc
- .uleb128 0x7
- .uleb128 0x8
- .byte 0x90
- .uleb128 0x1
- .align 8
-.LECIE1:
-.LSFDE1:
- .long .LEFDE1-.LASFDE1
-.LASFDE1:
- .long .LASFDE1-.Lframe1
- .long .LFB3-.
- .long .LFE3-.LFB3
- .uleb128 0x0
- .byte 0x4
- .long .LCFI0-.LFB3
- .byte 0xe
- .uleb128 0x10
- .byte 0x86
- .uleb128 0x2
- .byte 0x4
- .long .LCFI1-.LCFI0
- .byte 0xd
- .uleb128 0x6
- .align 8
-.LEFDE1:
- .section .note.GNU-stack,"",@progbits
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/cpp2uno.cxx
deleted file mode 100644
index d5c47f82a3f4..000000000000
--- a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/cpp2uno.cxx
+++ /dev/null
@@ -1,541 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_bridges.hxx"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <hash_map>
-
-#include <rtl/alloc.h>
-#include <osl/mutex.hxx>
-
-#include <com/sun/star/uno/genfunc.hxx>
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include <uno/data.h>
-#include <typelib/typedescription.hxx>
-
-#include "bridges/cpp_uno/shared/bridge.hxx"
-#include "bridges/cpp_uno/shared/cppinterfaceproxy.hxx"
-#include "bridges/cpp_uno/shared/types.hxx"
-#include "bridges/cpp_uno/shared/vtablefactory.hxx"
-
-#include "abi.hxx"
-#include "share.hxx"
-
-using namespace ::osl;
-using namespace ::rtl;
-using namespace ::com::sun::star::uno;
-
-//==================================================================================================
-
-// Perform the UNO call
-//
-// We must convert the paramaters stored in gpreg, fpreg and ovrflw to UNO
-// arguments and call pThis->getUnoI()->pDispatcher.
-//
-// gpreg: [ret *], this, [gpr params]
-// fpreg: [fpr params]
-// ovrflw: [gpr or fpr params (properly aligned)]
-//
-// [ret *] is present when we are returning a structure bigger than 16 bytes
-// Simple types are returned in rax, rdx (int), or xmm0, xmm1 (fp).
-// Similarly structures <= 16 bytes are in rax, rdx, xmm0, xmm1 as necessary.
-static typelib_TypeClass cpp2uno_call(
- bridges::cpp_uno::shared::CppInterfaceProxy * pThis,
- const typelib_TypeDescription * pMemberTypeDescr,
- typelib_TypeDescriptionReference * pReturnTypeRef, // 0 indicates void return
- sal_Int32 nParams, typelib_MethodParameter * pParams,
- void ** gpreg, void ** fpreg, void ** ovrflw,
- sal_uInt64 * pRegisterReturn /* space for register return */ )
-{
- int nr_gpr = 0; //number of gpr registers used
- int nr_fpr = 0; //number of fpr regsiters used
-
- // return
- typelib_TypeDescription * pReturnTypeDescr = 0;
- if (pReturnTypeRef)
- TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
- void * pUnoReturn = 0;
- void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
-
- if ( pReturnTypeDescr )
- {
- if ( x86_64::return_in_hidden_param( pReturnTypeRef ) )
- {
- pCppReturn = *gpreg++;
- nr_gpr++;
-
- pUnoReturn = ( bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
- ? alloca( pReturnTypeDescr->nSize )
- : pCppReturn ); // direct way
- }
- else
- pUnoReturn = pRegisterReturn; // direct way for simple types
- }
-
- // pop this
- gpreg++;
- nr_gpr++;
-
- // stack space
- // parameters
- void ** pUnoArgs = (void **)alloca( 4 * sizeof(void *) * nParams );
- void ** pCppArgs = pUnoArgs + nParams;
- // indizes of values this have to be converted (interface conversion cpp<=>uno)
- sal_Int32 * pTempIndizes = (sal_Int32 *)(pUnoArgs + (2 * nParams));
- // type descriptions for reconversions
- typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pUnoArgs + (3 * nParams));
-
- sal_Int32 nTempIndizes = 0;
-
- for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
- {
- const typelib_MethodParameter & rParam = pParams[nPos];
- typelib_TypeDescription * pParamTypeDescr = 0;
- TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
- int nUsedGPR = 0;
- int nUsedSSE = 0;
- bool bFitsRegisters = x86_64::examine_argument( rParam.pTypeRef, false, nUsedGPR, nUsedSSE );
- if ( !rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ) ) // value
- {
- // Simple types must fit exactly one register on x86_64
- OSL_ASSERT( bFitsRegisters && ( ( nUsedSSE == 1 && nUsedGPR == 0 ) || ( nUsedSSE == 0 && nUsedGPR == 1 ) ) );
-
- if ( nUsedSSE == 1 )
- {
- if ( nr_fpr < x86_64::MAX_SSE_REGS )
- {
- pCppArgs[nPos] = pUnoArgs[nPos] = fpreg++;
- nr_fpr++;
- }
- else
- pCppArgs[nPos] = pUnoArgs[nPos] = ovrflw++;
- }
- else if ( nUsedGPR == 1 )
- {
- if ( nr_gpr < x86_64::MAX_GPR_REGS )
- {
- pCppArgs[nPos] = pUnoArgs[nPos] = gpreg++;
- nr_gpr++;
- }
- else
- pCppArgs[nPos] = pUnoArgs[nPos] = ovrflw++;
- }
-
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- else // struct <= 16 bytes || ptr to complex value || ref
- {
- void *pCppStack;
- char pTmpStruct[16];
-
- if ( bFitsRegisters && !rParam.bOut &&
- ( pParamTypeDescr->eTypeClass == typelib_TypeClass_STRUCT ||
- pParamTypeDescr->eTypeClass == typelib_TypeClass_EXCEPTION ) )
- {
- if ( ( nr_gpr + nUsedGPR <= x86_64::MAX_GPR_REGS ) && ( nr_fpr + nUsedSSE <= x86_64::MAX_SSE_REGS ) )
- {
- x86_64::fill_struct( rParam.pTypeRef, gpreg, fpreg, pTmpStruct );
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "nUsedGPR == %d, nUsedSSE == %d, pTmpStruct[0] == 0x%x, pTmpStruct[1] == 0x%x, **gpreg == 0x%lx\n",
- nUsedGPR, nUsedSSE, pTmpStruct[0], pTmpStruct[1], *(sal_uInt64*)*gpreg );
-#endif
-
- pCppArgs[nPos] = pCppStack = reinterpret_cast<void *>( pTmpStruct );
- gpreg += nUsedGPR;
- fpreg += nUsedSSE;
- }
- else
- pCppArgs[nPos] = pCppStack = *ovrflw++;
- }
- else if ( nr_gpr < x86_64::MAX_GPR_REGS )
- {
- pCppArgs[nPos] = pCppStack = *gpreg++;
- nr_gpr++;
- }
- else
- pCppArgs[nPos] = pCppStack = *ovrflw++;
-
- if (! rParam.bIn) // is pure out
- {
- // uno out is unconstructed mem!
- pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize );
- pTempIndizes[nTempIndizes] = nPos;
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
- }
- else if ( bridges::cpp_uno::shared::relatesToInterfaceType( pParamTypeDescr ) ) // is in/inout
- {
- uno_copyAndConvertData( pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- pCppStack, pParamTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
- }
- else // direct way
- {
- pUnoArgs[nPos] = pCppStack;
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- }
- }
-
- // ExceptionHolder
- uno_Any aUnoExc; // Any will be constructed by callee
- uno_Any * pUnoExc = &aUnoExc;
-
- // invoke uno dispatch call
- (*pThis->getUnoI()->pDispatcher)( pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
-
- // in case an exception occured...
- if ( pUnoExc )
- {
- // destruct temporary in/inout params
- for ( ; nTempIndizes--; )
- {
- sal_Int32 nIndex = pTempIndizes[nTempIndizes];
-
- if (pParams[nIndex].bIn) // is in/inout => was constructed
- uno_destructData( pUnoArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], 0 );
- TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
- }
- if (pReturnTypeDescr)
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
-
- CPPU_CURRENT_NAMESPACE::raiseException( &aUnoExc, pThis->getBridge()->getUno2Cpp() ); // has to destruct the any
- // is here for dummy
- return typelib_TypeClass_VOID;
- }
- else // else no exception occured...
- {
- // temporary params
- for ( ; nTempIndizes--; )
- {
- sal_Int32 nIndex = pTempIndizes[nTempIndizes];
- typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
- if ( pParams[nIndex].bOut ) // inout/out
- {
- // convert and assign
- uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
- uno_copyAndConvertData( pCppArgs[nIndex], pUnoArgs[nIndex], pParamTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
- }
- // destroy temp uno param
- uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- // return
- if ( pCppReturn ) // has complex return
- {
- if ( pUnoReturn != pCppReturn ) // needs reconversion
- {
- uno_copyAndConvertData( pCppReturn, pUnoReturn, pReturnTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
- // destroy temp uno return
- uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
- }
- // complex return ptr is set to return reg
- *(void **)pRegisterReturn = pCppReturn;
- }
- if ( pReturnTypeDescr )
- {
- typelib_TypeClass eRet = (typelib_TypeClass)pReturnTypeDescr->eTypeClass;
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
- return eRet;
- }
- else
- return typelib_TypeClass_VOID;
- }
-}
-
-
-//==================================================================================================
-extern "C" typelib_TypeClass cpp_vtable_call(
- sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
- void ** gpreg, void ** fpreg, void ** ovrflw,
- sal_uInt64 * pRegisterReturn /* space for register return */ )
-{
- // gpreg: [ret *], this, [other gpr params]
- // fpreg: [fpr params]
- // ovrflw: [gpr or fpr params (properly aligned)]
- void * pThis;
- if ( nFunctionIndex & 0x80000000 )
- {
- nFunctionIndex &= 0x7fffffff;
- pThis = gpreg[1];
- }
- else
- {
- pThis = gpreg[0];
- }
- pThis = static_cast<char *>( pThis ) - nVtableOffset;
-
- bridges::cpp_uno::shared::CppInterfaceProxy * pCppI =
- bridges::cpp_uno::shared::CppInterfaceProxy::castInterfaceToProxy( pThis );
-
- typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
-
- OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!\n" );
- if ( nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex )
- {
- throw RuntimeException( OUString::createFromAscii("illegal vtable index!"),
- reinterpret_cast<XInterface *>( pCppI ) );
- }
-
- // determine called method
- sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
- OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member index!\n" );
-
- TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
-
- typelib_TypeClass eRet;
- switch ( aMemberDescr.get()->eTypeClass )
- {
- case typelib_TypeClass_INTERFACE_ATTRIBUTE:
- {
- typelib_TypeDescriptionReference *pAttrTypeRef =
- reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>( aMemberDescr.get() )->pAttributeTypeRef;
-
- if ( pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos] == nFunctionIndex )
- {
- // is GET method
- eRet = cpp2uno_call( pCppI, aMemberDescr.get(), pAttrTypeRef,
- 0, 0, // no params
- gpreg, fpreg, ovrflw, pRegisterReturn );
- }
- else
- {
- // is SET method
- typelib_MethodParameter aParam;
- aParam.pTypeRef = pAttrTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
- eRet = cpp2uno_call( pCppI, aMemberDescr.get(),
- 0, // indicates void return
- 1, &aParam,
- gpreg, fpreg, ovrflw, pRegisterReturn );
- }
- break;
- }
- case typelib_TypeClass_INTERFACE_METHOD:
- {
- // is METHOD
- switch ( nFunctionIndex )
- {
- case 1: // acquire()
- pCppI->acquireProxy(); // non virtual call!
- eRet = typelib_TypeClass_VOID;
- break;
- case 2: // release()
- pCppI->releaseProxy(); // non virtual call!
- eRet = typelib_TypeClass_VOID;
- break;
- case 0: // queryInterface() opt
- {
- typelib_TypeDescription * pTD = 0;
- TYPELIB_DANGER_GET( &pTD, reinterpret_cast<Type *>( gpreg[2] )->getTypeLibType() );
- if ( pTD )
- {
- XInterface * pInterface = 0;
- (*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)
- ( pCppI->getBridge()->getCppEnv(),
- (void **)&pInterface,
- pCppI->getOid().pData,
- reinterpret_cast<typelib_InterfaceTypeDescription *>( pTD ) );
-
- if ( pInterface )
- {
- ::uno_any_construct( reinterpret_cast<uno_Any *>( gpreg[0] ),
- &pInterface, pTD, cpp_acquire );
-
- pInterface->release();
- TYPELIB_DANGER_RELEASE( pTD );
-
- reinterpret_cast<void **>( pRegisterReturn )[0] = gpreg[0];
- eRet = typelib_TypeClass_ANY;
- break;
- }
- TYPELIB_DANGER_RELEASE( pTD );
- }
- } // else perform queryInterface()
- default:
- {
- typelib_InterfaceMethodTypeDescription *pMethodTD =
- reinterpret_cast<typelib_InterfaceMethodTypeDescription *>( aMemberDescr.get() );
-
- eRet = cpp2uno_call( pCppI, aMemberDescr.get(),
- pMethodTD->pReturnTypeRef,
- pMethodTD->nParams,
- pMethodTD->pParams,
- gpreg, fpreg, ovrflw, pRegisterReturn );
- }
- }
- break;
- }
- default:
- {
- throw RuntimeException( OUString::createFromAscii("no member description found!"),
- reinterpret_cast<XInterface *>( pCppI ) );
- // is here for dummy
- eRet = typelib_TypeClass_VOID;
- }
- }
-
- return eRet;
-}
-
-//==================================================================================================
-extern "C" void privateSnippetExecutor( ... );
-
-const int codeSnippetSize = 24;
-
-// Generate a trampoline that redirects method calls to
-// privateSnippetExecutor().
-//
-// privateSnippetExecutor() saves all the registers that are used for
-// parameter passing on x86_64, and calls the cpp_vtable_call().
-// When it returns, privateSnippetExecutor() sets the return value.
-//
-// Note: The code snippet we build here must not create a stack frame,
-// otherwise the UNO exceptions stop working thanks to non-existing
-// unwinding info.
-unsigned char * codeSnippet( unsigned char * code,
- sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
- bool bHasHiddenParam ) SAL_THROW( () )
-{
- sal_uInt64 nOffsetAndIndex = ( ( (sal_uInt64) nVtableOffset ) << 32 ) | ( (sal_uInt64) nFunctionIndex );
-
- if ( bHasHiddenParam )
- nOffsetAndIndex |= 0x80000000;
-
- // movq $<nOffsetAndIndex>, %r10
- *reinterpret_cast<sal_uInt16 *>( code ) = 0xba49;
- *reinterpret_cast<sal_uInt64 *>( code + 2 ) = nOffsetAndIndex;
-
- // movq $<address of the privateSnippetExecutor>, %r11
- *reinterpret_cast<sal_uInt16 *>( code + 10 ) = 0xbb49;
- *reinterpret_cast<sal_uInt64 *>( code + 12 ) = reinterpret_cast<sal_uInt64>( privateSnippetExecutor );
-
- // jmpq *%r11
- *reinterpret_cast<sal_uInt32 *>( code + 20 ) = 0x00e3ff49;
-
- return code + codeSnippetSize;
-}
-
-//==================================================================================================
-struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
-
-bridges::cpp_uno::shared::VtableFactory::Slot *
-bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
-{
- return static_cast< Slot * >(block) + 2;
-}
-
-//==================================================================================================
-sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
- sal_Int32 slotCount)
-{
- return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
-}
-
-//==================================================================================================
-bridges::cpp_uno::shared::VtableFactory::Slot *
-bridges::cpp_uno::shared::VtableFactory::initializeBlock(
- void * block, sal_Int32 slotCount)
-{
- Slot * slots = mapBlockToVtable(block);
- slots[-2].fn = 0;
- slots[-1].fn = 0;
- return slots + slotCount;
-}
-
-//==================================================================================================
-
-unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
- Slot ** slots, unsigned char * code,
- typelib_InterfaceTypeDescription const * type, sal_Int32 nFunctionOffset,
- sal_Int32 functionCount, sal_Int32 nVtableOffset )
-{
- (*slots) -= functionCount;
- Slot * s = *slots;
-
- for ( sal_Int32 nPos = 0; nPos < type->nMembers; ++nPos )
- {
- typelib_TypeDescription * pTD = 0;
-
- TYPELIB_DANGER_GET( &pTD, type->ppMembers[ nPos ] );
- OSL_ASSERT( pTD );
-
- if ( typelib_TypeClass_INTERFACE_ATTRIBUTE == pTD->eTypeClass )
- {
- typelib_InterfaceAttributeTypeDescription *pAttrTD =
- reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>( pTD );
-
- // get method
- (s++)->fn = code;
- code = codeSnippet( code, nFunctionOffset++, nVtableOffset,
- x86_64::return_in_hidden_param( pAttrTD->pAttributeTypeRef ) );
-
- if ( ! pAttrTD->bReadOnly )
- {
- // set method
- (s++)->fn = code;
- code = codeSnippet( code, nFunctionOffset++, nVtableOffset, false );
- }
- }
- else if ( typelib_TypeClass_INTERFACE_METHOD == pTD->eTypeClass )
- {
- typelib_InterfaceMethodTypeDescription *pMethodTD =
- reinterpret_cast<typelib_InterfaceMethodTypeDescription *>( pTD );
-
- (s++)->fn = code;
- code = codeSnippet( code, nFunctionOffset++, nVtableOffset,
- x86_64::return_in_hidden_param( pMethodTD->pReturnTypeRef ) );
- }
- else
- OSL_ASSERT( false );
-
- TYPELIB_DANGER_RELEASE( pTD );
- }
- return code;
-}
-
-//==================================================================================================
-void bridges::cpp_uno::shared::VtableFactory::flushCode(
- unsigned char const *, unsigned char const * )
-{
-}
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx
deleted file mode 100644
index a6ba69855a1c..000000000000
--- a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx
+++ /dev/null
@@ -1,338 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_bridges.hxx"
-
-#include <stdio.h>
-#include <dlfcn.h>
-#include <cxxabi.h>
-#include <hash_map>
-#include <sys/param.h>
-
-#include <rtl/strbuf.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <osl/diagnose.h>
-#include <osl/mutex.hxx>
-
-#include <com/sun/star/uno/genfunc.hxx>
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include <typelib/typedescription.hxx>
-#include <uno/any2.h>
-
-#include "share.hxx"
-
-
-using namespace ::std;
-using namespace ::osl;
-using namespace ::rtl;
-using namespace ::com::sun::star::uno;
-using namespace ::__cxxabiv1;
-
-
-namespace CPPU_CURRENT_NAMESPACE
-{
-
-void dummy_can_throw_anything( char const * )
-{
-}
-
-//==================================================================================================
-static OUString toUNOname( char const * p ) SAL_THROW( () )
-{
-#if OSL_DEBUG_LEVEL > 1
- char const * start = p;
-#endif
-
- // example: N3com3sun4star4lang24IllegalArgumentExceptionE
-
- OUStringBuffer buf( 64 );
- OSL_ASSERT( 'N' == *p );
- ++p; // skip N
-
- while ('E' != *p)
- {
- // read chars count
- long n = (*p++ - '0');
- while ('0' <= *p && '9' >= *p)
- {
- n *= 10;
- n += (*p++ - '0');
- }
- buf.appendAscii( p, n );
- p += n;
- if ('E' != *p)
- buf.append( (sal_Unicode)'.' );
- }
-
-#if OSL_DEBUG_LEVEL > 1
- OUString ret( buf.makeStringAndClear() );
- OString c_ret( OUStringToOString( ret, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> toUNOname(): %s => %s\n", start, c_ret.getStr() );
- return ret;
-#else
- return buf.makeStringAndClear();
-#endif
-}
-
-//==================================================================================================
-class RTTI
-{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
-
- Mutex m_mutex;
- t_rtti_map m_rttis;
- t_rtti_map m_generatedRttis;
-
- void * m_hApp;
-
-public:
- RTTI() SAL_THROW( () );
- ~RTTI() SAL_THROW( () );
-
- type_info * getRTTI( typelib_CompoundTypeDescription * ) SAL_THROW( () );
-};
-//__________________________________________________________________________________________________
-RTTI::RTTI() SAL_THROW( () )
-#if __FreeBSD_version < 602103
- : m_hApp( dlopen( 0, RTLD_NOW | RTLD_GLOBAL ) )
-#else
- : m_hApp( dlopen( 0, RTLD_LAZY ) )
-#endif
-{
-}
-//__________________________________________________________________________________________________
-RTTI::~RTTI() SAL_THROW( () )
-{
- dlclose( m_hApp );
-}
-
-//__________________________________________________________________________________________________
-type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THROW( () )
-{
- type_info * rtti;
-
- OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName;
-
- MutexGuard guard( m_mutex );
- t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) );
- if (iFind == m_rttis.end())
- {
- // RTTI symbol
- OStringBuffer buf( 64 );
- buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") );
- sal_Int32 index = 0;
- do
- {
- OUString token( unoName.getToken( 0, '.', index ) );
- buf.append( token.getLength() );
- OString c_token( OUStringToOString( token, RTL_TEXTENCODING_ASCII_US ) );
- buf.append( c_token );
- }
- while (index >= 0);
- buf.append( 'E' );
-
- OString symName( buf.makeStringAndClear() );
-#if __FreeBSD_version < 602103 /* #i22253# */
- rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() );
-#else
- rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
-#endif
-
- if (rtti)
- {
- pair< t_rtti_map::iterator, bool > insertion(
- m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
- OSL_ENSURE( insertion.second, "### inserting new rtti failed?!" );
- }
- else
- {
- // try to lookup the symbol in the generated rtti map
- t_rtti_map::const_iterator iFind( m_generatedRttis.find( unoName ) );
- if (iFind == m_generatedRttis.end())
- {
- // we must generate it !
- // symbol and rtti-name is nearly identical,
- // the symbol is prefixed with _ZTI
- char const * rttiName = symName.getStr() +4;
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr,"generated rtti for %s\n", rttiName );
-#endif
- if (pTypeDescr->pBaseTypeDescription)
- {
- // ensure availability of base
- type_info * base_rtti = getRTTI(
- (typelib_CompoundTypeDescription *)pTypeDescr->pBaseTypeDescription );
- rtti = new __si_class_type_info(
- strdup( rttiName ), (__class_type_info *)base_rtti );
- }
- else
- {
- // this class has no base class
- rtti = new __class_type_info( strdup( rttiName ) );
- }
-
- pair< t_rtti_map::iterator, bool > insertion(
- m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
- OSL_ENSURE( insertion.second, "### inserting new generated rtti failed?!" );
- }
- else // taking already generated rtti
- {
- rtti = iFind->second;
- }
- }
- }
- else
- {
- rtti = iFind->second;
- }
-
- return rtti;
-}
-
-//--------------------------------------------------------------------------------------------------
-static void deleteException( void * pExc )
-{
- __cxa_exception const * header = ((__cxa_exception const *)pExc - 1);
- typelib_TypeDescription * pTD = 0;
- OUString unoName( toUNOname( header->exceptionType->name() ) );
- ::typelib_typedescription_getByName( &pTD, unoName.pData );
- OSL_ENSURE( pTD, "### unknown exception type! leaving out destruction => leaking!!!" );
- if (pTD)
- {
- ::uno_destructData( pExc, pTD, cpp_release );
- ::typelib_typedescription_release( pTD );
- }
-}
-
-//==================================================================================================
-void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
-{
-#if OSL_DEBUG_LEVEL > 1
- OString cstr(
- OUStringToOString(
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
-#endif
- void * pCppExc;
- type_info * rtti;
-
- {
- // construct cpp exception object
- typelib_TypeDescription * pTypeDescr = 0;
- TYPELIB_DANGER_GET( &pTypeDescr, pUnoExc->pType );
- OSL_ASSERT( pTypeDescr );
- if (! pTypeDescr)
- {
- throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("cannot get typedescription for type ") ) +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
- }
-
- pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
- ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp );
-
- // destruct uno exception
- ::uno_any_destruct( pUnoExc, 0 );
- // avoiding locked counts
- static RTTI * s_rtti = 0;
- if (! s_rtti)
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if (! s_rtti)
- {
-#ifdef LEAK_STATIC_DATA
- s_rtti = new RTTI();
-#else
- static RTTI rtti_data;
- s_rtti = &rtti_data;
-#endif
- }
- }
- rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
- if (! rtti)
- {
- throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("no rtti for type ") ) +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
- }
- }
-
- __cxa_throw( pCppExc, rtti, deleteException );
-}
-
-//==================================================================================================
-void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping * pCpp2Uno )
-{
- if (! header)
- {
- RuntimeException aRE(
- OUString( RTL_CONSTASCII_USTRINGPARAM("no exception header!") ),
- Reference< XInterface >() );
- Type const & rType = ::getCppuType( &aRE );
- uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
-#if OSL_DEBUG_LEVEL > 0
- OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
-#endif
- return;
- }
-
- typelib_TypeDescription * pExcTypeDescr = 0;
- OUString unoName( toUNOname( header->exceptionType->name() ) );
-#if OSL_DEBUG_LEVEL > 1
- OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
-#endif
- typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
- if (0 == pExcTypeDescr)
- {
- RuntimeException aRE(
- OUString( RTL_CONSTASCII_USTRINGPARAM("exception type not found: ") ) + unoName,
- Reference< XInterface >() );
- Type const & rType = ::getCppuType( &aRE );
- uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
-#if OSL_DEBUG_LEVEL > 0
- OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
-#endif
- }
- else
- {
- // construct uno exception any
- uno_any_constructAndConvert( pUnoExc, header->adjustedPtr, pExcTypeDescr, pCpp2Uno );
- typelib_typedescription_release( pExcTypeDescr );
- }
-}
-
-}
-
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/makefile.mk b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/makefile.mk
deleted file mode 100644
index 9c37d6cd8227..000000000000
--- a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/makefile.mk
+++ /dev/null
@@ -1,80 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=bridges
-TARGET=gcc3_uno
-LIBTARGET=no
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCFREEBSDXgcc3"
-
-.IF "$(cppu_no_leak)" == ""
-CFLAGS += -DLEAK_STATIC_DATA
-.ENDIF
-
-# In case someone enabled the non-standard -fomit-frame-pointer which does not
-# work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
-
-SLOFILES= \
- $(SLO)$/abi.obj \
- $(SLO)$/except.obj \
- $(SLO)$/cpp2uno.obj \
- $(SLO)$/uno2cpp.obj \
- $(SLO)$/call.obj
-
-SHL1TARGET= $(TARGET)
-
-SHL1DEF=$(MISC)$/$(SHL1TARGET).def
-SHL1IMPLIB=i$(TARGET)
-SHL1VERSIONMAP=..$/..$/bridge_exports.map
-SHL1RPATH=URELIB
-
-SHL1OBJS = $(SLOFILES)
-SHL1LIBS = $(SLB)$/cpp_uno_shared.lib
-
-SHL1STDLIBS= \
- $(CPPULIB) \
- $(SALLIB)
-
-.ENDIF
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-$(SLO)$/%.obj: %.s
- $(CC) -c -o $(SLO)$/$(@:b).o $<
- touch $@
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx
deleted file mode 100644
index 930094738b20..000000000000
--- a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx
+++ /dev/null
@@ -1,90 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "uno/mapping.h"
-
-#include <typeinfo>
-#include <exception>
-#include <cstddef>
-
-namespace CPPU_CURRENT_NAMESPACE
-{
-
-void dummy_can_throw_anything( char const * );
-
-// ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
-
-struct _Unwind_Exception
-{
- unsigned exception_class __attribute__((__mode__(__DI__)));
- void * exception_cleanup;
- unsigned private_1 __attribute__((__mode__(__word__)));
- unsigned private_2 __attribute__((__mode__(__word__)));
-} __attribute__((__aligned__));
-
-struct __cxa_exception
-{
- ::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
- ::std::unexpected_handler unexpectedHandler;
- ::std::terminate_handler terminateHandler;
-
- __cxa_exception *nextException;
-
- int handlerCount;
-
- int handlerSwitchValue;
- const unsigned char *actionRecord;
- const unsigned char *languageSpecificData;
- void *catchTemp;
- void *adjustedPtr;
-
- _Unwind_Exception unwindHeader;
-};
-
-extern "C" void *__cxa_allocate_exception(
- std::size_t thrown_size ) throw();
-extern "C" void __cxa_throw (
- void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
-
-struct __cxa_eh_globals
-{
- __cxa_exception *caughtExceptions;
- unsigned int uncaughtExceptions;
-};
-extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
-
-// -----
-
-//==================================================================================================
-void raiseException(
- uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
-//==================================================================================================
-void fillUnoException(
- __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
-}
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx
deleted file mode 100644
index 6da45f9fb8ce..000000000000
--- a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx
+++ /dev/null
@@ -1,558 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_bridges.hxx"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <rtl/alloc.h>
-
-#include <com/sun/star/uno/genfunc.hxx>
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include <uno/data.h>
-
-#include <bridges/cpp_uno/shared/bridge.hxx>
-#include <bridges/cpp_uno/shared/types.hxx>
-#include "bridges/cpp_uno/shared/unointerfaceproxy.hxx"
-#include "bridges/cpp_uno/shared/vtables.hxx"
-
-#include "abi.hxx"
-#include "share.hxx"
-
-using namespace ::rtl;
-using namespace ::com::sun::star::uno;
-
-//==================================================================================================
-static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
- void * pRegisterReturn, typelib_TypeDescription * pReturnTypeDescr, bool bSimpleReturn,
- sal_uInt64 *pStack, sal_uInt32 nStack,
- sal_uInt64 *pGPR, sal_uInt32 nGPR,
- double *pFPR, sal_uInt32 nFPR) __attribute__((noinline));
-
-static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
- void * pRegisterReturn, typelib_TypeDescription * pReturnTypeDescr, bool bSimpleReturn,
- sal_uInt64 *pStack, sal_uInt32 nStack,
- sal_uInt64 *pGPR, sal_uInt32 nGPR,
- double *pFPR, sal_uInt32 nFPR)
-{
-#if OSL_DEBUG_LEVEL > 1
- // Let's figure out what is really going on here
- {
- fprintf( stderr, "= callVirtualMethod() =\nGPR's (%d): ", nGPR );
- for ( int i = 0; i < nGPR; ++i )
- fprintf( stderr, "0x%lx, ", pGPR[i] );
- fprintf( stderr, "\nFPR's (%d): ", nFPR );
- for ( int i = 0; i < nFPR; ++i )
- fprintf( stderr, "%f, ", pFPR[i] );
- fprintf( stderr, "\nStack (%d): ", nStack );
- for ( int i = 0; i < nStack; ++i )
- fprintf( stderr, "0x%lx, ", pStack[i] );
- fprintf( stderr, "\n" );
- }
-#endif
-
- // The call instruction within the asm section of callVirtualMethod may throw
- // exceptions. So that the compiler handles this correctly, it is important
- // that (a) callVirtualMethod might call dummy_can_throw_anything (although this
- // never happens at runtime), which in turn can throw exceptions, and (b)
- // callVirtualMethod is not inlined at its call site (so that any exceptions are
- // caught which are thrown from the instruction calling callVirtualMethod):
- if ( !pThis )
- CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything( "xxx" ); // address something
-
- // Should not happen, but...
- if ( nFPR > x86_64::MAX_SSE_REGS )
- nFPR = x86_64::MAX_SSE_REGS;
- if ( nGPR > x86_64::MAX_GPR_REGS )
- nGPR = x86_64::MAX_GPR_REGS;
-
- // Get pointer to method
- sal_uInt64 pMethod = *((sal_uInt64 *)pThis);
- pMethod += 8 * nVtableIndex;
- pMethod = *((sal_uInt64 *)pMethod);
-
- // Load parameters to stack, if necessary
- if ( nStack )
- {
- // 16-bytes aligned
- sal_uInt32 nStackBytes = ( ( nStack + 1 ) >> 1 ) * 16;
- sal_uInt64 *pCallStack = (sal_uInt64 *) __builtin_alloca( nStackBytes );
- memcpy( pCallStack, pStack, nStackBytes );
- }
-
- // Return values
- sal_uInt64 rax;
- sal_uInt64 rdx;
- double xmm0;
-
- asm volatile (
-
- // Fill the xmm registers
- "movq %2, %%rax\n\t"
-
- "movsd (%%rax), %%xmm0\n\t"
- "movsd 8(%%rax), %%xmm1\n\t"
- "movsd 16(%%rax), %%xmm2\n\t"
- "movsd 24(%%rax), %%xmm3\n\t"
- "movsd 32(%%rax), %%xmm4\n\t"
- "movsd 40(%%rax), %%xmm5\n\t"
- "movsd 48(%%rax), %%xmm6\n\t"
- "movsd 56(%%rax), %%xmm7\n\t"
-
- // Fill the general purpose registers
- "movq %1, %%rax\n\t"
-
- "movq (%%rax), %%rdi\n\t"
- "movq 8(%%rax), %%rsi\n\t"
- "movq 16(%%rax), %%rdx\n\t"
- "movq 24(%%rax), %%rcx\n\t"
- "movq 32(%%rax), %%r8\n\t"
- "movq 40(%%rax), %%r9\n\t"
-
- // Perform the call
- "movq %0, %%r11\n\t"
- "movq %3, %%rax\n\t"
- "call *%%r11\n\t"
-
- // Fill the return values
- "movq %%rax, %4\n\t"
- "movq %%rdx, %5\n\t"
- "movsd %%xmm0, %6\n\t"
- :
- : "m" ( pMethod ), "m" ( pGPR ), "m" ( pFPR ), "m" ( nFPR ),
- "m" ( rax ), "m" ( rdx ), "m" ( xmm0 )
- : "rax", "rdi", "rsi", "rdx", "rcx", "r8", "r9", "r11"
- );
-
- switch (pReturnTypeDescr->eTypeClass)
- {
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- *reinterpret_cast<sal_uInt64 *>( pRegisterReturn ) = rax;
- break;
- case typelib_TypeClass_LONG:
- case typelib_TypeClass_UNSIGNED_LONG:
- case typelib_TypeClass_ENUM:
- *reinterpret_cast<sal_uInt32 *>( pRegisterReturn ) = *reinterpret_cast<sal_uInt32*>( &rax );
- break;
- case typelib_TypeClass_CHAR:
- case typelib_TypeClass_SHORT:
- case typelib_TypeClass_UNSIGNED_SHORT:
- *reinterpret_cast<sal_uInt16 *>( pRegisterReturn ) = *reinterpret_cast<sal_uInt16*>( &rax );
- break;
- case typelib_TypeClass_BOOLEAN:
- case typelib_TypeClass_BYTE:
- *reinterpret_cast<sal_uInt8 *>( pRegisterReturn ) = *reinterpret_cast<sal_uInt8*>( &rax );
- break;
- case typelib_TypeClass_FLOAT:
- case typelib_TypeClass_DOUBLE:
- *reinterpret_cast<double *>( pRegisterReturn ) = xmm0;
- break;
- default:
- {
- sal_Int32 const nRetSize = pReturnTypeDescr->nSize;
- if (bSimpleReturn && nRetSize <= 16 && nRetSize > 0)
- {
- if (nRetSize > 8)
- static_cast<sal_uInt64 *>(pRegisterReturn)[1] = rdx;
- static_cast<sal_uInt64 *>(pRegisterReturn)[0] = rax;
- }
- break;
- }
- }
-}
-
-//==================================================================================================
-
-// Macros for easier insertion of values to registers or stack
-// pSV - pointer to the source
-// nr - order of the value [will be increased if stored to register]
-// pFPR, pGPR - pointer to the registers
-// pDS - pointer to the stack [will be increased if stored here]
-
-// The value in %xmm register is already prepared to be retrieved as a float,
-// thus we treat float and double the same
-#define INSERT_FLOAT_DOUBLE( pSV, nr, pFPR, pDS ) \
- if ( nr < x86_64::MAX_SSE_REGS ) \
- pFPR[nr++] = *reinterpret_cast<double *>( pSV ); \
- else \
- *pDS++ = *reinterpret_cast<sal_uInt64 *>( pSV ); // verbatim!
-
-#define INSERT_INT64( pSV, nr, pGPR, pDS ) \
- if ( nr < x86_64::MAX_GPR_REGS ) \
- pGPR[nr++] = *reinterpret_cast<sal_uInt64 *>( pSV ); \
- else \
- *pDS++ = *reinterpret_cast<sal_uInt64 *>( pSV );
-
-#define INSERT_INT32( pSV, nr, pGPR, pDS ) \
- if ( nr < x86_64::MAX_GPR_REGS ) \
- pGPR[nr++] = *reinterpret_cast<sal_uInt32 *>( pSV ); \
- else \
- *pDS++ = *reinterpret_cast<sal_uInt32 *>( pSV );
-
-#define INSERT_INT16( pSV, nr, pGPR, pDS ) \
- if ( nr < x86_64::MAX_GPR_REGS ) \
- pGPR[nr++] = *reinterpret_cast<sal_uInt16 *>( pSV ); \
- else \
- *pDS++ = *reinterpret_cast<sal_uInt16 *>( pSV );
-
-#define INSERT_INT8( pSV, nr, pGPR, pDS ) \
- if ( nr < x86_64::MAX_GPR_REGS ) \
- pGPR[nr++] = *reinterpret_cast<sal_uInt8 *>( pSV ); \
- else \
- *pDS++ = *reinterpret_cast<sal_uInt8 *>( pSV );
-
-//==================================================================================================
-
-static void cpp_call(
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
- bridges::cpp_uno::shared::VtableSlot aVtableSlot,
- typelib_TypeDescriptionReference * pReturnTypeRef,
- sal_Int32 nParams, typelib_MethodParameter * pParams,
- void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
-{
- // Maxium space for [complex ret ptr], values | ptr ...
- // (but will be used less - some of the values will be in pGPR and pFPR)
- sal_uInt64 *pStack = (sal_uInt64 *)__builtin_alloca( (nParams + 3) * sizeof(sal_uInt64) );
- sal_uInt64 *pStackStart = pStack;
-
- sal_uInt64 pGPR[x86_64::MAX_GPR_REGS];
- sal_uInt32 nGPR = 0;
-
- double pFPR[x86_64::MAX_SSE_REGS];
- sal_uInt32 nFPR = 0;
-
- // Return
- typelib_TypeDescription * pReturnTypeDescr = 0;
- TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
- OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
-
- void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion (see below)
-
- bool bSimpleReturn = true;
- if ( pReturnTypeDescr )
- {
- if ( x86_64::return_in_hidden_param( pReturnTypeRef ) )
- bSimpleReturn = false;
-
- if ( bSimpleReturn )
- pCppReturn = pUnoReturn; // direct way for simple types
- else
- {
- // complex return via ptr
- pCppReturn = bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )?
- __builtin_alloca( pReturnTypeDescr->nSize ) : pUnoReturn;
- INSERT_INT64( &pCppReturn, nGPR, pGPR, pStack );
- }
- }
-
- // Push "this" pointer
- void * pAdjustedThisPtr = reinterpret_cast< void ** >( pThis->getCppI() ) + aVtableSlot.offset;
- INSERT_INT64( &pAdjustedThisPtr, nGPR, pGPR, pStack );
-
- // Args
- void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams );
- // Indizes of values this have to be converted (interface conversion cpp<=>uno)
- sal_Int32 * pTempIndizes = (sal_Int32 *)(pCppArgs + nParams);
- // Type descriptions for reconversions
- typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
-
- sal_Int32 nTempIndizes = 0;
-
- for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
- {
- const typelib_MethodParameter & rParam = pParams[nPos];
- typelib_TypeDescription * pParamTypeDescr = 0;
- TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
- if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
- {
- uno_copyAndConvertData( pCppArgs[nPos] = alloca( 8 ), pUnoArgs[nPos], pParamTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
-
- switch (pParamTypeDescr->eTypeClass)
- {
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- INSERT_INT64( pCppArgs[nPos], nGPR, pGPR, pStack );
- break;
- case typelib_TypeClass_LONG:
- case typelib_TypeClass_UNSIGNED_LONG:
- case typelib_TypeClass_ENUM:
- INSERT_INT32( pCppArgs[nPos], nGPR, pGPR, pStack );
- break;
- case typelib_TypeClass_SHORT:
- case typelib_TypeClass_CHAR:
- case typelib_TypeClass_UNSIGNED_SHORT:
- INSERT_INT16( pCppArgs[nPos], nGPR, pGPR, pStack );
- break;
- case typelib_TypeClass_BOOLEAN:
- case typelib_TypeClass_BYTE:
- INSERT_INT8( pCppArgs[nPos], nGPR, pGPR, pStack );
- break;
- case typelib_TypeClass_FLOAT:
- case typelib_TypeClass_DOUBLE:
- INSERT_FLOAT_DOUBLE( pCppArgs[nPos], nFPR, pFPR, pStack );
- break;
- }
-
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- else // ptr to complex value | ref
- {
- if (! rParam.bIn) // is pure out
- {
- // cpp out is constructed mem, uno out is not!
- uno_constructData(
- pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- pParamTypeDescr );
- pTempIndizes[nTempIndizes] = nPos; // default constructed for cpp call
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
- }
- // is in/inout
- else if (bridges::cpp_uno::shared::relatesToInterfaceType( pParamTypeDescr ))
- {
- uno_copyAndConvertData(
- pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- pUnoArgs[nPos], pParamTypeDescr, pThis->getBridge()->getUno2Cpp() );
-
- pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
- }
- else // direct way
- {
- pCppArgs[nPos] = pUnoArgs[nPos];
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- INSERT_INT64( &(pCppArgs[nPos]), nGPR, pGPR, pStack );
- }
- }
-
- try
- {
- callVirtualMethod(
- pAdjustedThisPtr, aVtableSlot.index,
- pCppReturn, pReturnTypeDescr, bSimpleReturn,
- pStackStart, ( pStack - pStackStart ),
- pGPR, nGPR,
- pFPR, nFPR );
- // NO exception occured...
- *ppUnoExc = 0;
-
- // reconvert temporary params
- for ( ; nTempIndizes--; )
- {
- sal_Int32 nIndex = pTempIndizes[nTempIndizes];
- typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
- if (pParams[nIndex].bIn)
- {
- if (pParams[nIndex].bOut) // inout
- {
- uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 ); // destroy uno value
- uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- }
- }
- else // pure out
- {
- uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- }
- // destroy temp cpp param => cpp: every param was constructed
- uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- // return value
- if (pCppReturn && pUnoReturn != pCppReturn)
- {
- uno_copyAndConvertData( pUnoReturn, pCppReturn, pReturnTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- uno_destructData( pCppReturn, pReturnTypeDescr, cpp_release );
- }
- }
- catch (...)
- {
- // fill uno exception
- fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
- // temporary params
- for ( ; nTempIndizes--; )
- {
- sal_Int32 nIndex = pTempIndizes[nTempIndizes];
- // destroy temp cpp param => cpp: every param was constructed
- uno_destructData( pCppArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], cpp_release );
- TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
- }
- // return type
- if (pReturnTypeDescr)
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
- }
-}
-
-//==================================================================================================
-
-namespace bridges { namespace cpp_uno { namespace shared {
-
-void unoInterfaceProxyDispatch(
- uno_Interface * pUnoI, const typelib_TypeDescription * pMemberDescr,
- void * pReturn, void * pArgs[], uno_Any ** ppException )
-{
- // is my surrogate
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
- = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI);
- typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
-
- switch (pMemberDescr->eTypeClass)
- {
- case typelib_TypeClass_INTERFACE_ATTRIBUTE:
- {
- // determine vtable call index
- sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
- OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
-
- VtableSlot aVtableSlot(
- getVtableSlot(
- reinterpret_cast<
- typelib_InterfaceAttributeTypeDescription const * >(
- pMemberDescr)));
-
- if (pReturn)
- {
- // dependent dispatch
- cpp_call(
- pThis, aVtableSlot,
- ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef,
- 0, 0, // no params
- pReturn, pArgs, ppException );
- }
- else
- {
- // is SET
- typelib_MethodParameter aParam;
- aParam.pTypeRef =
- ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
- typelib_TypeDescriptionReference * pReturnTypeRef = 0;
- OUString aVoidName( RTL_CONSTASCII_USTRINGPARAM("void") );
- typelib_typedescriptionreference_new(
- &pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
-
- // dependent dispatch
- aVtableSlot.index += 1; // get, then set method
- cpp_call(
- pThis, aVtableSlot, // get, then set method
- pReturnTypeRef,
- 1, &aParam,
- pReturn, pArgs, ppException );
-
- typelib_typedescriptionreference_release( pReturnTypeRef );
- }
-
- break;
- }
- case typelib_TypeClass_INTERFACE_METHOD:
- {
- // determine vtable call index
- sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
- OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
-
- VtableSlot aVtableSlot(
- getVtableSlot(
- reinterpret_cast<
- typelib_InterfaceMethodTypeDescription const * >(
- pMemberDescr)));
-
- switch (aVtableSlot.index)
- {
- // standard calls
- case 1: // acquire uno interface
- (*pUnoI->acquire)( pUnoI );
- *ppException = 0;
- break;
- case 2: // release uno interface
- (*pUnoI->release)( pUnoI );
- *ppException = 0;
- break;
- case 0: // queryInterface() opt
- {
- typelib_TypeDescription * pTD = 0;
- TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pArgs[0] )->getTypeLibType() );
- if (pTD)
- {
- uno_Interface * pInterface = 0;
- (*pThis->getBridge()->getUnoEnv()->getRegisteredInterface)(
- pThis->getBridge()->getUnoEnv(),
- (void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
- if (pInterface)
- {
- ::uno_any_construct(
- reinterpret_cast< uno_Any * >( pReturn ),
- &pInterface, pTD, 0 );
- (*pInterface->release)( pInterface );
- TYPELIB_DANGER_RELEASE( pTD );
- *ppException = 0;
- break;
- }
- TYPELIB_DANGER_RELEASE( pTD );
- }
- } // else perform queryInterface()
- default:
- // dependent dispatch
- cpp_call(
- pThis, aVtableSlot,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pReturnTypeRef,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->nParams,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pParams,
- pReturn, pArgs, ppException );
- }
- break;
- }
- default:
- {
- ::com::sun::star::uno::RuntimeException aExc(
- OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
- Type const & rExcType = ::getCppuType( &aExc );
- // binary identical null reference
- ::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
- }
- }
-}
-
-} } }
diff --git a/bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx
index abc5ce67e4b4..d4f304f77841 100644
--- a/bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,7 +58,7 @@ static typelib_TypeClass cpp2uno_call(
void ** gpreg, void ** fpreg, void ** ovrflw,
sal_Int64 * pRegisterReturn /* space for register return */ )
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "as far as cpp2uno_call\n");
#endif
int nregs = 0; //number of words passed in registers
@@ -114,13 +115,13 @@ static typelib_TypeClass cpp2uno_call(
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "arg %d of %d\n", nPos, nParams);
#endif
if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr )) // value
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "simple type is %d\n", pParamTypeDescr->eTypeClass);
#endif
@@ -215,7 +216,7 @@ static typelib_TypeClass cpp2uno_call(
}
else // ptr to complex value | ref
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "complex, nregs is %d\n", nregs);
#endif
@@ -261,7 +262,7 @@ static typelib_TypeClass cpp2uno_call(
}
}
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "end of params\n");
#endif
@@ -272,7 +273,7 @@ static typelib_TypeClass cpp2uno_call(
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)( pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -291,7 +292,7 @@ static typelib_TypeClass cpp2uno_call(
// is here for dummy
return typelib_TypeClass_VOID;
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -347,11 +348,11 @@ static typelib_TypeClass cpp_mediate(
sal_Int32 nVtableOffset = (nOffsetAndIndex >> 32);
sal_Int32 nFunctionIndex = (nOffsetAndIndex & 0xFFFFFFFF);
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "nVTableOffset, nFunctionIndex are %x %x\n", nVtableOffset, nFunctionIndex);
#endif
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
// Let's figure out what is really going on here
{
fprintf( stderr, "= cpp_mediate () =\nGPR's (%d): ", 6 );
@@ -395,7 +396,7 @@ static typelib_TypeClass cpp_mediate(
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
throw RuntimeException(
- rtl::OUString::createFromAscii("illegal vtable index!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )),
(XInterface *)pCppI );
}
@@ -489,7 +490,7 @@ static typelib_TypeClass cpp_mediate(
default:
{
throw RuntimeException(
- rtl::OUString::createFromAscii("no member description found!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )),
(XInterface *)pCppI );
// is here for dummy
eRet = typelib_TypeClass_VOID;
@@ -523,7 +524,7 @@ long cpp_vtable_call(long r16, long r17, long r18, long r19, long r20, long r21,
register double f21 asm("$f21"); fpreg[5] = f21;
volatile long nRegReturn[1];
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "before mediate with %lx\n",nOffsetAndIndex);
fprintf(stderr, "non-doubles are %x %x %x %x %x %x\n", gpreg[0], gpreg[1], gpreg[2], gpreg[3], gpreg[4], gpreg[5]);
fprintf(stderr, "doubles are %f %f %f %f %f %f\n", fpreg[0], fpreg[1], fpreg[2], fpreg[3], fpreg[4], fpreg[5]);
@@ -531,7 +532,7 @@ long cpp_vtable_call(long r16, long r17, long r18, long r19, long r20, long r21,
typelib_TypeClass aType =
cpp_mediate( nOffsetAndIndex, (void**)gpreg, (void**)fpreg, (void**)sp,
(sal_Int64*)nRegReturn );
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "after mediate ret is %lx %ld\n", nRegReturn[0], nRegReturn[0]);
#endif
@@ -624,7 +625,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
{
(*slots) -= functionCount;
Slot * s = *slots;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "in addLocalFunctions functionOffset is %x\n",functionOffset);
fprintf(stderr, "in addLocalFunctions vtableOffset is %x\n",vtableOffset);
#endif
@@ -673,4 +674,4 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
return code;
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx b/bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx
index 3e666a11cdd0..ea4188bac998 100644
--- a/bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,7 @@
#include <string.h>
#include <dlfcn.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -101,7 +102,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
//==================================================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -284,4 +285,5 @@ void fillUnoException( __cxa_exception * header, uno_Any * pExc, uno_Mapping * p
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk
index 2650c4376933..5376b395e35f 100644
--- a/bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk
@@ -46,7 +46,7 @@ CFLAGS += -DLEAK_STATIC_DATA
# In case someone enabled the non-standard -fomit-frame-pointer which does not
# work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
CFLAGSNOOPT=-O0
diff --git a/bridges/source/cpp_uno/gcc3_linux_alpha/share.hxx b/bridges/source/cpp_uno/gcc3_linux_alpha/share.hxx
index c2f0189a2065..d76cbf748db3 100644
--- a/bridges/source/cpp_uno/gcc3_linux_alpha/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_alpha/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,4 +96,4 @@ namespace axp
enum axplimits { MAX_WORDS_IN_REGS = 6, MAX_GPR_REGS = 6, MAX_SSE_REGS = 6 };
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_alpha/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_alpha/uno2cpp.cxx
index 7f51d425806c..db6d18800c4f 100644
--- a/bridges/source/cpp_uno/gcc3_linux_alpha/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_alpha/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,7 +53,7 @@ void MapReturn(long r0, typelib_TypeClass eTypeClass, sal_uInt64* pRegisterRetur
register float fret asm("$f0");
register double dret asm("$f0");
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr,"Mapping Return with %lx %ld %f\n", r0, r0, dret);
#endif
switch (eTypeClass)
@@ -84,7 +85,7 @@ void MapReturn(long r0, typelib_TypeClass eTypeClass, sal_uInt64* pRegisterRetur
default:
break;
}
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "end of MapReturn with %x\n", pRegisterReturn ? *pRegisterReturn : 0);
#endif
}
@@ -145,7 +146,7 @@ void callVirtualMethod(
if ( nGPR > axp::MAX_GPR_REGS )
nGPR = axp::MAX_GPR_REGS;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
// Let's figure out what is really going on here
{
fprintf( stderr, "= nStack is %d\n", nStack );
@@ -341,7 +342,7 @@ static void cpp_call(
pStackStart, (pStack - pStackStart),
pGPR, nRegs,
pFPR, nRegs );
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -405,7 +406,7 @@ void unoInterfaceProxyDispatch(
uno_Interface * pUnoI, const typelib_TypeDescription * pMemberDescr,
void * pReturn, void * pArgs[], uno_Any ** ppException )
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "unoInterfaceProxyDispatch\n");
#endif
@@ -529,4 +530,5 @@ void unoInterfaceProxyDispatch(
}
} } }
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
index 0e801ab4433e..937f38784e41 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,7 +27,7 @@
************************************************************************/
#include <malloc.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/alloc.h>
#include <osl/mutex.hxx>
@@ -186,7 +187,7 @@ namespace
(*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -207,7 +208,7 @@ namespace
// is here for dummy
return typelib_TypeClass_VOID;
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -288,7 +289,7 @@ namespace
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
throw RuntimeException(
- OUString::createFromAscii("illegal vtable index!"),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )),
(XInterface *)pCppI );
}
@@ -387,7 +388,7 @@ namespace
default:
{
throw RuntimeException(
- OUString::createFromAscii("no member description found!"),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )),
(XInterface *)pCppI );
// is here for dummy
eRet = typelib_TypeClass_VOID;
@@ -547,4 +548,4 @@ void bridges::cpp_uno::shared::VtableFactory::flushCode(
(*clear_cache)(beg, end);
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
index ec1e671a72ba..d8452d8db027 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include <string.h>
#include <dlfcn.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -100,7 +101,7 @@ namespace CPPU_CURRENT_NAMESPACE
//=====================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -227,7 +228,7 @@ namespace CPPU_CURRENT_NAMESPACE
OUStringToOString(
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
+ fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() );
#endif
void * pCppExc;
type_info * rtti;
@@ -305,7 +306,7 @@ namespace CPPU_CURRENT_NAMESPACE
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
return;
}
@@ -314,7 +315,7 @@ namespace CPPU_CURRENT_NAMESPACE
OUString unoName( toUNOname( header->exceptionType->name() ) );
#if OSL_DEBUG_LEVEL > 1
OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
+ fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() );
#endif
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
@@ -326,7 +327,7 @@ namespace CPPU_CURRENT_NAMESPACE
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
}
else
@@ -338,4 +339,4 @@ namespace CPPU_CURRENT_NAMESPACE
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk
index 0900ec11f41f..2c42dec5a415 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk
@@ -45,7 +45,7 @@ NO_BSYMBOLIC=TRUE
CFLAGS += -DLEAK_STATIC_DATA
.ENDIF
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
NOOPTFILES= \
$(SLO)$/cpp2uno.obj \
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx b/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
index fb72c360fd45..2b00c6c008b4 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97,4 +98,5 @@ namespace arm
}
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
index be67ed8fd830..5b02678b8fbf 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -393,7 +394,7 @@ static void cpp_call(
{
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "hyper is %lx\n", pCppArgs[nPos]);
#endif
INSERT_INT64( pCppArgs[nPos], nGPR, pGPR, pStack, pStackStart, bOverFlow );
@@ -401,7 +402,7 @@ static void cpp_call(
case typelib_TypeClass_LONG:
case typelib_TypeClass_UNSIGNED_LONG:
case typelib_TypeClass_ENUM:
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "long is %x\n", pCppArgs[nPos]);
#endif
INSERT_INT32( pCppArgs[nPos], nGPR, pGPR, pStack, bOverFlow );
@@ -469,7 +470,7 @@ static void cpp_call(
(pStack - pStackStart),
pGPR, nGPR);
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -666,4 +667,4 @@ void unoInterfaceProxyDispatch(
} } }
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/call.cxx b/bridges/source/cpp_uno/gcc3_linux_hppa/call.cxx
index 64302947d9a2..f434b7e0ba91 100644
--- a/bridges/source/cpp_uno/gcc3_linux_hppa/call.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/call.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,7 +106,7 @@ void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
pMethod += 4 * nVtableIndex;
pMethod = *((sal_uInt32 *)pMethod);
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "this is %p\n", pGPR[0]);
for (int i = 0; i < hppa::MAX_GPR_REGS ; ++i)
fprintf(stderr, "normal reg %d is %d %x\n", i, pGPR[i], pGPR[i]);
@@ -139,4 +140,4 @@ void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
MapReturn(r28, r29, pReturnTypeDescr, bRegisterReturn, (sal_uInt32*)pRegisterReturn);
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx
index 959452b4d985..e96217495ddb 100644
--- a/bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,7 +27,7 @@
************************************************************************/
#include <malloc.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/alloc.h>
#include <osl/mutex.hxx>
@@ -64,7 +65,7 @@ namespace
void ** startovrflw = ovrflw;
int nregs = 0; //number of words passed in registers
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "cpp2uno_call\n");
#endif
// return
@@ -80,14 +81,14 @@ namespace
{
if (hppa::isRegisterReturn(pReturnTypeRef))
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "simple return\n");
#endif
pUnoReturn = pRegisterReturn; // direct way for simple types
}
else
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "complex return via r8\n");
#endif
pCppReturn = (void *)r8;
@@ -294,18 +295,18 @@ namespace
uno_Any aUnoExc; // Any will be constructed by callee
uno_Any * pUnoExc = &aUnoExc;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "before dispatch\n");
#endif
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "after dispatch\n");
#endif
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -326,7 +327,7 @@ namespace
// is here for dummy
return typelib_TypeClass_VOID;
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -383,7 +384,7 @@ namespace
{
void ** ovrflw = (void**)(sp);
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "cpp_mediate with\n");
fprintf(stderr, "%x %x\n", nFunctionIndex, nVtableOffset);
fprintf(stderr, "and %x %x\n", (long)(ovrflw[0]), (long)(ovrflw[-1]));
@@ -406,14 +407,14 @@ namespace
{
nFunctionIndex &= 0x7fffffff;
pThis = gpreg[1];
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "pThis is gpreg[1]\n");
#endif
}
else
{
pThis = gpreg[0];
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "pThis is gpreg[0]\n");
#endif
}
@@ -431,7 +432,7 @@ namespace
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
throw RuntimeException(
- OUString::createFromAscii("illegal vtable index!"),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )),
(XInterface *)pCppI );
}
@@ -530,7 +531,7 @@ namespace
default:
{
throw RuntimeException(
- OUString::createFromAscii("no member description found!"),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )),
(XInterface *)pCppI );
// is here for dummy
eRet = typelib_TypeClass_VOID;
@@ -577,7 +578,7 @@ sal_Int64 cpp_vtable_call( sal_uInt32 in0, sal_uInt32 in1, sal_uInt32 in2, sal_u
register double d3 asm("fr7"); dpreg[3] = d3;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "got to cpp_vtable_call with %x %x\n", functionIndex, vtableOffset);
for (int i = 0; i < hppa::MAX_GPR_REGS; ++i)
fprintf(stderr, "reg %d is %d %x\n", i, gpreg[i], gpreg[i]);
@@ -722,4 +723,4 @@ void bridges::cpp_uno::shared::VtableFactory::flushCode(
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx b/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
index 9d036d1b5ae8..1128f0f85cd8 100644
--- a/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include <string.h>
#include <dlfcn.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -100,7 +101,7 @@ namespace CPPU_CURRENT_NAMESPACE
//=====================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -227,7 +228,7 @@ namespace CPPU_CURRENT_NAMESPACE
OUStringToOString(
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
+ fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() );
#endif
void * pCppExc;
type_info * rtti;
@@ -298,7 +299,7 @@ namespace CPPU_CURRENT_NAMESPACE
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
return;
}
@@ -307,7 +308,7 @@ namespace CPPU_CURRENT_NAMESPACE
OUString unoName( toUNOname( header->exceptionType->name() ) );
#if OSL_DEBUG_LEVEL > 1
OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
+ fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() );
#endif
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
@@ -319,7 +320,7 @@ namespace CPPU_CURRENT_NAMESPACE
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
}
else
@@ -331,4 +332,4 @@ namespace CPPU_CURRENT_NAMESPACE
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk
index a160ed5fb4c9..6fab7a4d1f5f 100644
--- a/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk
@@ -45,7 +45,7 @@ NO_BSYMBOLIC=TRUE
CFLAGS += -DLEAK_STATIC_DATA
.ENDIF
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
NOOPTFILES= \
$(SLO)$/cpp2uno.obj \
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx b/bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx
index 59b674363fd1..895acf6b1883 100644
--- a/bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97,3 +98,5 @@ namespace hppa
bool isRegisterReturn( typelib_TypeDescriptionReference *pTypeRef );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_hppa/uno2cpp.cxx
index cbf88dd7a516..6c3b25c387fa 100644
--- a/bridges/source/cpp_uno/gcc3_linux_hppa/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -247,7 +248,7 @@ static void cpp_call(
{
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "hyper is %llx\n", *((long long*)pCppArgs[nPos]));
#endif
INSERT_INT64( pCppArgs[nPos], nRegs, pGPR, pStack, pStackStart, bOverFlow );
@@ -255,7 +256,7 @@ static void cpp_call(
case typelib_TypeClass_LONG:
case typelib_TypeClass_UNSIGNED_LONG:
case typelib_TypeClass_ENUM:
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "long is %x\n", pCppArgs[nPos]);
#endif
INSERT_INT32( pCppArgs[nPos], nRegs, pGPR, pStack, bOverFlow );
@@ -322,7 +323,7 @@ static void cpp_call(
pStackStart,
(pStack - pStackStart), pGPR, pFPR);
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -518,4 +519,4 @@ void unoInterfaceProxyDispatch(
} } }
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx
index fe880b2aa449..e897397ce76b 100644
--- a/bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,7 +56,7 @@ static typelib_TypeClass cpp2uno_call(
void ** gpreg, void ** fpreg, void ** ovrflw,
sal_Int64 * pRegisterReturn /* space for register return */ )
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "as far as cpp2uno_call\n");
#endif
@@ -120,14 +121,14 @@ static typelib_TypeClass cpp2uno_call(
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "arg %d of %d\n", nPos, nParams);
#endif
//I think it is impossible to get UNO to pass structs as parameters by copy
if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "simple\n");
#endif
@@ -193,7 +194,7 @@ static typelib_TypeClass cpp2uno_call(
}
else // ptr to complex value | ref
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "complex, ng is %d\n", ng);
#endif
void *pCppStack; //temporary stack pointer
@@ -237,7 +238,7 @@ static typelib_TypeClass cpp2uno_call(
}
}
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "end of params\n");
#endif
@@ -248,7 +249,7 @@ static typelib_TypeClass cpp2uno_call(
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)( pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -268,7 +269,7 @@ static typelib_TypeClass cpp2uno_call(
// is here for dummy
return typelib_TypeClass_VOID;
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -335,25 +336,25 @@ static typelib_TypeClass cpp_mediate(
{
nFunctionIndex &= 0x7fffffff;
pThis = gpreg[1];
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "pThis is gpreg[1]\n");
#endif
}
else
{
pThis = gpreg[0];
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "pThis is gpreg[0]\n");
#endif
}
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "pThis is %p\n", pThis);
#endif
pThis = static_cast< char * >(pThis) - nVtableOffset;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "pThis is now %p\n", pThis);
#endif
@@ -363,7 +364,7 @@ static typelib_TypeClass cpp_mediate(
typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "indexes are %d %d\n", nFunctionIndex, pTypeDescr->nMapFunctionIndexToMemberIndex);
#endif
@@ -371,7 +372,7 @@ static typelib_TypeClass cpp_mediate(
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
throw RuntimeException(
- rtl::OUString::createFromAscii("illegal vtable index!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )),
(XInterface *)pThis );
}
@@ -379,7 +380,7 @@ static typelib_TypeClass cpp_mediate(
sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member index!" );
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "members are %d %d\n", nMemberPos, pTypeDescr->nAllMembers);
#endif
@@ -467,19 +468,19 @@ static typelib_TypeClass cpp_mediate(
}
default:
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "screwed\n");
#endif
throw RuntimeException(
- rtl::OUString::createFromAscii("no member description found!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )),
(XInterface *)pThis );
// is here for dummy
eRet = typelib_TypeClass_VOID;
}
}
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "end of cpp_mediate\n");
#endif
return eRet;
@@ -519,7 +520,7 @@ extern "C" ia64::RegReturn cpp_vtable_call(
register double f14 asm("f14"); fpreg[6] = f14;
register double f15 asm("f15"); fpreg[7] = f15;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "cpp_vtable_call called with %lx\n", nOffsetAndIndex);
fprintf(stderr, "adump is %lx %lx %lx %lx %lx %lx %lx %lx\n", in0, in1, in2, in3, in4, in5, in6, in7);
fprintf(stderr, "bdump is %f %f %f %f %f %f %f %f\n", f8, f9, f10, f11, f12, f13, f14, f15);
@@ -575,7 +576,7 @@ const int codeSnippetSize = 40;
bridges::cpp_uno::shared::VtableFactory::Slot codeSnippet( unsigned char * code, sal_PtrDiff writetoexecdiff, sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
bool bHasHiddenParam )
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "size is %d\n", codeSnippetSize);
fprintf(stderr,"in codeSnippet functionIndex is %x\n", nFunctionIndex);
fprintf(stderr,"in codeSnippet vtableOffset is %x\n", nVtableOffset);
@@ -631,7 +632,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
{
(*in_slots) -= functionCount;
Slot * slots = *in_slots;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "in addLocalFunctions functionOffset is %x\n",functionOffset);
fprintf(stderr, "in addLocalFunctions vtableOffset is %x\n",vtableOffset);
#endif
@@ -681,4 +682,4 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
return code;
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_ia64/except.cxx b/bridges/source/cpp_uno/gcc3_linux_ia64/except.cxx
index 3e666a11cdd0..ea4188bac998 100644
--- a/bridges/source/cpp_uno/gcc3_linux_ia64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_ia64/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,7 @@
#include <string.h>
#include <dlfcn.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -101,7 +102,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
//==================================================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -284,4 +285,5 @@ void fillUnoException( __cxa_exception * header, uno_Any * pExc, uno_Mapping * p
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk
index b4ac2edc3a71..1e82cfabe260 100644
--- a/bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk
@@ -46,7 +46,7 @@ CFLAGS += -DLEAK_STATIC_DATA
# In case someone enabled the non-standard -fomit-frame-pointer which does not
# work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
NOOPTFILES= \
$(SLO)$/uno2cpp.obj \
diff --git a/bridges/source/cpp_uno/gcc3_linux_ia64/share.hxx b/bridges/source/cpp_uno/gcc3_linux_ia64/share.hxx
index abf95470aafc..359c9c720212 100644
--- a/bridges/source/cpp_uno/gcc3_linux_ia64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_ia64/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -127,4 +128,5 @@ namespace bridges
}
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx
index 7a07c5ea5dd9..19b586b557f2 100644
--- a/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -176,7 +177,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
if ( nGPR > ia64::MAX_GPR_REGS )
nGPR = ia64::MAX_GPR_REGS;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
// Let's figure out what is really going on here
{
fprintf( stderr, "= callVirtualMethod() =\nGPR's (%d): ", nGPR );
@@ -336,7 +337,7 @@ static void cpp_call(
bool bSimpleReturn = true;
if (pReturnTypeDescr)
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "return type is %d\n", pReturnTypeDescr->eTypeClass);
#endif
if ( ia64::return_in_hidden_param(pReturnTypeRef) || ia64::return_via_r8_buffer(pReturnTypeRef) )
@@ -345,7 +346,7 @@ static void cpp_call(
if ( bSimpleReturn )
{
pCppReturn = pUnoReturn; // direct way for simple types
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "simple return\n");
#endif
}
@@ -354,7 +355,7 @@ static void cpp_call(
// complex return via ptr
pCppReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize ) : pUnoReturn);
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "pCppReturn/pUnoReturn is %lx/%lx", pCppReturn, pUnoReturn);
#endif
if (!ia64::return_via_r8_buffer(pReturnTypeRef))
@@ -364,7 +365,7 @@ static void cpp_call(
// push "this" pointer
void * pAdjustedThisPtr = reinterpret_cast< void ** >( pThis->getCppI() ) + aVtableSlot.offset;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "this pointer is %p\n", pAdjustedThisPtr);
#endif
INSERT_INT64( &pAdjustedThisPtr, nGPR, pGPR, pStack, bOverFlow );
@@ -378,7 +379,7 @@ static void cpp_call(
sal_Int32 nTempIndizes = 0;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "n params is %d\n", nParams);
#endif
@@ -388,7 +389,7 @@ static void cpp_call(
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "param %d is %d %d %d\n", nPos, rParam.bOut, bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ),
pParamTypeDescr->eTypeClass);
#endif
@@ -402,7 +403,7 @@ static void cpp_call(
{
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "hyper is %lx\n", *(unsigned long*)(pCppArgs[nPos]));
#endif
INSERT_INT64( pCppArgs[nPos], nGPR, pGPR, pStack, bOverFlow );
@@ -410,7 +411,7 @@ static void cpp_call(
case typelib_TypeClass_LONG:
case typelib_TypeClass_UNSIGNED_LONG:
case typelib_TypeClass_ENUM:
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "long is %lx\n", *(unsigned int*)(pCppArgs[nPos]));
#endif
INSERT_INT32( pCppArgs[nPos], nGPR, pGPR, pStack, bOverFlow );
@@ -418,27 +419,27 @@ static void cpp_call(
case typelib_TypeClass_SHORT:
case typelib_TypeClass_CHAR:
case typelib_TypeClass_UNSIGNED_SHORT:
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "short is %x\n", *(unsigned short*)(pCppArgs[nPos]));
#endif
INSERT_INT16( pCppArgs[nPos], nGPR, pGPR, pStack, bOverFlow );
break;
case typelib_TypeClass_BOOLEAN:
case typelib_TypeClass_BYTE:
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "byte is %x\n", *(unsigned char*)(pCppArgs[nPos]));
#endif
INSERT_INT8( pCppArgs[nPos], nGPR, pGPR, pStack, bOverFlow );
break;
case typelib_TypeClass_FLOAT:
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "a float is %f\n", *(float*)(pCppArgs[nPos]));
fprintf(stderr, "b float is %f\n", *(double*)(pCppArgs[nPos]));
#endif
INSERT_FLOAT( pCppArgs[nPos], nFPR, pFPR, nGPR, pGPR, pStack, bOverFlow );
break;
case typelib_TypeClass_DOUBLE:
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "double is %f\n", *(double*)(pCppArgs[nPos]));
#endif
INSERT_DOUBLE( pCppArgs[nPos], nFPR, pFPR, nGPR, pGPR, pStack, bOverFlow );
@@ -453,12 +454,12 @@ static void cpp_call(
}
else // ptr to complex value | ref
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "complex type again %d\n", rParam.bIn);
#endif
if (! rParam.bIn) // is pure out
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "complex size is %d\n", pParamTypeDescr->nSize );
#endif
// cpp out is constructed mem, uno out is not!
@@ -472,7 +473,7 @@ static void cpp_call(
// is in/inout
else if (bridges::cpp_uno::shared::relatesToInterfaceType( pParamTypeDescr ))
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "this one\n");
#endif
uno_copyAndConvertData(
@@ -485,7 +486,7 @@ static void cpp_call(
}
else // direct way
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "that one, passing %lx through\n", pUnoArgs[nPos]);
#endif
pCppArgs[nPos] = pUnoArgs[nPos];
@@ -504,7 +505,7 @@ static void cpp_call(
pStackStart, ( pStack - pStackStart ),
pGPR, nGPR,
pFPR, nFPR );
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -687,4 +688,5 @@ void unoInterfaceProxyDispatch(
}
} } }
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
index ac47e786588c..3f91c558f1d0 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,7 +68,7 @@ void cpp2uno_call(
if (pReturnTypeDescr)
{
- if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
+ if (x86::isSimpleReturnType( pReturnTypeDescr ))
{
pUnoReturn = pReturnValue; // direct way for simple types
}
@@ -163,7 +164,7 @@ void cpp2uno_call(
(*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -182,7 +183,7 @@ void cpp2uno_call(
&aUnoExc, pThis->getBridge()->getUno2Cpp() );
// has to destruct the any
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -252,7 +253,7 @@ extern "C" void cpp_vtable_call(
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
throw RuntimeException(
- rtl::OUString::createFromAscii("illegal vtable index!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )),
(XInterface *)pThis );
}
@@ -341,7 +342,7 @@ extern "C" void cpp_vtable_call(
default:
{
throw RuntimeException(
- rtl::OUString::createFromAscii("no member description found!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )),
(XInterface *)pThis );
}
}
@@ -358,15 +359,40 @@ extern "C" typedef void (*PrivateSnippetExecutor)();
int const codeSnippetSize = 16;
+#if defined (FREEBSD) || defined(NETBSD) || defined(OPENBSD) || defined(MACOSX) || \
+ defined(DRAGONFLY)
+namespace
+{
+ PrivateSnippetExecutor returnsInRegister(typelib_TypeDescriptionReference * pReturnTypeRef)
+ {
+ //These archs apparently are returning small structs in registers, while Linux
+ //doesn't
+ PrivateSnippetExecutor exec=NULL;
+
+ typelib_TypeDescription * pReturnTypeDescr = 0;
+ TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
+ const bool bSimpleReturnStruct = x86::isSimpleReturnType(pReturnTypeDescr);
+ const sal_Int32 nRetSize = pReturnTypeDescr->nSize;
+ TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
+ if (bSimpleReturnStruct)
+ {
+ exec = privateSnippetExecutorGeneral; // fills eax
+ if (nRetSize > 4)
+ exec = privateSnippetExecutorHyper; // fills eax/edx
+ }
+ return exec;
+ }
+}
+#endif
+
unsigned char * codeSnippet(
unsigned char * code, sal_PtrDiff writetoexecdiff, sal_Int32 functionIndex, sal_Int32 vtableOffset,
- typelib_TypeClass returnTypeClass)
+ typelib_TypeDescriptionReference * pReturnTypeRef)
{
- if (!bridges::cpp_uno::shared::isSimpleType(returnTypeClass)) {
- functionIndex |= 0x80000000;
- }
PrivateSnippetExecutor exec;
- switch (returnTypeClass) {
+ typelib_TypeClass eReturnClass = pReturnTypeRef ? pReturnTypeRef->eTypeClass : typelib_TypeClass_VOID;
+ switch (eReturnClass)
+ {
case typelib_TypeClass_VOID:
exec = privateSnippetExecutorVoid;
break;
@@ -380,13 +406,25 @@ unsigned char * codeSnippet(
case typelib_TypeClass_DOUBLE:
exec = privateSnippetExecutorDouble;
break;
+ case typelib_TypeClass_STRUCT:
+ case typelib_TypeClass_EXCEPTION:
+#if defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) || defined(MACOSX) || \
+ defined(DRAGONFLY)
+ exec = returnsInRegister(pReturnTypeRef);
+ if (!exec)
+ {
+ exec = privateSnippetExecutorClass;
+ functionIndex |= 0x80000000;
+ }
+ break;
+#endif
case typelib_TypeClass_STRING:
case typelib_TypeClass_TYPE:
case typelib_TypeClass_ANY:
case typelib_TypeClass_SEQUENCE:
- case typelib_TypeClass_STRUCT:
case typelib_TypeClass_INTERFACE:
exec = privateSnippetExecutorClass;
+ functionIndex |= 0x80000000;
break;
default:
exec = privateSnippetExecutorGeneral;
@@ -454,7 +492,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
code = codeSnippet(
code, writetoexecdiff, functionOffset++, vtableOffset,
reinterpret_cast< typelib_InterfaceAttributeTypeDescription * >(
- member)->pAttributeTypeRef->eTypeClass);
+ member)->pAttributeTypeRef);
// Setter:
if (!reinterpret_cast<
typelib_InterfaceAttributeTypeDescription * >(
@@ -463,7 +501,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
(s++)->fn = code + writetoexecdiff;
code = codeSnippet(
code, writetoexecdiff, functionOffset++, vtableOffset,
- typelib_TypeClass_VOID);
+ NULL);
}
break;
@@ -472,7 +510,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
code = codeSnippet(
code, writetoexecdiff, functionOffset++, vtableOffset,
reinterpret_cast< typelib_InterfaceMethodTypeDescription * >(
- member)->pReturnTypeRef->eTypeClass);
+ member)->pReturnTypeRef);
break;
default:
@@ -487,3 +525,5 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
void bridges::cpp_uno::shared::VtableFactory::flushCode(
unsigned char const *, unsigned char const *)
{}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
index 95cb9dd68971..02ac42b1d4e7 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,8 +32,9 @@
#include <stdio.h>
#include <string.h>
#include <dlfcn.h>
+#include <boost/unordered_map.hpp>
+
#include <cxxabi.h>
-#include <hash_map>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -46,7 +48,6 @@
#include "share.hxx"
-
using namespace ::std;
using namespace ::osl;
using namespace ::rtl;
@@ -102,7 +103,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
//==================================================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -118,7 +119,11 @@ public:
};
//__________________________________________________________________________________________________
RTTI::RTTI() SAL_THROW( () )
+#if defined(FREEBSD) && __FreeBSD_version < 702104
+ : m_hApp( dlopen( 0, RTLD_NOW | RTLD_GLOBAL ) )
+#else
: m_hApp( dlopen( 0, RTLD_LAZY ) )
+#endif
{
}
//__________________________________________________________________________________________________
@@ -153,7 +158,11 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
buf.append( 'E' );
OString symName( buf.makeStringAndClear() );
+#if defined(FREEBSD) && __FreeBSD_version < 702104 /* #i22253# */
+ rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() );
+#else
rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
+#endif
if (rtti)
{
@@ -229,7 +238,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
OUStringToOString(
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
+ fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() );
#endif
void * pCppExc;
type_info * rtti;
@@ -294,7 +303,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
return;
}
@@ -303,7 +312,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
OUString unoName( toUNOname( header->exceptionType->name() ) );
#if OSL_DEBUG_LEVEL > 1
OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
+ fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() );
#endif
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
@@ -315,7 +324,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
}
else
@@ -328,3 +337,4 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk
index d5eb2dd6e1d9..beedf9dafa2a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk
@@ -38,7 +38,11 @@ ENABLE_EXCEPTIONS=TRUE
# --- Files --------------------------------------------------------
-.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCLINUXIgcc3"
+.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCLINUXIgcc3" || \
+ "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCOPENBSDIgcc3" || \
+ "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCFREEBSDIgcc3" || \
+ "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCNETBSDIgcc3" || \
+ "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCDRAGONFLYIgcc3"
.IF "$(cppu_no_leak)" == ""
CFLAGS += -DLEAK_STATIC_DATA
@@ -46,7 +50,7 @@ CFLAGS += -DLEAK_STATIC_DATA
# In case someone enabled the non-standard -fomit-frame-pointer which does not
# work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
CFLAGSNOOPT=-O0
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx b/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx
index 930094738b20..8a3e136bfb7b 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,4 +88,12 @@ void raiseException(
//==================================================================================================
void fillUnoException(
__cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
+
}
+
+namespace x86
+{
+ bool isSimpleReturnType(typelib_TypeDescription * pTD, bool recursive = false);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
index 4d1d3f2f8ca4..21febefad110 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_bridges.hxx"
+#if defined (FREEBSD) || defined(NETBSD) || defined(OPENBSD) || defined(DRAGONFLY)
+#include <stdlib.h>
+#else
#include <malloc.h>
+#endif
#include <com/sun/star/uno/genfunc.hxx>
#include "com/sun/star/uno/RuntimeException.hpp"
@@ -58,7 +63,7 @@ void callVirtualMethod(
void * pAdjustedThisPtr,
sal_Int32 nVtableIndex,
void * pRegisterReturn,
- typelib_TypeClass eReturnType,
+ typelib_TypeDescription * pReturnTypeDescr, bool bSimpleReturn,
sal_Int32 * pStackLongs,
sal_Int32 nStackLongs ) __attribute__((noinline));
@@ -66,7 +71,7 @@ void callVirtualMethod(
void * pAdjustedThisPtr,
sal_Int32 nVtableIndex,
void * pRegisterReturn,
- typelib_TypeClass eReturnType,
+ typelib_TypeDescription * pReturnTypeDescr, bool bSimpleReturn,
sal_Int32 * pStackLongs,
sal_Int32 nStackLongs )
{
@@ -119,8 +124,10 @@ void callVirtualMethod(
: "m"(nStackLongs), "m"(pStackLongs), "m"(pAdjustedThisPtr),
"m"(nVtableIndex), "m"(eax), "m"(edx), "m"(stackptr)
: "eax", "edx" );
- switch( eReturnType )
+ switch( pReturnTypeDescr->eTypeClass )
{
+ case typelib_TypeClass_VOID:
+ break;
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
((long*)pRegisterReturn)[1] = edx;
@@ -145,7 +152,21 @@ void callVirtualMethod(
asm ( "fstpl %0\n\t" : : "m"(*(char *)pRegisterReturn) );
break;
default:
+ {
+#if defined (FREEBSD) || defined(NETBSD) || defined(OPENBSD) || defined(MACOSX) || \
+ defined(DRAGONFLY)
+ sal_Int32 const nRetSize = pReturnTypeDescr->nSize;
+ if (bSimpleReturn && nRetSize <= 8 && nRetSize > 0)
+ {
+ if (nRetSize > 4)
+ static_cast<long *>(pRegisterReturn)[1] = edx;
+ static_cast<long *>(pRegisterReturn)[0] = eax;
+ }
+#else
+ (void)bSimpleReturn;
+#endif
break;
+ }
}
}
@@ -168,10 +189,12 @@ static void cpp_call(
OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
+ bool bSimpleReturn = true;
if (pReturnTypeDescr)
{
- if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
+ bSimpleReturn = x86::isSimpleReturnType(pReturnTypeDescr);
+ if (bSimpleReturn)
{
pCppReturn = pUnoReturn; // direct way for simple types
}
@@ -268,9 +291,9 @@ static void cpp_call(
OSL_ENSURE( !( (pCppStack - pCppStackStart ) & 3), "UNALIGNED STACK !!! (Please DO panic)" );
callVirtualMethod(
pAdjustedThisPtr, aVtableSlot.index,
- pCppReturn, pReturnTypeDescr->eTypeClass,
+ pCppReturn, pReturnTypeDescr, bSimpleReturn,
(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -327,6 +350,39 @@ static void cpp_call(
}
+namespace x86
+{
+ bool isSimpleReturnType(typelib_TypeDescription * pTD, bool recursive)
+ {
+ if (bridges::cpp_uno::shared::isSimpleType( pTD ))
+ return true;
+#if defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) || \
+ defined(MACOSX) || defined(DRAGONFLY)
+ // Only structs of exactly 1, 2, 4, or 8 bytes are returned through
+ // registers, see <http://developer.apple.com/documentation/DeveloperTools/
+ // Conceptual/LowLevelABI/Articles/IA32.html>:
+ if (pTD->eTypeClass == typelib_TypeClass_STRUCT &&
+ (recursive || pTD->nSize <= 2 || pTD->nSize == 4 || pTD->nSize == 8))
+ {
+ typelib_CompoundTypeDescription *const pCompTD =
+ (typelib_CompoundTypeDescription *) pTD;
+ for ( sal_Int32 pos = pCompTD->nMembers; pos--; ) {
+ typelib_TypeDescription * pMemberTD = 0;
+ TYPELIB_DANGER_GET( &pMemberTD, pCompTD->ppTypeRefs[pos] );
+ bool const b = isSimpleReturnType(pMemberTD, true);
+ TYPELIB_DANGER_RELEASE( pMemberTD );
+ if (! b)
+ return false;
+ }
+ return true;
+ }
+#else
+ (void)recursive;
+#endif
+ return false;
+ }
+}
+
namespace bridges { namespace cpp_uno { namespace shared {
void unoInterfaceProxyDispatch(
@@ -449,3 +505,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx
index 2121001d2820..7c46d1a0b408 100644
--- a/bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,7 +27,7 @@
************************************************************************/
#include <malloc.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/alloc.h>
#include <osl/mutex.hxx>
@@ -64,7 +65,7 @@ namespace
// pCallStack: ret, [return ptr], this, params
char * pTopStack = (char *)(pCallStack + 0);
char * pCppStack = pTopStack;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "cpp2uno_call\n");
#endif
// return
@@ -80,14 +81,14 @@ namespace
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "simple return\n");
#endif
pUnoReturn = pRegisterReturn; // direct way for simple types
}
else // complex return via ptr (pCppReturn)
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "complex return\n");
#endif
pCppReturn = (void *)r8;
@@ -189,18 +190,18 @@ namespace
uno_Any aUnoExc; // Any will be constructed by callee
uno_Any * pUnoExc = &aUnoExc;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "before dispatch\n");
#endif
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "after dispatch\n");
#endif
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -221,7 +222,7 @@ namespace
// is here for dummy
return typelib_TypeClass_VOID;
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -276,7 +277,7 @@ namespace
sal_Int64 * pRegisterReturn /* space for register return */ )
{
void ** pCallStack = (void**)(sp);
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "cpp_mediate with\n");
fprintf(stderr, "%x %x\n", nFunctionIndex, nVtableOffset);
fprintf(stderr, "and %x %x\n", pCallStack, pRegisterReturn);
@@ -299,7 +300,7 @@ namespace
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
throw RuntimeException(
- OUString::createFromAscii("illegal vtable index!"),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )),
(XInterface *)pCppI );
}
@@ -398,7 +399,7 @@ namespace
default:
{
throw RuntimeException(
- OUString::createFromAscii("no member description found!"),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )),
(XInterface *)pCppI );
// is here for dummy
eRet = typelib_TypeClass_VOID;
@@ -513,9 +514,6 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
reinterpret_cast<
typelib_InterfaceMethodTypeDescription * >(member);
- bool issimple = bridges::cpp_uno::shared::isSimpleType(
- pMethodTD->pReturnTypeRef);
-
code = codeSnippet(code, functionOffset++, vtableOffset);
break;
}
@@ -533,4 +531,4 @@ void bridges::cpp_uno::shared::VtableFactory::flushCode(
{
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx b/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx
index 9d036d1b5ae8..1128f0f85cd8 100644
--- a/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include <string.h>
#include <dlfcn.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -100,7 +101,7 @@ namespace CPPU_CURRENT_NAMESPACE
//=====================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -227,7 +228,7 @@ namespace CPPU_CURRENT_NAMESPACE
OUStringToOString(
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
+ fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() );
#endif
void * pCppExc;
type_info * rtti;
@@ -298,7 +299,7 @@ namespace CPPU_CURRENT_NAMESPACE
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
return;
}
@@ -307,7 +308,7 @@ namespace CPPU_CURRENT_NAMESPACE
OUString unoName( toUNOname( header->exceptionType->name() ) );
#if OSL_DEBUG_LEVEL > 1
OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
+ fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() );
#endif
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
@@ -319,7 +320,7 @@ namespace CPPU_CURRENT_NAMESPACE
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
}
else
@@ -331,4 +332,4 @@ namespace CPPU_CURRENT_NAMESPACE
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk
index 8ad89c973b9e..3978bda7cb16 100644
--- a/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk
@@ -45,7 +45,7 @@ NO_BSYMBOLIC=TRUE
CFLAGS += -DLEAK_STATIC_DATA
.ENDIF
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
NOOPTFILES= \
$(SLO)$/cpp2uno.obj \
diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/share.hxx b/bridges/source/cpp_uno/gcc3_linux_m68k/share.hxx
index 6e148b489508..4ec09c29ff0a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_m68k/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_m68k/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,5 @@ void raiseException(
void fillUnoException(
__cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx
index 2bee8f1e0fad..0d0fd27678eb 100644
--- a/bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,7 +110,7 @@ void callVirtualMethod(
memcpy( stack, pStack, nStackBytes );
}
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
// Let's figure out what is really going on here
{
fprintf( stderr, "\nStack (%d): ", nStack );
@@ -228,7 +229,7 @@ static void cpp_call(
{
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "hyper is %lx\n", pCppArgs[nPos]);
#endif
INSERT_INT64( pCppArgs[nPos], pStack );
@@ -236,7 +237,7 @@ static void cpp_call(
case typelib_TypeClass_LONG:
case typelib_TypeClass_UNSIGNED_LONG:
case typelib_TypeClass_ENUM:
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "long is %x\n", pCppArgs[nPos]);
#endif
INSERT_INT32( pCppArgs[nPos], pStack );
@@ -301,7 +302,7 @@ static void cpp_call(
pStackStart,
(pStack - pStackStart));
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -490,4 +491,4 @@ void unoInterfaceProxyDispatch(
} } }
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx
index 784657954d84..f1597c37bac4 100644
--- a/bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -312,7 +313,7 @@ namespace
fprintf(stderr,"cpp2uno_call2,after dispatch\n");
#endif
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -332,7 +333,7 @@ namespace
// is here for dummy
return typelib_TypeClass_VOID;
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -426,7 +427,7 @@ namespace
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
throw RuntimeException(
- rtl::OUString::createFromAscii("illegal vtable index!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )),
(XInterface *)pThis );
}
@@ -539,7 +540,7 @@ namespace
fprintf(stderr,"cpp_mediate6\n");
#endif
throw RuntimeException(
- rtl::OUString::createFromAscii("no member description found!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )),
(XInterface *)pThis );
// is here for dummy
eRet = typelib_TypeClass_VOID;
@@ -801,3 +802,4 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
return code;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx b/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx
index 99cf6df8fed8..f4c4e24c4374 100644
--- a/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,7 @@
#include <string.h>
#include <dlfcn.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -97,7 +98,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
//==================================================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -224,7 +225,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
OUStringToOString(
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
+ fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() );
#endif
void * pCppExc;
type_info * rtti;
@@ -289,7 +290,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if defined _DEBUG
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
return;
}
@@ -298,7 +299,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
OUString unoName( toUNOname( header->exceptionType->name() ) );
#if defined BRIDGES_DEBUG
OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
+ fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() );
#endif
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
@@ -310,7 +311,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if defined _DEBUG
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
}
else
@@ -323,3 +324,4 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk
index c71849f06ea9..f71750e9108d 100644
--- a/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk
@@ -46,7 +46,7 @@ CFLAGS += -DLEAK_STATIC_DATA
# In case someone enabled the non-standard -fomit-frame-pointer which does not
# work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
CFLAGSNOOPT=-O0
diff --git a/bridges/source/cpp_uno/gcc3_linux_mips/share.hxx b/bridges/source/cpp_uno/gcc3_linux_mips/share.hxx
index 6e148b489508..4ec09c29ff0a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_mips/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_mips/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,5 @@ void raiseException(
void fillUnoException(
__cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_mips/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_mips/uno2cpp.cxx
index 746d43520a73..4507206f2508 100644
--- a/bridges/source/cpp_uno/gcc3_linux_mips/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_mips/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -405,7 +406,7 @@ namespace
pAdjustedThisPtr, aVtableSlot.index,
pCppReturn, pReturnTypeDescr->eTypeClass, pParamType,
(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -595,3 +596,4 @@ void unoInterfaceProxyDispatch(
}
}}}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx
index bf2826594162..bc9702351464 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,7 +41,6 @@
#include "bridges/cpp_uno/shared/vtablefactory.hxx"
#include "share.hxx"
-// #include <stdio.h>
using namespace ::com::sun::star::uno;
@@ -48,7 +48,6 @@ using namespace ::com::sun::star::uno;
namespace
{
-//==================================================================================================
static typelib_TypeClass cpp2uno_call(
bridges::cpp_uno::shared::CppInterfaceProxy * pThis,
const typelib_TypeDescription * pMemberTypeDescr,
@@ -296,7 +295,7 @@ static typelib_TypeClass cpp2uno_call(
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)( pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -316,7 +315,7 @@ static typelib_TypeClass cpp2uno_call(
// is here for dummy
return typelib_TypeClass_VOID;
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -396,7 +395,7 @@ static typelib_TypeClass cpp_mediate(
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
throw RuntimeException(
- rtl::OUString::createFromAscii("illegal vtable index!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )),
(XInterface *)pThis );
}
@@ -489,7 +488,7 @@ static typelib_TypeClass cpp_mediate(
default:
{
throw RuntimeException(
- rtl::OUString::createFromAscii("no member description found!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )),
(XInterface *)pThis );
// is here for dummy
eRet = typelib_TypeClass_VOID;
@@ -793,3 +792,4 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
return code;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx
index 7012ac42eb28..ea4188bac998 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,7 @@
#include <string.h>
#include <dlfcn.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -101,7 +102,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
//==================================================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -285,3 +286,4 @@ void fillUnoException( __cxa_exception * header, uno_Any * pExc, uno_Mapping * p
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk
index 02906e1a0e94..9a752009904e 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk
@@ -45,7 +45,7 @@ CFLAGS += -DLEAK_STATIC_DATA
# In case someone enabled the non-standard -fomit-frame-pointer which does not
# work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
NOOPTFILES= \
$(SLO)$/uno2cpp.obj
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/share.hxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/share.hxx
index 6e148b489508..4ec09c29ff0a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,5 @@ void raiseException(
void fillUnoException(
__cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx
index ec585e95fabf..49a33f6d12ae 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -487,7 +488,7 @@ static void cpp_call(
pAdjustedThisPtr, aVtableSlot.index,
pCppReturn, pReturnTypeDescr->eTypeClass, pParamType,
(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -670,3 +671,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
index c80e20feb18a..e9a5e8c6bb8b 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,7 +57,7 @@ static typelib_TypeClass cpp2uno_call(
void ** gpreg, void ** fpreg, void ** ovrflw,
sal_Int64 * pRegisterReturn /* space for register return */ )
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "as far as cpp2uno_call\n");
#endif
@@ -114,13 +115,13 @@ static typelib_TypeClass cpp2uno_call(
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "arg %d of %d\n", nPos, nParams);
#endif
if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "simple\n");
#endif
@@ -212,7 +213,7 @@ static typelib_TypeClass cpp2uno_call(
}
else // ptr to complex value | ref
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "complex, ng is %d\n", ng);
#endif
void *pCppStack; //temporary stack pointer
@@ -256,7 +257,7 @@ static typelib_TypeClass cpp2uno_call(
}
}
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "end of params\n");
#endif
@@ -267,7 +268,7 @@ static typelib_TypeClass cpp2uno_call(
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)( pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -287,7 +288,7 @@ static typelib_TypeClass cpp2uno_call(
// is here for dummy
return typelib_TypeClass_VOID;
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -355,25 +356,25 @@ static typelib_TypeClass cpp_mediate(
{
nFunctionIndex &= 0x7fffffff;
pThis = gpreg[1];
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "pThis is gpreg[1]\n");
#endif
}
else
{
pThis = gpreg[0];
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "pThis is gpreg[0]\n");
#endif
}
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "pThis is %lx\n", pThis);
#endif
pThis = static_cast< char * >(pThis) - nVtableOffset;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "pThis is now %lx\n", pThis);
#endif
@@ -383,7 +384,7 @@ static typelib_TypeClass cpp_mediate(
typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "indexes are %d %d\n", nFunctionIndex, pTypeDescr->nMapFunctionIndexToMemberIndex);
#endif
@@ -391,7 +392,7 @@ static typelib_TypeClass cpp_mediate(
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
throw RuntimeException(
- rtl::OUString::createFromAscii("illegal vtable index!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )),
(XInterface *)pThis );
}
@@ -399,7 +400,7 @@ static typelib_TypeClass cpp_mediate(
sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member index!" );
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "members are %d %d\n", nMemberPos, pTypeDescr->nAllMembers);
#endif
@@ -487,19 +488,19 @@ static typelib_TypeClass cpp_mediate(
}
default:
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "screwed\n");
#endif
throw RuntimeException(
- rtl::OUString::createFromAscii("no member description found!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )),
(XInterface *)pThis );
// is here for dummy
eRet = typelib_TypeClass_VOID;
}
}
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "end of cpp_mediate\n");
#endif
return eRet;
@@ -604,7 +605,7 @@ const int codeSnippetSize = 24;
unsigned char * codeSnippet( unsigned char * code, sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
bool simpleRetType)
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr,"in codeSnippet functionIndex is %x\n", nFunctionIndex);
fprintf(stderr,"in codeSnippet vtableOffset is %x\n", nVtableOffset);
#endif
@@ -617,7 +618,7 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 nFunctionIndex, sa
void ** raw = (void **)&code[0];
memcpy(raw, (char*) privateSnippetExecutor, 16);
raw[2] = (void*) nOffsetAndIndex;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "in: offset/index is %x %x %d, %lx\n",
nFunctionIndex, nVtableOffset, !simpleRetType, raw[2]);
#endif
@@ -670,7 +671,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
{
(*slots) -= functionCount;
Slot * s = *slots;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "in addLocalFunctions functionOffset is %x\n",functionOffset);
fprintf(stderr, "in addLocalFunctions vtableOffset is %x\n",vtableOffset);
#endif
@@ -719,4 +720,4 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
return code;
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx
index 7012ac42eb28..ea4188bac998 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,7 @@
#include <string.h>
#include <dlfcn.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -101,7 +102,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
//==================================================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -285,3 +286,4 @@ void fillUnoException( __cxa_exception * header, uno_Any * pExc, uno_Mapping * p
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk
index 2dd11d815c69..77763d7c8b54 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk
@@ -46,7 +46,7 @@ CFLAGS += -DLEAK_STATIC_DATA
# In case someone enabled the non-standard -fomit-frame-pointer which does not
# work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
NOOPTFILES= \
$(SLO)$/uno2cpp.obj \
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx
index 45c3cdd5fcc4..38ed48ee06c8 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -94,3 +95,5 @@ namespace ppc64
{
enum ppclimits { MAX_GPR_REGS = 8, MAX_SSE_REGS = 13 };
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
index d8486836b1a1..66db74288cb3 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -99,7 +100,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
if ( nGPR > ppc64::MAX_GPR_REGS )
nGPR = ppc64::MAX_GPR_REGS;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
// Let's figure out what is really going on here
{
fprintf( stderr, "= callVirtualMethod() =\nGPR's (%d): ", nGPR );
@@ -266,13 +267,13 @@ static void cpp_call(
if (pReturnTypeDescr)
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "return type is %d\n", pReturnTypeDescr->eTypeClass);
#endif
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
{
pCppReturn = pUnoReturn; // direct way for simple types
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "simple return\n");
#endif
}
@@ -281,7 +282,7 @@ static void cpp_call(
// complex return via ptr
pCppReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize ) : pUnoReturn);
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "pCppReturn/pUnoReturn is %lx/%lx", pCppReturn, pUnoReturn);
#endif
INSERT_INT64( &pCppReturn, nGPR, pGPR, pStack, bOverFlow );
@@ -289,7 +290,7 @@ static void cpp_call(
}
// push "this" pointer
void * pAdjustedThisPtr = reinterpret_cast< void ** >( pThis->getCppI() ) + aVtableSlot.offset;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "this pointer is %p\n", pAdjustedThisPtr);
#endif
INSERT_INT64( &pAdjustedThisPtr, nGPR, pGPR, pStack, bOverFlow );
@@ -303,7 +304,7 @@ static void cpp_call(
sal_Int32 nTempIndizes = 0;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "n params is %d\n", nParams);
#endif
@@ -313,7 +314,7 @@ static void cpp_call(
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "param %d is %d %d %d\n", nPos, rParam.bOut, bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ),
pParamTypeDescr->eTypeClass);
#endif
@@ -327,7 +328,7 @@ static void cpp_call(
{
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "hyper is %lx\n", pCppArgs[nPos]);
#endif
INSERT_INT64( pCppArgs[nPos], nGPR, pGPR, pStack, bOverFlow );
@@ -335,7 +336,7 @@ static void cpp_call(
case typelib_TypeClass_LONG:
case typelib_TypeClass_UNSIGNED_LONG:
case typelib_TypeClass_ENUM:
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "long is %x\n", pCppArgs[nPos]);
#endif
INSERT_INT32( pCppArgs[nPos], nGPR, pGPR, pStack, bOverFlow );
@@ -363,12 +364,12 @@ static void cpp_call(
}
else // ptr to complex value | ref
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "complex type again %d\n", rParam.bIn);
#endif
if (! rParam.bIn) // is pure out
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "complex size is %d\n", pParamTypeDescr->nSize );
#endif
// cpp out is constructed mem, uno out is not!
@@ -382,7 +383,7 @@ static void cpp_call(
// is in/inout
else if (bridges::cpp_uno::shared::relatesToInterfaceType( pParamTypeDescr ))
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "this one\n");
#endif
uno_copyAndConvertData(
@@ -395,7 +396,7 @@ static void cpp_call(
}
else // direct way
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "that one, passing %lx through\n", pUnoArgs[nPos]);
#endif
pCppArgs[nPos] = pUnoArgs[nPos];
@@ -414,7 +415,7 @@ static void cpp_call(
pStackStart, ( pStack - pStackStart ),
pGPR, nGPR,
pFPR, nFPR );
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -479,9 +480,8 @@ void unoInterfaceProxyDispatch(
void * pReturn, void * pArgs[], uno_Any ** ppException )
{
// is my surrogate
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
- = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy *> (pUnoI);
- typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
+ bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
+ = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy *> (pUnoI);
switch (pMemberDescr->eTypeClass)
{
@@ -598,3 +598,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx
index 6807884281c4..a29b7c38dba7 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -255,7 +256,7 @@ static typelib_TypeClass cpp2uno_call(
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)( pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -274,7 +275,7 @@ static typelib_TypeClass cpp2uno_call(
// is here for dummy
return typelib_TypeClass_VOID;
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -359,7 +360,7 @@ static typelib_TypeClass cpp_mediate(
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
throw RuntimeException(
- rtl::OUString::createFromAscii("illegal vtable index!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )),
(XInterface *)pCppI );
}
@@ -453,7 +454,7 @@ static typelib_TypeClass cpp_mediate(
default:
{
throw RuntimeException(
- rtl::OUString::createFromAscii("no member description found!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )),
(XInterface *)pCppI );
// is here for dummy
eRet = typelib_TypeClass_VOID;
@@ -470,7 +471,7 @@ static typelib_TypeClass cpp_mediate(
*/
static void privateSnippetExecutor( sal_uInt32 nOffsetAndIndex, void** gpregptr, void** fpregptr, void** ovrflw)
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "privateSnippetExecutor\n");
#endif
@@ -643,7 +644,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
{
(*slots) -= functionCount;
Slot * s = *slots;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "in addLocalFunctions functionOffset is %x\n",functionOffset);
fprintf(stderr, "in addLocalFunctions vtableOffset is %x\n",vtableOffset);
#endif
@@ -692,4 +693,4 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
return code;
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390/except.cxx b/bridges/source/cpp_uno/gcc3_linux_s390/except.cxx
index 3e666a11cdd0..ea4188bac998 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,7 @@
#include <string.h>
#include <dlfcn.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -101,7 +102,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
//==================================================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -284,4 +285,5 @@ void fillUnoException( __cxa_exception * header, uno_Any * pExc, uno_Mapping * p
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk
index d71136adaff4..bda85f359210 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk
@@ -46,7 +46,7 @@ CFLAGS += -DLEAK_STATIC_DATA
# In case someone enabled the non-standard -fomit-frame-pointer which does not
# work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
CFLAGSNOOPT=-O0
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390/share.hxx b/bridges/source/cpp_uno/gcc3_linux_s390/share.hxx
index 00aa5670eef9..4ec09c29ff0a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,4 +90,5 @@ void raiseException(
void fillUnoException(
__cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx
index 4b0b361cf5b2..ddaf1f368413 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -443,7 +444,7 @@ static void cpp_call(
pAdjustedThisPtr, aVtableSlot.index,
pCppReturn, pReturnTypeDescr->eTypeClass, pParamType,
(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -507,7 +508,7 @@ void unoInterfaceProxyDispatch(
uno_Interface * pUnoI, const typelib_TypeDescription * pMemberDescr,
void * pReturn, void * pArgs[], uno_Any ** ppException )
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "unoInterfaceProxyDispatch\n");
#endif
@@ -632,4 +633,5 @@ void unoInterfaceProxyDispatch(
}
} } }
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx
index 8d76d3ea37df..fa3bd5fb687a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,7 +53,7 @@ static typelib_TypeClass cpp2uno_call(
void ** gpreg, void ** fpreg, void ** ovrflw,
sal_Int64 * pRegisterReturn /* space for register return */ )
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "as far as cpp2uno_call\n");
#endif
int ng = 0; //number of gpr registers used
@@ -108,13 +109,13 @@ static typelib_TypeClass cpp2uno_call(
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "arg %d of %d\n", nPos, nParams);
#endif
if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr )) // value
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "simple\n");
#endif
@@ -202,7 +203,7 @@ static typelib_TypeClass cpp2uno_call(
}
else // ptr to complex value | ref
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "complex, ng is %d\n", ng);
#endif
@@ -246,7 +247,7 @@ static typelib_TypeClass cpp2uno_call(
}
}
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "end of params\n");
#endif
@@ -257,7 +258,7 @@ static typelib_TypeClass cpp2uno_call(
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)( pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -276,7 +277,7 @@ static typelib_TypeClass cpp2uno_call(
// is here for dummy
return typelib_TypeClass_VOID;
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -332,11 +333,11 @@ static typelib_TypeClass cpp_mediate(
sal_Int32 nVtableOffset = (nOffsetAndIndex >> 32);
sal_Int32 nFunctionIndex = (nOffsetAndIndex & 0xFFFFFFFF);
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "nVTableOffset, nFunctionIndex are %x %x\n", nVtableOffset, nFunctionIndex);
#endif
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
// Let's figure out what is really going on here
{
fprintf( stderr, "= cpp_mediate () =\nGPR's (%d): ", 5 );
@@ -380,7 +381,7 @@ static typelib_TypeClass cpp_mediate(
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
throw RuntimeException(
- rtl::OUString::createFromAscii("illegal vtable index!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )),
(XInterface *)pCppI );
}
@@ -474,7 +475,7 @@ static typelib_TypeClass cpp_mediate(
default:
{
throw RuntimeException(
- rtl::OUString::createFromAscii("no member description found!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )),
(XInterface *)pCppI );
// is here for dummy
eRet = typelib_TypeClass_VOID;
@@ -505,14 +506,14 @@ long privateSnippetExecutor(long r2, long r3, long r4, long r5, long r6, long fi
register double f6 asm("f6"); fpreg[3] = f6;
volatile long nRegReturn[1];
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "before mediate with %lx\n",nOffsetAndIndex);
fprintf(stderr, "doubles are %f %f %f %f\n", fpreg[0], fpreg[1], fpreg[2], fpreg[3]);
#endif
typelib_TypeClass aType =
cpp_mediate( nOffsetAndIndex, (void**)gpreg, (void**)fpreg, (void**)sp,
(sal_Int64*)nRegReturn );
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "after mediate ret is %lx %ld\n", nRegReturn[0], nRegReturn[0]);
#endif
@@ -605,7 +606,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
{
(*slots) -= functionCount;
Slot * s = *slots;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "in addLocalFunctions functionOffset is %x\n",functionOffset);
fprintf(stderr, "in addLocalFunctions vtableOffset is %x\n",vtableOffset);
#endif
@@ -654,4 +655,4 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
return code;
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx b/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx
index 3e666a11cdd0..ea4188bac998 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,7 @@
#include <string.h>
#include <dlfcn.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -101,7 +102,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
//==================================================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -284,4 +285,5 @@ void fillUnoException( __cxa_exception * header, uno_Any * pExc, uno_Mapping * p
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk
index c14cb152faa8..9539dd6edf9b 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk
@@ -46,7 +46,7 @@ CFLAGS += -DLEAK_STATIC_DATA
# In case someone enabled the non-standard -fomit-frame-pointer which does not
# work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
CFLAGSNOOPT=-O0
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/share.hxx b/bridges/source/cpp_uno/gcc3_linux_s390x/share.hxx
index 182730b9f162..69176377606b 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390x/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390x/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,4 +96,4 @@ namespace s390x
enum s390xlimits { MAX_GPR_REGS = 5, MAX_SSE_REGS = 4 };
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx
index dbeafce10fe8..379d086ce85a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,7 +50,7 @@ using namespace ::com::sun::star::uno;
void MapReturn(long r2, double f0, typelib_TypeClass eTypeClass, sal_uInt64* pRegisterReturn)
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr,"Mapping Return with %lx %ld %f\n", r2, r2, f0);
#endif
switch (eTypeClass)
@@ -81,7 +82,7 @@ void MapReturn(long r2, double f0, typelib_TypeClass eTypeClass, sal_uInt64* pRe
default:
break;
}
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "end of MapReturn with %x\n", pRegisterReturn ? *pRegisterReturn : 0);
#endif
}
@@ -142,7 +143,7 @@ void callVirtualMethod(
if ( nGPR > s390x::MAX_GPR_REGS )
nGPR = s390x::MAX_GPR_REGS;
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
// Let's figure out what is really going on here
{
fprintf( stderr, "= nStack is %d\n", nStack );
@@ -346,7 +347,7 @@ static void cpp_call(
pStackStart, (pStack - pStackStart),
pGPR, nGPR,
pFPR, nFPR );
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -410,7 +411,7 @@ void unoInterfaceProxyDispatch(
uno_Interface * pUnoI, const typelib_TypeDescription * pMemberDescr,
void * pReturn, void * pArgs[], uno_Any ** ppException )
{
-#ifdef CMC_DEBUG
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "unoInterfaceProxyDispatch\n");
#endif
@@ -534,4 +535,5 @@ void unoInterfaceProxyDispatch(
}
} } }
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
index 85168a422d80..54833796f337 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -163,7 +164,7 @@ static typelib_TypeClass cpp2uno_call(
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)(pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -182,7 +183,7 @@ static typelib_TypeClass cpp2uno_call(
// is here for dummy
return typelib_TypeClass_VOID;
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -256,7 +257,7 @@ static typelib_TypeClass cpp_mediate(
"### illegal vtable index!" );
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
- throw RuntimeException( rtl::OUString::createFromAscii("illegal vtable index!"), (XInterface *)pCppI );
+ throw RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )), (XInterface *)pCppI );
}
// determine called method
@@ -351,7 +352,7 @@ static typelib_TypeClass cpp_mediate(
}
default:
{
- throw RuntimeException(rtl::OUString::createFromAscii("no member description found!"), (XInterface *)pCppI );
+ throw RuntimeException(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )), (XInterface *)pCppI );
// is here for dummy
eRet = typelib_TypeClass_VOID;
}
@@ -573,3 +574,5 @@ void bridges::cpp_uno::shared::VtableFactory::flushCode(
doFlushCode(adr - off, (n + off + 7) >> 3);
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
index 3bdc3590cd4d..f95848008920 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,7 @@
#include <string.h>
#include <dlfcn.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -100,7 +101,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
//==================================================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -227,7 +228,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
OUStringToOString(
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
+ fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() );
#endif
void * pCppExc;
type_info * rtti;
@@ -292,7 +293,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if defined _DEBUG
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
return;
}
@@ -301,7 +302,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
OUString unoName( toUNOname( header->exceptionType->name() ) );
#if defined BRIDGES_DEBUG
OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
+ fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() );
#endif
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
@@ -313,7 +314,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if defined _DEBUG
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
}
else
@@ -326,3 +327,4 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk
index 71e799f76c12..3940038247c3 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk
@@ -43,6 +43,10 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS += -DLEAK_STATIC_DATA
.ENDIF
+# In case someone enabled the non-standard -fomit-frame-pointer which does not
+# # work with the .cxx sources in this directory:
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
+
CFLAGSNOOPT=-O0
NOOPTFILES = \
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/share.hxx b/bridges/source/cpp_uno/gcc3_linux_sparc/share.hxx
index b894a99832dd..3526f19082cd 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,3 +96,5 @@ inline char* adjustPointer( char* pIn, typelib_TypeDescription* pType )
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
index 0d85483760df..f99e60d0d6fd 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,9 +39,12 @@
#include "share.hxx"
-using namespace rtl;
using namespace com::sun::star::uno;
+using ::rtl::OUString;
+using ::rtl::OString;
+using ::rtl::OUStringToOString;
+
namespace
{
//==================================================================================================
@@ -412,7 +416,7 @@ static void cpp_call(
pReturnTypeDescr->eTypeClass,
(sal_Int32 *)pCppStackStart,
nStackLongs);
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -598,3 +602,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx
index 0483e86b7280..938cbf5ded06 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,16 +67,6 @@
using namespace x86_64;
-typedef struct
-{
- /* Registers for argument passing. */
- long gpr[MAX_GPR_REGS];
- __int128_t sse[MAX_SSE_REGS];
-
- /* Stack space for arguments. */
- char argspace[0];
-} stackLayout;
-
/* Register class used for passing given 64bit part of the argument.
These represent classes as documented by the PS ABI, with the exception
of SSESF, SSEDF classes, that are basically SSE class, just gcc will
@@ -346,451 +337,4 @@ void x86_64::fill_struct( typelib_TypeDescriptionReference *pTypeRef, const sal_
}
}
-#if 0
-
-/* Functions to load floats and double to an SSE register placeholder. */
-extern void float2sse (float, __int128_t *);
-extern void double2sse (double, __int128_t *);
-extern void floatfloat2sse (void *, __int128_t *);
-
-/* Functions to put the floats and doubles back. */
-extern float sse2float (__int128_t *);
-extern double sse2double (__int128_t *);
-extern void sse2floatfloat(__int128_t *, void *);
-
-/*@-exportheader@*/
-void
-ffi_prep_args (stackLayout *stack, extended_cif *ecif)
-/*@=exportheader@*/
-{
- int gprcount, ssecount, i, g, s;
- void **p_argv;
- void *argp = &stack->argspace;
- ffi_type **p_arg;
-
- /* First check if the return value should be passed in memory. If so,
- pass the pointer as the first argument. */
- gprcount = ssecount = 0;
- if (ecif->cif->rtype->type != FFI_TYPE_VOID
- && examine_argument (ecif->cif->rtype, 1, &g, &s) == 0)
- (void *)stack->gpr[gprcount++] = ecif->rvalue;
-
- for (i=ecif->cif->nargs, p_arg=ecif->cif->arg_types, p_argv = ecif->avalue;
- i!=0; i--, p_arg++, p_argv++)
- {
- int in_register = 0;
-
- switch ((*p_arg)->type)
- {
- case FFI_TYPE_SINT8:
- case FFI_TYPE_SINT16:
- case FFI_TYPE_SINT32:
- case FFI_TYPE_SINT64:
- case FFI_TYPE_UINT8:
- case FFI_TYPE_UINT16:
- case FFI_TYPE_UINT32:
- case FFI_TYPE_UINT64:
- case FFI_TYPE_POINTER:
- if (gprcount < MAX_GPR_REGS)
- {
- stack->gpr[gprcount] = 0;
- stack->gpr[gprcount++] = *(long long *)(*p_argv);
- in_register = 1;
- }
- break;
-
- case FFI_TYPE_FLOAT:
- if (ssecount < MAX_SSE_REGS)
- {
- float2sse (*(float *)(*p_argv), &stack->sse[ssecount++]);
- in_register = 1;
- }
- break;
-
- case FFI_TYPE_DOUBLE:
- if (ssecount < MAX_SSE_REGS)
- {
- double2sse (*(double *)(*p_argv), &stack->sse[ssecount++]);
- in_register = 1;
- }
- break;
- }
-
- if (in_register)
- continue;
-
- /* Either all places in registers where filled, or this is a
- type that potentially goes into a memory slot. */
- if (examine_argument (*p_arg, 0, &g, &s) == 0
- || gprcount + g > MAX_GPR_REGS || ssecount + s > MAX_SSE_REGS)
- {
- /* Pass this argument in memory. */
- argp = (void *)ALIGN(argp, (*p_arg)->alignment);
- memcpy (argp, *p_argv, (*p_arg)->size);
- argp += (*p_arg)->size;
- }
- else
- {
- /* All easy cases are eliminated. Now fire the big guns. */
-
- enum x86_64_reg_class classes[MAX_CLASSES];
- int j, num;
- void *a;
-
- num = classify_argument (*p_arg, classes, 0);
- for (j=0, a=*p_argv; j<num; j++, a+=8)
- {
- switch (classes[j])
- {
- case X86_64_INTEGER_CLASS:
- case X86_64_INTEGERSI_CLASS:
- stack->gpr[gprcount++] = *(long long *)a;
- break;
- case X86_64_SSE_CLASS:
- floatfloat2sse (a, &stack->sse[ssecount++]);
- break;
- case X86_64_SSESF_CLASS:
- float2sse (*(float *)a, &stack->sse[ssecount++]);
- break;
- case X86_64_SSEDF_CLASS:
- double2sse (*(double *)a, &stack->sse[ssecount++]);
- break;
- default:
- abort();
- }
- }
- }
- }
-}
-
-/* Perform machine dependent cif processing. */
-ffi_status
-ffi_prep_cif_machdep (ffi_cif *cif)
-{
- int gprcount, ssecount, i, g, s;
-
- gprcount = ssecount = 0;
-
- /* Reset the byte count. We handle this size estimation here. */
- cif->bytes = 0;
-
- /* If the return value should be passed in memory, pass the pointer
- as the first argument. The actual memory isn't allocated here. */
- if (cif->rtype->type != FFI_TYPE_VOID
- && examine_argument (cif->rtype, 1, &g, &s) == 0)
- gprcount = 1;
-
- /* Go over all arguments and determine the way they should be passed.
- If it's in a register and there is space for it, let that be so. If
- not, add it's size to the stack byte count. */
- for (i=0; i<cif->nargs; i++)
- {
- if (examine_argument (cif->arg_types[i], 0, &g, &s) == 0
- || gprcount + g > MAX_GPR_REGS || ssecount + s > MAX_SSE_REGS)
- {
- /* This is passed in memory. First align to the basic type. */
- cif->bytes = ALIGN(cif->bytes, cif->arg_types[i]->alignment);
-
- /* Stack arguments are *always* at least 8 byte aligned. */
- cif->bytes = ALIGN(cif->bytes, 8);
-
- /* Now add the size of this argument. */
- cif->bytes += cif->arg_types[i]->size;
- }
- else
- {
- gprcount += g;
- ssecount += s;
- }
- }
-
- /* Set the flag for the closures return. */
- switch (cif->rtype->type)
- {
- case FFI_TYPE_VOID:
- case FFI_TYPE_STRUCT:
- case FFI_TYPE_SINT64:
- case FFI_TYPE_FLOAT:
- case FFI_TYPE_DOUBLE:
- case FFI_TYPE_LONGDOUBLE:
- cif->flags = (unsigned) cif->rtype->type;
- break;
-
- case FFI_TYPE_UINT64:
- cif->flags = FFI_TYPE_SINT64;
- break;
-
- default:
- cif->flags = FFI_TYPE_INT;
- break;
- }
-
- return FFI_OK;
-}
-
-typedef struct
-{
- long gpr[2];
- __int128_t sse[2];
- long double st0;
-} return_value;
-
-//#endif
-
-void
-ffi_fill_return_value (return_value *rv, extended_cif *ecif)
-{
- enum x86_64_reg_class classes[MAX_CLASSES];
- int i = 0, num;
- long *gpr = rv->gpr;
- __int128_t *sse = rv->sse;
- signed char sc;
- signed short ss;
-
- /* This is needed because of the way x86-64 handles signed short
- integers. */
- switch (ecif->cif->rtype->type)
- {
- case FFI_TYPE_SINT8:
- sc = *(signed char *)gpr;
- *(long long *)ecif->rvalue = (long long)sc;
- return;
- case FFI_TYPE_SINT16:
- ss = *(signed short *)gpr;
- *(long long *)ecif->rvalue = (long long)ss;
- return;
- default:
- /* Just continue. */
- ;
- }
-
- num = classify_argument (ecif->cif->rtype, classes, 0);
-
- if (num == 0)
- /* Return in memory. */
- ecif->rvalue = (void *) rv->gpr[0];
- else if (num == 2 && classes[0] == X86_64_X87_CLASS &&
- classes[1] == X86_64_X87UP_CLASS)
- /* This is a long double (this is easiest to handle this way instead
- of an eightbyte at a time as in the loop below. */
- *((long double *)ecif->rvalue) = rv->st0;
- else
- {
- void *a;
-
- for (i=0, a=ecif->rvalue; i<num; i++, a+=8)
- {
- switch (classes[i])
- {
- case X86_64_INTEGER_CLASS:
- case X86_64_INTEGERSI_CLASS:
- *(long long *)a = *gpr;
- gpr++;
- break;
- case X86_64_SSE_CLASS:
- sse2floatfloat (sse++, a);
- break;
- case X86_64_SSESF_CLASS:
- *(float *)a = sse2float (sse++);
- break;
- case X86_64_SSEDF_CLASS:
- *(double *)a = sse2double (sse++);
- break;
- default:
- abort();
- }
- }
- }
-}
-
-//#if 0
-
-/*@-declundef@*/
-/*@-exportheader@*/
-extern void ffi_call_UNIX64(void (*)(stackLayout *, extended_cif *),
- void (*) (return_value *, extended_cif *),
- /*@out@*/ extended_cif *,
- unsigned, /*@out@*/ unsigned *, void (*fn)());
-/*@=declundef@*/
-/*@=exportheader@*/
-
-void ffi_call(/*@dependent@*/ ffi_cif *cif,
- void (*fn)(),
- /*@out@*/ void *rvalue,
- /*@dependent@*/ void **avalue)
-{
- extended_cif ecif;
- int dummy;
-
- ecif.cif = cif;
- ecif.avalue = avalue;
-
- /* If the return value is a struct and we don't have a return */
- /* value address then we need to make one */
-
- if ((rvalue == NULL) &&
- (examine_argument (cif->rtype, 1, &dummy, &dummy) == 0))
- {
- /*@-sysunrecog@*/
- ecif.rvalue = alloca(cif->rtype->size);
- /*@=sysunrecog@*/
- }
- else
- ecif.rvalue = rvalue;
-
- /* Stack must always be 16byte aligned. Make it so. */
- cif->bytes = ALIGN(cif->bytes, 16);
-
- switch (cif->abi)
- {
- case FFI_SYSV:
- /* Calling 32bit code from 64bit is not possible */
- FFI_ASSERT(0);
- break;
-
- case FFI_UNIX64:
- /*@-usedef@*/
- ffi_call_UNIX64 (ffi_prep_args, ffi_fill_return_value, &ecif,
- cif->bytes, ecif.rvalue, fn);
- /*@=usedef@*/
- break;
-
- default:
- FFI_ASSERT(0);
- break;
- }
-}
-
-extern void ffi_closure_UNIX64(void);
-
-ffi_status
-ffi_prep_closure (ffi_closure* closure,
- ffi_cif* cif,
- void (*fun)(ffi_cif*, void*, void**, void*),
- void *user_data)
-{
- volatile unsigned short *tramp;
-
- /* FFI_ASSERT (cif->abi == FFI_OSF); */
-
- tramp = (volatile unsigned short *) &closure->tramp[0];
- tramp[0] = 0xbb49; /* mov <code>, %r11 */
- tramp[5] = 0xba49; /* mov <data>, %r10 */
- tramp[10] = 0xff49; /* jmp *%r11 */
- tramp[11] = 0x00e3;
- *(void * volatile *) &tramp[1] = ffi_closure_UNIX64;
- *(void * volatile *) &tramp[6] = closure;
-
- closure->cif = cif;
- closure->fun = fun;
- closure->user_data = user_data;
-
- return FFI_OK;
-}
-
-int
-ffi_closure_UNIX64_inner(ffi_closure *closure, va_list l, void *rp)
-{
- ffi_cif *cif;
- void **avalue;
- ffi_type **arg_types;
- long i, avn, argn;
-
- cif = closure->cif;
- avalue = alloca(cif->nargs * sizeof(void *));
-
- argn = 0;
-
- i = 0;
- avn = cif->nargs;
- arg_types = cif->arg_types;
-
- /* Grab the addresses of the arguments from the stack frame. */
- while (i < avn)
- {
- switch (arg_types[i]->type)
- {
- case FFI_TYPE_SINT8:
- case FFI_TYPE_UINT8:
- case FFI_TYPE_SINT16:
- case FFI_TYPE_UINT16:
- case FFI_TYPE_SINT32:
- case FFI_TYPE_UINT32:
- case FFI_TYPE_SINT64:
- case FFI_TYPE_UINT64:
- case FFI_TYPE_POINTER:
- {
- if (l->gp_offset > 48-8)
- {
- avalue[i] = l->overflow_arg_area;
- l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
- }
- else
- {
- avalue[i] = (char *)l->reg_save_area + l->gp_offset;
- l->gp_offset += 8;
- }
- }
- break;
-
- case FFI_TYPE_STRUCT:
- /* FIXME */
- FFI_ASSERT(0);
- break;
-
- case FFI_TYPE_DOUBLE:
- {
- if (l->fp_offset > 176-16)
- {
- avalue[i] = l->overflow_arg_area;
- l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
- }
- else
- {
- avalue[i] = (char *)l->reg_save_area + l->fp_offset;
- l->fp_offset += 16;
- }
- }
-#if DEBUG_FFI
- fprintf (stderr, "double arg %d = %g\n", i, *(double *)avalue[i]);
-#endif
- break;
-
- case FFI_TYPE_FLOAT:
- {
- if (l->fp_offset > 176-16)
- {
- avalue[i] = l->overflow_arg_area;
- l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
- }
- else
- {
- avalue[i] = (char *)l->reg_save_area + l->fp_offset;
- l->fp_offset += 16;
- }
- }
-#if DEBUG_FFI
- fprintf (stderr, "float arg %d = %g\n", i, *(float *)avalue[i]);
-#endif
- break;
-
- default:
- FFI_ASSERT(0);
- }
-
- argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG;
- i++;
- }
-
- /* Invoke the closure. */
- (closure->fun) (cif, rp, avalue, closure->user_data);
-
- /* FIXME: Structs not supported. */
- FFI_ASSERT(cif->rtype->type != FFI_TYPE_STRUCT);
-
- /* Tell ffi_closure_UNIX64 how to perform return type promotions. */
-
- return cif->rtype->type;
-}
-
-#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.hxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.hxx
index adb8acbb4771..c9f71f18078b 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,5 @@ void fill_struct( typelib_TypeDescriptionReference *pTypeRef, const sal_uInt64*
} // namespace x86_64
#endif // _BRIDGES_CPP_UNO_X86_64_ABI_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
index d279173f30fb..c9b51856378d 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/alloc.h>
#include <osl/mutex.hxx>
@@ -198,7 +199,7 @@ static typelib_TypeClass cpp2uno_call(
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)( pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case an exception occured...
+ // in case an exception occurred...
if ( pUnoExc )
{
// destruct temporary in/inout params
@@ -217,7 +218,7 @@ static typelib_TypeClass cpp2uno_call(
// is here for dummy
return typelib_TypeClass_VOID;
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -291,7 +292,7 @@ extern "C" typelib_TypeClass cpp_vtable_call(
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!\n" );
if ( nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex )
{
- throw RuntimeException( OUString::createFromAscii("illegal vtable index!"),
+ throw RuntimeException( OUString(RTL_CONSTASCII_USTRINGPARAM("illegal vtable index!")),
reinterpret_cast<XInterface *>( pCppI ) );
}
@@ -388,7 +389,7 @@ extern "C" typelib_TypeClass cpp_vtable_call(
}
default:
{
- throw RuntimeException( OUString::createFromAscii("no member description found!"),
+ throw RuntimeException( OUString(RTL_CONSTASCII_USTRINGPARAM("no member description found!")),
reinterpret_cast<XInterface *>( pCppI ) );
// is here for dummy
eRet = typelib_TypeClass_VOID;
@@ -518,3 +519,5 @@ void bridges::cpp_uno::shared::VtableFactory::flushCode(
unsigned char const *, unsigned char const * )
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
index 1b2c4b000de5..e841bc0c37e5 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,7 @@
#include <string.h>
#include <dlfcn.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -102,7 +103,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
//==================================================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -118,7 +119,11 @@ public:
};
//__________________________________________________________________________________________________
RTTI::RTTI() SAL_THROW( () )
+#if defined(FREEBSD) && __FreeBSD_version < 702104
+ : m_hApp( dlopen( 0, RTLD_NOW | RTLD_GLOBAL ) )
+#else
: m_hApp( dlopen( 0, RTLD_LAZY ) )
+#endif
{
}
//__________________________________________________________________________________________________
@@ -153,7 +158,11 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
buf.append( 'E' );
OString symName( buf.makeStringAndClear() );
+#if defined(FREEBSD) && __FreeBSD_version < 702104 /* #i22253# */
+ rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() );
+#else
rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
+#endif
if (rtti)
{
@@ -229,7 +238,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
OUStringToOString(
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
+ fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() );
#endif
void * pCppExc;
type_info * rtti;
@@ -294,7 +303,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
return;
}
@@ -303,7 +312,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
OUString unoName( toUNOname( header->exceptionType->name() ) );
#if OSL_DEBUG_LEVEL > 1
OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
+ fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() );
#endif
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
@@ -315,7 +324,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
}
else
@@ -328,3 +337,4 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk
index 8e6200704969..dd3543233827 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk
@@ -38,7 +38,11 @@ ENABLE_EXCEPTIONS=TRUE
# --- Files --------------------------------------------------------
-.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCLINUXXgcc3"
+.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCLINUXXgcc3" || \
+ "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCOPENBSDXgcc3" || \
+ "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCFREEBSDXgcc3" || \
+ "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCNETBSDXgcc3" || \
+ "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCDRAGONFLYXgcc3" \
.IF "$(cppu_no_leak)" == ""
CFLAGS += -DLEAK_STATIC_DATA
@@ -46,7 +50,7 @@ CFLAGS += -DLEAK_STATIC_DATA
# In case someone enabled the non-standard -fomit-frame-pointer which does not
# work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
SLOFILES= \
$(SLO)$/abi.obj \
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
index 930094738b20..da2367ad172b 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,3 +89,5 @@ void raiseException(
void fillUnoException(
__cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
index 5bcdf8c2497a..c830f877ccf2 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -410,7 +411,6 @@ static void cpp_call(
Reference< XInterface >());
}
- // NO exception occured...
*ppUnoExc = 0;
// reconvert temporary params
@@ -604,3 +604,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx
index 0962aa737c70..2ceb0bba529d 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -166,7 +167,7 @@ void cpp2uno_call(
(*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -185,7 +186,7 @@ void cpp2uno_call(
&aUnoExc, pThis->getBridge()->getUno2Cpp() );
// has to destruct the any
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -262,7 +263,7 @@ extern "C" void cpp_vtable_call(
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
throw RuntimeException(
- rtl::OUString::createFromAscii("illegal vtable index!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )),
(XInterface *)pThis );
}
@@ -353,7 +354,7 @@ extern "C" void cpp_vtable_call(
default:
{
throw RuntimeException(
- rtl::OUString::createFromAscii("no member description found!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )),
(XInterface *)pThis );
}
}
@@ -517,3 +518,5 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
void bridges::cpp_uno::shared::VtableFactory::flushCode(
unsigned char const *, unsigned char const *)
{}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
index 64591b703dc6..a14bc8b9aec0 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,7 @@
#include <stdio.h>
#include <dlfcn.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -101,7 +102,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
//==================================================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -228,7 +229,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
OUStringToOString(
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
+ fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() );
#endif
void * pCppExc;
type_info * rtti;
@@ -293,7 +294,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
return;
}
@@ -302,7 +303,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
OUString unoName( toUNOname( header->exceptionType->name() ) );
#if OSL_DEBUG_LEVEL > 1
OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
+ fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() );
#endif
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
@@ -314,7 +315,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
}
else
@@ -327,3 +328,4 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_macosx_intel/share.hxx b/bridges/source/cpp_uno/gcc3_macosx_intel/share.hxx
index 6d64133e9e62..8b105c0880b3 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_intel/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_intel/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90,3 +91,5 @@ void raiseException(
void fillUnoException(
__cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_macosx_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_macosx_intel/uno2cpp.cxx
index c6870af48258..9f0000587923 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_intel/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,8 +31,6 @@
#include <stdio.h>
-// #include <malloc.h>
-
#include <com/sun/star/uno/genfunc.hxx>
#include "com/sun/star/uno/RuntimeException.hpp"
#include <uno/data.h>
@@ -283,7 +282,7 @@ static void cpp_call(
pAdjustedThisPtr, aVtableSlot.index,
pCppReturn, pReturnTypeDescr, bSimpleReturn,
(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -493,3 +492,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx
index 5439be405b0c..232144c5e80d 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -242,7 +243,7 @@ static typelib_TypeClass cpp2uno_call(
(*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -263,7 +264,7 @@ static typelib_TypeClass cpp2uno_call(
// is here for dummy
return typelib_TypeClass_VOID;
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -343,7 +344,7 @@ static typelib_TypeClass cpp_mediate(
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
throw RuntimeException(
- rtl::OUString::createFromAscii("illegal vtable index!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )),
(XInterface *)pThis );
}
@@ -435,7 +436,7 @@ static typelib_TypeClass cpp_mediate(
default:
{
throw RuntimeException(
- rtl::OUString::createFromAscii("no member description found!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )),
(XInterface *)pThis );
// is here for dummy
eRet = typelib_TypeClass_VOID;
@@ -728,3 +729,4 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
return code;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_macosx_powerpc/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_powerpc/except.cxx
index cd46dea6144d..274f99987cb8 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_powerpc/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_powerpc/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,7 @@
#include <stdio.h>
#include <dlfcn.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -100,7 +101,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
//==================================================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -284,3 +285,4 @@ void fillUnoException( __cxa_exception * header, uno_Any * pExc, uno_Mapping * p
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_macosx_powerpc/share.hxx b/bridges/source/cpp_uno/gcc3_macosx_powerpc/share.hxx
index 6e148b489508..4ec09c29ff0a 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_powerpc/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_powerpc/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,5 @@ void raiseException(
void fillUnoException(
__cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx
index c2547588954a..fdc30b3756b8 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -449,7 +450,7 @@ static void cpp_call(
pAdjustedThisPtr, aVtableSlot.index,
pCppReturn, pReturnTypeDescr->eTypeClass, pParamType,
(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -632,3 +633,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_netbsd_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_netbsd_intel/cpp2uno.cxx
deleted file mode 100644
index 79cda920e7db..000000000000
--- a/bridges/source/cpp_uno/gcc3_netbsd_intel/cpp2uno.cxx
+++ /dev/null
@@ -1,563 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_bridges.hxx"
-
-#include <hash_map>
-
-#include <sal/alloca.h>
-#include <rtl/alloc.h>
-#include <osl/mutex.hxx>
-
-#include <uno/data.h>
-#include <typelib/typedescription.hxx>
-
-#include <bridges/cpp_uno/bridge.hxx>
-#include <bridges/cpp_uno/type_misc.hxx>
-
-#include "share.hxx"
-
-
-using namespace ::osl;
-using namespace ::rtl;
-using namespace ::com::sun::star::uno;
-
-namespace CPPU_CURRENT_NAMESPACE
-{
-
-//==================================================================================================
-rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
-
-//==================================================================================================
-static typelib_TypeClass cpp2uno_call(
- cppu_cppInterfaceProxy * pThis,
- const typelib_TypeDescription * pMemberTypeDescr,
- typelib_TypeDescriptionReference * pReturnTypeRef, // 0 indicates void return
- sal_Int32 nParams, typelib_MethodParameter * pParams,
- void ** pCallStack,
- sal_Int64 * pRegisterReturn /* space for register return */ )
-{
- // pCallStack: ret, [return ptr], this, params
- char * pCppStack = (char *)(pCallStack +1);
-
- // return
- typelib_TypeDescription * pReturnTypeDescr = 0;
- if (pReturnTypeRef)
- TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
- void * pUnoReturn = 0;
- void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
-
- if (pReturnTypeDescr)
- {
- if (cppu_isSimpleType( pReturnTypeDescr ))
- {
- pUnoReturn = pRegisterReturn; // direct way for simple types
- }
- else // complex return via ptr (pCppReturn)
- {
- pCppReturn = *(void **)pCppStack;
- pCppStack += sizeof(void *);
-
- pUnoReturn = (cppu_relatesToInterface( pReturnTypeDescr )
- ? alloca( pReturnTypeDescr->nSize )
- : pCppReturn); // direct way
- }
- }
- // pop this
- pCppStack += sizeof( void* );
-
- // stack space
- OSL_ENSURE( sizeof(void *) == sizeof(sal_Int32), "### unexpected size!" );
- // parameters
- void ** pUnoArgs = (void **)alloca( 4 * sizeof(void *) * nParams );
- void ** pCppArgs = pUnoArgs + nParams;
- // indizes of values this have to be converted (interface conversion cpp<=>uno)
- sal_Int32 * pTempIndizes = (sal_Int32 *)(pUnoArgs + (2 * nParams));
- // type descriptions for reconversions
- typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pUnoArgs + (3 * nParams));
-
- sal_Int32 nTempIndizes = 0;
-
- for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
- {
- const typelib_MethodParameter & rParam = pParams[nPos];
- typelib_TypeDescription * pParamTypeDescr = 0;
- TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
- if (!rParam.bOut && cppu_isSimpleType( pParamTypeDescr )) // value
- {
- pCppArgs[nPos] = pCppStack;
- pUnoArgs[nPos] = pCppStack;
- switch (pParamTypeDescr->eTypeClass)
- {
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- case typelib_TypeClass_DOUBLE:
- pCppStack += sizeof(sal_Int32); // extra long
- }
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- else // ptr to complex value | ref
- {
- pCppArgs[nPos] = *(void **)pCppStack;
-
- if (! rParam.bIn) // is pure out
- {
- // uno out is unconstructed mem!
- pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize );
- pTempIndizes[nTempIndizes] = nPos;
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
- }
- // is in/inout
- else if (cppu_relatesToInterface( pParamTypeDescr ))
- {
- uno_copyAndConvertData( pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- *(void **)pCppStack, pParamTypeDescr,
- &pThis->pBridge->aCpp2Uno );
- pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
- }
- else // direct way
- {
- pUnoArgs[nPos] = *(void **)pCppStack;
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- }
- pCppStack += sizeof(sal_Int32); // standard parameter length
- }
-
- // ExceptionHolder
- uno_Any aUnoExc; // Any will be constructed by callee
- uno_Any * pUnoExc = &aUnoExc;
-
- // invoke uno dispatch call
- (*pThis->pUnoI->pDispatcher)( pThis->pUnoI, pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
-
- // in case an exception occured...
- if (pUnoExc)
- {
- // destruct temporary in/inout params
- for ( ; nTempIndizes--; )
- {
- sal_Int32 nIndex = pTempIndizes[nTempIndizes];
-
- if (pParams[nIndex].bIn) // is in/inout => was constructed
- uno_destructData( pUnoArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], 0 );
- TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
- }
- if (pReturnTypeDescr)
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
-
- raiseException( &aUnoExc, &pThis->pBridge->aUno2Cpp ); // has to destruct the any
- // is here for dummy
- return typelib_TypeClass_VOID;
- }
- else // else no exception occured...
- {
- // temporary params
- for ( ; nTempIndizes--; )
- {
- sal_Int32 nIndex = pTempIndizes[nTempIndizes];
- typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
- if (pParams[nIndex].bOut) // inout/out
- {
- // convert and assign
- uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
- uno_copyAndConvertData( pCppArgs[nIndex], pUnoArgs[nIndex], pParamTypeDescr,
- &pThis->pBridge->aUno2Cpp );
- }
- // destroy temp uno param
- uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- // return
- if (pCppReturn) // has complex return
- {
- if (pUnoReturn != pCppReturn) // needs reconversion
- {
- uno_copyAndConvertData( pCppReturn, pUnoReturn, pReturnTypeDescr,
- &pThis->pBridge->aUno2Cpp );
- // destroy temp uno return
- uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
- }
- // complex return ptr is set to eax
- *(void **)pRegisterReturn = pCppReturn;
- }
- if (pReturnTypeDescr)
- {
- typelib_TypeClass eRet = (typelib_TypeClass)pReturnTypeDescr->eTypeClass;
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
- return eRet;
- }
- else
- return typelib_TypeClass_VOID;
- }
-}
-
-
-//==================================================================================================
-static typelib_TypeClass cpp_mediate(
- sal_Int32 nVtableCall,
- void ** pCallStack,
- sal_Int64 * pRegisterReturn /* space for register return */ )
-{
- OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
-
- // pCallStack: ret adr, [ret *], this, params
- // _this_ ptr is patched cppu_XInterfaceProxy object
- cppu_cppInterfaceProxy * pCppI = NULL;
- if( nVtableCall & 0x80000000 )
- {
- nVtableCall &= 0x7fffffff;
- pCppI = (cppu_cppInterfaceProxy *)(XInterface *)*(pCallStack +2);
- }
- else
- {
- pCppI = (cppu_cppInterfaceProxy *)(XInterface *)*(pCallStack +1);
- }
-
- typelib_InterfaceTypeDescription * pTypeDescr = pCppI->pTypeDescr;
-
- OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
- if (nVtableCall >= pTypeDescr->nMapFunctionIndexToMemberIndex)
- {
- throw RuntimeException(
- OUString::createFromAscii("illegal vtable index!"),
- (XInterface *)pCppI );
- }
-
- // determine called method
- OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
- sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nVtableCall];
- OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member index!" );
-
- TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
-
- typelib_TypeClass eRet;
- switch (aMemberDescr.get()->eTypeClass)
- {
- case typelib_TypeClass_INTERFACE_ATTRIBUTE:
- {
- if (pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos] == nVtableCall)
- {
- // is GET method
- eRet = cpp2uno_call(
- pCppI, aMemberDescr.get(),
- ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef,
- 0, 0, // no params
- pCallStack, pRegisterReturn );
- }
- else
- {
- // is SET method
- typelib_MethodParameter aParam;
- aParam.pTypeRef =
- ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
- eRet = cpp2uno_call(
- pCppI, aMemberDescr.get(),
- 0, // indicates void return
- 1, &aParam,
- pCallStack, pRegisterReturn );
- }
- break;
- }
- case typelib_TypeClass_INTERFACE_METHOD:
- {
- // is METHOD
- switch (nVtableCall)
- {
- case 1: // acquire()
- pCppI->acquireProxy(); // non virtual call!
- eRet = typelib_TypeClass_VOID;
- break;
- case 2: // release()
- pCppI->releaseProxy(); // non virtual call!
- eRet = typelib_TypeClass_VOID;
- break;
- case 0: // queryInterface() opt
- {
- typelib_TypeDescription * pTD = 0;
- TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pCallStack[3] )->getTypeLibType() );
- if (pTD)
- {
- XInterface * pInterface = 0;
- (*pCppI->pBridge->pCppEnv->getRegisteredInterface)(
- pCppI->pBridge->pCppEnv,
- (void **)&pInterface, pCppI->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
- if (pInterface)
- {
- ::uno_any_construct(
- reinterpret_cast< uno_Any * >( pCallStack[1] ),
- &pInterface, pTD, cpp_acquire );
- pInterface->release();
- TYPELIB_DANGER_RELEASE( pTD );
- *(void **)pRegisterReturn = pCallStack[1];
- eRet = typelib_TypeClass_ANY;
- break;
- }
- TYPELIB_DANGER_RELEASE( pTD );
- }
- } // else perform queryInterface()
- default:
- eRet = cpp2uno_call(
- pCppI, aMemberDescr.get(),
- ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pReturnTypeRef,
- ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->nParams,
- ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pParams,
- pCallStack, pRegisterReturn );
- }
- break;
- }
- default:
- {
- throw RuntimeException(
- OUString::createFromAscii("no member description found!"),
- (XInterface *)pCppI );
- // is here for dummy
- eRet = typelib_TypeClass_VOID;
- }
- }
-
- return eRet;
-}
-
-//==================================================================================================
-/**
- * is called on incoming vtable calls
- * (called by asm snippets)
- */
-static void cpp_vtable_call( int nTableEntry, void** pCallStack ) __attribute__((regparm(2)));
-
-void cpp_vtable_call( int nTableEntry, void** pCallStack )
-{
- volatile long nRegReturn[2];
- typelib_TypeClass aType = cpp_mediate( nTableEntry, pCallStack, (sal_Int64*)nRegReturn );
-
- switch( aType )
- {
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- __asm__( "movl %1, %%edx\n\t"
- "movl %0, %%eax\n"
- : : "m"(nRegReturn[0]), "m"(nRegReturn[1]) );
- break;
- case typelib_TypeClass_FLOAT:
- __asm__( "flds %0\n\t"
- "fstp %%st(0)\n\t"
- "flds %0\n"
- : : "m"(*(float *)nRegReturn) );
- break;
- case typelib_TypeClass_DOUBLE:
- __asm__( "fldl %0\n\t"
- "fstp %%st(0)\n\t"
- "fldl %0\n"
- : : "m"(*(double *)nRegReturn) );
- break;
-// case typelib_TypeClass_UNSIGNED_SHORT:
-// case typelib_TypeClass_SHORT:
-// __asm__( "movswl %0, %%eax\n"
-// : : "m"(nRegReturn) );
-// break;
- default:
- __asm__( "movl %0, %%eax\n"
- : : "m"(nRegReturn[0]) );
- break;
- }
-}
-
-
-//==================================================================================================
-class MediateClassData
-{
- typedef ::std::hash_map< OUString, void *, OUStringHash > t_classdata_map;
- t_classdata_map m_map;
- Mutex m_mutex;
-
-public:
- void const * get_vtable( typelib_InterfaceTypeDescription * pTD ) SAL_THROW( () );
-
- inline MediateClassData() SAL_THROW( () )
- {}
- ~MediateClassData() SAL_THROW( () );
-};
-//__________________________________________________________________________________________________
-MediateClassData::~MediateClassData() SAL_THROW( () )
-{
- OSL_TRACE( "> calling ~MediateClassData(): freeing mediate vtables." );
-
- for ( t_classdata_map::const_iterator iPos( m_map.begin() ); iPos != m_map.end(); ++iPos )
- {
- ::rtl_freeMemory( iPos->second );
- }
-}
-//--------------------------------------------------------------------------------------------------
-static inline void codeSnippet( char * code, sal_uInt32 vtable_pos, bool simple_ret_type ) SAL_THROW( () )
-{
- if (! simple_ret_type)
- vtable_pos |= 0x80000000;
- OSL_ASSERT( sizeof (long) == 4 );
- // mov $nPos, %eax
- *code++ = 0xb8;
- *(long *)code = vtable_pos;
- code += sizeof (long);
- // mov %esp, %edx
- *code++ = 0x89;
- *code++ = 0xe2;
- // jmp cpp_vtable_call
- *code++ = 0xe9;
- *(long *)code = ((char *)cpp_vtable_call) - code - sizeof (long);
-}
-//__________________________________________________________________________________________________
-void const * MediateClassData::get_vtable( typelib_InterfaceTypeDescription * pTD ) SAL_THROW( () )
-{
- void * buffer;
-
- // avoiding locked counts
- OUString const & unoName = *(OUString const *)&((typelib_TypeDescription *)pTD)->pTypeName;
- {
- MutexGuard aGuard( m_mutex );
- t_classdata_map::const_iterator iFind( m_map.find( unoName ) );
- if (iFind == m_map.end())
- {
- // create new vtable
- sal_Int32 nSlots = pTD->nMapFunctionIndexToMemberIndex;
- buffer = ::rtl_allocateMemory( ((2+ nSlots) * sizeof (void *)) + (nSlots *20) );
-
- ::std::pair< t_classdata_map::iterator, bool > insertion(
- m_map.insert( t_classdata_map::value_type( unoName, buffer ) ) );
- OSL_ENSURE( insertion.second, "### inserting new vtable buffer failed?!" );
-
- void ** slots = (void **)buffer;
- *slots++ = 0;
- *slots++ = 0; // rtti
- char * code = (char *)(slots + nSlots);
-
- sal_uInt32 vtable_pos = 0;
- sal_Int32 nAllMembers = pTD->nAllMembers;
- typelib_TypeDescriptionReference ** ppAllMembers = pTD->ppAllMembers;
- for ( sal_Int32 nPos = 0; nPos < nAllMembers; ++nPos )
- {
- typelib_TypeDescription * pTD = 0;
- TYPELIB_DANGER_GET( &pTD, ppAllMembers[ nPos ] );
- OSL_ASSERT( pTD );
- if (typelib_TypeClass_INTERFACE_ATTRIBUTE == pTD->eTypeClass)
- {
- bool simple_ret = cppu_isSimpleType(
- ((typelib_InterfaceAttributeTypeDescription *)pTD)->pAttributeTypeRef->eTypeClass );
- // get method
- *slots++ = code;
- codeSnippet( code, vtable_pos++, simple_ret );
- code += 20;
- if (! ((typelib_InterfaceAttributeTypeDescription *)pTD)->bReadOnly)
- {
- // set method
- *slots++ = code;
- codeSnippet( code, vtable_pos++, true );
- code += 20;
- }
- }
- else
- {
- bool simple_ret = cppu_isSimpleType(
- ((typelib_InterfaceMethodTypeDescription *)pTD)->pReturnTypeRef->eTypeClass );
- *slots++ = code;
- codeSnippet( code, vtable_pos++, simple_ret );
- code += 20;
- }
- TYPELIB_DANGER_RELEASE( pTD );
- }
- OSL_ASSERT( vtable_pos == nSlots );
- }
- else
- {
- buffer = iFind->second;
- }
- }
-
- return ((void **)buffer +2);
-}
-
-//==================================================================================================
-void SAL_CALL cppu_cppInterfaceProxy_patchVtable(
- XInterface * pCppI, typelib_InterfaceTypeDescription * pTypeDescr ) throw ()
-{
- static MediateClassData * s_pMediateClassData = 0;
- if (! s_pMediateClassData)
- {
- MutexGuard aGuard( Mutex::getGlobalMutex() );
- if (! s_pMediateClassData)
- {
-#ifdef LEAK_STATIC_DATA
- s_pMediateClassData = new MediateClassData();
-#else
- static MediateClassData s_aMediateClassData;
- s_pMediateClassData = &s_aMediateClassData;
-#endif
- }
- }
- *(void const **)pCppI = s_pMediateClassData->get_vtable( pTypeDescr );
-}
-
-}
-
-extern "C"
-{
-//##################################################################################################
-sal_Bool SAL_CALL component_canUnload( TimeValue * pTime )
- SAL_THROW_EXTERN_C()
-{
- return CPPU_CURRENT_NAMESPACE::g_moduleCount.canUnload(
- &CPPU_CURRENT_NAMESPACE::g_moduleCount, pTime );
-}
-//##################################################################################################
-void SAL_CALL uno_initEnvironment( uno_Environment * pCppEnv )
- SAL_THROW_EXTERN_C()
-{
- CPPU_CURRENT_NAMESPACE::cppu_cppenv_initEnvironment(
- pCppEnv );
-}
-//##################################################################################################
-void SAL_CALL uno_ext_getMapping(
- uno_Mapping ** ppMapping, uno_Environment * pFrom, uno_Environment * pTo )
- SAL_THROW_EXTERN_C()
-{
- CPPU_CURRENT_NAMESPACE::cppu_ext_getMapping(
- ppMapping, pFrom, pTo );
-}
-}
diff --git a/bridges/source/cpp_uno/gcc3_netbsd_intel/share.hxx b/bridges/source/cpp_uno/gcc3_netbsd_intel/share.hxx
deleted file mode 100644
index ba6ac7e974cc..000000000000
--- a/bridges/source/cpp_uno/gcc3_netbsd_intel/share.hxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include <typeinfo>
-#include <exception>
-#include <cstddef>
-
-namespace CPPU_CURRENT_NAMESPACE
-{
-
-// ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
-
-struct _Unwind_Exception
-{
- unsigned exception_class __attribute__((__mode__(__DI__)));
- void * exception_cleanup;
- unsigned private_1 __attribute__((__mode__(__word__)));
- unsigned private_2 __attribute__((__mode__(__word__)));
-} __attribute__((__aligned__));
-
-struct __cxa_exception
-{
- ::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
- ::std::unexpected_handler unexpectedHandler;
- ::std::terminate_handler terminateHandler;
-
- __cxa_exception *nextException;
-
- int handlerCount;
-
- int handlerSwitchValue;
- const unsigned char *actionRecord;
- const unsigned char *languageSpecificData;
- void *catchTemp;
- void *adjustedPtr;
-
- _Unwind_Exception unwindHeader;
-};
-
-extern "C" void *__cxa_allocate_exception(
- std::size_t thrown_size ) throw();
-extern "C" void __cxa_throw (
- void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
-
-struct __cxa_eh_globals
-{
- __cxa_exception *caughtExceptions;
- unsigned int uncaughtExceptions;
-};
-extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
-
-// -----
-
-//==================================================================================================
-void raiseException(
- uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
-//==================================================================================================
-void fillUnoException(
- __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
-}
diff --git a/bridges/source/cpp_uno/gcc3_netbsd_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_netbsd_intel/uno2cpp.cxx
deleted file mode 100644
index 873abecd7420..000000000000
--- a/bridges/source/cpp_uno/gcc3_netbsd_intel/uno2cpp.cxx
+++ /dev/null
@@ -1,433 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_bridges.hxx"
-
-#include <sal/alloca.h>
-#include <rtl/alloc.h>
-
-#include <uno/data.h>
-#include <bridges/cpp_uno/bridge.hxx>
-#include <bridges/cpp_uno/type_misc.hxx>
-
-#include "share.hxx"
-
-
-using namespace ::rtl;
-using namespace ::com::sun::star::uno;
-
-namespace CPPU_CURRENT_NAMESPACE
-{
-
-void dummy_can_throw_anything( char const * );
-
-//==================================================================================================
-// The call instruction within the asm section of callVirtualMethod may throw
-// exceptions. So that the compiler handles this correctly, it is important
-// that (a) callVirtualMethod might call dummy_can_throw_anything (although this
-// never happens at runtime), which in turn can throw exceptions, and (b)
-// callVirtualMethod is not inlined at its call site (so that any exceptions are
-// caught which are thrown from the instruction calling callVirtualMethod):
-void callVirtualMethod(
- void * pThis,
- sal_Int32 nVtableIndex,
- void * pRegisterReturn,
- typelib_TypeClass eReturnType,
- sal_Int32 * pStackLongs,
- sal_Int32 nStackLongs ) __attribute__((noinline));
-
-void callVirtualMethod(
- void * pThis,
- sal_Int32 nVtableIndex,
- void * pRegisterReturn,
- typelib_TypeClass eReturnType,
- sal_Int32 * pStackLongs,
- sal_Int32 nStackLongs )
-{
- // parameter list is mixed list of * and values
- // reference parameters are pointers
-
- OSL_ENSURE( pStackLongs && pThis, "### null ptr!" );
- OSL_ENSURE( (sizeof(void *) == 4) && (sizeof(sal_Int32) == 4), "### unexpected size of int!" );
- OSL_ENSURE( nStackLongs && pStackLongs, "### no stack in callVirtualMethod !" );
-
- // never called
- if (! pThis) dummy_can_throw_anything("xxx"); // address something
-
- volatile long edx = 0, eax = 0; // for register returns
- void * stackptr;
- asm volatile (
- "mov %%esp, %6\n\t"
- // copy values
- "mov %0, %%eax\n\t"
- "mov %%eax, %%edx\n\t"
- "dec %%edx\n\t"
- "shl $2, %%edx\n\t"
- "add %1, %%edx\n"
- "Lcopy:\n\t"
- "pushl 0(%%edx)\n\t"
- "sub $4, %%edx\n\t"
- "dec %%eax\n\t"
- "jne Lcopy\n\t"
- // do the actual call
- "mov %2, %%edx\n\t"
- "mov 0(%%edx), %%edx\n\t"
- "mov %3, %%eax\n\t"
- "shl $2, %%eax\n\t"
- "add %%eax, %%edx\n\t"
- "mov 0(%%edx), %%edx\n\t"
- "call *%%edx\n\t"
- // save return registers
- "mov %%eax, %4\n\t"
- "mov %%edx, %5\n\t"
- // cleanup stack
- "mov %6, %%esp\n\t"
- :
- : "m"(nStackLongs), "m"(pStackLongs), "m"(pThis), "m"(nVtableIndex),
- "m"(eax), "m"(edx), "m"(stackptr)
- : "eax", "edx" );
- switch( eReturnType )
- {
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- ((long*)pRegisterReturn)[1] = edx;
- case typelib_TypeClass_LONG:
- case typelib_TypeClass_UNSIGNED_LONG:
- case typelib_TypeClass_CHAR:
- case typelib_TypeClass_ENUM:
- ((long*)pRegisterReturn)[0] = eax;
- break;
- case typelib_TypeClass_SHORT:
- case typelib_TypeClass_UNSIGNED_SHORT:
- *(unsigned short*)pRegisterReturn = eax;
- break;
- case typelib_TypeClass_BOOLEAN:
- case typelib_TypeClass_BYTE:
- *(unsigned char*)pRegisterReturn = eax;
- break;
- case typelib_TypeClass_FLOAT:
- asm ( "fstps %0" : : "m"(*(char *)pRegisterReturn) );
- break;
- case typelib_TypeClass_DOUBLE:
- asm ( "fstpl %0\n\t" : : "m"(*(char *)pRegisterReturn) );
- break;
- }
-}
-
-//==================================================================================================
-static void cpp_call(
- cppu_unoInterfaceProxy * pThis,
- sal_Int32 nVtableCall,
- typelib_TypeDescriptionReference * pReturnTypeRef,
- sal_Int32 nParams, typelib_MethodParameter * pParams,
- void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
-{
- // max space for: [complex ret ptr], values|ptr ...
- char * pCppStack =
- (char *)alloca( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
- char * pCppStackStart = pCppStack;
-
- // return
- typelib_TypeDescription * pReturnTypeDescr = 0;
- TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
- OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
-
- void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
-
- if (pReturnTypeDescr)
- {
- if (cppu_isSimpleType( pReturnTypeDescr ))
- {
- pCppReturn = pUnoReturn; // direct way for simple types
- }
- else
- {
- // complex return via ptr
- pCppReturn = *(void **)pCppStack = (cppu_relatesToInterface( pReturnTypeDescr )
- ? alloca( pReturnTypeDescr->nSize )
- : pUnoReturn); // direct way
- pCppStack += sizeof(void *);
- }
- }
- // push this
- *(void**)pCppStack = pThis->pCppI;
- pCppStack += sizeof( void* );
-
- // stack space
- OSL_ENSURE( sizeof(void *) == sizeof(sal_Int32), "### unexpected size!" );
- // args
- void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams );
- // indizes of values this have to be converted (interface conversion cpp<=>uno)
- sal_Int32 * pTempIndizes = (sal_Int32 *)(pCppArgs + nParams);
- // type descriptions for reconversions
- typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
-
- sal_Int32 nTempIndizes = 0;
-
- for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
- {
- const typelib_MethodParameter & rParam = pParams[nPos];
- typelib_TypeDescription * pParamTypeDescr = 0;
- TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
- if (!rParam.bOut && cppu_isSimpleType( pParamTypeDescr ))
- {
- uno_copyAndConvertData( pCppArgs[nPos] = pCppStack, pUnoArgs[nPos], pParamTypeDescr,
- &pThis->pBridge->aUno2Cpp );
-
- switch (pParamTypeDescr->eTypeClass)
- {
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- case typelib_TypeClass_DOUBLE:
- pCppStack += sizeof(sal_Int32); // extra long
- }
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- else // ptr to complex value | ref
- {
- if (! rParam.bIn) // is pure out
- {
- // cpp out is constructed mem, uno out is not!
- uno_constructData(
- *(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- pParamTypeDescr );
- pTempIndizes[nTempIndizes] = nPos; // default constructed for cpp call
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
- }
- // is in/inout
- else if (cppu_relatesToInterface( pParamTypeDescr ))
- {
- uno_copyAndConvertData(
- *(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- pUnoArgs[nPos], pParamTypeDescr, &pThis->pBridge->aUno2Cpp );
-
- pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
- }
- else // direct way
- {
- *(void **)pCppStack = pCppArgs[nPos] = pUnoArgs[nPos];
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- }
- pCppStack += sizeof(sal_Int32); // standard parameter length
- }
-
- try
- {
- OSL_ENSURE( !( (pCppStack - pCppStackStart ) & 3), "UNALIGNED STACK !!! (Please DO panic)" );
- callVirtualMethod(
- pThis->pCppI, nVtableCall,
- pCppReturn, pReturnTypeDescr->eTypeClass,
- (sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
- // NO exception occured...
- *ppUnoExc = 0;
-
- // reconvert temporary params
- for ( ; nTempIndizes--; )
- {
- sal_Int32 nIndex = pTempIndizes[nTempIndizes];
- typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
- if (pParams[nIndex].bIn)
- {
- if (pParams[nIndex].bOut) // inout
- {
- uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 ); // destroy uno value
- uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
- &pThis->pBridge->aCpp2Uno );
- }
- }
- else // pure out
- {
- uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
- &pThis->pBridge->aCpp2Uno );
- }
- // destroy temp cpp param => cpp: every param was constructed
- uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- // return value
- if (pCppReturn && pUnoReturn != pCppReturn)
- {
- uno_copyAndConvertData( pUnoReturn, pCppReturn, pReturnTypeDescr,
- &pThis->pBridge->aCpp2Uno );
- uno_destructData( pCppReturn, pReturnTypeDescr, cpp_release );
- }
- }
- catch (...)
- {
- // fill uno exception
- fillUnoException( __cxa_get_globals()->caughtExceptions, *ppUnoExc, &pThis->pBridge->aCpp2Uno );
-
- // temporary params
- for ( ; nTempIndizes--; )
- {
- sal_Int32 nIndex = pTempIndizes[nTempIndizes];
- // destroy temp cpp param => cpp: every param was constructed
- uno_destructData( pCppArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], cpp_release );
- TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
- }
- // return type
- if (pReturnTypeDescr)
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
- }
-}
-
-
-//==================================================================================================
-void SAL_CALL cppu_unoInterfaceProxy_dispatch(
- uno_Interface * pUnoI, const typelib_TypeDescription * pMemberDescr,
- void * pReturn, void * pArgs[], uno_Any ** ppException ) throw ()
-{
- // is my surrogate
- cppu_unoInterfaceProxy * pThis = (cppu_unoInterfaceProxy *)pUnoI;
- typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
-
- switch (pMemberDescr->eTypeClass)
- {
- case typelib_TypeClass_INTERFACE_ATTRIBUTE:
- {
- // determine vtable call index
- sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
- OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
-
- sal_Int32 nVtableCall = pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos];
- OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
-
- if (pReturn)
- {
- // dependent dispatch
- cpp_call(
- pThis, nVtableCall,
- ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef,
- 0, 0, // no params
- pReturn, pArgs, ppException );
- }
- else
- {
- // is SET
- typelib_MethodParameter aParam;
- aParam.pTypeRef =
- ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
- typelib_TypeDescriptionReference * pReturnTypeRef = 0;
- OUString aVoidName( RTL_CONSTASCII_USTRINGPARAM("void") );
- typelib_typedescriptionreference_new(
- &pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
-
- // dependent dispatch
- cpp_call(
- pThis, nVtableCall +1, // get, then set method
- pReturnTypeRef,
- 1, &aParam,
- pReturn, pArgs, ppException );
-
- typelib_typedescriptionreference_release( pReturnTypeRef );
- }
-
- break;
- }
- case typelib_TypeClass_INTERFACE_METHOD:
- {
- // determine vtable call index
- sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
- OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
-
- sal_Int32 nVtableCall = pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos];
- OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
-
- switch (nVtableCall)
- {
- // standard calls
- case 1: // acquire uno interface
- (*pUnoI->acquire)( pUnoI );
- *ppException = 0;
- break;
- case 2: // release uno interface
- (*pUnoI->release)( pUnoI );
- *ppException = 0;
- break;
- case 0: // queryInterface() opt
- {
- typelib_TypeDescription * pTD = 0;
- TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pArgs[0] )->getTypeLibType() );
- if (pTD)
- {
- uno_Interface * pInterface = 0;
- (*pThis->pBridge->pUnoEnv->getRegisteredInterface)(
- pThis->pBridge->pUnoEnv,
- (void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
- if (pInterface)
- {
- ::uno_any_construct(
- reinterpret_cast< uno_Any * >( pReturn ),
- &pInterface, pTD, 0 );
- (*pInterface->release)( pInterface );
- TYPELIB_DANGER_RELEASE( pTD );
- *ppException = 0;
- break;
- }
- TYPELIB_DANGER_RELEASE( pTD );
- }
- } // else perform queryInterface()
- default:
- // dependent dispatch
- cpp_call(
- pThis, nVtableCall,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pReturnTypeRef,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->nParams,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pParams,
- pReturn, pArgs, ppException );
- }
- break;
- }
- default:
- {
- ::com::sun::star::uno::RuntimeException aExc(
- OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
- Type const & rExcType = ::getCppuType( &aExc );
- // binary identical null reference
- ::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
- }
- }
-}
-
-}
-
diff --git a/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx
deleted file mode 100644
index da67b0d700bc..000000000000
--- a/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx
+++ /dev/null
@@ -1,525 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include <sal/alloca.h>
-#include <stdio.h>
-
-#include <com/sun/star/uno/genfunc.hxx>
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include <uno/data.h>
-#include <typelib/typedescription.hxx>
-
-#include "bridges/cpp_uno/shared/bridge.hxx"
-#include "bridges/cpp_uno/shared/cppinterfaceproxy.hxx"
-#include "bridges/cpp_uno/shared/types.hxx"
-#include "bridges/cpp_uno/shared/vtablefactory.hxx"
-
-#include "share.hxx"
-
-using namespace ::com::sun::star::uno;
-
-namespace
-{
-
-//==================================================================================================
-static typelib_TypeClass cpp2uno_call(
- bridges::cpp_uno::shared::CppInterfaceProxy * pThis,
- const typelib_TypeDescription * pMemberTypeDescr,
- typelib_TypeDescriptionReference * pReturnTypeRef, // 0 indicates void return
- sal_Int32 nParams, typelib_MethodParameter * pParams,
- void ** pCallStack,
- sal_Int64 * pRegisterReturn /* space for register return */ )
-{
- // pCallStack: ret, [return ptr], this, params
- char * pCppStack = (char *)(pCallStack +1);
-
- // return
- typelib_TypeDescription * pReturnTypeDescr = 0;
- if (pReturnTypeRef)
- TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
- void * pUnoReturn = 0;
- void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
-
- if (pReturnTypeDescr)
- {
- if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
- {
- pUnoReturn = pRegisterReturn; // direct way for simple types
- }
- else // complex return via ptr (pCppReturn)
- {
- pCppReturn = *(void **)pCppStack;
- pCppStack += sizeof(void *);
-
- pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType(
- pReturnTypeDescr )
- ? alloca( pReturnTypeDescr->nSize )
- : pCppReturn); // direct way
- }
- }
- // pop this
- pCppStack += sizeof( void* );
-
- // stack space
- OSL_ENSURE( sizeof(void *) == sizeof(sal_Int32), "### unexpected size!" );
- // parameters
- void ** pUnoArgs = (void **)alloca( 4 * sizeof(void *) * nParams );
- void ** pCppArgs = pUnoArgs + nParams;
- // indizes of values this have to be converted (interface conversion cpp<=>uno)
- sal_Int32 * pTempIndizes = (sal_Int32 *)(pUnoArgs + (2 * nParams));
- // type descriptions for reconversions
- typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pUnoArgs + (3 * nParams));
-
- sal_Int32 nTempIndizes = 0;
-
- for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
- {
- const typelib_MethodParameter & rParam = pParams[nPos];
- typelib_TypeDescription * pParamTypeDescr = 0;
- TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
- if (!rParam.bOut
- && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
- // value
- {
- pCppArgs[nPos] = pCppStack;
- pUnoArgs[nPos] = pCppStack;
- switch (pParamTypeDescr->eTypeClass)
- {
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- case typelib_TypeClass_DOUBLE:
- pCppStack += sizeof(sal_Int32); // extra long
- }
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- else // ptr to complex value | ref
- {
- pCppArgs[nPos] = *(void **)pCppStack;
-
- if (! rParam.bIn) // is pure out
- {
- // uno out is unconstructed mem!
- pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize );
- pTempIndizes[nTempIndizes] = nPos;
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
- }
- // is in/inout
- else if (bridges::cpp_uno::shared::relatesToInterfaceType(
- pParamTypeDescr ))
- {
- uno_copyAndConvertData( pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- *(void **)pCppStack, pParamTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
- }
- else // direct way
- {
- pUnoArgs[nPos] = *(void **)pCppStack;
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- }
- pCppStack += sizeof(sal_Int32); // standard parameter length
- }
-
- // ExceptionHolder
- uno_Any aUnoExc = {0}; // Any will be constructed by callee
- uno_Any * pUnoExc = &aUnoExc;
-
- // invoke uno dispatch call
- (*pThis->getUnoI()->pDispatcher)(
- pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
-#if OSL_DEBUG_LEVEL > 1
- if (pUnoExc != NULL)
- fprintf( stderr, ">cpp2uno_call pUnoExc %x\n", pUnoExc);
-#endif
-
- // in case an exception occured...
- if (pUnoExc)
- {
- // destruct temporary in/inout params
- for ( ; nTempIndizes--; )
- {
- sal_Int32 nIndex = pTempIndizes[nTempIndizes];
-
- if (pParams[nIndex].bIn) // is in/inout => was constructed
- uno_destructData( pUnoArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], 0 );
- TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
- }
- if (pReturnTypeDescr)
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
-
- CPPU_CURRENT_NAMESPACE::raiseException(
- &aUnoExc, pThis->getBridge()->getUno2Cpp() );
- // has to destruct the any
- // is here for dummy
- return typelib_TypeClass_VOID;
- }
- else // else no exception occured...
- {
- // temporary params
- for ( ; nTempIndizes--; )
- {
- sal_Int32 nIndex = pTempIndizes[nTempIndizes];
- typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
- if (pParams[nIndex].bOut) // inout/out
- {
- // convert and assign
- uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
- uno_copyAndConvertData( pCppArgs[nIndex], pUnoArgs[nIndex], pParamTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
- }
- // destroy temp uno param
- uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- // return
- if (pCppReturn) // has complex return
- {
- if (pUnoReturn != pCppReturn) // needs reconversion
- {
- uno_copyAndConvertData( pCppReturn, pUnoReturn, pReturnTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
- // destroy temp uno return
- uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
- }
- // complex return ptr is set to eax
- *(void **)pRegisterReturn = pCppReturn;
- }
- if (pReturnTypeDescr)
- {
- typelib_TypeClass eRet = (typelib_TypeClass)pReturnTypeDescr->eTypeClass;
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
- return eRet;
- }
- else
- return typelib_TypeClass_VOID;
- }
-}
-
-
-//==================================================================================================
-static typelib_TypeClass cpp_mediate(
- sal_Int32 nFunctionIndex,
- sal_Int32 nVtableOffset,
- void ** pCallStack,
- sal_Int64 * pRegisterReturn /* space for register return */ )
-{
- OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
-
- // pCallStack: ret adr, [ret *], this, params
- void * pThis;
- if( nFunctionIndex & 0x80000000 )
- {
- nFunctionIndex &= 0x7fffffff;
- pThis = pCallStack[2];
- }
- else
- {
- pThis = pCallStack[1];
- }
- pThis = static_cast< char * >(pThis) - nVtableOffset;
- bridges::cpp_uno::shared::CppInterfaceProxy * pCppI
- = bridges::cpp_uno::shared::CppInterfaceProxy::castInterfaceToProxy(
- pThis);
-
- typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
-
- OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
- if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
- {
- throw RuntimeException(
- rtl::OUString::createFromAscii("illegal vtable index!"),
- (XInterface *)pThis );
- }
-
- // determine called method
- sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
- OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member index!" );
-
- TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
-
- typelib_TypeClass eRet;
- switch (aMemberDescr.get()->eTypeClass)
- {
- case typelib_TypeClass_INTERFACE_ATTRIBUTE:
- {
- if (pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos] == nFunctionIndex)
- {
- // is GET method
- eRet = cpp2uno_call(
- pCppI, aMemberDescr.get(),
- ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef,
- 0, 0, // no params
- pCallStack, pRegisterReturn );
- }
- else
- {
- // is SET method
- typelib_MethodParameter aParam;
- aParam.pTypeRef =
- ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
- eRet = cpp2uno_call(
- pCppI, aMemberDescr.get(),
- 0, // indicates void return
- 1, &aParam,
- pCallStack, pRegisterReturn );
- }
- break;
- }
- case typelib_TypeClass_INTERFACE_METHOD:
- {
- // is METHOD
- switch (nFunctionIndex)
- {
- case 1: // acquire()
- pCppI->acquireProxy(); // non virtual call!
- eRet = typelib_TypeClass_VOID;
- break;
- case 2: // release()
- pCppI->releaseProxy(); // non virtual call!
- eRet = typelib_TypeClass_VOID;
- break;
- case 0: // queryInterface() opt
- {
- typelib_TypeDescription * pTD = 0;
- TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pCallStack[3] )->getTypeLibType() );
- if (pTD)
- {
- XInterface * pInterface = 0;
- (*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
- pCppI->getBridge()->getCppEnv(),
- (void **)&pInterface, pCppI->getOid().pData,
- (typelib_InterfaceTypeDescription *)pTD );
-
- if (pInterface)
- {
- ::uno_any_construct(
- reinterpret_cast< uno_Any * >( pCallStack[1] ),
- &pInterface, pTD, cpp_acquire );
- pInterface->release();
- TYPELIB_DANGER_RELEASE( pTD );
- *(void **)pRegisterReturn = pCallStack[1];
- eRet = typelib_TypeClass_ANY;
- break;
- }
- TYPELIB_DANGER_RELEASE( pTD );
- }
- } // else perform queryInterface()
- default:
- eRet = cpp2uno_call(
- pCppI, aMemberDescr.get(),
- ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pReturnTypeRef,
- ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->nParams,
- ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pParams,
- pCallStack, pRegisterReturn );
- }
- break;
- }
- default:
- {
- throw RuntimeException(
- rtl::OUString::createFromAscii("no member description found!"),
- (XInterface *)pThis );
- // is here for dummy
- eRet = typelib_TypeClass_VOID;
- }
- }
-
- return eRet;
-}
-
-//==================================================================================================
-/**
- * is called on incoming vtable calls
- * (called by asm snippets)
- */
-static void cpp_vtable_call(
- int nFunctionIndex, int nVtableOffset, void** pCallStack )
- __attribute__((regparm(3)));
-
-void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** pCallStack )
-{
- volatile long nRegReturn[2];
- typelib_TypeClass aType = cpp_mediate(
- nFunctionIndex, nVtableOffset, pCallStack, (sal_Int64*)nRegReturn );
-
- switch( aType )
- {
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- __asm__( "movl %1, %%edx\n\t"
- "movl %0, %%eax\n"
- : : "m"(nRegReturn[0]), "m"(nRegReturn[1]) );
- break;
- case typelib_TypeClass_FLOAT:
- __asm__( "flds %0\n\t"
- "fstp %%st(0)\n\t"
- "flds %0\n"
- : : "m"(*(float *)nRegReturn) );
- break;
- case typelib_TypeClass_DOUBLE:
- __asm__( "fldl %0\n\t"
- "fstp %%st(0)\n\t"
- "fldl %0\n"
- : : "m"(*(double *)nRegReturn) );
- break;
-// case typelib_TypeClass_UNSIGNED_SHORT:
-// case typelib_TypeClass_SHORT:
-// __asm__( "movswl %0, %%eax\n"
-// : : "m"(nRegReturn) );
-// break;
- default:
- __asm__( "movl %0, %%eax\n"
- : : "m"(nRegReturn[0]) );
- break;
- }
-}
-
-
-//==================================================================================================
-int const codeSnippetSize = 20;
-
-unsigned char * codeSnippet(
- unsigned char * code, sal_Int32 functionIndex, sal_Int32 vtableOffset,
- bool simpleRetType)
-{
- if (!simpleRetType) {
- functionIndex |= 0x80000000;
- }
- unsigned char * p = code;
- OSL_ASSERT(sizeof (sal_Int32) == 4);
- // mov function_index, %eax:
- *p++ = 0xB8;
- *reinterpret_cast< sal_Int32 * >(p) = functionIndex;
- p += sizeof (sal_Int32);
- // mov vtable_offset, %edx:
- *p++ = 0xBA;
- *reinterpret_cast< sal_Int32 * >(p) = vtableOffset;
- p += sizeof (sal_Int32);
- // mov %esp, %ecx:
- *p++ = 0x89;
- *p++ = 0xE1;
- // jmp cpp_vtable_call:
- *p++ = 0xE9;
- *reinterpret_cast< sal_Int32 * >(p)
- = ((unsigned char *) cpp_vtable_call) - p - sizeof (sal_Int32);
- p += sizeof (sal_Int32);
- OSL_ASSERT(p - code <= codeSnippetSize);
- return code + codeSnippetSize;
-}
-
-}
-
-struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
-
-bridges::cpp_uno::shared::VtableFactory::Slot *
-bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
-{
- return static_cast< Slot * >(block) + 2;
-}
-
-sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
- sal_Int32 slotCount)
-{
- return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
-}
-
-bridges::cpp_uno::shared::VtableFactory::Slot *
-bridges::cpp_uno::shared::VtableFactory::initializeBlock(
- void * block, sal_Int32 slotCount)
-{
- Slot * slots = mapBlockToVtable(block);
- slots[-2].fn = 0;
- slots[-1].fn = 0;
- return slots + slotCount;
-}
-
-unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
- Slot ** slots, unsigned char * code,
- typelib_InterfaceTypeDescription const * type, sal_Int32 functionOffset,
- sal_Int32 functionCount, sal_Int32 vtableOffset)
-{
- (*slots) -= functionCount;
- Slot * s = *slots;
- for (sal_Int32 i = 0; i < type->nMembers; ++i) {
- typelib_TypeDescription * member = 0;
- TYPELIB_DANGER_GET(&member, type->ppMembers[i]);
- OSL_ASSERT(member != 0);
- switch (member->eTypeClass) {
- case typelib_TypeClass_INTERFACE_ATTRIBUTE:
- // Getter:
- (s++)->fn = code;
- code = codeSnippet(
- code, functionOffset++, vtableOffset,
- bridges::cpp_uno::shared::isSimpleType(
- reinterpret_cast<
- typelib_InterfaceAttributeTypeDescription * >(
- member)->pAttributeTypeRef));
- // Setter:
- if (!reinterpret_cast<
- typelib_InterfaceAttributeTypeDescription * >(
- member)->bReadOnly)
- {
- (s++)->fn = code;
- code = codeSnippet(code, functionOffset++, vtableOffset, true);
- }
- break;
-
- case typelib_TypeClass_INTERFACE_METHOD:
- (s++)->fn = code;
- code = codeSnippet(
- code, functionOffset++, vtableOffset,
- bridges::cpp_uno::shared::isSimpleType(
- reinterpret_cast<
- typelib_InterfaceMethodTypeDescription * >(
- member)->pReturnTypeRef));
- break;
-
- default:
- OSL_ASSERT(false);
- break;
- }
- TYPELIB_DANGER_RELEASE(member);
- }
- return code;
-}
-
-void bridges::cpp_uno::shared::VtableFactory::flushCode(
- unsigned char const *, unsigned char const *)
-{}
diff --git a/bridges/source/cpp_uno/gcc3_os2_intel/defs/gcc3_uno.def b/bridges/source/cpp_uno/gcc3_os2_intel/defs/gcc3_uno.def
deleted file mode 100644
index d6b247ec996b..000000000000
--- a/bridges/source/cpp_uno/gcc3_os2_intel/defs/gcc3_uno.def
+++ /dev/null
@@ -1,915 +0,0 @@
-LIBRARY gcc3_uno INITINSTANCE TERMINSTANCE
-DATA MULTIPLE
-DESCRIPTION 'StarView 3.00 680 '
-EXPORTS
-_GetVersionInfo
-_component_canUnload
-_uno_initEnvironment
-_uno_ext_getMapping
-
-;lmax=20
-;smax=_component_canUnload
-
-;__ZTIN4test19TestBridgeExceptionE
-
-__ZTIN10comphelper18OPropertyContainerE
-__ZTIN10comphelper24OPropertyContainerHelperE
-__ZTIN10comphelper25OPropertyArrayUsageHelperIN9configmgr22OConfigurationProviderEEE
-__ZTIN3com3sun4star13configuration17XTemplateInstanceE
-__ZTIN3com3sun4star13configuration18XTemplateContainerE
-__ZTIN3com3sun4star13configuration29InvalidBootstrapFileExceptionE
-__ZTIN3com3sun4star13configuration29MissingBootstrapFileExceptionE
-__ZTIN3com3sun4star13configuration31InstallationIncompleteExceptionE
-__ZTIN3com3sun4star13configuration32CannotLoadConfigurationExceptionE
-__ZTIN3com3sun4star13configuration7backend13XLayerHandlerE
-__ZTIN3com3sun4star13configuration7backend14XSchemaHandlerE
-__ZTIN3com3sun4star13configuration7backend14XUpdateHandlerE
-__ZTIN3com3sun4star13configuration7backend15XCompositeLayerE
-__ZTIN3com3sun4star13configuration7backend15XSchemaSupplierE
-__ZTIN3com3sun4star13configuration7backend15XUpdatableLayerE
-__ZTIN3com3sun4star13configuration7backend16XBackendEntitiesE
-__ZTIN3com3sun4star13configuration7backend18XMultiLayerStratumE
-__ZTIN3com3sun4star13configuration7backend21BackendSetupExceptionE
-__ZTIN3com3sun4star13configuration7backend22BackendAccessExceptionE
-__ZTIN3com3sun4star13configuration7backend22CannotConnectExceptionE
-__ZTIN3com3sun4star13configuration7backend22MalformedDataExceptionE
-__ZTIN3com3sun4star13configuration7backend23ConnectionLostExceptionE
-__ZTIN3com3sun4star13configuration7backend23XBackendChangesListenerE
-__ZTIN3com3sun4star13configuration7backend23XBackendChangesNotifierE
-__ZTIN3com3sun4star13configuration7backend24StratumCreationExceptionE
-__ZTIN3com3sun4star13configuration7backend24XVersionedSchemaSupplierE
-__ZTIN3com3sun4star13configuration7backend29AuthenticationFailedExceptionE
-__ZTIN3com3sun4star13configuration7backend33InsufficientAccessRightsExceptionE
-__ZTIN3com3sun4star13configuration7backend39InvalidAuthenticationMechanismExceptionE
-__ZTIN3com3sun4star13configuration7backend6XLayerE
-__ZTIN3com3sun4star13configuration7backend7XSchemaE
-__ZTIN3com3sun4star13configuration7backend8XBackendE
-__ZTIN3com3sun4star2io11IOExceptionE
-__ZTIN3com3sun4star2io12XInputStreamE
-__ZTIN3com3sun4star2io13XOutputStreamE
-__ZTIN3com3sun4star2io15XActiveDataSinkE
-__ZTIN3com3sun4star2io16XDataInputStreamE
-__ZTIN3com3sun4star2io17XActiveDataSourceE
-__ZTIN3com3sun4star2io20WrongFormatExceptionE
-__ZTIN3com3sun4star2io21NotConnectedExceptionE
-__ZTIN3com3sun4star2io22UnexpectedEOFExceptionE
-__ZTIN3com3sun4star2io27BufferSizeExceededExceptionE
-__ZTIN3com3sun4star3uno10XInterfaceE
-__ZTIN3com3sun4star3uno15XCurrentContextE
-__ZTIN3com3sun4star3uno16RuntimeExceptionE
-__ZTIN3com3sun4star3uno17XComponentContextE
-__ZTIN3com3sun4star3uno5XWeakE
-__ZTIN3com3sun4star3uno9ExceptionE
-__ZTIN3com3sun4star3xml3sax12SAXExceptionE
-__ZTIN3com3sun4star3xml3sax14XAttributeListE
-__ZTIN3com3sun4star3xml3sax16XDocumentHandlerE
-;__ZTIN3com3sun4star4l
-__ZTIN3com3sun4star4lang10XComponentE
-__ZTIN3com3sun4star4lang10XUnoTunnelE
-__ZTIN3com3sun4star4lang12XLocalizableE
-__ZTIN3com3sun4star4lang12XServiceInfoE
-__ZTIN3com3sun4star4lang13XTypeProviderE
-__ZTIN3com3sun4star4lang14XEventListenerE
-__ZTIN3com3sun4star4lang15XInitializationE
-__ZTIN3com3sun4star4lang17DisposedExceptionE
-__ZTIN3com3sun4star4lang18NoSupportExceptionE
-__ZTIN3com3sun4star4lang20NullPointerExceptionE
-__ZTIN3com3sun4star4lang20XMultiServiceFactoryE
-__ZTIN3com3sun4star4lang21XSingleServiceFactoryE
-__ZTIN3com3sun4star4lang22IllegalAccessExceptionE
-__ZTIN3com3sun4star4lang22WrappedTargetExceptionE
-__ZTIN3com3sun4star4lang23XSingleComponentFactoryE
-__ZTIN3com3sun4star4lang24IllegalArgumentExceptionE
-__ZTIN3com3sun4star4lang29ServiceNotRegisteredExceptionE
-__ZTIN3com3sun4star4lang29WrappedTargetRuntimeExceptionE
-__ZTIN3com3sun4star4task17XInteractionAbortE
-__ZTIN3com3sun4star4task17XInteractionRetryE
-__ZTIN3com3sun4star4task19XInteractionApproveE
-__ZTIN3com3sun4star4task19XInteractionRequestE
-__ZTIN3com3sun4star4task22XInteractionDisapproveE
-__ZTIN3com3sun4star4task24XInteractionContinuationE
-__ZTIN3com3sun4star4util10XFlushableE
-__ZTIN3com3sun4star4util12XRefreshableE
-__ZTIN3com3sun4star4util12XTimeStampedE
-__ZTIN3com3sun4star4util13XChangesBatchE
-__ZTIN3com3sun4star4util13XStringEscapeE
-__ZTIN3com3sun4star4util16XChangesNotifierE
-__ZTIN3com3sun4star5beans10XExactNameE
-__ZTIN3com3sun4star5beans12XPropertySetE
-__ZTIN3com3sun4star5beans14XPropertyStateE
-__ZTIN3com3sun4star5beans16XFastPropertySetE
-__ZTIN3com3sun4star5beans16XPropertySetInfoE
-__ZTIN3com3sun4star5beans17XMultiPropertySetE
-__ZTIN3com3sun4star5beans18XPropertyWithStateE
-__ZTIN3com3sun4star5beans20XMultiPropertyStatesE
-__ZTIN3com3sun4star5beans21PropertyVetoExceptionE
-__ZTIN3com3sun4star5beans24UnknownPropertyExceptionE
-__ZTIN3com3sun4star5beans24XHierarchicalPropertySetE
-__ZTIN3com3sun4star5beans29XMultiHierarchicalPropertySetE
-__ZTIN3com3sun4star5beans9XPropertyE
-__ZTIN3com3sun4star6script22CannotConvertExceptionE
-__ZTIN3com3sun4star8registry12XRegistryKeyE
-__ZTIN3com3sun4star8registry15XSimpleRegistryE
-__ZTIN3com3sun4star8registry21InvalidValueExceptionE
-__ZTIN3com3sun4star8registry22MergeConflictExceptionE
-__ZTIN3com3sun4star8registry24InvalidRegistryExceptionE
-__ZTIN3com3sun4star9container10XContainerE
-__ZTIN3com3sun4star9container11XNameAccessE
-__ZTIN3com3sun4star9container12XNameReplaceE
-__ZTIN3com3sun4star9container14XElementAccessE
-__ZTIN3com3sun4star9container14XNameContainerE
-__ZTIN3com3sun4star9container17XHierarchicalNameE
-__ZTIN3com3sun4star9container21ElementExistExceptionE
-__ZTIN3com3sun4star9container22NoSuchElementExceptionE
-__ZTIN3com3sun4star9container23XHierarchicalNameAccessE
-__ZTIN3com3sun4star9container6XChildE
-__ZTIN3com3sun4star9container6XNamedE
-__ZTIN3vos10IReferenceE
-__ZTIN3vos10OReferenceE
-__ZTIN3vos6OTimerE
-__ZTIN3vos7OObjectE
-__ZTIN3vos7OThreadE
-__ZTIN3vos9IRunnableE
-__ZTIN4cppu11ImplHelper2IN3com3sun4star8registry15XSimpleRegistryENS3_4util10XFlushableEEE
-__ZTIN4cppu11ImplHelper4IN3com3sun4star4lang20XMultiServiceFactoryENS4_12XLocalizableENS3_4util12XRefreshableENS7_10XFlushableEEE
-__ZTIN4cppu11ImplHelper6IN3com3sun4star5beans12XPropertySetENS4_17XMultiPropertySetENS4_24XHierarchicalPropertySetENS4_29XMultiHierarchicalPropertySetENS4_14XPropertyStateENS4_20XMultiPropertyStatesEEE
-__ZTIN4cppu11ImplHelper6IN3com3sun4star9container11XNameAccessENS4_17XHierarchicalNameENS4_23XHierarchicalNameAccessENS4_10XContainerENS3_5beans10XExactNameENS9_9XPropertyEEE
-__ZTIN4cppu11ImplHelper9IN3com3sun4star9container11XNameAccessENS4_17XHierarchicalNameENS4_23XHierarchicalNameAccessENS4_10XContainerENS3_5beans10XExactNameENS9_9XPropertyENS9_16XPropertySetInfoENS3_13configuration18XTemplateCo!_yPkJc2
-__ZTIN4cppu11OWeakObjectE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star13configuration7backend13XLayerHandlerEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star13configuration7backend14XSchemaHandlerEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star13configuration7backend15XCompositeLayerEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star13configuration7backend23XBackendChangesListenerEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star2io13XOutputStreamEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star2io16XDataInputStreamEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star3uno15XCurrentContextEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star3xml3sax14XAttributeListEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star3xml3sax16XDocumentHandlerEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4lang14XEventListenerEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4lang23XSingleComponentFactoryEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4task17XInteractionAbortEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4task17XInteractionRetryEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4task19XInteractionApproveEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4task19XInteractionRequestEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4task22XInteractionDisapproveEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star5beans16XPropertySetInfoEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star8registry12XRegistryKeyEEE
-__ZTIN4cppu15WeakImplHelper2IN3com3sun4star13configuration7backend13XLayerHandlerENS5_6XLayerEEE
-__ZTIN4cppu15WeakImplHelper2IN3com3sun4star3uno15XCurrentContextENS3_4lang10XUnoTunnelEEE
-__ZTIN4cppu15WeakImplHelper3IN3com3sun4star4lang15XInitializationENS4_12XServiceInfoENS3_13configuration7backend14XUpdateHandlerEEE
-__ZTIN4cppu15WeakImplHelper3IN3com3sun4star9container6XChildENS4_6XNamedENS3_4lang12XServiceInfoEEE
-__ZTIN4cppu15WeakImplHelper4IN3com3sun4star4lang15XInitializationENS4_12XServiceInfoENS3_2io15XActiveDataSinkENS3_13configuration7backend6XLayerEEE
-__ZTIN4cppu15WeakImplHelper4IN3com3sun4star4lang15XInitializationENS4_12XServiceInfoENS3_2io15XActiveDataSinkENS3_13configuration7backend7XSchemaEEE
-__ZTIN4cppu15WeakImplHelper4IN3com3sun4star4lang15XInitializationENS4_12XServiceInfoENS3_2io17XActiveDataSourceENS3_13configuration7backend13XLayerHandlerEEE
-__ZTIN4cppu15WeakImplHelper5IN3com3sun4star9container6XNamedENS3_4util16XChangesNotifierENS3_4lang10XComponentENS8_12XServiceInfoENS8_12XLocalizableEEE
-__ZTIN4cppu15WeakImplHelper6IN3com3sun4star9container6XChildENS4_6XNamedENS3_4lang10XComponentENS7_12XServiceInfoENS3_13configuration17XTemplateInstanceENS7_10XUnoTunnelEEE
-__ZTIN4cppu15WeakImplHelper6IN3com3sun4star9container6XNamedENS3_4util16XChangesNotifierENS3_4lang10XComponentENS8_12XServiceInfoENS8_12XLocalizableENS6_13XChangesBatchEEE
-__ZTIN4cppu18OPropertySetHelperE
-__ZTIN4cppu22ImplInheritanceHelper1IN9configmgr7localbe16LocalStratumBaseEN3com3sun4star13configuration7backend18XMultiLayerStratumEEE
-__ZTIN4cppu22ImplInheritanceHelper2IN9configmgr7localbe19LayerPropertyHelperEN3com3sun4star13configuration7backend15XUpdatableLayerENS6_4util12XTimeStampedEEE
-__ZTIN4cppu22ImplInheritanceHelper2IN9configmgr7localbe19LayerPropertyHelperEN3com3sun4star13configuration7backend6XLayerENS6_4util12XTimeStampedEEE
-__ZTIN4cppu22ImplInheritanceHelper3IN9configmgr7localbe19LayerPropertyHelperEN3com3sun4star13configuration7backend15XUpdatableLayerENS8_15XCompositeLayerENS6_4util12XTimeStampedEEE
-__ZTIN4cppu24WeakComponentImplHelper1IN3com3sun4star4lang12XServiceInfoEEE
-__ZTIN4cppu24WeakComponentImplHelper2IN3com3sun4star4lang20XMultiServiceFactoryENS4_12XServiceInfoEEE
-__ZTIN4cppu24WeakComponentImplHelper3IN3com3sun4star13configuration7backend24XVersionedSchemaSupplierENS3_4lang15XInitializationENS7_12XServiceInfoEEE
-__ZTIN4cppu24WeakComponentImplHelper3IN3com3sun4star3uno17XComponentContextENS4_15XCurrentContextENS3_4lang12XServiceInfoEEE
-__ZTIN4cppu24WeakComponentImplHelper3IN3com3sun4star4lang15XInitializationENS3_13configuration7backend16XBackendEntitiesENS4_12XServiceInfoEEE
-__ZTIN4cppu24WeakComponentImplHelper5IN3com3sun4star13configuration7backend15XSchemaSupplierENS5_18XMultiLayerStratumENS5_16XBackendEntitiesENS3_4lang15XInitializationENS9_12XServiceInfoEEE
-__ZTIN4cppu24WeakComponentImplHelper5IN3com3sun4star13configuration7backend8XBackendENS5_16XBackendEntitiesENS5_15XSchemaSupplierENS3_4lang15XInitializationENS9_12XServiceInfoEEE
-__ZTIN4cppu24WeakComponentImplHelper7IN3com3sun4star13configuration7backend8XBackendENS5_16XBackendEntitiesENS5_24XVersionedSchemaSupplierENS5_23XBackendChangesNotifierENS5_23XBackendChangesListenerENS3_4lang15XInitializationEN!_7c1rO0
-__ZTIN4cppu27WeakComponentImplHelperBaseE
-__ZTIN9configmgr10BasicGroupE
-__ZTIN9configmgr10IInterfaceE
-__ZTIN9configmgr10NodeActionE
-__ZTIN9configmgr10RefcountedE
-__ZTIN9configmgr10RemoveNodeE
-__ZTIN9configmgr10SearchNodeE
-__ZTIN9configmgr11NoncopyableE
-__ZTIN9configmgr11TreeManagerE
-__ZTIN9configmgr11TreeUpdaterE
-__ZTIN9configmgr11ValueChangeE
-__ZTIN9configmgr12CollectNamesE
-__ZTIN9configmgr12ITreeManagerE
-__ZTIN9configmgr12ONameCreatorE
-__ZTIN9configmgr12OPathCreatorINS_13configuration12AbsolutePathEEE
-__ZTIN9configmgr12OPathCreatorINS_13configuration12RelativePathEEE
-__ZTIN9configmgr13BasicValueSetE
-__ZTIN9configmgr13configuration100_GLOBAL__N__ZN9configmgr13configuration12TemplateName18makeSimpleTypeNameERKN3com3sun4star3uno4TypeE12TypeDetectorE
-__ZTIN9configmgr13configuration11InvalidNameE
-__ZTIN9configmgr13configuration11NodeVisitorE
-__ZTIN9configmgr13configuration11SetNodeImplE
-__ZTIN9configmgr13configuration12TypeMismatchE
-__ZTIN9configmgr13configuration13GroupNodeImplE
-__ZTIN9configmgr13configuration14SetNodeVisitorE
-__ZTIN9configmgr13configuration15ValueMemberNode12DeferredImplE
-__ZTIN9configmgr13configuration18GroupMemberVisitorE
-__ZTIN9configmgr13configuration19ConstraintViolationE
-__ZTIN9configmgr13configuration19DeferredSetNodeImplE
-__ZTIN9configmgr13configuration19WrappedUnoExceptionE
-__ZTIN9configmgr13configuration21DeferredGroupNodeImplE
-__ZTIN9configmgr13configuration21TemplateProvider_ImplE
-__ZTIN9configmgr13configuration28SpecialTemplateProvider_ImplE
-__ZTIN9configmgr13configuration55_GLOBAL__N__ZNK9configmgr13configuration4Tree7getViewEv15CollectValueIDsE
-__ZTIN9configmgr13configuration55_GLOBAL__N__ZNK9configmgr13configuration4Tree7getViewEv17SetVisitorAdapterE
-__ZTIN9configmgr13configuration55_GLOBAL__N__ZNK9configmgr13configuration4Tree7getViewEv19GroupVisitorAdapterE
-__ZTIN9configmgr13configuration55_GLOBAL__N__ZNK9configmgr13configuration4Tree7getViewEv21FindNonDefaultElementE
-__ZTIN9configmgr13configuration88_GLOBAL__N__ZN9configmgr13configuration17GroupUpdateHelperC2ERKNS0_4TreeERKNS0_7NodeRefE13NodeDefaulterE
-__ZTIN9configmgr13configuration8NodeImplE
-__ZTIN9configmgr13configuration8TemplateE
-__ZTIN9configmgr13configuration9ExceptionE
-__ZTIN9configmgr13INodeListenerE
-__ZTIN9configmgr13OInnerSetInfoE
-__ZTIN9configmgr13OMergeChangesE
-__ZTIN9configmgr13OProviderImplE
-__ZTIN9configmgr13PWMutexHolderE
-__ZTIN9configmgr13SubtreeChangeE
-__ZTIN9configmgr14BasicSetAccessE
-__ZTIN9configmgr14OStripDefaultsE
-__ZTIN9configmgr15BasicSetElementE
-__ZTIN9configmgr15IConfigListenerE
-__ZTIN9configmgr15OInnerGroupInfoE
-__ZTIN9configmgr15ProviderFactoryE
-__ZTIN9configmgr15ProviderWrapperE
-__ZTIN9configmgr16BasicGroupAccessE
-__ZTIN9configmgr16BasicPropertySetE
-__ZTIN9configmgr16BasicRootElementE
-__ZTIN9configmgr16BootstrapContextE
-__ZTIN9configmgr16ChangeTreeActionE
-__ZTIN9configmgr16ComponentContextE
-__ZTIN9configmgr16IDefaultProviderE
-__ZTIN9configmgr16ITemplateManagerE
-__ZTIN9configmgr16NodeModificationE
-__ZTIN9configmgr16OMergeRemoveNodeE
-__ZTIN9configmgr16OPropagateLevelsE
-__ZTIN9configmgr16UnoContextTunnel6TunnelE
-__ZTIN9configmgr17AttributeListImplE
-__ZTIN9configmgr17BasicInnerElementE
-__ZTIN9configmgr17CacheClientAccessE
-__ZTIN9configmgr17ExtendedCacheDataE
-__ZTIN9configmgr17OInnerGroupUpdateE
-__ZTIN9configmgr17OMergeValueChangeE
-__ZTIN9configmgr17TemplateCacheDataE
-__ZTIN9configmgr18BasicUpdateElementE
-__ZTIN9configmgr18CacheLoadingAccessE
-__ZTIN9configmgr18DisposingForwarderE
-__ZTIN9configmgr18IConfigBroadcasterE
-__ZTIN9configmgr18IConfigTreeManagerE
-__ZTIN9configmgr18OSetElementSetInfoE
-__ZTIN9configmgr19OInnerTreeSetUpdateE
-__ZTIN9configmgr19ORootElementSetInfoE
-__ZTIN9configmgr20OCacheWriteScheduler5TimerE
-__ZTIN9configmgr20OInnerValueSetUpdateE
-__ZTIN9configmgr20OMergeTreeChangeListE
-__ZTIN9configmgr20OSetElementGroupInfoE
-__ZTIN9configmgr20ServiceComponentImplE
-__ZTIN9configmgr21ORootElementGroupInfoE
-__ZTIN9configmgr21OTreeDisposeScheduler5TimerE
-__ZTIN9configmgr21SubtreeChangeReferrerE
-__ZTIN9configmgr22ChangeTreeModificationE
-__ZTIN9configmgr22IConfigDefaultProviderE
-__ZTIN9configmgr22IConfigTemplateManagerE
-__ZTIN9configmgr22OConfigurationProviderE
-__ZTIN9configmgr22OConfigurationRegistryE
-__ZTIN9configmgr22OSetElementGroupUpdateE
-__ZTIN9configmgr23ConfigChangeBroadcasterE
-__ZTIN9configmgr23IDefaultableTreeManagerE
-__ZTIN9configmgr23ORootElementGroupUpdateE
-__ZTIN9configmgr24OSetElementTreeSetUpdateE
-__ZTIN9configmgr25OConfigurationRegistryKeyE
-__ZTIN9configmgr25ORootElementTreeSetUpdateE
-__ZTIN9configmgr25OSetElementValueSetUpdateE
-__ZTIN9configmgr26OProviderDisposingListenerE
-__ZTIN9configmgr26ORootElementValueSetUpdateE
-__ZTIN9configmgr3xml11BasicParserE
-__ZTIN9configmgr3xml11LayerWriterE
-__ZTIN9configmgr3xml13ElementParser12BadValueTypeE
-__ZTIN9configmgr3xml13ParserServiceIN3com3sun4star13configuration7backend6XLayerEEE
-__ZTIN9configmgr3xml13ParserServiceIN3com3sun4star13configuration7backend7XSchemaEEE
-__ZTIN9configmgr3xml13WriterServiceIN3com3sun4star13configuration7backend13XLayerHandlerEEE
-__ZTIN9configmgr3xml18LayerParserServiceE
-__ZTIN9configmgr3xml19SchemaParserServiceE
-__ZTIN9configmgr4data10SetVisitorE
-__ZTIN9configmgr4data11NodeVisitorE
-__ZTIN9configmgr4data11TreeSegment4ImplE
-__ZTIN9configmgr4data15TreeNodeBuilder12LinkSetNodesE
-__ZTIN9configmgr4data20BasicDataTreeBuilderE
-__ZTIN9configmgr4data21ConvertingNodeBuilderE
-__ZTIN9configmgr4data21DataTreeDefaultMergerE
-__ZTIN9configmgr4data22CopyingDataTreeBuilder18ElementListBuilderE
-__ZTIN9configmgr4data22CopyingDataTreeBuilderE
-__ZTIN9configmgr4data24ConvertingSubnodeBuilderE
-__ZTIN9configmgr4data25ConvertingDataTreeBuilder18ElementListBuilderE
-__ZTIN9configmgr4data25ConvertingDataTreeBuilderE
-__ZTIN9configmgr4view12ViewStrategyE
-__ZTIN9configmgr4view18DirectViewStrategyE
-__ZTIN9configmgr4view20ReadOnlyViewStrategyE
-__ZTIN9configmgr5INodeE
-__ZTIN9configmgr6ChangeE
-__ZTIN9configmgr6memory11HeapManagerE
-__ZTIN9configmgr6memory14SimpleHeapLockE
-__ZTIN9configmgr6memory21SimpleHeapManagerBaseE
-__ZTIN9configmgr6memory25SimpleCheckingHeapManagerE
-__ZTIN9configmgr6memory8DataLockE
-__ZTIN9configmgr7AddNodeE
-__ZTIN9configmgr7backend10NodeUpdateE
-__ZTIN9configmgr7backend11NamedUpdateE
-__ZTIN9configmgr7backend11NodeReplaceE
-__ZTIN9configmgr7backend11PropertyAddE
-__ZTIN9configmgr7backend12ResultHolderINS0_12NodeInstanceEE10RCInstanceE
-__ZTIN9configmgr7backend12ResultHolderINS0_16TemplateInstanceEE10RCInstanceE
-__ZTIN9configmgr7backend12ResultHolderINS0_17ComponentInstanceEE10RCInstanceE
-__ZTIN9configmgr7backend13BackendAccessE
-__ZTIN9configmgr7backend13ElementUpdateE
-__ZTIN9configmgr7backend13PropertyResetE
-__ZTIN9configmgr7backend13SchemaBuilderE
-__ZTIN9configmgr7backend13UpdateServiceE
-__ZTIN9configmgr7backend14PropertyUpdateE
-__ZTIN9configmgr7backend15CacheControllerE
-__ZTIN9configmgr7backend16NodeModificationE
-__ZTIN9configmgr7backend17BasicUpdateMergerE
-__ZTIN9configmgr7backend17BinaryReader_ImplE
-__ZTIN9configmgr7backend17INodeDataListenerE
-__ZTIN9configmgr7backend17INodeDataProviderE
-__ZTIN9configmgr7backend17LayerMergeHandlerE
-__ZTIN9configmgr7backend17LayerUpdateMergerE
-__ZTIN9configmgr7backend18BasicImportHandlerE
-__ZTIN9configmgr7backend18BinaryWriteHandlerE
-__ZTIN9configmgr7backend18ImportMergeHandlerE
-__ZTIN9configmgr7backend18LayerUpdateHandlerE
-__ZTIN9configmgr7backend19ICachedDataListenerE
-__ZTIN9configmgr7backend19ICachedDataNotifierE
-__ZTIN9configmgr7backend19ICachedDataProviderE
-__ZTIN9configmgr7backend19IDirectDataProviderE
-__ZTIN9configmgr7backend19IMergedDataProviderE
-__ZTIN9configmgr7backend19INodeUpdateProviderE
-__ZTIN9configmgr7backend19LayerDefaultRemoverE
-__ZTIN9configmgr7backend19MultiStratumBackendE
-__ZTIN9configmgr7backend20IDefaultDataProviderE
-__ZTIN9configmgr7backend20SingleBackendAdapterE
-__ZTIN9configmgr7backend21BackendChangeNotifierE
-__ZTIN9configmgr7backend21IDataProviderMetaDataE
-__ZTIN9configmgr7backend21ITemplateDataProviderE
-__ZTIN9configmgr7backend21OInvalidateTreeThreadE
-__ZTIN9configmgr7backend22CacheChangeMulticasterE
-__ZTIN9configmgr7backend22IComponentDataProviderE
-__ZTIN9configmgr7backend8NodeDropE
-__ZTIN9configmgr7localbe16LocalStratumBaseE
-__ZTIN9configmgr7localbe17LocalMultiStratumE
-__ZTIN9configmgr7localbe18FlatLocalFileLayerE
-__ZTIN9configmgr7localbe18LocalSingleBackendE
-__ZTIN9configmgr7localbe19BasicLocalFileLayerE
-__ZTIN9configmgr7localbe19LayerPropertyHelperE
-__ZTIN9configmgr7localbe19LocalSchemaSupplierE
-__ZTIN9configmgr7localbe20SimpleLocalFileLayerE
-__ZTIN9configmgr7localbe23CompositeLocalFileLayerE
-__ZTIN9configmgr7localbe23LocalStratumMutexHolderE
-__ZTIN9configmgr7localbe27FullCompositeLocalFileLayerE
-__ZTIN9configmgr7localbe28BasicCompositeLocalFileLayerE
-__ZTIN9configmgr7SubtreeE
-__ZTIN9configmgr8BasicSetE
-__ZTIN9configmgr8ISubtreeE
-__ZTIN9configmgr8OOptionsE
-__ZTIN9configmgr9apihelper15BroadcasterBaseE
-__ZTIN9configmgr9apihelper17PropertySetHelperE
-__ZTIN9configmgr9apihelper18InteractionRequestE
-__ZTIN9configmgr9apihelper23InteractionContinuationIN3com3sun4star4task17XInteractionAbortEEE
-__ZTIN9configmgr9apihelper23InteractionContinuationIN3com3sun4star4task17XInteractionRetryEEE
-__ZTIN9configmgr9apihelper23InteractionContinuationIN3com3sun4star4task19XInteractionApproveEEE
-__ZTIN9configmgr9apihelper23InteractionContinuationIN3com3sun4star4task22XInteractionDisapproveEEE
-__ZTIN9configmgr9apihelper24SimpleInteractionRequestE
-__ZTIN9configmgr9apihelper31ConfigurationInteractionHandler7ContextE
-__ZTIN9configmgr9CacheDataE
-__ZTIN9configmgr9configapi10NodeAccessE
-__ZTIN9configmgr9configapi10SetElementE
-__ZTIN9configmgr9configapi11ApiTreeImpl16ComponentAdapterE
-__ZTIN9configmgr9configapi11Broadcaster4ImplE
-__ZTIN9configmgr9configapi11NodeElementE
-__ZTIN9configmgr9configapi11OSetElementINS0_15NodeGroupAccessEEE
-__ZTIN9configmgr9configapi11OSetElementINS0_17NodeSetInfoAccessEEE
-__ZTIN9configmgr9configapi11OSetElementINS0_17NodeTreeSetAccessEEE
-__ZTIN9configmgr9configapi11OSetElementINS0_18NodeValueSetAccessEEE
-__ZTIN9configmgr9configapi11OSetElementINS0_19NodeGroupInfoAccessEEE
-__ZTIN9configmgr9configapi11RootElementE
-__ZTIN9configmgr9configapi11TreeElementE
-__ZTIN9configmgr9configapi12InnerElementE
-__ZTIN9configmgr9configapi13NodeSetAccessE
-__ZTIN9configmgr9configapi13OInnerElementINS0_15NodeGroupAccessEEE
-__ZTIN9configmgr9configapi13OInnerElementINS0_17NodeSetInfoAccessEEE
-__ZTIN9configmgr9configapi13OInnerElementINS0_17NodeTreeSetAccessEEE
-__ZTIN9configmgr9configapi13OInnerElementINS0_18NodeValueSetAccessEEE
-__ZTIN9configmgr9configapi13OInnerElementINS0_19NodeGroupInfoAccessEEE
-__ZTIN9configmgr9configapi14ObjectRegistryE
-__ZTIN9configmgr9configapi15ApiRootTreeImpl12NodeListenerE
-__ZTIN9configmgr9configapi15NodeGroupAccessE
-__ZTIN9configmgr9configapi16OReadRootElementINS0_17NodeSetInfoAccessEEE
-__ZTIN9configmgr9configapi16OReadRootElementINS0_19NodeGroupInfoAccessEEE
-__ZTIN9configmgr9configapi17CollectPropertiesE
-__ZTIN9configmgr9configapi17NodeSetInfoAccessE
-__ZTIN9configmgr9configapi17NodeTreeSetAccessE
-__ZTIN9configmgr9configapi17UpdateRootElementE
-__ZTIN9configmgr9configapi18NodeValueSetAccessE
-__ZTIN9configmgr9configapi18OUpdateRootElementINS0_15NodeGroupAccessEEE
-__ZTIN9configmgr9configapi18OUpdateRootElementINS0_17NodeTreeSetAccessEEE
-__ZTIN9configmgr9configapi18OUpdateRootElementINS0_18NodeValueSetAccessEEE
-__ZTIN9configmgr9configapi19NodeGroupInfoAccessE
-__ZTIN9configmgr9configapi19NodePropertySetInfoE
-__ZTIN9configmgr9configapi19UpdateObjectFactoryE
-__ZTIN9configmgr9configapi21ReadOnlyObjectFactoryE
-__ZTIN9configmgr9configapi7FactoryE
-__ZTIN9configmgr9configapi8internal15SearchExactNameE
-__ZTIN9configmgr9OProviderE
-__ZTIN9configmgr9ValueNodeE
-__ZTIN9salhelper21SimpleReferenceObjectE
-;__ZTISt9bad_alloc
-;__ZTISt9exception
-
-
-IMPORTS
-__ZTIN10comphelper18OPropertyContainerE=configmg.__ZTIN10comphelper18OPropertyContainerE
-__ZTIN10comphelper24OPropertyContainerHelperE=configmg.__ZTIN10comphelper24OPropertyContainerHelperE
-__ZTIN10comphelper25OPropertyArrayUsageHelperIN9configmgr22OConfigurationProviderEEE=configmg.__ZTIN10comphelper25OPropertyArrayUsageHelperIN9configmgr22OConfigurationProviderEEE
-__ZTIN3com3sun4star13configuration17XTemplateInstanceE=configmg.__ZTIN3com3sun4star13configuration17XTemplateInstanceE
-__ZTIN3com3sun4star13configuration18XTemplateContainerE=configmg.__ZTIN3com3sun4star13configuration18XTemplateContainerE
-__ZTIN3com3sun4star13configuration29InvalidBootstrapFileExceptionE=configmg.__ZTIN3com3sun4star13configuration29InvalidBootstrapFileExceptionE
-__ZTIN3com3sun4star13configuration29MissingBootstrapFileExceptionE=configmg.__ZTIN3com3sun4star13configuration29MissingBootstrapFileExceptionE
-__ZTIN3com3sun4star13configuration31InstallationIncompleteExceptionE=configmg.__ZTIN3com3sun4star13configuration31InstallationIncompleteExceptionE
-__ZTIN3com3sun4star13configuration32CannotLoadConfigurationExceptionE=configmg.__ZTIN3com3sun4star13configuration32CannotLoadConfigurationExceptionE
-__ZTIN3com3sun4star13configuration7backend13XLayerHandlerE=configmg.__ZTIN3com3sun4star13configuration7backend13XLayerHandlerE
-__ZTIN3com3sun4star13configuration7backend14XLayerImporterE=configmg.__ZTIN3com3sun4star13configuration7backend14XLayerImporterE
-__ZTIN3com3sun4star13configuration7backend14XSchemaHandlerE=configmg.__ZTIN3com3sun4star13configuration7backend14XSchemaHandlerE
-__ZTIN3com3sun4star13configuration7backend14XUpdateHandlerE=configmg.__ZTIN3com3sun4star13configuration7backend14XUpdateHandlerE
-__ZTIN3com3sun4star13configuration7backend15XCompositeLayerE=configmg.__ZTIN3com3sun4star13configuration7backend15XCompositeLayerE
-__ZTIN3com3sun4star13configuration7backend15XSchemaSupplierE=configmg.__ZTIN3com3sun4star13configuration7backend15XSchemaSupplierE
-__ZTIN3com3sun4star13configuration7backend15XUpdatableLayerE=configmg.__ZTIN3com3sun4star13configuration7backend15XUpdatableLayerE
-__ZTIN3com3sun4star13configuration7backend16XBackendEntitiesE=configmg.__ZTIN3com3sun4star13configuration7backend16XBackendEntitiesE
-__ZTIN3com3sun4star13configuration7backend18XMultiLayerStratumE=configmg.__ZTIN3com3sun4star13configuration7backend18XMultiLayerStratumE
-__ZTIN3com3sun4star13configuration7backend19XSingleLayerStratumE=configmg.__ZTIN3com3sun4star13configuration7backend19XSingleLayerStratumE
-__ZTIN3com3sun4star13configuration7backend21BackendSetupExceptionE=configmg.__ZTIN3com3sun4star13configuration7backend21BackendSetupExceptionE
-__ZTIN3com3sun4star13configuration7backend22BackendAccessExceptionE=configmg.__ZTIN3com3sun4star13configuration7backend22BackendAccessExceptionE
-__ZTIN3com3sun4star13configuration7backend22CannotConnectExceptionE=configmg.__ZTIN3com3sun4star13configuration7backend22CannotConnectExceptionE
-__ZTIN3com3sun4star13configuration7backend22MalformedDataExceptionE=configmg.__ZTIN3com3sun4star13configuration7backend22MalformedDataExceptionE
-__ZTIN3com3sun4star13configuration7backend23ConnectionLostExceptionE=configmg.__ZTIN3com3sun4star13configuration7backend23ConnectionLostExceptionE
-__ZTIN3com3sun4star13configuration7backend23XBackendChangesListenerE=configmg.__ZTIN3com3sun4star13configuration7backend23XBackendChangesListenerE
-__ZTIN3com3sun4star13configuration7backend23XBackendChangesNotifierE=configmg.__ZTIN3com3sun4star13configuration7backend23XBackendChangesNotifierE
-__ZTIN3com3sun4star13configuration7backend24StratumCreationExceptionE=configmg.__ZTIN3com3sun4star13configuration7backend24StratumCreationExceptionE
-__ZTIN3com3sun4star13configuration7backend24XVersionedSchemaSupplierE=configmg.__ZTIN3com3sun4star13configuration7backend24XVersionedSchemaSupplierE
-__ZTIN3com3sun4star13configuration7backend29AuthenticationFailedExceptionE=configmg.__ZTIN3com3sun4star13configuration7backend29AuthenticationFailedExceptionE
-__ZTIN3com3sun4star13configuration7backend33InsufficientAccessRightsExceptionE=configmg.__ZTIN3com3sun4star13configuration7backend33InsufficientAccessRightsExceptionE
-__ZTIN3com3sun4star13configuration7backend39InvalidAuthenticationMechanismExceptionE=configmg.__ZTIN3com3sun4star13configuration7backend39InvalidAuthenticationMechanismExceptionE
-__ZTIN3com3sun4star13configuration7backend6XLayerE=configmg.__ZTIN3com3sun4star13configuration7backend6XLayerE
-__ZTIN3com3sun4star13configuration7backend7XSchemaE=configmg.__ZTIN3com3sun4star13configuration7backend7XSchemaE
-__ZTIN3com3sun4star13configuration7backend8XBackendE=configmg.__ZTIN3com3sun4star13configuration7backend8XBackendE
-__ZTIN3com3sun4star2io11IOExceptionE=configmg.__ZTIN3com3sun4star2io11IOExceptionE
-__ZTIN3com3sun4star2io12XInputStreamE=configmg.__ZTIN3com3sun4star2io12XInputStreamE
-__ZTIN3com3sun4star2io13XOutputStreamE=configmg.__ZTIN3com3sun4star2io13XOutputStreamE
-__ZTIN3com3sun4star2io15XActiveDataSinkE=configmg.__ZTIN3com3sun4star2io15XActiveDataSinkE
-__ZTIN3com3sun4star2io16XDataInputStreamE=configmg.__ZTIN3com3sun4star2io16XDataInputStreamE
-__ZTIN3com3sun4star2io17XActiveDataSourceE=configmg.__ZTIN3com3sun4star2io17XActiveDataSourceE
-__ZTIN3com3sun4star2io20WrongFormatExceptionE=configmg.__ZTIN3com3sun4star2io20WrongFormatExceptionE
-__ZTIN3com3sun4star2io21NotConnectedExceptionE=configmg.__ZTIN3com3sun4star2io21NotConnectedExceptionE
-__ZTIN3com3sun4star2io22UnexpectedEOFExceptionE=configmg.__ZTIN3com3sun4star2io22UnexpectedEOFExceptionE
-__ZTIN3com3sun4star2io27BufferSizeExceededExceptionE=configmg.__ZTIN3com3sun4star2io27BufferSizeExceededExceptionE
-__ZTIN3com3sun4star3uno10XInterfaceE=configmg.__ZTIN3com3sun4star3uno10XInterfaceE
-__ZTIN3com3sun4star3uno15XCurrentContextE=configmg.__ZTIN3com3sun4star3uno15XCurrentContextE
-;__ZTIN3com3sun4star3uno16RuntimeExceptionE=configmg.__ZTIN3com3sun4star3uno16RuntimeExceptionE
-__ZTIN3com3sun4star3uno17XComponentContextE=configmg.__ZTIN3com3sun4star3uno17XComponentContextE
-__ZTIN3com3sun4star3uno5XWeakE=configmg.__ZTIN3com3sun4star3uno5XWeakE
-;__ZTIN3com3sun4star3uno9ExceptionE=configmg.__ZTIN3com3sun4star3uno9ExceptionE
-__ZTIN3com3sun4star3xml3sax12SAXExceptionE=configmg.__ZTIN3com3sun4star3xml3sax12SAXExceptionE
-__ZTIN3com3sun4star3xml3sax14XAttributeListE=configmg.__ZTIN3com3sun4star3xml3sax14XAttributeListE
-__ZTIN3com3sun4star3xml3sax16XDocumentHandlerE=configmg.__ZTIN3com3sun4star3xml3sax16XDocumentHandlerE
-__ZTIN3com3sun4star4lang10XComponentE=configmg.__ZTIN3com3sun4star4lang10XComponentE
-__ZTIN3com3sun4star4lang10XUnoTunnelE=configmg.__ZTIN3com3sun4star4lang10XUnoTunnelE
-__ZTIN3com3sun4star4lang12XLocalizableE=configmg.__ZTIN3com3sun4star4lang12XLocalizableE
-__ZTIN3com3sun4star4lang12XServiceInfoE=configmg.__ZTIN3com3sun4star4lang12XServiceInfoE
-__ZTIN3com3sun4star4lang13XTypeProviderE=configmg.__ZTIN3com3sun4star4lang13XTypeProviderE
-__ZTIN3com3sun4star4lang14XEventListenerE=configmg.__ZTIN3com3sun4star4lang14XEventListenerE
-__ZTIN3com3sun4star4lang15XInitializationE=configmg.__ZTIN3com3sun4star4lang15XInitializationE
-__ZTIN3com3sun4star4lang17DisposedExceptionE=configmg.__ZTIN3com3sun4star4lang17DisposedExceptionE
-__ZTIN3com3sun4star4lang18NoSupportExceptionE=configmg.__ZTIN3com3sun4star4lang18NoSupportExceptionE
-__ZTIN3com3sun4star4lang20NullPointerExceptionE=configmg.__ZTIN3com3sun4star4lang20NullPointerExceptionE
-__ZTIN3com3sun4star4lang20XMultiServiceFactoryE=configmg.__ZTIN3com3sun4star4lang20XMultiServiceFactoryE
-__ZTIN3com3sun4star4lang21XSingleServiceFactoryE=configmg.__ZTIN3com3sun4star4lang21XSingleServiceFactoryE
-__ZTIN3com3sun4star4lang22IllegalAccessExceptionE=configmg.__ZTIN3com3sun4star4lang22IllegalAccessExceptionE
-__ZTIN3com3sun4star4lang22WrappedTargetExceptionE=configmg.__ZTIN3com3sun4star4lang22WrappedTargetExceptionE
-__ZTIN3com3sun4star4lang23XSingleComponentFactoryE=configmg.__ZTIN3com3sun4star4lang23XSingleComponentFactoryE
-__ZTIN3com3sun4star4lang24IllegalArgumentExceptionE=configmg.__ZTIN3com3sun4star4lang24IllegalArgumentExceptionE
-__ZTIN3com3sun4star4lang29ServiceNotRegisteredExceptionE=configmg.__ZTIN3com3sun4star4lang29ServiceNotRegisteredExceptionE
-__ZTIN3com3sun4star4lang29WrappedTargetRuntimeExceptionE=configmg.__ZTIN3com3sun4star4lang29WrappedTargetRuntimeExceptionE
-__ZTIN3com3sun4star4task17XInteractionAbortE=configmg.__ZTIN3com3sun4star4task17XInteractionAbortE
-__ZTIN3com3sun4star4task17XInteractionRetryE=configmg.__ZTIN3com3sun4star4task17XInteractionRetryE
-__ZTIN3com3sun4star4task19XInteractionApproveE=configmg.__ZTIN3com3sun4star4task19XInteractionApproveE
-__ZTIN3com3sun4star4task19XInteractionRequestE=configmg.__ZTIN3com3sun4star4task19XInteractionRequestE
-__ZTIN3com3sun4star4task22XInteractionDisapproveE=configmg.__ZTIN3com3sun4star4task22XInteractionDisapproveE
-__ZTIN3com3sun4star4task24XInteractionContinuationE=configmg.__ZTIN3com3sun4star4task24XInteractionContinuationE
-__ZTIN3com3sun4star4task4XJobE=configmg.__ZTIN3com3sun4star4task4XJobE
-__ZTIN3com3sun4star4util10XFlushableE=configmg.__ZTIN3com3sun4star4util10XFlushableE
-__ZTIN3com3sun4star4util12XRefreshableE=configmg.__ZTIN3com3sun4star4util12XRefreshableE
-__ZTIN3com3sun4star4util12XTimeStampedE=configmg.__ZTIN3com3sun4star4util12XTimeStampedE
-__ZTIN3com3sun4star4util13XChangesBatchE=configmg.__ZTIN3com3sun4star4util13XChangesBatchE
-__ZTIN3com3sun4star4util13XStringEscapeE=configmg.__ZTIN3com3sun4star4util13XStringEscapeE
-__ZTIN3com3sun4star4util16XChangesNotifierE=configmg.__ZTIN3com3sun4star4util16XChangesNotifierE
-__ZTIN3com3sun4star5beans10XExactNameE=configmg.__ZTIN3com3sun4star5beans10XExactNameE
-__ZTIN3com3sun4star5beans12XPropertySetE=configmg.__ZTIN3com3sun4star5beans12XPropertySetE
-__ZTIN3com3sun4star5beans14XPropertyStateE=configmg.__ZTIN3com3sun4star5beans14XPropertyStateE
-__ZTIN3com3sun4star5beans16XFastPropertySetE=configmg.__ZTIN3com3sun4star5beans16XFastPropertySetE
-__ZTIN3com3sun4star5beans16XPropertySetInfoE=configmg.__ZTIN3com3sun4star5beans16XPropertySetInfoE
-__ZTIN3com3sun4star5beans17XMultiPropertySetE=configmg.__ZTIN3com3sun4star5beans17XMultiPropertySetE
-__ZTIN3com3sun4star5beans18XPropertyWithStateE=configmg.__ZTIN3com3sun4star5beans18XPropertyWithStateE
-__ZTIN3com3sun4star5beans20XMultiPropertyStatesE=configmg.__ZTIN3com3sun4star5beans20XMultiPropertyStatesE
-__ZTIN3com3sun4star5beans21PropertyVetoExceptionE=configmg.__ZTIN3com3sun4star5beans21PropertyVetoExceptionE
-__ZTIN3com3sun4star5beans24UnknownPropertyExceptionE=configmg.__ZTIN3com3sun4star5beans24UnknownPropertyExceptionE
-__ZTIN3com3sun4star5beans24XHierarchicalPropertySetE=configmg.__ZTIN3com3sun4star5beans24XHierarchicalPropertySetE
-__ZTIN3com3sun4star5beans25XPropertiesChangeListenerE=configmg.__ZTIN3com3sun4star5beans25XPropertiesChangeListenerE
-__ZTIN3com3sun4star5beans29XMultiHierarchicalPropertySetE=configmg.__ZTIN3com3sun4star5beans29XMultiHierarchicalPropertySetE
-__ZTIN3com3sun4star5beans9XPropertyE=configmg.__ZTIN3com3sun4star5beans9XPropertyE
-__ZTIN3com3sun4star6script22CannotConvertExceptionE=configmg.__ZTIN3com3sun4star6script22CannotConvertExceptionE
-__ZTIN3com3sun4star8registry12XRegistryKeyE=configmg.__ZTIN3com3sun4star8registry12XRegistryKeyE
-__ZTIN3com3sun4star8registry15XSimpleRegistryE=configmg.__ZTIN3com3sun4star8registry15XSimpleRegistryE
-__ZTIN3com3sun4star8registry21InvalidValueExceptionE=configmg.__ZTIN3com3sun4star8registry21InvalidValueExceptionE
-__ZTIN3com3sun4star8registry22MergeConflictExceptionE=configmg.__ZTIN3com3sun4star8registry22MergeConflictExceptionE
-__ZTIN3com3sun4star8registry24InvalidRegistryExceptionE=configmg.__ZTIN3com3sun4star8registry24InvalidRegistryExceptionE
-__ZTIN3com3sun4star9container10XContainerE=configmg.__ZTIN3com3sun4star9container10XContainerE
-__ZTIN3com3sun4star9container11XNameAccessE=configmg.__ZTIN3com3sun4star9container11XNameAccessE
-__ZTIN3com3sun4star9container12XNameReplaceE=configmg.__ZTIN3com3sun4star9container12XNameReplaceE
-__ZTIN3com3sun4star9container14XElementAccessE=configmg.__ZTIN3com3sun4star9container14XElementAccessE
-__ZTIN3com3sun4star9container14XNameContainerE=configmg.__ZTIN3com3sun4star9container14XNameContainerE
-__ZTIN3com3sun4star9container17XHierarchicalNameE=configmg.__ZTIN3com3sun4star9container17XHierarchicalNameE
-__ZTIN3com3sun4star9container21ElementExistExceptionE=configmg.__ZTIN3com3sun4star9container21ElementExistExceptionE
-__ZTIN3com3sun4star9container22NoSuchElementExceptionE=configmg.__ZTIN3com3sun4star9container22NoSuchElementExceptionE
-__ZTIN3com3sun4star9container23XHierarchicalNameAccessE=configmg.__ZTIN3com3sun4star9container23XHierarchicalNameAccessE
-__ZTIN3com3sun4star9container6XChildE=configmg.__ZTIN3com3sun4star9container6XChildE
-__ZTIN3com3sun4star9container6XNamedE=configmg.__ZTIN3com3sun4star9container6XNamedE
-__ZTIN3vos10IReferenceE=configmg.__ZTIN3vos10IReferenceE
-__ZTIN3vos10OReferenceE=configmg.__ZTIN3vos10OReferenceE
-__ZTIN3vos6OTimerE=configmg.__ZTIN3vos6OTimerE
-__ZTIN3vos7OObjectE=configmg.__ZTIN3vos7OObjectE
-__ZTIN3vos7OThreadE=configmg.__ZTIN3vos7OThreadE
-__ZTIN3vos9IRunnableE=configmg.__ZTIN3vos9IRunnableE
-__ZTIN4cppu11ImplHelper2IN3com3sun4star8registry15XSimpleRegistryENS3_4util10XFlushableEEE=configmg.__ZTIN4cppu11ImplHelper2IN3com3sun4star8registry15XSimpleRegistryENS3_4util10XFlushableEEE
-__ZTIN4cppu11ImplHelper4IN3com3sun4star4lang20XMultiServiceFactoryENS4_12XLocalizableENS3_4util12XRefreshableENS7_10XFlushableEEE=configmg.__ZTIN4cppu11ImplHelper4IN3com3sun4star4lang20XMultiServiceFactoryENS4_12XLocalizableENS3_4util12XRefreshableENS7_10XFlushableEEE
-__ZTIN4cppu11ImplHelper6IN3com3sun4star5beans12XPropertySetENS4_17XMultiPropertySetENS4_24XHierarchicalPropertySetENS4_29XMultiHierarchicalPropertySetENS4_14XPropertyStateENS4_20XMultiPropertyStatesEEE=configmg.__ZTIN4cppu11ImplHelper6IN3com3sun4star5beans12XPropertySetENS4_17XMultiPropertySetENS4_24XHierarchicalPropertySetENS4_29XMultiHierarchicalPropertySetENS4_14XPropertyStateENS4_20XMultiPropertyStatesEEE
-__ZTIN4cppu11ImplHelper6IN3com3sun4star9container11XNameAccessENS4_17XHierarchicalNameENS4_23XHierarchicalNameAccessENS4_10XContainerENS3_5beans10XExactNameENS9_9XPropertyEEE=configmg.__ZTIN4cppu11ImplHelper6IN3com3sun4star9container11XNameAccessENS4_17XHierarchicalNameENS4_23XHierarchicalNameAccessENS4_10XContainerENS3_5beans10XExactNameENS9_9XPropertyEEE
-__ZTIN4cppu11ImplHelper9IN3com3sun4star9container11XNameAccessENS4_17XHierarchicalNameENS4_23XHierarchicalNameAccessENS4_10XContainerENS3_5beans10XExactNameENS9_9XPropertyENS9_16XPropertySetInfoENS3_13configuration18XTemplateCo!_yPkJc2=configmg.__ZTIN4cppu11ImplHelper9IN3com3sun4star9container11XNameAccessENS4_17XHierarchicalNameENS4_23XHierarchicalNameAccessENS4_10XContainerENS3_5beans10XExactNameENS9_9XPropertyENS9_16XPropertySetInfoENS3_13configuration18XTemplateCo!_yPkJc2
-__ZTIN4cppu11OWeakObjectE=configmg.__ZTIN4cppu11OWeakObjectE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star13configuration7backend13XLayerHandlerEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star13configuration7backend13XLayerHandlerEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star13configuration7backend14XSchemaHandlerEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star13configuration7backend14XSchemaHandlerEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star13configuration7backend15XCompositeLayerEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star13configuration7backend15XCompositeLayerEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star13configuration7backend23XBackendChangesListenerEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star13configuration7backend23XBackendChangesListenerEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star13configuration7backend6XLayerEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star13configuration7backend6XLayerEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star2io12XInputStreamEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star2io12XInputStreamEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star2io13XOutputStreamEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star2io13XOutputStreamEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star2io16XDataInputStreamEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star2io16XDataInputStreamEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star3uno15XCurrentContextEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star3uno15XCurrentContextEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star3xml3sax14XAttributeListEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star3xml3sax14XAttributeListEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star3xml3sax16XDocumentHandlerEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star3xml3sax16XDocumentHandlerEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4lang14XEventListenerEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4lang14XEventListenerEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4lang23XSingleComponentFactoryEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4lang23XSingleComponentFactoryEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4task17XInteractionAbortEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4task17XInteractionAbortEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4task17XInteractionRetryEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4task17XInteractionRetryEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4task19XInteractionApproveEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4task19XInteractionApproveEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4task19XInteractionRequestEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4task19XInteractionRequestEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4task22XInteractionDisapproveEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star4task22XInteractionDisapproveEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star5beans16XPropertySetInfoEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star5beans16XPropertySetInfoEEE
-__ZTIN4cppu15WeakImplHelper1IN3com3sun4star8registry12XRegistryKeyEEE=configmg.__ZTIN4cppu15WeakImplHelper1IN3com3sun4star8registry12XRegistryKeyEEE
-__ZTIN4cppu15WeakImplHelper2IN3com3sun4star13configuration7backend13XLayerHandlerENS5_6XLayerEEE=configmg.__ZTIN4cppu15WeakImplHelper2IN3com3sun4star13configuration7backend13XLayerHandlerENS5_6XLayerEEE
-__ZTIN4cppu15WeakImplHelper2IN3com3sun4star3uno15XCurrentContextENS3_4lang10XUnoTunnelEEE=configmg.__ZTIN4cppu15WeakImplHelper2IN3com3sun4star3uno15XCurrentContextENS3_4lang10XUnoTunnelEEE
-__ZTIN4cppu15WeakImplHelper2IN3com3sun4star4task4XJobENS3_4lang12XServiceInfoEEE=configmg.__ZTIN4cppu15WeakImplHelper2IN3com3sun4star4task4XJobENS3_4lang12XServiceInfoEEE
-__ZTIN4cppu15WeakImplHelper3IN3com3sun4star13configuration7backend14XLayerImporterENS3_4lang15XInitializationENS7_12XServiceInfoEEE=configmg.__ZTIN4cppu15WeakImplHelper3IN3com3sun4star13configuration7backend14XLayerImporterENS3_4lang15XInitializationENS7_12XServiceInfoEEE
-__ZTIN4cppu15WeakImplHelper3IN3com3sun4star4lang15XInitializationENS4_12XServiceInfoENS3_13configuration7backend14XUpdateHandlerEEE=configmg.__ZTIN4cppu15WeakImplHelper3IN3com3sun4star4lang15XInitializationENS4_12XServiceInfoENS3_13configuration7backend14XUpdateHandlerEEE
-__ZTIN4cppu15WeakImplHelper3IN3com3sun4star9container6XChildENS4_6XNamedENS3_4lang12XServiceInfoEEE=configmg.__ZTIN4cppu15WeakImplHelper3IN3com3sun4star9container6XChildENS4_6XNamedENS3_4lang12XServiceInfoEEE
-__ZTIN4cppu15WeakImplHelper4IN3com3sun4star4lang15XInitializationENS4_12XServiceInfoENS3_2io15XActiveDataSinkENS3_13configuration7backend6XLayerEEE=configmg.__ZTIN4cppu15WeakImplHelper4IN3com3sun4star4lang15XInitializationENS4_12XServiceInfoENS3_2io15XActiveDataSinkENS3_13configuration7backend6XLayerEEE
-__ZTIN4cppu15WeakImplHelper4IN3com3sun4star4lang15XInitializationENS4_12XServiceInfoENS3_2io15XActiveDataSinkENS3_13configuration7backend7XSchemaEEE=configmg.__ZTIN4cppu15WeakImplHelper4IN3com3sun4star4lang15XInitializationENS4_12XServiceInfoENS3_2io15XActiveDataSinkENS3_13configuration7backend7XSchemaEEE
-__ZTIN4cppu15WeakImplHelper4IN3com3sun4star4lang15XInitializationENS4_12XServiceInfoENS3_2io17XActiveDataSourceENS3_13configuration7backend13XLayerHandlerEEE=configmg.__ZTIN4cppu15WeakImplHelper4IN3com3sun4star4lang15XInitializationENS4_12XServiceInfoENS3_2io17XActiveDataSourceENS3_13configuration7backend13XLayerHandlerEEE
-__ZTIN4cppu15WeakImplHelper5IN3com3sun4star9container6XNamedENS3_4util16XChangesNotifierENS3_4lang10XComponentENS8_12XServiceInfoENS8_12XLocalizableEEE=configmg.__ZTIN4cppu15WeakImplHelper5IN3com3sun4star9container6XNamedENS3_4util16XChangesNotifierENS3_4lang10XComponentENS8_12XServiceInfoENS8_12XLocalizableEEE
-__ZTIN4cppu15WeakImplHelper6IN3com3sun4star9container6XChildENS4_6XNamedENS3_4lang10XComponentENS7_12XServiceInfoENS3_13configuration17XTemplateInstanceENS7_10XUnoTunnelEEE=configmg.__ZTIN4cppu15WeakImplHelper6IN3com3sun4star9container6XChildENS4_6XNamedENS3_4lang10XComponentENS7_12XServiceInfoENS3_13configuration17XTemplateInstanceENS7_10XUnoTunnelEEE
-__ZTIN4cppu15WeakImplHelper6IN3com3sun4star9container6XNamedENS3_4util16XChangesNotifierENS3_4lang10XComponentENS8_12XServiceInfoENS8_12XLocalizableENS6_13XChangesBatchEEE=configmg.__ZTIN4cppu15WeakImplHelper6IN3com3sun4star9container6XNamedENS3_4util16XChangesNotifierENS3_4lang10XComponentENS8_12XServiceInfoENS8_12XLocalizableENS6_13XChangesBatchEEE
-__ZTIN4cppu18OPropertySetHelperE=configmg.__ZTIN4cppu18OPropertySetHelperE
-__ZTIN4cppu22ImplInheritanceHelper1IN9configmgr7localbe16LocalStratumBaseEN3com3sun4star13configuration7backend18XMultiLayerStratumEEE=configmg.__ZTIN4cppu22ImplInheritanceHelper1IN9configmgr7localbe16LocalStratumBaseEN3com3sun4star13configuration7backend18XMultiLayerStratumEEE
-__ZTIN4cppu22ImplInheritanceHelper1IN9configmgr7localbe16LocalStratumBaseEN3com3sun4star13configuration7backend19XSingleLayerStratumEEE=configmg.__ZTIN4cppu22ImplInheritanceHelper1IN9configmgr7localbe16LocalStratumBaseEN3com3sun4star13configuration7backend19XSingleLayerStratumEEE
-__ZTIN4cppu22ImplInheritanceHelper2IN9configmgr7localbe19LayerPropertyHelperEN3com3sun4star13configuration7backend15XUpdatableLayerENS6_4util12XTimeStampedEEE=configmg.__ZTIN4cppu22ImplInheritanceHelper2IN9configmgr7localbe19LayerPropertyHelperEN3com3sun4star13configuration7backend15XUpdatableLayerENS6_4util12XTimeStampedEEE
-__ZTIN4cppu22ImplInheritanceHelper2IN9configmgr7localbe19LayerPropertyHelperEN3com3sun4star13configuration7backend6XLayerENS6_4util12XTimeStampedEEE=configmg.__ZTIN4cppu22ImplInheritanceHelper2IN9configmgr7localbe19LayerPropertyHelperEN3com3sun4star13configuration7backend6XLayerENS6_4util12XTimeStampedEEE
-__ZTIN4cppu22ImplInheritanceHelper3IN9configmgr7localbe19LayerPropertyHelperEN3com3sun4star13configuration7backend15XUpdatableLayerENS8_15XCompositeLayerENS6_4util12XTimeStampedEEE=configmg.__ZTIN4cppu22ImplInheritanceHelper3IN9configmgr7localbe19LayerPropertyHelperEN3com3sun4star13configuration7backend15XUpdatableLayerENS8_15XCompositeLayerENS6_4util12XTimeStampedEEE
-__ZTIN4cppu24WeakComponentImplHelper1IN3com3sun4star4lang12XServiceInfoEEE=configmg.__ZTIN4cppu24WeakComponentImplHelper1IN3com3sun4star4lang12XServiceInfoEEE
-__ZTIN4cppu24WeakComponentImplHelper2IN3com3sun4star4lang20XMultiServiceFactoryENS4_12XServiceInfoEEE=configmg.__ZTIN4cppu24WeakComponentImplHelper2IN3com3sun4star4lang20XMultiServiceFactoryENS4_12XServiceInfoEEE
-__ZTIN4cppu24WeakComponentImplHelper3IN3com3sun4star13configuration7backend24XVersionedSchemaSupplierENS3_4lang15XInitializationENS7_12XServiceInfoEEE=configmg.__ZTIN4cppu24WeakComponentImplHelper3IN3com3sun4star13configuration7backend24XVersionedSchemaSupplierENS3_4lang15XInitializationENS7_12XServiceInfoEEE
-__ZTIN4cppu24WeakComponentImplHelper3IN3com3sun4star3uno17XComponentContextENS4_15XCurrentContextENS3_4lang12XServiceInfoEEE=configmg.__ZTIN4cppu24WeakComponentImplHelper3IN3com3sun4star3uno17XComponentContextENS4_15XCurrentContextENS3_4lang12XServiceInfoEEE
-__ZTIN4cppu24WeakComponentImplHelper3IN3com3sun4star4lang15XInitializationENS3_13configuration7backend16XBackendEntitiesENS4_12XServiceInfoEEE=configmg.__ZTIN4cppu24WeakComponentImplHelper3IN3com3sun4star4lang15XInitializationENS3_13configuration7backend16XBackendEntitiesENS4_12XServiceInfoEEE
-__ZTIN4cppu24WeakComponentImplHelper5IN3com3sun4star13configuration7backend15XSchemaSupplierENS5_18XMultiLayerStratumENS5_16XBackendEntitiesENS3_4lang15XInitializationENS9_12XServiceInfoEEE=configmg.__ZTIN4cppu24WeakComponentImplHelper5IN3com3sun4star13configuration7backend15XSchemaSupplierENS5_18XMultiLayerStratumENS5_16XBackendEntitiesENS3_4lang15XInitializationENS9_12XServiceInfoEEE
-__ZTIN4cppu24WeakComponentImplHelper5IN3com3sun4star13configuration7backend8XBackendENS5_16XBackendEntitiesENS5_15XSchemaSupplierENS3_4lang15XInitializationENS9_12XServiceInfoEEE=configmg.__ZTIN4cppu24WeakComponentImplHelper5IN3com3sun4star13configuration7backend8XBackendENS5_16XBackendEntitiesENS5_15XSchemaSupplierENS3_4lang15XInitializationENS9_12XServiceInfoEEE
-__ZTIN4cppu24WeakComponentImplHelper7IN3com3sun4star13configuration7backend8XBackendENS5_16XBackendEntitiesENS5_24XVersionedSchemaSupplierENS5_23XBackendChangesNotifierENS5_23XBackendChangesListenerENS3_4lang15XInitializationEN!_7c1rO0=configmg.__ZTIN4cppu24WeakComponentImplHelper7IN3com3sun4star13configuration7backend8XBackendENS5_16XBackendEntitiesENS5_24XVersionedSchemaSupplierENS5_23XBackendChangesNotifierENS5_23XBackendChangesListenerENS3_4lang15XInitializationEN!_7c1rO0
-__ZTIN4cppu27WeakComponentImplHelperBaseE=configmg.__ZTIN4cppu27WeakComponentImplHelperBaseE
-__ZTIN9configmgr10BasicGroupE=configmg.__ZTIN9configmgr10BasicGroupE
-__ZTIN9configmgr10IInterfaceE=configmg.__ZTIN9configmgr10IInterfaceE
-__ZTIN9configmgr10NodeActionE=configmg.__ZTIN9configmgr10NodeActionE
-__ZTIN9configmgr10RefcountedE=configmg.__ZTIN9configmgr10RefcountedE
-__ZTIN9configmgr10RemoveNodeE=configmg.__ZTIN9configmgr10RemoveNodeE
-__ZTIN9configmgr10SearchNodeE=configmg.__ZTIN9configmgr10SearchNodeE
-__ZTIN9configmgr11ApplyUpdateE=configmg.__ZTIN9configmgr11ApplyUpdateE
-__ZTIN9configmgr11NoncopyableE=configmg.__ZTIN9configmgr11NoncopyableE
-__ZTIN9configmgr11TreeManagerE=configmg.__ZTIN9configmgr11TreeManagerE
-__ZTIN9configmgr11TreeUpdaterE=configmg.__ZTIN9configmgr11TreeUpdaterE
-__ZTIN9configmgr11ValueChangeE=configmg.__ZTIN9configmgr11ValueChangeE
-__ZTIN9configmgr12AdjustUpdateE=configmg.__ZTIN9configmgr12AdjustUpdateE
-__ZTIN9configmgr12CollectNamesE=configmg.__ZTIN9configmgr12CollectNamesE
-__ZTIN9configmgr12ITreeManagerE=configmg.__ZTIN9configmgr12ITreeManagerE
-__ZTIN9configmgr12ONameCreatorE=configmg.__ZTIN9configmgr12ONameCreatorE
-__ZTIN9configmgr12OPathCreatorINS_13configuration12AbsolutePathEEE=configmg.__ZTIN9configmgr12OPathCreatorINS_13configuration12AbsolutePathEEE
-__ZTIN9configmgr12OPathCreatorINS_13configuration12RelativePathEEE=configmg.__ZTIN9configmgr12OPathCreatorINS_13configuration12RelativePathEEE
-__ZTIN9configmgr13BasicValueSetE=configmg.__ZTIN9configmgr13BasicValueSetE
-__ZTIN9configmgr13INodeListenerE=configmg.__ZTIN9configmgr13INodeListenerE
-__ZTIN9configmgr13OInnerSetInfoE=configmg.__ZTIN9configmgr13OInnerSetInfoE
-__ZTIN9configmgr13OMergeChangesE=configmg.__ZTIN9configmgr13OMergeChangesE
-__ZTIN9configmgr13OProviderImplE=configmg.__ZTIN9configmgr13OProviderImplE
-__ZTIN9configmgr13PWMutexHolderE=configmg.__ZTIN9configmgr13PWMutexHolderE
-__ZTIN9configmgr13SubtreeChangeE=configmg.__ZTIN9configmgr13SubtreeChangeE
-__ZTIN9configmgr13configuration100_GLOBAL__N__ZN9configmgr13configuration12TemplateName18makeSimpleTypeNameERKN3com3sun4star3uno4TypeE12TypeDetectorE=configmg.__ZTIN9configmgr13configuration100_GLOBAL__N__ZN9configmgr13configuration12TemplateName18makeSimpleTypeNameERKN3com3sun4star3uno4TypeE12TypeDetectorE
-__ZTIN9configmgr13configuration11InvalidNameE=configmg.__ZTIN9configmgr13configuration11InvalidNameE
-__ZTIN9configmgr13configuration11NodeVisitorE=configmg.__ZTIN9configmgr13configuration11NodeVisitorE
-__ZTIN9configmgr13configuration11SetNodeImplE=configmg.__ZTIN9configmgr13configuration11SetNodeImplE
-__ZTIN9configmgr13configuration12RootTreeImplE=configmg.__ZTIN9configmgr13configuration12RootTreeImplE
-__ZTIN9configmgr13configuration12SetResetImplE=configmg.__ZTIN9configmgr13configuration12SetResetImplE
-__ZTIN9configmgr13configuration12TypeMismatchE=configmg.__ZTIN9configmgr13configuration12TypeMismatchE
-__ZTIN9configmgr13configuration13GroupNodeImplE=configmg.__ZTIN9configmgr13configuration13GroupNodeImplE
-__ZTIN9configmgr13configuration13SetChangeImplE=configmg.__ZTIN9configmgr13configuration13SetChangeImplE
-__ZTIN9configmgr13configuration13SetInsertImplE=configmg.__ZTIN9configmgr13configuration13SetInsertImplE
-__ZTIN9configmgr13configuration13SetRemoveImplE=configmg.__ZTIN9configmgr13configuration13SetRemoveImplE
-__ZTIN9configmgr13configuration14CollectChangesE=configmg.__ZTIN9configmgr13configuration14CollectChangesE
-__ZTIN9configmgr13configuration14NodeChangeImplE=configmg.__ZTIN9configmgr13configuration14NodeChangeImplE
-__ZTIN9configmgr13configuration14SetNodeVisitorE=configmg.__ZTIN9configmgr13configuration14SetNodeVisitorE
-__ZTIN9configmgr13configuration14SetReplaceImplE=configmg.__ZTIN9configmgr13configuration14SetReplaceImplE
-__ZTIN9configmgr13configuration14ValueResetImplE=configmg.__ZTIN9configmgr13configuration14ValueResetImplE
-__ZTIN9configmgr13configuration15ElementTreeImplE=configmg.__ZTIN9configmgr13configuration15ElementTreeImplE
-__ZTIN9configmgr13configuration15TreeImplBuilderE=configmg.__ZTIN9configmgr13configuration15TreeImplBuilderE
-__ZTIN9configmgr13configuration15ValueChangeImplE=configmg.__ZTIN9configmgr13configuration15ValueChangeImplE
-__ZTIN9configmgr13configuration15ValueMemberNode12DeferredImplE=configmg.__ZTIN9configmgr13configuration15ValueMemberNode12DeferredImplE
-__ZTIN9configmgr13configuration16ValueReplaceImplE=configmg.__ZTIN9configmgr13configuration16ValueReplaceImplE
-__ZTIN9configmgr13configuration18GroupMemberVisitorE=configmg.__ZTIN9configmgr13configuration18GroupMemberVisitorE
-__ZTIN9configmgr13configuration19ConstraintViolationE=configmg.__ZTIN9configmgr13configuration19ConstraintViolationE
-__ZTIN9configmgr13configuration19DeferredSetNodeImplE=configmg.__ZTIN9configmgr13configuration19DeferredSetNodeImplE
-__ZTIN9configmgr13configuration19WrappedUnoExceptionE=configmg.__ZTIN9configmgr13configuration19WrappedUnoExceptionE
-__ZTIN9configmgr13configuration20DefaultProviderProxyE=configmg.__ZTIN9configmgr13configuration20DefaultProviderProxyE
-__ZTIN9configmgr13configuration20SetElementChangeImplE=configmg.__ZTIN9configmgr13configuration20SetElementChangeImplE
-__ZTIN9configmgr13configuration20ValueElementNodeImplE=configmg.__ZTIN9configmgr13configuration20ValueElementNodeImplE
-__ZTIN9configmgr13configuration21DeferredGroupNodeImplE=configmg.__ZTIN9configmgr13configuration21DeferredGroupNodeImplE
-__ZTIN9configmgr13configuration21TemplateProvider_ImplE=configmg.__ZTIN9configmgr13configuration21TemplateProvider_ImplE
-__ZTIN9configmgr13configuration28SpecialTemplateProvider_ImplE=configmg.__ZTIN9configmgr13configuration28SpecialTemplateProvider_ImplE
-__ZTIN9configmgr13configuration55_GLOBAL__N__ZNK9configmgr13configuration4Tree7getViewEv15CollectValueIDsE=configmg.__ZTIN9configmgr13configuration55_GLOBAL__N__ZNK9configmgr13configuration4Tree7getViewEv15CollectValueIDsE
-__ZTIN9configmgr13configuration55_GLOBAL__N__ZNK9configmgr13configuration4Tree7getViewEv17SetVisitorAdapterE=configmg.__ZTIN9configmgr13configuration55_GLOBAL__N__ZNK9configmgr13configuration4Tree7getViewEv17SetVisitorAdapterE
-__ZTIN9configmgr13configuration55_GLOBAL__N__ZNK9configmgr13configuration4Tree7getViewEv19GroupVisitorAdapterE=configmg.__ZTIN9configmgr13configuration55_GLOBAL__N__ZNK9configmgr13configuration4Tree7getViewEv19GroupVisitorAdapterE
-__ZTIN9configmgr13configuration55_GLOBAL__N__ZNK9configmgr13configuration4Tree7getViewEv21FindNonDefaultElementE=configmg.__ZTIN9configmgr13configuration55_GLOBAL__N__ZNK9configmgr13configuration4Tree7getViewEv21FindNonDefaultElementE
-__ZTIN9configmgr13configuration88_GLOBAL__N__ZN9configmgr13configuration17GroupUpdateHelperC2ERKNS0_4TreeERKNS0_7NodeRefE13NodeDefaulterE=configmg.__ZTIN9configmgr13configuration88_GLOBAL__N__ZN9configmgr13configuration17GroupUpdateHelperC2ERKNS0_4TreeERKNS0_7NodeRefE13NodeDefaulterE
-__ZTIN9configmgr13configuration8NodeImplE=configmg.__ZTIN9configmgr13configuration8NodeImplE
-__ZTIN9configmgr13configuration8TemplateE=configmg.__ZTIN9configmgr13configuration8TemplateE
-__ZTIN9configmgr13configuration8TreeImplE=configmg.__ZTIN9configmgr13configuration8TreeImplE
-__ZTIN9configmgr13configuration9ExceptionE=configmg.__ZTIN9configmgr13configuration9ExceptionE
-__ZTIN9configmgr14BasicSetAccessE=configmg.__ZTIN9configmgr14BasicSetAccessE
-__ZTIN9configmgr14ONodeConverterE=configmg.__ZTIN9configmgr14ONodeConverterE
-__ZTIN9configmgr14OStripDefaultsE=configmg.__ZTIN9configmgr14OStripDefaultsE
-__ZTIN9configmgr15BasicSetElementE=configmg.__ZTIN9configmgr15BasicSetElementE
-__ZTIN9configmgr15IConfigListenerE=configmg.__ZTIN9configmgr15IConfigListenerE
-__ZTIN9configmgr15OInnerGroupInfoE=configmg.__ZTIN9configmgr15OInnerGroupInfoE
-__ZTIN9configmgr15ProviderFactoryE=configmg.__ZTIN9configmgr15ProviderFactoryE
-__ZTIN9configmgr15ProviderWrapperE=configmg.__ZTIN9configmgr15ProviderWrapperE
-__ZTIN9configmgr16BasicGroupAccessE=configmg.__ZTIN9configmgr16BasicGroupAccessE
-__ZTIN9configmgr16BasicPropertySetE=configmg.__ZTIN9configmgr16BasicPropertySetE
-__ZTIN9configmgr16BasicRootElementE=configmg.__ZTIN9configmgr16BasicRootElementE
-__ZTIN9configmgr16BootstrapContextE=configmg.__ZTIN9configmgr16BootstrapContextE
-__ZTIN9configmgr16ChangeTreeActionE=configmg.__ZTIN9configmgr16ChangeTreeActionE
-__ZTIN9configmgr16ComponentContextE=configmg.__ZTIN9configmgr16ComponentContextE
-__ZTIN9configmgr16IDefaultProviderE=configmg.__ZTIN9configmgr16IDefaultProviderE
-__ZTIN9configmgr16ITemplateManagerE=configmg.__ZTIN9configmgr16ITemplateManagerE
-__ZTIN9configmgr16NodeModificationE=configmg.__ZTIN9configmgr16NodeModificationE
-__ZTIN9configmgr16OMergeRemoveNodeE=configmg.__ZTIN9configmgr16OMergeRemoveNodeE
-__ZTIN9configmgr16OPropagateLevelsE=configmg.__ZTIN9configmgr16OPropagateLevelsE
-__ZTIN9configmgr16UnoContextTunnel6TunnelE=configmg.__ZTIN9configmgr16UnoContextTunnel6TunnelE
-__ZTIN9configmgr17AttributeListImplE=configmg.__ZTIN9configmgr17AttributeListImplE
-__ZTIN9configmgr17BasicInnerElementE=configmg.__ZTIN9configmgr17BasicInnerElementE
-__ZTIN9configmgr17CacheClientAccessE=configmg.__ZTIN9configmgr17CacheClientAccessE
-__ZTIN9configmgr17ExtendedCacheDataE=configmg.__ZTIN9configmgr17ExtendedCacheDataE
-__ZTIN9configmgr17ExtendedCacheLineE=configmg.__ZTIN9configmgr17ExtendedCacheLineE
-__ZTIN9configmgr17OInnerGroupUpdateE=configmg.__ZTIN9configmgr17OInnerGroupUpdateE
-__ZTIN9configmgr17OMergeValueChangeE=configmg.__ZTIN9configmgr17OMergeValueChangeE
-__ZTIN9configmgr17TemplateCacheDataE=configmg.__ZTIN9configmgr17TemplateCacheDataE
-__ZTIN9configmgr18BasicUpdateElementE=configmg.__ZTIN9configmgr18BasicUpdateElementE
-__ZTIN9configmgr18CacheLoadingAccessE=configmg.__ZTIN9configmgr18CacheLoadingAccessE
-__ZTIN9configmgr18DisposingForwarderE=configmg.__ZTIN9configmgr18DisposingForwarderE
-__ZTIN9configmgr18IConfigBroadcasterE=configmg.__ZTIN9configmgr18IConfigBroadcasterE
-__ZTIN9configmgr18IConfigTreeManagerE=configmg.__ZTIN9configmgr18IConfigTreeManagerE
-__ZTIN9configmgr18OSetElementSetInfoE=configmg.__ZTIN9configmgr18OSetElementSetInfoE
-__ZTIN9configmgr19OInnerTreeSetUpdateE=configmg.__ZTIN9configmgr19OInnerTreeSetUpdateE
-__ZTIN9configmgr19ORootElementSetInfoE=configmg.__ZTIN9configmgr19ORootElementSetInfoE
-__ZTIN9configmgr20OCacheWriteScheduler5TimerE=configmg.__ZTIN9configmgr20OCacheWriteScheduler5TimerE
-__ZTIN9configmgr20OChangeActionCounterE=configmg.__ZTIN9configmgr20OChangeActionCounterE
-__ZTIN9configmgr20OCreateSubtreeActionE=configmg.__ZTIN9configmgr20OCreateSubtreeActionE
-__ZTIN9configmgr20OInnerValueSetUpdateE=configmg.__ZTIN9configmgr20OInnerValueSetUpdateE
-__ZTIN9configmgr20OMergeTreeChangeListE=configmg.__ZTIN9configmgr20OMergeTreeChangeListE
-__ZTIN9configmgr20OSetElementGroupInfoE=configmg.__ZTIN9configmgr20OSetElementGroupInfoE
-__ZTIN9configmgr20ServiceComponentImplE=configmg.__ZTIN9configmgr20ServiceComponentImplE
-__ZTIN9configmgr21ORootElementGroupInfoE=configmg.__ZTIN9configmgr21ORootElementGroupInfoE
-__ZTIN9configmgr21OSLInputStreamWrapperE=configmg.__ZTIN9configmgr21OSLInputStreamWrapperE
-__ZTIN9configmgr21OTreeDisposeScheduler5TimerE=configmg.__ZTIN9configmgr21OTreeDisposeScheduler5TimerE
-__ZTIN9configmgr21SubtreeChangeReferrerE=configmg.__ZTIN9configmgr21SubtreeChangeReferrerE
-__ZTIN9configmgr22ChangeTreeModificationE=configmg.__ZTIN9configmgr22ChangeTreeModificationE
-__ZTIN9configmgr22IConfigDefaultProviderE=configmg.__ZTIN9configmgr22IConfigDefaultProviderE
-__ZTIN9configmgr22IConfigTemplateManagerE=configmg.__ZTIN9configmgr22IConfigTemplateManagerE
-__ZTIN9configmgr22OConfigurationProviderE=configmg.__ZTIN9configmgr22OConfigurationProviderE
-__ZTIN9configmgr22OConfigurationRegistryE=configmg.__ZTIN9configmgr22OConfigurationRegistryE
-__ZTIN9configmgr22OSLOutputStreamWrapperE=configmg.__ZTIN9configmgr22OSLOutputStreamWrapperE
-__ZTIN9configmgr22OSetElementGroupUpdateE=configmg.__ZTIN9configmgr22OSetElementGroupUpdateE
-__ZTIN9configmgr23ConfigChangeBroadcasterE=configmg.__ZTIN9configmgr23ConfigChangeBroadcasterE
-__ZTIN9configmgr23IDefaultableTreeManagerE=configmg.__ZTIN9configmgr23IDefaultableTreeManagerE
-__ZTIN9configmgr23ORootElementGroupUpdateE=configmg.__ZTIN9configmgr23ORootElementGroupUpdateE
-__ZTIN9configmgr24OSetElementTreeSetUpdateE=configmg.__ZTIN9configmgr24OSetElementTreeSetUpdateE
-__ZTIN9configmgr25OConfigurationRegistryKeyE=configmg.__ZTIN9configmgr25OConfigurationRegistryKeyE
-__ZTIN9configmgr25ORootElementTreeSetUpdateE=configmg.__ZTIN9configmgr25ORootElementTreeSetUpdateE
-__ZTIN9configmgr25OSetElementValueSetUpdateE=configmg.__ZTIN9configmgr25OSetElementValueSetUpdateE
-__ZTIN9configmgr26OConfigurationProviderImplE=configmg.__ZTIN9configmgr26OConfigurationProviderImplE
-__ZTIN9configmgr26OProviderDisposingListenerE=configmg.__ZTIN9configmgr26OProviderDisposingListenerE
-__ZTIN9configmgr26ORootElementValueSetUpdateE=configmg.__ZTIN9configmgr26ORootElementValueSetUpdateE
-__ZTIN9configmgr26PropertiesFilteredNotifierE=configmg.__ZTIN9configmgr26PropertiesFilteredNotifierE
-__ZTIN9configmgr28ForwardTreeDifferenceBuilderE=configmg.__ZTIN9configmgr28ForwardTreeDifferenceBuilderE
-__ZTIN9configmgr29BackwardTreeDifferenceBuilderE=configmg.__ZTIN9configmgr29BackwardTreeDifferenceBuilderE
-__ZTIN9configmgr29OSLInputBufferedStreamWrapperE=configmg.__ZTIN9configmgr29OSLInputBufferedStreamWrapperE
-__ZTIN9configmgr3xml11BasicParserE=configmg.__ZTIN9configmgr3xml11BasicParserE
-__ZTIN9configmgr3xml11LayerParserE=configmg.__ZTIN9configmgr3xml11LayerParserE
-__ZTIN9configmgr3xml11LayerWriterE=configmg.__ZTIN9configmgr3xml11LayerWriterE
-__ZTIN9configmgr3xml12SchemaParserE=configmg.__ZTIN9configmgr3xml12SchemaParserE
-__ZTIN9configmgr3xml13ElementParser12BadValueTypeE=configmg.__ZTIN9configmgr3xml13ElementParser12BadValueTypeE
-__ZTIN9configmgr3xml13ParserServiceIN3com3sun4star13configuration7backend6XLayerEEE=configmg.__ZTIN9configmgr3xml13ParserServiceIN3com3sun4star13configuration7backend6XLayerEEE
-__ZTIN9configmgr3xml13ParserServiceIN3com3sun4star13configuration7backend7XSchemaEEE=configmg.__ZTIN9configmgr3xml13ParserServiceIN3com3sun4star13configuration7backend7XSchemaEEE
-__ZTIN9configmgr3xml13WriterServiceIN3com3sun4star13configuration7backend13XLayerHandlerEEE=configmg.__ZTIN9configmgr3xml13WriterServiceIN3com3sun4star13configuration7backend13XLayerHandlerEEE
-__ZTIN9configmgr3xml18LayerParserServiceE=configmg.__ZTIN9configmgr3xml18LayerParserServiceE
-__ZTIN9configmgr3xml19SchemaParserServiceE=configmg.__ZTIN9configmgr3xml19SchemaParserServiceE
-__ZTIN9configmgr4data10SetVisitorE=configmg.__ZTIN9configmgr4data10SetVisitorE
-__ZTIN9configmgr4data11NodeVisitorE=configmg.__ZTIN9configmgr4data11NodeVisitorE
-__ZTIN9configmgr4data11TreeSegment4ImplE=configmg.__ZTIN9configmgr4data11TreeSegment4ImplE
-__ZTIN9configmgr4data15TreeNodeBuilder12LinkSetNodesE=configmg.__ZTIN9configmgr4data15TreeNodeBuilder12LinkSetNodesE
-__ZTIN9configmgr4data20BasicDataTreeBuilderE=configmg.__ZTIN9configmgr4data20BasicDataTreeBuilderE
-__ZTIN9configmgr4data21ConvertingNodeBuilderE=configmg.__ZTIN9configmgr4data21ConvertingNodeBuilderE
-__ZTIN9configmgr4data21DataTreeDefaultMergerE=configmg.__ZTIN9configmgr4data21DataTreeDefaultMergerE
-__ZTIN9configmgr4data22CopyingDataTreeBuilder18ElementListBuilderE=configmg.__ZTIN9configmgr4data22CopyingDataTreeBuilder18ElementListBuilderE
-__ZTIN9configmgr4data22CopyingDataTreeBuilderE=configmg.__ZTIN9configmgr4data22CopyingDataTreeBuilderE
-__ZTIN9configmgr4data24ConvertingSubnodeBuilderE=configmg.__ZTIN9configmgr4data24ConvertingSubnodeBuilderE
-__ZTIN9configmgr4data25ConvertingDataTreeBuilder18ElementListBuilderE=configmg.__ZTIN9configmgr4data25ConvertingDataTreeBuilder18ElementListBuilderE
-__ZTIN9configmgr4data25ConvertingDataTreeBuilderE=configmg.__ZTIN9configmgr4data25ConvertingDataTreeBuilderE
-__ZTIN9configmgr4view11NodeFactoryE=configmg.__ZTIN9configmgr4view11NodeFactoryE
-__ZTIN9configmgr4view12ViewStrategyE=configmg.__ZTIN9configmgr4view12ViewStrategyE
-__ZTIN9configmgr4view18DirectViewStrategyE=configmg.__ZTIN9configmgr4view18DirectViewStrategyE
-__ZTIN9configmgr4view20DeferredViewStrategyE=configmg.__ZTIN9configmgr4view20DeferredViewStrategyE
-__ZTIN9configmgr4view20ReadOnlyViewStrategyE=configmg.__ZTIN9configmgr4view20ReadOnlyViewStrategyE
-__ZTIN9configmgr4view72_GLOBAL__N__ZNK9configmgr4view12ViewStrategy13checkInstanceERKNS0_4TreeE19GroupMemberDispatchE=configmg.__ZTIN9configmgr4view72_GLOBAL__N__ZNK9configmgr4view12ViewStrategy13checkInstanceERKNS0_4TreeE19GroupMemberDispatchE
-__ZTIN9configmgr5INodeE=configmg.__ZTIN9configmgr5INodeE
-__ZTIN9configmgr6ChangeE=configmg.__ZTIN9configmgr6ChangeE
-__ZTIN9configmgr6memory11HeapManagerE=configmg.__ZTIN9configmgr6memory11HeapManagerE
-__ZTIN9configmgr6memory14SimpleHeapLockE=configmg.__ZTIN9configmgr6memory14SimpleHeapLockE
-__ZTIN9configmgr6memory21SimpleHeapManagerBaseE=configmg.__ZTIN9configmgr6memory21SimpleHeapManagerBaseE
-__ZTIN9configmgr6memory25SimpleCheckingHeapManagerE=configmg.__ZTIN9configmgr6memory25SimpleCheckingHeapManagerE
-__ZTIN9configmgr6memory8DataLockE=configmg.__ZTIN9configmgr6memory8DataLockE
-__ZTIN9configmgr7AddNodeE=configmg.__ZTIN9configmgr7AddNodeE
-__ZTIN9configmgr7SubtreeE=configmg.__ZTIN9configmgr7SubtreeE
-__ZTIN9configmgr7backend10EmptyLayerE=configmg.__ZTIN9configmgr7backend10EmptyLayerE
-__ZTIN9configmgr7backend10NodeUpdateE=configmg.__ZTIN9configmgr7backend10NodeUpdateE
-__ZTIN9configmgr7backend11NamedUpdateE=configmg.__ZTIN9configmgr7backend11NamedUpdateE
-__ZTIN9configmgr7backend11NodeReplaceE=configmg.__ZTIN9configmgr7backend11NodeReplaceE
-__ZTIN9configmgr7backend11PropertyAddE=configmg.__ZTIN9configmgr7backend11PropertyAddE
-__ZTIN9configmgr7backend12ResultHolderINS0_12NodeInstanceEE10RCInstanceE=configmg.__ZTIN9configmgr7backend12ResultHolderINS0_12NodeInstanceEE10RCInstanceE
-__ZTIN9configmgr7backend12ResultHolderINS0_16TemplateInstanceEE10RCInstanceE=configmg.__ZTIN9configmgr7backend12ResultHolderINS0_16TemplateInstanceEE10RCInstanceE
-__ZTIN9configmgr7backend12ResultHolderINS0_17ComponentInstanceEE10RCInstanceE=configmg.__ZTIN9configmgr7backend12ResultHolderINS0_17ComponentInstanceEE10RCInstanceE
-__ZTIN9configmgr7backend13BackendAccessE=configmg.__ZTIN9configmgr7backend13BackendAccessE
-__ZTIN9configmgr7backend13ElementUpdateE=configmg.__ZTIN9configmgr7backend13ElementUpdateE
-__ZTIN9configmgr7backend13ImportServiceE=configmg.__ZTIN9configmgr7backend13ImportServiceE
-__ZTIN9configmgr7backend13PropertyResetE=configmg.__ZTIN9configmgr7backend13PropertyResetE
-__ZTIN9configmgr7backend13SchemaBuilderE=configmg.__ZTIN9configmgr7backend13SchemaBuilderE
-__ZTIN9configmgr7backend13UpdateServiceE=configmg.__ZTIN9configmgr7backend13UpdateServiceE
-__ZTIN9configmgr7backend14PropertyUpdateE=configmg.__ZTIN9configmgr7backend14PropertyUpdateE
-__ZTIN9configmgr7backend15CacheControllerE=configmg.__ZTIN9configmgr7backend15CacheControllerE
-__ZTIN9configmgr7backend16NodeModificationE=configmg.__ZTIN9configmgr7backend16NodeModificationE
-__ZTIN9configmgr7backend16UpdateDispatcherE=configmg.__ZTIN9configmgr7backend16UpdateDispatcherE
-__ZTIN9configmgr7backend17BasicUpdateMergerE=configmg.__ZTIN9configmgr7backend17BasicUpdateMergerE
-__ZTIN9configmgr7backend17BinaryReader_ImplE=configmg.__ZTIN9configmgr7backend17BinaryReader_ImplE
-__ZTIN9configmgr7backend17CopyImportServiceE=configmg.__ZTIN9configmgr7backend17CopyImportServiceE
-__ZTIN9configmgr7backend17INodeDataListenerE=configmg.__ZTIN9configmgr7backend17INodeDataListenerE
-__ZTIN9configmgr7backend17INodeDataProviderE=configmg.__ZTIN9configmgr7backend17INodeDataProviderE
-__ZTIN9configmgr7backend17LayerMergeHandlerE=configmg.__ZTIN9configmgr7backend17LayerMergeHandlerE
-__ZTIN9configmgr7backend17LayerUpdateMergerE=configmg.__ZTIN9configmgr7backend17LayerUpdateMergerE
-__ZTIN9configmgr7backend17RequireEmptyLayerE=configmg.__ZTIN9configmgr7backend17RequireEmptyLayerE
-__ZTIN9configmgr7backend18BasicImportHandlerE=configmg.__ZTIN9configmgr7backend18BasicImportHandlerE
-__ZTIN9configmgr7backend18BinaryWriteHandlerE=configmg.__ZTIN9configmgr7backend18BinaryWriteHandlerE
-__ZTIN9configmgr7backend18ImportMergeHandlerE=configmg.__ZTIN9configmgr7backend18ImportMergeHandlerE
-__ZTIN9configmgr7backend18LayerUpdateHandlerE=configmg.__ZTIN9configmgr7backend18LayerUpdateHandlerE
-__ZTIN9configmgr7backend18MergeImportServiceE=configmg.__ZTIN9configmgr7backend18MergeImportServiceE
-__ZTIN9configmgr7backend19ICachedDataListenerE=configmg.__ZTIN9configmgr7backend19ICachedDataListenerE
-__ZTIN9configmgr7backend19ICachedDataNotifierE=configmg.__ZTIN9configmgr7backend19ICachedDataNotifierE
-__ZTIN9configmgr7backend19ICachedDataProviderE=configmg.__ZTIN9configmgr7backend19ICachedDataProviderE
-__ZTIN9configmgr7backend19IDirectDataProviderE=configmg.__ZTIN9configmgr7backend19IDirectDataProviderE
-__ZTIN9configmgr7backend19IMergedDataProviderE=configmg.__ZTIN9configmgr7backend19IMergedDataProviderE
-__ZTIN9configmgr7backend19INodeUpdateProviderE=configmg.__ZTIN9configmgr7backend19INodeUpdateProviderE
-__ZTIN9configmgr7backend19LayerDefaultRemoverE=configmg.__ZTIN9configmgr7backend19LayerDefaultRemoverE
-__ZTIN9configmgr7backend19MultiStratumBackendE=configmg.__ZTIN9configmgr7backend19MultiStratumBackendE
-__ZTIN9configmgr7backend20IDefaultDataProviderE=configmg.__ZTIN9configmgr7backend20IDefaultDataProviderE
-__ZTIN9configmgr7backend20SingleBackendAdapterE=configmg.__ZTIN9configmgr7backend20SingleBackendAdapterE
-__ZTIN9configmgr7backend21BackendChangeNotifierE=configmg.__ZTIN9configmgr7backend21BackendChangeNotifierE
-__ZTIN9configmgr7backend21BackendStrataListenerE=configmg.__ZTIN9configmgr7backend21BackendStrataListenerE
-__ZTIN9configmgr7backend21IDataProviderMetaDataE=configmg.__ZTIN9configmgr7backend21IDataProviderMetaDataE
-__ZTIN9configmgr7backend21ITemplateDataProviderE=configmg.__ZTIN9configmgr7backend21ITemplateDataProviderE
-__ZTIN9configmgr7backend21OInvalidateTreeThreadE=configmg.__ZTIN9configmgr7backend21OInvalidateTreeThreadE
-__ZTIN9configmgr7backend22CacheChangeMulticasterE=configmg.__ZTIN9configmgr7backend22CacheChangeMulticasterE
-__ZTIN9configmgr7backend22IComponentDataProviderE=configmg.__ZTIN9configmgr7backend22IComponentDataProviderE
-__ZTIN9configmgr7backend8NodeDropE=configmg.__ZTIN9configmgr7backend8NodeDropE
-__ZTIN9configmgr7localbe16LocalDataStratumE=configmg.__ZTIN9configmgr7localbe16LocalDataStratumE
-__ZTIN9configmgr7localbe16LocalStratumBaseE=configmg.__ZTIN9configmgr7localbe16LocalStratumBaseE
-__ZTIN9configmgr7localbe17LocalMultiStratumE=configmg.__ZTIN9configmgr7localbe17LocalMultiStratumE
-__ZTIN9configmgr7localbe17LocalOutputStreamE=configmg.__ZTIN9configmgr7localbe17LocalOutputStreamE
-__ZTIN9configmgr7localbe18FlatLocalFileLayerE=configmg.__ZTIN9configmgr7localbe18FlatLocalFileLayerE
-__ZTIN9configmgr7localbe18LocalSingleBackendE=configmg.__ZTIN9configmgr7localbe18LocalSingleBackendE
-__ZTIN9configmgr7localbe18LocalSingleStratumE=configmg.__ZTIN9configmgr7localbe18LocalSingleStratumE
-__ZTIN9configmgr7localbe19BasicLocalFileLayerE=configmg.__ZTIN9configmgr7localbe19BasicLocalFileLayerE
-__ZTIN9configmgr7localbe19LayerPropertyHelperE=configmg.__ZTIN9configmgr7localbe19LayerPropertyHelperE
-__ZTIN9configmgr7localbe19LocalSchemaSupplierE=configmg.__ZTIN9configmgr7localbe19LocalSchemaSupplierE
-__ZTIN9configmgr7localbe20LocalReadonlyStratumE=configmg.__ZTIN9configmgr7localbe20LocalReadonlyStratumE
-__ZTIN9configmgr7localbe20LocalResourceStratumE=configmg.__ZTIN9configmgr7localbe20LocalResourceStratumE
-__ZTIN9configmgr7localbe20SimpleLocalFileLayerE=configmg.__ZTIN9configmgr7localbe20SimpleLocalFileLayerE
-__ZTIN9configmgr7localbe22LocalDataImportServiceE=configmg.__ZTIN9configmgr7localbe22LocalDataImportServiceE
-__ZTIN9configmgr7localbe22LocalSingleStratumBaseE=configmg.__ZTIN9configmgr7localbe22LocalSingleStratumBaseE
-__ZTIN9configmgr7localbe23CompositeLocalFileLayerE=configmg.__ZTIN9configmgr7localbe23CompositeLocalFileLayerE
-__ZTIN9configmgr7localbe23LocalStratumMutexHolderE=configmg.__ZTIN9configmgr7localbe23LocalStratumMutexHolderE
-__ZTIN9configmgr7localbe27FullCompositeLocalFileLayerE=configmg.__ZTIN9configmgr7localbe27FullCompositeLocalFileLayerE
-__ZTIN9configmgr7localbe28BasicCompositeLocalFileLayerE=configmg.__ZTIN9configmgr7localbe28BasicCompositeLocalFileLayerE
-__ZTIN9configmgr7localbe28LocalHierarchyBrowserServiceE=configmg.__ZTIN9configmgr7localbe28LocalHierarchyBrowserServiceE
-__ZTIN9configmgr8BasicSetE=configmg.__ZTIN9configmgr8BasicSetE
-__ZTIN9configmgr8ISubtreeE=configmg.__ZTIN9configmgr8ISubtreeE
-__ZTIN9configmgr8OOptionsE=configmg.__ZTIN9configmgr8OOptionsE
-__ZTIN9configmgr9CacheDataE=configmg.__ZTIN9configmgr9CacheDataE
-__ZTIN9configmgr9CacheLineE=configmg.__ZTIN9configmgr9CacheLineE
-__ZTIN9configmgr9OProviderE=configmg.__ZTIN9configmgr9OProviderE
-__ZTIN9configmgr9ValueNodeE=configmg.__ZTIN9configmgr9ValueNodeE
-__ZTIN9configmgr9apihelper15BroadcasterBaseE=configmg.__ZTIN9configmgr9apihelper15BroadcasterBaseE
-__ZTIN9configmgr9apihelper17PropertySetHelperE=configmg.__ZTIN9configmgr9apihelper17PropertySetHelperE
-__ZTIN9configmgr9apihelper18InteractionRequestE=configmg.__ZTIN9configmgr9apihelper18InteractionRequestE
-__ZTIN9configmgr9apihelper23InteractionContinuationIN3com3sun4star4task17XInteractionAbortEEE=configmg.__ZTIN9configmgr9apihelper23InteractionContinuationIN3com3sun4star4task17XInteractionAbortEEE
-__ZTIN9configmgr9apihelper23InteractionContinuationIN3com3sun4star4task17XInteractionRetryEEE=configmg.__ZTIN9configmgr9apihelper23InteractionContinuationIN3com3sun4star4task17XInteractionRetryEEE
-__ZTIN9configmgr9apihelper23InteractionContinuationIN3com3sun4star4task19XInteractionApproveEEE=configmg.__ZTIN9configmgr9apihelper23InteractionContinuationIN3com3sun4star4task19XInteractionApproveEEE
-__ZTIN9configmgr9apihelper23InteractionContinuationIN3com3sun4star4task22XInteractionDisapproveEEE=configmg.__ZTIN9configmgr9apihelper23InteractionContinuationIN3com3sun4star4task22XInteractionDisapproveEEE
-__ZTIN9configmgr9apihelper24SimpleInteractionRequestE=configmg.__ZTIN9configmgr9apihelper24SimpleInteractionRequestE
-__ZTIN9configmgr9apihelper31ConfigurationInteractionHandler7ContextE=configmg.__ZTIN9configmgr9apihelper31ConfigurationInteractionHandler7ContextE
-__ZTIN9configmgr9configapi10NodeAccessE=configmg.__ZTIN9configmgr9configapi10NodeAccessE
-__ZTIN9configmgr9configapi10SetElementE=configmg.__ZTIN9configmgr9configapi10SetElementE
-__ZTIN9configmgr9configapi11ApiTreeImpl16ComponentAdapterE=configmg.__ZTIN9configmgr9configapi11ApiTreeImpl16ComponentAdapterE
-__ZTIN9configmgr9configapi11Broadcaster4ImplE=configmg.__ZTIN9configmgr9configapi11Broadcaster4ImplE
-__ZTIN9configmgr9configapi11NodeElementE=configmg.__ZTIN9configmgr9configapi11NodeElementE
-__ZTIN9configmgr9configapi11OSetElementINS0_15NodeGroupAccessEEE=configmg.__ZTIN9configmgr9configapi11OSetElementINS0_15NodeGroupAccessEEE
-__ZTIN9configmgr9configapi11OSetElementINS0_17NodeSetInfoAccessEEE=configmg.__ZTIN9configmgr9configapi11OSetElementINS0_17NodeSetInfoAccessEEE
-__ZTIN9configmgr9configapi11OSetElementINS0_17NodeTreeSetAccessEEE=configmg.__ZTIN9configmgr9configapi11OSetElementINS0_17NodeTreeSetAccessEEE
-__ZTIN9configmgr9configapi11OSetElementINS0_18NodeValueSetAccessEEE=configmg.__ZTIN9configmgr9configapi11OSetElementINS0_18NodeValueSetAccessEEE
-__ZTIN9configmgr9configapi11OSetElementINS0_19NodeGroupInfoAccessEEE=configmg.__ZTIN9configmgr9configapi11OSetElementINS0_19NodeGroupInfoAccessEEE
-__ZTIN9configmgr9configapi11RootElementE=configmg.__ZTIN9configmgr9configapi11RootElementE
-__ZTIN9configmgr9configapi11TreeElementE=configmg.__ZTIN9configmgr9configapi11TreeElementE
-__ZTIN9configmgr9configapi12InnerElementE=configmg.__ZTIN9configmgr9configapi12InnerElementE
-__ZTIN9configmgr9configapi12NotifierImplE=configmg.__ZTIN9configmgr9configapi12NotifierImplE
-__ZTIN9configmgr9configapi13NodeSetAccessE=configmg.__ZTIN9configmgr9configapi13NodeSetAccessE
-__ZTIN9configmgr9configapi13OInnerElementINS0_15NodeGroupAccessEEE=configmg.__ZTIN9configmgr9configapi13OInnerElementINS0_15NodeGroupAccessEEE
-__ZTIN9configmgr9configapi13OInnerElementINS0_17NodeSetInfoAccessEEE=configmg.__ZTIN9configmgr9configapi13OInnerElementINS0_17NodeSetInfoAccessEEE
-__ZTIN9configmgr9configapi13OInnerElementINS0_17NodeTreeSetAccessEEE=configmg.__ZTIN9configmgr9configapi13OInnerElementINS0_17NodeTreeSetAccessEEE
-__ZTIN9configmgr9configapi13OInnerElementINS0_18NodeValueSetAccessEEE=configmg.__ZTIN9configmgr9configapi13OInnerElementINS0_18NodeValueSetAccessEEE
-__ZTIN9configmgr9configapi13OInnerElementINS0_19NodeGroupInfoAccessEEE=configmg.__ZTIN9configmgr9configapi13OInnerElementINS0_19NodeGroupInfoAccessEEE
-__ZTIN9configmgr9configapi14ObjectRegistryE=configmg.__ZTIN9configmgr9configapi14ObjectRegistryE
-__ZTIN9configmgr9configapi15ApiRootTreeImpl12NodeListenerE=configmg.__ZTIN9configmgr9configapi15ApiRootTreeImpl12NodeListenerE
-__ZTIN9configmgr9configapi15NodeGroupAccessE=configmg.__ZTIN9configmgr9configapi15NodeGroupAccessE
-__ZTIN9configmgr9configapi16CollectNodeNamesE=configmg.__ZTIN9configmgr9configapi16CollectNodeNamesE
-__ZTIN9configmgr9configapi16OReadRootElementINS0_17NodeSetInfoAccessEEE=configmg.__ZTIN9configmgr9configapi16OReadRootElementINS0_17NodeSetInfoAccessEEE
-__ZTIN9configmgr9configapi16OReadRootElementINS0_19NodeGroupInfoAccessEEE=configmg.__ZTIN9configmgr9configapi16OReadRootElementINS0_19NodeGroupInfoAccessEEE
-__ZTIN9configmgr9configapi17CollectPropertiesE=configmg.__ZTIN9configmgr9configapi17CollectPropertiesE
-__ZTIN9configmgr9configapi17NodeSetInfoAccessE=configmg.__ZTIN9configmgr9configapi17NodeSetInfoAccessE
-__ZTIN9configmgr9configapi17NodeTreeSetAccessE=configmg.__ZTIN9configmgr9configapi17NodeTreeSetAccessE
-__ZTIN9configmgr9configapi17UpdateRootElementE=configmg.__ZTIN9configmgr9configapi17UpdateRootElementE
-__ZTIN9configmgr9configapi18NodeValueSetAccessE=configmg.__ZTIN9configmgr9configapi18NodeValueSetAccessE
-__ZTIN9configmgr9configapi18OUpdateRootElementINS0_15NodeGroupAccessEEE=configmg.__ZTIN9configmgr9configapi18OUpdateRootElementINS0_15NodeGroupAccessEEE
-__ZTIN9configmgr9configapi18OUpdateRootElementINS0_17NodeTreeSetAccessEEE=configmg.__ZTIN9configmgr9configapi18OUpdateRootElementINS0_17NodeTreeSetAccessEEE
-__ZTIN9configmgr9configapi18OUpdateRootElementINS0_18NodeValueSetAccessEEE=configmg.__ZTIN9configmgr9configapi18OUpdateRootElementINS0_18NodeValueSetAccessEEE
-__ZTIN9configmgr9configapi19CollectPropertyInfoE=configmg.__ZTIN9configmgr9configapi19CollectPropertyInfoE
-__ZTIN9configmgr9configapi19NodeGroupInfoAccessE=configmg.__ZTIN9configmgr9configapi19NodeGroupInfoAccessE
-__ZTIN9configmgr9configapi19NodePropertySetInfoE=configmg.__ZTIN9configmgr9configapi19NodePropertySetInfoE
-__ZTIN9configmgr9configapi19UpdateObjectFactoryE=configmg.__ZTIN9configmgr9configapi19UpdateObjectFactoryE
-__ZTIN9configmgr9configapi21ReadOnlyObjectFactoryE=configmg.__ZTIN9configmgr9configapi21ReadOnlyObjectFactoryE
-__ZTIN9configmgr9configapi7FactoryE=configmg.__ZTIN9configmgr9configapi7FactoryE
-__ZTIN9configmgr9configapi8internal15SearchExactNameE=configmg.__ZTIN9configmgr9configapi8internal15SearchExactNameE
-__ZTIN9salhelper21SimpleReferenceObjectE=configmg.__ZTIN9salhelper21SimpleReferenceObjectE
-
-EXPORTS
-__ZTIN3com3sun4star3ucb31InteractiveAugmentedIOExceptionE
-__ZTIN3com3sun4star3ucb22InteractiveIOExceptionE
-__ZTIN3com3sun4star4task28ClassifiedInteractionRequestE
-__ZTIN3com3sun4star3ucb18NameClashExceptionE
-__ZTIN3com3sun4star3ucb27UnsupportedCommandExceptionE
-IMPORTS
-__ZTIN3com3sun4star3ucb31InteractiveAugmentedIOExceptionE=ucpfile1.__ZTIN3com3sun4star3ucb31InteractiveAugmentedIOExceptionE
-__ZTIN3com3sun4star3ucb22InteractiveIOExceptionE=ucpfile1.__ZTIN3com3sun4star3ucb22InteractiveIOExceptionE
-__ZTIN3com3sun4star4task28ClassifiedInteractionRequestE=ucpfile1.__ZTIN3com3sun4star4task28ClassifiedInteractionRequestE
-__ZTIN3com3sun4star3ucb18NameClashExceptionE=ucpfile1.__ZTIN3com3sun4star3ucb18NameClashExceptionE
-__ZTIN3com3sun4star3ucb27UnsupportedCommandExceptionE=ucpfile1.__ZTIN3com3sun4star3ucb27UnsupportedCommandExceptionE
-
-EXPORTS
-__ZTIN3com3sun4star3ucb34InteractiveBadTransferURLExceptionE
-IMPORTS
-__ZTIN3com3sun4star3ucb34InteractiveBadTransferURLExceptionE=ucb1.__ZTIN3com3sun4star3ucb34InteractiveBadTransferURLExceptionE
diff --git a/bridges/source/cpp_uno/gcc3_os2_intel/except.cxx b/bridges/source/cpp_uno/gcc3_os2_intel/except.cxx
deleted file mode 100644
index 6ba8b2e319b5..000000000000
--- a/bridges/source/cpp_uno/gcc3_os2_intel/except.cxx
+++ /dev/null
@@ -1,349 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include <stdio.h>
-#include <dlfcn.h>
-#include <cxxabi.h>
-#include <hash_map>
-
-#include <rtl/strbuf.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <osl/diagnose.h>
-#include <osl/mutex.hxx>
-
-#include <com/sun/star/uno/genfunc.hxx>
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include <typelib/typedescription.hxx>
-#include <uno/any2.h>
-
-#include "share.hxx"
-
-#ifdef TEST
-#include "test/TestBridgeException.hpp"
-#endif
-
-using namespace ::std;
-using namespace ::osl;
-using namespace ::rtl;
-using namespace ::com::sun::star::uno;
-using namespace ::__cxxabiv1;
-
-//==================================================================================================
-//YD static handle to this dll, to allow rtti symbol lookup
-static void* hmod;
-
-//==================================================================================================
-//YD required to run test programs, because exe cannot export symbols!
-#ifdef TEST
-using namespace ::test;
-
-void dymmy_TestBridgeException() throw( ::test::TestBridgeException)
-{
- throw TestBridgeException();
-}
-#endif
-
-//==================================================================================================
-namespace CPPU_CURRENT_NAMESPACE
-{
-
-void dummy_can_throw_anything( char const * )
-{
-}
-
-//==================================================================================================
-static OUString toUNOname( char const * p ) SAL_THROW( () )
-{
-#if OSL_DEBUG_LEVEL > 1
- char const * start = p;
-#endif
-
- // example: N3com3sun4star4lang24IllegalArgumentExceptionE
-
- OUStringBuffer buf( 64 );
- OSL_ASSERT( 'N' == *p );
- ++p; // skip N
-
- while ('E' != *p)
- {
- // read chars count
- long n = (*p++ - '0');
- while ('0' <= *p && '9' >= *p)
- {
- n *= 10;
- n += (*p++ - '0');
- }
- buf.appendAscii( p, n );
- p += n;
- if ('E' != *p)
- buf.append( (sal_Unicode)'.' );
- }
-
-#if OSL_DEBUG_LEVEL > 1
- OUString ret( buf.makeStringAndClear() );
- OString c_ret( OUStringToOString( ret, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> toUNOname(): %s => %s\n", start, c_ret.getStr() );
- return ret;
-#else
- return buf.makeStringAndClear();
-#endif
-}
-
-//==================================================================================================
-class RTTI
-{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
-
- Mutex m_mutex;
- t_rtti_map m_rttis;
- t_rtti_map m_generatedRttis;
-
- //void * m_hApp;
-
-public:
- RTTI() SAL_THROW( () );
- ~RTTI() SAL_THROW( () );
-
- type_info * getRTTI( typelib_CompoundTypeDescription * ) SAL_THROW( () );
-};
-//__________________________________________________________________________________________________
-RTTI::RTTI() SAL_THROW( () )
-// : m_hApp( dlopen( 0, RTLD_LAZY ) )
-{
-}
-//__________________________________________________________________________________________________
-RTTI::~RTTI() SAL_THROW( () )
-{
-// dlclose( m_hApp );
-}
-
-//__________________________________________________________________________________________________
-type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THROW( () )
-{
- type_info * rtti = NULL;
-
- OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName;
-
- MutexGuard guard( m_mutex );
- t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) );
- if (iFind == m_rttis.end())
- {
- // RTTI symbol
- OStringBuffer buf( 64 );
- buf.append( RTL_CONSTASCII_STRINGPARAM("__ZTIN") );
- sal_Int32 index = 0;
- do
- {
- OUString token( unoName.getToken( 0, '.', index ) );
- buf.append( token.getLength() );
- OString c_token( OUStringToOString( token, RTL_TEXTENCODING_ASCII_US ) );
- buf.append( c_token );
- }
- while (index >= 0);
- buf.append( 'E' );
-
- OString symName( buf.makeStringAndClear() );
- //rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
- if (hmod == NULL)
- hmod = dlopen( "gcc3_uno.dll", 0);
-
- if (hmod)
- rtti = (type_info *)dlsym( hmod, symName.getStr() );
-
- if (rtti)
- {
- pair< t_rtti_map::iterator, bool > insertion(
- m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
- OSL_ENSURE( insertion.second, "### inserting new rtti failed?!" );
- }
- else
- {
- // try to lookup the symbol in the generated rtti map
- t_rtti_map::const_iterator iFind( m_generatedRttis.find( unoName ) );
- if (iFind == m_generatedRttis.end())
- {
- // we must generate it !
- // symbol and rtti-name is nearly identical,
- // the symbol is prefixed with __ZTI
- char const * rttiName = symName.getStr() +5;
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr,"generated rtti for %s\n", rttiName );
-#endif
- if (pTypeDescr->pBaseTypeDescription)
- {
- // ensure availability of base
- type_info * base_rtti = getRTTI(
- (typelib_CompoundTypeDescription *)pTypeDescr->pBaseTypeDescription );
- rtti = new __si_class_type_info(
- strdup( rttiName ), (__class_type_info *)base_rtti );
- }
- else
- {
- // this class has no base class
- rtti = new __class_type_info( strdup( rttiName ) );
- }
-
- pair< t_rtti_map::iterator, bool > insertion(
- m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
- OSL_ENSURE( insertion.second, "### inserting new generated rtti failed?!" );
- }
- else // taking already generated rtti
- {
- rtti = iFind->second;
- }
- }
- }
- else
- {
- rtti = iFind->second;
- }
-
- return rtti;
-}
-
-//--------------------------------------------------------------------------------------------------
-static void deleteException( void * pExc )
-{
- __cxa_exception const * header = ((__cxa_exception const *)pExc - 1);
- typelib_TypeDescription * pTD = 0;
- OUString unoName( toUNOname( header->exceptionType->name() ) );
- ::typelib_typedescription_getByName( &pTD, unoName.pData );
- OSL_ENSURE( pTD, "### unknown exception type! leaving out destruction => leaking!!!" );
- if (pTD)
- {
- ::uno_destructData( pExc, pTD, cpp_release );
- ::typelib_typedescription_release( pTD );
- }
-}
-
-//==================================================================================================
-void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
-{
-#if OSL_DEBUG_LEVEL > 1
- OString cstr(
- OUStringToOString(
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
-#endif
- void * pCppExc;
- type_info * rtti;
-
- {
- // construct cpp exception object
- typelib_TypeDescription * pTypeDescr = 0;
- TYPELIB_DANGER_GET( &pTypeDescr, pUnoExc->pType );
- OSL_ASSERT( pTypeDescr );
- if (! pTypeDescr)
- {
- throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("cannot get typedescription for type ") ) +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
- }
-
- pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
- ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp );
-
- // destruct uno exception
- ::uno_any_destruct( pUnoExc, 0 );
- // avoiding locked counts
- static RTTI * s_rtti = 0;
- if (! s_rtti)
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if (! s_rtti)
- {
-#ifdef LEAK_STATIC_DATA
- s_rtti = new RTTI();
-#else
- static RTTI rtti_data;
- s_rtti = &rtti_data;
-#endif
- }
- }
- rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
- if (! rtti)
- {
- throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("no rtti for type ") ) +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
- }
- }
-
- __cxa_throw( pCppExc, rtti, deleteException );
-}
-
-//==================================================================================================
-void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping * pCpp2Uno )
-{
- if (! header)
- {
- RuntimeException aRE(
- OUString( RTL_CONSTASCII_USTRINGPARAM("no exception header!") ),
- Reference< XInterface >() );
- Type const & rType = ::getCppuType( &aRE );
- uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
-#if OSL_DEBUG_LEVEL > 0
- OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
-#endif
- return;
- }
-
- typelib_TypeDescription * pExcTypeDescr = 0;
- OUString unoName( toUNOname( header->exceptionType->name() ) );
-#if OSL_DEBUG_LEVEL > 1
- OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
-#endif
- typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
- if (0 == pExcTypeDescr)
- {
- RuntimeException aRE(
- OUString( RTL_CONSTASCII_USTRINGPARAM("exception type not found: ") ) + unoName,
- Reference< XInterface >() );
- Type const & rType = ::getCppuType( &aRE );
- uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
-#if OSL_DEBUG_LEVEL > 0
- OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
-#endif
- }
- else
- {
- // construct uno exception any
- uno_any_constructAndConvert( pUnoExc, header->adjustedPtr, pExcTypeDescr, pCpp2Uno );
- typelib_typedescription_release( pExcTypeDescr );
- }
-}
-
-}
-
diff --git a/bridges/source/cpp_uno/gcc3_os2_intel/makefile.mk b/bridges/source/cpp_uno/gcc3_os2_intel/makefile.mk
deleted file mode 100644
index 641eef166cfd..000000000000
--- a/bridges/source/cpp_uno/gcc3_os2_intel/makefile.mk
+++ /dev/null
@@ -1,73 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=bridges
-TARGET=gcc3_uno
-LIBTARGET=no
-ENABLE_EXCEPTIONS=TRUE
-NO_BSYMBOLIC=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCOS2Igcc3"
-
-.IF "$(cppu_no_leak)" == ""
-CFLAGS += -DLEAK_STATIC_DATA
-.ENDIF
-
-CFLAGSNOOPT=-O0
-
-SLOFILES= \
- $(SLO)$/except.obj \
- $(SLO)$/cpp2uno.obj \
- $(SLO)$/uno2cpp.obj
-
-SHL1TARGET= $(TARGET)
-
-SHL1DEF=defs$/gcc3_uno.def
-SHL1IMPLIB=i$(TARGET)
-SHL1VERSIONMAP=..$/..$/bridge_exports.map
-
-SHL1OBJS = $(SLOFILES)
-SHL1LIBS = $(SLB)$/cpp_uno_shared.lib
-
-SHL1STDLIBS= \
- $(CPPULIB) \
- $(SALLIB)
-
-.ENDIF
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/bridges/source/cpp_uno/gcc3_os2_intel/share.hxx b/bridges/source/cpp_uno/gcc3_os2_intel/share.hxx
deleted file mode 100644
index 930094738b20..000000000000
--- a/bridges/source/cpp_uno/gcc3_os2_intel/share.hxx
+++ /dev/null
@@ -1,90 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "uno/mapping.h"
-
-#include <typeinfo>
-#include <exception>
-#include <cstddef>
-
-namespace CPPU_CURRENT_NAMESPACE
-{
-
-void dummy_can_throw_anything( char const * );
-
-// ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
-
-struct _Unwind_Exception
-{
- unsigned exception_class __attribute__((__mode__(__DI__)));
- void * exception_cleanup;
- unsigned private_1 __attribute__((__mode__(__word__)));
- unsigned private_2 __attribute__((__mode__(__word__)));
-} __attribute__((__aligned__));
-
-struct __cxa_exception
-{
- ::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
- ::std::unexpected_handler unexpectedHandler;
- ::std::terminate_handler terminateHandler;
-
- __cxa_exception *nextException;
-
- int handlerCount;
-
- int handlerSwitchValue;
- const unsigned char *actionRecord;
- const unsigned char *languageSpecificData;
- void *catchTemp;
- void *adjustedPtr;
-
- _Unwind_Exception unwindHeader;
-};
-
-extern "C" void *__cxa_allocate_exception(
- std::size_t thrown_size ) throw();
-extern "C" void __cxa_throw (
- void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
-
-struct __cxa_eh_globals
-{
- __cxa_exception *caughtExceptions;
- unsigned int uncaughtExceptions;
-};
-extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
-
-// -----
-
-//==================================================================================================
-void raiseException(
- uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
-//==================================================================================================
-void fillUnoException(
- __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
-}
diff --git a/bridges/source/cpp_uno/gcc3_os2_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_os2_intel/uno2cpp.cxx
deleted file mode 100644
index fb0ce5ff3cf2..000000000000
--- a/bridges/source/cpp_uno/gcc3_os2_intel/uno2cpp.cxx
+++ /dev/null
@@ -1,451 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include <malloc.h>
-#include <sal/alloca.h>
-
-#include <com/sun/star/uno/genfunc.hxx>
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include <uno/data.h>
-
-#include "bridges/cpp_uno/shared/bridge.hxx"
-#include "bridges/cpp_uno/shared/types.hxx"
-#include "bridges/cpp_uno/shared/unointerfaceproxy.hxx"
-#include "bridges/cpp_uno/shared/vtables.hxx"
-
-#include "share.hxx"
-
-using namespace ::rtl;
-using namespace ::com::sun::star::uno;
-
-namespace
-{
-
-//==================================================================================================
-// The call instruction within the asm section of callVirtualMethod may throw
-// exceptions. So that the compiler handles this correctly, it is important
-// that (a) callVirtualMethod might call dummy_can_throw_anything (although this
-// never happens at runtime), which in turn can throw exceptions, and (b)
-// callVirtualMethod is not inlined at its call site (so that any exceptions are
-// caught which are thrown from the instruction calling callVirtualMethod):
-static void callVirtualMethod(
- void * pAdjustedThisPtr,
- sal_Int32 nVtableIndex,
- void * pRegisterReturn,
- typelib_TypeClass eReturnType,
- sal_Int32 * pStackLongs,
- sal_Int32 nStackLongs );
-// __attribute__((noinline));
-
-//==================================================================================================
-static void callVirtualMethod(
- void * pAdjustedThisPtr,
- sal_Int32 nVtableIndex,
- void * pRegisterReturn,
- typelib_TypeClass eReturnType,
- sal_Int32 * pStackLongs,
- sal_Int32 nStackLongs )
-{
- // parameter list is mixed list of * and values
- // reference parameters are pointers
-
- OSL_ENSURE( pStackLongs && pAdjustedThisPtr, "### null ptr!" );
- OSL_ENSURE( (sizeof(void *) == 4) && (sizeof(sal_Int32) == 4), "### unexpected size of int!" );
- OSL_ENSURE( nStackLongs && pStackLongs, "### no stack in callVirtualMethod !" );
-
- // never called
- if (! pAdjustedThisPtr) CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something
-
- /* figure out the address of the function we need to invoke */
- unsigned long * mfunc; // actual function to be invoked
- int off; // offset used to find function
- void (*ptr)();
- off = nVtableIndex;
- off = off * 4; // 4 bytes per slot
- mfunc = *((unsigned long **)pAdjustedThisPtr); // get the address of the vtable
- mfunc = (unsigned long *)((char *)mfunc + off); // get the address from the vtable entry at offset
- mfunc = *((unsigned long **)mfunc); // the function is stored at the address
- ptr = (void (*)())mfunc;
-
- volatile long edx = 0, eax = 0; // for register returns
- void * stackptr;
- asm volatile (
- "mov %%esp, %6\n\t"
- // copy values
- "mov %0, %%eax\n\t"
- "mov %%eax, %%edx\n\t"
- "dec %%edx\n\t"
- "shl $2, %%edx\n\t"
- "add %1, %%edx\n"
- "Lcopy:\n\t"
- "pushl 0(%%edx)\n\t"
- "sub $4, %%edx\n\t"
- "dec %%eax\n\t"
- "jne Lcopy\n\t"
- :
- : "m"(nStackLongs), "m"(pStackLongs), "m"(pAdjustedThisPtr),
- "m"(nVtableIndex), "m"(eax), "m"(edx), "m"(stackptr)
- : "eax", "edx" );
-
- (*ptr)();
-
- asm volatile (
- // save return registers
- "mov %%eax, %4\n\t"
- "mov %%edx, %5\n\t"
- // cleanup stack
- "mov %6, %%esp\n\t"
- :
- : "m"(nStackLongs), "m"(pStackLongs), "m"(pAdjustedThisPtr),
- "m"(nVtableIndex), "m"(eax), "m"(edx), "m"(stackptr)
- : "eax", "edx" );
- switch( eReturnType )
- {
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- ((long*)pRegisterReturn)[1] = edx;
- case typelib_TypeClass_LONG:
- case typelib_TypeClass_UNSIGNED_LONG:
- case typelib_TypeClass_CHAR:
- case typelib_TypeClass_ENUM:
- ((long*)pRegisterReturn)[0] = eax;
- break;
- case typelib_TypeClass_SHORT:
- case typelib_TypeClass_UNSIGNED_SHORT:
- *(unsigned short*)pRegisterReturn = eax;
- break;
- case typelib_TypeClass_BOOLEAN:
- case typelib_TypeClass_BYTE:
- *(unsigned char*)pRegisterReturn = eax;
- break;
- case typelib_TypeClass_FLOAT:
- asm ( "fstps %0" : : "m"(*(char *)pRegisterReturn) );
- break;
- case typelib_TypeClass_DOUBLE:
- asm ( "fstpl %0\n\t" : : "m"(*(char *)pRegisterReturn) );
- break;
- }
-}
-
-//==================================================================================================
-static void cpp_call(
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
- bridges::cpp_uno::shared::VtableSlot aVtableSlot,
- typelib_TypeDescriptionReference * pReturnTypeRef,
- sal_Int32 nParams, typelib_MethodParameter * pParams,
- void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
-{
- // max space for: [complex ret ptr], values|ptr ...
- char * pCppStack =
- (char *)alloca( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
- char * pCppStackStart = pCppStack;
-
- // return
- typelib_TypeDescription * pReturnTypeDescr = 0;
- TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
- OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
-
- void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
-
- if (pReturnTypeDescr)
- {
- if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
- {
- pCppReturn = pUnoReturn; // direct way for simple types
- }
- else
- {
- // complex return via ptr
- pCppReturn = *(void **)pCppStack
- = (bridges::cpp_uno::shared::relatesToInterfaceType(
- pReturnTypeDescr )
- ? alloca( pReturnTypeDescr->nSize )
- : pUnoReturn); // direct way
- pCppStack += sizeof(void *);
- }
- }
- // push this
- void * pAdjustedThisPtr = reinterpret_cast< void ** >(pThis->getCppI())
- + aVtableSlot.offset;
- *(void**)pCppStack = pAdjustedThisPtr;
- pCppStack += sizeof( void* );
-
- // stack space
- OSL_ENSURE( sizeof(void *) == sizeof(sal_Int32), "### unexpected size!" );
- // args
- void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams );
- // indizes of values this have to be converted (interface conversion cpp<=>uno)
- sal_Int32 * pTempIndizes = (sal_Int32 *)(pCppArgs + nParams);
- // type descriptions for reconversions
- typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
-
- sal_Int32 nTempIndizes = 0;
-
- for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
- {
- const typelib_MethodParameter & rParam = pParams[nPos];
- typelib_TypeDescription * pParamTypeDescr = 0;
- TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
- if (!rParam.bOut
- && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
- {
- uno_copyAndConvertData( pCppArgs[nPos] = pCppStack, pUnoArgs[nPos], pParamTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
-
- switch (pParamTypeDescr->eTypeClass)
- {
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- case typelib_TypeClass_DOUBLE:
- pCppStack += sizeof(sal_Int32); // extra long
- }
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- else // ptr to complex value | ref
- {
- if (! rParam.bIn) // is pure out
- {
- // cpp out is constructed mem, uno out is not!
- uno_constructData(
- *(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- pParamTypeDescr );
- pTempIndizes[nTempIndizes] = nPos; // default constructed for cpp call
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
- }
- // is in/inout
- else if (bridges::cpp_uno::shared::relatesToInterfaceType(
- pParamTypeDescr ))
- {
- uno_copyAndConvertData(
- *(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- pUnoArgs[nPos], pParamTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
-
- pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
- }
- else // direct way
- {
- *(void **)pCppStack = pCppArgs[nPos] = pUnoArgs[nPos];
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- }
- pCppStack += sizeof(sal_Int32); // standard parameter length
- }
-
- try
- {
- OSL_ENSURE( !( (pCppStack - pCppStackStart ) & 3), "UNALIGNED STACK !!! (Please DO panic)" );
- callVirtualMethod(
- pAdjustedThisPtr, aVtableSlot.index,
- pCppReturn, pReturnTypeDescr->eTypeClass,
- (sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
- // NO exception occured...
- *ppUnoExc = 0;
-
- // reconvert temporary params
- for ( ; nTempIndizes--; )
- {
- sal_Int32 nIndex = pTempIndizes[nTempIndizes];
- typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
- if (pParams[nIndex].bIn)
- {
- if (pParams[nIndex].bOut) // inout
- {
- uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 ); // destroy uno value
- uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- }
- }
- else // pure out
- {
- uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- }
- // destroy temp cpp param => cpp: every param was constructed
- uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- // return value
- if (pCppReturn && pUnoReturn != pCppReturn)
- {
- uno_copyAndConvertData( pUnoReturn, pCppReturn, pReturnTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- uno_destructData( pCppReturn, pReturnTypeDescr, cpp_release );
- }
- }
- catch (...)
- {
- // fill uno exception
- fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
- // temporary params
- for ( ; nTempIndizes--; )
- {
- sal_Int32 nIndex = pTempIndizes[nTempIndizes];
- // destroy temp cpp param => cpp: every param was constructed
- uno_destructData( pCppArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], cpp_release );
- TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
- }
- // return type
- if (pReturnTypeDescr)
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
- }
-}
-
-}
-
-namespace bridges { namespace cpp_uno { namespace shared {
-
-void unoInterfaceProxyDispatch(
- uno_Interface * pUnoI, const typelib_TypeDescription * pMemberDescr,
- void * pReturn, void * pArgs[], uno_Any ** ppException )
-{
- // is my surrogate
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
- = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI);
- typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
-
- switch (pMemberDescr->eTypeClass)
- {
- case typelib_TypeClass_INTERFACE_ATTRIBUTE:
- {
- VtableSlot aVtableSlot(
- getVtableSlot(
- reinterpret_cast<
- typelib_InterfaceAttributeTypeDescription const * >(
- pMemberDescr)));
- if (pReturn)
- {
- // dependent dispatch
- cpp_call(
- pThis, aVtableSlot,
- ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef,
- 0, 0, // no params
- pReturn, pArgs, ppException );
- }
- else
- {
- // is SET
- typelib_MethodParameter aParam;
- aParam.pTypeRef =
- ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
- typelib_TypeDescriptionReference * pReturnTypeRef = 0;
- OUString aVoidName( RTL_CONSTASCII_USTRINGPARAM("void") );
- typelib_typedescriptionreference_new(
- &pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
-
- // dependent dispatch
- aVtableSlot.index += 1; // get, then set method
- cpp_call(
- pThis, aVtableSlot,
- pReturnTypeRef,
- 1, &aParam,
- pReturn, pArgs, ppException );
-
- typelib_typedescriptionreference_release( pReturnTypeRef );
- }
-
- break;
- }
- case typelib_TypeClass_INTERFACE_METHOD:
- {
- VtableSlot aVtableSlot(
- getVtableSlot(
- reinterpret_cast<
- typelib_InterfaceMethodTypeDescription const * >(
- pMemberDescr)));
- switch (aVtableSlot.index)
- {
- // standard calls
- case 1: // acquire uno interface
- (*pUnoI->acquire)( pUnoI );
- *ppException = 0;
- break;
- case 2: // release uno interface
- (*pUnoI->release)( pUnoI );
- *ppException = 0;
- break;
- case 0: // queryInterface() opt
- {
- typelib_TypeDescription * pTD = 0;
- TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pArgs[0] )->getTypeLibType() );
- if (pTD)
- {
- uno_Interface * pInterface = 0;
- (*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
- pThis->pBridge->getUnoEnv(),
- (void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
- if (pInterface)
- {
- ::uno_any_construct(
- reinterpret_cast< uno_Any * >( pReturn ),
- &pInterface, pTD, 0 );
- (*pInterface->release)( pInterface );
- TYPELIB_DANGER_RELEASE( pTD );
- *ppException = 0;
- break;
- }
- TYPELIB_DANGER_RELEASE( pTD );
- }
- } // else perform queryInterface()
- default:
- // dependent dispatch
- cpp_call(
- pThis, aVtableSlot,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pReturnTypeRef,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->nParams,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pParams,
- pReturn, pArgs, ppException );
- }
- break;
- }
- default:
- {
- ::com::sun::star::uno::RuntimeException aExc(
- OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
- Type const & rExcType = ::getCppuType( &aExc );
- // binary identical null reference
- ::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
- }
- }
-}
-
-} } }
diff --git a/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx
index b7933411fd60..7b960f238508 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -162,7 +163,7 @@ static typelib_TypeClass cpp2uno_call(
(*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -183,7 +184,7 @@ static typelib_TypeClass cpp2uno_call(
// is here for dummy
return typelib_TypeClass_VOID;
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -259,7 +260,7 @@ static typelib_TypeClass cpp_mediate(
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
throw RuntimeException(
- rtl::OUString::createFromAscii("illegal vtable index!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )),
(XInterface *)pThis );
}
@@ -352,7 +353,7 @@ static typelib_TypeClass cpp_mediate(
default:
{
throw RuntimeException(
- rtl::OUString::createFromAscii("no member description found!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )),
(XInterface *)pThis );
// is here for dummy
eRet = typelib_TypeClass_VOID;
@@ -521,3 +522,5 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
void bridges::cpp_uno::shared::VtableFactory::flushCode(
unsigned char const *, unsigned char const *)
{}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx b/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx
index 2fd9997e724b..4779b145ab06 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,7 @@
#include <stdio.h>
#include <dlfcn.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -101,7 +102,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
//==================================================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -228,7 +229,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
OUStringToOString(
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
+ fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() );
#endif
void * pCppExc;
type_info * rtti;
@@ -293,7 +294,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
return;
}
@@ -302,7 +303,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
OUString unoName( toUNOname( header->exceptionType->name() ) );
#if OSL_DEBUG_LEVEL > 1
OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
+ fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() );
#endif
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
@@ -314,7 +315,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
}
else
@@ -327,3 +328,4 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_solaris_intel/share.hxx b/bridges/source/cpp_uno/gcc3_solaris_intel/share.hxx
index 930094738b20..da2367ad172b 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_intel/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_intel/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,3 +89,5 @@ void raiseException(
void fillUnoException(
__cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx
index cbaa24711c34..97dfe64ee32a 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -245,7 +246,7 @@ static void cpp_call(
pAdjustedThisPtr, aVtableSlot.index,
pCppReturn, pReturnTypeDescr->eTypeClass,
(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -425,3 +426,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx
index 229c1d471959..87ee5cc93ad6 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -162,7 +163,7 @@ static typelib_TypeClass cpp2uno_call(
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)(pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -181,7 +182,7 @@ static typelib_TypeClass cpp2uno_call(
// is here for dummy
return typelib_TypeClass_VOID;
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -255,7 +256,7 @@ static typelib_TypeClass cpp_mediate(
"### illegal vtable index!" );
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
- throw RuntimeException( rtl::OUString::createFromAscii("illegal vtable index!"), (XInterface *)pCppI );
+ throw RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )), (XInterface *)pCppI );
}
// determine called method
@@ -350,7 +351,7 @@ static typelib_TypeClass cpp_mediate(
}
default:
{
- throw RuntimeException(rtl::OUString::createFromAscii("no member description found!"), (XInterface *)pCppI );
+ throw RuntimeException(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )), (XInterface *)pCppI );
// is here for dummy
eRet = typelib_TypeClass_VOID;
}
@@ -562,3 +563,5 @@ void bridges::cpp_uno::shared::VtableFactory::flushCode(
{
//TODO: IZ 25819 flush the instruction cache (there probably is OS support for this)
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx b/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx
index fe79e6ac31fc..fef8c3facada 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include <stdio.h>
#include <dlfcn.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -99,7 +100,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
//==================================================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -226,7 +227,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
OUStringToOString(
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
+ fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() );
#endif
void * pCppExc;
type_info * rtti;
@@ -291,7 +292,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if defined _DEBUG
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
return;
}
@@ -300,7 +301,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
OUString unoName( toUNOname( header->exceptionType->name() ) );
#if defined BRIDGES_DEBUG
OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
+ fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() );
#endif
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
@@ -312,7 +313,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if defined _DEBUG
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
}
else
@@ -325,3 +326,4 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_solaris_sparc/share.hxx b/bridges/source/cpp_uno/gcc3_solaris_sparc/share.hxx
index b894a99832dd..3526f19082cd 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_sparc/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_sparc/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,3 +96,5 @@ inline char* adjustPointer( char* pIn, typelib_TypeDescription* pType )
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx
index f6f14c17dc31..81dbb5dcea53 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,9 +41,12 @@
#include <sal/alloca.h>
-using namespace rtl;
using namespace com::sun::star::uno;
+using ::rtl::OUString;
+using ::rtl::OString;
+using ::rtl::OUStringToOString;
+
namespace
{
//==================================================================================================
@@ -407,7 +411,7 @@ static void cpp_call(
pReturnTypeDescr->eTypeClass,
(sal_Int32 *)pCppStackStart,
nStackLongs);
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -593,3 +597,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx b/bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx
index d29cf44803a1..8bde24c63da0 100644
--- a/bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -170,7 +171,7 @@ void cpp2uno_call(
(*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -189,7 +190,7 @@ void cpp2uno_call(
&aUnoExc, pThis->getBridge()->getUno2Cpp() );
// has to destruct the any
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
for ( ; nTempIndizes--; )
@@ -260,7 +261,7 @@ extern "C" void cpp_vtable_call(
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
throw RuntimeException(
- rtl::OUString::createFromAscii("illegal vtable index!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )),
(XInterface *)pThis );
}
@@ -349,7 +350,7 @@ extern "C" void cpp_vtable_call(
default:
{
throw RuntimeException(
- rtl::OUString::createFromAscii("no member description found!"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )),
(XInterface *)pThis );
}
}
@@ -516,3 +517,5 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
void bridges::cpp_uno::shared::VtableFactory::flushCode(
unsigned char const *, unsigned char const *)
{}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_intel/dllinit.cxx b/bridges/source/cpp_uno/mingw_intel/dllinit.cxx
index 95d051a52683..d215a3124470 100644
--- a/bridges/source/cpp_uno/mingw_intel/dllinit.cxx
+++ b/bridges/source/cpp_uno/mingw_intel/dllinit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,3 +55,5 @@ extern "C" BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserv
return TRUE;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_intel/except.cxx b/bridges/source/cpp_uno/mingw_intel/except.cxx
index c27f7013caf3..5997c3b1ea2a 100644
--- a/bridges/source/cpp_uno/mingw_intel/except.cxx
+++ b/bridges/source/cpp_uno/mingw_intel/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,7 @@
#include <stdio.h>
#include <string.h>
#include <cxxabi.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -101,7 +102,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
//==================================================================================================
class RTTI
{
- typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+ typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
Mutex m_mutex;
t_rtti_map m_rttis;
@@ -213,7 +214,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
OUStringToOString(
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
+ fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() );
#endif
void * pCppExc;
type_info * rtti;
@@ -278,7 +279,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
return;
}
@@ -287,7 +288,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
OUString unoName( toUNOname( header->exceptionType->name() ) );
#if OSL_DEBUG_LEVEL > 1
OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
+ fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() );
#endif
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
@@ -299,7 +300,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr.getStr() );
+ OSL_FAIL( cstr.getStr() );
#endif
}
else
@@ -312,3 +313,4 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_intel/share.hxx b/bridges/source/cpp_uno/mingw_intel/share.hxx
index 930094738b20..da2367ad172b 100644
--- a/bridges/source/cpp_uno/mingw_intel/share.hxx
+++ b/bridges/source/cpp_uno/mingw_intel/share.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,3 +89,5 @@ void raiseException(
void fillUnoException(
__cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_intel/smallstruct.cxx b/bridges/source/cpp_uno/mingw_intel/smallstruct.cxx
index af124489d107..bcfb0df87902 100644
--- a/bridges/source/cpp_uno/mingw_intel/smallstruct.cxx
+++ b/bridges/source/cpp_uno/mingw_intel/smallstruct.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,3 +78,5 @@ bool isSmallStruct(typelib_TypeDescription const * type) {
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_intel/smallstruct.hxx b/bridges/source/cpp_uno/mingw_intel/smallstruct.hxx
index 7f52ac96d2db..f1eae96e6734 100644
--- a/bridges/source/cpp_uno/mingw_intel/smallstruct.hxx
+++ b/bridges/source/cpp_uno/mingw_intel/smallstruct.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,3 +34,5 @@ namespace bridges { namespace cpp_uno { namespace shared {
bool isSmallStruct(typelib_TypeDescription const * type);
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx b/bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx
index d4fa3ab93282..4dd6cdefd083 100644
--- a/bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -304,7 +305,7 @@ static void cpp_call(
pAdjustedThisPtr, aVtableSlot.index,
pCppReturn, pReturnTypeDescr,
(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
- // NO exception occured...
+ // NO exception occurred...
*ppUnoExc = 0;
// reconvert temporary params
@@ -498,3 +499,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx b/bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx
index adce4419bcbf..106cb211b570 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -165,7 +166,7 @@ static inline typelib_TypeClass cpp2uno_call(
(*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
- // in case an exception occured...
+ // in case an exception occurred...
if (pUnoExc)
{
// destruct temporary in/inout params
@@ -190,7 +191,7 @@ static inline typelib_TypeClass cpp2uno_call(
// is here for dummy
return typelib_TypeClass_VOID;
}
- else // else no exception occured...
+ else // else no exception occurred...
{
// temporary params
while (nTempIndizes--)
@@ -266,7 +267,7 @@ static typelib_TypeClass __cdecl cpp_mediate(
TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
- typelib_TypeClass eRet;
+ typelib_TypeClass eRet = typelib_TypeClass_VOID;
switch (aMemberDescr.get()->eTypeClass)
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -352,8 +353,6 @@ static typelib_TypeClass __cdecl cpp_mediate(
throw RuntimeException(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("no member description found!") ),
(XInterface *)pThis );
- // is here for dummy
- eRet = typelib_TypeClass_VOID;
}
}
@@ -486,3 +485,5 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
void bridges::cpp_uno::shared::VtableFactory::flushCode(
unsigned char const *, unsigned char const *)
{}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx b/bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx
index c43b4b0f47bb..cfbc58650f0d 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,3 +57,5 @@ extern "C" BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserv
return TRUE;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
index 239c36a42289..e8ac31ebf3a7 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include "precompiled_bridges.hxx"
#pragma warning( disable : 4237 )
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <sal/config.h>
#include <malloc.h>
#include <new.h>
@@ -96,7 +97,7 @@ static inline OUString toRTTIname( OUString const & rUNOname ) throw ()
//##################################################################################################
-typedef hash_map< OUString, void *, OUStringHash, equal_to< OUString > > t_string2PtrMap;
+typedef boost::unordered_map< OUString, void *, OUStringHash, equal_to< OUString > > t_string2PtrMap;
//==================================================================================================
class RTTInfos
@@ -619,7 +620,7 @@ int msci_filterCppException(
RuntimeException exc(
OUString( RTL_CONSTASCII_USTRINGPARAM(
"[msci_uno bridge error] unexpected "
- "C++ exception occured!") ),
+ "C++ exception occurred!") ),
Reference< XInterface >() );
uno_type_any_constructAndConvert(
pUnoExc, &exc, ::getCppuType( &exc ).getTypeLibType(), pCpp2Uno );
@@ -630,3 +631,4 @@ int msci_filterCppException(
#pragma pack(pop)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/makefile.mk b/bridges/source/cpp_uno/msvc_win32_intel/makefile.mk
index 194d8d6736f6..b4608cc70ac3 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/makefile.mk
+++ b/bridges/source/cpp_uno/msvc_win32_intel/makefile.mk
@@ -37,7 +37,7 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
# --- Files --------------------------------------------------------
-.IF "$(COM)" == "MSC"
+.IF "$(COM)$(CPU)" == "MSCI"
.IF "$(debug)" != ""
CFLAGS += -Ob0
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/msci.hxx b/bridges/source/cpp_uno/msvc_win32_intel/msci.hxx
index 01f4b607b7cc..ecc4e22960d7 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/msci.hxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/msci.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,4 @@ void msci_raiseException(
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/uno2cpp.cxx b/bridges/source/cpp_uno/msvc_win32_intel/uno2cpp.cxx
index e32707e84a2f..547ee4c6873f 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/uno2cpp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -290,7 +291,7 @@ static void cpp_call(
return;
}
- // NO exception occured
+ // NO exception occurred
*ppUnoExc = 0;
// reconvert temporary params
@@ -463,3 +464,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/call.asm b/bridges/source/cpp_uno/msvc_win32_x86-64/call.asm
new file mode 100644
index 000000000000..406e78d397a1
--- /dev/null
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/call.asm
@@ -0,0 +1,133 @@
+; -*- Mode: text; tab-width: 8; indent-tabs-mode: nil comment-column: 44; comment-start: ";; " comment-start-skip: ";; *" -*-
+
+;; Version: MPL 1.1 / GPLv3+ / LGPLv3+
+;;
+;; The contents of this file are subject to the Mozilla Public License Version
+;; 1.1 (the "License"); you may not use this file except in compliance with
+;; the License or as specified alternatively below. You may obtain a copy of
+;; the License at http://www.mozilla.org/MPL/
+;;
+;; Software distributed under the License is distributed on an "AS IS" basis,
+;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+;; for the specific language governing rights and limitations under the
+;; License.
+;;
+;; The Initial Developer of the Original Code is
+;; Novell, Inc.
+;; Portions created by the Initial Developer are Copyright (C) 2011
+;; Novell, Inc. All Rights Reserved.
+;;
+;; Major Contributor(s):
+;; Tor Lillqvist <tml@iki.fi>
+;; Portions created by Tor Lillqvist are Copyright (C) 2011 Tor Lillqvist. All Rights Reserved.
+;;
+;; For minor contributions see the git repository.
+;;
+;; Alternatively, the contents of this file may be used under the terms of
+;; either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+;; the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+;; in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+;; instead of those above.
+
+;; This is the function jumped to from the trampoline generated by
+;; codeSnippet() in cpp2uno.cxx. Here we call cpp_vtable_call() which
+;; then calls the actual UNO function.
+
+;; The code snippet generated is called from "normal" C++ code which
+;; has no idea that it is calling dynamically generated code.
+
+;; The generated short code snippet is not covered by any function
+;; table and unwind info, but that doesn't matter, as the instructions
+;; in it are not really going to cause any exception. Once it jumps
+;; here it is covered by a function table, and the calls further down
+;; through cpp_vtable_call() can be unwound cleanly.
+
+;; This is in a separate file for x86-64 as MSVC doesn't have in-line
+;; assembly for x64.
+
+;; Random web links and other documentation about low-level
+;; implementation details for the C++/UNO bridge on x64 Windows kept
+;; here:
+
+;; Caolan's "Lazy Hackers Guide To Porting" is useful:
+;; http://wiki.services.openoffice.org/wiki/Lazy_Hackers_Guide_To_Porting
+
+;; As for details about the x64 Windows calling convention, register
+;; usage, stack usage, exception handling etc, the official
+;; documentation (?) on MSDN is a bit fragmented and split up into a
+;; needlessly large number of short pages. But still:
+;; http://msdn.microsoft.com/en-us/library/7kcdt6fy%28v=VS.90%29.aspx
+
+;; Also see Raymond Chen's blog post:
+;; http://blogs.msdn.com/b/oldnewthing/archive/2004/01/14/58579.aspx
+
+;; This one is actually more readable: "Improving Automated Analysis
+;; of Windows x64 Binaries": http://www.uninformed.org/?v=4&a=1
+
+;; This one has a mass of information about different architectures
+;; and compilers, and contains some details about the x64 Windows
+;; calling convention in particular that Microsoft doesn't mention
+;; above:
+;; http://www.agner.org/optimize/calling_conventions.pdf
+
+;; Random interesting discussion threads:
+;; http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/300bd6d3-9381-4d2d-8129-e48b392c05d8
+
+;; Ken Johnson's blog http://www.nynaeve.net/ has much interesting
+;; information, for instance:
+;; http://www.nynaeve.net/?p=11
+
+typelib_TypeClass_FLOAT equ 10
+typelib_TypeClass_DOUBLE equ 11
+
+extern cpp_vtable_call: proc
+
+.code
+
+privateSnippetExecutor proc frame
+
+ ;; Make stack frame. Re-align RSP at 16 bytes. We need just one
+ ;; qword of stack for our own purposes: Where cpp_vtable_call()
+ ;; will store the return value of the UNO callee. But we of course
+ ;; must also allocate space for the functions we call (i.e., just
+ ;; cpp_vtable_call()) to spill their register parameters.
+
+ sub rsp, 40
+ .allocstack (40)
+ .endprolog
+
+ ;; Call cpp_vtable_call() with 2 parameters:
+
+ ;; 1 (rcx): nOffsetAndIndex (already put there in code generated by codeSnippet)
+ ;; 2 (rdx): pointer to where to store return value, followed by our
+ ;; return address (uninteresting to cpp_vtable_call()), followed
+ ;; by our spilled register parameters, as stored above, followed
+ ;; by the rest of our parameters, if any.
+
+ lea rdx, 32[rsp]
+
+ call cpp_vtable_call
+
+ ;; cpp_vtable_call() returns the typelib_TypeClass type of the
+ ;; return value of the called UNO function
+
+ cmp rax, typelib_TypeClass_FLOAT
+ je Lfloat
+
+ cmp rax, typelib_TypeClass_DOUBLE
+ je Lfloat
+
+ mov rax, qword ptr 32[rsp]
+ jmp Lepilogue
+
+Lfloat:
+ movsd xmm0, qword ptr 32[rsp]
+
+Lepilogue:
+ add rsp, 40
+ ret
+privateSnippetExecutor endp
+
+end
+
+; vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx
new file mode 100644
index 000000000000..ecfd957947c4
--- /dev/null
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx
@@ -0,0 +1,582 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_bridges.hxx"
+
+#include <malloc.h>
+
+#include <com/sun/star/uno/genfunc.hxx>
+#include <uno/data.h>
+#include <typelib/typedescription.hxx>
+
+#include "bridges/cpp_uno/shared/bridge.hxx"
+#include "bridges/cpp_uno/shared/cppinterfaceproxy.hxx"
+#include "bridges/cpp_uno/shared/types.hxx"
+#include "bridges/cpp_uno/shared/vtablefactory.hxx"
+
+#include "mscx.hxx"
+
+using namespace ::com::sun::star::uno;
+
+static inline typelib_TypeClass cpp2uno_call(
+ bridges::cpp_uno::shared::CppInterfaceProxy * pThis,
+ const typelib_TypeDescription * pMemberTD,
+ typelib_TypeDescriptionReference * pReturnTypeRef, // NULL indicates void return
+ sal_Int32 nParams,
+ typelib_MethodParameter * pParams,
+ void ** pStack )
+{
+ // Return type
+ typelib_TypeDescription * pReturnTD = NULL;
+ if ( pReturnTypeRef )
+ TYPELIB_DANGER_GET( &pReturnTD, pReturnTypeRef );
+
+ int nFirstRealParam = 3; // Index into pStack, past return
+ // value, return address and 'this'
+ // pointer.
+
+ void * pUnoReturn = NULL;
+ void * pCppReturn = NULL; // Complex return ptr: if != NULL && != pUnoReturn, reconversion need
+
+ if ( pReturnTD )
+ {
+ if ( bridges::cpp_uno::shared::isSimpleType( pReturnTD ) )
+ {
+ pUnoReturn = pStack;
+ }
+ else
+ {
+ pCppReturn = pStack[nFirstRealParam++];
+
+ pUnoReturn = ( bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTD )
+ ? alloca( pReturnTD->nSize )
+ : pCppReturn ); // direct way
+ }
+ }
+
+ void ** pCppIncomingParams = pStack + nFirstRealParam;
+
+ // Unlike this method for other archs, prefer clarity to
+ // micro-optimization, and allocate these array separately
+
+ // Parameters passed to the UNO function
+ void ** pUnoArgs = (void **)alloca( sizeof(void *) * nParams );
+
+ // Parameters received from C++
+ void ** pCppArgs = (void **)alloca( sizeof(void *) * nParams );
+
+ // Indexes of values this have to be converted (interface conversion C++<=>UNO)
+ int * pTempIndexes =
+ (int *)alloca( sizeof(int) * nParams );
+
+ // Type descriptions for reconversions
+ typelib_TypeDescription ** ppTempParamTD =
+ (typelib_TypeDescription **)alloca( sizeof(void *) * nParams );
+
+ int nTempIndexes = 0;
+
+ for ( int nPos = 0; nPos < nParams; ++nPos )
+ {
+ const typelib_MethodParameter & rParam = pParams[nPos];
+
+ typelib_TypeDescription * pParamTD = NULL;
+ TYPELIB_DANGER_GET( &pParamTD, rParam.pTypeRef );
+
+ if ( !rParam.bOut &&
+ bridges::cpp_uno::shared::isSimpleType( pParamTD ) )
+ {
+ pCppArgs[nPos] = pUnoArgs[nPos] = pCppIncomingParams++;
+
+ TYPELIB_DANGER_RELEASE( pParamTD );
+ }
+ else // ptr to complex value | ref
+ {
+ void * pCppStack;
+
+ pCppArgs[nPos] = pCppStack = *pCppIncomingParams++;
+
+ if ( !rParam.bIn ) // Pure out
+ {
+ // UNO out is unconstructed mem
+ pUnoArgs[nPos] = alloca( pParamTD->nSize );
+ pTempIndexes[nTempIndexes] = nPos;
+ // pParamTD will be released at reconversion
+ ppTempParamTD[nTempIndexes++] = pParamTD;
+ }
+ //
+ else if ( bridges::cpp_uno::shared::relatesToInterfaceType( pParamTD ) )
+ {
+ ::uno_copyAndConvertData(
+ pUnoArgs[nPos] = alloca( pParamTD->nSize ),
+ pCppStack, pParamTD,
+ pThis->getBridge()->getCpp2Uno() );
+ pTempIndexes[nTempIndexes] = nPos; // Has to be reconverted
+ // pParamTD will be released at reconversion
+ ppTempParamTD[nTempIndexes++] = pParamTD;
+ }
+ else // direct way
+ {
+ pUnoArgs[nPos] = pCppStack;
+ // No longer needed
+ TYPELIB_DANGER_RELEASE( pParamTD );
+ }
+ }
+ }
+
+ // ExceptionHolder
+ uno_Any aUnoExc; // Any will be constructed by callee
+ uno_Any * pUnoExc = &aUnoExc;
+
+ // invoke UNO dispatch call
+ (*pThis->getUnoI()->pDispatcher)(
+ pThis->getUnoI(), pMemberTD, pUnoReturn, pUnoArgs, &pUnoExc );
+
+ // in case an exception occurred...
+ if ( pUnoExc )
+ {
+ // Destruct temporary in/inout params
+ while ( nTempIndexes-- )
+ {
+ int nIndex = pTempIndexes[nTempIndexes];
+
+ if ( pParams[nIndex].bIn ) // Is in/inout => was constructed
+ {
+ ::uno_destructData( pUnoArgs[nIndex], ppTempParamTD[nTempIndexes], 0 );
+ }
+ TYPELIB_DANGER_RELEASE( ppTempParamTD[nTempIndexes] );
+ }
+ if ( pReturnTD )
+ TYPELIB_DANGER_RELEASE( pReturnTD );
+
+ CPPU_CURRENT_NAMESPACE::mscx_raiseException(
+ &aUnoExc, pThis->getBridge()->getUno2Cpp() ); // Has to destruct the any
+
+ // Is here for dummy
+ return typelib_TypeClass_VOID;
+ }
+ else // Else, no exception occurred...
+ {
+ // Temporary params
+ while (nTempIndexes--)
+ {
+ int nIndex = pTempIndexes[nTempIndexes];
+ typelib_TypeDescription * pParamTD = ppTempParamTD[nTempIndexes];
+
+ if ( pParams[nIndex].bOut ) // inout/out
+ {
+ // Convert and assign
+ ::uno_destructData(
+ pCppArgs[nIndex], pParamTD, cpp_release );
+ ::uno_copyAndConvertData(
+ pCppArgs[nIndex], pUnoArgs[nIndex], pParamTD,
+ pThis->getBridge()->getUno2Cpp() );
+ }
+ // Destroy temp UNO param
+ ::uno_destructData( pUnoArgs[nIndex], pParamTD, 0 );
+
+ TYPELIB_DANGER_RELEASE( pParamTD );
+ }
+ // Return
+ if ( pCppReturn ) // Has complex return
+ {
+ if ( pUnoReturn != pCppReturn ) // Needs reconversion
+ {
+ ::uno_copyAndConvertData(
+ pCppReturn, pUnoReturn, pReturnTD,
+ pThis->getBridge()->getUno2Cpp() );
+ // Destroy temp UNO return
+ ::uno_destructData( pUnoReturn, pReturnTD, 0 );
+ }
+ // Complex return ptr is set to eax
+ pStack[0] = pCppReturn;
+ }
+ if ( pReturnTD )
+ {
+ typelib_TypeClass eRet = (typelib_TypeClass)pReturnTD->eTypeClass;
+ TYPELIB_DANGER_RELEASE( pReturnTD );
+ return eRet;
+ }
+ else
+ return typelib_TypeClass_VOID;
+ }
+}
+
+extern "C" typelib_TypeClass cpp_vtable_call(
+ sal_Int64 nOffsetAndIndex,
+ void ** pStack )
+{
+ sal_Int32 nFunctionIndex = (nOffsetAndIndex & 0xFFFFFFFF);
+ sal_Int32 nVtableOffset = ((nOffsetAndIndex >> 32) & 0xFFFFFFFF);
+
+ // pStack points to space for return value allocated by
+ // privateSnippetExecutor() in call.asm, after which follows our
+ // return address (uninteresting), then the integer or
+ // floating-point register parameters (spilled by
+ // privateSnippetExecutor()) from the call to the trampoline,
+ // followed by stacked parameters. The first parameter is the
+ // 'this' pointer. If the callee returns a large value, the
+ // parameter after that is actually a pointer to where the callee
+ // should store its return value.
+
+ void * pThis = static_cast<char *>( pStack[2] ) - nVtableOffset;
+
+ bridges::cpp_uno::shared::CppInterfaceProxy * pCppI =
+ bridges::cpp_uno::shared::CppInterfaceProxy::castInterfaceToProxy( pThis );
+
+ typelib_InterfaceTypeDescription * pTD = pCppI->getTypeDescr();
+
+ OSL_ENSURE( nFunctionIndex < pTD->nMapFunctionIndexToMemberIndex, "### illegal vtable index!\n" );
+ if ( nFunctionIndex >= pTD->nMapFunctionIndexToMemberIndex )
+ throw RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Illegal vtable index!")),
+ reinterpret_cast<XInterface *>( pCppI ) );
+
+ // Determine called method
+ int nMemberPos = pTD->pMapFunctionIndexToMemberIndex[nFunctionIndex];
+ OSL_ENSURE( nMemberPos < pTD->nAllMembers, "### illegal member index!\n" );
+
+ TypeDescription aMemberDescr( pTD->ppAllMembers[nMemberPos] );
+
+ typelib_TypeClass eRet;
+ switch ( aMemberDescr.get()->eTypeClass )
+ {
+ case typelib_TypeClass_INTERFACE_ATTRIBUTE:
+ {
+ typelib_TypeDescriptionReference *pAttrTypeRef =
+ reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>( aMemberDescr.get() )->pAttributeTypeRef;
+
+ if ( pTD->pMapMemberIndexToFunctionIndex[nMemberPos] == nFunctionIndex )
+ {
+ // is GET method
+ eRet = cpp2uno_call( pCppI, aMemberDescr.get(), pAttrTypeRef,
+ 0, NULL, // No params
+ pStack );
+ }
+ else
+ {
+ // is SET method
+ typelib_MethodParameter aParam;
+ aParam.pTypeRef = pAttrTypeRef;
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
+ eRet = cpp2uno_call( pCppI, aMemberDescr.get(),
+ NULL, // Indicates void return
+ 1, &aParam,
+ pStack );
+ }
+ break;
+ }
+ case typelib_TypeClass_INTERFACE_METHOD:
+ {
+ // is METHOD
+ switch ( nFunctionIndex )
+ {
+ case 1: // acquire()
+ pCppI->acquireProxy(); // Non virtual call!
+ eRet = typelib_TypeClass_VOID;
+ break;
+ case 2: // release()
+ pCppI->releaseProxy(); // non virtual call!
+ eRet = typelib_TypeClass_VOID;
+ break;
+ case 0: // queryInterface() opt
+ {
+ typelib_TypeDescription * pTD = NULL;
+
+ // the incoming C++ parameters are: The this
+ // pointer, the hidden return value pointer, and
+ // then the actual queryInterface() only
+ // parameter. Thus pStack[4]..
+
+ TYPELIB_DANGER_GET( &pTD, reinterpret_cast<Type *>( pStack[4] )->getTypeLibType() );
+
+ if ( pTD )
+ {
+ XInterface * pInterface = NULL;
+ (*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)
+ ( pCppI->getBridge()->getCppEnv(),
+ (void **)&pInterface,
+ pCppI->getOid().pData,
+ reinterpret_cast<typelib_InterfaceTypeDescription *>( pTD ) );
+
+ if ( pInterface )
+ {
+ // pStack[3] = hidden return value pointer
+ ::uno_any_construct( reinterpret_cast<uno_Any *>( pStack[3] ),
+ &pInterface, pTD, cpp_acquire );
+
+ pInterface->release();
+ TYPELIB_DANGER_RELEASE( pTD );
+
+ eRet = typelib_TypeClass_ANY;
+ break;
+ }
+ TYPELIB_DANGER_RELEASE( pTD );
+ }
+ } // Fall through!
+ default:
+ {
+ typelib_InterfaceMethodTypeDescription * pMethodTD =
+ reinterpret_cast<typelib_InterfaceMethodTypeDescription *>( aMemberDescr.get() );
+
+ eRet = cpp2uno_call( pCppI, aMemberDescr.get(),
+ pMethodTD->pReturnTypeRef,
+ pMethodTD->nParams,
+ pMethodTD->pParams,
+ pStack );
+ }
+ }
+ break;
+ }
+ default:
+ {
+ throw RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No member description found!")),
+ reinterpret_cast<XInterface *>( pCppI ) );
+ // is here for dummy
+ eRet = typelib_TypeClass_VOID;
+ }
+ }
+
+ return eRet;
+}
+
+int const codeSnippetSize = 48;
+
+extern "C" char privateSnippetExecutor;
+
+// This function generates the code that acts as a proxy for the UNO function to be called.
+// The generated code does the following:
+// - Spills register parameters on stack
+// - Loads functionIndex and vtableOffset into scratch registers
+// - Jumps to privateSnippetExecutor
+
+unsigned char * codeSnippet(
+ unsigned char * code,
+ char param_kind[4],
+ sal_Int32 nFunctionIndex,
+ sal_Int32 nVtableOffset )
+{
+ sal_uInt64 nOffsetAndIndex = ( ( (sal_uInt64) nVtableOffset ) << 32 ) | ( (sal_uInt64) nFunctionIndex );
+ unsigned char *p = code;
+
+ // Spill parameters
+ if ( param_kind[0] == CPPU_CURRENT_NAMESPACE::REGPARAM_INT )
+ {
+ // mov qword ptr 8[rsp], rcx
+ *p++ = 0x48; *p++ = 0x89; *p++ = 0x4C; *p++ = 0x24; *p++ = 0x08;
+ }
+ else
+ {
+ // movsd qword ptr 8[rsp], xmm0
+ *p++ = 0xF2; *p++ = 0x0F; *p++ = 0x11; *p++ = 0x44; *p++ = 0x24; *p++ = 0x08;
+ }
+ if ( param_kind[1] == CPPU_CURRENT_NAMESPACE::REGPARAM_INT )
+ {
+ // mov qword ptr 16[rsp], rdx
+ *p++ = 0x48; *p++ = 0x89; *p++ = 0x54; *p++ = 0x24; *p++ = 0x10;
+ }
+ else
+ {
+ // movsd qword ptr 16[rsp], xmm1
+ *p++ = 0xF2; *p++ = 0x0F; *p++ = 0x11; *p++ = 0x4C; *p++ = 0x24; *p++ = 0x10;
+ }
+ if ( param_kind[2] == CPPU_CURRENT_NAMESPACE::REGPARAM_INT )
+ {
+ // mov qword ptr 24[rsp], r8
+ *p++ = 0x4C; *p++ = 0x89; *p++ = 0x44; *p++ = 0x24; *p++ = 0x18;
+ }
+ else
+ {
+ // movsd qword ptr 24[rsp], xmm2
+ *p++ = 0xF2; *p++ = 0x0F; *p++ = 0x11; *p++ = 0x54; *p++ = 0x24; *p++ = 0x18;
+ }
+ if ( param_kind[3] == CPPU_CURRENT_NAMESPACE::REGPARAM_INT )
+ {
+ // mov qword ptr 32[rsp], r9
+ *p++ = 0x4C;*p++ = 0x89; *p++ = 0x4C; *p++ = 0x24; *p++ = 0x20;
+ }
+ else
+ {
+ // movsd qword ptr 32[rsp], xmm3
+ *p++ = 0xF2; *p++ = 0x0F; *p++ = 0x11; *p++ = 0x5C; *p++ = 0x24; *p++ = 0x20;
+ }
+
+ // mov rcx, nOffsetAndIndex
+ *p++ = 0x48; *p++ = 0xB9;
+ *((sal_uInt64 *)p) = nOffsetAndIndex; p += 8;
+
+ // mov r11, privateSnippetExecutor
+ *p++ = 0x49; *p++ = 0xBB;
+ *((void **)p) = &privateSnippetExecutor; p += 8;
+
+ // jmp r11
+ *p++ = 0x41; *p++ = 0xFF; *p++ = 0xE3;
+
+ OSL_ASSERT( p < code + codeSnippetSize );
+
+ return code + codeSnippetSize;
+}
+
+struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
+
+bridges::cpp_uno::shared::VtableFactory::Slot *
+bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(
+ void * block )
+{
+ return static_cast< Slot * >(block) + 1;
+}
+
+sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
+ sal_Int32 slotCount )
+{
+ return (slotCount + 1) * sizeof (Slot) + slotCount * codeSnippetSize;
+}
+
+bridges::cpp_uno::shared::VtableFactory::Slot *
+bridges::cpp_uno::shared::VtableFactory::initializeBlock(
+ void * block,
+ sal_Int32 slotCount )
+{
+ struct Rtti {
+ sal_Int32 n0, n1, n2;
+ type_info * rtti;
+ Rtti():
+ n0(0), n1(0), n2(0),
+ rtti(CPPU_CURRENT_NAMESPACE::mscx_getRTTI(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.uno.XInterface"))))
+ {}
+ };
+ static Rtti rtti;
+
+ Slot * slots = mapBlockToVtable(block);
+ slots[-1].fn = &rtti;
+ return slots + slotCount;
+}
+
+unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
+ Slot ** slots,
+ unsigned char * code,
+ typelib_InterfaceTypeDescription const * type,
+ sal_Int32 nFunctionOffset,
+ sal_Int32 functionCount,
+ sal_Int32 nVtableOffset )
+{
+ (*slots) -= functionCount;
+ Slot * s = *slots;
+
+ for (int member = 0; member < type->nMembers; ++member) {
+ typelib_TypeDescription * pTD = NULL;
+
+ TYPELIB_DANGER_GET( &pTD, type->ppMembers[ member ] );
+ OSL_ASSERT( pTD );
+
+ char param_kind[4];
+ int nr = 0;
+
+ for (int i = 0; i < 4; ++i)
+ param_kind[i] = CPPU_CURRENT_NAMESPACE::REGPARAM_INT;
+
+ // 'this'
+ ++nr;
+
+ if ( pTD->eTypeClass == typelib_TypeClass_INTERFACE_ATTRIBUTE )
+ {
+ typelib_InterfaceAttributeTypeDescription * pIfaceAttrTD =
+ reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>( pTD );
+
+ // Getter
+
+ (s++)->fn = code;
+ code = codeSnippet( code, param_kind, nFunctionOffset++, nVtableOffset );
+ if ( ! pIfaceAttrTD->bReadOnly )
+ {
+ typelib_TypeDescription * pAttrTD = NULL;
+ TYPELIB_DANGER_GET( &pAttrTD, pIfaceAttrTD->pAttributeTypeRef );
+ OSL_ASSERT( pAttrTD );
+
+ // Setter
+ if ( pAttrTD->eTypeClass == typelib_TypeClass_FLOAT ||
+ pAttrTD->eTypeClass == typelib_TypeClass_DOUBLE )
+ param_kind[nr++] = CPPU_CURRENT_NAMESPACE::REGPARAM_FLT;
+
+ TYPELIB_DANGER_RELEASE( pAttrTD );
+
+ (s++)->fn = code;
+ code = codeSnippet( code, param_kind, nFunctionOffset++, nVtableOffset );
+ }
+ }
+ else if ( pTD->eTypeClass == typelib_TypeClass_INTERFACE_METHOD )
+ {
+ typelib_InterfaceMethodTypeDescription * pMethodTD =
+ reinterpret_cast<typelib_InterfaceMethodTypeDescription *>( pTD );
+
+ typelib_TypeDescription * pReturnTD = NULL;
+ TYPELIB_DANGER_GET( &pReturnTD, pMethodTD->pReturnTypeRef );
+ OSL_ASSERT( pReturnTD );
+
+ if ( !bridges::cpp_uno::shared::isSimpleType( pReturnTD ) )
+ {
+ // Return value
+ ++nr;
+ }
+
+ for (int param = 0; nr < 4 && param < pMethodTD->nParams; ++param, ++nr)
+ {
+ typelib_TypeDescription * pParamTD = NULL;
+
+ TYPELIB_DANGER_GET( &pParamTD, pMethodTD->pParams[param].pTypeRef );
+ OSL_ASSERT( pParamTD );
+
+ if ( pParamTD->eTypeClass == typelib_TypeClass_FLOAT ||
+ pParamTD->eTypeClass == typelib_TypeClass_DOUBLE )
+ param_kind[nr] = CPPU_CURRENT_NAMESPACE::REGPARAM_FLT;
+
+ TYPELIB_DANGER_RELEASE( pParamTD );
+ }
+ (s++)->fn = code;
+ code = codeSnippet( code, param_kind, nFunctionOffset++, nVtableOffset );
+
+ TYPELIB_DANGER_RELEASE( pReturnTD );
+ }
+ else
+ OSL_ASSERT( false );
+
+ TYPELIB_DANGER_RELEASE( pTD );
+ }
+ return code;
+}
+
+void bridges::cpp_uno::shared::VtableFactory::flushCode(
+ unsigned char const *,
+ unsigned char const * )
+{
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/dllinit.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/dllinit.cxx
new file mode 100644
index 000000000000..cfbc58650f0d
--- /dev/null
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/dllinit.cxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_bridges.hxx"
+
+
+#pragma warning(push,1) // disable warnings within system headers
+#include <windows.h>
+#pragma warning(pop)
+
+
+void dso_init(void);
+void dso_exit(void);
+
+
+extern "C" BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
+{
+ switch(dwReason) {
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(hModule);
+
+ dso_init();
+ break;
+
+ case DLL_PROCESS_DETACH:
+ if (!lpvReserved)
+ dso_exit();
+ break;
+ }
+
+ return TRUE;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
new file mode 100644
index 000000000000..2157568ad915
--- /dev/null
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
@@ -0,0 +1,850 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// Interesting info can be found in:
+
+// MSDN, obviously
+
+// http://www.osronline.com/article.cfm?article=469
+
+// ONTL, "Open NT Native Template Library", a C++ STL-like library
+// that can be used even when writing Windows drivers. This is some
+// quite badass code. The author has done impressive heavy spelunking
+// of MSVCR structures. http://code.google.com/p/ontl/
+
+// Geoff Chappell's pages:
+// http://members.ozemail.com.au/~geoffch/samples/programming/msvc/language/index.html
+
+// The below is from ONTL's ntl/nt/exception.hxx, cleaned up to keep just the _M_X64 parts:
+
+#if 0
+
+/* This information until the corresponding '#endif // 0' is covered
+ * by ONTL's license, which is said to be the "zlib/libgng license"
+ * below, which as far as I see is permissive enough to allow this
+ * information to be included here in this source file. Note that no
+ * actual code from ONTL below gets compiled into the object file.
+ */
+
+/*
+ * Copyright (c) 2011 <copyright holders> (The ONTL main
+ * developer(s) don't tell their real name(s) on the ONTL site.)
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would be
+ * appreciated but is not required.
+ *
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ * misrepresented as being the original software.
+ *
+ * 3. This notice may not be removed or altered from any source
+ * distribution.
+ *
+ */
+
+typedef uint32_t rva_t;
+
+///\note the calling convention should not matter since this has no arguments
+typedef void generic_function_t();
+
+struct ptrtomember // _PMD
+{
+ typedef __w64 int32_t mdiff_t;
+ mdiff_t member_offset;
+ mdiff_t vbtable_offset; // -1 if not a virtual base
+ mdiff_t vdisp_offset; // offset to the displacement value inside the vbtable
+
+ template<typename T>
+ T * operator()(T * const thisptr) const
+ {
+ uintptr_t tp = reinterpret_cast<uintptr_t>(thisptr);
+ uintptr_t ptr = tp + member_offset;
+ if ( vbtable_offset != -1 ) // !(vbtable_offset < 0)
+ {
+ ptr += *reinterpret_cast<mdiff_t*>( static_cast<intptr_t>(vdisp_offset + *reinterpret_cast<mdiff_t*>(tp + vbtable_offset)) )
+ + vbtable_offset;
+ }
+ return reinterpret_cast<T*>(ptr);
+ }
+};
+
+struct eobject
+{
+ typedef void (* dtor_ptr )(eobject*);
+ typedef void (* ctor_ptr )(eobject*, eobject*);
+ typedef void (* ctor_ptr2)(eobject*, eobject*, int);
+};
+
+struct catchabletype
+{
+ /** is simple type */
+ uint32_t memmoveable : 1;
+ /** catchable as reference only */
+ uint32_t refonly : 1;
+ /** class with virtual base */
+ uint32_t hasvirtbase : 1;
+ /** offset to the type descriptor */
+ rva_t typeinfo;
+
+ /** catch type instance location within a thrown object */
+ ptrtomember thiscast;
+ /** size of the simple type or offset into buffer of \c this pointer for catch object */
+ uint32_t object_size;
+
+ union
+ {
+ rva_t copyctor;
+ rva_t copyctor2;
+ };
+};
+
+#pragma pack(push, 4)
+struct catchabletypearray
+{
+ uint32_t size;
+ rva_t type[1];
+};
+#pragma pack(pop)
+
+#pragma pack(push, 4)
+struct throwinfo
+{
+ typedef exception_disposition __cdecl forwardcompathandler_t(...);
+
+ /* 0x00 */ uint32_t econst : 1;
+ /* 0x00 */ uint32_t evolatile : 1;
+ /* 0x00 */ uint32_t : 1;
+ /* 0x00 */ uint32_t e8 : 1;
+ /* 0x04 */ rva_t exception_dtor;
+ /* 0x08 */ rva_t forwardcompathandler;
+ /* 0x0C */ rva_t catchabletypearray; ///< types able to catch the exception.
+};
+#pragma pack(pop)
+
+/// This type represents the catch clause
+struct ehandler
+{
+ // union { uint32_t adjectives; void * ptr; };
+ uint32_t isconst : 1;
+ uint32_t isvolatile : 1;
+ uint32_t isunaligned : 1;// guess it is not used on x86
+ uint32_t isreference : 1;
+
+ uint32_t :27;
+ uint32_t ishz : 1;
+
+ /** offset to the type descriptor of this catch object */
+ /*0x04*/ rva_t typeinfo; // dispType
+ /*0x08*/ int eobject_bpoffset; // dispCatchObj
+ /** offset to the catch clause funclet */
+ /*0x0C*/ rva_t handler; // dispOfHandler
+ /*0x10*/ uint32_t frame; // dispFrame
+}
+
+// ___BuildCatchObject
+/// 15.3/16 When the exception-declaration specifies a class type, a copy
+/// constructor is used to initialize either the object declared
+/// in the exception-declaration or,
+/// if the exception-declaration does not specify a name,
+/// a temporary object of that type.
+///\note This is the question may we optimize out the last case.
+///\warning If the copy constructor throws an exception, std::unexpected would be called
+void
+ constructcatchobject(
+ cxxregistration * cxxreg,
+ const ehandler * const catchblock,
+ catchabletype * const convertable,
+ const dispatcher_context* const dispatch
+ )
+ const
+{
+ _EH_TRACE_ENTER();
+ // build helper
+ __try {
+ struct typeinfo_t { void* vtbl; void* spare; char name[1]; };
+ enum catchable_info { cidefault, cicomplex, civirtual } cinfo = cidefault;
+
+ const typeinfo_t* ti = catchblock->typeinfo ? dispatch->va<typeinfo_t*>(catchblock->typeinfo) : NULL;
+ if(ti && *ti->name && (catchblock->eobject_bpoffset || catchblock->ishz)){
+ eobject** objplace = catchblock->ishz
+ ? reinterpret_cast<eobject**>(cxxreg)
+ : reinterpret_cast<eobject**>(catchblock->eobject_bpoffset + cxxreg->fp.FramePointers);
+ if(catchblock->isreference){
+ // just ref/pointer
+ *objplace = adjust_pointer(get_object(), convertable);
+ }else if(convertable->memmoveable){
+ // POD
+ std::memcpy(objplace, get_object(), convertable->object_size);
+ if(convertable->object_size == sizeof(void*) && *objplace)
+ *objplace = adjust_pointer((void*)*objplace, convertable);
+ }else{
+ // if copy ctor exists, call it; binary copy otherwise
+ if(convertable->copyctor){
+ cinfo = convertable->hasvirtbase ? civirtual : cicomplex;
+ }else{
+ std::memcpy(objplace, (const void*)adjust_pointer(get_object(), convertable), convertable->object_size);
+ }
+ }
+ }
+ // end of build helper
+ if(cinfo != cidefault){
+ eobject* objthis = catchblock->ishz
+ ? reinterpret_cast<eobject*>(cxxreg)
+ : reinterpret_cast<eobject*>(catchblock->eobject_bpoffset + cxxreg->fp.FramePointers);
+ void* copyctor = thrown_va(convertable->copyctor);
+ eobject* copyarg = adjust_pointer(get_object(), convertable);
+ if(cinfo == cicomplex)
+ (eobject::ctor_ptr (copyctor))(objthis, copyarg);
+ else
+ (eobject::ctor_ptr2(copyctor))(objthis, copyarg, 1);
+ }
+ }
+ __except(cxxregistration::unwindfilter(static_cast<nt::ntstatus>(_exception_code())))
+ {
+ nt::exception::inconsistency();
+ }
+ _EH_TRACE_LEAVE();
+}
+
+#endif // 0
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_bridges.hxx"
+
+#pragma warning( disable : 4237 )
+#include <boost/unordered_map.hpp>
+#include <sal/config.h>
+#include <malloc.h>
+#include <new.h>
+#include <typeinfo.h>
+#include <signal.h>
+
+#include "rtl/alloc.h"
+#include "rtl/strbuf.hxx"
+#include "rtl/ustrbuf.hxx"
+
+#include "com/sun/star/uno/Any.hxx"
+
+#include "mscx.hxx"
+
+#pragma pack(push, 8)
+
+using namespace ::com::sun::star::uno;
+using namespace ::std;
+using namespace ::osl;
+using namespace ::rtl;
+
+namespace CPPU_CURRENT_NAMESPACE
+{
+
+static inline OUString toUNOname(
+ OUString const & rRTTIname )
+ throw ()
+{
+ OUStringBuffer aRet( 64 );
+ OUString aStr( rRTTIname.copy( 4, rRTTIname.getLength()-4-2 ) ); // filter .?AUzzz@yyy@xxx@@
+ sal_Int32 nPos = aStr.getLength();
+ while (nPos > 0)
+ {
+ sal_Int32 n = aStr.lastIndexOf( '@', nPos );
+ aRet.append( aStr.copy( n +1, nPos -n -1 ) );
+ if (n >= 0)
+ {
+ aRet.append( (sal_Unicode)'.' );
+ }
+ nPos = n;
+ }
+ return aRet.makeStringAndClear();
+}
+
+static inline OUString toRTTIname(
+ OUString const & rUNOname )
+ throw ()
+{
+ OUStringBuffer aRet( 64 );
+ aRet.appendAscii( RTL_CONSTASCII_STRINGPARAM(".?AV") ); // class ".?AV"; struct ".?AU"
+ sal_Int32 nPos = rUNOname.getLength();
+ while (nPos > 0)
+ {
+ sal_Int32 n = rUNOname.lastIndexOf( '.', nPos );
+ aRet.append( rUNOname.copy( n +1, nPos -n -1 ) );
+ aRet.append( (sal_Unicode)'@' );
+ nPos = n;
+ }
+ aRet.append( (sal_Unicode)'@' );
+ return aRet.makeStringAndClear();
+}
+
+//RTTI simulation
+
+typedef boost::unordered_map< OUString, void *, OUStringHash, equal_to< OUString > > t_string2PtrMap;
+
+class RTTInfos
+{
+ Mutex _aMutex;
+ t_string2PtrMap _allRTTI;
+
+ static OUString toRawName( OUString const & rUNOname ) throw ();
+public:
+ type_info * getRTTI( OUString const & rUNOname ) throw ();
+
+ RTTInfos();
+ ~RTTInfos();
+};
+
+class __type_info
+{
+ friend type_info * RTTInfos::getRTTI( OUString const & ) throw ();
+ friend int mscx_filterCppException(
+ LPEXCEPTION_POINTERS, uno_Any *, uno_Mapping * );
+
+public:
+ virtual ~__type_info() throw ();
+
+ inline __type_info( void * m_data, const char * m_d_name ) throw ()
+ : _m_data( m_data )
+ { ::strcpy( _m_d_name, m_d_name ); } // #100211# - checked
+
+private:
+ void * _m_data;
+ char _m_d_name[1];
+};
+
+__type_info::~__type_info() throw ()
+{
+}
+
+type_info * RTTInfos::getRTTI( OUString const & rUNOname ) throw ()
+{
+ // a must be
+ OSL_ENSURE( sizeof(__type_info) == sizeof(type_info), "### type info structure size differ!" );
+
+ MutexGuard aGuard( _aMutex );
+ t_string2PtrMap::const_iterator const iFind( _allRTTI.find( rUNOname ) );
+
+ // check if type is already available
+ if (iFind == _allRTTI.end())
+ {
+ // insert new type_info
+ OString aRawName( OUStringToOString( toRTTIname( rUNOname ), RTL_TEXTENCODING_ASCII_US ) );
+ __type_info * pRTTI = new( ::rtl_allocateMemory( sizeof(__type_info) + aRawName.getLength() ) )
+ __type_info( NULL, aRawName.getStr() );
+
+ // put into map
+ pair< t_string2PtrMap::iterator, bool > insertion(
+ _allRTTI.insert( t_string2PtrMap::value_type( rUNOname, pRTTI ) ) );
+ OSL_ENSURE( insertion.second, "### rtti insertion failed?!" );
+
+ return (type_info *)pRTTI;
+ }
+ else
+ {
+ return (type_info *)iFind->second;
+ }
+}
+
+RTTInfos::RTTInfos() throw ()
+{
+}
+
+RTTInfos::~RTTInfos() throw ()
+{
+#if OSL_DEBUG_LEVEL > 1
+ OSL_TRACE( "> freeing generated RTTI infos... <\n" );
+#endif
+
+ MutexGuard aGuard( _aMutex );
+ for ( t_string2PtrMap::const_iterator iPos( _allRTTI.begin() );
+ iPos != _allRTTI.end(); ++iPos )
+ {
+ __type_info * pType = (__type_info *)iPos->second;
+ pType->~__type_info(); // obsolete, but good style...
+ ::rtl_freeMemory( pType );
+ }
+}
+
+void * __cdecl copyConstruct(
+ void * pExcThis,
+ void * pSource,
+ typelib_TypeDescription * pTD ) throw ()
+{
+ ::uno_copyData( pExcThis, pSource, pTD, cpp_acquire );
+ return pExcThis;
+}
+
+void * __cdecl destruct(
+ void * pExcThis,
+ typelib_TypeDescription * pTD ) throw ()
+{
+ ::uno_destructData( pExcThis, pTD, cpp_release );
+ return pExcThis;
+}
+
+const int codeSnippetSize = 40;
+
+void GenerateConstructorTrampoline(
+ unsigned char * code,
+ typelib_TypeDescription * pTD ) throw ()
+{
+ unsigned char *p = code;
+
+ // mov r8, pTD
+ *p++ = 0x49; *p++ = 0xB8;
+ *((void **)p) = pTD; p += 8;
+
+ // mov r11, copyConstruct
+ *p++ = 0x49; *p++ = 0xBB;
+ *((void **)p) = &copyConstruct; p += 8;
+
+ // jmp r11
+ *p++ = 0x41; *p++ = 0xFF; *p++ = 0xE3;
+
+ OSL_ASSERT( p < code + codeSnippetSize );
+}
+
+void GenerateDestructorTrampoline(
+ unsigned char * code,
+ typelib_TypeDescription * pTD ) throw ()
+{
+ unsigned char *p = code;
+
+ // mov rdx, pTD
+ *p++ = 0x48; *p++ = 0xBA;
+ *((void **)p) = pTD; p += 8;
+
+ // mov r11, destruct
+ *p++ = 0x49; *p++ = 0xBB;
+ *((void **)p) = &destruct; p += 8;
+
+ // jmp r11
+ *p++ = 0x41; *p++ = 0xFF; *p++ = 0xE3;
+
+ OSL_ASSERT( p < code + codeSnippetSize );
+}
+
+// This looks like it is the struct catchabletype above
+
+struct ExceptionType
+{
+ sal_Int32 _n0; // flags
+ sal_uInt32 _pTypeInfo; // typeinfo
+ sal_Int32 _n1, _n2, _n3; // thiscast
+ sal_Int32 _n4; // object_size
+ sal_uInt32 _pCopyCtor; // copyctor
+
+ inline ExceptionType(
+ sal_uChar * pCode,
+ sal_uInt64 pCodeBase,
+ typelib_TypeDescription * pTD ) throw ()
+ : _n0( 0 )
+ , _n1( 0 )
+ , _n2( -1 )
+ , _n3( 0 )
+ , _n4( pTD->nSize )
+ {
+ // As _n0 is always initialized to zero, that means the
+ // hasvirtbase flag (see the ONTL catchabletype struct) is
+ // off, and thus the copyctor is of the ctor_ptr kind.
+ _pTypeInfo = (sal_uInt32) ((sal_uInt64) mscx_getRTTI( pTD->pTypeName ) - pCodeBase);
+ GenerateConstructorTrampoline( pCode, pTD );
+ _pCopyCtor = (sal_uInt32) ((sal_uInt64) pCode - pCodeBase);
+ }
+ inline ~ExceptionType() throw ()
+ {
+ }
+};
+
+struct RaiseInfo;
+
+class ExceptionInfos
+{
+ Mutex _aMutex;
+ t_string2PtrMap _allRaiseInfos;
+
+public:
+ static RaiseInfo * getRaiseInfo( typelib_TypeDescription * pTD ) throw ();
+
+ static DWORD allocationGranularity;
+
+ ExceptionInfos() throw ();
+ ~ExceptionInfos() throw ();
+};
+
+DWORD ExceptionInfos::allocationGranularity = 0;
+
+// This corresponds to the struct throwinfo described above.
+
+struct RaiseInfo
+{
+ sal_Int32 _n0;
+ sal_uInt32 _pDtor;
+ sal_Int32 _n2;
+ sal_uInt32 _types;
+
+ // Additional fields
+ typelib_TypeDescription * _pTD;
+ sal_uChar * _code;
+ sal_uInt64 _codeBase;
+
+ RaiseInfo( typelib_TypeDescription * pTD ) throw ();
+
+ ~RaiseInfo() throw ();
+};
+
+RaiseInfo::RaiseInfo( typelib_TypeDescription * pTD )throw ()
+ : _n0( 0 )
+ , _n2( 0 )
+ , _pTD( pTD )
+{
+ typelib_CompoundTypeDescription * pCompTD;
+
+ // Count how many trampolines we need
+ int codeSize = codeSnippetSize;
+
+ // Info count
+ int nLen = 0;
+ for ( pCompTD = (typelib_CompoundTypeDescription*)pTD;
+ pCompTD; pCompTD = pCompTD->pBaseTypeDescription )
+ {
+ ++nLen;
+ codeSize += codeSnippetSize;
+ }
+
+ sal_uChar * pCode = _code = (sal_uChar *)::rtl_allocateMemory( codeSize );
+
+ _codeBase = (sal_uInt64)pCode & ~(ExceptionInfos::allocationGranularity-1);
+
+ DWORD old_protect;
+#if OSL_DEBUG_LEVEL > 0
+ BOOL success =
+#endif
+ VirtualProtect( pCode, codeSize, PAGE_EXECUTE_READWRITE, &old_protect );
+ OSL_ENSURE( success, "VirtualProtect() failed!" );
+
+ ::typelib_typedescription_acquire( pTD );
+
+ GenerateDestructorTrampoline( pCode, pTD );
+ _pDtor = (sal_Int32)((sal_uInt64)pCode - _codeBase);
+ pCode += codeSnippetSize;
+
+ // Info count accompanied by type info ptrs: type, base type, base base type, ...
+ _types = (sal_Int32)((sal_uInt64)::rtl_allocateMemory( 4 + 4* nLen) - _codeBase);
+ *(sal_Int32 *)_types = nLen;
+
+ ExceptionType ** ppTypes = (ExceptionType **)((sal_Int32 *)_types + 1);
+
+ int nPos = 0;
+ for ( pCompTD = (typelib_CompoundTypeDescription*)pTD;
+ pCompTD; pCompTD = pCompTD->pBaseTypeDescription )
+ {
+ ppTypes[nPos++] =
+ new ExceptionType( pCode, _codeBase,
+ (typelib_TypeDescription *)pCompTD );
+ pCode += codeSnippetSize;
+ }
+}
+
+RaiseInfo::~RaiseInfo() throw ()
+{
+ sal_uInt32 * pTypes =
+ (sal_uInt32 *)(_codeBase + _types) + 1;
+
+ for ( int nTypes = *(sal_uInt32 *)(_codeBase + _types); nTypes--; )
+ {
+ delete (ExceptionType *) (_codeBase + pTypes[nTypes]);
+ }
+ ::rtl_freeMemory( (void*)(_codeBase +_types) );
+ ::rtl_freeMemory( _code );
+
+ ::typelib_typedescription_release( _pTD );
+}
+
+ExceptionInfos::ExceptionInfos() throw ()
+{
+}
+
+ExceptionInfos::~ExceptionInfos() throw ()
+{
+#if OSL_DEBUG_LEVEL > 1
+ OSL_TRACE( "> freeing exception infos... <\n" );
+#endif
+
+ MutexGuard aGuard( _aMutex );
+ for ( t_string2PtrMap::const_iterator iPos( _allRaiseInfos.begin() );
+ iPos != _allRaiseInfos.end(); ++iPos )
+ {
+ delete (RaiseInfo *)iPos->second;
+ }
+}
+
+RaiseInfo * ExceptionInfos::getRaiseInfo( typelib_TypeDescription * pTD ) throw ()
+{
+ static ExceptionInfos * s_pInfos = 0;
+ if (! s_pInfos)
+ {
+ MutexGuard aGuard( Mutex::getGlobalMutex() );
+ if (! s_pInfos)
+ {
+ SYSTEM_INFO systemInfo;
+ GetSystemInfo( &systemInfo );
+ allocationGranularity = systemInfo.dwAllocationGranularity;
+
+#ifdef LEAK_STATIC_DATA
+ s_pInfos = new ExceptionInfos();
+#else
+ static ExceptionInfos s_allExceptionInfos;
+ s_pInfos = &s_allExceptionInfos;
+#endif
+ }
+ }
+
+ OSL_ASSERT( pTD &&
+ (pTD->eTypeClass == typelib_TypeClass_STRUCT ||
+ pTD->eTypeClass == typelib_TypeClass_EXCEPTION) );
+
+ RaiseInfo * pRaiseInfo;
+
+ OUString const & rTypeName = *reinterpret_cast< OUString * >( &pTD->pTypeName );
+ MutexGuard aGuard( s_pInfos->_aMutex );
+ t_string2PtrMap::const_iterator const iFind(
+ s_pInfos->_allRaiseInfos.find( rTypeName ) );
+ if (iFind == s_pInfos->_allRaiseInfos.end())
+ {
+ pRaiseInfo = new RaiseInfo( pTD );
+
+ // Put into map
+ pair< t_string2PtrMap::iterator, bool > insertion(
+ s_pInfos->_allRaiseInfos.insert( t_string2PtrMap::value_type( rTypeName, (void *)pRaiseInfo ) ) );
+ OSL_ENSURE( insertion.second, "### raise info insertion failed?!" );
+ }
+ else
+ {
+ // Reuse existing info
+ pRaiseInfo = (RaiseInfo *)iFind->second;
+ }
+
+ return pRaiseInfo;
+}
+
+type_info * mscx_getRTTI(
+ OUString const & rUNOname )
+{
+ static RTTInfos * s_pRTTIs = 0;
+ if (! s_pRTTIs)
+ {
+ MutexGuard aGuard( Mutex::getGlobalMutex() );
+ if (! s_pRTTIs)
+ {
+#ifdef LEAK_STATIC_DATA
+ s_pRTTIs = new RTTInfos();
+#else
+ static RTTInfos s_aRTTIs;
+ s_pRTTIs = &s_aRTTIs;
+#endif
+ }
+ }
+ return s_pRTTIs->getRTTI( rUNOname );
+}
+
+void mscx_raiseException(
+ uno_Any * pUnoExc,
+ uno_Mapping * pUno2Cpp )
+{
+ // no ctor/dtor in here: this leads to dtors called twice upon RaiseException()!
+ // thus this obj file will be compiled without opt, so no inlining of
+ // ExceptionInfos::getRaiseInfo()
+
+ // construct cpp exception object
+ typelib_TypeDescription * pTD = NULL;
+ TYPELIB_DANGER_GET( &pTD, pUnoExc->pType );
+
+ void * pCppExc = alloca( pTD->nSize );
+ ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTD, pUno2Cpp );
+
+ ULONG_PTR arFilterArgs[4];
+ arFilterArgs[0] = MSVC_magic_number;
+ arFilterArgs[1] = (ULONG_PTR)pCppExc;
+ arFilterArgs[2] = (ULONG_PTR)ExceptionInfos::getRaiseInfo( pTD );
+ arFilterArgs[3] = ((RaiseInfo *)arFilterArgs[2])->_codeBase;
+
+ // Destruct uno exception
+ ::uno_any_destruct( pUnoExc, 0 );
+ TYPELIB_DANGER_RELEASE( pTD );
+
+ // last point to release anything not affected by stack unwinding
+ RaiseException( MSVC_ExceptionCode, EXCEPTION_NONCONTINUABLE, 3, arFilterArgs );
+}
+
+int mscx_filterCppException(
+ EXCEPTION_POINTERS * pPointers,
+ uno_Any * pUnoExc,
+ uno_Mapping * pCpp2Uno )
+{
+ if (pPointers == 0)
+ return EXCEPTION_CONTINUE_SEARCH;
+
+ EXCEPTION_RECORD * pRecord = pPointers->ExceptionRecord;
+
+ // Handle only C++ exceptions:
+ if (pRecord == 0 || pRecord->ExceptionCode != MSVC_ExceptionCode)
+ return EXCEPTION_CONTINUE_SEARCH;
+
+ bool rethrow = __CxxDetectRethrow( &pRecord );
+ OSL_ASSERT( pRecord == pPointers->ExceptionRecord );
+
+ if (rethrow && pRecord == pPointers->ExceptionRecord)
+ {
+ // Hack to get msvcrt internal _curexception field:
+ pRecord = *reinterpret_cast< EXCEPTION_RECORD ** >(
+ reinterpret_cast< char * >( __pxcptinfoptrs() ) +
+ // As long as we don't demand MSVCR source as build prerequisite,
+ // we have to code those offsets here.
+ //
+ // MSVS9/crt/src/mtdll.h:
+ // offsetof (_tiddata, _curexception) -
+ // offsetof (_tiddata, _tpxcptinfoptrs):
+#if _MSC_VER < 1500
+ error, this compiler version is not supported
+#elif _MSC_VER < 1600
+ 0x48 // msvcr90.dll
+#else
+ error, please find value for this compiler version
+#endif
+ );
+ }
+
+ // Rethrow: handle only C++ exceptions:
+ if (pRecord == 0 || pRecord->ExceptionCode != MSVC_ExceptionCode)
+ return EXCEPTION_CONTINUE_SEARCH;
+
+ if (pRecord->NumberParameters == 4 &&
+ pRecord->ExceptionInformation[0] == MSVC_magic_number &&
+ pRecord->ExceptionInformation[1] != 0 &&
+ pRecord->ExceptionInformation[2] != 0 &&
+ pRecord->ExceptionInformation[3] != 0)
+ {
+ // ExceptionInformation[1] is the address of the thrown object
+ // (or the address of a pointer to it, in most cases when it
+ // is a C++ class, obviously).
+
+ // [2] is the throwinfo pointer
+
+ // [3] is the image base address which is added the 32-bit
+ // rva_t fields in throwinfo to get actual 64-bit addresses
+
+ void * types =
+ (void *) (pRecord->ExceptionInformation[3] +
+ ((RaiseInfo *)pRecord->ExceptionInformation[2])->_types);
+
+ if (types != 0 && *(DWORD *)types > 0)
+ {
+ DWORD pType = *((DWORD *)types + 1);
+ if (pType != 0 &&
+ ((ExceptionType *)(pRecord->ExceptionInformation[3]+pType))->_pTypeInfo != 0)
+ {
+ OUString aRTTIname(
+ OStringToOUString(
+ reinterpret_cast< __type_info * >(
+ ((ExceptionType *)(pRecord->ExceptionInformation[3]+pType))->_pTypeInfo )->_m_d_name,
+ RTL_TEXTENCODING_ASCII_US ) );
+ OUString aUNOname( toUNOname( aRTTIname ) );
+
+ typelib_TypeDescription * pExcTD = 0;
+ typelib_typedescription_getByName(
+ &pExcTD, aUNOname.pData );
+ if (pExcTD == NULL)
+ {
+ OUStringBuffer buf;
+ buf.appendAscii(
+ RTL_CONSTASCII_STRINGPARAM(
+ "[mscx_uno bridge error] UNO type of "
+ "C++ exception unknown: \"") );
+ buf.append( aUNOname );
+ buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(
+ "\", RTTI-name=\"") );
+ buf.append( aRTTIname );
+ buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\"!") );
+ RuntimeException exc(
+ buf.makeStringAndClear(), Reference< XInterface >() );
+ uno_type_any_constructAndConvert(
+ pUnoExc, &exc,
+ ::getCppuType( &exc ).getTypeLibType(), pCpp2Uno );
+#if _MSC_VER < 1400 // msvcr80.dll cleans up, different from former msvcrs
+ // if (! rethrow):
+ // though this unknown exception leaks now, no user-defined
+ // exception is ever thrown thru the binary C-UNO dispatcher
+ // call stack.
+#endif
+ }
+ else
+ {
+ // construct uno exception any
+ uno_any_constructAndConvert(
+ pUnoExc, (void *) pRecord->ExceptionInformation[1],
+ pExcTD, pCpp2Uno );
+#if _MSC_VER < 1400 // msvcr80.dll cleans up, different from former msvcrs
+ if (! rethrow)
+ {
+ uno_destructData(
+ (void *) pRecord->ExceptionInformation[1],
+ pExcTD, cpp_release );
+ }
+#endif
+ typelib_typedescription_release( pExcTD );
+ }
+
+ return EXCEPTION_EXECUTE_HANDLER;
+ }
+ }
+ }
+ // though this unknown exception leaks now, no user-defined exception
+ // is ever thrown thru the binary C-UNO dispatcher call stack.
+ RuntimeException exc(
+ OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "[mscx_uno bridge error] unexpected "
+ "C++ exception occurred!") ),
+ Reference< XInterface >() );
+ uno_type_any_constructAndConvert(
+ pUnoExc, &exc, ::getCppuType( &exc ).getTypeLibType(), pCpp2Uno );
+ return EXCEPTION_EXECUTE_HANDLER;
+}
+
+}
+
+#pragma pack(pop)
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_intel/makefile.mk b/bridges/source/cpp_uno/msvc_win32_x86-64/makefile.mk
index 87ff690dd653..7f73ebe4bba2 100644
--- a/bridges/source/cpp_uno/gcc3_freebsd_intel/makefile.mk
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/makefile.mk
@@ -28,7 +28,7 @@
PRJ=..$/..$/..
PRJNAME=bridges
-TARGET=gcc3_uno
+TARGET=mscx_uno
LIBTARGET=no
ENABLE_EXCEPTIONS=TRUE
@@ -37,25 +37,29 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
# --- Files --------------------------------------------------------
+.IF "$(COM)$(CPU)" == "MSCX"
-.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCFREEBSDIgcc3"
+.IF "$(debug)" != ""
+CFLAGS += -Ob0
+.ENDIF
.IF "$(cppu_no_leak)" == ""
+.IF "$(bndchk)" == ""
CFLAGS += -DLEAK_STATIC_DATA
.ENDIF
+.ENDIF
-# In case someone enabled the non-standard -fomit-frame-pointer which does not
-# work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
-
-CFLAGSNOOPT=-O0
SLOFILES= \
- $(SLO)$/except.obj \
- $(SLO)$/cpp2uno.obj \
+ $(SLO)$/cpp2uno.obj \
$(SLO)$/uno2cpp.obj \
+ $(SLO)$/dllinit.obj \
+ $(SLO)$/except.obj \
$(SLO)$/call.obj
+NOOPTFILES= \
+ $(SLO)$/except.obj
+
SHL1TARGET= $(TARGET)
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
@@ -67,15 +71,13 @@ SHL1OBJS = $(SLOFILES)
SHL1LIBS = $(SLB)$/cpp_uno_shared.lib
SHL1STDLIBS= \
- $(CPPULIB) \
+ $(CPPULIB) \
$(SALLIB)
+DEF1NAME=$(SHL1TARGET)
+
.ENDIF
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
-
-$(SLO)$/%.obj: %.s
- $(CC) -c -o $(SLO)$/$(@:b).o $<
- touch $@
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx b/bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx
new file mode 100644
index 000000000000..044bd4bb1316
--- /dev/null
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#pragma warning(push, 1)
+#include <windows.h>
+#pragma warning(pop)
+
+#include "rtl/ustring.hxx"
+
+
+class type_info;
+typedef struct _uno_Any uno_Any;
+typedef struct _uno_Mapping uno_Mapping;
+
+namespace CPPU_CURRENT_NAMESPACE
+{
+
+const DWORD MSVC_ExceptionCode = 0xe06d7363;
+const long MSVC_magic_number = 0x19930520L;
+
+typedef enum { REGPARAM_INT, REGPARAM_FLT } RegParamKind;
+
+
+//==============================================================================
+type_info * mscx_getRTTI( ::rtl::OUString const & rUNOname );
+
+//==============================================================================
+int mscx_filterCppException(
+ EXCEPTION_POINTERS * pPointers, uno_Any * pUnoExc, uno_Mapping * pCpp2Uno );
+
+//==============================================================================
+void mscx_raiseException(
+ uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx
new file mode 100644
index 000000000000..7271aa510847
--- /dev/null
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx
@@ -0,0 +1,450 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_bridges.hxx"
+
+#include <malloc.h>
+
+#include <com/sun/star/uno/genfunc.hxx>
+#include <uno/data.h>
+
+#include "bridges/cpp_uno/shared/bridge.hxx"
+#include "bridges/cpp_uno/shared/types.hxx"
+#include "bridges/cpp_uno/shared/unointerfaceproxy.hxx"
+#include "bridges/cpp_uno/shared/vtables.hxx"
+
+#include "mscx.hxx"
+
+#if OSL_DEBUG_LEVEL > 1
+#include <stdio.h>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+
+namespace
+{
+
+static bool cpp_call(
+ bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
+ bridges::cpp_uno::shared::VtableSlot aVtableSlot,
+ typelib_TypeDescriptionReference * pReturnTypeRef,
+ sal_Int32 nParams,
+ typelib_MethodParameter * pParams,
+ void * pUnoReturn,
+ void * pUnoArgs[],
+ uno_Any ** ppUnoExc ) throw ()
+{
+ const int MAXPARAMS = 20;
+
+ if ( nParams > MAXPARAMS )
+ {
+ // We have a hard limit on the number of parameters so that we
+ // don't need any assembler code here but can call the
+ // function using normal C++.
+
+ return false;
+ }
+
+ // Table with this pointer, optional complex return value ptr, and the parameters
+ union {
+ sal_Int64 i;
+ void *p;
+ double d;
+ } aCppParams[MAXPARAMS+2], uRetVal;
+ int nCppParamIndex = 0;
+
+ // Return type
+ typelib_TypeDescription * pReturnTD = NULL;
+ TYPELIB_DANGER_GET( &pReturnTD, pReturnTypeRef );
+ OSL_ENSURE( pReturnTD, "### expected return type description!" );
+
+ // 'this'
+ void * pAdjustedThisPtr = (void **)( pThis->getCppI() ) + aVtableSlot.offset;
+ aCppParams[nCppParamIndex++].p = pAdjustedThisPtr;
+
+ bool bSimpleReturn = true;
+ if ( pReturnTD )
+ {
+ if ( !bridges::cpp_uno::shared::isSimpleType( pReturnTD ) )
+ {
+ // Complex return via ptr
+ bSimpleReturn = false;
+ aCppParams[nCppParamIndex++].p =
+ bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTD )?
+ alloca( pReturnTD->nSize ) : pUnoReturn;
+ }
+ }
+
+ // Indexes of values this have to be converted (interface conversion C++<=>UNO)
+ int pTempCppIndexes[MAXPARAMS];
+ int pTempIndexes[MAXPARAMS];
+ int nTempIndexes = 0;
+
+ // Type descriptions for reconversions
+ typelib_TypeDescription *pTempParamTypeDescr[MAXPARAMS];
+
+ for ( int nPos = 0; nPos < nParams; ++nPos, ++nCppParamIndex )
+ {
+ const typelib_MethodParameter & rParam = pParams[nPos];
+
+ typelib_TypeDescription * pParamTD = NULL;
+ TYPELIB_DANGER_GET( &pParamTD, rParam.pTypeRef );
+
+ if ( !rParam.bOut &&
+ bridges::cpp_uno::shared::isSimpleType( pParamTD ) )
+ {
+ ::uno_copyAndConvertData(
+ &aCppParams[nCppParamIndex], pUnoArgs[nPos], pParamTD,
+ pThis->getBridge()->getUno2Cpp() );
+
+ // No longer needed
+ TYPELIB_DANGER_RELEASE( pParamTD );
+ }
+ else // Ptr to complex value | ref
+ {
+ if ( !rParam.bIn ) // Is pure out
+ {
+ // C++ out is constructed mem, UNO out is not!
+ ::uno_constructData(
+ aCppParams[nCppParamIndex].p = alloca( pParamTD->nSize ),
+ pParamTD );
+
+ pTempCppIndexes[nTempIndexes] = nCppParamIndex;
+ pTempIndexes[nTempIndexes] = nPos;
+
+ // Will be released at reconversion
+ pTempParamTypeDescr[nTempIndexes++] = pParamTD;
+
+ }
+ // Is in/inout
+ else if ( bridges::cpp_uno::shared::relatesToInterfaceType( pParamTD ) )
+ {
+ ::uno_copyAndConvertData(
+ aCppParams[nCppParamIndex].p = alloca( pParamTD->nSize ),
+ pUnoArgs[nPos], pParamTD,
+ pThis->getBridge()->getUno2Cpp() );
+
+ pTempCppIndexes[nTempIndexes] = nCppParamIndex;
+ pTempIndexes[nTempIndexes] = nPos;
+
+ // Will be released at reconversion
+ pTempParamTypeDescr[nTempIndexes++] = pParamTD;
+ }
+ else // direct way
+ {
+ aCppParams[nCppParamIndex].p = pUnoArgs[nPos];
+
+ // No longer needed
+ TYPELIB_DANGER_RELEASE( pParamTD );
+ }
+ }
+ }
+
+ __try
+ {
+ // The first real parameter is always 'this'.
+
+ // The Windows x64 calling convention is very regular and
+ // elegant (even if perhaps then slightly slower than the
+ // Linux x64 one): The first four parameters, never more, are
+ // passed in registers, as long as they are a qword in size
+ // or less. (If larger, a pointer to a temp copy is passed, so
+ // it's equivalent anyway.) Floating point values are passed
+ // in XMM0..3 registers, others in RCX, RDX, R8, R9.
+
+ // Now, the nice thing for us is that when calling varargs
+ // functions, floating-point parameters among the four first
+ // ones are always passed *both* in an XMM and integer
+ // register. So we don't need to bother here calling the
+ // method different ways depending on what types of parameters
+ // it actually expects. We just pretend parameters 3..4 are
+ // doubles, and they will be passed both in XMM and integer
+ // registers, and the callee will find them where it
+ // expects. (The callee is not actually varargs, of course.)
+
+ sal_Int64 (*pIMethod)(sal_Int64, ...) =
+ (sal_Int64 (*)(sal_Int64, ...))
+ (*((sal_uInt64 **)pAdjustedThisPtr))[aVtableSlot.index];
+
+ double (*pFMethod)(sal_Int64, ...) =
+ (double (*)(sal_Int64, ...))
+ (*((sal_uInt64 **)pAdjustedThisPtr))[aVtableSlot.index];
+
+ // Pass parameters 2..4 as if it was a floating-point value so
+ // that it gets put in both XMM and integer registers per the
+ // calling convention. It doesn't matter if it actually is a
+ // fp or not.
+
+ if ( pReturnTD &&
+ (pReturnTD->eTypeClass == typelib_TypeClass_FLOAT ||
+ pReturnTD->eTypeClass == typelib_TypeClass_DOUBLE) )
+ uRetVal.d =
+ pFMethod (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 );
+ 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 );
+ }
+ __except (CPPU_CURRENT_NAMESPACE::mscx_filterCppException(
+ GetExceptionInformation(),
+ *ppUnoExc, pThis->getBridge()->getCpp2Uno() ))
+ {
+ // *ppUnoExc was constructed by filter function.
+ // Temporary params
+ while ( nTempIndexes-- )
+ {
+ int nCppIndex = pTempCppIndexes[nTempIndexes];
+ // Destroy temp C++ param => C++: every param was constructed
+ ::uno_destructData(
+ aCppParams[nCppIndex].p, pTempParamTypeDescr[nTempIndexes],
+ cpp_release );
+ TYPELIB_DANGER_RELEASE( pTempParamTypeDescr[nTempIndexes] );
+ }
+ // Return type
+ if ( pReturnTD )
+ TYPELIB_DANGER_RELEASE( pReturnTD );
+
+ // End here
+ return true;
+ }
+
+ // No exception occurred
+ *ppUnoExc = NULL;
+
+ // Reconvert temporary params
+ while ( nTempIndexes-- )
+ {
+ int nCppIndex = pTempCppIndexes[nTempIndexes];
+ int nIndex = pTempIndexes[nTempIndexes];
+ typelib_TypeDescription * pParamTD =
+ pTempParamTypeDescr[nTempIndexes];
+
+ if ( pParams[nIndex].bIn )
+ {
+ if ( pParams[nIndex].bOut ) // Inout
+ {
+ ::uno_destructData(
+ pUnoArgs[nIndex], pParamTD, 0 ); // Destroy UNO value
+ ::uno_copyAndConvertData(
+ pUnoArgs[nIndex], aCppParams[nCppIndex].p, pParamTD,
+ pThis->getBridge()->getCpp2Uno() );
+ }
+ }
+ else // Pure out
+ {
+ ::uno_copyAndConvertData(
+ pUnoArgs[nIndex], aCppParams[nCppIndex].p, pParamTD,
+ pThis->getBridge()->getCpp2Uno() );
+ }
+
+ // Destroy temp C++ param => C++: every param was constructed
+ ::uno_destructData(
+ aCppParams[nCppIndex].p, pParamTD, cpp_release );
+
+ TYPELIB_DANGER_RELEASE( pParamTD );
+ }
+
+ // Return value
+ if ( !bSimpleReturn )
+ {
+ ::uno_copyAndConvertData(
+ pUnoReturn, uRetVal.p, pReturnTD,
+ pThis->getBridge()->getCpp2Uno() );
+ ::uno_destructData(
+ aCppParams[1].p, pReturnTD, cpp_release );
+ }
+ else if ( pUnoReturn )
+ *(sal_Int64*)pUnoReturn = uRetVal.i;
+
+ if ( pReturnTD )
+ TYPELIB_DANGER_RELEASE( pReturnTD );
+
+ return true;
+}
+
+}
+
+namespace bridges { namespace cpp_uno { namespace shared {
+
+void unoInterfaceProxyDispatch(
+ uno_Interface * pUnoI,
+ const typelib_TypeDescription * pMemberTD,
+ void * pReturn,
+ void * pArgs[],
+ uno_Any ** ppException )
+{
+ // is my surrogate
+ bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
+ = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI);
+#if OSL_DEBUG_LEVEL > 0
+ typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
+#endif
+
+ switch (pMemberTD->eTypeClass)
+ {
+ case typelib_TypeClass_INTERFACE_ATTRIBUTE:
+ {
+#if OSL_DEBUG_LEVEL > 0
+ // determine vtable call index
+ sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberTD)->nPosition;
+ OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
+#endif
+ VtableSlot aVtableSlot(
+ getVtableSlot(
+ reinterpret_cast<
+ typelib_InterfaceAttributeTypeDescription const * >(
+ pMemberTD)));
+ if ( pReturn )
+ {
+ // Is GET
+ cpp_call(
+ pThis, aVtableSlot,
+ ((typelib_InterfaceAttributeTypeDescription *)pMemberTD)->pAttributeTypeRef,
+ 0, NULL, // no params
+ pReturn, pArgs, ppException );
+ }
+ else
+ {
+ // Is SET
+ typelib_MethodParameter aParam;
+ aParam.pTypeRef =
+ ((typelib_InterfaceAttributeTypeDescription *)pMemberTD)->pAttributeTypeRef;
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
+ typelib_TypeDescriptionReference * pReturnTypeRef = NULL;
+ OUString aVoidName( RTL_CONSTASCII_USTRINGPARAM("void") );
+ typelib_typedescriptionreference_new(
+ &pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
+
+ aVtableSlot.index += 1; // get, then set method
+ cpp_call(
+ pThis, aVtableSlot,
+ pReturnTypeRef,
+ 1, &aParam,
+ pReturn, pArgs, ppException );
+
+ typelib_typedescriptionreference_release( pReturnTypeRef );
+ }
+
+ break;
+ }
+ case typelib_TypeClass_INTERFACE_METHOD:
+ {
+#if OSL_DEBUG_LEVEL > 0
+ // determine vtable call index
+ sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberTD)->nPosition;
+ OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
+#endif
+ VtableSlot aVtableSlot(
+ getVtableSlot(
+ reinterpret_cast<
+ typelib_InterfaceMethodTypeDescription const * >(
+ pMemberTD)));
+
+ switch (aVtableSlot.index)
+ {
+ // Standard calls
+ case 1: // Acquire UNO interface
+ (*pUnoI->acquire)( pUnoI );
+ *ppException = 0;
+ break;
+ case 2: // Release UNO interface
+ (*pUnoI->release)( pUnoI );
+ *ppException = 0;
+ break;
+ case 0: // queryInterface() opt
+ {
+ typelib_TypeDescription * pTD = NULL;
+ TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pArgs[0] )->getTypeLibType() );
+
+ if ( pTD )
+ {
+ uno_Interface * pInterface = NULL;
+ (*pThis->getBridge()->getUnoEnv()->getRegisteredInterface)(
+ pThis->getBridge()->getUnoEnv(),
+ (void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
+
+ if ( pInterface )
+ {
+ ::uno_any_construct(
+ reinterpret_cast< uno_Any * >( pReturn ),
+ &pInterface, pTD, 0 );
+ (*pInterface->release)( pInterface );
+
+ TYPELIB_DANGER_RELEASE( pTD );
+
+ *ppException = 0;
+ break;
+ }
+ TYPELIB_DANGER_RELEASE( pTD );
+ }
+ } // Else perform queryInterface()
+ default:
+ if ( ! cpp_call(
+ pThis, aVtableSlot,
+ ((typelib_InterfaceMethodTypeDescription *)pMemberTD)->pReturnTypeRef,
+ ((typelib_InterfaceMethodTypeDescription *)pMemberTD)->nParams,
+ ((typelib_InterfaceMethodTypeDescription *)pMemberTD)->pParams,
+ pReturn, pArgs, ppException ) )
+ {
+ RuntimeException aExc(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("Too many parameters!") ),
+ Reference< XInterface >() );
+
+ Type const & rExcType = ::getCppuType( &aExc );
+ ::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
+ }
+ }
+ break;
+ }
+ default:
+ {
+ RuntimeException aExc(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("Illegal member type description!") ),
+ Reference< XInterface >() );
+
+ Type const & rExcType = ::getCppuType( &aExc );
+ // Binary identical null reference (whatever that comment means...)
+ ::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
+ }
+ }
+}
+
+} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/shared/bridge.cxx b/bridges/source/cpp_uno/shared/bridge.cxx
index 731eab39cc7c..0b76b0ca1a8a 100644
--- a/bridges/source/cpp_uno/shared/bridge.cxx
+++ b/bridges/source/cpp_uno/shared/bridge.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -224,3 +225,5 @@ Bridge::~Bridge() SAL_THROW(())
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/shared/component.cxx b/bridges/source/cpp_uno/shared/component.cxx
index 1f8a6eccb41f..f4f0a1988b56 100644
--- a/bridges/source/cpp_uno/shared/component.cxx
+++ b/bridges/source/cpp_uno/shared/component.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -147,8 +148,8 @@ static void s_stub_computeObjectIdentifier(va_list * pParam)
}
catch (::com::sun::star::uno::RuntimeException &)
{
- OSL_ENSURE(
- 0, "### RuntimeException occured udring queryInterface()!" );
+ OSL_FAIL(
+ "### RuntimeException occurred udring queryInterface()!" );
}
}
}
@@ -270,3 +271,5 @@ void SAL_CALL uno_ext_getMapping(
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/shared/component.hxx b/bridges/source/cpp_uno/shared/component.hxx
index 31622f312304..7be6cd7a6355 100644
--- a/bridges/source/cpp_uno/shared/component.hxx
+++ b/bridges/source/cpp_uno/shared/component.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,3 +38,5 @@ extern rtl_StandardModuleCount g_moduleCount;
} } }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
index 90c53d258d10..5b3c8eeba37e 100644
--- a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
+++ b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -203,3 +204,5 @@ CppInterfaceProxy * CppInterfaceProxy::castInterfaceToProxy(void * pInterface)
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/shared/guardedarray.hxx b/bridges/source/cpp_uno/shared/guardedarray.hxx
index b49def85ac64..9e4e0f3b0cad 100644
--- a/bridges/source/cpp_uno/shared/guardedarray.hxx
+++ b/bridges/source/cpp_uno/shared/guardedarray.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,5 @@ private:
} } }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/shared/types.cxx b/bridges/source/cpp_uno/shared/types.cxx
index 6a08038f9902..cf442082f283 100644
--- a/bridges/source/cpp_uno/shared/types.cxx
+++ b/bridges/source/cpp_uno/shared/types.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -124,3 +125,5 @@ bool relatesToInterfaceType(typelib_TypeDescription const * type) {
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx b/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx
index 1f5580eb2f30..e3159f12190d 100644
--- a/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx
+++ b/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -140,3 +141,5 @@ UnoInterfaceProxy::~UnoInterfaceProxy()
{}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx b/bridges/source/cpp_uno/shared/vtablefactory.cxx
index 58c275a11234..5d5609825a83 100644
--- a/bridges/source/cpp_uno/shared/vtablefactory.cxx
+++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,11 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_bridges.hxx"
-#if defined OS2
-#define INCL_DOS
-#define INCL_DOSMISC
-#endif
-
#include "bridges/cpp_uno/shared/vtablefactory.hxx"
#include "guardedarray.hxx"
@@ -49,13 +45,14 @@
#include "sal/types.h"
#include "typelib/typedescription.hxx"
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <new>
#include <vector>
#if defined SAL_UNX
#include <unistd.h>
#include <string.h>
+#include <errno.h>
#include <sys/mman.h>
#elif defined SAL_W32
#define WIN32_LEAN_AND_MEAN
@@ -66,10 +63,6 @@
#ifdef _MSC_VER
#pragma warning(pop)
#endif
-#elif defined SAL_OS2
-#define INCL_DOS
-#define INCL_DOSMISC
-#include <os2.h>
#else
#error Unsupported platform
#endif
@@ -81,7 +74,7 @@ namespace {
extern "C" void * SAL_CALL allocExec(rtl_arena_type *, sal_Size * size) {
sal_Size pagesize;
#if defined SAL_UNX
-#if defined FREEBSD || defined NETBSD
+#if defined FREEBSD || defined NETBSD || defined OPENBSD || defined DRAGONFLY
pagesize = getpagesize();
#else
pagesize = sysconf(_SC_PAGESIZE);
@@ -90,10 +83,6 @@ extern "C" void * SAL_CALL allocExec(rtl_arena_type *, sal_Size * size) {
SYSTEM_INFO info;
GetSystemInfo(&info);
pagesize = info.dwPageSize;
-#elif defined(SAL_OS2)
- ULONG ulPageSize;
- DosQuerySysInfo(QSV_PAGE_SIZE, QSV_PAGE_SIZE, &ulPageSize, sizeof(ULONG));
- pagesize = (sal_Size)ulPageSize;
#else
#error Unsupported platform
#endif
@@ -113,9 +102,6 @@ extern "C" void * SAL_CALL allocExec(rtl_arena_type *, sal_Size * size) {
}
#elif defined SAL_W32
p = VirtualAlloc(0, n, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
-#elif defined(SAL_OS2)
- p = 0;
- DosAllocMem( &p, n, PAG_COMMIT | PAG_READ | PAG_WRITE | OBJ_ANY);
#endif
if (p != 0) {
*size = n;
@@ -131,8 +117,6 @@ extern "C" void SAL_CALL freeExec(
#elif defined SAL_W32
(void) size; // unused
VirtualFree(address, 0, MEM_RELEASE);
-#elif defined(SAL_OS2)
- (void) DosFreeMem( address);
#endif
}
@@ -174,7 +158,7 @@ private:
sal_Int32 calculate(
typelib_InterfaceTypeDescription * type, sal_Int32 offset);
- typedef std::hash_map< rtl::OUString, sal_Int32, rtl::OUStringHash > Map;
+ typedef boost::unordered_map< rtl::OUString, sal_Int32, rtl::OUStringHash > Map;
Map m_map;
};
@@ -262,14 +246,14 @@ bool VtableFactory::createBlock(Block &block, sal_Int32 slotCount) const
for (int i = strDirectory.getLength() == 0 ? 1 : 0; i < 2; ++i)
{
if (!strDirectory.getLength())
- strDirectory = rtl::OUString::createFromAscii("/tmp");
+ strDirectory = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/tmp" ));
- strDirectory += rtl::OUString::createFromAscii("/.execoooXXXXXX");
+ strDirectory += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/.execoooXXXXXX" ));
rtl::OString aTmpName = rtl::OUStringToOString(strDirectory, osl_getThreadTextEncoding());
char *tmpfname = new char[aTmpName.getLength()+1];
strncpy(tmpfname, aTmpName.getStr(), aTmpName.getLength()+1);
if ((block.fd = mkstemp(tmpfname)) == -1)
- perror("creation of executable memory area failed");
+ fprintf(stderr, "mkstemp(\"%s\") failed: %s\n", tmpfname, strerror(errno));
if (block.fd == -1)
{
delete[] tmpfname;
@@ -380,3 +364,5 @@ void VtableFactory::createVtables(
createVtables(blocks, baseOffset, type->ppBaseTypes[i], i != 0);
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/shared/vtables.cxx b/bridges/source/cpp_uno/shared/vtables.cxx
index 2779d928f24e..40436d0224fb 100644
--- a/bridges/source/cpp_uno/shared/vtables.cxx
+++ b/bridges/source/cpp_uno/shared/vtables.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -152,3 +153,5 @@ VtableSlot getVtableSlot(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/jni_uno/jni_base.h b/bridges/source/jni_uno/jni_base.h
index 2a1ad425db12..cc23cd1b2a8f 100644
--- a/bridges/source/jni_uno/jni_base.h
+++ b/bridges/source/jni_uno/jni_base.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,7 +79,7 @@ class JNI_context
JNI_context( JNI_context & ); // not impl
void operator = ( JNI_context ); // not impl
- void java_exc_occured() const;
+ void java_exc_occurred() const;
public:
inline explicit JNI_context(
JNI_info const * jni_info, JNIEnv * env, jobject class_loader )
@@ -116,7 +117,7 @@ inline void JNI_context::ensure_no_exception() const
{
if (JNI_FALSE != m_env->ExceptionCheck())
{
- java_exc_occured();
+ java_exc_occurred();
}
}
@@ -126,7 +127,7 @@ inline bool JNI_context::assert_no_exception() const
if (JNI_FALSE != m_env->ExceptionCheck())
{
m_env->ExceptionClear();
- OSL_ENSURE( 0, "unexpected java exception occured!" );
+ OSL_FAIL( "unexpected java exception occurred!" );
return false;
}
return true;
@@ -290,3 +291,5 @@ inline TypeDescr::TypeDescr( typelib_TypeDescriptionReference * td_ref )
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/jni_uno/jni_bridge.cxx b/bridges/source/jni_uno/jni_bridge.cxx
index e9c1270b1f9b..d15f05a814fd 100644
--- a/bridges/source/jni_uno/jni_bridge.cxx
+++ b/bridges/source/jni_uno/jni_bridge.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -114,15 +115,14 @@ void SAL_CALL Mapping_map_to_uno(
OUStringToOString(
OUSTR("[jni_uno bridge error] ") + err.m_message,
RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr_msg.getStr() );
+ OSL_FAIL( cstr_msg.getStr() );
#else
(void) err; // unused
#endif
}
catch (::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
{
- OSL_ENSURE(
- 0,
+ OSL_FAIL(
"[jni_uno bridge error] attaching current thread "
"to java failed!" );
}
@@ -184,15 +184,14 @@ void SAL_CALL Mapping_map_to_java(
OUStringToOString(
OUSTR("[jni_uno bridge error] ") + err.m_message,
RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr_msg.getStr() );
+ OSL_FAIL( cstr_msg.getStr() );
#else
(void) err; // unused
#endif
}
catch (::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
{
- OSL_ENSURE(
- 0,
+ OSL_FAIL(
"[jni_uno bridge error] attaching current thread to java failed!" );
}
}
@@ -291,7 +290,7 @@ Bridge::~Bridge() SAL_THROW( () )
//______________________________________________________________________________
-void JNI_context::java_exc_occured() const
+void JNI_context::java_exc_occurred() const
{
// !don't rely on JNI_info!
@@ -301,7 +300,7 @@ void JNI_context::java_exc_occured() const
if (! jo_exc.is())
{
throw BridgeRuntimeError(
- OUSTR("java exception occured, but not available!?") +
+ OUSTR("java exception occurred, but not available!?") +
get_stack_trace() );
}
@@ -543,15 +542,14 @@ void SAL_CALL uno_ext_getMapping(
OUStringToOString(
OUSTR("[jni_uno bridge error] ") + err.m_message,
RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr_msg.getStr() );
+ OSL_FAIL( cstr_msg.getStr() );
#else
(void) err; // unused
#endif
}
catch (::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
{
- OSL_ENSURE(
- 0,
+ OSL_FAIL(
"[jni_uno bridge error] attaching current thread "
"to java failed!" );
}
@@ -567,3 +565,5 @@ sal_Bool SAL_CALL component_canUnload( TimeValue * pTime )
return (*g_moduleCount.canUnload)( &g_moduleCount, pTime );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/jni_uno/jni_bridge.h b/bridges/source/jni_uno/jni_bridge.h
index 464d181e0a9f..f2298fbdbe46 100644
--- a/bridges/source/jni_uno/jni_bridge.h
+++ b/bridges/source/jni_uno/jni_bridge.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -122,3 +123,5 @@ struct Bridge
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/jni_uno/jni_data.cxx b/bridges/source/jni_uno/jni_data.cxx
index 0b19a8d99c2d..aca455d154ed 100644
--- a/bridges/source/jni_uno/jni_data.cxx
+++ b/bridges/source/jni_uno/jni_data.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -560,45 +561,45 @@ void Bridge::map_to_uno(
pAny->pData = &pAny->pReserved;
break;
case typelib_TypeClass_CHAR:
- *(jchar *) &pAny->pReserved = jni->CallCharMethodA(
+ pAny->pData = &pAny->pReserved;
+ *(jchar *) pAny->pData = jni->CallCharMethodA(
java_data.l, m_jni_info->m_method_Character_charValue, 0 );
jni.ensure_no_exception();
- pAny->pData = &pAny->pReserved;
break;
case typelib_TypeClass_BOOLEAN:
- *(jboolean *) &pAny->pReserved = jni->CallBooleanMethodA(
+ pAny->pData = &pAny->pReserved;
+ *(jboolean *) pAny->pData = jni->CallBooleanMethodA(
java_data.l, m_jni_info->m_method_Boolean_booleanValue, 0 );
jni.ensure_no_exception();
- pAny->pData = &pAny->pReserved;
break;
case typelib_TypeClass_BYTE:
- *(jbyte *) &pAny->pReserved = jni->CallByteMethodA(
+ pAny->pData = &pAny->pReserved;
+ *(jbyte *) pAny->pData = jni->CallByteMethodA(
java_data.l, m_jni_info->m_method_Byte_byteValue, 0 );
jni.ensure_no_exception();
- pAny->pData = &pAny->pReserved;
break;
case typelib_TypeClass_SHORT:
case typelib_TypeClass_UNSIGNED_SHORT:
- *(jshort *) &pAny->pReserved = jni->CallShortMethodA(
+ pAny->pData = &pAny->pReserved;
+ *(jshort *) pAny->pData = jni->CallShortMethodA(
java_data.l, m_jni_info->m_method_Short_shortValue, 0 );
jni.ensure_no_exception();
- pAny->pData = &pAny->pReserved;
break;
case typelib_TypeClass_LONG:
case typelib_TypeClass_UNSIGNED_LONG:
- *(jint *) &pAny->pReserved = jni->CallIntMethodA(
+ pAny->pData = &pAny->pReserved;
+ *(jint *) pAny->pData = jni->CallIntMethodA(
java_data.l, m_jni_info->m_method_Integer_intValue, 0 );
jni.ensure_no_exception();
- pAny->pData = &pAny->pReserved;
break;
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
if (sizeof (sal_Int64) <= sizeof (void *))
{
- *(jlong *) &pAny->pReserved = jni->CallLongMethodA(
+ pAny->pData = &pAny->pReserved;
+ *(jlong *) pAny->pData = jni->CallLongMethodA(
java_data.l, m_jni_info->m_method_Long_longValue, 0 );
jni.ensure_no_exception();
- pAny->pData = &pAny->pReserved;
}
else
{
@@ -613,10 +614,10 @@ void Bridge::map_to_uno(
case typelib_TypeClass_FLOAT:
if (sizeof (float) <= sizeof (void *))
{
- *(jfloat *) &pAny->pReserved = jni->CallFloatMethodA(
+ pAny->pData = &pAny->pReserved;
+ *(jfloat *) pAny->pData = jni->CallFloatMethodA(
java_data.l, m_jni_info->m_method_Float_floatValue, 0 );
jni.ensure_no_exception();
- pAny->pData = &pAny->pReserved;
}
else
{
@@ -631,12 +632,12 @@ void Bridge::map_to_uno(
case typelib_TypeClass_DOUBLE:
if (sizeof (double) <= sizeof (void *))
{
- *(jdouble *) &pAny->pReserved =
+ pAny->pData = &pAny->pReserved;
+ *(jdouble *) pAny->pData =
jni->CallDoubleMethodA(
java_data.l,
m_jni_info->m_method_Double_doubleValue, 0 );
jni.ensure_no_exception();
- pAny->pData = &pAny->pReserved;
}
else
{
@@ -653,20 +654,20 @@ void Bridge::map_to_uno(
case typelib_TypeClass_STRING:
// opt: anies often contain strings; copy string directly
pAny->pReserved = 0;
+ pAny->pData = &pAny->pReserved;
jstring_to_ustring(
- jni, (rtl_uString **)&pAny->pReserved,
+ jni, (rtl_uString **)pAny->pData,
(jstring) java_data.l );
- pAny->pData = &pAny->pReserved;
break;
case typelib_TypeClass_TYPE:
case typelib_TypeClass_ENUM:
case typelib_TypeClass_SEQUENCE:
case typelib_TypeClass_INTERFACE:
+ pAny->pData = &pAny->pReserved;
map_to_uno(
- jni, &pAny->pReserved, java_data,
+ jni, pAny->pData, java_data,
value_td.get()->pWeakRef, 0,
false /* no assign */, false /* no out param */ );
- pAny->pData = &pAny->pReserved;
break;
case typelib_TypeClass_STRUCT:
case typelib_TypeClass_EXCEPTION:
@@ -1657,7 +1658,7 @@ void Bridge::map_to_java(
case typelib_TypeClass_UNSIGNED_SHORT:
{
jvalue args[ 2 ];
- args[ 0 ].s = *(jshort const *) &pAny->pReserved;
+ args[ 0 ].s = *(jshort const *) pAny->pData;
JLocalAutoRef jo_val(
jni, jni->NewObjectA(
m_jni_info->m_class_Short,
@@ -1676,7 +1677,7 @@ void Bridge::map_to_java(
case typelib_TypeClass_UNSIGNED_LONG:
{
jvalue args[ 2 ];
- args[ 0 ].i = *(jint const *) &pAny->pReserved;
+ args[ 0 ].i = *(jint const *) pAny->pData;
JLocalAutoRef jo_val(
jni, jni->NewObjectA(
m_jni_info->m_class_Integer,
@@ -2574,3 +2575,5 @@ void Bridge::map_to_java(
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/jni_uno/jni_helper.h b/bridges/source/jni_uno/jni_helper.h
index 8020f65c68f6..293bf82d868e 100644
--- a/bridges/source/jni_uno/jni_helper.h
+++ b/bridges/source/jni_uno/jni_helper.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -160,3 +161,5 @@ inline jobject compute_oid( JNI_context const & jni, jobject jo )
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/jni_uno/jni_info.cxx b/bridges/source/jni_uno/jni_info.cxx
index b6cde712a882..6df598859d0a 100644
--- a/bridges/source/jni_uno/jni_info.cxx
+++ b/bridges/source/jni_uno/jni_info.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -994,3 +995,5 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1info_1holder_finalize__J(
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/jni_uno/jni_info.h b/bridges/source/jni_uno/jni_info.h
index 861ab9d5a52b..a356be272e04 100644
--- a/bridges/source/jni_uno/jni_info.h
+++ b/bridges/source/jni_uno/jni_info.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,7 @@
#if ! defined INCLUDED_JNI_INFO_H
#define INCLUDED_JNI_INFO_H
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include "jni_base.h"
@@ -120,7 +121,7 @@ struct JNI_type_info_holder
{}
};
-typedef ::std::hash_map<
+typedef ::boost::unordered_map<
::rtl::OUString, JNI_type_info_holder, ::rtl::OUStringHash > t_str2type;
//==============================================================================
@@ -373,3 +374,5 @@ inline void JNI_info::append_sig(
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx
index 0ff4872804bb..63a9c0ad02ac 100644
--- a/bridges/source/jni_uno/jni_java2uno.cxx
+++ b/bridges/source/jni_uno/jni_java2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,6 @@
#include <sal/alloca.h>
#include "jni_bridge.h"
-//#include "jni_finalizer.h"
#include <rtl/ustrbuf.hxx>
@@ -109,7 +109,7 @@ void Bridge::handle_uno_exc( JNI_context const & jni, uno_Any * uno_exc ) const
{
OUStringBuffer buf( 128 );
buf.appendAscii(
- RTL_CONSTASCII_STRINGPARAM("exception occured java->uno: [") );
+ RTL_CONSTASCII_STRINGPARAM("exception occurred java->uno: [") );
buf.append( OUString::unacquired( &uno_exc->pType->pTypeName ) );
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("] ") );
buf.append(
@@ -118,7 +118,7 @@ void Bridge::handle_uno_exc( JNI_context const & jni, uno_Any * uno_exc ) const
OString cstr_msg(
OUStringToOString(
buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
- OSL_TRACE( cstr_msg.getStr() );
+ OSL_TRACE( "%s", cstr_msg.getStr() );
}
#endif
// signal exception
@@ -360,7 +360,7 @@ jobject Bridge::call_uno(
#endif
return 0; // void return
}
- else // exception occured
+ else // exception occurred
{
// destruct uno in args
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
@@ -422,7 +422,7 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call(
OString cstr_msg(
OUStringToOString(
trace_buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
- OSL_TRACE( cstr_msg.getStr() );
+ OSL_TRACE( "%s", cstr_msg.getStr() );
}
#endif
@@ -630,7 +630,7 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call(
OString cstr_msg(
OUStringToOString(
buf.makeStringAndClear(), RTL_TEXTENCODING_JAVA_UTF8 ) );
- OSL_ENSURE( 0, cstr_msg.getStr() );
+ OSL_FAIL( cstr_msg.getStr() );
if (jni->ThrowNew(jni_info->m_class_RuntimeException, cstr_msg.getStr())
!= 0)
{
@@ -646,7 +646,7 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call(
"attaching current thread to java failed!") ) +
OUStringToOString(
jni.get_stack_trace(), RTL_TEXTENCODING_JAVA_UTF8 ) );
- OSL_ENSURE( 0, cstr_msg.getStr() );
+ OSL_FAIL( cstr_msg.getStr() );
if (jni->ThrowNew(jni_info->m_class_RuntimeException, cstr_msg.getStr())
!= 0)
{
@@ -688,7 +688,7 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_finalize__J(
OUStringToOString(
OUSTR("freeing java uno proxy: ") + oid,
RTL_TEXTENCODING_ASCII_US ) );
- OSL_TRACE( cstr_msg.getStr() );
+ OSL_TRACE( "%s", cstr_msg.getStr() );
}
#endif
// revoke from uno env; has already been revoked from java env
@@ -702,3 +702,5 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_finalize__J(
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx
index 81ae922ae717..5fa8fa3e01b3 100644
--- a/bridges/source/jni_uno/jni_uno2java.cxx
+++ b/bridges/source/jni_uno/jni_uno2java.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,7 +78,7 @@ void Bridge::handle_java_exc(
if (! jo_exc.is())
{
throw BridgeRuntimeError(
- OUSTR("java exception occured, but no java exception available!?") +
+ OUSTR("java exception occurred, but no java exception available!?") +
jni.get_stack_trace() );
}
@@ -125,7 +126,7 @@ void Bridge::handle_java_exc(
#if OSL_DEBUG_LEVEL > 1
OUStringBuffer trace_buf( 128 );
trace_buf.appendAscii(
- RTL_CONSTASCII_STRINGPARAM("exception occured uno->java: [") );
+ RTL_CONSTASCII_STRINGPARAM("exception occurred uno->java: [") );
trace_buf.append( exc_name );
trace_buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("] ") );
trace_buf.append(
@@ -134,7 +135,7 @@ void Bridge::handle_java_exc(
OString cstr_trace(
OUStringToOString(
trace_buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
- OSL_TRACE( cstr_trace.getStr() );
+ OSL_TRACE( "%s", cstr_trace.getStr() );
#endif
}
@@ -260,7 +261,7 @@ void Bridge::call_java(
OString cstr_trace(
OUStringToOString(
trace_buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
- OSL_TRACE( cstr_trace.getStr() );
+ OSL_TRACE( "%s", cstr_trace.getStr() );
#endif
// complex return value
@@ -412,7 +413,7 @@ void Bridge::call_java(
}
} // else: already set integral uno return value
- // no exception occured
+ // no exception occurred
*uno_exc = 0;
}
#ifdef BROKEN_ALLOCA
@@ -557,7 +558,7 @@ void SAL_CALL UNO_proxy_free( uno_ExtEnvironment * env, void * proxy )
OUStringToOString(
OUSTR("freeing binary uno proxy: ") + that->m_oid,
RTL_TEXTENCODING_ASCII_US ) );
- OSL_TRACE( cstr_msg.getStr() );
+ OSL_TRACE( "%s", cstr_msg.getStr() );
#endif
try
@@ -575,15 +576,14 @@ void SAL_CALL UNO_proxy_free( uno_ExtEnvironment * env, void * proxy )
#if OSL_DEBUG_LEVEL > 0
OString cstr_msg2(
OUStringToOString( err.m_message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr_msg2.getStr() );
+ OSL_FAIL( cstr_msg2.getStr() );
#else
(void) err; // unused
#endif
}
catch (::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
{
- OSL_ENSURE(
- 0,
+ OSL_FAIL(
"[jni_uno bridge error] attaching current thread to java failed!" );
}
@@ -628,7 +628,7 @@ void SAL_CALL UNO_proxy_dispatch(
OString cstr_msg(
OUStringToOString(
trace_buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
- OSL_TRACE( cstr_msg.getStr() );
+ OSL_TRACE( "%s", cstr_msg.getStr() );
#endif
try
@@ -783,7 +783,7 @@ void SAL_CALL UNO_proxy_dispatch(
reinterpret_cast< uno_Any * >( uno_ret ),
0, 0, 0 );
}
- // no exception occured
+ // no exception occurred
*uno_exc = 0;
}
}
@@ -864,10 +864,12 @@ void SAL_CALL UNO_proxy_dispatch(
#if OSL_DEBUG_LEVEL > 0
OString cstr_msg2(
OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr_msg2.getStr() );
+ OSL_FAIL( cstr_msg2.getStr() );
#endif
}
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/jni_uno/nativethreadpool.cxx b/bridges/source/jni_uno/nativethreadpool.cxx
index 5b30ffdafc22..9c92e89c5b07 100644
--- a/bridges/source/jni_uno/nativethreadpool.cxx
+++ b/bridges/source/jni_uno/nativethreadpool.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -228,3 +229,5 @@ Java_com_sun_star_lib_uno_environments_remote_NativeThreadPool_destroy(
uno_threadpool_destroy(p->pool);
delete p;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */