summaryrefslogtreecommitdiff
path: root/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx68
1 files changed, 34 insertions, 34 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx
index f259387a98bf..9e6e9bda3e55 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390/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
@@ -44,7 +44,7 @@
using namespace ::com::sun::star::uno;
-namespace
+namespace
{
static typelib_TypeClass cpp2uno_call(
@@ -55,10 +55,10 @@ static typelib_TypeClass cpp2uno_call(
void ** gpreg, void ** fpreg, void ** ovrflw,
sal_Int64 * pRegisterReturn /* space for register return */ )
{
- int ng = 0; //number of gpr registers used
+ int ng = 0; //number of gpr registers used
int nf = 0; //number of fpr regsiters used
void ** pCppStack; //temporary stack pointer
-
+
// gpreg: [ret *], this, [gpr params]
// fpreg: [fpr params]
// ovrflw: [gpr or fpr params (properly aligned)]
@@ -67,10 +67,10 @@ static typelib_TypeClass 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 ))
@@ -82,14 +82,14 @@ static typelib_TypeClass cpp2uno_call(
pCppReturn = *(void **)gpreg;
gpreg++;
ng++;
-
+
pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize )
: pCppReturn); // direct way
}
}
// pop this
- gpreg++;
+ gpreg++;
ng++;
// stack space
@@ -101,9 +101,9 @@ static typelib_TypeClass 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];
@@ -133,8 +133,8 @@ static typelib_TypeClass cpp2uno_call(
// fpreg are all double values so need to
// modify fpreg to be a single word float value
if (nf < 2) {
-// float tmp = (float) (*((double *)fpreg));
-// (*((float *) fpreg)) = tmp;
+// float tmp = (float) (*((double *)fpreg));
+// (*((float *) fpreg)) = tmp;
pCppArgs[nPos] = fpreg;
pUnoArgs[nPos] = fpreg;
nf++;
@@ -211,7 +211,7 @@ static typelib_TypeClass cpp2uno_call(
else // ptr to complex value | ref
{
- if (ng < 5) {
+ if (ng < 5) {
pCppArgs[nPos] = *(void **)gpreg;
pCppStack = gpreg;
ng++;
@@ -248,14 +248,14 @@ static typelib_TypeClass cpp2uno_call(
}
}
}
-
+
// ExceptionHolder
uno_Any aUnoExc; // Any will be constructed by callee
uno_Any * pUnoExc = &aUnoExc;
// invoke uno dispatch call
(*pThis->getUnoI()->pDispatcher)( pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
-
+
// in case an exception occured...
if (pUnoExc)
{
@@ -263,14 +263,14 @@ static typelib_TypeClass 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
// is here for dummy
return typelib_TypeClass_VOID;
@@ -282,7 +282,7 @@ static typelib_TypeClass cpp2uno_call(
{
sal_Int32 nIndex = pTempIndizes[nTempIndizes];
typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
-
+
if (pParams[nIndex].bOut) // inout/out
{
// convert and assign
@@ -292,7 +292,7 @@ static typelib_TypeClass cpp2uno_call(
}
// destroy temp uno param
uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
+
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
// return
@@ -330,7 +330,7 @@ static typelib_TypeClass cpp_mediate(
sal_Int16 nVtableOffset = (nOffsetAndIndex >> 16);
sal_Int16 nFunctionIndex = (nOffsetAndIndex & 0xFFFF);
-
+
// gpreg: [ret *], this, [other gpr params]
// fpreg: [fpr params]
// ovrflw: [gpr or fpr params (properly aligned)]
@@ -348,14 +348,14 @@ static typelib_TypeClass cpp_mediate(
}
pThis = static_cast< char * >(pThis) - nVtableOffset;
-
+
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)
{
@@ -363,14 +363,14 @@ static typelib_TypeClass cpp_mediate(
rtl::OUString::createFromAscii("illegal vtable index!"),
(XInterface *)pCppI );
}
-
+
// determine called method
OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member index!" );
TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
-
+
typelib_TypeClass eRet;
switch (aMemberDescr.get()->eTypeClass)
{
@@ -391,9 +391,9 @@ static typelib_TypeClass cpp_mediate(
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;
+
eRet = cpp2uno_call(
pCppI, aMemberDescr.get(),
0, // indicates void return
@@ -424,9 +424,9 @@ static typelib_TypeClass cpp_mediate(
XInterface * pInterface = 0;
(*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
pCppI->getBridge()->getCppEnv(),
- (void **)&pInterface, pCppI->getOid().pData,
+ (void **)&pInterface, pCppI->getOid().pData,
(typelib_InterfaceTypeDescription *)pTD );
-
+
if (pInterface)
{
::uno_any_construct(
@@ -484,10 +484,10 @@ static void privateSnippetExecutor( sal_uInt32 nOffsetAndIndex, void** gpregptr,
volatile long nRegReturn[2];
- typelib_TypeClass aType =
- cpp_mediate( nOffsetAndIndex, (void**)gpreg, (void**)fpreg, ovrflw,
+ typelib_TypeClass aType =
+ cpp_mediate( nOffsetAndIndex, (void**)gpreg, (void**)fpreg, ovrflw,
(sal_Int64*)nRegReturn );
-
+
switch( aType )
{
@@ -560,7 +560,7 @@ unsigned char* codeSnippet( unsigned char * code, sal_Int16 nFunctionIndex, sal_
/* generate this code */
// lr %r0,%r13
// bras %r13,0x6
- // .long privateSnippetExecutor
+ // .long privateSnippetExecutor
// .long nOffsetAndIndex
// stm %r2,%r6,8(%r15)
// std %f0,64(%r15)
@@ -569,7 +569,7 @@ unsigned char* codeSnippet( unsigned char * code, sal_Int16 nFunctionIndex, sal_
// l %r2,4(%r13)
// la %r3,8(%r15)
// la %r4,64(%r15)
- // la %r5,96(%r15)
+ // la %r5,96(%r15)
// l %r1,0(%r13)
// lr %r13,%r0
// br %r1