diff options
author | Jörg Budischewski <jbu@openoffice.org> | 2001-10-26 10:40:32 +0000 |
---|---|---|
committer | Jörg Budischewski <jbu@openoffice.org> | 2001-10-26 10:40:32 +0000 |
commit | 78cecaf579ef0658e2ba7995cb5faebcb2b209b5 (patch) | |
tree | a86d51bf6d3c291e113ce7b9ec12bdd6ce586899 /codemaker | |
parent | 8fc8fd375e841d405ebd2f413c2041da81a00cc1 (diff) |
#93678# extended UNOTYPEINFO for structs (incompatible)
Diffstat (limited to 'codemaker')
-rw-r--r-- | codemaker/source/javamaker/javatype.cxx | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx index 191bb13bdf09..c426bebd0051 100644 --- a/codemaker/source/javamaker/javatype.cxx +++ b/codemaker/source/javamaker/javatype.cxx @@ -2,9 +2,9 @@ * * $RCSfile: javatype.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: vg $ $Date: 2001-08-20 11:10:55 $ + * last change: $Author: jbu $ $Date: 2001-10-26 11:40:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1438,8 +1438,7 @@ sal_Bool StructureType::dumpFile(FileStream& o) flags = flags | UIT_ANY; if (isInterface(fieldType)) flags = flags | UIT_INTERFACE; - if (flags) - aUnoTypeInfos.push_back(UnoInfo(fieldName, "", UNOTYPEINFO_MEMBER, i, flags)); + aUnoTypeInfos.push_back(UnoInfo(fieldName, "", UNOTYPEINFO_MEMBER, i, flags)); dumpSeqStaticMember(o, fieldType, fieldName); o << indent() << "public "; @@ -1480,6 +1479,7 @@ sal_Bool StructureType::dumpFile(FileStream& o) o << indent(); o << "new com.sun.star.lib.uno.typeinfo.MemberTypeInfo( \"" << (*iter).m_name << "\", "; + o << (*iter).m_index << ", "; if ((*iter).m_flags & UIT_UNSIGNED) { @@ -1493,6 +1493,10 @@ sal_Bool StructureType::dumpFile(FileStream& o) { o << "com.sun.star.lib.uno.typeinfo.TypeInfo.INTERFACE )"; } + else + { + o << "0 )"; + } if (++iter != aUnoTypeInfos.end()) o << ",\n"; @@ -1564,6 +1568,7 @@ sal_Bool ExceptionType::dumpFile(FileStream& o) } sal_uInt16 i; + sal_Int32 nOffset = 0; for (i=0; i < fieldCount; i++) { access = m_reader.getFieldAccess(i); @@ -1576,17 +1581,19 @@ sal_Bool ExceptionType::dumpFile(FileStream& o) flags = 0; + if (m_typeName.equals("com/sun/star/uno/Exception") && fieldName.equals("Message")) + { + nOffset ++; + continue; + } + if (isUnsigned(fieldType)) flags = flags | UIT_UNSIGNED; if (isAny(fieldType)) flags = flags | UIT_ANY; if (isInterface(fieldType)) flags = flags | UIT_INTERFACE; - if (flags) - aUnoTypeInfos.push_back(UnoInfo(fieldName, "", UNOTYPEINFO_MEMBER, i, flags)); - - if (m_typeName.equals("com/sun/star/uno/Exception") && fieldName.equals("Message")) - continue; + aUnoTypeInfos.push_back(UnoInfo(fieldName, "", UNOTYPEINFO_MEMBER, i-nOffset, flags)); dumpSeqStaticMember(o, fieldType, fieldName); o << indent() << "public "; @@ -1628,7 +1635,7 @@ sal_Bool ExceptionType::dumpFile(FileStream& o) if (m_typeName.equals("com/sun/star/uno/RuntimeException")) { o << "\n" << indent() << "public static final com.sun.star.lib.uno.typeinfo.TypeInfo UNOTYPEINFO[] = { " - << "new com.sun.star.lib.uno.typeinfo.MemberTypeInfo( \"Context\", com.sun.star.lib.uno.typeinfo.TypeInfo.INTERFACE ) };\n"; + << "new com.sun.star.lib.uno.typeinfo.MemberTypeInfo( \"Context\", 0, com.sun.star.lib.uno.typeinfo.TypeInfo.INTERFACE ) };\n"; } else if (!aUnoTypeInfos.empty()) { @@ -1642,6 +1649,7 @@ sal_Bool ExceptionType::dumpFile(FileStream& o) o << indent(); o << "new com.sun.star.lib.uno.typeinfo.MemberTypeInfo( \"" << (*iter).m_name << "\", "; + o << (*iter).m_index << ", "; if ((*iter).m_flags & UIT_UNSIGNED) { @@ -1655,6 +1663,10 @@ sal_Bool ExceptionType::dumpFile(FileStream& o) { o << "com.sun.star.lib.uno.typeinfo.TypeInfo.INTERFACE )"; } + else + { + o << "0 )"; + } if (++iter != aUnoTypeInfos.end()) o << ",\n"; |