summaryrefslogtreecommitdiff
path: root/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx60
1 files changed, 30 insertions, 30 deletions
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 );