summaryrefslogtreecommitdiff
path: root/bridges/source/cpp_uno/mingw_intel
diff options
context:
space:
mode:
Diffstat (limited to 'bridges/source/cpp_uno/mingw_intel')
-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
7 files changed, 63 insertions, 63 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;
}
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 );