summaryrefslogtreecommitdiff
path: root/bridges/source/cpp_uno
diff options
context:
space:
mode:
Diffstat (limited to 'bridges/source/cpp_uno')
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_intel/cc50_solaris_intel.hxx10
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_intel/cpp2uno.cxx34
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_intel/except.cxx2
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_intel/hash.cxx20
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx44
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/cc50_solaris_sparc.hxx10
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx38
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx2
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx2
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/hash.cxx20
-rw-r--r--bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx40
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/callvirtualmethod.hxx2
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/cpp2uno.cxx2
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.cxx2
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.hxx2
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.hxx2
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/fp.hxx2
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.cxx2
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.hxx2
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx2
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/vtableslotcall.hxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx50
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_alpha/share.hxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_alpha/uno2cpp.cxx44
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx54
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_arm/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_arm/share.hxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx42
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/call.cxx6
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx36
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx20
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/uno2cpp.cxx36
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx64
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_ia64/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_ia64/share.hxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx62
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx42
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/share.hxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx52
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx54
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_m68k/share.hxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx34
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx32
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_mips/except.cxx36
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_mips/share.hxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_mips/uno2cpp.cxx48
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx126
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc/share.hxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx114
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx70
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx60
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx68
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390/share.hxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx70
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx52
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390x/share.hxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx44
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx40
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx36
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_sparc/share.hxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx84
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx6
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/abi.hxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx36
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx28
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx52
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx40
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_intel/share.hxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_intel/uno2cpp.cxx52
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx88
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_powerpc/except.cxx38
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_powerpc/share.hxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx78
-rw-r--r--bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx52
-rw-r--r--bridges/source/cpp_uno/gcc3_os2_intel/except.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_os2_intel/share.hxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_os2_intel/uno2cpp.cxx56
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx54
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_intel/share.hxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx52
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx40
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx36
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_sparc/share.hxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx82
-rw-r--r--bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx46
-rw-r--r--bridges/source/cpp_uno/mingw_intel/dllinit.cxx4
-rw-r--r--bridges/source/cpp_uno/mingw_intel/except.cxx2
-rw-r--r--bridges/source/cpp_uno/mingw_intel/share.hxx18
-rw-r--r--bridges/source/cpp_uno/mingw_intel/smallstruct.cxx2
-rw-r--r--bridges/source/cpp_uno/mingw_intel/smallstruct.hxx2
-rw-r--r--bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx52
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx58
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx4
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/except.cxx50
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/msci.hxx4
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/uno2cpp.cxx176
-rw-r--r--bridges/source/cpp_uno/shared/bridge.cxx2
-rw-r--r--bridges/source/cpp_uno/shared/component.cxx2
-rw-r--r--bridges/source/cpp_uno/shared/component.hxx2
-rw-r--r--bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx4
-rw-r--r--bridges/source/cpp_uno/shared/guardedarray.hxx2
-rw-r--r--bridges/source/cpp_uno/shared/types.cxx2
-rw-r--r--bridges/source/cpp_uno/shared/unointerfaceproxy.cxx2
-rw-r--r--bridges/source/cpp_uno/shared/vtablefactory.cxx2
-rw-r--r--bridges/source/cpp_uno/shared/vtables.cxx2
117 files changed, 1642 insertions, 1642 deletions
diff --git a/bridges/source/cpp_uno/cc50_solaris_intel/cc50_solaris_intel.hxx b/bridges/source/cpp_uno/cc50_solaris_intel/cc50_solaris_intel.hxx
index 8e938e2c8105..479d39ec6841 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
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -39,10 +39,10 @@ namespace __Crun
struct static_type_info
{
std::ptrdiff_t m_pClassName;
- int m_nSkip1; // must be 0
- void* m_pMagic; // points to some magic data
- int m_nMagic[ 4 ];
- int m_nSkip2[2]; // must be 0
+ int m_nSkip1; // must be 0
+ void* m_pMagic; // points to some magic data
+ int m_nMagic[ 4 ];
+ int m_nSkip2[2]; // must be 0
};
void* ex_alloc(unsigned);
void ex_throw( void*, const static_type_info*, void(*)(void*));
diff --git a/bridges/source/cpp_uno/cc50_solaris_intel/cpp2uno.cxx b/bridges/source/cpp_uno/cc50_solaris_intel/cpp2uno.cxx
index 0737475c995a..fcd3509050fb 100644
--- a/bridges/source/cpp_uno/cc50_solaris_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_intel/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -66,7 +66,7 @@ void cpp2uno_call(
void * pUnoReturn = 0;
void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -95,9 +95,9 @@ void cpp2uno_call(
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];
@@ -151,7 +151,7 @@ void cpp2uno_call(
}
pCppStack += sizeof(sal_Int32); // standard parameter length
}
-
+
// ExceptionHolder
uno_Any aUnoExc; // Any will be constructed by callee
uno_Any * pUnoExc = &aUnoExc;
@@ -159,7 +159,7 @@ void cpp2uno_call(
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
-
+
// in case no exception occured...
if (pUnoExc)
{
@@ -167,14 +167,14 @@ void cpp2uno_call(
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::cc50_solaris_intel_raiseException(
&aUnoExc, pThis->getBridge()->getUno2Cpp() );
// has to destruct the any
@@ -186,7 +186,7 @@ void cpp2uno_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bOut) // inout/out
{
// convert and assign
@@ -198,7 +198,7 @@ void cpp2uno_call(
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return
@@ -218,7 +218,7 @@ void cpp2uno_call(
{
TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
}
- }
+ }
}
@@ -228,7 +228,7 @@ extern "C" void cpp_vtable_call(
sal_Int64 nRegReturn )
{
OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
-
+
// pCallStack: ret adr, [ret *], this, params
void * pThis;
if( nFunctionIndex & 0x80000000 )
@@ -253,7 +253,7 @@ extern "C" void cpp_vtable_call(
{
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!" );
@@ -279,9 +279,9 @@ extern "C" void cpp_vtable_call(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -313,7 +313,7 @@ extern "C" void cpp_vtable_call(
pCppI->getBridge()->getCppEnv(),
(void **)&pInterface, pCppI->getOid().pData,
(typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
diff --git a/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx b/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx
index e0776c19476c..e0bb02db0257 100644
--- a/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/cc50_solaris_intel/hash.cxx b/bridges/source/cpp_uno/cc50_solaris_intel/hash.cxx
index c1c2c2dc8eb6..dfa9b7227195 100644
--- a/bridges/source/cpp_uno/cc50_solaris_intel/hash.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_intel/hash.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -39,7 +39,7 @@ typedef unsigned int sal_uInt32;
#include <string.h>
/*
- * build a hash for a character buffer using the NIST algorithm
+ * build a hash for a character buffer using the NIST algorithm
*/
class NIST_Hash
@@ -50,12 +50,12 @@ class NIST_Hash
{
return z ^ ( x & ( y ^ z ) );
}
-
+
sal_uInt32 f2( sal_uInt32 x, sal_uInt32 y, sal_uInt32 z )
{
return x ^ y ^ z;
}
-
+
sal_uInt32 f3( sal_uInt32 x, sal_uInt32 y, sal_uInt32 z )
{
return ( x & y ) + ( z & ( x ^ y ) );
@@ -98,17 +98,17 @@ class NIST_Hash
sal_uInt32 hashdata[5];
public:
NIST_Hash( const char* pString, sal_uInt32 nLen );
-
+
sal_uInt32 *getHash() { return hashdata; }
};
void NIST_Hash::transform()
{
// constants
- const sal_uInt32 K2 = 0x5A827999;
- const sal_uInt32 K3 = 0x6ED9EBA1;
- const sal_uInt32 K5 = 0x8F1BBCDC;
- const sal_uInt32 K10 = 0xCA62C1D6;
+ const sal_uInt32 K2 = 0x5A827999;
+ const sal_uInt32 K3 = 0x6ED9EBA1;
+ const sal_uInt32 K5 = 0x8F1BBCDC;
+ const sal_uInt32 K10 = 0xCA62C1D6;
sal_uInt32 a, b, c, d, e;
a = hashdata[0];
@@ -210,7 +210,7 @@ void NIST_Hash::transform()
#define BLOCKSIZE sizeof( data )
-NIST_Hash::NIST_Hash( const char* pString, sal_uInt32 nLen )
+NIST_Hash::NIST_Hash( const char* pString, sal_uInt32 nLen )
{
hashdata[0] = 0x67452301;
hashdata[1] = 0xefcdab89;
diff --git a/bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx b/bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx
index 7242ccd31ee6..705cad8a33ef 100644
--- a/bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -70,16 +70,16 @@ static inline void cpp_call(
// max space for: [complex ret ptr], values|ptr ...
char * pCppStack = (char *)alloca( ((nParams+3) * sizeof(sal_Int64)) );
char * pCppStackStart = pCppStack;
-
+
// return
typelib_TypeDescription * pReturnTypeDescr = 0;
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
-
+
void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
-
+
void * pReturnSpace = 0;
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -102,7 +102,7 @@ static inline void cpp_call(
+ aVtableSlot.offset;
*(void**)pCppStack = pAdjustedThisPtr;
pCppStack += sizeof( void* );
-
+
const int nMaxParams = 32;
// args
void * args_buffer[3 * nMaxParams];
@@ -117,20 +117,20 @@ static inline void cpp_call(
const int nTempBufferSize = 256;
sal_Int32 nTempBufferPos = 0;
long params_buffer[nTempBufferSize];
-
+
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 ))
{
pCppArgs[ nPos ] = pCppStack;
uno_copyAndConvertData( pCppArgs[nPos], pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
switch (pParamTypeDescr->eTypeClass)
{
case typelib_TypeClass_HYPER:
@@ -212,10 +212,10 @@ static inline void cpp_call(
(sal_Int32 *)pCppStackStart,
nStackLongs
);
-
+
// NO exception occured...
*ppUnoExc = 0;
-
+
// reconvert temporary params
for ( ; nTempIndizes--; )
{
@@ -223,7 +223,7 @@ static inline void cpp_call(
sal_Bool bAllocated = (nIndex & 0x80000000) != 0;
nIndex &= 0x7fffffff;
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bIn)
{
if (pParams[nIndex].bOut) // inout
@@ -263,7 +263,7 @@ static inline void cpp_call(
const char* pName = __Cimpl::ex_name();
// get exception
- CPPU_CURRENT_NAMESPACE::cc50_solaris_intel_fillUnoException(
+ CPPU_CURRENT_NAMESPACE::cc50_solaris_intel_fillUnoException(
pExc, pName, *ppUnoExc,
pThis->getBridge()->getCpp2Uno());
@@ -285,7 +285,7 @@ static inline void cpp_call(
if (pReturnTypeDescr)
TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
}
-
+
if (pCppArgs != (void **)args_buffer)
rtl_freeMemory( pCppArgs );
if (pReturnSpace)
@@ -304,7 +304,7 @@ void unoInterfaceProxyDispatch(
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:
@@ -329,14 +329,14 @@ void unoInterfaceProxyDispatch(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ 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(
@@ -344,10 +344,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -378,7 +378,7 @@ void unoInterfaceProxyDispatch(
(*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
pThis->pBridge->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -408,7 +408,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/cc50_solaris_sparc.hxx b/bridges/source/cpp_uno/cc50_solaris_sparc/cc50_solaris_sparc.hxx
index 06667e4a366c..a00d2ac7cc8b 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
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -39,10 +39,10 @@ namespace __Crun
struct static_type_info
{
std::ptrdiff_t m_pClassName;
- int m_nSkip1; // must be 0
- void* m_pMagic; // points to some magic data
- int m_nMagic[ 4 ];
- int m_nSkip2[2]; // must be 0
+ int m_nSkip1; // must be 0
+ void* m_pMagic; // points to some magic data
+ int m_nMagic[ 4 ];
+ int m_nSkip2[2]; // must be 0
};
void* ex_alloc(unsigned);
void ex_throw( void*, const static_type_info*, void(*)(void*));
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx b/bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx
index bfe55d726b3c..f13bcfbe214c 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -260,13 +260,13 @@ static typelib_TypeClass cpp_mediate(
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex,
"### illegal vtable index!" );
-// if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
-// {
-// RuntimeException aExc;
-// aExc.Message = OUString::createFromAscii("illegal vtable index!");
-// aExc.Context = (XInterface *)pThis;
-// throw aExc;
-// }
+// if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
+// {
+// RuntimeException aExc;
+// aExc.Message = OUString::createFromAscii("illegal vtable index!");
+// aExc.Context = (XInterface *)pThis;
+// throw aExc;
+// }
// determine called method
sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
@@ -294,8 +294,8 @@ static typelib_TypeClass cpp_mediate(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
@@ -356,15 +356,15 @@ static typelib_TypeClass cpp_mediate(
}
break;
}
-// default:
-// {
-// RuntimeException aExc;
-// aExc.Message = OUString::createFromAscii("no member description found!");
-// aExc.Context = (XInterface *)pThis;
-// throw aExc;
-// // is here for dummy
-// eRet = typelib_TypeClass_VOID;
-// }
+// default:
+// {
+// RuntimeException aExc;
+// aExc.Message = OUString::createFromAscii("no member description found!");
+// aExc.Context = (XInterface *)pThis;
+// throw aExc;
+// // is here for dummy
+// eRet = typelib_TypeClass_VOID;
+// }
}
return eRet;
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx b/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx
index aa2bbde76708..2c003cc4ba5b 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx b/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx
index 5d89d81efed8..4a3bbc9319b5 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/hash.cxx b/bridges/source/cpp_uno/cc50_solaris_sparc/hash.cxx
index 29064c19a28f..d2d94bb24b96 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/hash.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/hash.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -40,7 +40,7 @@ typedef unsigned int sal_uInt32;
#include <string.h>
/*
- * build a hash for a character buffer using the NIST algorithm
+ * build a hash for a character buffer using the NIST algorithm
*/
class NIST_Hash
@@ -51,12 +51,12 @@ class NIST_Hash
{
return z ^ ( x & ( y ^ z ) );
}
-
+
sal_uInt32 f2( sal_uInt32 x, sal_uInt32 y, sal_uInt32 z )
{
return x ^ y ^ z;
}
-
+
sal_uInt32 f3( sal_uInt32 x, sal_uInt32 y, sal_uInt32 z )
{
return ( x & y ) + ( z & ( x ^ y ) );
@@ -99,17 +99,17 @@ class NIST_Hash
sal_uInt32 hashdata[5];
public:
NIST_Hash( const char* pString, sal_uInt32 nLen );
-
+
sal_uInt32 *getHash() { return hashdata; }
};
void NIST_Hash::transform()
{
// constants
- const sal_uInt32 K2 = 0x5A827999;
- const sal_uInt32 K3 = 0x6ED9EBA1;
- const sal_uInt32 K5 = 0x8F1BBCDC;
- const sal_uInt32 K10 = 0xCA62C1D6;
+ const sal_uInt32 K2 = 0x5A827999;
+ const sal_uInt32 K3 = 0x6ED9EBA1;
+ const sal_uInt32 K5 = 0x8F1BBCDC;
+ const sal_uInt32 K10 = 0xCA62C1D6;
sal_uInt32 a, b, c, d, e;
a = hashdata[0];
@@ -211,7 +211,7 @@ void NIST_Hash::transform()
#define BLOCKSIZE sizeof( data )
-NIST_Hash::NIST_Hash( const char* pString, sal_uInt32 nLen )
+NIST_Hash::NIST_Hash( const char* pString, sal_uInt32 nLen )
{
hashdata[0] = 0x67452301;
hashdata[1] = 0xefcdab89;
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx b/bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx
index 7b85bc1fee91..2d040352ff5d 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -69,8 +69,8 @@ static void cpp_call(
OSL_ENSURE( pThis, "### no interface given!" );
// max space for: [complex ret ptr], values|ptr ...
- char * pCppStack = (char *)alloca( ((nParams+3) * sizeof(sal_Int64)) );
- char * pCppStackStart = pCppStack;
+ char * pCppStack = (char *)alloca( ((nParams+3) * sizeof(sal_Int64)) );
+ char * pCppStackStart = pCppStack;
// return
typelib_TypeDescription * pReturnTypeDescr = 0;
@@ -173,20 +173,20 @@ static void cpp_call(
// seems that EH registration for callVirtualMethod is not really
// necessary
-// static unsigned long* pFrameInfo = NULL;
-
-// if( ! pFrameInfo )
-// {
-// pFrameInfo = new unsigned long[ 7 ];
-// pFrameInfo[ 0 ] = 0x40000000 | (((unsigned long)__Crun::ex_rethrow_q) >> 2);
-// pFrameInfo[ 1 ] = 0x01000000;
-// pFrameInfo[ 2 ] = (unsigned long)callVirtualMethodExceptionHandler;
-// pFrameInfo[ 3 ] = 0;
-// pFrameInfo[ 4 ] = (unsigned long)pFrameInfo - (unsigned long)callVirtualMethodExceptionHandler;
-// pFrameInfo[ 5 ] = 0;
-// pFrameInfo[ 6 ] = 0;
-// _ex_register( pFrameInfo+2, 1 );
-// }
+// static unsigned long* pFrameInfo = NULL;
+
+// if( ! pFrameInfo )
+// {
+// pFrameInfo = new unsigned long[ 7 ];
+// pFrameInfo[ 0 ] = 0x40000000 | (((unsigned long)__Crun::ex_rethrow_q) >> 2);
+// pFrameInfo[ 1 ] = 0x01000000;
+// pFrameInfo[ 2 ] = (unsigned long)callVirtualMethodExceptionHandler;
+// pFrameInfo[ 3 ] = 0;
+// pFrameInfo[ 4 ] = (unsigned long)pFrameInfo - (unsigned long)callVirtualMethodExceptionHandler;
+// pFrameInfo[ 5 ] = 0;
+// pFrameInfo[ 6 ] = 0;
+// _ex_register( pFrameInfo+2, 1 );
+// }
try
{
@@ -250,7 +250,7 @@ static void cpp_call(
const char* pName = __Cimpl::ex_name();
// get exception
- CPPU_CURRENT_NAMESPACE::cc50_solaris_sparc_fillUnoException(
+ CPPU_CURRENT_NAMESPACE::cc50_solaris_sparc_fillUnoException(
pExc, pName, *ppUnoExc, pThis->getBridge()->getCpp2Uno());
// temporary params
@@ -307,8 +307,8 @@ void unoInterfaceProxyDispatch(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
typelib_TypeDescriptionReference * pReturnTypeRef = 0;
OUString aVoidName( RTL_CONSTASCII_USTRINGPARAM("void") );
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/callvirtualmethod.hxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/callvirtualmethod.hxx
index 16f6c1090ff2..f58a9bd616cb 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/callvirtualmethod.hxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/callvirtualmethod.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/cpp2uno.cxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/cpp2uno.cxx
index c49330b2223f..0d0d4e05707e 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.cxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.cxx
index bf6b1512a41d..5e694c09de46 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.cxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.hxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.hxx
index 8ba17dad842f..ee5672e05cd1 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.hxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.hxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.hxx
index de7028d3faa2..f78a66c93a8c 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.hxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/fp.hxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/fp.hxx
index ba32b141d338..b22804e062b2 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/fp.hxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/fp.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.cxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.cxx
index 9b004078c35f..1a2f5f6bddf7 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.cxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.hxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.hxx
index f9741a8898a5..b1bc3d64a489 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.hxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/isdirectreturntype.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx
index e6646dca42a1..76959161bf2f 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/vtableslotcall.hxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/vtableslotcall.hxx
index c63f674c1549..6c699bb5a91e 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/vtableslotcall.hxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/vtableslotcall.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx
index 3ee825511d66..6cb1deedbaa7 100644
--- a/bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -48,7 +48,7 @@
using namespace ::com::sun::star::uno;
-namespace
+namespace
{
static typelib_TypeClass cpp2uno_call(
bridges::cpp_uno::shared::CppInterfaceProxy * pThis,
@@ -62,7 +62,7 @@ static typelib_TypeClass cpp2uno_call(
fprintf(stderr, "as far as cpp2uno_call\n");
#endif
int nregs = 0; //number of words passed in registers
-
+
// gpreg: [ret *], this, [gpr params]
// fpreg: [fpr params]
// ovrflw: [gpr or fpr params (properly aligned)]
@@ -71,10 +71,10 @@ static typelib_TypeClass cpp2uno_call(
typelib_TypeDescription * pReturnTypeDescr = 0;
if (pReturnTypeRef)
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
+
void * pUnoReturn = 0;
void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -87,14 +87,14 @@ static typelib_TypeClass cpp2uno_call(
gpreg++;
fpreg++;
nregs++;
-
+
pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize )
: pCppReturn); // direct way
}
}
// pop this
- gpreg++;
+ gpreg++;
fpreg++;
nregs++;
@@ -107,7 +107,7 @@ static typelib_TypeClass cpp2uno_call(
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 )
{
@@ -223,7 +223,7 @@ static typelib_TypeClass cpp2uno_call(
void *pCppStack; //temporary stack pointer
if (nregs < axp::MAX_WORDS_IN_REGS)
- {
+ {
pCppArgs[nPos] = pCppStack = *gpreg;
gpreg++;
fpreg++;
@@ -265,14 +265,14 @@ static typelib_TypeClass cpp2uno_call(
#ifdef CMC_DEBUG
fprintf(stderr, "end of params\n");
#endif
-
+
// 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)
{
@@ -280,14 +280,14 @@ static typelib_TypeClass cpp2uno_call(
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;
@@ -299,7 +299,7 @@ static typelib_TypeClass cpp2uno_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bOut) // inout/out
{
// convert and assign
@@ -309,7 +309,7 @@ static typelib_TypeClass cpp2uno_call(
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return
@@ -366,7 +366,7 @@ static typelib_TypeClass cpp_mediate(
}
#endif
-
+
// gpreg: [ret *], this, [other gpr params]
// fpreg: [fpr params]
// ovrflw: [gpr or fpr params (properly aligned)]
@@ -384,14 +384,14 @@ static typelib_TypeClass cpp_mediate(
}
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)
{
@@ -399,14 +399,14 @@ static typelib_TypeClass cpp_mediate(
rtl::OUString::createFromAscii("illegal vtable index!"),
(XInterface *)pCppI );
}
-
+
// determine called method
OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
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)
{
@@ -429,7 +429,7 @@ static typelib_TypeClass cpp_mediate(
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
aParam.bIn = sal_True;
aParam.bOut = sal_False;
-
+
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -460,9 +460,9 @@ static typelib_TypeClass cpp_mediate(
XInterface * pInterface = 0;
(*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
pCppI->getBridge()->getCppEnv(),
- (void **)&pInterface, pCppI->getOid().pData,
+ (void **)&pInterface, pCppI->getOid().pData,
(typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -529,8 +529,8 @@ long cpp_vtable_call(long r16, long r17, long r18, long r19, long r20, long r21,
fprintf(stderr, "non-doubles are %x %x %x %x %x %x\n", gpreg[0], gpreg[1], gpreg[2], gpreg[3], gpreg[4], gpreg[5]);
fprintf(stderr, "doubles are %f %f %f %f %f %f\n", fpreg[0], fpreg[1], fpreg[2], fpreg[3], fpreg[4], fpreg[5]);
#endif
- typelib_TypeClass aType =
- cpp_mediate( nOffsetAndIndex, (void**)gpreg, (void**)fpreg, (void**)sp,
+ typelib_TypeClass aType =
+ cpp_mediate( nOffsetAndIndex, (void**)gpreg, (void**)fpreg, (void**)sp,
(sal_Int64*)nRegReturn );
#ifdef CMC_DEBUG
fprintf(stderr, "after mediate ret is %lx %ld\n", nRegReturn[0], nRegReturn[0]);
diff --git a/bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx b/bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx
index c0de95532515..ea6961092f1a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/gcc3_linux_alpha/share.hxx b/bridges/source/cpp_uno/gcc3_linux_alpha/share.hxx
index d76cbf748db3..ba9db0598b73 100644
--- a/bridges/source/cpp_uno/gcc3_linux_alpha/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_alpha/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -49,25 +49,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
diff --git a/bridges/source/cpp_uno/gcc3_linux_alpha/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_alpha/uno2cpp.cxx
index dddda8ab8207..02801f75606c 100644
--- a/bridges/source/cpp_uno/gcc3_linux_alpha/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_alpha/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -203,7 +203,7 @@ void callVirtualMethod(
}
-//============================================================================
+//============================================================================
static void cpp_call(
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
bridges::cpp_uno::shared::VtableSlot aVtableSlot,
@@ -218,12 +218,12 @@ static void cpp_call(
sal_uInt64 pGPR[axp::MAX_GPR_REGS];
double pFPR[axp::MAX_SSE_REGS];
sal_uInt32 nRegs = 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)
@@ -254,15 +254,15 @@ static void cpp_call(
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,
@@ -319,7 +319,7 @@ static void cpp_call(
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;
@@ -333,7 +333,7 @@ static void cpp_call(
INSERT_INT64( &(pCppArgs[nPos]), nRegs, pGPR, pStack );
}
}
-
+
try
{
callVirtualMethod(
@@ -344,13 +344,13 @@ static void cpp_call(
pFPR, nRegs );
// 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
@@ -367,7 +367,7 @@ static void cpp_call(
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -381,10 +381,10 @@ static void cpp_call(
catch (...)
{
// fill uno exception
- fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
+ fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
*ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
+
// temporary params
for ( ; nTempIndizes--; )
{
@@ -409,12 +409,12 @@ void unoInterfaceProxyDispatch(
#ifdef CMC_DEBUG
fprintf(stderr, "unoInterfaceProxyDispatch\n");
#endif
-
+
// is my surrogate
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
+ bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
= static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy *> (pUnoI);
-
+
switch (pMemberDescr->eTypeClass)
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -448,7 +448,7 @@ void unoInterfaceProxyDispatch(
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(
@@ -456,10 +456,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -491,7 +491,7 @@ void unoInterfaceProxyDispatch(
(*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
pThis->pBridge->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -521,7 +521,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
index da4f0e34ce3c..e71398220522 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -57,7 +57,7 @@ namespace
static typelib_TypeClass cpp2uno_call(
bridges::cpp_uno::shared::CppInterfaceProxy* pThis,
const typelib_TypeDescription * pMemberTypeDescr,
- typelib_TypeDescriptionReference * pReturnTypeRef,
+ typelib_TypeDescriptionReference * pReturnTypeRef,
sal_Int32 nParams, typelib_MethodParameter * pParams,
void ** pCallStack,
sal_Int64 * pRegisterReturn /* space for register return */ )
@@ -70,11 +70,11 @@ namespace
typelib_TypeDescription * pReturnTypeDescr = 0;
if (pReturnTypeRef)
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
+
void * pUnoReturn = 0;
// complex return ptr: if != 0 && != pUnoReturn, reconversion need
void * pCppReturn = 0;
-
+
if (pReturnTypeDescr)
{
if (!arm::return_in_hidden_param(pReturnTypeRef))
@@ -83,7 +83,7 @@ namespace
{
pCppReturn = *(void **)pCppStack;
pCppStack += sizeof(void *);
-
+
pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType(
pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize )
@@ -103,9 +103,9 @@ namespace
// cpp<=>uno)
sal_Int32 * pTempIndizes = (sal_Int32 *)(pUnoArgs + (2 * nParams));
// type descriptions for reconversions
- typelib_TypeDescription ** ppTempParamTypeDescr =
+ typelib_TypeDescription ** ppTempParamTypeDescr =
(typelib_TypeDescription **)(pUnoArgs + (3 * nParams));
-
+
sal_Int32 nTempIndizes = 0;
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
@@ -114,8 +114,8 @@ namespace
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
- if (!rParam.bOut &&
- bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
+ if (!rParam.bOut &&
+ bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
#ifdef __ARM_EABI__
switch (pParamTypeDescr->eTypeClass)
@@ -161,7 +161,7 @@ namespace
else if (bridges::cpp_uno::shared::relatesToInterfaceType(
pParamTypeDescr ))
{
- uno_copyAndConvertData( pUnoArgs[nPos] =
+ uno_copyAndConvertData( pUnoArgs[nPos] =
alloca( pParamTypeDescr->nSize ),
*(void **)pCppStack, pParamTypeDescr,
pThis->getBridge()->getCpp2Uno() );
@@ -178,7 +178,7 @@ namespace
}
pCppStack += sizeof(sal_Int32); // standard parameter length
}
-
+
// ExceptionHolder
uno_Any aUnoExc; // Any will be constructed by callee
uno_Any * pUnoExc = &aUnoExc;
@@ -194,16 +194,16 @@ namespace
for ( ; nTempIndizes--; )
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
-
+
if (pParams[nIndex].bIn) // is in/inout => was constructed
- uno_destructData( pUnoArgs[nIndex],
+ uno_destructData( pUnoArgs[nIndex],
ppTempParamTypeDescr[nTempIndizes], 0 );
TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
}
if (pReturnTypeDescr)
TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
-
- CPPU_CURRENT_NAMESPACE::raiseException( &aUnoExc,
+
+ CPPU_CURRENT_NAMESPACE::raiseException( &aUnoExc,
pThis->getBridge()->getUno2Cpp() ); // has to destruct the any
// is here for dummy
return typelib_TypeClass_VOID;
@@ -216,18 +216,18 @@ namespace
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],
+ 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
@@ -278,10 +278,10 @@ namespace
}
pThis = static_cast< char * >(pThis) - nVtableOffset;
- bridges::cpp_uno::shared::CppInterfaceProxy * pCppI =
+ bridges::cpp_uno::shared::CppInterfaceProxy * pCppI =
bridges::cpp_uno::shared::CppInterfaceProxy::castInterfaceToProxy(
pThis);
-
+
typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex,
@@ -292,7 +292,7 @@ namespace
OUString::createFromAscii("illegal vtable index!"),
(XInterface *)pCppI );
}
-
+
// determine called method
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex,
"### illegal vtable index!" );
@@ -326,7 +326,7 @@ namespace
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
aParam.bIn = sal_True;
aParam.bOut = sal_False;
-
+
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -360,7 +360,7 @@ namespace
pCppI->getBridge()->getCppEnv(),
(void **)&pInterface, pCppI->getOid().pData,
(typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -405,7 +405,7 @@ namespace
* (called by asm snippets)
*/
-extern "C" sal_Int64 cpp_vtable_call( long *pFunctionAndOffset,
+extern "C" sal_Int64 cpp_vtable_call( long *pFunctionAndOffset,
void **pCallStack )
{
sal_Int64 nRegReturn;
@@ -442,7 +442,7 @@ namespace
{
const int codeSnippetSize = 20;
- unsigned char *codeSnippet(unsigned char* code, sal_Int32 functionIndex,
+ unsigned char *codeSnippet(unsigned char* code, sal_Int32 functionIndex,
sal_Int32 vtableOffset, bool bHasHiddenParam)
{
if (bHasHiddenParam)
@@ -522,7 +522,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
{
(s++)->fn = code + writetoexecdiff;
- typelib_InterfaceMethodTypeDescription *pMethodTD =
+ typelib_InterfaceMethodTypeDescription *pMethodTD =
reinterpret_cast<
typelib_InterfaceMethodTypeDescription * >(member);
@@ -544,7 +544,7 @@ void bridges::cpp_uno::shared::VtableFactory::flushCode(
{
static void (*clear_cache)(unsigned char const*, unsigned char const*)
= (void (*)(unsigned char const*, unsigned char const*))
- dlsym(RTLD_DEFAULT, "__clear_cache");
+ dlsym(RTLD_DEFAULT, "__clear_cache");
(*clear_cache)(beg, end);
}
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
index 1fc67a2098d6..84f60331d48a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx b/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
index 2b00c6c008b4..e1d24dc71ab9 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -42,15 +42,15 @@ namespace CPPU_CURRENT_NAMESPACE
// -- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
struct __cxa_exception
- {
+ {
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ void (*exceptionDestructor)(void *);
+
::std::unexpected_handler unexpectedHandler;
::std::terminate_handler terminateHandler;
-
+
__cxa_exception *nextException;
-
+
int handlerCount;
#ifdef __ARM_EABI__
__cxa_exception *nextPropagatingException;
@@ -61,14 +61,14 @@ namespace CPPU_CURRENT_NAMESPACE
const unsigned char *languageSpecificData;
void *catchTemp;
void *adjustedPtr;
-#endif
+#endif
_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 *thrown_exception, std::type_info *tinfo,
void (*dest) (void *) ) __attribute__((noreturn));
struct __cxa_eh_globals
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
index 00a06643fda5..1a2c27136d83 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -43,13 +43,13 @@
#include <stdio.h>
#include <string.h>
-/*
+/*
* Based on http://gcc.gnu.org/PR41443
* References to __SOFTFP__ are incorrect for EABI; the __SOFTFP__ code
* should be used for *soft-float ABI* whether or not VFP is enabled,
* and __SOFTFP__ does specifically mean soft-float not soft-float ABI.
*
- * Changing the conditionals to __SOFTFP__ || __ARM_EABI__ then
+ * Changing the conditionals to __SOFTFP__ || __ARM_EABI__ then
* -mfloat-abi=softfp should work. -mfloat-abi=hard won't; that would
* need both a new macro to identify the hard-VFP ABI.
*/
@@ -320,7 +320,7 @@ void callVirtualMethod(
*pDS++ = *reinterpret_cast<sal_uInt8 *>( pSV );
namespace {
-//=======================================================================
+//=======================================================================
static void cpp_call(
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
bridges::cpp_uno::shared::VtableSlot aVtableSlot,
@@ -335,12 +335,12 @@ static void cpp_call(
sal_uInt32 pGPR[arm::MAX_GPR_REGS];
sal_uInt32 nGPR = 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
bool bOverFlow = false;
@@ -377,7 +377,7 @@ static void cpp_call(
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];
@@ -389,7 +389,7 @@ static void cpp_call(
// uno_copyAndConvertData( pCppArgs[nPos] = pStack, pUnoArgs[nPos],
uno_copyAndConvertData( pCppArgs[nPos] = alloca(8), pUnoArgs[nPos],
pParamTypeDescr, pThis->getBridge()->getUno2Cpp() );
-
+
switch (pParamTypeDescr->eTypeClass)
{
case typelib_TypeClass_HYPER:
@@ -446,7 +446,7 @@ static void cpp_call(
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;
@@ -466,7 +466,7 @@ static void cpp_call(
callVirtualMethod(
pAdjustedThisPtr, aVtableSlot.index,
pCppReturn, pReturnTypeRef,
- pStackStart,
+ pStackStart,
(pStack - pStackStart),
pGPR, nGPR);
@@ -478,7 +478,7 @@ static void cpp_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bIn)
{
if (pParams[nIndex].bOut) // inout
@@ -495,7 +495,7 @@ static void cpp_call(
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -521,7 +521,7 @@ static void cpp_call(
uno_destructData( pCppArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], cpp_release );
TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
}
-
+
// return type
if (pReturnTypeDescr)
TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
@@ -541,7 +541,7 @@ void unoInterfaceProxyDispatch(
#if OSL_DEBUG_LEVEL > 0
typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
#endif
-
+
switch (pMemberDescr->eTypeClass)
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -551,12 +551,12 @@ void unoInterfaceProxyDispatch(
sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
#endif
-
+
VtableSlot aVtableSlot(
getVtableSlot(
reinterpret_cast<typelib_InterfaceAttributeTypeDescription const *>
(pMemberDescr)));
-
+
if (pReturn)
{
// dependent dispatch
@@ -579,7 +579,7 @@ void unoInterfaceProxyDispatch(
OUString aVoidName( RTL_CONSTASCII_USTRINGPARAM("void") );
typelib_typedescriptionreference_new(
&pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
-
+
// dependent dispatch
aVtableSlot.index += 1;
cpp_call(
@@ -587,10 +587,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -627,7 +627,7 @@ void unoInterfaceProxyDispatch(
(*pThis->getBridge()->getUnoEnv()->getRegisteredInterface)(
pThis->getBridge()->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -657,7 +657,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/call.cxx b/bridges/source/cpp_uno/gcc3_linux_hppa/call.cxx
index 4974bf3f0e82..ad9898c732c5 100644
--- a/bridges/source/cpp_uno/gcc3_linux_hppa/call.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/call.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -92,11 +92,11 @@ void MapReturn(sal_uInt32 ret0, sal_uInt32 ret1, typelib_TypeDescription *pRetur
//strictly necessary
register sal_uInt32 r28 __asm__("%r28");
-void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
+void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
void * pRegisterReturn, typelib_TypeDescription *pReturnTypeDescr, bool bRegisterReturn,
sal_uInt32 *pStack, sal_uInt32 nStack, sal_uInt32 *pGPR, double *pFPR) __attribute__((noinline));
-void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
+void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
void * pRegisterReturn, typelib_TypeDescription *pReturnTypeDescr, bool bRegisterReturn,
sal_uInt32 *pStack, sal_uInt32 nStack, sal_uInt32 *pGPR, double *pFPR)
{
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx
index ebe07d4119b2..cb6ed0a33db2 100644
--- a/bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -57,7 +57,7 @@ namespace
static typelib_TypeClass cpp2uno_call(
bridges::cpp_uno::shared::CppInterfaceProxy* pThis,
const typelib_TypeDescription * pMemberTypeDescr,
- typelib_TypeDescriptionReference * pReturnTypeRef,
+ typelib_TypeDescriptionReference * pReturnTypeRef,
sal_Int32 nParams, typelib_MethodParameter * pParams,
long r8, void ** gpreg, double *fpreg, void ** ovrflw,
sal_Int64 * pRegisterReturn /* space for register return */ )
@@ -72,7 +72,7 @@ namespace
typelib_TypeDescription * pReturnTypeDescr = 0;
if (pReturnTypeRef)
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
+
void * pUnoReturn = 0;
// complex return ptr: if != 0 && != pUnoReturn, reconversion need
void * pCppReturn = 0;
@@ -112,9 +112,9 @@ namespace
// cpp<=>uno)
sal_Int32 * pTempIndizes = (sal_Int32 *)(pUnoArgs + (2 * nParams));
// type descriptions for reconversions
- typelib_TypeDescription ** ppTempParamTypeDescr =
+ typelib_TypeDescription ** ppTempParamTypeDescr =
(typelib_TypeDescription **)(pUnoArgs + (3 * nParams));
-
+
sal_Int32 nTempIndizes = 0;
bool bOverFlowUsed = false;
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
@@ -275,7 +275,7 @@ namespace
else if (bridges::cpp_uno::shared::relatesToInterfaceType(
pParamTypeDescr ))
{
- uno_copyAndConvertData( pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize ),
+ uno_copyAndConvertData( pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize ),
pCppStack, pParamTypeDescr,
pThis->getBridge()->getCpp2Uno() );
pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
@@ -313,16 +313,16 @@ namespace
for ( ; nTempIndizes--; )
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
-
+
if (pParams[nIndex].bIn) // is in/inout => was constructed
- uno_destructData( pUnoArgs[nIndex],
+ uno_destructData( pUnoArgs[nIndex],
ppTempParamTypeDescr[nTempIndizes], 0 );
TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
}
if (pReturnTypeDescr)
TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
-
- CPPU_CURRENT_NAMESPACE::raiseException( &aUnoExc,
+
+ CPPU_CURRENT_NAMESPACE::raiseException( &aUnoExc,
pThis->getBridge()->getUno2Cpp() ); // has to destruct the any
// is here for dummy
return typelib_TypeClass_VOID;
@@ -335,18 +335,18 @@ namespace
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],
+ 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
@@ -421,10 +421,10 @@ namespace
pThis = static_cast< char * >(pThis) - nVtableOffset;
- bridges::cpp_uno::shared::CppInterfaceProxy * pCppI =
+ bridges::cpp_uno::shared::CppInterfaceProxy * pCppI =
bridges::cpp_uno::shared::CppInterfaceProxy::castInterfaceToProxy(
pThis);
-
+
typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex,
@@ -469,7 +469,7 @@ namespace
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
aParam.bIn = sal_True;
aParam.bOut = sal_False;
-
+
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -503,7 +503,7 @@ namespace
pCppI->getBridge()->getCppEnv(),
(void **)&pInterface, pCppI->getOid().pData,
(typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -617,7 +617,7 @@ namespace
# define L21(v) unldil(((unsigned long)(v) >> 11) & 0x1fffff) //Left 21 bits
# define R11(v) (((unsigned long)(v) & 0x7FF) << 1) //Right 11 bits
- unsigned char *codeSnippet(unsigned char* code, sal_Int32 functionIndex,
+ unsigned char *codeSnippet(unsigned char* code, sal_Int32 functionIndex,
sal_Int32 vtableOffset, bool bHasHiddenParam)
{
if (bHasHiddenParam)
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx b/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
index 36fe7968e19a..a49edffc61c1 100644
--- a/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx b/bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx
index 895acf6b1883..f4ce93771bf7 100644
--- a/bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -49,25 +49,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
@@ -92,7 +92,7 @@ void fillUnoException(
}
-namespace hppa
+namespace hppa
{
enum hppalimits { MAX_WORDS_IN_REGS = 4, MAX_GPR_REGS = 4, MAX_SSE_REGS = 4 };
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_hppa/uno2cpp.cxx
index 6d7a5333f1e1..377d8fd27cfd 100644
--- a/bridges/source/cpp_uno/gcc3_linux_hppa/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -46,7 +46,7 @@
using namespace ::rtl;
using namespace ::com::sun::star::uno;
-void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
+void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
void * pRegisterReturn, typelib_TypeDescription *pReturnTypeDescr, bool bRegisterReturn,
sal_uInt32 *pStack, sal_uInt32 nStack, sal_uInt32 *pGPR, double *pFPR);
@@ -139,7 +139,7 @@ namespace hppa
{
if (p->ppTypeRefs[i]->eTypeClass == typelib_TypeClass_STRUCT ||
p->ppTypeRefs[i]->eTypeClass == typelib_TypeClass_EXCEPTION)
- {
+ {
typelib_TypeDescription * t = 0;
TYPELIB_DANGER_GET(&t, p->ppTypeRefs[i]);
bool b = is_complex_struct(t);
@@ -177,7 +177,7 @@ namespace hppa
namespace {
-//=======================================================================
+//=======================================================================
static void cpp_call(
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
bridges::cpp_uno::shared::VtableSlot aVtableSlot,
@@ -198,7 +198,7 @@ static void cpp_call(
typelib_TypeDescription * pReturnTypeDescr = 0;
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
-
+
void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
bool bOverFlow = false;
bool bRegisterReturn = true;
@@ -243,7 +243,7 @@ static void cpp_call(
{
uno_copyAndConvertData( pCppArgs[nPos] = alloca(8), pUnoArgs[nPos],
pParamTypeDescr, pThis->getBridge()->getUno2Cpp() );
-
+
switch (pParamTypeDescr->eTypeClass)
{
case typelib_TypeClass_HYPER:
@@ -300,7 +300,7 @@ static void cpp_call(
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;
@@ -320,7 +320,7 @@ static void cpp_call(
callVirtualMethod(
pAdjustedThisPtr, aVtableSlot.index,
pCppReturn, pReturnTypeDescr, bRegisterReturn,
- pStackStart,
+ pStackStart,
(pStack - pStackStart), pGPR, pFPR);
// NO exception occured...
@@ -331,7 +331,7 @@ static void cpp_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bIn)
{
if (pParams[nIndex].bOut) // inout
@@ -348,7 +348,7 @@ static void cpp_call(
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -372,7 +372,7 @@ static void cpp_call(
uno_destructData( pCppArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], cpp_release );
TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
}
-
+
// return type
if (pReturnTypeDescr)
TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
@@ -402,12 +402,12 @@ void unoInterfaceProxyDispatch(
sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
#endif
-
+
VtableSlot aVtableSlot(
getVtableSlot(
reinterpret_cast<typelib_InterfaceAttributeTypeDescription const *>
(pMemberDescr)));
-
+
if (pReturn)
{
// dependent dispatch
@@ -430,7 +430,7 @@ void unoInterfaceProxyDispatch(
OUString aVoidName( RTL_CONSTASCII_USTRINGPARAM("void") );
typelib_typedescriptionreference_new(
&pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
-
+
// dependent dispatch
aVtableSlot.index += 1;
cpp_call(
@@ -438,10 +438,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -478,7 +478,7 @@ void unoInterfaceProxyDispatch(
(*pThis->getBridge()->getUnoEnv()->getRegisteredInterface)(
pThis->getBridge()->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -509,7 +509,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx
index 5a25c25c1ed8..dcd589b64bb0 100644
--- a/bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -52,7 +52,7 @@ 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, long r8,
+ sal_Int32 nParams, typelib_MethodParameter * pParams, long r8,
void ** gpreg, void ** fpreg, void ** ovrflw,
sal_Int64 * pRegisterReturn /* space for register return */ )
{
@@ -60,9 +60,9 @@ static typelib_TypeClass cpp2uno_call(
fprintf(stderr, "as far as cpp2uno_call\n");
#endif
- int ng = 0; //number of gpr registers used
+ int ng = 0; //number of gpr registers used
int nf = 0; //number of fpr regsiters used
-
+
// gpreg: [ret *], this, [gpr params]
// fpreg: [fpr params]
// ovrflw: [gpr or fpr params (properly aligned)]
@@ -71,10 +71,10 @@ static typelib_TypeClass cpp2uno_call(
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 ( ia64::return_in_hidden_param( pReturnTypeRef ) ) // complex return via ptr passed as hidden parameter reg (pCppReturn)
@@ -82,15 +82,15 @@ static typelib_TypeClass cpp2uno_call(
pCppReturn = *(void **)gpreg;
gpreg++;
ng++;
-
+
pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize )
: pCppReturn); // direct way
}
- else if ( ia64::return_via_r8_buffer( pReturnTypeRef ) ) // complex return via ptr passed in r8
+ else if ( ia64::return_via_r8_buffer( pReturnTypeRef ) ) // complex return via ptr passed in r8
{
pCppReturn = (void *)r8;
-
+
pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize )
: pCppReturn); // direct way
@@ -100,7 +100,7 @@ static typelib_TypeClass cpp2uno_call(
pUnoReturn = pRegisterReturn; // direct way for simple types
}
// pop this
- gpreg++;
+ gpreg++;
ng++;
// stack space
@@ -112,7 +112,7 @@ static typelib_TypeClass cpp2uno_call(
sal_Int32 * pTempIndizes = (sal_Int32 *)(pUnoArgs + (2 * nParams));
// type descriptions for reconversions
typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pUnoArgs + (3 * nParams));
-
+
sal_Int32 nTempIndizes = 0;
bool bOverFlowUsed = false;
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
@@ -126,7 +126,7 @@ static typelib_TypeClass cpp2uno_call(
#endif
//I think it is impossible to get UNO to pass structs as parameters by copy
- if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
+ if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
#ifdef CMC_DEBUG
fprintf(stderr, "simple\n");
@@ -175,7 +175,7 @@ static typelib_TypeClass cpp2uno_call(
case typelib_TypeClass_LONG:
case typelib_TypeClass_UNSIGNED_LONG:
default:
- if (ng < ia64::MAX_GPR_REGS)
+ if (ng < ia64::MAX_GPR_REGS)
{
pCppArgs[nPos] = pUnoArgs[nPos] = gpreg++;
ng++;
@@ -200,7 +200,7 @@ static typelib_TypeClass cpp2uno_call(
void *pCppStack; //temporary stack pointer
if (ng < ia64::MAX_GPR_REGS)
- {
+ {
pCppArgs[nPos] = pCppStack = *gpreg++;
ng++;
}
@@ -241,14 +241,14 @@ static typelib_TypeClass cpp2uno_call(
#ifdef CMC_DEBUG
fprintf(stderr, "end of params\n");
#endif
-
+
// 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)
{
@@ -256,15 +256,15 @@ static typelib_TypeClass cpp2uno_call(
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() );
+
+ CPPU_CURRENT_NAMESPACE::raiseException( &aUnoExc, pThis->getBridge()->getUno2Cpp() );
// has to destruct the any
// is here for dummy
return typelib_TypeClass_VOID;
@@ -276,7 +276,7 @@ static typelib_TypeClass cpp2uno_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bOut) // inout/out
{
// convert and assign
@@ -286,7 +286,7 @@ static typelib_TypeClass cpp2uno_call(
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return
@@ -317,7 +317,7 @@ static typelib_TypeClass cpp2uno_call(
//==================================================================================================
static typelib_TypeClass cpp_mediate(
sal_uInt64 nOffsetAndIndex,
- void ** gpreg, void ** fpreg, long sp, long r8,
+ void ** gpreg, void ** fpreg, long sp, long r8,
sal_Int64 * pRegisterReturn /* space for register return */ )
{
OSL_ENSURE( sizeof(sal_Int64)==sizeof(void *), "### unexpected!" );
@@ -326,7 +326,7 @@ static typelib_TypeClass cpp_mediate(
sal_Int32 nFunctionIndex = (nOffsetAndIndex & 0xFFFFFFFF);
void ** ovrflw = (void**)(sp);
-
+
// gpreg: [ret *], this, [other gpr params]
// fpreg: [fpr params]
// ovrflw: [gpr or fpr params (properly aligned)]
@@ -351,7 +351,7 @@ static typelib_TypeClass cpp_mediate(
#ifdef CMC_DEBUG
fprintf(stderr, "pThis is %p\n", pThis);
#endif
-
+
pThis = static_cast< char * >(pThis) - nVtableOffset;
#ifdef CMC_DEBUG
@@ -367,7 +367,7 @@ static typelib_TypeClass cpp_mediate(
#ifdef CMC_DEBUG
fprintf(stderr, "indexes are %d %d\n", nFunctionIndex, pTypeDescr->nMapFunctionIndexToMemberIndex);
#endif
-
+
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
@@ -375,7 +375,7 @@ static typelib_TypeClass cpp_mediate(
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!" );
@@ -406,9 +406,9 @@ static typelib_TypeClass cpp_mediate(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -439,9 +439,9 @@ static typelib_TypeClass cpp_mediate(
XInterface * pInterface = 0;
(*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
pCppI->getBridge()->getCppEnv(),
- (void **)&pInterface, pCppI->getOid().pData,
+ (void **)&pInterface, pCppI->getOid().pData,
(typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -573,7 +573,7 @@ namespace
{
const int codeSnippetSize = 40;
-bridges::cpp_uno::shared::VtableFactory::Slot codeSnippet( unsigned char * code, sal_PtrDiff writetoexecdiff, sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
+bridges::cpp_uno::shared::VtableFactory::Slot codeSnippet( unsigned char * code, sal_PtrDiff writetoexecdiff, sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
bool bHasHiddenParam )
{
#ifdef CMC_DEBUG
diff --git a/bridges/source/cpp_uno/gcc3_linux_ia64/except.cxx b/bridges/source/cpp_uno/gcc3_linux_ia64/except.cxx
index c0de95532515..ea6961092f1a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_ia64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_ia64/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/gcc3_linux_ia64/share.hxx b/bridges/source/cpp_uno/gcc3_linux_ia64/share.hxx
index 359c9c720212..aabc2359bcb4 100644
--- a/bridges/source/cpp_uno/gcc3_linux_ia64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_ia64/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -50,25 +50,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
diff --git a/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx
index 2be69d85ba90..8e1d706a8f42 100644
--- a/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -88,7 +88,7 @@ void MapReturn(const ia64::RegReturn &rRet, double dret, typelib_TypeDescription
}
namespace ia64
-{
+{
bool is_complex_struct(const typelib_TypeDescription * type)
{
const typelib_CompoundTypeDescription * p
@@ -97,7 +97,7 @@ namespace ia64
{
if (p->ppTypeRefs[i]->eTypeClass == typelib_TypeClass_STRUCT ||
p->ppTypeRefs[i]->eTypeClass == typelib_TypeClass_EXCEPTION)
- {
+ {
typelib_TypeDescription * t = 0;
TYPELIB_DANGER_GET(&t, p->ppTypeRefs[i]);
bool b = is_complex_struct(t);
@@ -161,7 +161,7 @@ namespace ia64
namespace
{
//==================================================================================================
-static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
+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,
@@ -184,7 +184,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
for ( unsigned int i = 0; i < nGPR; ++i )
fprintf( stderr, "0x%lx, ", pGPR[i] );
fprintf( stderr, "\nFPR's (%d): ", nFPR );
- for ( unsigned int i = 0; i < nFPR; ++i )
+ for ( unsigned int i = 0; i < nFPR; ++i )
fprintf( stderr, "0x%lx (%f), ", pFPR[i], pFPR[i] );
fprintf( stderr, "\nStack (%d): ", nStack );
for ( unsigned int i = 0; i < nStack; ++i )
@@ -243,7 +243,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
register long r10 asm("r10"); ret.r10 = r10;
register long r11 asm("r11"); ret.r11 = r11;
}
-
+
MapReturn(ret, f8, pReturnTypeDescr, bSimpleReturn, (sal_uInt64*)pRegisterReturn);
}
@@ -307,7 +307,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
if (bOverFlow) \
*pDS++ = *reinterpret_cast<sal_uInt8 *>( pSV );
-//==================================================================================================
+//==================================================================================================
static void cpp_call(
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
bridges::cpp_uno::shared::VtableSlot aVtableSlot,
@@ -324,12 +324,12 @@ static void cpp_call(
double pFPR[ia64::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
bool bOverFlow = false;
@@ -370,19 +370,19 @@ static void cpp_call(
#endif
INSERT_INT64( &pAdjustedThisPtr, nGPR, pGPR, pStack, bOverFlow );
- // Args
+ // 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;
#ifdef CMC_DEBUG
fprintf(stderr, "n params is %d\n", nParams);
#endif
-
+
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
{
const typelib_MethodParameter & rParam = pParams[nPos];
@@ -393,10 +393,10 @@ static void cpp_call(
fprintf(stderr, "param %d is %d %d %d\n", nPos, rParam.bOut, bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ),
pParamTypeDescr->eTypeClass);
#endif
-
+
if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
-// uno_copyAndConvertData( pCppArgs[nPos] = alloca( 8 ), pUnoArgs[nPos], pParamTypeDescr,
+// uno_copyAndConvertData( pCppArgs[nPos] = alloca( 8 ), pUnoArgs[nPos], pParamTypeDescr,
uno_copyAndConvertData( pCppArgs[nPos] = pStack, pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
switch (pParamTypeDescr->eTypeClass)
@@ -450,7 +450,7 @@ static void cpp_call(
// no longer needed
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
-
+
}
else // ptr to complex value | ref
{
@@ -465,7 +465,7 @@ static void cpp_call(
// cpp out is constructed mem, uno out is not!
uno_constructData(
pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- pParamTypeDescr );
+ pParamTypeDescr );
pTempIndizes[nTempIndizes] = nPos; // default constructed for cpp call
// will be released at reconversion
ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
@@ -496,12 +496,12 @@ static void cpp_call(
INSERT_INT64( &(pCppArgs[nPos]), nGPR, pGPR, pStack, bOverFlow );
}
}
-
+
try
{
callVirtualMethod(
pAdjustedThisPtr, aVtableSlot.index,
- pCppReturn, pReturnTypeDescr, bSimpleReturn,
+ pCppReturn, pReturnTypeDescr, bSimpleReturn,
pStackStart, ( pStack - pStackStart ),
pGPR, nGPR,
pFPR, nFPR );
@@ -513,7 +513,7 @@ static void cpp_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bIn)
{
if (pParams[nIndex].bOut) // inout
@@ -530,7 +530,7 @@ static void cpp_call(
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -544,9 +544,9 @@ static void cpp_call(
catch (...)
{
// fill uno exception
- fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
+ fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
*ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
+
// temporary params
for ( ; nTempIndizes--; )
{
@@ -570,9 +570,9 @@ void unoInterfaceProxyDispatch(
void * pReturn, void * pArgs[], uno_Any ** ppException )
{
// is my surrogate
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
+ bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
= static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy *> (pUnoI);
-
+
switch (pMemberDescr->eTypeClass)
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -599,14 +599,14 @@ void unoInterfaceProxyDispatch(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ 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(
@@ -614,10 +614,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -649,7 +649,7 @@ void unoInterfaceProxyDispatch(
(*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
pThis->pBridge->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -679,7 +679,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
index ccc31f10a407..355928ac8721 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -62,10 +62,10 @@ void cpp2uno_call(
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::isSimpleReturnType( pReturnTypeDescr ))
@@ -76,7 +76,7 @@ void cpp2uno_call(
{
pCppReturn = *(void **)pCppStack;
pCppStack += sizeof(void *);
-
+
pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType(
pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize )
@@ -95,9 +95,9 @@ void cpp2uno_call(
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];
@@ -155,7 +155,7 @@ void cpp2uno_call(
}
pCppStack += sizeof(sal_Int32); // standard parameter length
}
-
+
// ExceptionHolder
uno_Any aUnoExc; // Any will be constructed by callee
uno_Any * pUnoExc = &aUnoExc;
@@ -163,7 +163,7 @@ void cpp2uno_call(
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
-
+
// in case an exception occured...
if (pUnoExc)
{
@@ -171,14 +171,14 @@ void cpp2uno_call(
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
@@ -190,7 +190,7 @@ void cpp2uno_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bOut) // inout/out
{
// convert and assign
@@ -200,7 +200,7 @@ void cpp2uno_call(
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return
@@ -230,7 +230,7 @@ extern "C" void cpp_vtable_call(
void * pReturnValue )
{
OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
-
+
// pCallStack: ret adr, [ret *], this, params
void * pThis;
if( nFunctionIndex & 0x80000000 )
@@ -246,9 +246,9 @@ extern "C" void cpp_vtable_call(
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)
{
@@ -256,13 +256,13 @@ extern "C" void cpp_vtable_call(
rtl::OUString::createFromAscii("illegal vtable index!"),
(XInterface *)pThis );
}
-
+
// determine called method
sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member index!" );
TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
-
+
switch (aMemberDescr.get()->eTypeClass)
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -282,9 +282,9 @@ extern "C" void cpp_vtable_call(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -315,7 +315,7 @@ extern "C" void cpp_vtable_call(
pCppI->getBridge()->getCppEnv(),
(void **)&pInterface, pCppI->getOid().pData,
(typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
index a4caa5047aba..d6f3ec11f8ec 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx b/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx
index 8a3e136bfb7b..f7dc2f956896 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -48,25 +48,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
index 777d4b553db3..57e59d312560 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -77,11 +77,11 @@ void callVirtualMethod(
{
// parameter list is mixed list of * and values
// reference parameters are pointers
-
+
OSL_ENSURE( pStackLongs && pAdjustedThisPtr, "### null ptr!" );
OSL_ENSURE( (sizeof(void *) == 4) && (sizeof(sal_Int32) == 4), "### unexpected size of int!" );
OSL_ENSURE( nStackLongs && pStackLongs, "### no stack in callVirtualMethod !" );
-
+
// never called
if (! pAdjustedThisPtr) CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something
@@ -169,7 +169,7 @@ void callVirtualMethod(
}
}
-//==================================================================================================
+//==================================================================================================
static void cpp_call(
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
bridges::cpp_uno::shared::VtableSlot aVtableSlot,
@@ -178,18 +178,18 @@ static void cpp_call(
void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
{
// max space for: [complex ret ptr], values|ptr ...
- char * pCppStack =
+ char * pCppStack =
(char *)alloca( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
- char * pCppStackStart = pCppStack;
-
+ char * pCppStackStart = pCppStack;
+
// return
typelib_TypeDescription * pReturnTypeDescr = 0;
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
-
+
void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
bool bSimpleReturn = true;
-
+
if (pReturnTypeDescr)
{
bSimpleReturn = x86::isSimpleReturnType(pReturnTypeDescr);
@@ -222,21 +222,21 @@ static void cpp_call(
sal_Int32 * pTempIndizes = (sal_Int32 *)(pCppArgs + nParams);
// type descriptions for reconversions
typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
-
+
sal_Int32 nTempIndizes = 0;
-
+
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
{
const typelib_MethodParameter & rParam = pParams[nPos];
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
+
if (!rParam.bOut
&& bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
uno_copyAndConvertData( pCppArgs[nPos] = pCppStack, pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
switch (pParamTypeDescr->eTypeClass)
{
case typelib_TypeClass_HYPER:
@@ -270,7 +270,7 @@ static void cpp_call(
*(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
// will be released at reconversion
ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
@@ -294,13 +294,13 @@ static void cpp_call(
(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
// NO exception occured...
*ppUnoExc = 0;
-
+
// reconvert temporary params
for ( ; nTempIndizes--; )
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bIn)
{
if (pParams[nIndex].bOut) // inout
@@ -317,7 +317,7 @@ static void cpp_call(
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -332,7 +332,7 @@ static void cpp_call(
{
// fill uno exception
fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
+
// temporary params
for ( ; nTempIndizes--; )
{
@@ -390,7 +390,7 @@ void unoInterfaceProxyDispatch(
// is my surrogate
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
= static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI);
-
+
switch (pMemberDescr->eTypeClass)
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -415,14 +415,14 @@ void unoInterfaceProxyDispatch(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ 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(
@@ -430,10 +430,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -464,7 +464,7 @@ void unoInterfaceProxyDispatch(
(*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
pThis->pBridge->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -494,7 +494,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx
index 53542e23f97d..7673ad98f268 100644
--- a/bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -57,7 +57,7 @@ namespace
static typelib_TypeClass cpp2uno_call(
bridges::cpp_uno::shared::CppInterfaceProxy* pThis,
const typelib_TypeDescription * pMemberTypeDescr,
- typelib_TypeDescriptionReference * pReturnTypeRef,
+ typelib_TypeDescriptionReference * pReturnTypeRef,
sal_Int32 nParams, typelib_MethodParameter * pParams,
long r8, void ** pCallStack,
sal_Int64 * pRegisterReturn /* space for register return */ )
@@ -72,11 +72,11 @@ namespace
typelib_TypeDescription * pReturnTypeDescr = 0;
if (pReturnTypeRef)
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
+
void * pUnoReturn = 0;
// complex return ptr: if != 0 && != pUnoReturn, reconversion need
void * pCppReturn = 0;
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -111,9 +111,9 @@ namespace
// cpp<=>uno)
sal_Int32 * pTempIndizes = (sal_Int32 *)(pUnoArgs + (2 * nParams));
// type descriptions for reconversions
- typelib_TypeDescription ** ppTempParamTypeDescr =
+ typelib_TypeDescription ** ppTempParamTypeDescr =
(typelib_TypeDescription **)(pUnoArgs + (3 * nParams));
-
+
sal_Int32 nTempIndizes = 0;
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
@@ -122,8 +122,8 @@ namespace
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
- if (!rParam.bOut &&
- bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
+ if (!rParam.bOut &&
+ bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
switch (pParamTypeDescr->eTypeClass)
{
@@ -169,7 +169,7 @@ namespace
else if (bridges::cpp_uno::shared::relatesToInterfaceType(
pParamTypeDescr ))
{
- uno_copyAndConvertData( pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize ),
+ uno_copyAndConvertData( pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize ),
*(void **)pCppStack, pParamTypeDescr,
pThis->getBridge()->getCpp2Uno() );
pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
@@ -208,16 +208,16 @@ namespace
for ( ; nTempIndizes--; )
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
-
+
if (pParams[nIndex].bIn) // is in/inout => was constructed
- uno_destructData( pUnoArgs[nIndex],
+ uno_destructData( pUnoArgs[nIndex],
ppTempParamTypeDescr[nTempIndizes], 0 );
TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
}
if (pReturnTypeDescr)
TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
-
- CPPU_CURRENT_NAMESPACE::raiseException( &aUnoExc,
+
+ CPPU_CURRENT_NAMESPACE::raiseException( &aUnoExc,
pThis->getBridge()->getUno2Cpp() ); // has to destruct the any
// is here for dummy
return typelib_TypeClass_VOID;
@@ -230,18 +230,18 @@ namespace
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],
+ 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
@@ -254,7 +254,7 @@ namespace
// destroy temp uno return
uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
}
- // complex return ptr is set to return reg
+ // complex return ptr is set to return reg
*(void **)pRegisterReturn = pCppReturn;
}
if (pReturnTypeDescr)
@@ -289,10 +289,10 @@ namespace
pThis = static_cast< char * >(pThis) - nVtableOffset;
- bridges::cpp_uno::shared::CppInterfaceProxy * pCppI =
+ bridges::cpp_uno::shared::CppInterfaceProxy * pCppI =
bridges::cpp_uno::shared::CppInterfaceProxy::castInterfaceToProxy(
pThis);
-
+
typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex,
@@ -337,7 +337,7 @@ namespace
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
aParam.bIn = sal_True;
aParam.bOut = sal_False;
-
+
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -371,7 +371,7 @@ namespace
pCppI->getBridge()->getCppEnv(),
(void **)&pInterface, pCppI->getOid().pData,
(typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -440,17 +440,17 @@ namespace
//some m68k info : http://www2.biglobe.ne.jp/~inaba/trampolines.html
- unsigned char *codeSnippet(unsigned char* code, sal_Int32 functionIndex,
+ unsigned char *codeSnippet(unsigned char* code, sal_Int32 functionIndex,
sal_Int32 vtableOffset)
{
unsigned char * p = code;
- *(short *)&p[0] = 0x203C; //movel functionIndex,d0
+ *(short *)&p[0] = 0x203C; //movel functionIndex,d0
*(long *)&p[2] = functionIndex;
- *(short *)&p[6] = 0x223C; //movel functionIndex,d1
+ *(short *)&p[6] = 0x223C; //movel functionIndex,d1
*(long *)&p[8] = vtableOffset;
- *(short *)&p[12] = 0x4EF9; //jmp cpp_vtable_call
+ *(short *)&p[12] = 0x4EF9; //jmp cpp_vtable_call
*(long *)&p[14] = (long)&cpp_vtable_call;
- *(short *)&p[18] = 0x4E71; //nop
+ *(short *)&p[18] = 0x4E71; //nop
return code + codeSnippetSize;
}
}
@@ -510,7 +510,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
{
(s++)->fn = code + writetoexecdiff;
- typelib_InterfaceMethodTypeDescription *pMethodTD =
+ typelib_InterfaceMethodTypeDescription *pMethodTD =
reinterpret_cast<
typelib_InterfaceMethodTypeDescription * >(member);
diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx b/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx
index 36fe7968e19a..a49edffc61c1 100644
--- a/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/share.hxx b/bridges/source/cpp_uno/gcc3_linux_m68k/share.hxx
index 4ec09c29ff0a..aa802babac96 100644
--- a/bridges/source/cpp_uno/gcc3_linux_m68k/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_m68k/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -49,25 +49,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx
index 97a9ab0187d9..9ea27cfb05fc 100644
--- a/bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -159,7 +159,7 @@ void callVirtualMethod(
*pDS++ = *reinterpret_cast<sal_uInt8 *>( pSV );
namespace {
-//=======================================================================
+//=======================================================================
static void cpp_call(
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
bridges::cpp_uno::shared::VtableSlot aVtableSlot,
@@ -177,7 +177,7 @@ static void cpp_call(
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)
@@ -212,7 +212,7 @@ static void cpp_call(
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];
@@ -224,7 +224,7 @@ static void cpp_call(
// uno_copyAndConvertData( pCppArgs[nPos] = pStack, pUnoArgs[nPos],
uno_copyAndConvertData( pCppArgs[nPos] = alloca(8), pUnoArgs[nPos],
pParamTypeDescr, pThis->getBridge()->getUno2Cpp() );
-
+
switch (pParamTypeDescr->eTypeClass)
{
case typelib_TypeClass_HYPER:
@@ -279,7 +279,7 @@ static void cpp_call(
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;
@@ -299,7 +299,7 @@ static void cpp_call(
callVirtualMethod(
pAdjustedThisPtr, aVtableSlot.index,
pCppReturn, pReturnTypeDescr->eTypeClass,
- pStackStart,
+ pStackStart,
(pStack - pStackStart));
// NO exception occured...
@@ -310,7 +310,7 @@ static void cpp_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bIn)
{
if (pParams[nIndex].bOut) // inout
@@ -327,7 +327,7 @@ static void cpp_call(
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -351,7 +351,7 @@ static void cpp_call(
uno_destructData( pCppArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], cpp_release );
TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
}
-
+
// return type
if (pReturnTypeDescr)
TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
@@ -377,12 +377,12 @@ void unoInterfaceProxyDispatch(
// 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
@@ -405,7 +405,7 @@ void unoInterfaceProxyDispatch(
OUString aVoidName( RTL_CONSTASCII_USTRINGPARAM("void") );
typelib_typedescriptionreference_new(
&pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
-
+
// dependent dispatch
aVtableSlot.index += 1;
cpp_call(
@@ -413,10 +413,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -451,7 +451,7 @@ void unoInterfaceProxyDispatch(
(*pThis->getBridge()->getUnoEnv()->getRegisteredInterface)(
pThis->getBridge()->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -481,7 +481,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx
index b6fd1d461cfd..5b49ac892005 100644
--- a/bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -87,9 +87,9 @@ namespace
#endif
/* C++ has [ret *] or this as the first arguments, so no arguments will
- * be passed in floating-point registers?
+ * be passed in floating-point registers?
*/
- //int int_seen = 0; // have we seen integer arguments?
+ //int int_seen = 0; // have we seen integer arguments?
void ** pCppStack; //temporary stack pointer
@@ -130,7 +130,7 @@ namespace
}
// pop this
- gpreg++;
+ gpreg++;
nw++;
// stack space
@@ -155,7 +155,7 @@ namespace
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
- if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
+ if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
// value
{
@@ -171,7 +171,7 @@ namespace
if (nw & 1) {
nw++;
gpreg++;
- }
+ }
#ifdef BRDEBUG
fprintf(stderr,"cpp2uno_call:gpreg=%p,%p\n",gpreg[0],gpreg[1]);
#endif
@@ -253,7 +253,7 @@ namespace
#ifdef BRDEBUG
fprintf(stderr,"cpp2uno_call:ptr|ref\n");
#endif
- if (nw < 4) {
+ if (nw < 4) {
pCppArgs[nPos] = *(void **)gpreg;
pCppStack = gpreg;
nw++;
@@ -328,7 +328,7 @@ namespace
if (pReturnTypeDescr)
TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
- CPPU_CURRENT_NAMESPACE::raiseException( &aUnoExc, pThis->getBridge()->getUno2Cpp() );
+ CPPU_CURRENT_NAMESPACE::raiseException( &aUnoExc, pThis->getBridge()->getUno2Cpp() );
// has to destruct the any
// is here for dummy
return typelib_TypeClass_VOID;
@@ -465,8 +465,8 @@ namespace
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
@@ -507,7 +507,7 @@ namespace
XInterface * pInterface = 0;
(*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
pCppI->getBridge()->getCppEnv(),
- (void **)&pInterface, pCppI->getOid().pData,
+ (void **)&pInterface, pCppI->getOid().pData,
(typelib_InterfaceTypeDescription *)pTD );
if (pInterface)
@@ -579,15 +579,15 @@ namespace
memcpy( gpreg, pCallStack, 16);
-#ifdef BRDEBUG
- fprintf(stderr,"in cpp_vtable_call nFunctionIndex is %d\n",nFunctionIndex);
+#ifdef BRDEBUG
+ fprintf(stderr,"in cpp_vtable_call nFunctionIndex is %d\n",nFunctionIndex);
fprintf(stderr,"in cpp_vtable_call nVtableOffset is %d\n",vTableOffset);
fprintf(stderr,"gp=%x,%x,%x,%x\n",gpreg[0],gpreg[1],gpreg[2],gpreg[3]);
#endif
//sal_Bool bComplex = nFunctionIndex & 0x80000000 ? sal_True : sal_False;
- typelib_TypeClass aType =
+ typelib_TypeClass aType =
cpp_mediate( nFunctionIndex, vTableOffset, (void**)gpreg, (void**)fpreg, ovrflw, (sal_Int64*)nRegReturn );
switch( aType )
@@ -639,7 +639,7 @@ namespace
int const codeSnippetSize = 56;
- unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal_Int32 vtableOffset,
+ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal_Int32 vtableOffset,
bool simpleRetType)
{
@@ -683,7 +683,7 @@ namespace
40: 00000000 nop
be careful, we use the argument space reserved by the caller to
- write down regs. This can avoid the need to make use of arbitary far away
+ write down regs. This can avoid the need to make use of arbitary far away
stack space or to allocate a function frame for this code snippet itself.
Since only functions with variable arguments will overwrite the space,
cpp_vtable_call should be safe.
diff --git a/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx b/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx
index 78d72c0c733b..d99977e00a08 100644
--- a/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -52,7 +52,7 @@ using namespace ::__cxxabiv1;
namespace CPPU_CURRENT_NAMESPACE
{
-
+
void dummy_can_throw_anything( char const * )
{
}
@@ -63,13 +63,13 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
#if defined BRIDGES_DEBUG
char const * start = p;
#endif
-
+
// example: N3com3sun4star4lang24IllegalArgumentExceptionE
-
+
OUStringBuffer buf( 64 );
OSL_ASSERT( 'N' == *p );
++p; // skip N
-
+
while ('E' != *p)
{
// read chars count
@@ -84,7 +84,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
if ('E' != *p)
buf.append( (sal_Unicode)'.' );
}
-
+
#if defined BRIDGES_DEBUG
OUString ret( buf.makeStringAndClear() );
OString c_ret( OUStringToOString( ret, RTL_TEXTENCODING_ASCII_US ) );
@@ -99,17 +99,17 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
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( () );
};
//__________________________________________________________________________________________________
@@ -127,9 +127,9 @@ RTTI::~RTTI() SAL_THROW( () )
type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THROW( () )
{
type_info * rtti;
-
+
OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName;
-
+
MutexGuard guard( m_mutex );
t_rtti_map::const_iterator iRttiFind( m_rttis.find( unoName ) );
if (iRttiFind == m_rttis.end())
@@ -147,7 +147,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
}
while (index >= 0);
buf.append( 'E' );
-
+
OString symName( buf.makeStringAndClear() );
rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
@@ -183,7 +183,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
// 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?!" );
@@ -198,7 +198,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
{
rtti = iRttiFind->second;
}
-
+
return rtti;
}
@@ -242,10 +242,10 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
*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
@@ -274,7 +274,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
Reference< XInterface >() );
}
}
-
+
__cxa_throw( pCppExc, rtti, deleteException );
}
@@ -294,7 +294,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
#endif
return;
}
-
+
typelib_TypeDescription * pExcTypeDescr = 0;
OUString unoName( toUNOname( header->exceptionType->name() ) );
#if defined BRIDGES_DEBUG
diff --git a/bridges/source/cpp_uno/gcc3_linux_mips/share.hxx b/bridges/source/cpp_uno/gcc3_linux_mips/share.hxx
index 4ec09c29ff0a..aa802babac96 100644
--- a/bridges/source/cpp_uno/gcc3_linux_mips/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_mips/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -49,25 +49,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
diff --git a/bridges/source/cpp_uno/gcc3_linux_mips/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_mips/uno2cpp.cxx
index 82d226f88ea6..ba139cd43f51 100644
--- a/bridges/source/cpp_uno/gcc3_linux_mips/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_mips/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -89,7 +89,7 @@ namespace
/* p = sp - 512; new sp will be p - 16, but we don't change sp
* at this time to avoid breaking ABI--not sure whether changing sp will break
- * references to local variables. For the same reason, we use abosulte value.
+ * references to local variables. For the same reason, we use abosulte value.
*/
__asm__ __volatile__ (
"addiu $2,$29,-512\n\t"
@@ -97,10 +97,10 @@ namespace
:"=r"(p): : "$2","$29" );
#ifdef BRDEBUG
- if (nStackLongs * 4 > 512 )
- fprintf(stderr,"too many arguments");
+ if (nStackLongs * 4 > 512 )
+ fprintf(stderr,"too many arguments");
#endif
-
+
// now begin to load the C++ function arguments into storage
nw = 0;
@@ -130,13 +130,13 @@ namespace
case 'D': /* type is double */
/* treat the same as long long */
case 'H': /* type is long long */
- if (nw & 1) nw++; /* note even elements gpr[] will map to
+ if (nw & 1) nw++; /* note even elements gpr[] will map to
odd registers*/
if (nw < 4) {
gpr[nw++] = *pStackLongs;
gpr[nw++] = *(pStackLongs+1);
} else {
- if (((long) p) & 4)
+ if (((long) p) & 4)
p++;
*p++ = *pStackLongs;
*p++ = *(pStackLongs+1);
@@ -175,12 +175,12 @@ namespace
}
/* figure out the address of the function we need to invoke */
- off = nVtableIndex;
+ off = nVtableIndex;
off = off * 4; // 4 bytes per slot
mfunc = *((unsigned long **)pAdjustedThisPtr); // get the address of the vtable
- mfunc = (unsigned long *)((char *)mfunc + off); // get the address from the vtable entry at offset
+ mfunc = (unsigned long *)((char *)mfunc + off); // get the address from the vtable entry at offset
mfunc = *((unsigned long **)mfunc); // the function is stored at the address
- ptr = (void (*)())mfunc;
+ ptr = (void (*)())mfunc;
#ifdef BRDEBUG
fprintf(stderr,"calling function %p\n",mfunc);
@@ -189,10 +189,10 @@ namespace
/* Set up the machine registers and invoke the function */
__asm__ __volatile__ (
- "lw $4, 0(%0)\n\t"
- "lw $5, 4(%0)\n\t"
- "lw $6, 8(%0)\n\t"
- "lw $7, 12(%0)\n\t"
+ "lw $4, 0(%0)\n\t"
+ "lw $5, 4(%0)\n\t"
+ "lw $6, 8(%0)\n\t"
+ "lw $7, 12(%0)\n\t"
: : "r" (gpr)
: "$4", "$5", "$6", "$7"
);
@@ -208,13 +208,13 @@ namespace
"sw $3,%1 \n\t"
: "=m" (iret), "=m" (iret2) : );
register float fret asm("$f0");
- register double dret asm("$f0");
+ register double dret asm("$f0");
switch( eReturnType )
{
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
- ((long*)pRegisterReturn)[1] = iret2; // fall through
+ ((long*)pRegisterReturn)[1] = iret2; // fall through
case typelib_TypeClass_LONG:
case typelib_TypeClass_UNSIGNED_LONG:
case typelib_TypeClass_ENUM:
@@ -241,7 +241,7 @@ namespace
}
- //==================================================================================================
+ //==================================================================================================
static void cpp_call(
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
bridges::cpp_uno::shared::VtableSlot aVtableSlot,
@@ -250,9 +250,9 @@ namespace
void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
{
// max space for: [complex ret ptr], values|ptr ...
- char * pCppStack =
+ char * pCppStack =
(char *)alloca( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
- char * pCppStackStart = pCppStack;
+ char * pCppStackStart = pCppStack;
// need to know parameter types for callVirtualMethod so generate a signature string
char * pParamType = (char *) alloca(nParams+2);
@@ -278,7 +278,7 @@ namespace
else
{
// complex return via ptr
- pCppReturn = *(void **)pCppStack =
+ pCppReturn = *(void **)pCppStack =
(bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize ): pUnoReturn); // direct way
*pPT++ = 'I'; //signify that a complex return type on stack
@@ -376,7 +376,7 @@ namespace
{
uno_copyAndConvertData(
*(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- pUnoArgs[nPos], pParamTypeDescr,
+ pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
@@ -445,7 +445,7 @@ namespace
catch (...)
{
// fill uno exception
- fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
+ fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
*ppUnoExc, pThis->getBridge()->getCpp2Uno() );
// temporary params
@@ -507,8 +507,8 @@ void unoInterfaceProxyDispatch(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
typelib_TypeDescriptionReference * pReturnTypeRef = 0;
OUString aVoidName( RTL_CONSTASCII_USTRINGPARAM("void") );
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx
index 24354bfa45f8..282f40a66765 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -56,12 +56,12 @@ static typelib_TypeClass cpp2uno_call(
void ** gpreg, void ** fpreg, void ** ovrflw,
sal_Int64 * pRegisterReturn /* space for register return */ )
{
- int ng = 0; //number of gpr registers used
+ int ng = 0; //number of gpr registers used
#ifndef __NO_FPRS__
int nf = 0; //number of fpr regsiters used
#endif
void ** pCppStack; //temporary stack pointer
-
+
// gpreg: [ret *], this, [gpr params]
// fpreg: [fpr params]
// ovrflw: [gpr or fpr params (properly aligned)]
@@ -70,10 +70,10 @@ static typelib_TypeClass cpp2uno_call(
typelib_TypeDescription * pReturnTypeDescr = 0;
if (pReturnTypeRef)
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
+
void * pUnoReturn = 0;
void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -85,14 +85,14 @@ static typelib_TypeClass cpp2uno_call(
pCppReturn = *(void **)gpreg;
gpreg++;
ng++;
-
+
pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize )
: pCppReturn); // direct way
}
}
// pop this
- gpreg++;
+ gpreg++;
ng++;
// stack space
@@ -104,16 +104,16 @@ static typelib_TypeClass cpp2uno_call(
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 ))
+ if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
// value
{
@@ -185,7 +185,7 @@ static typelib_TypeClass cpp2uno_call(
if (ng & 1) {
ng++;
gpreg++;
- }
+ }
if (ng < 8) {
pCppArgs[nPos] = gpreg;
pUnoArgs[nPos] = gpreg;
@@ -250,7 +250,7 @@ static typelib_TypeClass cpp2uno_call(
else // ptr to complex value | ref
{
- if (ng < 8) {
+ if (ng < 8) {
pCppArgs[nPos] = *(void **)gpreg;
pCppStack = gpreg;
ng++;
@@ -287,14 +287,14 @@ static typelib_TypeClass cpp2uno_call(
}
}
}
-
+
// 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)
{
@@ -302,15 +302,15 @@ static typelib_TypeClass cpp2uno_call(
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() );
+
+ CPPU_CURRENT_NAMESPACE::raiseException( &aUnoExc, pThis->getBridge()->getUno2Cpp() );
// has to destruct the any
// is here for dummy
return typelib_TypeClass_VOID;
@@ -322,7 +322,7 @@ static typelib_TypeClass cpp2uno_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bOut) // inout/out
{
// convert and assign
@@ -332,7 +332,7 @@ static typelib_TypeClass cpp2uno_call(
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return
@@ -368,7 +368,7 @@ static typelib_TypeClass cpp_mediate(
sal_Int64 * 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 (properly aligned)]
@@ -383,14 +383,14 @@ static typelib_TypeClass cpp_mediate(
{
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)
{
@@ -398,13 +398,13 @@ static typelib_TypeClass cpp_mediate(
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)
{
@@ -425,9 +425,9 @@ static typelib_TypeClass cpp_mediate(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -458,9 +458,9 @@ static typelib_TypeClass cpp_mediate(
XInterface * pInterface = 0;
(*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
pCppI->getBridge()->getCppEnv(),
- (void **)&pInterface, pCppI->getOid().pData,
+ (void **)&pInterface, pCppI->getOid().pData,
(typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -519,15 +519,15 @@ static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpreg
// fprintf(stderr,"in cpp_vtable_call nVtableOffset is %x\n",nVtableOffset);
// fflush(stderr);
- typelib_TypeClass aType =
+ typelib_TypeClass aType =
cpp_mediate( nFunctionIndex, nVtableOffset, (void**)gpreg,
#ifndef __NO_FPRS__
- (void**)fpreg,
+ (void**)fpreg,
#else
NULL,
#endif
ovrflw, (sal_Int64*)nRegReturn );
-
+
switch( aType )
{
@@ -539,7 +539,7 @@ static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpreg
__asm__( "lbz 3,%0\n\t" : :
"m"(nRegReturn[0]) );
break;
-
+
case typelib_TypeClass_CHAR:
case typelib_TypeClass_SHORT:
case typelib_TypeClass_UNSIGNED_SHORT:
@@ -584,7 +584,7 @@ static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpreg
int const codeSnippetSize = 108;
-unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal_Int32 vtableOffset,
+unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal_Int32 vtableOffset,
bool simpleRetType)
{
@@ -596,59 +596,59 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal
functionIndex |= 0x80000000;
unsigned long * p = (unsigned long *) code;
-
+
// OSL_ASSERT( sizeof (long) == 4 );
OSL_ASSERT((((unsigned long)code) & 0x3) == 0 ); //aligned to 4 otherwise a mistake
/* generate this code */
// # so first save gpr 3 to gpr 10 (aligned to 4)
- // stw r3,-2048(r1)
- // stw r4,-2044(r1)
- // stw r5,-2040(r1)
- // stw r6,-2036(r1)
- // stw r7,-2032(r1)
- // stw r8,-2028(r1)
- // stw r9,-2024(r1)
- // stw r10,-2020(r1)
+ // stw r3,-2048(r1)
+ // stw r4,-2044(r1)
+ // stw r5,-2040(r1)
+ // stw r6,-2036(r1)
+ // stw r7,-2032(r1)
+ // stw r8,-2028(r1)
+ // stw r9,-2024(r1)
+ // stw r10,-2020(r1)
// # next save fpr 1 to fpr 8 (aligned to 8)
// if dedicated floating point registers are used
- // stfd f1,-2016(r1)
- // stfd f2,-2008(r1)
- // stfd f3,-2000(r1)
- // stfd f4,-1992(r1)
- // stfd f5,-1984(r1)
- // stfd f6,-1976(r1)
- // stfd f7,-1968(r1)
- // stfd f8,-1960(r1)
+ // stfd f1,-2016(r1)
+ // stfd f2,-2008(r1)
+ // stfd f3,-2000(r1)
+ // stfd f4,-1992(r1)
+ // stfd f5,-1984(r1)
+ // stfd f6,-1976(r1)
+ // stfd f7,-1968(r1)
+ // stfd f8,-1960(r1)
// # now here is where cpp_vtable_call must go
- // lis r3,-8531
- // ori r3,r3,48879
- // mtctr r3
+ // lis r3,-8531
+ // ori r3,r3,48879
+ // mtctr r3
// # now load up the functionIndex
- // lis r3,-8531
- // ori r3,r3,48879
+ // lis r3,-8531
+ // ori r3,r3,48879
- // # now load up the vtableOffset
- // lis r4,-8531
- // ori r4,r4,48879
+ // # now load up the vtableOffset
+ // lis r4,-8531
+ // ori r4,r4,48879
// #now load up the pointer to the saved gpr registers
- // addi r5,r1,-2048
+ // addi r5,r1,-2048
// #now load up the pointer to the saved fpr registers
- // addi r6,r1,-2016
+ // addi r6,r1,-2016
// if no dedicated floating point registers are used than we have NULL
// pointer there
// li r6, 0
//
// #now load up the pointer to the overflow call stack
- // addi r7,r1,8
- // bctr
+ // addi r7,r1,8
+ // bctr
* p++ = 0x9061f800;
* p++ = 0x9081f804;
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx
index c0de95532515..ea6961092f1a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/share.hxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/share.hxx
index 4ec09c29ff0a..aa802babac96 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -49,25 +49,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx
index 0ebc44895a78..0c0ad60c5e64 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -64,7 +64,7 @@ static void callVirtualMethod(
// reference parameters are pointers
// the basic idea here is to use gpr[8] as a storage area for
- // the future values of registers r3 to r10 needed for the call,
+ // the future values of registers r3 to r10 needed for the call,
// and similarly fpr[8] as a storage area for the future values
// of floating point registers f1 to f8
@@ -91,14 +91,14 @@ static void callVirtualMethod(
// Note: This keeps us from having to decode the signature twice and
// prevents problems with later local variables.
- // Note: could require up to 2*nStackLongs words of parameter stack area
- // if the call has many float parameters (i.e. floats take up only 1
+ // Note: could require up to 2*nStackLongs words of parameter stack area
+ // if the call has many float parameters (i.e. floats take up only 1
// word on the stack but double takes 2 words in parameter area in the
// stack frame .
// Update! floats on the outgoing parameter stack only take up 1 word
// (stfs is used) which is not correct according to the ABI but we
- // will match what the compiler does until this is figured out
+ // will match what the compiler does until this is figured out
// this grows the current stack to the appropriate size
// and sets the outgoing stack pointer p to the right place
@@ -156,7 +156,7 @@ static void callVirtualMethod(
gpr[n++] = *(pStackLongs+1);
#endif
} else {
- if (((long) p) & 4)
+ if (((long) p) & 4)
p++;
*p++ = *pStackLongs; /* or on the parameter stack */
*p++ = *(pStackLongs + 1);
@@ -169,7 +169,7 @@ static void callVirtualMethod(
stack and that if passed in parameter stack to C, should be
as double word.
- Whoops: the abi is not actually followed by gcc, need to
+ Whoops: the abi is not actually followed by gcc, need to
store floats as a *single* word on outgoing parameter stack
to match what gcc actually does
*/
@@ -182,7 +182,7 @@ static void callVirtualMethod(
#endif
} else {
#if 0 /* if abi were followed */
- if (((long) p) & 4)
+ if (((long) p) & 4)
p++;
*((double *)p) = *((float *)pStackLongs);
p += 2;
@@ -195,13 +195,13 @@ static void callVirtualMethod(
break;
case 'H': /* type is long long */
- if (n & 1) n++; /* note even elements gpr[] will map to
+ if (n & 1) n++; /* note even elements gpr[] will map to
odd registers*/
if (n <= 6) {
gpr[n++] = *pStackLongs;
gpr[n++] = *(pStackLongs+1);
} else {
- if (((long) p) & 4)
+ if (((long) p) & 4)
p++;
*p++ = *pStackLongs;
*p++ = *(pStackLongs+1);
@@ -240,33 +240,33 @@ static void callVirtualMethod(
}
/* figure out the address of the function we need to invoke */
- off = nVtableIndex;
+ off = nVtableIndex;
off = off * 4; // 4 bytes per slot
mfunc = *((unsigned long **)pAdjustedThisPtr); // get the address of the vtable
- mfunc = (unsigned long *)((char *)mfunc + off); // get the address from the vtable entry at offset
+ mfunc = (unsigned long *)((char *)mfunc + off); // get the address from the vtable entry at offset
mfunc = *((unsigned long **)mfunc); // the function is stored at the address
- ptr = (void (*)())mfunc;
+ ptr = (void (*)())mfunc;
/* Set up the machine registers and invoke the function */
__asm__ __volatile__ (
- "lwz 3, 0(%0)\n\t"
- "lwz 4, 4(%0)\n\t"
- "lwz 5, 8(%0)\n\t"
- "lwz 6, 12(%0)\n\t"
- "lwz 7, 16(%0)\n\t"
- "lwz 8, 20(%0)\n\t"
- "lwz 9, 24(%0)\n\t"
- "lwz 10, 28(%0)\n\t"
+ "lwz 3, 0(%0)\n\t"
+ "lwz 4, 4(%0)\n\t"
+ "lwz 5, 8(%0)\n\t"
+ "lwz 6, 12(%0)\n\t"
+ "lwz 7, 16(%0)\n\t"
+ "lwz 8, 20(%0)\n\t"
+ "lwz 9, 24(%0)\n\t"
+ "lwz 10, 28(%0)\n\t"
#ifndef __NO_FPRS__
- "lfd 1, 0(%1)\n\t"
- "lfd 2, 8(%1)\n\t"
- "lfd 3, 16(%1)\n\t"
- "lfd 4, 24(%1)\n\t"
- "lfd 5, 32(%1)\n\t"
- "lfd 6, 40(%1)\n\t"
- "lfd 7, 48(%1)\n\t"
- "lfd 8, 56(%1)\n\t"
+ "lfd 1, 0(%1)\n\t"
+ "lfd 2, 8(%1)\n\t"
+ "lfd 3, 16(%1)\n\t"
+ "lfd 4, 24(%1)\n\t"
+ "lfd 5, 32(%1)\n\t"
+ "lfd 6, 40(%1)\n\t"
+ "lfd 7, 48(%1)\n\t"
+ "lfd 8, 56(%1)\n\t"
: : "r" (gpr), "r" (fpr)
#else
: : "r" (gpr)
@@ -328,7 +328,7 @@ static void callVirtualMethod(
}
-//==================================================================================================
+//==================================================================================================
static void cpp_call(
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
bridges::cpp_uno::shared::VtableSlot aVtableSlot,
@@ -337,10 +337,10 @@ static void cpp_call(
void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
{
// max space for: [complex ret ptr], values|ptr ...
- char * pCppStack =
+ char * pCppStack =
(char *)alloca( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
- char * pCppStackStart = pCppStack;
-
+ char * pCppStackStart = pCppStack;
+
// need to know parameter types for callVirtualMethod so generate a signature string
char * pParamType = (char *) alloca(nParams+2);
char * pPT = pParamType;
@@ -349,9 +349,9 @@ static void cpp_call(
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 ))
@@ -361,7 +361,7 @@ static void cpp_call(
else
{
// complex return via ptr
- pCppReturn = *(void **)pCppStack =
+ pCppReturn = *(void **)pCppStack =
(bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize ): pUnoReturn); // direct way
*pPT++ = 'I'; //signify that a complex return type on stack
@@ -382,20 +382,20 @@ static void cpp_call(
sal_Int32 * pTempIndizes = (sal_Int32 *)(pCppArgs + nParams);
// type descriptions for reconversions
typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
-
+
sal_Int32 nTempIndizes = 0;
-
+
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
{
const typelib_MethodParameter & rParam = pParams[nPos];
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
+
if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
uno_copyAndConvertData( pCppArgs[nPos] = pCppStack, pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
switch (pParamTypeDescr->eTypeClass)
{
@@ -458,9 +458,9 @@ static void cpp_call(
{
uno_copyAndConvertData(
*(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- pUnoArgs[nPos], pParamTypeDescr,
+ pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
// will be released at reconversion
ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
@@ -476,7 +476,7 @@ static void cpp_call(
}
pCppStack += sizeof(sal_Int32); // standard parameter length
}
-
+
// terminate the signature string
*pPT++='X';
*pPT=0;
@@ -490,13 +490,13 @@ static void cpp_call(
(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
// NO exception occured...
*ppUnoExc = 0;
-
+
// reconvert temporary params
for ( ; nTempIndizes--; )
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bIn)
{
if (pParams[nIndex].bOut) // inout
@@ -513,7 +513,7 @@ static void cpp_call(
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -527,9 +527,9 @@ static void cpp_call(
catch (...)
{
// fill uno exception
- fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
+ fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
*ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
+
// temporary params
for ( ; nTempIndizes--; )
{
@@ -553,9 +553,9 @@ void unoInterfaceProxyDispatch(
void * pReturn, void * pArgs[], uno_Any ** ppException )
{
// is my surrogate
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
+ bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
= static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy *> (pUnoI);
-
+
switch (pMemberDescr->eTypeClass)
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -582,14 +582,14 @@ void unoInterfaceProxyDispatch(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ 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(
@@ -597,10 +597,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -632,7 +632,7 @@ void unoInterfaceProxyDispatch(
(*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
pThis->pBridge->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -662,7 +662,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
index f8e1fb9cd98a..661f54522224 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -61,9 +61,9 @@ static typelib_TypeClass cpp2uno_call(
fprintf(stderr, "as far as cpp2uno_call\n");
#endif
- int ng = 0; //number of gpr registers used
+ int ng = 0; //number of gpr registers used
int nf = 0; //number of fpr regsiters used
-
+
// gpreg: [ret *], this, [gpr params]
// fpreg: [fpr params]
// ovrflw: [gpr or fpr params (properly aligned)]
@@ -72,10 +72,10 @@ static typelib_TypeClass cpp2uno_call(
typelib_TypeDescription * pReturnTypeDescr = 0;
if (pReturnTypeRef)
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
+
void * pUnoReturn = 0;
void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -87,14 +87,14 @@ static typelib_TypeClass cpp2uno_call(
pCppReturn = *(void **)gpreg;
gpreg++;
ng++;
-
+
pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize )
: pCppReturn); // direct way
}
}
// pop this
- gpreg++;
+ gpreg++;
ng++;
// stack space
@@ -106,7 +106,7 @@ static typelib_TypeClass cpp2uno_call(
sal_Int32 * pTempIndizes = (sal_Int32 *)(pUnoArgs + (2 * nParams));
// type descriptions for reconversions
typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pUnoArgs + (3 * nParams));
-
+
sal_Int32 nTempIndizes = 0;
bool bOverFlowUsed = false;
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
@@ -119,7 +119,7 @@ static typelib_TypeClass cpp2uno_call(
fprintf(stderr, "arg %d of %d\n", nPos, nParams);
#endif
- if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
+ if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
#ifdef CMC_DEBUG
fprintf(stderr, "simple\n");
@@ -194,7 +194,7 @@ static typelib_TypeClass cpp2uno_call(
if (bOverFlowUsed) ovrflw++;
break;
default:
- if (ng < ppc64::MAX_GPR_REGS)
+ if (ng < ppc64::MAX_GPR_REGS)
{
pCppArgs[nPos] = pUnoArgs[nPos] = gpreg++;
ng++;
@@ -219,7 +219,7 @@ static typelib_TypeClass cpp2uno_call(
void *pCppStack; //temporary stack pointer
if (ng < ppc64::MAX_GPR_REGS)
- {
+ {
pCppArgs[nPos] = pCppStack = *gpreg++;
ng++;
}
@@ -260,14 +260,14 @@ static typelib_TypeClass cpp2uno_call(
#ifdef CMC_DEBUG
fprintf(stderr, "end of params\n");
#endif
-
+
// 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)
{
@@ -275,15 +275,15 @@ static typelib_TypeClass cpp2uno_call(
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() );
+
+ CPPU_CURRENT_NAMESPACE::raiseException( &aUnoExc, pThis->getBridge()->getUno2Cpp() );
// has to destruct the any
// is here for dummy
return typelib_TypeClass_VOID;
@@ -295,7 +295,7 @@ static typelib_TypeClass cpp2uno_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bOut) // inout/out
{
// convert and assign
@@ -305,7 +305,7 @@ static typelib_TypeClass cpp2uno_call(
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return
@@ -346,7 +346,7 @@ static typelib_TypeClass cpp_mediate(
long sf = *(long*)sp;
void ** ovrflw = (void**)(sf + 112);
-
+
// gpreg: [ret *], this, [other gpr params]
// fpreg: [fpr params]
// ovrflw: [gpr or fpr params (properly aligned)]
@@ -371,7 +371,7 @@ static typelib_TypeClass cpp_mediate(
#ifdef CMC_DEBUG
fprintf(stderr, "pThis is %lx\n", pThis);
#endif
-
+
pThis = static_cast< char * >(pThis) - nVtableOffset;
#ifdef CMC_DEBUG
@@ -387,7 +387,7 @@ static typelib_TypeClass cpp_mediate(
#ifdef CMC_DEBUG
fprintf(stderr, "indexes are %d %d\n", nFunctionIndex, pTypeDescr->nMapFunctionIndexToMemberIndex);
#endif
-
+
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
@@ -395,7 +395,7 @@ static typelib_TypeClass cpp_mediate(
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!" );
@@ -405,7 +405,7 @@ static typelib_TypeClass cpp_mediate(
#endif
TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
-
+
typelib_TypeClass eRet;
switch (aMemberDescr.get()->eTypeClass)
{
@@ -426,9 +426,9 @@ static typelib_TypeClass cpp_mediate(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -459,9 +459,9 @@ static typelib_TypeClass cpp_mediate(
XInterface * pInterface = 0;
(*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
pCppI->getBridge()->getCppEnv(),
- (void **)&pInterface, pCppI->getOid().pData,
+ (void **)&pInterface, pCppI->getOid().pData,
(typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -540,7 +540,7 @@ extern "C" void privateSnippetExecutor( ... )
"stfd 11, 80(%1)\t\n"
"stfd 12, 88(%1)\t\n"
"stfd 13, 96(%1)\t\n"
- : : "r" (gpreg), "r" (fpreg)
+ : : "r" (gpreg), "r" (fpreg)
: "r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10",
"fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7", "fr8", "fr9",
"fr10", "fr11", "fr12", "fr13"
@@ -564,7 +564,7 @@ extern "C" void privateSnippetExecutor( ... )
break;
case typelib_TypeClass_BOOLEAN:
case typelib_TypeClass_BYTE:
- __asm__( "lbz 3,%0\n\t"
+ __asm__( "lbz 3,%0\n\t"
: : "m" (nRegReturn[0]) );
break;
case typelib_TypeClass_CHAR:
@@ -586,15 +586,15 @@ extern "C" void privateSnippetExecutor( ... )
: : "m"(nRegReturn[0]) );
break;
case typelib_TypeClass_FLOAT:
- __asm__( "lfs 1,%0\n\t"
+ __asm__( "lfs 1,%0\n\t"
: : "m" (*((float*)nRegReturn)) );
break;
case typelib_TypeClass_DOUBLE:
- __asm__( "lfd 1,%0\n\t"
+ __asm__( "lfd 1,%0\n\t"
: : "m" (*((double*)nRegReturn)) );
break;
default:
- __asm__( "ld 3,%0\n\t"
+ __asm__( "ld 3,%0\n\t"
: : "m" (nRegReturn[0]) );
break;
}
@@ -602,7 +602,7 @@ extern "C" void privateSnippetExecutor( ... )
const int codeSnippetSize = 24;
-unsigned char * codeSnippet( unsigned char * code, sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
+unsigned char * codeSnippet( unsigned char * code, sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
bool simpleRetType)
{
#ifdef CMC_DEBUG
@@ -619,7 +619,7 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 nFunctionIndex, sa
memcpy(raw, (char*) privateSnippetExecutor, 16);
raw[2] = (void*) nOffsetAndIndex;
#ifdef CMC_DEBUG
- fprintf(stderr, "in: offset/index is %x %x %d, %lx\n",
+ fprintf(stderr, "in: offset/index is %x %x %d, %lx\n",
nFunctionIndex, nVtableOffset, !simpleRetType, raw[2]);
#endif
return (code + codeSnippetSize);
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx
index c0de95532515..ea6961092f1a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx
index 38ed48ee06c8..0ec8ec2666f4 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -49,25 +49,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
index 04ceddab4c5f..23796ca1cbb4 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -84,8 +84,8 @@ void MapReturn(long r3, double dret, typelib_TypeClass eTypeClass, void *pRegist
namespace
{
//==================================================================================================
-static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
- void * pRegisterReturn, typelib_TypeDescription * pReturnTypeDescr,
+static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
+ void * pRegisterReturn, typelib_TypeDescription * pReturnTypeDescr,
sal_uInt64 *pStack, sal_uInt32 nStack,
sal_uInt64 *pGPR, sal_uInt32 nGPR,
double *pFPR, sal_uInt32 nFPR)
@@ -107,7 +107,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
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 )
+ for ( int i = 0; i < nFPR; ++i )
fprintf( stderr, "0x%lx (%f), ", pFPR[i], pFPR[i] );
fprintf( stderr, "\nStack (%d): ", nStack );
for ( int i = 0; i < nStack; ++i )
@@ -238,7 +238,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
if (bOverFlow) \
*pDS++ = *reinterpret_cast<sal_uInt8 *>( pSV );
-//==================================================================================================
+//==================================================================================================
static void cpp_call(
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
bridges::cpp_uno::shared::VtableSlot aVtableSlot,
@@ -255,12 +255,12 @@ static void cpp_call(
double pFPR[ppc64::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
bool bOverFlow = false;
@@ -295,19 +295,19 @@ static void cpp_call(
#endif
INSERT_INT64( &pAdjustedThisPtr, nGPR, pGPR, pStack, bOverFlow );
- // Args
+ // 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;
#ifdef CMC_DEBUG
fprintf(stderr, "n params is %d\n", nParams);
#endif
-
+
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
{
const typelib_MethodParameter & rParam = pParams[nPos];
@@ -318,10 +318,10 @@ static void cpp_call(
fprintf(stderr, "param %d is %d %d %d\n", nPos, rParam.bOut, bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ),
pParamTypeDescr->eTypeClass);
#endif
-
+
if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
-// uno_copyAndConvertData( pCppArgs[nPos] = alloca( 8 ), pUnoArgs[nPos], pParamTypeDescr,
+// uno_copyAndConvertData( pCppArgs[nPos] = alloca( 8 ), pUnoArgs[nPos], pParamTypeDescr,
uno_copyAndConvertData( pCppArgs[nPos] = pStack, pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
switch (pParamTypeDescr->eTypeClass)
@@ -360,7 +360,7 @@ static void cpp_call(
// no longer needed
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
-
+
}
else // ptr to complex value | ref
{
@@ -375,7 +375,7 @@ static void cpp_call(
// cpp out is constructed mem, uno out is not!
uno_constructData(
pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- pParamTypeDescr );
+ pParamTypeDescr );
pTempIndizes[nTempIndizes] = nPos; // default constructed for cpp call
// will be released at reconversion
ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
@@ -406,24 +406,24 @@ static void cpp_call(
INSERT_INT64( &(pCppArgs[nPos]), nGPR, pGPR, pStack, bOverFlow );
}
}
-
+
try
{
callVirtualMethod(
pAdjustedThisPtr, aVtableSlot.index,
- pCppReturn, pReturnTypeDescr,
+ pCppReturn, pReturnTypeDescr,
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
@@ -440,7 +440,7 @@ static void cpp_call(
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -454,9 +454,9 @@ static void cpp_call(
catch (...)
{
// fill uno exception
- fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
+ fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
*ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
+
// temporary params
for ( ; nTempIndizes--; )
{
@@ -480,10 +480,10 @@ void unoInterfaceProxyDispatch(
void * pReturn, void * pArgs[], uno_Any ** ppException )
{
// is my surrogate
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
+ 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:
@@ -510,14 +510,14 @@ void unoInterfaceProxyDispatch(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ 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(
@@ -525,10 +525,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -560,7 +560,7 @@ void unoInterfaceProxyDispatch(
(*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
pThis->pBridge->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -590,7 +590,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx
index f259387a98bf..9e6e9bda3e55 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -44,7 +44,7 @@
using namespace ::com::sun::star::uno;
-namespace
+namespace
{
static typelib_TypeClass cpp2uno_call(
@@ -55,10 +55,10 @@ static typelib_TypeClass cpp2uno_call(
void ** gpreg, void ** fpreg, void ** ovrflw,
sal_Int64 * pRegisterReturn /* space for register return */ )
{
- int ng = 0; //number of gpr registers used
+ int ng = 0; //number of gpr registers used
int nf = 0; //number of fpr regsiters used
void ** pCppStack; //temporary stack pointer
-
+
// gpreg: [ret *], this, [gpr params]
// fpreg: [fpr params]
// ovrflw: [gpr or fpr params (properly aligned)]
@@ -67,10 +67,10 @@ static typelib_TypeClass cpp2uno_call(
typelib_TypeDescription * pReturnTypeDescr = 0;
if (pReturnTypeRef)
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
+
void * pUnoReturn = 0;
void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -82,14 +82,14 @@ static typelib_TypeClass cpp2uno_call(
pCppReturn = *(void **)gpreg;
gpreg++;
ng++;
-
+
pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize )
: pCppReturn); // direct way
}
}
// pop this
- gpreg++;
+ gpreg++;
ng++;
// stack space
@@ -101,9 +101,9 @@ static typelib_TypeClass cpp2uno_call(
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];
@@ -133,8 +133,8 @@ static typelib_TypeClass cpp2uno_call(
// fpreg are all double values so need to
// modify fpreg to be a single word float value
if (nf < 2) {
-// float tmp = (float) (*((double *)fpreg));
-// (*((float *) fpreg)) = tmp;
+// float tmp = (float) (*((double *)fpreg));
+// (*((float *) fpreg)) = tmp;
pCppArgs[nPos] = fpreg;
pUnoArgs[nPos] = fpreg;
nf++;
@@ -211,7 +211,7 @@ static typelib_TypeClass cpp2uno_call(
else // ptr to complex value | ref
{
- if (ng < 5) {
+ if (ng < 5) {
pCppArgs[nPos] = *(void **)gpreg;
pCppStack = gpreg;
ng++;
@@ -248,14 +248,14 @@ static typelib_TypeClass cpp2uno_call(
}
}
}
-
+
// 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)
{
@@ -263,14 +263,14 @@ static typelib_TypeClass cpp2uno_call(
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;
@@ -282,7 +282,7 @@ static typelib_TypeClass cpp2uno_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bOut) // inout/out
{
// convert and assign
@@ -292,7 +292,7 @@ static typelib_TypeClass cpp2uno_call(
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return
@@ -330,7 +330,7 @@ static typelib_TypeClass cpp_mediate(
sal_Int16 nVtableOffset = (nOffsetAndIndex >> 16);
sal_Int16 nFunctionIndex = (nOffsetAndIndex & 0xFFFF);
-
+
// gpreg: [ret *], this, [other gpr params]
// fpreg: [fpr params]
// ovrflw: [gpr or fpr params (properly aligned)]
@@ -348,14 +348,14 @@ static typelib_TypeClass cpp_mediate(
}
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)
{
@@ -363,14 +363,14 @@ static typelib_TypeClass cpp_mediate(
rtl::OUString::createFromAscii("illegal vtable index!"),
(XInterface *)pCppI );
}
-
+
// determine called method
OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
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)
{
@@ -391,9 +391,9 @@ static typelib_TypeClass cpp_mediate(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -424,9 +424,9 @@ static typelib_TypeClass cpp_mediate(
XInterface * pInterface = 0;
(*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
pCppI->getBridge()->getCppEnv(),
- (void **)&pInterface, pCppI->getOid().pData,
+ (void **)&pInterface, pCppI->getOid().pData,
(typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -484,10 +484,10 @@ static void privateSnippetExecutor( sal_uInt32 nOffsetAndIndex, void** gpregptr,
volatile long nRegReturn[2];
- typelib_TypeClass aType =
- cpp_mediate( nOffsetAndIndex, (void**)gpreg, (void**)fpreg, ovrflw,
+ typelib_TypeClass aType =
+ cpp_mediate( nOffsetAndIndex, (void**)gpreg, (void**)fpreg, ovrflw,
(sal_Int64*)nRegReturn );
-
+
switch( aType )
{
@@ -560,7 +560,7 @@ unsigned char* codeSnippet( unsigned char * code, sal_Int16 nFunctionIndex, sal_
/* generate this code */
// lr %r0,%r13
// bras %r13,0x6
- // .long privateSnippetExecutor
+ // .long privateSnippetExecutor
// .long nOffsetAndIndex
// stm %r2,%r6,8(%r15)
// std %f0,64(%r15)
@@ -569,7 +569,7 @@ unsigned char* codeSnippet( unsigned char * code, sal_Int16 nFunctionIndex, sal_
// l %r2,4(%r13)
// la %r3,8(%r15)
// la %r4,64(%r15)
- // la %r5,96(%r15)
+ // la %r5,96(%r15)
// l %r1,0(%r13)
// lr %r13,%r0
// br %r1
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390/except.cxx b/bridges/source/cpp_uno/gcc3_linux_s390/except.cxx
index c0de95532515..ea6961092f1a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390/share.hxx b/bridges/source/cpp_uno/gcc3_linux_s390/share.hxx
index 4ec09c29ff0a..aa802babac96 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -49,25 +49,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx
index a87cc8e182c8..6c8dc7d9d3d5 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -93,7 +93,7 @@ static void
//invoke_copy_to_stack(sal_Int32 paramCount, sal_Int32 * pStackLongs, char * pPT, sal_Int32* d_ov, sal_Int32 overflow)
invoke_copy_to_stack(sal_Int32 * pStackLongs, char * pPT, sal_Int32* d_ov, sal_Int32 overflow)
{
- sal_Int32 *d_gpr = d_ov + overflow;
+ sal_Int32 *d_gpr = d_ov + overflow;
sal_Int64 *d_fpr = (sal_Int64 *)(d_gpr + 5);
sal_Int32 gpr = 0, fpr = 0;
char c;
@@ -192,7 +192,7 @@ static void callVirtualMethod(
// reference parameters are pointers
// the basic idea here is to use gpr[5] as a storage area for
- // the future values of registers r2 to r6 needed for the call,
+ // the future values of registers r2 to r6 needed for the call,
// and similarly fpr[2] as a storage area for the future values
// of floating point registers f0 to f2
@@ -228,23 +228,23 @@ static void callVirtualMethod(
"ld 0,116(7)\n\t"
"ld 2,124(7)\n\t"
"lm 2,6,96(7)\n\t"
- :
+ :
: "r" (pStackLongs),
- "r" (pPT),
+ "r" (pPT),
"r" (overflow),
"a" (invoke_copy_to_stack),
"a" (method),
"X" (dummy)
: "2", "3", "4", "5", "6", "7", "memory"
);
-// "basr 14,%8\n\t"
+// "basr 14,%8\n\t"
(*(void (*)())method)();
__asm__ __volatile__
(
- "la 15,48(7)\n\t"
-
+ "la 15,48(7)\n\t"
+
"lr %2,2\n\t"
"lr %3,3\n\t"
"ler %0,0\n\t"
@@ -257,7 +257,7 @@ static void callVirtualMethod(
{
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
-// ((long*)pRegisterReturn)[0] = iret;
+// ((long*)pRegisterReturn)[0] = iret;
((long*)pRegisterReturn)[1] = iret2;
case typelib_TypeClass_LONG:
case typelib_TypeClass_UNSIGNED_LONG:
@@ -283,7 +283,7 @@ static void callVirtualMethod(
}
-//============================================================================
+//============================================================================
static void cpp_call(
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
bridges::cpp_uno::shared::VtableSlot aVtableSlot,
@@ -292,10 +292,10 @@ static void cpp_call(
void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
{
// max space for: [complex ret ptr], values|ptr ...
- char * pCppStack =
+ char * pCppStack =
(char *)alloca( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
- char * pCppStackStart = pCppStack;
-
+ char * pCppStackStart = pCppStack;
+
// need to know parameter types for callVirtualMethod so generate a signature string
char * pParamType = (char *) alloca(nParams+2);
char * pPT = pParamType;
@@ -304,9 +304,9 @@ static void cpp_call(
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 ))
@@ -337,15 +337,15 @@ static void cpp_call(
sal_Int32 * pTempIndizes = (sal_Int32 *)(pCppArgs + nParams);
// type descriptions for reconversions
typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
-
+
sal_Int32 nTempIndizes = 0;
-
+
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
{
const typelib_MethodParameter & rParam = pParams[nPos];
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
+
if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
uno_copyAndConvertData( pCppArgs[nPos] = pCppStack, pUnoArgs[nPos], pParamTypeDescr,
@@ -416,7 +416,7 @@ static void cpp_call(
uno_copyAndConvertData(
*(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
pUnoArgs[nPos], pParamTypeDescr, pThis->getBridge()->getUno2Cpp() );
-
+
pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
// will be released at reconversion
ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
@@ -432,7 +432,7 @@ static void cpp_call(
}
pCppStack += sizeof(sal_Int32); // standard parameter length
}
-
+
// terminate the signature string
*pPT++='X';
*pPT=0;
@@ -446,13 +446,13 @@ static void cpp_call(
(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
// NO exception occured...
*ppUnoExc = 0;
-
+
// reconvert temporary params
for ( ; nTempIndizes--; )
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bIn)
{
if (pParams[nIndex].bOut) // inout
@@ -469,7 +469,7 @@ static void cpp_call(
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -483,10 +483,10 @@ static void cpp_call(
catch (...)
{
// fill uno exception
- fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
+ fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
*ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
+
// temporary params
for ( ; nTempIndizes--; )
{
@@ -511,13 +511,13 @@ void unoInterfaceProxyDispatch(
#ifdef CMC_DEBUG
fprintf(stderr, "unoInterfaceProxyDispatch\n");
#endif
-
+
// is my surrogate
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
+ 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:
@@ -544,14 +544,14 @@ void unoInterfaceProxyDispatch(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ 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(
@@ -559,10 +559,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -594,7 +594,7 @@ void unoInterfaceProxyDispatch(
(*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
pThis->pBridge->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -624,7 +624,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx
index b491f661bff9..39d9fe482fbe 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -43,7 +43,7 @@
using namespace ::com::sun::star::uno;
-namespace
+namespace
{
static typelib_TypeClass cpp2uno_call(
bridges::cpp_uno::shared::CppInterfaceProxy * pThis,
@@ -56,9 +56,9 @@ static typelib_TypeClass cpp2uno_call(
#ifdef CMC_DEBUG
fprintf(stderr, "as far as cpp2uno_call\n");
#endif
- int ng = 0; //number of gpr registers used
+ int ng = 0; //number of gpr registers used
int nf = 0; //number of fpr regsiters used
-
+
// gpreg: [ret *], this, [gpr params]
// fpreg: [fpr params]
// ovrflw: [gpr or fpr params (properly aligned)]
@@ -67,10 +67,10 @@ static typelib_TypeClass cpp2uno_call(
typelib_TypeDescription * pReturnTypeDescr = 0;
if (pReturnTypeRef)
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
+
void * pUnoReturn = 0;
void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -82,14 +82,14 @@ static typelib_TypeClass cpp2uno_call(
pCppReturn = *(void **)gpreg;
gpreg++;
ng++;
-
+
pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize )
: pCppReturn); // direct way
}
}
// pop this
- gpreg++;
+ gpreg++;
ng++;
// stack space
@@ -101,7 +101,7 @@ static typelib_TypeClass cpp2uno_call(
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 )
{
@@ -210,7 +210,7 @@ static typelib_TypeClass cpp2uno_call(
void *pCppStack; //temporary stack pointer
if (ng < s390x::MAX_GPR_REGS)
- {
+ {
pCppArgs[nPos] = pCppStack = *gpreg++;
ng++;
}
@@ -250,14 +250,14 @@ static typelib_TypeClass cpp2uno_call(
#ifdef CMC_DEBUG
fprintf(stderr, "end of params\n");
#endif
-
+
// 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)
{
@@ -265,14 +265,14 @@ static typelib_TypeClass cpp2uno_call(
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;
@@ -284,7 +284,7 @@ static typelib_TypeClass cpp2uno_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bOut) // inout/out
{
// convert and assign
@@ -294,7 +294,7 @@ static typelib_TypeClass cpp2uno_call(
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return
@@ -351,7 +351,7 @@ static typelib_TypeClass cpp_mediate(
}
#endif
-
+
// gpreg: [ret *], this, [other gpr params]
// fpreg: [fpr params]
// ovrflw: [gpr or fpr params (properly aligned)]
@@ -369,14 +369,14 @@ static typelib_TypeClass cpp_mediate(
}
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)
{
@@ -384,14 +384,14 @@ static typelib_TypeClass cpp_mediate(
rtl::OUString::createFromAscii("illegal vtable index!"),
(XInterface *)pCppI );
}
-
+
// determine called method
OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
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)
{
@@ -414,7 +414,7 @@ static typelib_TypeClass cpp_mediate(
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
aParam.bIn = sal_True;
aParam.bOut = sal_False;
-
+
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -445,9 +445,9 @@ static typelib_TypeClass cpp_mediate(
XInterface * pInterface = 0;
(*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
pCppI->getBridge()->getCppEnv(),
- (void **)&pInterface, pCppI->getOid().pData,
+ (void **)&pInterface, pCppI->getOid().pData,
(typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -510,8 +510,8 @@ long privateSnippetExecutor(long r2, long r3, long r4, long r5, long r6, long fi
fprintf(stderr, "before mediate with %lx\n",nOffsetAndIndex);
fprintf(stderr, "doubles are %f %f %f %f\n", fpreg[0], fpreg[1], fpreg[2], fpreg[3]);
#endif
- typelib_TypeClass aType =
- cpp_mediate( nOffsetAndIndex, (void**)gpreg, (void**)fpreg, (void**)sp,
+ typelib_TypeClass aType =
+ cpp_mediate( nOffsetAndIndex, (void**)gpreg, (void**)fpreg, (void**)sp,
(sal_Int64*)nRegReturn );
#ifdef CMC_DEBUG
fprintf(stderr, "after mediate ret is %lx %ld\n", nRegReturn[0], nRegReturn[0]);
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx b/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx
index c0de95532515..ea6961092f1a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/share.hxx b/bridges/source/cpp_uno/gcc3_linux_s390x/share.hxx
index 69176377606b..1abf8cb08aa6 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390x/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390x/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -49,25 +49,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx
index d3fec618c301..1e7421dcdc87 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -206,7 +206,7 @@ void callVirtualMethod(
}
-//============================================================================
+//============================================================================
static void cpp_call(
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
bridges::cpp_uno::shared::VtableSlot aVtableSlot,
@@ -223,12 +223,12 @@ static void cpp_call(
double pFPR[s390x::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)
@@ -259,15 +259,15 @@ static void cpp_call(
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,
@@ -324,7 +324,7 @@ static void cpp_call(
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;
@@ -338,7 +338,7 @@ static void cpp_call(
INSERT_INT64( &(pCppArgs[nPos]), nGPR, pGPR, pStack );
}
}
-
+
try
{
callVirtualMethod(
@@ -349,13 +349,13 @@ static void cpp_call(
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
@@ -372,7 +372,7 @@ static void cpp_call(
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -386,10 +386,10 @@ static void cpp_call(
catch (...)
{
// fill uno exception
- fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
+ fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
*ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
+
// temporary params
for ( ; nTempIndizes--; )
{
@@ -414,12 +414,12 @@ void unoInterfaceProxyDispatch(
#ifdef CMC_DEBUG
fprintf(stderr, "unoInterfaceProxyDispatch\n");
#endif
-
+
// is my surrogate
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
+ bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
= static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy *> (pUnoI);
-
+
switch (pMemberDescr->eTypeClass)
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -453,7 +453,7 @@ void unoInterfaceProxyDispatch(
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(
@@ -461,10 +461,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -496,7 +496,7 @@ void unoInterfaceProxyDispatch(
(*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
pThis->pBridge->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -526,7 +526,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
index 1546432e5980..25f62a08ef1b 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -57,10 +57,10 @@ static typelib_TypeClass cpp2uno_call(
typelib_TypeDescription * pReturnTypeDescr = 0;
if (pReturnTypeRef)
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
+
void * pUnoReturn = 0;
void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -87,9 +87,9 @@ static typelib_TypeClass cpp2uno_call(
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];
@@ -156,14 +156,14 @@ static typelib_TypeClass cpp2uno_call(
}
pCppStack += sizeof(sal_Int32); // standard parameter length
}
-
+
// ExceptionHolder
uno_Any aUnoExc; // Any will be constructed by callee
uno_Any * pUnoExc = &aUnoExc;
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)(pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
-
+
// in case an exception occured...
if (pUnoExc)
{
@@ -171,7 +171,7 @@ static typelib_TypeClass cpp2uno_call(
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] );
@@ -190,7 +190,7 @@ static typelib_TypeClass cpp2uno_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bOut) // inout/out
{
// convert and assign
@@ -200,7 +200,7 @@ static typelib_TypeClass cpp2uno_call(
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return
@@ -230,9 +230,9 @@ static typelib_TypeClass cpp2uno_call(
//==================================================================================================
static typelib_TypeClass cpp_mediate(
- sal_Int32 nFunctionIndex,
- sal_Int32 nVtableOffset,
- void ** pCallStack,
+ sal_Int32 nFunctionIndex,
+ sal_Int32 nVtableOffset,
+ void ** pCallStack,
sal_Int64 * pRegisterReturn /* space for register return */ )
{
OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
@@ -259,7 +259,7 @@ static typelib_TypeClass cpp_mediate(
{
throw RuntimeException( rtl::OUString::createFromAscii("illegal vtable index!"), (XInterface *)pCppI );
}
-
+
// determine called method
sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member index!" );
@@ -291,9 +291,9 @@ static typelib_TypeClass cpp_mediate(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -325,7 +325,7 @@ static typelib_TypeClass cpp_mediate(
(*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
pCppI->getBridge()->getCppEnv(),
(void **)&pInterface, pCppI->getOid().pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -381,8 +381,8 @@ void * pRegReturn = &nRegReturn;
"st %%i2, %2\n\t"
: : "m"(nFunctionIndex), "m"(pCallStack), "m"(vTableOffset) );
-// fprintf(stderr,"cpp_mediate nFunctionIndex=%x\n",nFunctionIndex);
-// fflush(stderr);
+// fprintf(stderr,"cpp_mediate nFunctionIndex=%x\n",nFunctionIndex);
+// fflush(stderr);
sal_Bool bComplex = nFunctionIndex & 0x80000000 ? sal_True : sal_False;
typelib_TypeClass aType =
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
index 6e61196df98e..4556172651cf 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -55,7 +55,7 @@ using namespace ::__cxxabiv1;
namespace CPPU_CURRENT_NAMESPACE
{
-
+
void dummy_can_throw_anything( char const * )
{
}
@@ -66,13 +66,13 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
#if defined BRIDGES_DEBUG
char const * start = p;
#endif
-
+
// example: N3com3sun4star4lang24IllegalArgumentExceptionE
-
+
OUStringBuffer buf( 64 );
OSL_ASSERT( 'N' == *p );
++p; // skip N
-
+
while ('E' != *p)
{
// read chars count
@@ -87,7 +87,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
if ('E' != *p)
buf.append( (sal_Unicode)'.' );
}
-
+
#if defined BRIDGES_DEBUG
OUString ret( buf.makeStringAndClear() );
OString c_ret( OUStringToOString( ret, RTL_TEXTENCODING_ASCII_US ) );
@@ -102,17 +102,17 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
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( () );
};
//__________________________________________________________________________________________________
@@ -130,9 +130,9 @@ RTTI::~RTTI() SAL_THROW( () )
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())
@@ -150,7 +150,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
}
while (index >= 0);
buf.append( 'E' );
-
+
OString symName( buf.makeStringAndClear() );
rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
@@ -186,7 +186,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
// 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?!" );
@@ -201,7 +201,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
{
rtti = iFind->second;
}
-
+
return rtti;
}
@@ -245,10 +245,10 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
*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
@@ -277,7 +277,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
Reference< XInterface >() );
}
}
-
+
__cxa_throw( pCppExc, rtti, deleteException );
}
@@ -297,7 +297,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
#endif
return;
}
-
+
typelib_TypeDescription * pExcTypeDescr = 0;
OUString unoName( toUNOname( header->exceptionType->name() ) );
#if defined BRIDGES_DEBUG
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/share.hxx b/bridges/source/cpp_uno/gcc3_linux_sparc/share.hxx
index 3526f19082cd..eb1cb12f53a9 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -43,25 +43,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
index 0cf6d21c80e7..02f951a59381 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -107,7 +107,7 @@ void callVirtualMethod( void * pAdjustedThisPtr,
"mov %%l1, %%l7\n\t"
// increase our own stackframe if necessary
- "mov %%sp, %%l3\n\t" // save stack ptr for readjustment
+ "mov %%sp, %%l3\n\t" // save stack ptr for readjustment
"subcc %%i5, 7, %%l0\n\t"
"ble .LmoveOn\n\t"
@@ -115,14 +115,14 @@ void callVirtualMethod( void * pAdjustedThisPtr,
"sll %%l0, 2, %%l0\n\t"
"add %%l0, 96, %%l0\n\t"
- "mov %%sp, %%l1\n\t" // old stack ptr
- "sub %%sp, %%l0, %%l0\n\t" // future stack ptr
- "andcc %%l0, 7, %%g0\n\t" // align stack to 8
+ "mov %%sp, %%l1\n\t" // old stack ptr
+ "sub %%sp, %%l0, %%l0\n\t" // future stack ptr
+ "andcc %%l0, 7, %%g0\n\t" // align stack to 8
"be .LisAligned\n\t"
"nop\n\t"
"sub %%l0, 4, %%l0\n"
".LisAligned:\n\t"
- "mov %%l0, %%o5\n\t" // save newly computed stack ptr
+ "mov %%l0, %%o5\n\t" // save newly computed stack ptr
"add %%g0, 16, %%o4\n"
// now copy longs down to save register window
@@ -135,11 +135,11 @@ void callVirtualMethod( void * pAdjustedThisPtr,
"subcc %%o4, 1, %%o4\n\t"
"bne .LcopyDown\n\t"
- "mov %%o5, %%sp\n\t" // move new stack ptr (hopefully) atomically
+ "mov %%o5, %%sp\n\t" // move new stack ptr (hopefully) atomically
// while register window is valid in both spaces
// (scheduling might hit in copyDown loop)
- "sub %%i5, 7, %%l0\n\t" // copy parameters past the sixth to stack
+ "sub %%i5, 7, %%l0\n\t" // copy parameters past the sixth to stack
"add %%i4, 28, %%l1\n\t"
"add %%sp, 92, %%l2\n"
".LcopyLong:\n\t"
@@ -152,10 +152,10 @@ void callVirtualMethod( void * pAdjustedThisPtr,
"nop\n"
".LmoveOn:\n\t"
- "mov %%i5, %%l0\n\t" // prepare out registers
+ "mov %%i5, %%l0\n\t" // prepare out registers
"mov %%i4, %%l1\n\t"
- "ld [%%l1], %%o0\n\t" // prepare complex return ptr
+ "ld [%%l1], %%o0\n\t" // prepare complex return ptr
"st %%o0, [%%sp+64]\n\t"
"sub %%l0, 1, %%l0\n\t"
"add %%l1, 4, %%l1\n\t"
@@ -193,20 +193,20 @@ void callVirtualMethod( void * pAdjustedThisPtr,
"ld [%%l1], %%o5\n"
".LdoCall:\n\t"
- "ld [%%i0], %%l0\n\t" // get vtable ptr
+ "ld [%%i0], %%l0\n\t" // get vtable ptr
"sll %%i1, 2, %%l6\n\t"
// "add %%l6, 8, %%l6\n\t"
"add %%l6, %%l0, %%l0\n\t"
-// // vtable has 8byte wide entries,
-// // upper half contains 2 half words, of which the first
-// // is the this ptr patch !
-// // first entry is (or __tf)
+// // vtable has 8byte wide entries,
+// // upper half contains 2 half words, of which the first
+// // is the this ptr patch !
+// // first entry is (or __tf)
-// "ldsh [%%l0], %%l6\n\t" // load this ptr patch
-// "add %%l6, %%o0, %%o0\n\t" // patch this ptr
+// "ldsh [%%l0], %%l6\n\t" // load this ptr patch
+// "add %%l6, %%o0, %%o0\n\t" // patch this ptr
-// "add %%l0, 4, %%l0\n\t" // get virtual function ptr
+// "add %%l0, 4, %%l0\n\t" // get virtual function ptr
"ld [%%l0], %%l0\n\t"
"ld [%%i4], %%l2\n\t"
@@ -223,8 +223,8 @@ void callVirtualMethod( void * pAdjustedThisPtr,
"unimp\n"
".LcallReturned:\n\t"
- "mov %%l3, %%sp\n\t" // readjust stack so that our locals are where they belong
- "st %%o0, %0\n\t" // save possible return registers into our locals
+ "mov %%l3, %%sp\n\t" // readjust stack so that our locals are where they belong
+ "st %%o0, %0\n\t" // save possible return registers into our locals
"st %%o1, %1\n\t"
"std %%f0, %2\n\t"
"st %%f0, %3\n\t"
@@ -289,17 +289,17 @@ static void cpp_call(
void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
{
// max space for: complex ret ptr, this, values|ptr ...
- char * pCppStack =
+ char * pCppStack =
(char *)alloca( (nParams+2) * sizeof(sal_Int64) );
- char * pCppStackStart = pCppStack;
-
+ char * pCppStackStart = pCppStack;
+
// return
typelib_TypeDescription * pReturnTypeDescr = 0;
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
-
+
void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -330,9 +330,9 @@ static void cpp_call(
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];
@@ -341,7 +341,7 @@ static void cpp_call(
if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
pCppArgs[ nPos ] = CPPU_CURRENT_NAMESPACE::adjustPointer(pCppStack, pParamTypeDescr );
-
+
switch (pParamTypeDescr->eTypeClass)
{
case typelib_TypeClass_HYPER:
@@ -383,7 +383,7 @@ static void cpp_call(
*(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
// will be released at reconversion
ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
@@ -402,7 +402,7 @@ static void cpp_call(
{
int nStackLongs = (pCppStack - pCppStackStart)/sizeof(sal_Int32);
OSL_ENSURE( !( (pCppStack - pCppStackStart ) & 3), "UNALIGNED STACK !!! (Please DO panic" );
-
+
if( nStackLongs & 1 )
// stack has to be 8 byte aligned
nStackLongs++;
@@ -421,7 +421,7 @@ static void cpp_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bIn)
{
if (pParams[nIndex].bOut) // inout
@@ -438,7 +438,7 @@ static void cpp_call(
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -452,7 +452,7 @@ static void cpp_call(
catch( ... )
{
// get exception
- fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
+ fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
*ppUnoExc, pThis->getBridge()->getCpp2Uno() );
// temporary params
@@ -481,12 +481,12 @@ void unoInterfaceProxyDispatch(
OString cstr( OUStringToOString( pMemberDescr->pTypeName, RTL_TEXTENCODING_ASCII_US ) );
fprintf( stderr, "received dispatch( %s )\n", cstr.getStr() );
#endif
-
+
// is my surrogate
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
= static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI);
-// typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
-
+// typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
+
switch (pMemberDescr->eTypeClass)
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -511,14 +511,14 @@ void unoInterfaceProxyDispatch(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ 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(
@@ -529,7 +529,7 @@ void unoInterfaceProxyDispatch(
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -560,7 +560,7 @@ void unoInterfaceProxyDispatch(
(*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
pThis->pBridge->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -590,7 +590,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx
index e62f71d2c32a..57e135933b79 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -38,8 +38,8 @@
/* -----------------------------------------------------------------------
ffi.c - Copyright (c) 2002 Bo Thorsen <bo@suse.de>
-
- x86-64 Foreign Function Interface
+
+ 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
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 c9f71f18078b..b37a9daa5fa3 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -48,7 +48,7 @@ const sal_uInt32 MAX_SSE_REGS = 8;
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 );
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 512b7d1f3f34..a208c2f10786 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -77,22 +77,22 @@ static typelib_TypeClass cpp2uno_call(
{
unsigned int nr_gpr = 0; //number of gpr registers used
unsigned int nr_fpr = 0; //number of fpr registers 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
@@ -102,7 +102,7 @@ static typelib_TypeClass cpp2uno_call(
}
// pop this
- gpreg++;
+ gpreg++;
nr_gpr++;
// stack space
@@ -113,7 +113,7 @@ static typelib_TypeClass cpp2uno_call(
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 )
@@ -159,7 +159,7 @@ static typelib_TypeClass cpp2uno_call(
void *pCppStack;
if ( nr_gpr < x86_64::MAX_GPR_REGS )
- {
+ {
pCppArgs[nPos] = pCppStack = *gpreg++;
nr_gpr++;
}
@@ -191,14 +191,14 @@ static typelib_TypeClass cpp2uno_call(
}
}
}
-
+
// 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 )
{
@@ -206,14 +206,14 @@ static typelib_TypeClass cpp2uno_call(
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;
@@ -225,7 +225,7 @@ static typelib_TypeClass cpp2uno_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if ( pParams[nIndex].bOut ) // inout/out
{
// convert and assign
@@ -235,7 +235,7 @@ static typelib_TypeClass cpp2uno_call(
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return
@@ -307,7 +307,7 @@ extern "C" typelib_TypeClass cpp_vtable_call(
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
{
- typelib_TypeDescriptionReference *pAttrTypeRef =
+ typelib_TypeDescriptionReference *pAttrTypeRef =
reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>( aMemberDescr.get() )->pAttributeTypeRef;
if ( pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos] == nFunctionIndex )
@@ -322,8 +322,8 @@ extern "C" typelib_TypeClass cpp_vtable_call(
// is SET method
typelib_MethodParameter aParam;
aParam.pTypeRef = pAttrTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
eRet = cpp2uno_call( pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -501,7 +501,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
{
typelib_InterfaceMethodTypeDescription *pMethodTD =
reinterpret_cast<typelib_InterfaceMethodTypeDescription *>( pTD );
-
+
(s++)->fn = code + writetoexecdiff;
code = codeSnippet( code, nFunctionOffset++, nVtableOffset,
x86_64::return_in_hidden_param( pMethodTD->pReturnTypeRef ) );
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 759f28764fa7..dd41ad1bdbd7 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -57,7 +57,7 @@ using namespace ::__cxxabiv1;
namespace CPPU_CURRENT_NAMESPACE
{
-
+
void dummy_can_throw_anything( char const * )
{
}
@@ -68,13 +68,13 @@ 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
@@ -89,7 +89,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
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 ) );
@@ -104,17 +104,17 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
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( () );
};
//__________________________________________________________________________________________________
@@ -136,9 +136,9 @@ RTTI::~RTTI() SAL_THROW( () )
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())
@@ -156,7 +156,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
}
while (index >= 0);
buf.append( 'E' );
-
+
OString symName( buf.makeStringAndClear() );
#if defined(FREEBSD) && __FreeBSD_version < 702104 /* #i22253# */
rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() );
@@ -196,7 +196,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
// 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?!" );
@@ -211,7 +211,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
{
rtti = iFind->second;
}
-
+
return rtti;
}
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 da2367ad172b..e4a6b379a840 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -48,25 +48,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
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 767961b9c691..90acb02ff5db 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -114,7 +114,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
double xmm1;
asm volatile (
-
+
// Fill the xmm registers
"movq %2, %%rax\n\t"
@@ -196,7 +196,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
}
}
-//==================================================================================================
+//==================================================================================================
// Macros for easier insertion of values to registers or stack
// pSV - pointer to the source
@@ -236,7 +236,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
else \
*pDS++ = *reinterpret_cast<sal_uInt8 *>( pSV );
-//==================================================================================================
+//==================================================================================================
static void cpp_call(
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
@@ -260,10 +260,10 @@ static void cpp_call(
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;
+ bool bSimpleReturn = true;
if ( pReturnTypeDescr )
{
if ( x86_64::return_in_hidden_param( pReturnTypeRef ) )
@@ -290,20 +290,20 @@ static void cpp_call(
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:
@@ -353,7 +353,7 @@ static void cpp_call(
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;
@@ -367,7 +367,7 @@ static void cpp_call(
INSERT_INT64( &(pCppArgs[nPos]), nGPR, pGPR, pStack );
}
}
-
+
try
{
callVirtualMethod(
@@ -378,13 +378,13 @@ static void cpp_call(
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
@@ -401,7 +401,7 @@ static void cpp_call(
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -416,7 +416,7 @@ static void cpp_call(
{
// fill uno exception
fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
+
// temporary params
for ( ; nTempIndizes--; )
{
@@ -445,7 +445,7 @@ void unoInterfaceProxyDispatch(
#if OSL_DEBUG_LEVEL > 0
typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
#endif
-
+
switch (pMemberDescr->eTypeClass)
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -460,7 +460,7 @@ void unoInterfaceProxyDispatch(
reinterpret_cast<
typelib_InterfaceAttributeTypeDescription const * >(
pMemberDescr)));
-
+
if (pReturn)
{
// dependent dispatch
@@ -476,14 +476,14 @@ void unoInterfaceProxyDispatch(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ 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(
@@ -491,10 +491,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -509,7 +509,7 @@ void unoInterfaceProxyDispatch(
reinterpret_cast<
typelib_InterfaceMethodTypeDescription const * >(
pMemberDescr)));
-
+
switch (aVtableSlot.index)
{
// standard calls
@@ -531,7 +531,7 @@ void unoInterfaceProxyDispatch(
(*pThis->getBridge()->getUnoEnv()->getRegisteredInterface)(
pThis->getBridge()->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -561,7 +561,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx
index 11c1d0f10db2..2d406af78518 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -66,10 +66,10 @@ void cpp2uno_call(
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)
{
// xxx todo: test PolyStructy<STRUCT<long>> foo()
@@ -99,9 +99,9 @@ void cpp2uno_call(
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];
@@ -158,7 +158,7 @@ void cpp2uno_call(
}
pCppStack += sizeof(sal_Int32); // standard parameter length
}
-
+
// ExceptionHolder
uno_Any aUnoExc; // Any will be constructed by callee
uno_Any * pUnoExc = &aUnoExc;
@@ -166,7 +166,7 @@ void cpp2uno_call(
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
-
+
// in case an exception occured...
if (pUnoExc)
{
@@ -174,14 +174,14 @@ void cpp2uno_call(
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
@@ -193,7 +193,7 @@ void cpp2uno_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bOut) // inout/out
{
// convert and assign
@@ -203,7 +203,7 @@ void cpp2uno_call(
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return
@@ -236,7 +236,7 @@ extern "C" void cpp_vtable_call(
void * pReturnValue )
{
OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
-
+
// pCallStack: ret adr, [ret *], this, params
void * pThis;
if( nFunctionIndex & 0x80000000 )
@@ -254,11 +254,11 @@ extern "C" void cpp_vtable_call(
pThis);
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "%p %p %p pThis=%p, pCppI=%p, function index=%d, vtable offset=%d\n", pCallStack[0], pCallStack[1], pCallStack[2], pThis, pCppI, nFunctionIndex, nVtableOffset );
-#endif
+#endif
typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "name=%s\n", rtl::OUStringToOString(pTypeDescr->aBase.pTypeName, RTL_TEXTENCODING_UTF8).getStr() );
-#endif
+#endif
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
{
@@ -266,7 +266,7 @@ extern "C" void cpp_vtable_call(
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!" );
@@ -274,7 +274,7 @@ extern "C" void cpp_vtable_call(
TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
#if OSL_DEBUG_LEVEL > 1
fprintf(stderr, "calling %s\n", rtl::OUStringToOString(aMemberDescr.get()->pTypeName, RTL_TEXTENCODING_UTF8).getStr());
-#endif
+#endif
switch (aMemberDescr.get()->eTypeClass)
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -294,9 +294,9 @@ extern "C" void cpp_vtable_call(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -327,7 +327,7 @@ extern "C" void cpp_vtable_call(
pCppI->getBridge()->getCppEnv(),
(void **)&pInterface, pCppI->getOid().pData,
(typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
diff --git a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
index c8cc3cd17257..b6e170236d9d 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/gcc3_macosx_intel/share.hxx b/bridges/source/cpp_uno/gcc3_macosx_intel/share.hxx
index 8b105c0880b3..8fa373310d69 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_intel/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_intel/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -50,25 +50,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
diff --git a/bridges/source/cpp_uno/gcc3_macosx_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_macosx_intel/uno2cpp.cxx
index aaf696608e41..8610c3cf50d8 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_intel/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -73,11 +73,11 @@ void callVirtualMethod(
{
// parameter list is mixed list of * and values
// reference parameters are pointers
-
+
OSL_ENSURE( pStackLongs && pAdjustedThisPtr, "### null ptr!" );
OSL_ENSURE( (sizeof(void *) == 4) && (sizeof(sal_Int32) == 4), "### unexpected size of int!" );
OSL_ENSURE( nStackLongs && pStackLongs, "### no stack in callVirtualMethod !" );
-
+
// never called
if (! pAdjustedThisPtr) CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something
@@ -159,7 +159,7 @@ void callVirtualMethod(
}
}
-//==================================================================================================
+//==================================================================================================
static void cpp_call(
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
bridges::cpp_uno::shared::VtableSlot aVtableSlot,
@@ -168,18 +168,18 @@ static void cpp_call(
void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
{
// max space for: [complex ret ptr], values|ptr ...
- char * pCppStack =
+ char * pCppStack =
(char *)alloca( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
- char * pCppStackStart = pCppStack;
-
+ char * pCppStackStart = pCppStack;
+
// return
typelib_TypeDescription * pReturnTypeDescr = 0;
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
-
+
void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
bool bSimpleReturn = true;
-
+
if (pReturnTypeDescr)
{
bSimpleReturn = CPPU_CURRENT_NAMESPACE::isSimpleReturnType(
@@ -213,21 +213,21 @@ static void cpp_call(
sal_Int32 * pTempIndizes = (sal_Int32 *)(pCppArgs + nParams);
// type descriptions for reconversions
typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
-
+
sal_Int32 nTempIndizes = 0;
-
+
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
{
const typelib_MethodParameter & rParam = pParams[nPos];
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
+
if (!rParam.bOut
&& bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
uno_copyAndConvertData( pCppArgs[nPos] = pCppStack, pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
switch (pParamTypeDescr->eTypeClass)
{
case typelib_TypeClass_HYPER:
@@ -260,7 +260,7 @@ static void cpp_call(
*(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
// will be released at reconversion
ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
@@ -284,13 +284,13 @@ static void cpp_call(
(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
// NO exception occured...
*ppUnoExc = 0;
-
+
// reconvert temporary params
for ( ; nTempIndizes--; )
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bIn)
{
if (pParams[nIndex].bOut) // inout
@@ -307,7 +307,7 @@ static void cpp_call(
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -325,7 +325,7 @@ static void cpp_call(
#endif
// fill uno exception
fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
+
// temporary params
for ( ; nTempIndizes--; )
{
@@ -379,7 +379,7 @@ void unoInterfaceProxyDispatch(
// is my surrogate
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
= static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI);
-
+
switch (pMemberDescr->eTypeClass)
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -404,14 +404,14 @@ void unoInterfaceProxyDispatch(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ 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(
@@ -419,10 +419,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -453,7 +453,7 @@ void unoInterfaceProxyDispatch(
(*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
pThis->pBridge->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -483,7 +483,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx
index f3515a86ea08..e80a2a017459 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -54,7 +54,7 @@ static typelib_TypeClass cpp2uno_call(
void ** gpreg, void ** fpreg, void ** ovrflw,
sal_Int64 * pRegisterReturn /* space for register return */ )
{
-
+
// gpreg: [ret *], this, [gpr params]
// fpreg: [fpr params]
// ovrflw: [gpr or fpr params (space for entire parameter list in structure format properly aligned)]
@@ -63,10 +63,10 @@ static typelib_TypeClass cpp2uno_call(
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 ngpreg = 0;
sal_Int32 nfpreg = 0;
@@ -80,7 +80,7 @@ static typelib_TypeClass cpp2uno_call(
pCppReturn = *gpreg;
ngpreg++;
++ovrflw;
-
+
pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize )
: pCppReturn); // direct way
@@ -92,7 +92,7 @@ static typelib_TypeClass cpp2uno_call(
// after handling optional return pointer and "this"
// make use of the space that is allocated to store all parameters in the callers stack
- // by comying the proper registers filled with parameters to that space
+ // by comying the proper registers filled with parameters to that space
char * pCppStack = (char *)ovrflw;
@@ -120,7 +120,7 @@ static typelib_TypeClass cpp2uno_call(
}
pCppStack += sizeof (float);
ngpreg += 1;
- break;
+ break;
case typelib_TypeClass_DOUBLE:
if (nfpreg < 13)
{
@@ -128,7 +128,7 @@ static typelib_TypeClass cpp2uno_call(
}
pCppStack += sizeof (double);
ngpreg += 2;
- break;
+ break;
case typelib_TypeClass_UNSIGNED_HYPER:
case typelib_TypeClass_HYPER:
if (ngpreg < 8)
@@ -163,16 +163,16 @@ static typelib_TypeClass cpp2uno_call(
// type descriptions for reconversions
typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pUnoArgs + (3 * nParams));
-
+
sal_Int32 nTempIndizes = 0;
-
+
for ( 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 ))
+ if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
// value
{
switch (pParamTypeDescr->eTypeClass)
@@ -233,16 +233,16 @@ static typelib_TypeClass cpp2uno_call(
}
pCppStack += sizeof(sal_Int32); // standard parameter length
}
-
-
+
+
// ExceptionHolder
uno_Any aUnoExc; // Any will be constructed by callee
uno_Any * pUnoExc = &aUnoExc;
// invoke uno dispatch call
- (*pThis->getUnoI()->pDispatcher)(
+ (*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
-
+
// in case an exception occured...
if (pUnoExc)
{
@@ -250,16 +250,16 @@ static typelib_TypeClass cpp2uno_call(
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() );
+
+ CPPU_CURRENT_NAMESPACE::raiseException(
+ &aUnoExc, pThis->getBridge()->getUno2Cpp() );
// has to destruct the any
// is here for dummy
return typelib_TypeClass_VOID;
@@ -271,7 +271,7 @@ static typelib_TypeClass cpp2uno_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bOut) // inout/out
{
// convert and assign
@@ -281,7 +281,7 @@ static typelib_TypeClass cpp2uno_call(
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return
@@ -317,7 +317,7 @@ static typelib_TypeClass cpp_mediate(
sal_Int64 * 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)]
@@ -332,14 +332,14 @@ static typelib_TypeClass cpp_mediate(
{
pThis = gpreg[0];
}
-
+
pThis = static_cast< char * >(pThis) - nVtableOffset;
- bridges::cpp_uno::shared::CppInterfaceProxy * pCppI
+ 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)
{
@@ -347,13 +347,13 @@ static typelib_TypeClass cpp_mediate(
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)
{
@@ -374,9 +374,9 @@ static typelib_TypeClass cpp_mediate(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -408,7 +408,7 @@ static typelib_TypeClass cpp_mediate(
(*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
pCppI->getBridge()->getCppEnv(),
(void **)&pInterface, pCppI->getOid().pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -455,7 +455,7 @@ static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpreg
{
sal_Int32 gpreg[8];
double fpreg[13];
-
+
// FIXME: why are we restoring the volatile ctr register here
sal_Int32 ctrsave = ((sal_Int32*)gpregptr)[-1];
@@ -466,9 +466,9 @@ static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpreg
// sal_Bool bComplex = nFunctionIndex & 0x80000000 ? sal_True : sal_False;
- typelib_TypeClass aType =
+ typelib_TypeClass aType =
cpp_mediate( nFunctionIndex, nVtableOffset, (void**)gpreg, (void**)fpreg, ovrflw, (sal_Int64*)nRegReturn );
-
+
// FIXME: why are we restoring the volatile ctr register here
// FIXME: and why are we putting back the values for r4, r5, and r6 as well
// FIXME: this makes no sense to me, all of these registers are volatile!
@@ -490,7 +490,7 @@ static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpreg
__asm__( "lbz r3,%0\n\t" : :
"m"(nRegReturn[0]) );
break;
-
+
case typelib_TypeClass_CHAR:
case typelib_TypeClass_SHORT:
case typelib_TypeClass_UNSIGNED_SHORT:
@@ -523,7 +523,7 @@ static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpreg
int const codeSnippetSize = 136;
-unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex,
+unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex,
sal_Int32 vtableOffset, bool simpleRetType )
{
if (! simpleRetType )
@@ -535,17 +535,17 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex,
// FIXME: is this to allow room for signal handling frames?
// FIXME: seems like overkill here but this is what was done for Mac OSX for gcc2
// FIXME: also why no saving of the non-volatile CR pieces here, to be safe
- // FIXME: we probably should
+ // FIXME: we probably should
/* generate this code */
// # so first save gpr 3 to gpr 10 (aligned to 4)
// stw r3, -8000(r1)
// stw r4, -7996(r1)
- // stw r5, -7992(r1)
+ // stw r5, -7992(r1)
// stw r6, -7988(r1)
// stw r7, -7984(r1)
- // stw r8, -7980(r1)
+ // stw r8, -7980(r1)
// stw r9, -7976(r1)
// stw r10,-7972(r1)
@@ -580,18 +580,18 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex,
// # now load up the vtableOffset
// lis r4, 0xdead
// ori r4,r4,0xbeef
-
+
// #now load up the pointer to the saved gpr registers
// addi r5,r1,-8000
// #now load up the pointer to the saved fpr registers
// addi r6,r1,-7968
-
+
// #now load up the pointer to the overflow call stack
- // addi r7,r1,24 # frame pointer plus 24
+ // addi r7,r1,24 # frame pointer plus 24
// bctr
-
+
unsigned long * p = (unsigned long *) code;
* p++ = 0x9061e0c0;
diff --git a/bridges/source/cpp_uno/gcc3_macosx_powerpc/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_powerpc/except.cxx
index abc3ad10fc37..fc0720a0e52d 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_powerpc/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_powerpc/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -55,7 +55,7 @@ using namespace ::__cxxabiv1;
namespace CPPU_CURRENT_NAMESPACE
{
-
+
void dummy_can_throw_anything( char const * )
{
}
@@ -66,13 +66,13 @@ 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
@@ -87,7 +87,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
if ('E' != *p)
buf.append( (sal_Unicode)'.' );
}
-
+
#ifdef DEBUG
OUString ret( buf.makeStringAndClear() );
OString c_ret( OUStringToOString( ret, RTL_TEXTENCODING_ASCII_US ) );
@@ -102,17 +102,17 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
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( () );
};
//__________________________________________________________________________________________________
@@ -130,9 +130,9 @@ RTTI::~RTTI() SAL_THROW( () )
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())
@@ -150,7 +150,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
}
while (index >= 0);
buf.append( 'E' );
-
+
OString symName( buf.makeStringAndClear() );
rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
@@ -186,7 +186,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
// 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?!" );
@@ -201,7 +201,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
{
rtti = iFind->second;
}
-
+
return rtti;
}
@@ -233,10 +233,10 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
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
@@ -260,7 +260,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
if (! rtti)
terminate();
}
-
+
__cxa_throw( pCppExc, rtti, deleteException );
}
@@ -270,14 +270,14 @@ void fillUnoException( __cxa_exception * header, uno_Any * pExc, uno_Mapping * p
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 );
diff --git a/bridges/source/cpp_uno/gcc3_macosx_powerpc/share.hxx b/bridges/source/cpp_uno/gcc3_macosx_powerpc/share.hxx
index 4ec09c29ff0a..aa802babac96 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_powerpc/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_powerpc/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -49,25 +49,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
diff --git a/bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx
index 39388fc602f0..09a1935c4598 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -64,7 +64,7 @@ static void callVirtualMethod(
// reference parameters are pointers
// the basic idea here is to use gpr[8] as a storage area for
- // the future values of registers r3 to r10 needed for the call,
+ // the future values of registers r3 to r10 needed for the call,
// and similarly fpr[13] as a storage area for the future values
// of floating point registers f1 to f13
@@ -91,10 +91,10 @@ static void callVirtualMethod(
// FIXME: I do not believe the following is true but we will keep the
// FIXME: extra space just to be safe until proven otherwise
-
- // Note: could require up to 2*nStackLongs words of parameter stack area
- // if the call has many float parameters (i.e. floats take up only 1
- // word on the stack but take 2 words in parameter area in the
+
+ // Note: could require up to 2*nStackLongs words of parameter stack area
+ // if the call has many float parameters (i.e. floats take up only 1
+ // word on the stack but take 2 words in parameter area in the
// stack frame .
@@ -117,12 +117,12 @@ static void callVirtualMethod(
// now we need to parse the entire signature string
- // until we get the END indicator
+ // until we get the END indicator
// treat complex return pointer like any other parameter
// parse the argument list up to the ending )
-
+
while (*pPT != 'X') {
c = *pPT;
switch (c) {
@@ -205,12 +205,12 @@ static void callVirtualMethod(
/* figure out the address of the function we need to invoke */
- off = nVtableIndex;
+ off = nVtableIndex;
off = off * 4; // 4 bytes per slot
mfunc = *((unsigned long **)pAdjustedThisPtr); // get the address of the vtable
- mfunc = (unsigned long *)((char *)mfunc + off); // get the address from the vtable entry at offset
+ mfunc = (unsigned long *)((char *)mfunc + off); // get the address from the vtable entry at offset
mfunc = *((unsigned long **)mfunc); // the function is stored at the address
- ptr = (void (*)())mfunc;
+ ptr = (void (*)())mfunc;
/* Set up the machine registers and invoke the function */
@@ -289,7 +289,7 @@ static void callVirtualMethod(
}
-//==================================================================================================
+//==================================================================================================
static void cpp_call(
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
bridges::cpp_uno::shared::VtableSlot aVtableSlot,
@@ -298,10 +298,10 @@ static void cpp_call(
void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
{
// max space for: [complex ret ptr], values|ptr ...
- char * pCppStack =
+ char * pCppStack =
(char *)alloca( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
- char * pCppStackStart = pCppStack;
-
+ char * pCppStackStart = pCppStack;
+
// need to know parameter types for callVirtualMethod so generate a signature string
char * pParamType = (char *) alloca(nParams+2);
char * pPT = pParamType;
@@ -310,9 +310,9 @@ static void cpp_call(
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 ))
@@ -322,7 +322,7 @@ static void cpp_call(
else
{
// complex return via ptr
- pCppReturn = *(void **)pCppStack
+ pCppReturn = *(void **)pCppStack
= (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize )
: pUnoReturn); // direct way
@@ -345,21 +345,21 @@ static void cpp_call(
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
+
+ if (!rParam.bOut
&& bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
uno_copyAndConvertData( pCppArgs[nPos] = pCppStack, pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
switch (pParamTypeDescr->eTypeClass)
{
@@ -423,7 +423,7 @@ static void cpp_call(
uno_copyAndConvertData(
*(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
pUnoArgs[nPos], pParamTypeDescr, pThis->getBridge()->getUno2Cpp() );
-
+
pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
// will be released at reconversion
ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
@@ -438,7 +438,7 @@ static void cpp_call(
}
pCppStack += sizeof(sal_Int32); // standard parameter length
}
-
+
// terminate the signature string
*pPT++='X';
*pPT=0;
@@ -452,13 +452,13 @@ static void cpp_call(
(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
// NO exception occured...
*ppUnoExc = 0;
-
+
// reconvert temporary params
for ( ; nTempIndizes--; )
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bIn)
{
if (pParams[nIndex].bOut) // inout
@@ -475,7 +475,7 @@ static void cpp_call(
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -490,7 +490,7 @@ static void cpp_call(
{
// fill uno exception
fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
+
// temporary params
for ( ; nTempIndizes--; )
{
@@ -514,10 +514,10 @@ void unoInterfaceProxyDispatch(
void * pReturn, void * pArgs[], uno_Any ** ppException )
{
// is my surrogate
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
+ bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
= static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * > (pUnoI);
- // typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
-
+ // typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
+
switch (pMemberDescr->eTypeClass)
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -544,14 +544,14 @@ void unoInterfaceProxyDispatch(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ 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(
@@ -559,10 +559,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -594,7 +594,7 @@ void unoInterfaceProxyDispatch(
(*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
pThis->pBridge->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -624,7 +624,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx
index 8b19ff92760c..3a068c4712f3 100644
--- a/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -62,10 +62,10 @@ static typelib_TypeClass cpp2uno_call(
typelib_TypeDescription * pReturnTypeDescr = 0;
if (pReturnTypeRef)
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
+
void * pUnoReturn = 0;
void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -76,7 +76,7 @@ static typelib_TypeClass cpp2uno_call(
{
pCppReturn = *(void **)pCppStack;
pCppStack += sizeof(void *);
-
+
pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType(
pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize )
@@ -95,9 +95,9 @@ static typelib_TypeClass cpp2uno_call(
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];
@@ -152,7 +152,7 @@ static typelib_TypeClass cpp2uno_call(
}
pCppStack += sizeof(sal_Int32); // standard parameter length
}
-
+
// ExceptionHolder
uno_Any aUnoExc = {0}; // Any will be constructed by callee
uno_Any * pUnoExc = &aUnoExc;
@@ -172,14 +172,14 @@ static typelib_TypeClass cpp2uno_call(
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
@@ -193,7 +193,7 @@ static typelib_TypeClass cpp2uno_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bOut) // inout/out
{
// convert and assign
@@ -203,7 +203,7 @@ static typelib_TypeClass cpp2uno_call(
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return
@@ -239,7 +239,7 @@ static typelib_TypeClass cpp_mediate(
sal_Int64 * pRegisterReturn /* space for register return */ )
{
OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
-
+
// pCallStack: ret adr, [ret *], this, params
void * pThis;
if( nFunctionIndex & 0x80000000 )
@@ -255,9 +255,9 @@ static typelib_TypeClass cpp_mediate(
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)
{
@@ -265,13 +265,13 @@ static typelib_TypeClass cpp_mediate(
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)
{
@@ -292,9 +292,9 @@ static typelib_TypeClass cpp_mediate(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -327,7 +327,7 @@ static typelib_TypeClass cpp_mediate(
pCppI->getBridge()->getCppEnv(),
(void **)&pInterface, pCppI->getOid().pData,
(typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -379,7 +379,7 @@ void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** pCallStack )
volatile long nRegReturn[2];
typelib_TypeClass aType = cpp_mediate(
nFunctionIndex, nVtableOffset, pCallStack, (sal_Int64*)nRegReturn );
-
+
switch( aType )
{
case typelib_TypeClass_HYPER:
@@ -400,11 +400,11 @@ void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** pCallStack )
"fldl %0\n"
: : "m"(*(double *)nRegReturn) );
break;
-// case typelib_TypeClass_UNSIGNED_SHORT:
-// case typelib_TypeClass_SHORT:
-// __asm__( "movswl %0, %%eax\n"
-// : : "m"(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]) );
diff --git a/bridges/source/cpp_uno/gcc3_os2_intel/except.cxx b/bridges/source/cpp_uno/gcc3_os2_intel/except.cxx
index 99c2f62d1476..ec8447ba417c 100644
--- a/bridges/source/cpp_uno/gcc3_os2_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_os2_intel/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -55,7 +55,7 @@ using namespace ::__cxxabiv1;
//==================================================================================================
//YD static handle to this dll, to allow rtti symbol lookup
-static void* hmod;
+static void* hmod;
//==================================================================================================
//YD required to run test programs, because exe cannot export symbols!
diff --git a/bridges/source/cpp_uno/gcc3_os2_intel/share.hxx b/bridges/source/cpp_uno/gcc3_os2_intel/share.hxx
index da2367ad172b..e4a6b379a840 100644
--- a/bridges/source/cpp_uno/gcc3_os2_intel/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_os2_intel/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -48,25 +48,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
diff --git a/bridges/source/cpp_uno/gcc3_os2_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_os2_intel/uno2cpp.cxx
index 64be1daa086e..d78ac1f62359 100644
--- a/bridges/source/cpp_uno/gcc3_os2_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_os2_intel/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -73,11 +73,11 @@ static void callVirtualMethod(
{
// parameter list is mixed list of * and values
// reference parameters are pointers
-
+
OSL_ENSURE( pStackLongs && pAdjustedThisPtr, "### null ptr!" );
OSL_ENSURE( (sizeof(void *) == 4) && (sizeof(sal_Int32) == 4), "### unexpected size of int!" );
OSL_ENSURE( nStackLongs && pStackLongs, "### no stack in callVirtualMethod !" );
-
+
// never called
if (! pAdjustedThisPtr) CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something
@@ -85,10 +85,10 @@ static void callVirtualMethod(
unsigned long * mfunc; // actual function to be invoked
int off; // offset used to find function
void (*ptr)();
- off = nVtableIndex;
+ off = nVtableIndex;
off = off * 4; // 4 bytes per slot
mfunc = *((unsigned long **)pAdjustedThisPtr); // get the address of the vtable
- mfunc = (unsigned long *)((char *)mfunc + off); // get the address from the vtable entry at offset
+ mfunc = (unsigned long *)((char *)mfunc + off); // get the address from the vtable entry at offset
mfunc = *((unsigned long **)mfunc); // the function is stored at the address
ptr = (void (*)())mfunc;
@@ -152,7 +152,7 @@ static void callVirtualMethod(
}
}
-//==================================================================================================
+//==================================================================================================
static void cpp_call(
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
bridges::cpp_uno::shared::VtableSlot aVtableSlot,
@@ -161,17 +161,17 @@ static void cpp_call(
void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
{
// max space for: [complex ret ptr], values|ptr ...
- char * pCppStack =
+ char * pCppStack =
(char *)alloca( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
- char * pCppStackStart = pCppStack;
-
+ char * pCppStackStart = pCppStack;
+
// return
typelib_TypeDescription * pReturnTypeDescr = 0;
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
-
+
void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -203,21 +203,21 @@ static void cpp_call(
sal_Int32 * pTempIndizes = (sal_Int32 *)(pCppArgs + nParams);
// type descriptions for reconversions
typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
-
+
sal_Int32 nTempIndizes = 0;
-
+
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
{
const typelib_MethodParameter & rParam = pParams[nPos];
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
+
if (!rParam.bOut
&& bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
uno_copyAndConvertData( pCppArgs[nPos] = pCppStack, pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
switch (pParamTypeDescr->eTypeClass)
{
case typelib_TypeClass_HYPER:
@@ -248,7 +248,7 @@ static void cpp_call(
*(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
// will be released at reconversion
ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
@@ -272,13 +272,13 @@ static void cpp_call(
(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
// NO exception occured...
*ppUnoExc = 0;
-
+
// reconvert temporary params
for ( ; nTempIndizes--; )
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bIn)
{
if (pParams[nIndex].bOut) // inout
@@ -295,7 +295,7 @@ static void cpp_call(
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -310,7 +310,7 @@ static void cpp_call(
{
// fill uno exception
fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
+
// temporary params
for ( ; nTempIndizes--; )
{
@@ -337,7 +337,7 @@ void unoInterfaceProxyDispatch(
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:
@@ -362,14 +362,14 @@ void unoInterfaceProxyDispatch(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ 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(
@@ -377,10 +377,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -411,7 +411,7 @@ void unoInterfaceProxyDispatch(
(*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
pThis->pBridge->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -441,7 +441,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx
index 1c16f6550120..36c1a14e7792 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -64,10 +64,10 @@ static typelib_TypeClass cpp2uno_call(
typelib_TypeDescription * pReturnTypeDescr = 0;
if (pReturnTypeRef)
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
+
void * pUnoReturn = 0;
void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -78,7 +78,7 @@ static typelib_TypeClass cpp2uno_call(
{
pCppReturn = *(void **)pCppStack;
pCppStack += sizeof(void *);
-
+
pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType(
pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize )
@@ -97,9 +97,9 @@ static typelib_TypeClass cpp2uno_call(
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];
@@ -154,7 +154,7 @@ static typelib_TypeClass cpp2uno_call(
}
pCppStack += sizeof(sal_Int32); // standard parameter length
}
-
+
// ExceptionHolder
uno_Any aUnoExc; // Any will be constructed by callee
uno_Any * pUnoExc = &aUnoExc;
@@ -162,7 +162,7 @@ static typelib_TypeClass cpp2uno_call(
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
-
+
// in case an exception occured...
if (pUnoExc)
{
@@ -170,14 +170,14 @@ static typelib_TypeClass cpp2uno_call(
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
@@ -191,7 +191,7 @@ static typelib_TypeClass cpp2uno_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bOut) // inout/out
{
// convert and assign
@@ -201,7 +201,7 @@ static typelib_TypeClass cpp2uno_call(
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return
@@ -237,7 +237,7 @@ static typelib_TypeClass cpp_mediate(
sal_Int64 * pRegisterReturn /* space for register return */ )
{
OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
-
+
// pCallStack: ret adr, [ret *], this, params
void * pThis;
if( nFunctionIndex & 0x80000000 )
@@ -253,9 +253,9 @@ static typelib_TypeClass cpp_mediate(
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)
{
@@ -263,13 +263,13 @@ static typelib_TypeClass cpp_mediate(
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)
{
@@ -290,9 +290,9 @@ static typelib_TypeClass cpp_mediate(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -325,7 +325,7 @@ static typelib_TypeClass cpp_mediate(
pCppI->getBridge()->getCppEnv(),
(void **)&pInterface, pCppI->getOid().pData,
(typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -377,7 +377,7 @@ void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** pCallStack )
volatile long nRegReturn[2];
typelib_TypeClass aType = cpp_mediate(
nFunctionIndex, nVtableOffset, pCallStack, (sal_Int64*)nRegReturn );
-
+
switch( aType )
{
case typelib_TypeClass_HYPER:
@@ -398,11 +398,11 @@ void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** pCallStack )
"fldl %0\n"
: : "m"(*(double *)nRegReturn) );
break;
-// case typelib_TypeClass_UNSIGNED_SHORT:
-// case typelib_TypeClass_SHORT:
-// __asm__( "movswl %0, %%eax\n"
-// : : "m"(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]) );
diff --git a/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx b/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx
index 5dfc476edafd..69d3881a7606 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/gcc3_solaris_intel/share.hxx b/bridges/source/cpp_uno/gcc3_solaris_intel/share.hxx
index da2367ad172b..e4a6b379a840 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_intel/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_intel/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -48,25 +48,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
diff --git a/bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx
index 8035256d4db8..d061e74fe83f 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -60,11 +60,11 @@ static void callVirtualMethod(
{
// parameter list is mixed list of * and values
// reference parameters are pointers
-
+
OSL_ENSURE( pStackLongs && pAdjustedThisPtr, "### null ptr!" );
OSL_ENSURE( (sizeof(void *) == 4) && (sizeof(sal_Int32) == 4), "### unexpected size of int!" );
OSL_ENSURE( nStackLongs && pStackLongs, "### no stack in callVirtualMethod !" );
-
+
// never called
if (! pAdjustedThisPtr) CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something
@@ -128,7 +128,7 @@ static void callVirtualMethod(
}
}
-//==================================================================================================
+//==================================================================================================
static void cpp_call(
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
bridges::cpp_uno::shared::VtableSlot aVtableSlot,
@@ -137,17 +137,17 @@ static void cpp_call(
void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
{
// max space for: [complex ret ptr], values|ptr ...
- char * pCppStack =
+ char * pCppStack =
(char *)alloca( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
- char * pCppStackStart = pCppStack;
-
+ char * pCppStackStart = pCppStack;
+
// return
typelib_TypeDescription * pReturnTypeDescr = 0;
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
-
+
void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -179,21 +179,21 @@ static void cpp_call(
sal_Int32 * pTempIndizes = (sal_Int32 *)(pCppArgs + nParams);
// type descriptions for reconversions
typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
-
+
sal_Int32 nTempIndizes = 0;
-
+
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
{
const typelib_MethodParameter & rParam = pParams[nPos];
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
+
if (!rParam.bOut
&& bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
uno_copyAndConvertData( pCppArgs[nPos] = pCppStack, pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
switch (pParamTypeDescr->eTypeClass)
{
case typelib_TypeClass_HYPER:
@@ -224,7 +224,7 @@ static void cpp_call(
*(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
// will be released at reconversion
ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
@@ -248,13 +248,13 @@ static void cpp_call(
(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
// NO exception occured...
*ppUnoExc = 0;
-
+
// reconvert temporary params
for ( ; nTempIndizes--; )
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bIn)
{
if (pParams[nIndex].bOut) // inout
@@ -271,7 +271,7 @@ static void cpp_call(
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -286,7 +286,7 @@ static void cpp_call(
{
// fill uno exception
fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
+
// temporary params
for ( ; nTempIndizes--; )
{
@@ -313,7 +313,7 @@ void unoInterfaceProxyDispatch(
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:
@@ -338,14 +338,14 @@ void unoInterfaceProxyDispatch(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ 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(
@@ -353,10 +353,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -387,7 +387,7 @@ void unoInterfaceProxyDispatch(
(*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
pThis->pBridge->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -417,7 +417,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx
index e6b0273b97a9..1fb537cd474c 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -58,10 +58,10 @@ static typelib_TypeClass cpp2uno_call(
typelib_TypeDescription * pReturnTypeDescr = 0;
if (pReturnTypeRef)
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
+
void * pUnoReturn = 0;
void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -88,9 +88,9 @@ static typelib_TypeClass cpp2uno_call(
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];
@@ -155,14 +155,14 @@ static typelib_TypeClass cpp2uno_call(
}
pCppStack += sizeof(sal_Int32); // standard parameter length
}
-
+
// ExceptionHolder
uno_Any aUnoExc; // Any will be constructed by callee
uno_Any * pUnoExc = &aUnoExc;
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)(pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
-
+
// in case an exception occured...
if (pUnoExc)
{
@@ -170,7 +170,7 @@ static typelib_TypeClass cpp2uno_call(
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] );
@@ -189,7 +189,7 @@ static typelib_TypeClass cpp2uno_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bOut) // inout/out
{
// convert and assign
@@ -199,7 +199,7 @@ static typelib_TypeClass cpp2uno_call(
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return
@@ -229,9 +229,9 @@ static typelib_TypeClass cpp2uno_call(
//==================================================================================================
static typelib_TypeClass cpp_mediate(
- sal_Int32 nFunctionIndex,
- sal_Int32 nVtableOffset,
- void ** pCallStack,
+ sal_Int32 nFunctionIndex,
+ sal_Int32 nVtableOffset,
+ void ** pCallStack,
sal_Int64 * pRegisterReturn /* space for register return */ )
{
OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
@@ -258,7 +258,7 @@ static typelib_TypeClass cpp_mediate(
{
throw RuntimeException( rtl::OUString::createFromAscii("illegal vtable index!"), (XInterface *)pCppI );
}
-
+
// determine called method
sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member index!" );
@@ -290,9 +290,9 @@ static typelib_TypeClass cpp_mediate(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -324,7 +324,7 @@ static typelib_TypeClass cpp_mediate(
(*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
pCppI->getBridge()->getCppEnv(),
(void **)&pInterface, pCppI->getOid().pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -378,8 +378,8 @@ static void cpp_vtable_call()
"st %%i2, %2\n\t"
: : "m"(nFunctionIndex), "m"(pCallStack), "m"(vTableOffset) );
-// fprintf(stderr,"cpp_mediate nFunctionIndex=%x\n",nFunctionIndex);
-// fflush(stderr);
+// fprintf(stderr,"cpp_mediate nFunctionIndex=%x\n",nFunctionIndex);
+// fflush(stderr);
sal_Bool bComplex = nFunctionIndex & 0x80000000 ? sal_True : sal_False;
typelib_TypeClass aType =
diff --git a/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx b/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx
index 8d0be02e7d93..6833b9ed13ff 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -54,7 +54,7 @@ using namespace ::__cxxabiv1;
namespace CPPU_CURRENT_NAMESPACE
{
-
+
void dummy_can_throw_anything( char const * )
{
}
@@ -65,13 +65,13 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
#if defined BRIDGES_DEBUG
char const * start = p;
#endif
-
+
// example: N3com3sun4star4lang24IllegalArgumentExceptionE
-
+
OUStringBuffer buf( 64 );
OSL_ASSERT( 'N' == *p );
++p; // skip N
-
+
while ('E' != *p)
{
// read chars count
@@ -86,7 +86,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
if ('E' != *p)
buf.append( (sal_Unicode)'.' );
}
-
+
#if defined BRIDGES_DEBUG
OUString ret( buf.makeStringAndClear() );
OString c_ret( OUStringToOString( ret, RTL_TEXTENCODING_ASCII_US ) );
@@ -101,17 +101,17 @@ static OUString toUNOname( char const * p ) SAL_THROW( () )
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( () );
};
//__________________________________________________________________________________________________
@@ -129,9 +129,9 @@ RTTI::~RTTI() SAL_THROW( () )
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())
@@ -149,7 +149,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
}
while (index >= 0);
buf.append( 'E' );
-
+
OString symName( buf.makeStringAndClear() );
rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
@@ -185,7 +185,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
// 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?!" );
@@ -200,7 +200,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
{
rtti = iFind->second;
}
-
+
return rtti;
}
@@ -244,10 +244,10 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
*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
@@ -276,7 +276,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
Reference< XInterface >() );
}
}
-
+
__cxa_throw( pCppExc, rtti, deleteException );
}
@@ -296,7 +296,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
#endif
return;
}
-
+
typelib_TypeDescription * pExcTypeDescr = 0;
OUString unoName( toUNOname( header->exceptionType->name() ) );
#if defined BRIDGES_DEBUG
diff --git a/bridges/source/cpp_uno/gcc3_solaris_sparc/share.hxx b/bridges/source/cpp_uno/gcc3_solaris_sparc/share.hxx
index 3526f19082cd..eb1cb12f53a9 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_sparc/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_sparc/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -43,25 +43,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
diff --git a/bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx
index b1c2767609f4..5d844835803d 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -104,7 +104,7 @@ void callVirtualMethod( void * pAdjustedThisPtr,
"mov %%l1, %%l7\n\t"
// increase our own stackframe if necessary
- "mov %%sp, %%l3\n\t" // save stack ptr for readjustment
+ "mov %%sp, %%l3\n\t" // save stack ptr for readjustment
"subcc %%i5, 7, %%l0\n\t"
"ble .LmoveOn\n\t"
@@ -112,14 +112,14 @@ void callVirtualMethod( void * pAdjustedThisPtr,
"sll %%l0, 2, %%l0\n\t"
"add %%l0, 96, %%l0\n\t"
- "mov %%sp, %%l1\n\t" // old stack ptr
- "sub %%sp, %%l0, %%l0\n\t" // future stack ptr
- "andcc %%l0, 7, %%g0\n\t" // align stack to 8
+ "mov %%sp, %%l1\n\t" // old stack ptr
+ "sub %%sp, %%l0, %%l0\n\t" // future stack ptr
+ "andcc %%l0, 7, %%g0\n\t" // align stack to 8
"be .LisAligned\n\t"
"nop\n\t"
"sub %%l0, 4, %%l0\n"
".LisAligned:\n\t"
- "mov %%l0, %%o5\n\t" // save newly computed stack ptr
+ "mov %%l0, %%o5\n\t" // save newly computed stack ptr
"add %%g0, 16, %%o4\n"
// now copy longs down to save register window
@@ -132,11 +132,11 @@ void callVirtualMethod( void * pAdjustedThisPtr,
"subcc %%o4, 1, %%o4\n\t"
"bne .LcopyDown\n\t"
- "mov %%o5, %%sp\n\t" // move new stack ptr (hopefully) atomically
+ "mov %%o5, %%sp\n\t" // move new stack ptr (hopefully) atomically
// while register window is valid in both spaces
// (scheduling might hit in copyDown loop)
- "sub %%i5, 7, %%l0\n\t" // copy parameters past the sixth to stack
+ "sub %%i5, 7, %%l0\n\t" // copy parameters past the sixth to stack
"add %%i4, 28, %%l1\n\t"
"add %%sp, 92, %%l2\n"
".LcopyLong:\n\t"
@@ -149,10 +149,10 @@ void callVirtualMethod( void * pAdjustedThisPtr,
"nop\n"
".LmoveOn:\n\t"
- "mov %%i5, %%l0\n\t" // prepare out registers
+ "mov %%i5, %%l0\n\t" // prepare out registers
"mov %%i4, %%l1\n\t"
- "ld [%%l1], %%o0\n\t" // prepare complex return ptr
+ "ld [%%l1], %%o0\n\t" // prepare complex return ptr
"st %%o0, [%%sp+64]\n\t"
"sub %%l0, 1, %%l0\n\t"
"add %%l1, 4, %%l1\n\t"
@@ -190,20 +190,20 @@ void callVirtualMethod( void * pAdjustedThisPtr,
"ld [%%l1], %%o5\n"
".LdoCall:\n\t"
- "ld [%%i0], %%l0\n\t" // get vtable ptr
+ "ld [%%i0], %%l0\n\t" // get vtable ptr
"sll %%i1, 2, %%l6\n\t"
// "add %%l6, 8, %%l6\n\t"
"add %%l6, %%l0, %%l0\n\t"
-// // vtable has 8byte wide entries,
-// // upper half contains 2 half words, of which the first
-// // is the this ptr patch !
-// // first entry is (or __tf)
+// // vtable has 8byte wide entries,
+// // upper half contains 2 half words, of which the first
+// // is the this ptr patch !
+// // first entry is (or __tf)
-// "ldsh [%%l0], %%l6\n\t" // load this ptr patch
-// "add %%l6, %%o0, %%o0\n\t" // patch this ptr
+// "ldsh [%%l0], %%l6\n\t" // load this ptr patch
+// "add %%l6, %%o0, %%o0\n\t" // patch this ptr
-// "add %%l0, 4, %%l0\n\t" // get virtual function ptr
+// "add %%l0, 4, %%l0\n\t" // get virtual function ptr
"ld [%%l0], %%l0\n\t"
"ld [%%i4], %%l2\n\t"
@@ -220,8 +220,8 @@ void callVirtualMethod( void * pAdjustedThisPtr,
"unimp\n"
".LcallReturned:\n\t"
- "mov %%l3, %%sp\n\t" // readjust stack so that our locals are where they belong
- "st %%o0, %0\n\t" // save possible return registers into our locals
+ "mov %%l3, %%sp\n\t" // readjust stack so that our locals are where they belong
+ "st %%o0, %0\n\t" // save possible return registers into our locals
"st %%o1, %1\n\t"
"std %%f0, %2\n\t"
"st %%f0, %3\n\t"
@@ -284,17 +284,17 @@ static void cpp_call(
void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
{
// max space for: complex ret ptr, this, values|ptr ...
- char * pCppStack =
+ char * pCppStack =
(char *)alloca( (nParams+2) * sizeof(sal_Int64) );
- char * pCppStackStart = pCppStack;
-
+ char * pCppStackStart = pCppStack;
+
// return
typelib_TypeDescription * pReturnTypeDescr = 0;
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
-
+
void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -325,9 +325,9 @@ static void cpp_call(
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];
@@ -336,7 +336,7 @@ static void cpp_call(
if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
pCppArgs[ nPos ] = CPPU_CURRENT_NAMESPACE::adjustPointer(pCppStack, pParamTypeDescr );
-
+
switch (pParamTypeDescr->eTypeClass)
{
case typelib_TypeClass_HYPER:
@@ -378,7 +378,7 @@ static void cpp_call(
*(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
// will be released at reconversion
ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
@@ -397,7 +397,7 @@ static void cpp_call(
{
int nStackLongs = (pCppStack - pCppStackStart)/sizeof(sal_Int32);
OSL_ENSURE( !( (pCppStack - pCppStackStart ) & 3), "UNALIGNED STACK !!! (Please DO panic" );
-
+
if( nStackLongs & 1 )
// stack has to be 8 byte aligned
nStackLongs++;
@@ -416,7 +416,7 @@ static void cpp_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bIn)
{
if (pParams[nIndex].bOut) // inout
@@ -433,7 +433,7 @@ static void cpp_call(
}
// destroy temp cpp param => cpp: every param was constructed
uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -447,7 +447,7 @@ static void cpp_call(
catch( ... )
{
// get exception
- fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
+ fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions,
*ppUnoExc, pThis->getBridge()->getCpp2Uno() );
// temporary params
@@ -476,12 +476,12 @@ void unoInterfaceProxyDispatch(
OString cstr( OUStringToOString( pMemberDescr->pTypeName, RTL_TEXTENCODING_ASCII_US ) );
fprintf( stderr, "received dispatch( %s )\n", cstr.getStr() );
#endif
-
+
// 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:
@@ -506,14 +506,14 @@ void unoInterfaceProxyDispatch(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ 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(
@@ -524,7 +524,7 @@ void unoInterfaceProxyDispatch(
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -555,7 +555,7 @@ void unoInterfaceProxyDispatch(
(*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
pThis->pBridge->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -585,7 +585,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx b/bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx
index cd74da7462df..67864122bd2b 100644
--- a/bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -64,10 +64,10 @@ void cpp2uno_call(
typelib_TypeDescription * pReturnTypeDescr = 0;
if (pReturnTypeRef)
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
+
void * pUnoReturn = 0;
void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -83,7 +83,7 @@ void cpp2uno_call(
else {
pCppReturn = pReturnValue;
}
-
+
pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType(
pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize )
@@ -102,9 +102,9 @@ void cpp2uno_call(
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];
@@ -162,7 +162,7 @@ void cpp2uno_call(
}
pCppStack += sizeof(sal_Int32); // standard parameter length
}
-
+
// ExceptionHolder
uno_Any aUnoExc; // Any will be constructed by callee
uno_Any * pUnoExc = &aUnoExc;
@@ -170,7 +170,7 @@ void cpp2uno_call(
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
-
+
// in case an exception occured...
if (pUnoExc)
{
@@ -178,14 +178,14 @@ void cpp2uno_call(
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
@@ -197,7 +197,7 @@ void cpp2uno_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bOut) // inout/out
{
// convert and assign
@@ -207,7 +207,7 @@ void cpp2uno_call(
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return
@@ -238,7 +238,7 @@ extern "C" void cpp_vtable_call(
void * pReturnValue )
{
OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
-
+
// pCallStack: ret adr, [ret *], this, params
void * pThis;
if( nFunctionIndex & 0x80000000 )
@@ -254,9 +254,9 @@ extern "C" void cpp_vtable_call(
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)
{
@@ -264,13 +264,13 @@ extern "C" void cpp_vtable_call(
rtl::OUString::createFromAscii("illegal vtable index!"),
(XInterface *)pThis );
}
-
+
// determine called method
sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member index!" );
TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
-
+
switch (aMemberDescr.get()->eTypeClass)
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -290,9 +290,9 @@ extern "C" void cpp_vtable_call(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -323,7 +323,7 @@ extern "C" void cpp_vtable_call(
pCppI->getBridge()->getCppEnv(),
(void **)&pInterface, pCppI->getOid().pData,
(typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -374,9 +374,9 @@ unsigned char * codeSnippet(
typelib_TypeDescription * returnTypeDescr = 0;
if (returnType)
TYPELIB_DANGER_GET( &returnTypeDescr, returnType );
-
+
typelib_TypeClass returnTypeClass = returnType ? returnType->eTypeClass : typelib_TypeClass_VOID;
- if (!bridges::cpp_uno::shared::isSimpleType(returnTypeClass) &&
+ if (!bridges::cpp_uno::shared::isSimpleType(returnTypeClass) &&
!bridges::cpp_uno::shared::isSmallStruct(returnTypeDescr)) {
functionIndex |= 0x80000000;
}
diff --git a/bridges/source/cpp_uno/mingw_intel/dllinit.cxx b/bridges/source/cpp_uno/mingw_intel/dllinit.cxx
index d215a3124470..8cc2af733a25 100644
--- a/bridges/source/cpp_uno/mingw_intel/dllinit.cxx
+++ b/bridges/source/cpp_uno/mingw_intel/dllinit.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -33,7 +33,7 @@
#include <windows.h>
-
+
void dso_init(void);
void dso_exit(void);
diff --git a/bridges/source/cpp_uno/mingw_intel/except.cxx b/bridges/source/cpp_uno/mingw_intel/except.cxx
index 7a4aca8b1b4d..7ad94a9ac65f 100644
--- a/bridges/source/cpp_uno/mingw_intel/except.cxx
+++ b/bridges/source/cpp_uno/mingw_intel/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/mingw_intel/share.hxx b/bridges/source/cpp_uno/mingw_intel/share.hxx
index da2367ad172b..e4a6b379a840 100644
--- a/bridges/source/cpp_uno/mingw_intel/share.hxx
+++ b/bridges/source/cpp_uno/mingw_intel/share.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -48,25 +48,25 @@ struct _Unwind_Exception
} __attribute__((__aligned__));
struct __cxa_exception
-{
+{
::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
+ 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();
diff --git a/bridges/source/cpp_uno/mingw_intel/smallstruct.cxx b/bridges/source/cpp_uno/mingw_intel/smallstruct.cxx
index bcfb0df87902..7e8fff8345c7 100644
--- a/bridges/source/cpp_uno/mingw_intel/smallstruct.cxx
+++ b/bridges/source/cpp_uno/mingw_intel/smallstruct.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/mingw_intel/smallstruct.hxx b/bridges/source/cpp_uno/mingw_intel/smallstruct.hxx
index f1eae96e6734..d24d5b274d60 100644
--- a/bridges/source/cpp_uno/mingw_intel/smallstruct.hxx
+++ b/bridges/source/cpp_uno/mingw_intel/smallstruct.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx b/bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx
index cbbe1312c464..8cf382211680 100644
--- a/bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -73,11 +73,11 @@ void callVirtualMethod(
{
// parameter list is mixed list of * and values
// reference parameters are pointers
-
+
OSL_ENSURE( pStackLongs && pAdjustedThisPtr, "### null ptr!" );
OSL_ENSURE( (sizeof(void *) == 4) && (sizeof(sal_Int32) == 4), "### unexpected size of int!" );
OSL_ENSURE( nStackLongs && pStackLongs, "### no stack in callVirtualMethod !" );
-
+
// never called
if (! pAdjustedThisPtr) CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something
@@ -161,7 +161,7 @@ void callVirtualMethod(
}
}
-//==================================================================================================
+//==================================================================================================
static void cpp_call(
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
bridges::cpp_uno::shared::VtableSlot aVtableSlot,
@@ -170,21 +170,21 @@ static void cpp_call(
void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
{
// max space for: [complex ret ptr], values|ptr ...
- char * pCppStack =
+ char * pCppStack =
#ifdef BROKEN_ALLOCA
(char *)malloc( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
#else
(char *)alloca( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
#endif
- char * pCppStackStart = pCppStack;
-
+ char * pCppStackStart = pCppStack;
+
// return
typelib_TypeDescription * pReturnTypeDescr = 0;
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
-
+
void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -227,21 +227,21 @@ static void cpp_call(
sal_Int32 * pTempIndizes = (sal_Int32 *)(pCppArgs + nParams);
// type descriptions for reconversions
typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
-
+
sal_Int32 nTempIndizes = 0;
-
+
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
{
const typelib_MethodParameter & rParam = pParams[nPos];
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
+
if (!rParam.bOut
&& bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
uno_copyAndConvertData( pCppArgs[nPos] = pCppStack, pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
switch (pParamTypeDescr->eTypeClass)
{
case typelib_TypeClass_HYPER:
@@ -283,7 +283,7 @@ static void cpp_call(
#endif
pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
// will be released at reconversion
ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
@@ -307,13 +307,13 @@ static void cpp_call(
(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
// NO exception occured...
*ppUnoExc = 0;
-
+
// reconvert temporary params
for ( ; nTempIndizes--; )
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bIn)
{
if (pParams[nIndex].bOut) // inout
@@ -333,7 +333,7 @@ static void cpp_call(
#ifdef BROKEN_ALLOCA
free( pCppArgs[nIndex] );
#endif
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -348,7 +348,7 @@ static void cpp_call(
{
// fill uno exception
fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
+
// temporary params
for ( ; nTempIndizes--; )
{
@@ -386,7 +386,7 @@ void unoInterfaceProxyDispatch(
// is my surrogate
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
= static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI);
-
+
switch (pMemberDescr->eTypeClass)
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -411,14 +411,14 @@ void unoInterfaceProxyDispatch(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ 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(
@@ -426,10 +426,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -460,7 +460,7 @@ void unoInterfaceProxyDispatch(
(*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
pThis->pBridge->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -490,7 +490,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx b/bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx
index b2687fddc543..34e0de99c86f 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -287,8 +287,8 @@ static typelib_TypeClass __cdecl cpp_mediate(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
@@ -370,40 +370,40 @@ static __declspec(naked) void __cdecl cpp_vtable_call(void)
{
__asm
{
- sub esp, 8 // space for immediate return type
- push esp
+ sub esp, 8 // space for immediate return type
+ push esp
push edx // vtable offset
- push eax // function index
- mov eax, esp
- add eax, 20
- push eax // original stack ptr
-
- call cpp_mediate
- add esp, 16
-
- cmp eax, typelib_TypeClass_FLOAT
- je Lfloat
- cmp eax, typelib_TypeClass_DOUBLE
- je Ldouble
- cmp eax, typelib_TypeClass_HYPER
- je Lhyper
- cmp eax, typelib_TypeClass_UNSIGNED_HYPER
- je Lhyper
+ push eax // function index
+ mov eax, esp
+ add eax, 20
+ push eax // original stack ptr
+
+ call cpp_mediate
+ add esp, 16
+
+ cmp eax, typelib_TypeClass_FLOAT
+ je Lfloat
+ cmp eax, typelib_TypeClass_DOUBLE
+ je Ldouble
+ cmp eax, typelib_TypeClass_HYPER
+ je Lhyper
+ cmp eax, typelib_TypeClass_UNSIGNED_HYPER
+ je Lhyper
// rest is eax
- pop eax
- add esp, 4
+ pop eax
+ add esp, 4
ret
Lhyper:
- pop eax
- pop edx
+ pop eax
+ pop edx
ret
Lfloat:
- fld dword ptr [esp]
- add esp, 8
+ fld dword ptr [esp]
+ add esp, 8
ret
Ldouble:
- fld qword ptr [esp]
- add esp, 8
+ fld qword ptr [esp]
+ add esp, 8
ret
}
}
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx b/bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx
index cfbc58650f0d..4505157e2143 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -35,7 +35,7 @@
#include <windows.h>
#pragma warning(pop)
-
+
void dso_init(void);
void dso_exit(void);
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
index 4bda7cfa9074..a7648d2922d4 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -102,8 +102,8 @@ typedef hash_map< OUString, void *, OUStringHash, equal_to< OUString > > t_strin
//==================================================================================================
class RTTInfos
{
- Mutex _aMutex;
- t_string2PtrMap _allRTTI;
+ Mutex _aMutex;
+ t_string2PtrMap _allRTTI;
static OUString toRawName( OUString const & rUNOname ) throw ();
public:
@@ -199,12 +199,12 @@ struct ObjectFunction
inline static void * operator new ( size_t nSize );
inline static void operator delete ( void * pMem );
-
+
ObjectFunction( typelib_TypeDescription * pTypeDescr, void * fpFunc ) throw ();
~ObjectFunction() throw ();
};
-inline void * ObjectFunction::operator new ( size_t nSize )
+inline void * ObjectFunction::operator new ( size_t nSize )
{
void * pMem = rtl_allocateMemory( nSize );
if (pMem != 0)
@@ -272,7 +272,7 @@ static __declspec(naked) void copyConstruct() throw ()
{
// ObjectFunction this already on stack
push [esp+8] // source exc object this
- push ecx // exc object
+ push ecx // exc object
call __copyConstruct
add esp, 12 // + ObjectFunction this
ret 4
@@ -284,7 +284,7 @@ static __declspec(naked) void destruct() throw ()
__asm
{
// ObjectFunction this already on stack
- push ecx // exc object
+ push ecx // exc object
call __destruct
add esp, 8 // + ObjectFunction this
ret
@@ -294,11 +294,11 @@ static __declspec(naked) void destruct() throw ()
//==================================================================================================
struct ExceptionType
{
- sal_Int32 _n0;
- type_info * _pTypeInfo;
- sal_Int32 _n1, _n2, _n3, _n4;
- ObjectFunction * _pCopyCtor;
- sal_Int32 _n5;
+ sal_Int32 _n0;
+ type_info * _pTypeInfo;
+ sal_Int32 _n1, _n2, _n3, _n4;
+ ObjectFunction * _pCopyCtor;
+ sal_Int32 _n5;
inline ExceptionType( typelib_TypeDescription * pTypeDescr ) throw ()
: _n0( 0 )
@@ -315,11 +315,11 @@ struct ExceptionType
//==================================================================================================
struct RaiseInfo
{
- sal_Int32 _n0;
- ObjectFunction * _pDtor;
- sal_Int32 _n2;
- void * _types;
- sal_Int32 _n3, _n4;
+ sal_Int32 _n0;
+ ObjectFunction * _pDtor;
+ sal_Int32 _n2;
+ void * _types;
+ sal_Int32 _n3, _n4;
RaiseInfo( typelib_TypeDescription * pTypeDescr ) throw ();
~RaiseInfo() throw ();
@@ -374,8 +374,8 @@ RaiseInfo::~RaiseInfo() throw ()
//==================================================================================================
class ExceptionInfos
{
- Mutex _aMutex;
- t_string2PtrMap _allRaiseInfos;
+ Mutex _aMutex;
+ t_string2PtrMap _allRaiseInfos;
public:
static void * getRaiseInfo( typelib_TypeDescription * pTypeDescr ) throw ();
@@ -393,7 +393,7 @@ ExceptionInfos::~ExceptionInfos() throw ()
#if OSL_DEBUG_LEVEL > 1
OSL_TRACE( "> freeing exception infos... <\n" );
#endif
-
+
MutexGuard aGuard( _aMutex );
for ( t_string2PtrMap::const_iterator iPos( _allRaiseInfos.begin() );
iPos != _allRaiseInfos.end(); ++iPos )
@@ -513,7 +513,7 @@ int msci_filterCppException(
// handle only C++ exceptions:
if (pRecord == 0 || pRecord->ExceptionCode != MSVC_ExceptionCode)
return EXCEPTION_CONTINUE_SEARCH;
-
+
#if _MSC_VER < 1300 // MSVC -6
bool rethrow = (pRecord->NumberParameters < 3 ||
pRecord->ExceptionInformation[ 2 ] == 0);
@@ -546,9 +546,9 @@ int msci_filterCppException(
// rethrow: handle only C++ exceptions:
if (pRecord == 0 || pRecord->ExceptionCode != MSVC_ExceptionCode)
return EXCEPTION_CONTINUE_SEARCH;
-
+
if (pRecord->NumberParameters == 3 &&
-// pRecord->ExceptionInformation[ 0 ] == MSVC_magic_number &&
+// pRecord->ExceptionInformation[ 0 ] == MSVC_magic_number &&
pRecord->ExceptionInformation[ 1 ] != 0 &&
pRecord->ExceptionInformation[ 2 ] != 0)
{
@@ -566,7 +566,7 @@ int msci_filterCppException(
pType->_pTypeInfo )->_m_d_name,
RTL_TEXTENCODING_ASCII_US ) );
OUString aUNOname( toUNOname( aRTTIname ) );
-
+
typelib_TypeDescription * pExcTypeDescr = 0;
typelib_typedescription_getByName(
&pExcTypeDescr, aUNOname.pData );
@@ -610,7 +610,7 @@ int msci_filterCppException(
#endif
typelib_typedescription_release( pExcTypeDescr );
}
-
+
return EXCEPTION_EXECUTE_HANDLER;
}
}
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/msci.hxx b/bridges/source/cpp_uno/msvc_win32_intel/msci.hxx
index ecc4e22960d7..7f8cf6ed746c 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/msci.hxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/msci.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -45,7 +45,7 @@ const long MSVC_magic_number = 0x19930520L;
//==============================================================================
type_info * msci_getRTTI( ::rtl::OUString const & rUNOname );
-
+
//==============================================================================
int msci_filterCppException(
EXCEPTION_POINTERS * pPointers, uno_Any * pUnoExc, uno_Mapping * pCpp2Uno );
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/uno2cpp.cxx b/bridges/source/cpp_uno/msvc_win32_intel/uno2cpp.cxx
index 0a131e94a05b..1667e216e3be 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/uno2cpp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -59,91 +59,91 @@ inline static void callVirtualMethod(
OSL_ENSURE( pStackLongs && pAdjustedThisPtr, "### null ptr!" );
OSL_ENSURE( (sizeof(void *) == 4) &&
(sizeof(sal_Int32) == 4), "### unexpected size of int!" );
-
+
__asm
{
- mov eax, nStackLongs
- test eax, eax
- je Lcall
+ mov eax, nStackLongs
+ test eax, eax
+ je Lcall
// copy values
- mov ecx, eax
- shl eax, 2 // sizeof(sal_Int32) == 4
- add eax, pStackLongs // params stack space
-Lcopy: sub eax, 4
- push dword ptr [eax]
- dec ecx
- jne Lcopy
+ mov ecx, eax
+ shl eax, 2 // sizeof(sal_Int32) == 4
+ add eax, pStackLongs // params stack space
+Lcopy: sub eax, 4
+ push dword ptr [eax]
+ dec ecx
+ jne Lcopy
Lcall:
// call
- mov ecx, pAdjustedThisPtr
- push ecx // this ptr
- mov edx, [ecx] // pvft
- mov eax, nVtableIndex
- shl eax, 2 // sizeof(void *) == 4
- add edx, eax
- call [edx] // interface method call must be __cdecl!!!
+ mov ecx, pAdjustedThisPtr
+ push ecx // this ptr
+ mov edx, [ecx] // pvft
+ mov eax, nVtableIndex
+ shl eax, 2 // sizeof(void *) == 4
+ add edx, eax
+ call [edx] // interface method call must be __cdecl!!!
// register return
- mov ecx, eReturnTypeClass
- cmp ecx, typelib_TypeClass_VOID
- je Lcleanup
- mov ebx, pRegisterReturn
+ mov ecx, eReturnTypeClass
+ cmp ecx, typelib_TypeClass_VOID
+ je Lcleanup
+ mov ebx, pRegisterReturn
// int32
- cmp ecx, typelib_TypeClass_LONG
- je Lint32
- cmp ecx, typelib_TypeClass_UNSIGNED_LONG
- je Lint32
- cmp ecx, typelib_TypeClass_ENUM
- je Lint32
+ cmp ecx, typelib_TypeClass_LONG
+ je Lint32
+ cmp ecx, typelib_TypeClass_UNSIGNED_LONG
+ je Lint32
+ cmp ecx, typelib_TypeClass_ENUM
+ je Lint32
// int8
- cmp ecx, typelib_TypeClass_BOOLEAN
- je Lint8
- cmp ecx, typelib_TypeClass_BYTE
- je Lint8
+ cmp ecx, typelib_TypeClass_BOOLEAN
+ je Lint8
+ cmp ecx, typelib_TypeClass_BYTE
+ je Lint8
// int16
- cmp ecx, typelib_TypeClass_CHAR
- je Lint16
- cmp ecx, typelib_TypeClass_SHORT
- je Lint16
- cmp ecx, typelib_TypeClass_UNSIGNED_SHORT
- je Lint16
+ cmp ecx, typelib_TypeClass_CHAR
+ je Lint16
+ cmp ecx, typelib_TypeClass_SHORT
+ je Lint16
+ cmp ecx, typelib_TypeClass_UNSIGNED_SHORT
+ je Lint16
// float
- cmp ecx, typelib_TypeClass_FLOAT
- je Lfloat
+ cmp ecx, typelib_TypeClass_FLOAT
+ je Lfloat
// double
- cmp ecx, typelib_TypeClass_DOUBLE
- je Ldouble
+ cmp ecx, typelib_TypeClass_DOUBLE
+ je Ldouble
// int64
- cmp ecx, typelib_TypeClass_HYPER
- je Lint64
- cmp ecx, typelib_TypeClass_UNSIGNED_HYPER
- je Lint64
- jmp Lcleanup // no simple type
+ cmp ecx, typelib_TypeClass_HYPER
+ je Lint64
+ cmp ecx, typelib_TypeClass_UNSIGNED_HYPER
+ je Lint64
+ jmp Lcleanup // no simple type
Lint8:
- mov byte ptr [ebx], al
- jmp Lcleanup
+ mov byte ptr [ebx], al
+ jmp Lcleanup
Lint16:
- mov word ptr [ebx], ax
- jmp Lcleanup
+ mov word ptr [ebx], ax
+ jmp Lcleanup
Lfloat:
- fstp dword ptr [ebx]
- jmp Lcleanup
+ fstp dword ptr [ebx]
+ jmp Lcleanup
Ldouble:
- fstp qword ptr [ebx]
- jmp Lcleanup
+ fstp qword ptr [ebx]
+ jmp Lcleanup
Lint64:
- mov dword ptr [ebx], eax
- mov dword ptr [ebx+4], edx
- jmp Lcleanup
+ mov dword ptr [ebx], eax
+ mov dword ptr [ebx+4], edx
+ jmp Lcleanup
Lint32:
- mov dword ptr [ebx], eax
- jmp Lcleanup
+ mov dword ptr [ebx], eax
+ jmp Lcleanup
Lcleanup:
// cleanup stack (obsolete though because of function)
- mov eax, nStackLongs
- shl eax, 2 // sizeof(sal_Int32) == 4
- add eax, 4 // this ptr
- add esp, eax
+ mov eax, nStackLongs
+ shl eax, 2 // sizeof(sal_Int32) == 4
+ add eax, 4 // this ptr
+ add esp, eax
}
}
@@ -156,16 +156,16 @@ static void cpp_call(
void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc ) throw ()
{
// max space for: [complex ret ptr], values|ptr ...
- char * pCppStack = (char *)alloca( sizeof(sal_Int32) + (nParams * sizeof(sal_Int64)) );
- char * pCppStackStart = pCppStack;
-
+ char * pCppStack = (char *)alloca( sizeof(sal_Int32) + (nParams * sizeof(sal_Int64)) );
+ char * pCppStackStart = pCppStack;
+
// return
typelib_TypeDescription * pReturnTypeDescr = 0;
TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
-
+
void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
-
+
if (pReturnTypeDescr)
{
if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
@@ -193,22 +193,22 @@ static void cpp_call(
sal_Int32 * pTempIndizes = (sal_Int32 *)(pCppArgs + nParams);
// type descriptions for reconversions
typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
-
+
sal_Int32 nTempIndizes = 0;
-
+
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
{
const typelib_MethodParameter & rParam = pParams[nPos];
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
+
if (!rParam.bOut
&& bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
::uno_copyAndConvertData(
pCppArgs[nPos] = pCppStack, pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
switch (pParamTypeDescr->eTypeClass)
{
case typelib_TypeClass_HYPER:
@@ -242,7 +242,7 @@ static void cpp_call(
*(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
-
+
pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
// will be released at reconversion
ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
@@ -290,17 +290,17 @@ static void cpp_call(
// end here
return;
}
-
+
// NO exception occured
*ppUnoExc = 0;
-
+
// reconvert temporary params
while (nTempIndizes--)
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr =
ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bIn)
{
if (pParams[nIndex].bOut) // inout
@@ -321,7 +321,7 @@ static void cpp_call(
// destroy temp cpp param => cpp: every param was constructed
::uno_destructData(
pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return value
@@ -351,7 +351,7 @@ void unoInterfaceProxyDispatch(
// is my surrogate
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
= static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI);
-
+
switch (pMemberDescr->eTypeClass)
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -376,14 +376,14 @@ void unoInterfaceProxyDispatch(
typelib_MethodParameter aParam;
aParam.pTypeRef =
((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
+ 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(
@@ -391,10 +391,10 @@ void unoInterfaceProxyDispatch(
pReturnTypeRef,
1, &aParam,
pReturn, pArgs, ppException );
-
+
typelib_typedescriptionreference_release( pReturnTypeRef );
}
-
+
break;
}
case typelib_TypeClass_INTERFACE_METHOD:
@@ -425,7 +425,7 @@ void unoInterfaceProxyDispatch(
(*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
pThis->pBridge->getUnoEnv(),
(void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -455,7 +455,7 @@ void unoInterfaceProxyDispatch(
::com::sun::star::uno::RuntimeException aExc(
OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
+
Type const & rExcType = ::getCppuType( &aExc );
// binary identical null reference
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
diff --git a/bridges/source/cpp_uno/shared/bridge.cxx b/bridges/source/cpp_uno/shared/bridge.cxx
index 0b76b0ca1a8a..922a5bd40a99 100644
--- a/bridges/source/cpp_uno/shared/bridge.cxx
+++ b/bridges/source/cpp_uno/shared/bridge.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/shared/component.cxx b/bridges/source/cpp_uno/shared/component.cxx
index 2c89217c9721..32365c307bf6 100644
--- a/bridges/source/cpp_uno/shared/component.cxx
+++ b/bridges/source/cpp_uno/shared/component.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/shared/component.hxx b/bridges/source/cpp_uno/shared/component.hxx
index 7be6cd7a6355..f700b6f58147 100644
--- a/bridges/source/cpp_uno/shared/component.hxx
+++ b/bridges/source/cpp_uno/shared/component.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
index 5b3c8eeba37e..4ebe6c042571 100644
--- a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
+++ b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -62,7 +62,7 @@ void dso_init(void) {
}
void dso_exit(void) {
- if (pInstance)
+ if (pInstance)
{
delete pInstance;
pInstance = NULL;
diff --git a/bridges/source/cpp_uno/shared/guardedarray.hxx b/bridges/source/cpp_uno/shared/guardedarray.hxx
index 9e4e0f3b0cad..bd22752ee0f0 100644
--- a/bridges/source/cpp_uno/shared/guardedarray.hxx
+++ b/bridges/source/cpp_uno/shared/guardedarray.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/shared/types.cxx b/bridges/source/cpp_uno/shared/types.cxx
index cf442082f283..efa657725248 100644
--- a/bridges/source/cpp_uno/shared/types.cxx
+++ b/bridges/source/cpp_uno/shared/types.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx b/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx
index e3159f12190d..7cced6e19ae7 100644
--- a/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx
+++ b/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx b/bridges/source/cpp_uno/shared/vtablefactory.cxx
index 02247de10bf3..667fe7f56ec3 100644
--- a/bridges/source/cpp_uno/shared/vtablefactory.cxx
+++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/bridges/source/cpp_uno/shared/vtables.cxx b/bridges/source/cpp_uno/shared/vtables.cxx
index 40436d0224fb..eb65e3bb46a9 100644
--- a/bridges/source/cpp_uno/shared/vtables.cxx
+++ b/bridges/source/cpp_uno/shared/vtables.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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