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