summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
Diffstat (limited to 'bridges')
-rw-r--r--bridges/inc/bridges/cpp_uno/bridge.hxx3
-rw-r--r--bridges/inc/bridges/cpp_uno/shared/arraypointer.hxx3
-rw-r--r--bridges/inc/bridges/cpp_uno/shared/bridge.hxx3
-rw-r--r--bridges/inc/bridges/cpp_uno/shared/cppinterfaceproxy.hxx3
-rw-r--r--bridges/inc/bridges/cpp_uno/shared/types.hxx3
-rw-r--r--bridges/inc/bridges/cpp_uno/shared/unointerfaceproxy.hxx3
-rw-r--r--bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx3
-rw-r--r--bridges/inc/bridges/cpp_uno/shared/vtables.hxx3
-rw-r--r--bridges/inc/bridges/cpp_uno/type_misc.hxx3
-rw-r--r--bridges/inc/bridges/remote/bridgeimpl.hxx3
-rw-r--r--bridges/inc/bridges/remote/connection.h3
-rw-r--r--bridges/inc/bridges/remote/context.h2
-rw-r--r--bridges/inc/bridges/remote/counter.hxx3
-rw-r--r--bridges/inc/bridges/remote/helper.hxx3
-rw-r--r--bridges/inc/bridges/remote/mapping.hxx3
-rw-r--r--bridges/inc/bridges/remote/proxy.hxx3
-rw-r--r--bridges/inc/bridges/remote/remote.h3
-rw-r--r--bridges/inc/bridges/remote/remote.hxx3
-rw-r--r--bridges/inc/bridges/remote/stub.hxx3
-rw-r--r--bridges/inc/pch/precompiled_bridges.cxx2
-rw-r--r--bridges/inc/pch/precompiled_bridges.hxx3
-rw-r--r--bridges/prj/build.lst2
-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.cxx3
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_intel/except.cxx2
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_intel/hash.cxx3
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx3
-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.cxx3
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx2
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx3
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/hash.cxx3
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx3
-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.cxx663
-rw-r--r--bridges/source/cpp_uno/gcc3_aix_powerpc/except.cxx291
-rw-r--r--bridges/source/cpp_uno/gcc3_aix_powerpc/makefile.mk81
-rw-r--r--bridges/source/cpp_uno/gcc3_aix_powerpc/share.hxx102
-rw-r--r--bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx502
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_x86-64/abi.cxx450
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_x86-64/abi.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_x86-64/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx4
-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.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_arm/except.cxx3
-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.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/call.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx3
-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.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_ia64/except.cxx4
-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.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx3
-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.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_mips/except.cxx2
-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.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx2
-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.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx2
-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.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390/except.cxx4
-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.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx4
-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.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx2
-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.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx450
-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.cxx7
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk2
-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.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_intel/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_intel/uno2cpp.cxx5
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_powerpc/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_powerpc/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_netbsd_intel/call.s268
-rw-r--r--bridges/source/cpp_uno/gcc3_netbsd_intel/cpp2uno.cxx444
-rw-r--r--bridges/source/cpp_uno/gcc3_netbsd_intel/except.cxx33
-rw-r--r--bridges/source/cpp_uno/gcc3_netbsd_intel/makefile.mk16
-rw-r--r--bridges/source/cpp_uno/gcc3_netbsd_intel/share.hxx7
-rw-r--r--bridges/source/cpp_uno/gcc3_netbsd_intel/uno2cpp.cxx126
-rw-r--r--bridges/source/cpp_uno/gcc3_netbsd_x86-64/abi.cxx358
-rw-r--r--bridges/source/cpp_uno/gcc3_netbsd_x86-64/abi.hxx70
-rw-r--r--bridges/source/cpp_uno/gcc3_netbsd_x86-64/call.s93
-rw-r--r--bridges/source/cpp_uno/gcc3_netbsd_x86-64/cpp2uno.cxx544
-rw-r--r--bridges/source/cpp_uno/gcc3_netbsd_x86-64/except.cxx340
-rw-r--r--bridges/source/cpp_uno/gcc3_netbsd_x86-64/makefile.mk80
-rw-r--r--bridges/source/cpp_uno/gcc3_netbsd_x86-64/share.hxx93
-rw-r--r--bridges/source/cpp_uno/gcc3_netbsd_x86-64/uno2cpp.cxx561
-rw-r--r--bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_os2_intel/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_os2_intel/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_os2_intel/uno2cpp.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_intel/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_sparc/share.hxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx3
-rw-r--r--bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/mingw_intel/dllinit.cxx3
-rw-r--r--bridges/source/cpp_uno/mingw_intel/except.cxx2
-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.cxx3
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx3
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/except.cxx2
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/msci.hxx2
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/uno2cpp.cxx3
-rw-r--r--bridges/source/cpp_uno/shared/bridge.cxx3
-rw-r--r--bridges/source/cpp_uno/shared/component.cxx3
-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.cxx3
-rw-r--r--bridges/source/cpp_uno/shared/vtables.cxx3
-rw-r--r--bridges/source/jni_uno/jni_base.h3
-rw-r--r--bridges/source/jni_uno/jni_bridge.cxx3
-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.h3
-rw-r--r--bridges/source/jni_uno/jni_java2uno.cxx4
-rw-r--r--bridges/source/jni_uno/jni_uno2java.cxx3
-rw-r--r--bridges/source/jni_uno/nativethreadpool.cxx3
-rw-r--r--bridges/source/remote/context/context.cxx48
-rw-r--r--bridges/source/remote/static/helper.cxx5
-rw-r--r--bridges/source/remote/static/mapping.cxx3
-rw-r--r--bridges/source/remote/static/proxy.cxx3
-rw-r--r--bridges/source/remote/static/remote.cxx3
-rw-r--r--bridges/source/remote/static/remote_types.cxx3
-rw-r--r--bridges/source/remote/static/remote_types.hxx3
-rw-r--r--bridges/source/remote/static/stub.cxx3
-rw-r--r--bridges/source/remote/urp/urp_bridgeimpl.cxx11
-rw-r--r--bridges/source/remote/urp/urp_bridgeimpl.hxx3
-rw-r--r--bridges/source/remote/urp/urp_cache.h3
-rw-r--r--bridges/source/remote/urp/urp_cache.hxx3
-rw-r--r--bridges/source/remote/urp/urp_dispatch.cxx2
-rw-r--r--bridges/source/remote/urp/urp_dispatch.hxx2
-rw-r--r--bridges/source/remote/urp/urp_environment.cxx7
-rw-r--r--bridges/source/remote/urp/urp_job.cxx2
-rw-r--r--bridges/source/remote/urp/urp_job.hxx3
-rw-r--r--bridges/source/remote/urp/urp_log.cxx3
-rw-r--r--bridges/source/remote/urp/urp_log.hxx3
-rw-r--r--bridges/source/remote/urp/urp_marshal.cxx3
-rw-r--r--bridges/source/remote/urp/urp_marshal.hxx2
-rw-r--r--bridges/source/remote/urp/urp_marshal_decl.hxx3
-rw-r--r--bridges/source/remote/urp/urp_property.hxx3
-rw-r--r--bridges/source/remote/urp/urp_propertyobject.cxx7
-rw-r--r--bridges/source/remote/urp/urp_propertyobject.hxx3
-rw-r--r--bridges/source/remote/urp/urp_reader.cxx3
-rw-r--r--bridges/source/remote/urp/urp_reader.hxx3
-rw-r--r--bridges/source/remote/urp/urp_replycontainer.hxx3
-rw-r--r--bridges/source/remote/urp/urp_threadid.cxx3
-rw-r--r--bridges/source/remote/urp/urp_threadid.hxx3
-rw-r--r--bridges/source/remote/urp/urp_unmarshal.cxx2
-rw-r--r--bridges/source/remote/urp/urp_unmarshal.hxx3
-rw-r--r--bridges/source/remote/urp/urp_writer.cxx2
-rw-r--r--bridges/source/remote/urp/urp_writer.hxx2
-rw-r--r--bridges/test/inter_libs_exc/inter.cxx3
-rw-r--r--bridges/test/inter_libs_exc/share.h3
-rw-r--r--bridges/test/inter_libs_exc/starter.cxx3
-rw-r--r--bridges/test/inter_libs_exc/thrower.cxx3
-rw-r--r--bridges/test/java_uno/acquire/testacquire.cxx3
-rw-r--r--bridges/test/java_uno/any/transport.cxx3
-rw-r--r--bridges/test/java_uno/equals/testequals.cxx3
-rw-r--r--bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx3
-rw-r--r--bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx3
-rw-r--r--bridges/test/performance/makefile.mk1
-rw-r--r--bridges/test/performance/testperformance.cxx3
-rw-r--r--bridges/test/testclient.cxx2
-rw-r--r--bridges/test/testcomp.cxx2
-rw-r--r--bridges/test/testcomp.h7
-rw-r--r--bridges/test/testoffice.cxx3
-rw-r--r--bridges/test/testsameprocess.cxx3
-rw-r--r--bridges/test/testserver.cxx3
242 files changed, 4979 insertions, 1338 deletions
diff --git a/bridges/inc/bridges/cpp_uno/bridge.hxx b/bridges/inc/bridges/cpp_uno/bridge.hxx
index cb332673b150..b5dfd5d28168 100644
--- a/bridges/inc/bridges/cpp_uno/bridge.hxx
+++ b/bridges/inc/bridges/cpp_uno/bridge.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.
@@ -499,3 +500,5 @@ inline void SAL_CALL cppu_cppenv_initEnvironment( uno_Environment * pCppEnv ) SA
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/cpp_uno/shared/arraypointer.hxx b/bridges/inc/bridges/cpp_uno/shared/arraypointer.hxx
index 07d6c179a9ab..542be6e0f3d6 100644
--- a/bridges/inc/bridges/cpp_uno/shared/arraypointer.hxx
+++ b/bridges/inc/bridges/cpp_uno/shared/arraypointer.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.
@@ -53,3 +54,5 @@ private:
} } }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/cpp_uno/shared/bridge.hxx b/bridges/inc/bridges/cpp_uno/shared/bridge.hxx
index 38d722c6dc3c..4ee69e37b416 100644
--- a/bridges/inc/bridges/cpp_uno/shared/bridge.hxx
+++ b/bridges/inc/bridges/cpp_uno/shared/bridge.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.
@@ -126,3 +127,5 @@ private:
} } }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/cpp_uno/shared/cppinterfaceproxy.hxx b/bridges/inc/bridges/cpp_uno/shared/cppinterfaceproxy.hxx
index e3cafcc41101..31e19cc94d00 100644
--- a/bridges/inc/bridges/cpp_uno/shared/cppinterfaceproxy.hxx
+++ b/bridges/inc/bridges/cpp_uno/shared/cppinterfaceproxy.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.
@@ -104,3 +105,5 @@ private:
} } }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/cpp_uno/shared/types.hxx b/bridges/inc/bridges/cpp_uno/shared/types.hxx
index fa87637578ae..0cc87864af0e 100644
--- a/bridges/inc/bridges/cpp_uno/shared/types.hxx
+++ b/bridges/inc/bridges/cpp_uno/shared/types.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.
@@ -75,3 +76,5 @@ bool relatesToInterfaceType(typelib_TypeDescription const * type);
} } }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/cpp_uno/shared/unointerfaceproxy.hxx b/bridges/inc/bridges/cpp_uno/shared/unointerfaceproxy.hxx
index 4836348cdfe9..87c96ec36689 100644
--- a/bridges/inc/bridges/cpp_uno/shared/unointerfaceproxy.hxx
+++ b/bridges/inc/bridges/cpp_uno/shared/unointerfaceproxy.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.
@@ -114,3 +115,5 @@ private:
} } }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx b/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx
index 434e0c6a0a28..be5894a0b4b5 100644
--- a/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx
+++ b/bridges/inc/bridges/cpp_uno/shared/vtablefactory.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.
@@ -212,3 +213,5 @@ private:
} } }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/cpp_uno/shared/vtables.hxx b/bridges/inc/bridges/cpp_uno/shared/vtables.hxx
index 37cc9bf8eca2..2ea5c7c83121 100644
--- a/bridges/inc/bridges/cpp_uno/shared/vtables.hxx
+++ b/bridges/inc/bridges/cpp_uno/shared/vtables.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.
@@ -106,3 +107,5 @@ VtableSlot getVtableSlot(
} } }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/cpp_uno/type_misc.hxx b/bridges/inc/bridges/cpp_uno/type_misc.hxx
index 775373b2b47e..5fbd0da45cac 100644
--- a/bridges/inc/bridges/cpp_uno/type_misc.hxx
+++ b/bridges/inc/bridges/cpp_uno/type_misc.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,3 +128,5 @@ inline bool cppu_isSimpleType( typelib_TypeDescription * pTypeDescr ) SAL_THROW(
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/remote/bridgeimpl.hxx b/bridges/inc/bridges/remote/bridgeimpl.hxx
index 0257dd5f879a..bb166d50a153 100644
--- a/bridges/inc/bridges/remote/bridgeimpl.hxx
+++ b/bridges/inc/bridges/remote/bridgeimpl.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.
@@ -92,3 +93,5 @@ namespace bridges_remote {
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/remote/connection.h b/bridges/inc/bridges/remote/connection.h
index b374b73bc8cf..9ed8fad10d02 100644
--- a/bridges/inc/bridges/remote/connection.h
+++ b/bridges/inc/bridges/remote/connection.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.
@@ -65,3 +66,5 @@ struct remote_Connection
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/remote/context.h b/bridges/inc/bridges/remote/context.h
index e03310ce5e27..8ff83adfb128 100644
--- a/bridges/inc/bridges/remote/context.h
+++ b/bridges/inc/bridges/remote/context.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.
@@ -258,3 +259,4 @@ struct remote_Context
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/remote/counter.hxx b/bridges/inc/bridges/remote/counter.hxx
index deead1d2cb1e..8bcb547008af 100644
--- a/bridges/inc/bridges/remote/counter.hxx
+++ b/bridges/inc/bridges/remote/counter.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,5 @@ struct MyCounter
#endif
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/remote/helper.hxx b/bridges/inc/bridges/remote/helper.hxx
index 081e47a5c855..56de06b7d8c8 100644
--- a/bridges/inc/bridges/remote/helper.hxx
+++ b/bridges/inc/bridges/remote/helper.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.
@@ -66,3 +67,5 @@ namespace bridges_remote
uno_Any **ppException
);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/remote/mapping.hxx b/bridges/inc/bridges/remote/mapping.hxx
index 4247c6cc9b65..28903eff8ac2 100644
--- a/bridges/inc/bridges/remote/mapping.hxx
+++ b/bridges/inc/bridges/remote/mapping.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.
@@ -67,3 +68,5 @@ namespace bridges_remote
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/remote/proxy.hxx b/bridges/inc/bridges/remote/proxy.hxx
index fd1e919b902a..25afecca6c13 100644
--- a/bridges/inc/bridges/remote/proxy.hxx
+++ b/bridges/inc/bridges/remote/proxy.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 @@ private:
};
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/remote/remote.h b/bridges/inc/bridges/remote/remote.h
index 0cc4071eab8a..1e8ebabf2b93 100644
--- a/bridges/inc/bridges/remote/remote.h
+++ b/bridges/inc/bridges/remote/remote.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.
@@ -91,3 +92,5 @@ struct remote_Mapping
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/remote/remote.hxx b/bridges/inc/bridges/remote/remote.hxx
index d5e5397e35cd..a4fcac21f1c8 100644
--- a/bridges/inc/bridges/remote/remote.hxx
+++ b/bridges/inc/bridges/remote/remote.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,5 @@ public:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/bridges/remote/stub.hxx b/bridges/inc/bridges/remote/stub.hxx
index 5eb21ff37a10..b89389ec50fe 100644
--- a/bridges/inc/bridges/remote/stub.hxx
+++ b/bridges/inc/bridges/remote/stub.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.
@@ -62,3 +63,5 @@ public:
};
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/pch/precompiled_bridges.cxx b/bridges/inc/pch/precompiled_bridges.cxx
index 9adda1e1a77e..05fd24f32377 100644
--- a/bridges/inc/pch/precompiled_bridges.cxx
+++ b/bridges/inc/pch/precompiled_bridges.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.
@@ -27,3 +28,4 @@
#include "precompiled_bridges.hxx"
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/pch/precompiled_bridges.hxx b/bridges/inc/pch/precompiled_bridges.hxx
index 33d5e5f8971f..3116a130f7ed 100644
--- a/bridges/inc/pch/precompiled_bridges.hxx
+++ b/bridges/inc/pch/precompiled_bridges.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.
@@ -150,3 +151,5 @@
#include "uno/threadpool.h"
//---MARKER---
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/prj/build.lst b/bridges/prj/build.lst
index 0e7979742562..51c342af809d 100644
--- a/bridges/prj/build.lst
+++ b/bridges/prj/build.lst
@@ -13,6 +13,7 @@ br bridges\source\cpp_uno\gcc3_freebsd_intel nmake - u br_gcc3fi br_cppuno_share
br bridges\source\cpp_uno\gcc3_linux_x86-64 nmake - u br_gcc3lx br_cppuno_shared br_unotypes br_inc NULL
br bridges\source\cpp_uno\gcc3_freebsd_x86-64 nmake - u br_gcc3fx br_cppuno_shared br_unotypes br_inc NULL
br bridges\source\cpp_uno\gcc3_linux_powerpc nmake - u br_gcc3lp br_cppuno_shared br_unotypes br_inc NULL
+br bridges\source\cpp_uno\gcc3_aix_powerpc nmake - u br_gcc3ap br_cppuno_shared br_unotypes br_inc NULL
br bridges\source\cpp_uno\gcc3_linux_powerpc64 nmake - u br_gcc3lp_64 br_cppuno_shared br_unotypes br_inc NULL
br bridges\source\cpp_uno\gcc3_linux_mips nmake - u br_gcc3lmips br_cppuno_shared br_unotypes br_inc NULL
br bridges\source\cpp_uno\gcc3_linux_m68k nmake - u br_gcc3lm68k br_cppuno_shared br_unotypes br_inc NULL
@@ -31,6 +32,7 @@ br bridges\source\cpp_uno\cc50_solaris_intel nmake - u br_cc50soli br_unotypes
br bridges\source\cpp_uno\gcc3_solaris_sparc nmake - u br_gcc3sogs br_cppuno_shared br_unotypes br_inc NULL
br bridges\source\cpp_uno\gcc3_solaris_intel nmake - u br_gcc3sogi br_cppuno_shared br_unotypes br_inc NULL
br bridges\source\cpp_uno\gcc3_netbsd_intel nmake - u br_gccni br_unotypes br_inc NULL
+br bridges\source\cpp_uno\gcc3_netbsd_x86-64 nmake - u br_gcc3nx br_cppuno_shared br_unotypes br_inc NULL
br bridges\source\cpp_uno\shared nmake - all br_cppuno_shared br_unotypes br_inc NULL
br bridges\source\jni_uno nmake - all br_jni_uno br_unotypes br_inc NULL
br bridges\source\jni_uno\java\com\sun\star\bridges\jni_uno nmake - all br_jni_uno_java br_unotypes br_inc NULL
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..0737475c995a 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.
@@ -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..e0776c19476c 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.
@@ -447,3 +448,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 4afbf27a4b81..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.
@@ -259,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..7242ccd31ee6 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.
@@ -416,3 +417,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..bfe55d726b3c 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.
@@ -528,3 +529,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..aa2bbde76708 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.
@@ -443,3 +444,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 feb1336dbc17..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.
@@ -260,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/uno2cpp.cxx b/bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx
index 896695540f90..7b85bc1fee91 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.
@@ -394,3 +395,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..e77c7329d0fc
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx
@@ -0,0 +1,663 @@
+/* -*- 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
+ *
+ * $RCSfile: cpp2uno.cxx,v $
+ * $Revision: 1.11 $
+ *
+ * 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 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;
+ }
+}
+
+
+//==================================================================================================
+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::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
+ 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::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 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 CMC_DEBUG
+ 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_aix_powerpc/except.cxx b/bridges/source/cpp_uno/gcc3_aix_powerpc/except.cxx
new file mode 100644
index 000000000000..b40bfde14391
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_aix_powerpc/except.cxx
@@ -0,0 +1,291 @@
+/* -*- 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
+ *
+ * $RCSfile: except.cxx,v $
+ * $Revision: 1.7 $
+ *
+ * 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 <rtl/strbuf.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <osl/diagnose.h>
+#include <osl/mutex.hxx>
+
+#include <com/sun/star/uno/genfunc.hxx>
+#include <typelib/typedescription.hxx>
+#include <uno/any2.h>
+
+#include "share.hxx"
+#include <string.h>
+
+
+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( () )
+{
+#ifdef DEBUG
+ 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)'.' );
+ }
+
+#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() );
+ 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;
+
+ 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 (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 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;
+#ifdef DEBUG
+ 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 = iiFind->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 )
+{
+ void * pCppExc;
+ type_info * rtti;
+
+ {
+ // construct cpp exception object
+ 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();
+#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)
+ terminate();
+ }
+
+ __cxa_throw( pCppExc, rtti, deleteException );
+}
+
+//==================================================================================================
+void fillUnoException( __cxa_exception * header, uno_Any * pExc, uno_Mapping * pCpp2Uno )
+{
+ OSL_ENSURE( header, "### no exception header!!!" );
+ if (! header)
+ terminate();
+
+ typelib_TypeDescription * pExcTypeDescr = 0;
+ OUString unoName( toUNOname( header->exceptionType->name() ) );
+ ::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_aix_powerpc/makefile.mk b/bridges/source/cpp_uno/gcc3_aix_powerpc/makefile.mk
new file mode 100644
index 000000000000..a543640e0882
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_aix_powerpc/makefile.mk
@@ -0,0 +1,81 @@
+#*************************************************************************
+#
+# 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
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.8 $
+#
+# 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)" == "GCCAIXPgcc3"
+
+.IF "$(cppu_no_leak)" == ""
+CFLAGS += -DLEAK_STATIC_DATA
+.ENDIF
+
+NOOPTFILES= \
+ $(SLO)$/uno2cpp.obj \
+ $(SLO)$/cpp2uno.obj
+
+CFLAGSNOOPT=-O0
+
+SLOFILES= \
+ $(SLO)$/except.obj \
+ $(SLO)$/cpp2uno.obj \
+ $(SLO)$/uno2cpp.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) \
+ -ldl
+
+.ENDIF
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
diff --git a/bridges/source/cpp_uno/gcc3_aix_powerpc/share.hxx b/bridges/source/cpp_uno/gcc3_aix_powerpc/share.hxx
new file mode 100644
index 000000000000..0d7e62714f30
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_aix_powerpc/share.hxx
@@ -0,0 +1,102 @@
+/* -*- 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
+ *
+ * $RCSfile: share.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * 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 );
+}
+
+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..69372893fdf3
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx
@@ -0,0 +1,502 @@
+/* -*- 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
+ *
+ * $RCSfile: uno2cpp.cxx,v $
+ * $Revision: 1.9 $
+ *
+ * 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 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 );
+ }
+ }
+}
+
+} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx
index 5740b27d9871..afb3d1434db4 100644
--- a/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_freebsd_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.
@@ -488,3 +489,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_freebsd_intel/except.cxx b/bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx
index c2287b9b6fa9..05db0ced9cf3 100644
--- a/bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_freebsd_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.
@@ -336,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_freebsd_intel/share.hxx b/bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx
index 930094738b20..da2367ad172b 100644
--- a/bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_freebsd_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_freebsd_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx
index 094a1d1d0177..f468ffc33715 100644
--- a/bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_freebsd_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.
@@ -442,3 +443,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/abi.cxx b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/abi.cxx
index 937af0152d90..77e2edebcc8b 100644
--- a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/abi.cxx
+++ b/bridges/source/cpp_uno/gcc3_freebsd_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.
@@ -353,451 +354,4 @@ void x86_64::fill_struct( typelib_TypeDescriptionReference *pTypeRef, void * con
}
}
-#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
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/abi.hxx b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/abi.hxx
index 1e2bc64fff93..6d40eafb1c0c 100644
--- a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/abi.hxx
+++ b/bridges/source/cpp_uno/gcc3_freebsd_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, void * const *pGPR
} // 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_freebsd_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/cpp2uno.cxx
index d5c47f82a3f4..dcb45eaae62e 100644
--- a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_freebsd_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.
@@ -539,3 +540,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_freebsd_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx
index a6ba69855a1c..d6bfa3abccce 100644
--- a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_freebsd_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.
@@ -336,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_freebsd_x86-64/share.hxx b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx
index 930094738b20..da2367ad172b 100644
--- a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_freebsd_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_freebsd_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx
index 6da45f9fb8ce..d4885fd06274 100644
--- a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_freebsd_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.
@@ -556,3 +557,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx
index abc5ce67e4b4..3ee825511d66 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.
@@ -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..c0de95532515 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.
@@ -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..dddda8ab8207 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.
@@ -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..da4f0e34ce3c 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.
@@ -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..1fc67a2098d6 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.
@@ -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..00a06643fda5 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.
@@ -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..4974bf3f0e82 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.
@@ -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..ebe07d4119b2 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.
@@ -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..36fe7968e19a 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.
@@ -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..6d7a5333f1e1 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.
@@ -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..5a25c25c1ed8 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.
@@ -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..c0de95532515 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.
@@ -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..2be69d85ba90 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.
@@ -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..ca40321149b2 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.
@@ -487,3 +488,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..1c573aa80f5c 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.
@@ -328,3 +329,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..c03a43ce8aba 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/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_intel/share.hxx b/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx
index 930094738b20..da2367ad172b 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.
@@ -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_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
index 4d1d3f2f8ca4..20ee018e46be 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.
@@ -449,3 +450,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..53542e23f97d 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.
@@ -533,4 +534,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..36fe7968e19a 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.
@@ -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..97a9ab0187d9 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.
@@ -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..b6fd1d461cfd 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.
@@ -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..78d72c0c733b 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.
@@ -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..82d226f88ea6 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.
@@ -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..24354bfa45f8 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,
@@ -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..c0de95532515 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.
@@ -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..0ebc44895a78 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.
@@ -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..f8e1fb9cd98a 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.
@@ -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..c0de95532515 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.
@@ -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..04ceddab4c5f 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.
@@ -598,3 +599,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..f259387a98bf 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.
@@ -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..c0de95532515 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.
@@ -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..a87cc8e182c8 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.
@@ -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..b491f661bff9 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.
@@ -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..c0de95532515 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.
@@ -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..d3fec618c301 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.
@@ -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..1546432e5980 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.
@@ -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..6e61196df98e 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.
@@ -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..0cf6d21c80e7 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.
@@ -598,3 +599,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..e62f71d2c32a 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.
@@ -346,451 +347,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..512b7d1f3f34 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.
@@ -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..57c9c3caf287 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.
@@ -328,3 +329,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..291397147c48 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/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
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 6a9ab16845dc..767961b9c691 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.
@@ -569,3 +570,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..11c1d0f10db2 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.
@@ -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..c8cc3cd17257 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.
@@ -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..aaf696608e41 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>
@@ -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..f3515a86ea08 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.
@@ -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..abc3ad10fc37 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.
@@ -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..39388fc602f0 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.
@@ -632,3 +633,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_netbsd_intel/call.s b/bridges/source/cpp_uno/gcc3_netbsd_intel/call.s
new file mode 100644
index 000000000000..f345e3a764ac
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_netbsd_intel/call.s
@@ -0,0 +1,268 @@
+ .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_netbsd_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_netbsd_intel/cpp2uno.cxx
index 79cda920e7db..afb3d1434db4 100644
--- a/bridges/source/cpp_uno/gcc3_netbsd_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_netbsd_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.
@@ -28,39 +29,31 @@
// 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 <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/bridge.hxx>
-#include <bridges/cpp_uno/type_misc.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 ::osl;
-using namespace ::rtl;
using namespace ::com::sun::star::uno;
-namespace CPPU_CURRENT_NAMESPACE
+namespace
{
//==================================================================================================
-rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
-
-//==================================================================================================
-static typelib_TypeClass cpp2uno_call(
- cppu_cppInterfaceProxy * pThis,
+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,
- sal_Int64 * pRegisterReturn /* space for register return */ )
+ void * pReturnValue )
{
// pCallStack: ret, [return ptr], this, params
char * pCppStack = (char *)(pCallStack +1);
@@ -75,16 +68,17 @@ static typelib_TypeClass cpp2uno_call(
if (pReturnTypeDescr)
{
- if (cppu_isSimpleType( pReturnTypeDescr ))
+ if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
{
- pUnoReturn = pRegisterReturn; // direct way for simple types
+ pUnoReturn = pReturnValue; // direct way for simple types
}
else // complex return via ptr (pCppReturn)
{
pCppReturn = *(void **)pCppStack;
pCppStack += sizeof(void *);
- pUnoReturn = (cppu_relatesToInterface( pReturnTypeDescr )
+ pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType(
+ pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize )
: pCppReturn); // direct way
}
@@ -110,7 +104,9 @@ static typelib_TypeClass cpp2uno_call(
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
- if (!rParam.bOut && cppu_isSimpleType( pParamTypeDescr )) // value
+ if (!rParam.bOut
+ && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
+ // value
{
pCppArgs[nPos] = pCppStack;
pUnoArgs[nPos] = pCppStack;
@@ -120,6 +116,9 @@ static typelib_TypeClass cpp2uno_call(
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 );
@@ -137,11 +136,12 @@ static typelib_TypeClass cpp2uno_call(
ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
}
// is in/inout
- else if (cppu_relatesToInterface( pParamTypeDescr ))
+ else if (bridges::cpp_uno::shared::relatesToInterfaceType(
+ pParamTypeDescr ))
{
uno_copyAndConvertData( pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize ),
*(void **)pCppStack, pParamTypeDescr,
- &pThis->pBridge->aCpp2Uno );
+ pThis->getBridge()->getCpp2Uno() );
pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
// will be released at reconversion
ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
@@ -161,7 +161,8 @@ static typelib_TypeClass cpp2uno_call(
uno_Any * pUnoExc = &aUnoExc;
// invoke uno dispatch call
- (*pThis->pUnoI->pDispatcher)( pThis->pUnoI, pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
+ (*pThis->getUnoI()->pDispatcher)(
+ pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
// in case an exception occured...
if (pUnoExc)
@@ -178,9 +179,9 @@ static typelib_TypeClass cpp2uno_call(
if (pReturnTypeDescr)
TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
- raiseException( &aUnoExc, &pThis->pBridge->aUno2Cpp ); // has to destruct the any
- // is here for dummy
- return typelib_TypeClass_VOID;
+ CPPU_CURRENT_NAMESPACE::raiseException(
+ &aUnoExc, pThis->getBridge()->getUno2Cpp() );
+ // has to destruct the any
}
else // else no exception occured...
{
@@ -195,7 +196,7 @@ static typelib_TypeClass cpp2uno_call(
// convert and assign
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
uno_copyAndConvertData( pCppArgs[nIndex], pUnoArgs[nIndex], pParamTypeDescr,
- &pThis->pBridge->aUno2Cpp );
+ pThis->getBridge()->getUno2Cpp() );
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
@@ -208,76 +209,72 @@ static typelib_TypeClass cpp2uno_call(
if (pUnoReturn != pCppReturn) // needs reconversion
{
uno_copyAndConvertData( pCppReturn, pUnoReturn, pReturnTypeDescr,
- &pThis->pBridge->aUno2Cpp );
+ pThis->getBridge()->getUno2Cpp() );
// destroy temp uno return
uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
}
// complex return ptr is set to eax
- *(void **)pRegisterReturn = pCppReturn;
+ *static_cast< void ** >(pReturnValue) = 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 */ )
+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
- // _this_ ptr is patched cppu_XInterfaceProxy object
- cppu_cppInterfaceProxy * pCppI = NULL;
- if( nVtableCall & 0x80000000 )
+ void * pThis;
+ if( nFunctionIndex & 0x80000000 )
{
- nVtableCall &= 0x7fffffff;
- pCppI = (cppu_cppInterfaceProxy *)(XInterface *)*(pCallStack +2);
+ nFunctionIndex &= 0x7fffffff;
+ pThis = pCallStack[2];
}
else
{
- pCppI = (cppu_cppInterfaceProxy *)(XInterface *)*(pCallStack +1);
+ 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->pTypeDescr;
+ typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
- OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
- if (nVtableCall >= pTypeDescr->nMapFunctionIndexToMemberIndex)
+ OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
+ if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
throw RuntimeException(
- OUString::createFromAscii("illegal vtable index!"),
- (XInterface *)pCppI );
+ rtl::OUString::createFromAscii("illegal vtable index!"),
+ (XInterface *)pThis );
}
// determine called method
- OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
- sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nVtableCall];
+ 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] == nVtableCall)
+ if (pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos] == nFunctionIndex)
{
// is GET method
- eRet = cpp2uno_call(
+ cpp2uno_call(
pCppI, aMemberDescr.get(),
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef,
0, 0, // no params
- pCallStack, pRegisterReturn );
+ pCallStack, pReturnValue );
}
else
{
@@ -288,26 +285,24 @@ static typelib_TypeClass cpp_mediate(
aParam.bIn = sal_True;
aParam.bOut = sal_False;
- eRet = cpp2uno_call(
+ cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
1, &aParam,
- pCallStack, pRegisterReturn );
+ pCallStack, pReturnValue );
}
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
{
// is METHOD
- switch (nVtableCall)
+ 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
{
@@ -316,9 +311,10 @@ static typelib_TypeClass cpp_mediate(
if (pTD)
{
XInterface * pInterface = 0;
- (*pCppI->pBridge->pCppEnv->getRegisteredInterface)(
- pCppI->pBridge->pCppEnv,
- (void **)&pInterface, pCppI->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
+ (*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
+ pCppI->getBridge()->getCppEnv(),
+ (void **)&pInterface, pCppI->getOid().pData,
+ (typelib_InterfaceTypeDescription *)pTD );
if (pInterface)
{
@@ -327,237 +323,171 @@ static typelib_TypeClass cpp_mediate(
&pInterface, pTD, cpp_acquire );
pInterface->release();
TYPELIB_DANGER_RELEASE( pTD );
- *(void **)pRegisterReturn = pCallStack[1];
- eRet = typelib_TypeClass_ANY;
+ *static_cast< void ** >(pReturnValue) = pCallStack[1];
break;
}
TYPELIB_DANGER_RELEASE( pTD );
}
} // else perform queryInterface()
default:
- eRet = cpp2uno_call(
+ cpp2uno_call(
pCppI, aMemberDescr.get(),
((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pReturnTypeRef,
((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->nParams,
((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pParams,
- pCallStack, pRegisterReturn );
+ pCallStack, pReturnValue );
}
break;
}
default:
{
throw RuntimeException(
- OUString::createFromAscii("no member description found!"),
- (XInterface *)pCppI );
- // is here for dummy
- eRet = typelib_TypeClass_VOID;
+ rtl::OUString::createFromAscii("no member description found!"),
+ (XInterface *)pThis );
}
}
-
- 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 )
+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)
{
- 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;
+ 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;
}
+}
-//==================================================================================================
-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." );
+struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
- for ( t_classdata_map::const_iterator iPos( m_map.begin() ); iPos != m_map.end(); ++iPos )
- {
- ::rtl_freeMemory( iPos->second );
- }
+bridges::cpp_uno::shared::VtableFactory::Slot *
+bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
+{
+ return static_cast< Slot * >(block) + 2;
}
-//--------------------------------------------------------------------------------------------------
-static inline void codeSnippet( char * code, sal_uInt32 vtable_pos, bool simple_ret_type ) SAL_THROW( () )
+
+sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
+ sal_Int32 slotCount)
{
- 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);
+ return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
}
-//__________________________________________________________________________________________________
-void const * MediateClassData::get_vtable( typelib_InterfaceTypeDescription * pTD ) SAL_THROW( () )
+
+bridges::cpp_uno::shared::VtableFactory::Slot *
+bridges::cpp_uno::shared::VtableFactory::initializeBlock(
+ void * block, sal_Int32 slotCount)
{
- void * buffer;
+ Slot * slots = mapBlockToVtable(block);
+ slots[-2].fn = 0;
+ slots[-1].fn = 0;
+ return slots + slotCount;
+}
- // 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
+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)
{
- bool simple_ret = cppu_isSimpleType(
- ((typelib_InterfaceMethodTypeDescription *)pTD)->pReturnTypeRef->eTypeClass );
- *slots++ = code;
- codeSnippet( code, vtable_pos++, simple_ret );
- code += 20;
+ (s++)->fn = code;
+ code = codeSnippet(
+ code, functionOffset++, vtableOffset,
+ typelib_TypeClass_VOID);
}
- TYPELIB_DANGER_RELEASE( pTD );
- }
- OSL_ASSERT( vtable_pos == nSlots );
- }
- else
- {
- buffer = iFind->second;
- }
- }
+ break;
- return ((void **)buffer +2);
-}
+ case typelib_TypeClass_INTERFACE_METHOD:
+ (s++)->fn = code;
+ code = codeSnippet(
+ code, functionOffset++, vtableOffset,
+ reinterpret_cast< typelib_InterfaceMethodTypeDescription * >(
+ member)->pReturnTypeRef->eTypeClass);
+ break;
-//==================================================================================================
-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
+ default:
+ OSL_ASSERT(false);
+ break;
}
+ TYPELIB_DANGER_RELEASE(member);
}
- *(void const **)pCppI = s_pMediateClassData->get_vtable( pTypeDescr );
+ return code;
}
-}
+void bridges::cpp_uno::shared::VtableFactory::flushCode(
+ unsigned char const *, unsigned char const *)
+{}
-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 );
-}
-}
+/* 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_netbsd_intel/except.cxx
index be5686af2807..623046140e84 100644
--- a/bridges/source/cpp_uno/gcc3_netbsd_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_netbsd_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.
@@ -32,21 +33,20 @@
#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 <bridges/cpp_uno/bridge.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"
-#ifndef RTLD_DEFAULT
-#define RTLD_DEFAULT ((void *) -2)
-#endif
using namespace ::std;
using namespace ::osl;
@@ -119,7 +119,11 @@ public:
};
//__________________________________________________________________________________________________
RTTI::RTTI() SAL_THROW( () )
- : m_hApp( dlopen( 0 , RTLD_LAZY ) )
+#if 1
+ : m_hApp( dlopen( 0, RTLD_NOW | RTLD_GLOBAL ) )
+#else
+ : m_hApp( dlopen( 0, RTLD_LAZY ) )
+#endif
{
}
//__________________________________________________________________________________________________
@@ -136,8 +140,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
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())
+ t_rtti_map::const_iterator iRttiFind( m_rttis.find( unoName ) );
+ if (iRttiFind == m_rttis.end())
{
// RTTI symbol
OStringBuffer buf( 64 );
@@ -154,7 +158,11 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
buf.append( 'E' );
OString symName( buf.makeStringAndClear() );
+#if 1 /* #i22253# */
rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() );
+#else
+ rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
+#endif
if (rtti)
{
@@ -201,7 +209,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
}
else
{
- rtti = iFind->second;
+ rtti = iRttiFind->second;
}
return rtti;
@@ -225,7 +233,7 @@ static void deleteException( void * pExc )
//==================================================================================================
void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
-#if defined DEBUG
+#if OSL_DEBUG_LEVEL > 1
OString cstr(
OUStringToOString(
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
@@ -293,7 +301,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
Reference< XInterface >() );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
-#if defined _DEBUG
+#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
OSL_ENSURE( 0, cstr.getStr() );
#endif
@@ -302,7 +310,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
typelib_TypeDescription * pExcTypeDescr = 0;
OUString unoName( toUNOname( header->exceptionType->name() ) );
-#if defined DEBUG
+#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
@@ -314,7 +322,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
Reference< XInterface >() );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
-#if defined _DEBUG
+#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
OSL_ENSURE( 0, cstr.getStr() );
#endif
@@ -329,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_netbsd_intel/makefile.mk b/bridges/source/cpp_uno/gcc3_netbsd_intel/makefile.mk
index 794501d0b5f3..3f6274fd36c0 100644
--- a/bridges/source/cpp_uno/gcc3_netbsd_intel/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_netbsd_intel/makefile.mk
@@ -44,12 +44,17 @@ 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
+
CFLAGSNOOPT=-O0
SLOFILES= \
$(SLO)$/except.obj \
$(SLO)$/cpp2uno.obj \
- $(SLO)$/uno2cpp.obj
+ $(SLO)$/uno2cpp.obj \
+ $(SLO)$/call.obj
SHL1TARGET= $(TARGET)
@@ -58,10 +63,8 @@ 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) \
@@ -73,3 +76,6 @@ SHL1STDLIBS= \
.INCLUDE : target.mk
+$(SLO)$/%.obj: %.s
+ $(CC) -c -o $(SLO)$/$(@:b).o $<
+ touch $@
diff --git a/bridges/source/cpp_uno/gcc3_netbsd_intel/share.hxx b/bridges/source/cpp_uno/gcc3_netbsd_intel/share.hxx
index ba6ac7e974cc..da2367ad172b 100644
--- a/bridges/source/cpp_uno/gcc3_netbsd_intel/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_netbsd_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.
@@ -25,6 +26,8 @@
*
************************************************************************/
+#include "uno/mapping.h"
+
#include <typeinfo>
#include <exception>
#include <cstddef>
@@ -32,6 +35,8 @@
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
@@ -84,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_netbsd_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_netbsd_intel/uno2cpp.cxx
index 873abecd7420..f468ffc33715 100644
--- a/bridges/source/cpp_uno/gcc3_netbsd_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_netbsd_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,24 +29,25 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_bridges.hxx"
-#include <sal/alloca.h>
-#include <rtl/alloc.h>
+#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/bridge.hxx>
-#include <bridges/cpp_uno/type_misc.hxx>
-#include "share.hxx"
+#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 CPPU_CURRENT_NAMESPACE
+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
@@ -54,7 +56,7 @@ void dummy_can_throw_anything( char const * );
// 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,
+ void * pAdjustedThisPtr,
sal_Int32 nVtableIndex,
void * pRegisterReturn,
typelib_TypeClass eReturnType,
@@ -62,7 +64,7 @@ void callVirtualMethod(
sal_Int32 nStackLongs ) __attribute__((noinline));
void callVirtualMethod(
- void * pThis,
+ void * pAdjustedThisPtr,
sal_Int32 nVtableIndex,
void * pRegisterReturn,
typelib_TypeClass eReturnType,
@@ -72,12 +74,12 @@ void callVirtualMethod(
// parameter list is mixed list of * and values
// reference parameters are pointers
- OSL_ENSURE( pStackLongs && pThis, "### null ptr!" );
+ 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 (! pThis) dummy_can_throw_anything("xxx"); // address something
+ if (! pAdjustedThisPtr) CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something
volatile long edx = 0, eax = 0; // for register returns
void * stackptr;
@@ -108,8 +110,8 @@ void callVirtualMethod(
// cleanup stack
"mov %6, %%esp\n\t"
:
- : "m"(nStackLongs), "m"(pStackLongs), "m"(pThis), "m"(nVtableIndex),
- "m"(eax), "m"(edx), "m"(stackptr)
+ : "m"(nStackLongs), "m"(pStackLongs), "m"(pAdjustedThisPtr),
+ "m"(nVtableIndex), "m"(eax), "m"(edx), "m"(stackptr)
: "eax", "edx" );
switch( eReturnType )
{
@@ -136,13 +138,15 @@ void callVirtualMethod(
case typelib_TypeClass_DOUBLE:
asm ( "fstpl %0\n\t" : : "m"(*(char *)pRegisterReturn) );
break;
+ default:
+ break;
}
}
//==================================================================================================
static void cpp_call(
- cppu_unoInterfaceProxy * pThis,
- sal_Int32 nVtableCall,
+ 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 )
@@ -161,21 +165,25 @@ static void cpp_call(
if (pReturnTypeDescr)
{
- if (cppu_isSimpleType( pReturnTypeDescr ))
+ if (bridges::cpp_uno::shared::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
+ pCppReturn = *(void **)pCppStack
+ = (bridges::cpp_uno::shared::relatesToInterfaceType(
+ pReturnTypeDescr )
+ ? alloca( pReturnTypeDescr->nSize )
+ : pUnoReturn); // direct way
pCppStack += sizeof(void *);
}
}
// push this
- *(void**)pCppStack = pThis->pCppI;
+ void * pAdjustedThisPtr = reinterpret_cast< void ** >(pThis->getCppI())
+ + aVtableSlot.offset;
+ *(void**)pCppStack = pAdjustedThisPtr;
pCppStack += sizeof( void* );
// stack space
@@ -195,10 +203,11 @@ static void cpp_call(
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
- if (!rParam.bOut && cppu_isSimpleType( pParamTypeDescr ))
+ if (!rParam.bOut
+ && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
uno_copyAndConvertData( pCppArgs[nPos] = pCppStack, pUnoArgs[nPos], pParamTypeDescr,
- &pThis->pBridge->aUno2Cpp );
+ pThis->getBridge()->getUno2Cpp() );
switch (pParamTypeDescr->eTypeClass)
{
@@ -206,6 +215,9 @@ static void cpp_call(
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 );
@@ -223,11 +235,13 @@ static void cpp_call(
ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
}
// is in/inout
- else if (cppu_relatesToInterface( pParamTypeDescr ))
+ else if (bridges::cpp_uno::shared::relatesToInterfaceType(
+ pParamTypeDescr ))
{
uno_copyAndConvertData(
*(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- pUnoArgs[nPos], pParamTypeDescr, &pThis->pBridge->aUno2Cpp );
+ pUnoArgs[nPos], pParamTypeDescr,
+ pThis->getBridge()->getUno2Cpp() );
pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
// will be released at reconversion
@@ -247,7 +261,7 @@ static void cpp_call(
{
OSL_ENSURE( !( (pCppStack - pCppStackStart ) & 3), "UNALIGNED STACK !!! (Please DO panic)" );
callVirtualMethod(
- pThis->pCppI, nVtableCall,
+ pAdjustedThisPtr, aVtableSlot.index,
pCppReturn, pReturnTypeDescr->eTypeClass,
(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
// NO exception occured...
@@ -265,13 +279,13 @@ static void cpp_call(
{
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 ); // destroy uno value
uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
- &pThis->pBridge->aCpp2Uno );
+ pThis->getBridge()->getCpp2Uno() );
}
}
else // pure out
{
uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
- &pThis->pBridge->aCpp2Uno );
+ pThis->getBridge()->getCpp2Uno() );
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
@@ -282,14 +296,14 @@ static void cpp_call(
if (pCppReturn && pUnoReturn != pCppReturn)
{
uno_copyAndConvertData( pUnoReturn, pCppReturn, pReturnTypeDescr,
- &pThis->pBridge->aCpp2Uno );
+ pThis->getBridge()->getCpp2Uno() );
uno_destructData( pCppReturn, pReturnTypeDescr, cpp_release );
}
}
catch (...)
{
// fill uno exception
- fillUnoException( __cxa_get_globals()->caughtExceptions, *ppUnoExc, &pThis->pBridge->aCpp2Uno );
+ fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
// temporary params
for ( ; nTempIndizes--; )
@@ -305,32 +319,32 @@ static void cpp_call(
}
}
+}
-//==================================================================================================
-void SAL_CALL cppu_unoInterfaceProxy_dispatch(
+namespace bridges { namespace cpp_uno { namespace shared {
+
+void unoInterfaceProxyDispatch(
uno_Interface * pUnoI, const typelib_TypeDescription * pMemberDescr,
- void * pReturn, void * pArgs[], uno_Any ** ppException ) throw ()
+ void * pReturn, void * pArgs[], uno_Any ** ppException )
{
// is my surrogate
- cppu_unoInterfaceProxy * pThis = (cppu_unoInterfaceProxy *)pUnoI;
- typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
+ bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
+ = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI);
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!" );
-
+ VtableSlot aVtableSlot(
+ getVtableSlot(
+ reinterpret_cast<
+ typelib_InterfaceAttributeTypeDescription const * >(
+ pMemberDescr)));
if (pReturn)
{
// dependent dispatch
cpp_call(
- pThis, nVtableCall,
+ pThis, aVtableSlot,
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef,
0, 0, // no params
pReturn, pArgs, ppException );
@@ -350,8 +364,9 @@ void SAL_CALL cppu_unoInterfaceProxy_dispatch(
&pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
// dependent dispatch
+ aVtableSlot.index += 1; // get, then set method
cpp_call(
- pThis, nVtableCall +1, // get, then set method
+ pThis, aVtableSlot,
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
@@ -363,14 +378,12 @@ void SAL_CALL cppu_unoInterfaceProxy_dispatch(
}
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)
+ VtableSlot aVtableSlot(
+ getVtableSlot(
+ reinterpret_cast<
+ typelib_InterfaceMethodTypeDescription const * >(
+ pMemberDescr)));
+ switch (aVtableSlot.index)
{
// standard calls
case 1: // acquire uno interface
@@ -388,8 +401,8 @@ void SAL_CALL cppu_unoInterfaceProxy_dispatch(
if (pTD)
{
uno_Interface * pInterface = 0;
- (*pThis->pBridge->pUnoEnv->getRegisteredInterface)(
- pThis->pBridge->pUnoEnv,
+ (*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
+ pThis->pBridge->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
if (pInterface)
@@ -408,7 +421,7 @@ void SAL_CALL cppu_unoInterfaceProxy_dispatch(
default:
// dependent dispatch
cpp_call(
- pThis, nVtableCall,
+ pThis, aVtableSlot,
((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pReturnTypeRef,
((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->nParams,
((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pParams,
@@ -429,5 +442,6 @@ void SAL_CALL cppu_unoInterfaceProxy_dispatch(
}
}
-}
+} } }
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_netbsd_x86-64/abi.cxx b/bridges/source/cpp_uno/gcc3_netbsd_x86-64/abi.cxx
new file mode 100644
index 000000000000..1ba2a5f46640
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_netbsd_x86-64/abi.cxx
@@ -0,0 +1,358 @@
+/* -*- 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"
+
+// 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;
+ }
+}
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_netbsd_x86-64/abi.hxx b/bridges/source/cpp_uno/gcc3_netbsd_x86-64/abi.hxx
new file mode 100644
index 000000000000..6d40eafb1c0c
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_netbsd_x86-64/abi.hxx
@@ -0,0 +1,70 @@
+/* -*- 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.
+ *
+ ************************************************************************/
+
+#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_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_netbsd_x86-64/call.s b/bridges/source/cpp_uno/gcc3_netbsd_x86-64/call.s
new file mode 100644
index 000000000000..7964399cfeaa
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_netbsd_x86-64/call.s
@@ -0,0 +1,93 @@
+ .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_netbsd_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_netbsd_x86-64/cpp2uno.cxx
new file mode 100644
index 000000000000..dcb45eaae62e
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_netbsd_x86-64/cpp2uno.cxx
@@ -0,0 +1,544 @@
+/* -*- 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 <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 * )
+{
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_netbsd_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_netbsd_x86-64/except.cxx
new file mode 100644
index 000000000000..0e133d996c91
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_netbsd_x86-64/except.cxx
@@ -0,0 +1,340 @@
+/* -*- 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 <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 1
+ : 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 1 /* #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 );
+ }
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_netbsd_x86-64/makefile.mk b/bridges/source/cpp_uno/gcc3_netbsd_x86-64/makefile.mk
new file mode 100644
index 000000000000..28df8815ecb9
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_netbsd_x86-64/makefile.mk
@@ -0,0 +1,80 @@
+#*************************************************************************
+#
+# 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)" == "GCCNETBSDXgcc3"
+
+.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_netbsd_x86-64/share.hxx b/bridges/source/cpp_uno/gcc3_netbsd_x86-64/share.hxx
new file mode 100644
index 000000000000..da2367ad172b
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_netbsd_x86-64/share.hxx
@@ -0,0 +1,93 @@
+/* -*- 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.
+ *
+ ************************************************************************/
+
+#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 );
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_netbsd_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_netbsd_x86-64/uno2cpp.cxx
new file mode 100644
index 000000000000..d4885fd06274
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_netbsd_x86-64/uno2cpp.cxx
@@ -0,0 +1,561 @@
+/* -*- 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 <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 );
+ }
+ }
+}
+
+} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx
index da67b0d700bc..8b19ff92760c 100644
--- a/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_os2_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.
@@ -523,3 +524,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_os2_intel/except.cxx b/bridges/source/cpp_uno/gcc3_os2_intel/except.cxx
index 6ba8b2e319b5..99c2f62d1476 100644
--- a/bridges/source/cpp_uno/gcc3_os2_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_os2_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.
@@ -347,3 +348,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_os2_intel/share.hxx b/bridges/source/cpp_uno/gcc3_os2_intel/share.hxx
index 930094738b20..da2367ad172b 100644
--- a/bridges/source/cpp_uno/gcc3_os2_intel/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_os2_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_os2_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_os2_intel/uno2cpp.cxx
index fb0ce5ff3cf2..64be1daa086e 100644
--- a/bridges/source/cpp_uno/gcc3_os2_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_os2_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.
@@ -449,3 +450,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx
index b7933411fd60..1c16f6550120 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.
@@ -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..5dfc476edafd 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.
@@ -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..8035256d4db8 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.
@@ -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..e6b0273b97a9 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.
@@ -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..8d0be02e7d93 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.
@@ -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..b1c2767609f4 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.
@@ -593,3 +594,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..cd74da7462df 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.
@@ -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..7a4aca8b1b4d 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.
@@ -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..cbbe1312c464 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.
@@ -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..b2687fddc543 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.
@@ -486,3 +487,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..4bda7cfa9074 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.
@@ -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/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..0a131e94a05b 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.
@@ -463,3 +464,5 @@ void unoInterfaceProxyDispatch(
}
} } }
+
+/* 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..2c89217c9721 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.
@@ -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..b13c85248ed2 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.
@@ -380,3 +381,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..7601648ad93a 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.
@@ -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..3f9f22a98c38 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.
@@ -567,3 +568,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..1382c6f9f4d8 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.
@@ -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..fa32e879f1bd 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>
@@ -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..70e139d66aab 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.
@@ -871,3 +872,5 @@ void SAL_CALL UNO_proxy_dispatch(
}
}
+
+/* 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: */
diff --git a/bridges/source/remote/context/context.cxx b/bridges/source/remote/context/context.cxx
index 770725f9d23f..3e0ffeac894f 100644
--- a/bridges/source/remote/context/context.cxx
+++ b/bridges/source/remote/context/context.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,6 +39,7 @@
#include <osl/mutex.hxx>
#include "rtl/ustring.hxx"
+#include "rtl/instance.hxx"
#include <bridges/remote/context.h>
#include <bridges/remote/remote.h>
@@ -109,17 +111,9 @@ ContextMap;
static MyCounter thisCounter( "DEBUG : Context" );
#endif
-class ContextAdmin;
-
-ContextAdmin *g_pTheContext = 0;
-
-
-
class ContextAdmin
{
public:
- static ContextAdmin *getInstance();
-
// listener administration
void addContextListener( remote_contextListenerFunc listener , void *pObject );
void removeContextListener( remote_contextListenerFunc listener , void *pObject );
@@ -138,7 +132,7 @@ public:
void revokeContext( uno_Context *pRemoteContext );
- uno_Context *get( rtl_uString *pHost );
+ uno_Context *getContext( rtl_uString *pHost );
rtl_uString ** getConnectionList(
sal_Int32 *pnStringCount, MemAlloc memAlloc );
@@ -152,19 +146,6 @@ private:
List m_lstListener;
};
-ContextAdmin *ContextAdmin::getInstance()
-{
- if( ! g_pTheContext ) {
- ::osl::MutexGuard guard( ::osl::Mutex::getGlobalMutex() );
- if( ! g_pTheContext ) {
- //TODO This memory is leaked; see #i63473# for when this should be
- // changed again:
- g_pTheContext = new ContextAdmin;
- }
- }
- return g_pTheContext;
-}
-
void ContextAdmin::addContextListener( remote_contextListenerFunc listener , void *pObject )
{
::osl::MutexGuard guard( m_mutex );
@@ -209,7 +190,7 @@ uno_Context *ContextAdmin::createAndRegisterContext( remote_Connection *pConnect
{
::osl::MutexGuard guard( m_mutex );
- uno_Context *pContext = get( pIdStr );
+ uno_Context *pContext = getContext( pIdStr );
if( pContext )
{
pContext->release( pContext );
@@ -245,7 +226,7 @@ void ContextAdmin::revokeContext( uno_Context *pRemoteContext )
}
-uno_Context *ContextAdmin::get( rtl_uString *pHost )
+uno_Context *ContextAdmin::getContext( rtl_uString *pHost )
{
::osl::MutexGuard guard( m_mutex );
@@ -267,6 +248,10 @@ rtl_uString ** ContextAdmin::getConnectionList(
::osl::MutexGuard guard( m_mutex );
*pnStringCount = m_mapContext.size();
+
+ if (*pnStringCount == 0)
+ return NULL;
+
rtl_uString **ppReturn = ( rtl_uString ** )
memAlloc( sizeof( rtl_uString * ) * m_mapContext.size() );
memset( ppReturn , 0 , sizeof( rtl_uString * ) * m_mapContext.size() );
@@ -283,6 +268,7 @@ rtl_uString ** ContextAdmin::getConnectionList(
}
+struct theContextAdmin : public rtl::Static<ContextAdmin, theContextAdmin> {};
/*****************************
* remote_ContextImpl implementation
@@ -379,7 +365,7 @@ void remote_ContextImpl::thisDispose( remote_Context *pRemoteC )
if( ! pImpl->m_bDisposed )
{
pImpl->m_bDisposed = sal_True;
- ContextAdmin::getInstance()->revokeContext( (uno_Context * ) pRemoteC );
+ theContextAdmin::get().revokeContext( (uno_Context * ) pRemoteC );
if( pImpl->m_pInstanceProvider )
{
@@ -456,7 +442,7 @@ using namespace remote_context;
extern "C" remote_Context * SAL_CALL
remote_getContext( rtl_uString *pIdString )
{
- return (remote_Context *) ContextAdmin::getInstance()->get( pIdString );
+ return (remote_Context *) theContextAdmin::get().getContext(pIdString);
}
@@ -469,7 +455,7 @@ remote_createContext( remote_Connection *pConnection,
remote_InstanceProvider *pProvider )
{
remote_ContextImpl *p = (remote_ContextImpl * )
- ContextAdmin::getInstance()->createAndRegisterContext(
+ theContextAdmin::get().createAndRegisterContext(
pConnection ,
pIdStr ,
pDescription,
@@ -483,17 +469,19 @@ remote_createContext( remote_Connection *pConnection,
extern "C" void SAL_CALL
remote_addContextListener( remote_contextListenerFunc listener, void *pObject )
{
- ContextAdmin::getInstance()->addContextListener( listener , pObject );
+ theContextAdmin::get().addContextListener( listener , pObject );
}
extern "C" void SAL_CALL
remote_removeContextListener( remote_contextListenerFunc listener , void *pObject )
{
- ContextAdmin::getInstance()->removeContextListener( listener , pObject );
+ theContextAdmin::get().removeContextListener( listener , pObject );
}
extern "C" rtl_uString ** SAL_CALL
remote_getContextList( sal_Int32 *pnStringCount, MemAlloc memAlloc )
{
- return ContextAdmin::getInstance()->getConnectionList( pnStringCount , memAlloc );
+ return theContextAdmin::get().getConnectionList( pnStringCount , memAlloc );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/static/helper.cxx b/bridges/source/remote/static/helper.cxx
index 1ad421cedecc..f0fc40106d36 100644
--- a/bridges/source/remote/static/helper.cxx
+++ b/bridges/source/remote/static/helper.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.
@@ -127,7 +128,7 @@ void SAL_CALL remote_sendQueryInterface(
// get type for queryInterface
OUString sCompleteMethodName = type.getTypeName();
- sCompleteMethodName += OUString::createFromAscii("::queryInterface");
+ sCompleteMethodName += OUString(RTL_CONSTASCII_USTRINGPARAM("::queryInterface"));
typelib_InterfaceMemberTypeDescription *pMemberType = 0;
typelib_typedescription_getByName(
@@ -207,3 +208,5 @@ void SAL_CALL remote_retrieveOidFromProxy(
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/static/mapping.cxx b/bridges/source/remote/static/mapping.cxx
index 69e079d14eaf..3402cfe68268 100644
--- a/bridges/source/remote/static/mapping.cxx
+++ b/bridges/source/remote/static/mapping.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.
@@ -216,3 +217,5 @@ RemoteMapping::~RemoteMapping( )
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/static/proxy.cxx b/bridges/source/remote/static/proxy.cxx
index da67e9bd17ec..db7b9a67a903 100644
--- a/bridges/source/remote/static/proxy.cxx
+++ b/bridges/source/remote/static/proxy.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.
@@ -336,3 +337,5 @@ Remote2UnoProxy::~Remote2UnoProxy()
}
} // end namespace bridge_remote
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/static/remote.cxx b/bridges/source/remote/static/remote.cxx
index 6129d91829ba..e94743469271 100644
--- a/bridges/source/remote/static/remote.cxx
+++ b/bridges/source/remote/static/remote.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,3 +160,5 @@ void Remote2RemoteStub::releaseRemote()
}
} // end namespace bridges_remote
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/static/remote_types.cxx b/bridges/source/remote/static/remote_types.cxx
index 0be511c987b0..f47580d8da92 100644
--- a/bridges/source/remote/static/remote_types.cxx
+++ b/bridges/source/remote/static/remote_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.
@@ -94,3 +95,5 @@ sal_Bool SAL_CALL remote_relatesToInterface2( typelib_TypeDescription * pTypeDes
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/static/remote_types.hxx b/bridges/source/remote/static/remote_types.hxx
index bb7a908a01f9..9325cbc18167 100644
--- a/bridges/source/remote/static/remote_types.hxx
+++ b/bridges/source/remote/static/remote_types.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,3 +88,5 @@ inline sal_Bool SAL_CALL remote_isSimpleType( typelib_TypeDescription * pTypeDes
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/static/stub.cxx b/bridges/source/remote/static/stub.cxx
index ec276c801862..58796351d5bd 100644
--- a/bridges/source/remote/static/stub.cxx
+++ b/bridges/source/remote/static/stub.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.
@@ -334,3 +335,5 @@ Uno2RemoteStub::~Uno2RemoteStub()
}
} // end namespace bridges_remote
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_bridgeimpl.cxx b/bridges/source/remote/urp/urp_bridgeimpl.cxx
index af619c8f3c35..0e25746f0a42 100644
--- a/bridges/source/remote/urp/urp_bridgeimpl.cxx
+++ b/bridges/source/remote/urp/urp_bridgeimpl.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.
@@ -204,9 +205,9 @@ void urp_BridgeImpl::applyProtocolChanges( const Properties &props )
void urp_BridgeImpl::addError( char const *pError )
{
- OUString message = OUString( RTL_CONSTASCII_USTRINGPARAM( "(tid=" ) );
+ OUString message = OUString(RTL_CONSTASCII_USTRINGPARAM("(tid=" ));
message += OUString::valueOf( (sal_Int32 ) osl_getThreadIdentifier( 0 ) );
- message += OUString::createFromAscii( ") " );
+ message += OUString(RTL_CONSTASCII_USTRINGPARAM(") "));
message += OUString::createFromAscii( pError );
MutexGuard guard( m_errorListMutex );
m_lstErrors.push_back( message );
@@ -214,9 +215,9 @@ void urp_BridgeImpl::addError( char const *pError )
void urp_BridgeImpl::addError( const OUString & error )
{
- OUString message = OUString( RTL_CONSTASCII_USTRINGPARAM( "(tid=" ) );
+ OUString message = OUString(RTL_CONSTASCII_USTRINGPARAM("(tid="));
message += OUString::valueOf( (sal_Int32 ) osl_getThreadIdentifier( 0 ) );
- message += OUString::createFromAscii( ") " );
+ message += OUString(RTL_CONSTASCII_USTRINGPARAM(") "));
message += error;
MutexGuard guard( m_errorListMutex );
m_lstErrors.push_back( message );
@@ -248,3 +249,5 @@ OUString urp_BridgeImpl::getErrorsAsString( )
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_bridgeimpl.hxx b/bridges/source/remote/urp/urp_bridgeimpl.hxx
index fc5374bfc069..4e6d31d22505 100644
--- a/bridges/source/remote/urp/urp_bridgeimpl.hxx
+++ b/bridges/source/remote/urp/urp_bridgeimpl.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.
@@ -125,3 +126,5 @@ struct urp_BridgeImpl :
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_cache.h b/bridges/source/remote/urp/urp_cache.h
index fa06453ef524..a0150c854594 100644
--- a/bridges/source/remote/urp/urp_cache.h
+++ b/bridges/source/remote/urp/urp_cache.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.
@@ -55,3 +56,5 @@ namespace bridges_urp
sal_uInt16 m_nEntries;
};
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_cache.hxx b/bridges/source/remote/urp/urp_cache.hxx
index aa366ddaeca7..5aec834199be 100644
--- a/bridges/source/remote/urp/urp_cache.hxx
+++ b/bridges/source/remote/urp/urp_cache.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.
@@ -158,3 +159,5 @@ namespace bridges_urp
m_nEntries = 0;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_dispatch.cxx b/bridges/source/remote/urp/urp_dispatch.cxx
index ae9f3dff9d54..459900b2460a 100644
--- a/bridges/source/remote/urp/urp_dispatch.cxx
+++ b/bridges/source/remote/urp/urp_dispatch.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,3 +115,4 @@ void SAL_CALL urp_sendRequest_internal(
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_dispatch.hxx b/bridges/source/remote/urp/urp_dispatch.hxx
index 2f14d89f75c2..2b44854e3350 100644
--- a/bridges/source/remote/urp/urp_dispatch.hxx
+++ b/bridges/source/remote/urp/urp_dispatch.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.
@@ -76,3 +77,4 @@ namespace bridges_urp {
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_environment.cxx b/bridges/source/remote/urp/urp_environment.cxx
index 1e4f2f3c805c..f1a61896202b 100644
--- a/bridges/source/remote/urp/urp_environment.cxx
+++ b/bridges/source/remote/urp/urp_environment.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.
@@ -514,8 +515,8 @@ void SAL_CALL uno_ext_getMapping(
::rtl::OUString sFromName = pFrom->pTypeName;
::rtl::OUString sToName = pTo->pTypeName;
- ::rtl::OUString sUno = OUString::createFromAscii( UNO_LB_UNO );
- ::rtl::OUString sRemote = OUString::createFromAscii( "urp" );
+ ::rtl::OUString sUno(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO));
+ ::rtl::OUString sRemote(RTL_CONSTASCII_USTRINGPARAM("urp"));
if ( sFromName.equalsIgnoreAsciiCase( sRemote ) &&
sToName.equalsIgnoreAsciiCase( sUno ) )
{
@@ -549,3 +550,5 @@ sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_job.cxx b/bridges/source/remote/urp/urp_job.cxx
index 8828f7f37f64..8af686fa3ef3 100644
--- a/bridges/source/remote/urp/urp_job.cxx
+++ b/bridges/source/remote/urp/urp_job.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.
@@ -937,3 +938,4 @@ namespace bridges_urp
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_job.hxx b/bridges/source/remote/urp/urp_job.hxx
index ce58b1f3f779..ed31e33c387b 100644
--- a/bridges/source/remote/urp/urp_job.hxx
+++ b/bridges/source/remote/urp/urp_job.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.
@@ -376,3 +377,5 @@ inline ClientJob::ClientJob(
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_log.cxx b/bridges/source/remote/urp/urp_log.cxx
index 5813f917d7da..cdaa1727e6b9 100644
--- a/bridges/source/remote/urp/urp_log.cxx
+++ b/bridges/source/remote/urp/urp_log.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.
@@ -145,3 +146,5 @@ namespace bridges_urp
}
#endif
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_log.hxx b/bridges/source/remote/urp/urp_log.hxx
index 486ff90c1e92..8eb3751932a6 100644
--- a/bridges/source/remote/urp/urp_log.hxx
+++ b/bridges/source/remote/urp/urp_log.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.
@@ -48,3 +49,5 @@ namespace bridges_urp
const ::rtl::OUString &sMethodName );
#endif
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_marshal.cxx b/bridges/source/remote/urp/urp_marshal.cxx
index 7545018ea57f..ae23cfb87eb5 100644
--- a/bridges/source/remote/urp/urp_marshal.cxx
+++ b/bridges/source/remote/urp/urp_marshal.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.
@@ -233,3 +234,5 @@ sal_Bool Marshal::packRecursive( void *pSource , typelib_TypeDescription *pType
}
} // end namespace bridges
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_marshal.hxx b/bridges/source/remote/urp/urp_marshal.hxx
index 95812b1a695d..f66528d74703 100644
--- a/bridges/source/remote/urp/urp_marshal.hxx
+++ b/bridges/source/remote/urp/urp_marshal.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.
@@ -341,3 +342,4 @@ namespace bridges_urp
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_marshal_decl.hxx b/bridges/source/remote/urp/urp_marshal_decl.hxx
index 133760bb33e3..a07f6ea48f5a 100644
--- a/bridges/source/remote/urp/urp_marshal_decl.hxx
+++ b/bridges/source/remote/urp/urp_marshal_decl.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.
@@ -104,3 +105,5 @@ namespace bridges_urp
};
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_property.hxx b/bridges/source/remote/urp/urp_property.hxx
index b97e14190ea5..0cd5525e63ad 100644
--- a/bridges/source/remote/urp/urp_property.hxx
+++ b/bridges/source/remote/urp/urp_property.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 @@ namespace bridges_urp
};
} // end namespace bridges_urp
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_propertyobject.cxx b/bridges/source/remote/urp/urp_propertyobject.cxx
index 94d3e7edee0a..323faee2e929 100644
--- a/bridges/source/remote/urp/urp_propertyobject.cxx
+++ b/bridges/source/remote/urp/urp_propertyobject.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.
@@ -454,7 +455,7 @@ void SAL_CALL PropertyObject::implGetProperties( uno_Sequence **ppReturnValue )
ProtocolProperty *pElements = (ProtocolProperty * ) ( *ppReturnValue )->elements;
Properties *pP = m_pLocalSetting;
- assignToIdl( &(pElements[PROPERTY_BRIDGEID]),PROPERTY_BRIDGEID, *(Sequence< sal_Int8 > *)&(pP->seqBridgeID) );
+ assignToIdl( &(pElements[PROPERTY_BRIDGEID]),PROPERTY_BRIDGEID, toUnoSequence(pP->seqBridgeID) );
assignToIdl( &(pElements[PROPERTY_TYPECACHESIZE]),PROPERTY_TYPECACHESIZE,pP->nTypeCacheSize );
assignToIdl( &(pElements[PROPERTY_OIDCACHESIZE]),PROPERTY_OIDCACHESIZE, pP->nOidCacheSize );
assignToIdl( &(pElements[PROPERTY_TIDCACHESIZE]),PROPERTY_TIDCACHESIZE, pP->nTidCacheSize );
@@ -760,7 +761,7 @@ void SAL_CALL PropertyObject::implCommitChange( uno_Sequence *pSequence, uno_Any
{
InvalidProtocolChangeException exception;
Type type = getCppuType( &exception );
- exception.Message = OUString::createFromAscii( "urp: unknown Property " );
+ exception.Message = OUString(RTL_CONSTASCII_USTRINGPARAM("urp: unknown Property "));
exception.Message += pP[i].Name;
exception.invalidProperty = pP[i];
exception.reason = 1;
@@ -791,3 +792,5 @@ void SAL_CALL PropertyObject::waitUntilChangesAreCommitted()
osl_waitCondition( m_commitChangeCondition , 0 );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_propertyobject.hxx b/bridges/source/remote/urp/urp_propertyobject.hxx
index 2812587748b1..d6cfbc84ff95 100644
--- a/bridges/source/remote/urp/urp_propertyobject.hxx
+++ b/bridges/source/remote/urp/urp_propertyobject.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.
@@ -102,3 +103,5 @@ protected:
};
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_reader.cxx b/bridges/source/remote/urp/urp_reader.cxx
index fda6c5e322eb..00941c468e1b 100644
--- a/bridges/source/remote/urp/urp_reader.cxx
+++ b/bridges/source/remote/urp/urp_reader.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.
@@ -830,3 +831,5 @@ void OReaderThread::run()
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_reader.hxx b/bridges/source/remote/urp/urp_reader.hxx
index 85968a57f70d..aa4042ce197b 100644
--- a/bridges/source/remote/urp/urp_reader.hxx
+++ b/bridges/source/remote/urp/urp_reader.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.
@@ -76,3 +77,5 @@ private:
};
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_replycontainer.hxx b/bridges/source/remote/urp/urp_replycontainer.hxx
index afb1d951f5a0..c8b05ea47435 100644
--- a/bridges/source/remote/urp/urp_replycontainer.hxx
+++ b/bridges/source/remote/urp/urp_replycontainer.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.
@@ -73,3 +74,5 @@ namespace bridges_urp
Id2ClientJobStackMap m_map;
};
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_threadid.cxx b/bridges/source/remote/urp/urp_threadid.cxx
index 6d8d165be26e..e603a73bab83 100644
--- a/bridges/source/remote/urp/urp_threadid.cxx
+++ b/bridges/source/remote/urp/urp_threadid.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.
@@ -46,3 +47,5 @@ namespace bridges_urp
return buf.makeStringAndClear();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_threadid.hxx b/bridges/source/remote/urp/urp_threadid.hxx
index cd95d89b2af2..e920e2c1e9c3 100644
--- a/bridges/source/remote/urp/urp_threadid.hxx
+++ b/bridges/source/remote/urp/urp_threadid.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.
@@ -57,3 +58,5 @@ namespace bridges_urp
rtl::OString byteSequence2HumanReadableString( const rtl::ByteSequence &a );
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_unmarshal.cxx b/bridges/source/remote/urp/urp_unmarshal.cxx
index 79335bfeb6f0..5fd124017d4a 100644
--- a/bridges/source/remote/urp/urp_unmarshal.cxx
+++ b/bridges/source/remote/urp/urp_unmarshal.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.
@@ -705,3 +706,4 @@ sal_Bool Unmarshal::unpackType( void *pDest )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_unmarshal.hxx b/bridges/source/remote/urp/urp_unmarshal.hxx
index 2d25bbe783f3..04881d456cce 100644
--- a/bridges/source/remote/urp/urp_unmarshal.hxx
+++ b/bridges/source/remote/urp/urp_unmarshal.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.
@@ -276,3 +277,5 @@ inline sal_Bool Unmarshal::unpackAny( void *pDest )
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_writer.cxx b/bridges/source/remote/urp/urp_writer.cxx
index 610b6653a06c..58795d9f3359 100644
--- a/bridges/source/remote/urp/urp_writer.cxx
+++ b/bridges/source/remote/urp/urp_writer.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.
@@ -267,3 +268,4 @@ void OWriterThread::run()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/remote/urp/urp_writer.hxx b/bridges/source/remote/urp/urp_writer.hxx
index f789c092fb98..041f0b4d753f 100644
--- a/bridges/source/remote/urp/urp_writer.hxx
+++ b/bridges/source/remote/urp/urp_writer.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.
@@ -81,3 +82,4 @@ namespace bridges_urp
};
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/test/inter_libs_exc/inter.cxx b/bridges/test/inter_libs_exc/inter.cxx
index 799b5f02fc87..56966388f09e 100644
--- a/bridges/test/inter_libs_exc/inter.cxx
+++ b/bridges/test/inter_libs_exc/inter.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.
@@ -64,3 +65,5 @@ extern "C" int main( int argc, char const * argv [] )
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/test/inter_libs_exc/share.h b/bridges/test/inter_libs_exc/share.h
index 28c4dfd5bb15..be06619abf76 100644
--- a/bridges/test/inter_libs_exc/share.h
+++ b/bridges/test/inter_libs_exc/share.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/uno/DeploymentException.hpp>
@@ -5,3 +6,5 @@
#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
typedef void (SAL_CALL * t_throws_exc)();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/test/inter_libs_exc/starter.cxx b/bridges/test/inter_libs_exc/starter.cxx
index 4a1207db0e91..e19e83990979 100644
--- a/bridges/test/inter_libs_exc/starter.cxx
+++ b/bridges/test/inter_libs_exc/starter.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.
@@ -63,3 +64,5 @@ extern "C" void SAL_CALL start( t_throws_exc p )
printf( "starter.cxx: caught something\n" );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/test/inter_libs_exc/thrower.cxx b/bridges/test/inter_libs_exc/thrower.cxx
index e90ab6a21e84..d490e5d7b084 100644
--- a/bridges/test/inter_libs_exc/thrower.cxx
+++ b/bridges/test/inter_libs_exc/thrower.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.
@@ -46,3 +47,5 @@ extern "C" t_throws_exc SAL_CALL get_thrower()
{
return throws_exc;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/test/java_uno/acquire/testacquire.cxx b/bridges/test/java_uno/acquire/testacquire.cxx
index 897986c91aa5..95a4a0241d20 100644
--- a/bridges/test/java_uno/acquire/testacquire.cxx
+++ b/bridges/test/java_uno/acquire/testacquire.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.
@@ -572,3 +573,5 @@ extern "C" sal_Bool SAL_CALL component_writeInfo(void *, void * registryKey) {
&& writeInfo(registryKey, Service::getImplementationName_static(),
Service::getSupportedServiceNames_static());
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/test/java_uno/any/transport.cxx b/bridges/test/java_uno/any/transport.cxx
index 9ea4d59dcfe9..4211a96f8149 100644
--- a/bridges/test/java_uno/any/transport.cxx
+++ b/bridges/test/java_uno/any/transport.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.
@@ -106,3 +107,5 @@ extern "C" JNIEXPORT jobject JNICALL Java_test_java_1uno_anytest_TestJni_create_
jni_env->DeleteGlobalRef( jo_global );
return jo_ret;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/test/java_uno/equals/testequals.cxx b/bridges/test/java_uno/equals/testequals.cxx
index 81357e12899b..ff38371bc6ca 100644
--- a/bridges/test/java_uno/equals/testequals.cxx
+++ b/bridges/test/java_uno/equals/testequals.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.
@@ -230,3 +231,5 @@ extern "C" sal_Bool SAL_CALL component_writeInfo(void *, void * pRegistryKey)
&& writeInfo(pRegistryKey, Service::getImplementationName_static(),
Service::getSupportedServiceNames_static());
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
index 1964a73d1878..425b93a271e4 100644
--- a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
+++ b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.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.
@@ -182,3 +183,5 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
{
*envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
index 0e3b30effb7e..c055faa1aa29 100644
--- a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
+++ b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.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.
@@ -144,3 +145,5 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
{
*envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/test/performance/makefile.mk b/bridges/test/performance/makefile.mk
index c987699f5bd9..44f7ae3d4414 100644
--- a/bridges/test/performance/makefile.mk
+++ b/bridges/test/performance/makefile.mk
@@ -53,7 +53,6 @@ APP1STDLIBS+= -lstdc++
APP1STDLIBS+= \
$(CPPULIB) \
$(CPPUHELPERLIB) \
- $(VOSLIB) \
$(SALLIB)
APP1DEF= $(MISC)$/$(APP1TARGET).def
diff --git a/bridges/test/performance/testperformance.cxx b/bridges/test/performance/testperformance.cxx
index be63f093627a..d692144a3f37 100644
--- a/bridges/test/performance/testperformance.cxx
+++ b/bridges/test/performance/testperformance.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.
@@ -188,3 +189,5 @@ void main()
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/test/testclient.cxx b/bridges/test/testclient.cxx
index df7164c844d2..be5223fb5873 100644
--- a/bridges/test/testclient.cxx
+++ b/bridges/test/testclient.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,3 +246,4 @@ int main( int argc, char *argv[] )
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/test/testcomp.cxx b/bridges/test/testcomp.cxx
index 9e09a5c4c52c..8ec0fc251491 100644
--- a/bridges/test/testcomp.cxx
+++ b/bridges/test/testcomp.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.
@@ -797,3 +798,4 @@ Reference <XInterface > createComponent( const ::rtl::OUString &sService ,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/test/testcomp.h b/bridges/test/testcomp.h
index 8a30a538247c..ad96c7262433 100644
--- a/bridges/test/testcomp.h
+++ b/bridges/test/testcomp.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.
@@ -24,12 +25,10 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-//#include <com/sun/star/bridge/XServer.hpp>
-//#include <com/sun/star/bridge/XClient.hpp>
+
#include <stdio.h>
#include <com/sun/star/bridge/XInstanceProvider.hpp>
-//#include <com/sun/star/bridge/XConnectionAdministration.hpp>
#include <osl/thread.hxx>
@@ -154,3 +153,5 @@ public:
};
void testRemote( const Reference< XInterface > &rRemote );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/test/testoffice.cxx b/bridges/test/testoffice.cxx
index 1d0619028c3a..0d87089b6921 100644
--- a/bridges/test/testoffice.cxx
+++ b/bridges/test/testoffice.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.
@@ -277,3 +278,5 @@ int main( int argc, char *argv[] )
//_getch();
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/test/testsameprocess.cxx b/bridges/test/testsameprocess.cxx
index 6ce2f59873a7..35003986e386 100644
--- a/bridges/test/testsameprocess.cxx
+++ b/bridges/test/testsameprocess.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.
@@ -213,3 +214,5 @@ int main( int argc, char *argv[] )
}
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/test/testserver.cxx b/bridges/test/testserver.cxx
index 17b40c123cc1..1e9b70cf13d3 100644
--- a/bridges/test/testserver.cxx
+++ b/bridges/test/testserver.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.
@@ -251,3 +252,5 @@ int main( int argc, char *argv[] )
}
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */