diff options
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx | 40 |
1 files changed, 20 insertions, 20 deletions
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( |