summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorCaolán McNamara <cmc@openoffice.org>2009-10-13 12:54:28 +0000
committerCaolán McNamara <cmc@openoffice.org>2009-10-13 12:54:28 +0000
commit62137f5e987904a0dab9cd7bec1e3320d00442a5 (patch)
tree8bdf8ee649c1aa35649d79775e4df5ed5be5706b /bridges
parentbf9defceee8cef7a167dae7eed7f9b5a9c50a609 (diff)
#i105680# fix ia64 struct returning
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx27
1 files changed, 26 insertions, 1 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx
index 35b16d882632..d1d98f222738 100644
--- a/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx
@@ -91,6 +91,31 @@ void MapReturn(const ia64::RegReturn &rRet, double dret, typelib_TypeDescription
namespace ia64
{
+ bool is_complex_struct(const typelib_TypeDescription * type)
+ {
+ const typelib_CompoundTypeDescription * p
+ = reinterpret_cast< const typelib_CompoundTypeDescription * >(type);
+ for (sal_Int32 i = 0; i < p->nMembers; ++i)
+ {
+ if (p->ppTypeRefs[i]->eTypeClass == typelib_TypeClass_STRUCT ||
+ p->ppTypeRefs[i]->eTypeClass == typelib_TypeClass_EXCEPTION)
+ {
+ typelib_TypeDescription * t = 0;
+ TYPELIB_DANGER_GET(&t, p->ppTypeRefs[i]);
+ bool b = is_complex_struct(t);
+ TYPELIB_DANGER_RELEASE(t);
+ if (b) {
+ return true;
+ }
+ }
+ else if (!bridges::cpp_uno::shared::isSimpleType(p->ppTypeRefs[i]->eTypeClass))
+ return true;
+ }
+ if (p->pBaseTypeDescription != 0)
+ return is_complex_struct(&p->pBaseTypeDescription->aBase);
+ return false;
+ }
+
bool is_complex_struct( typelib_TypeDescriptionReference *pTypeRef )
{
if (pTypeRef->eTypeClass == typelib_TypeClass_STRUCT || pTypeRef->eTypeClass == typelib_TypeClass_EXCEPTION)
@@ -98,7 +123,7 @@ namespace ia64
typelib_TypeDescription * pTypeDescr = 0;
TYPELIB_DANGER_GET( &pTypeDescr, pTypeRef );
- bool bRet = bridges::cpp_uno::shared::relatesToInterfaceType( pTypeDescr );
+ bool bRet = is_complex_struct( pTypeDescr );
TYPELIB_DANGER_RELEASE( pTypeDescr );
return bRet;