summaryrefslogtreecommitdiff
path: root/codemaker
diff options
context:
space:
mode:
authorJörg Budischewski <jbu@openoffice.org>2001-10-26 10:40:32 +0000
committerJörg Budischewski <jbu@openoffice.org>2001-10-26 10:40:32 +0000
commit53a7e524fbef7261376072ba3c4a74b5ec1242a9 (patch)
treeb0450d4cddbd72c9c8d11515af35fe79eebbb746 /codemaker
parentc0fd04cd97bfa32c175b47eaa155051be95690a9 (diff)
#93678# extended UNOTYPEINFO for structs (incompatible)
Diffstat (limited to 'codemaker')
-rw-r--r--codemaker/source/javamaker/javatype.cxx36
1 files changed, 24 insertions, 12 deletions
diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx
index fbd126a71..391783430 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,9 +1493,13 @@ sal_Bool StructureType::dumpFile(FileStream& o)
{
o << "com.sun.star.lib.uno.typeinfo.TypeInfo.INTERFACE )";
}
+ else
+ {
+ o << "0 )";
+ }
if (++iter != aUnoTypeInfos.end())
- o << ",\n";
+ o << ",\n";
}
dec(63);
@@ -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,7 +1649,8 @@ 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)
{
o << "com.sun.star.lib.uno.typeinfo.TypeInfo.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";