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