Lines 233-239
Link Here
|
233 |
if ((index = typeName.lastIndexOf(']')) > 0) |
233 |
if ((index = typeName.lastIndexOf(']')) > 0) |
234 |
typeName = typeName.copy(index + 1); |
234 |
typeName = typeName.copy(index + 1); |
235 |
|
235 |
|
236 |
if (getBaseType(typeName).getLength() == 0) |
236 |
if ( getBaseType(typeName).isEmpty() ) |
237 |
{ |
237 |
{ |
238 |
if (!produceType(typeName, |
238 |
if (!produceType(typeName, |
239 |
m_typeMgr, |
239 |
m_typeMgr, |
Lines 393-399
Link Here
|
393 |
<< ">\n#endif\n"; |
393 |
<< ">\n#endif\n"; |
394 |
} |
394 |
} |
395 |
|
395 |
|
396 |
if (getBaseType(relType).getLength() == 0 && |
396 |
if (getBaseType(relType).isEmpty() && |
397 |
m_typeName != relType) |
397 |
m_typeName != relType) |
398 |
{ |
398 |
{ |
399 |
if (m_typeMgr.getTypeClass(relType) == RT_TYPE_INTERFACE |
399 |
if (m_typeMgr.getTypeClass(relType) == RT_TYPE_INTERFACE |
Lines 582-588
Link Here
|
582 |
|
582 |
|
583 |
OString superType(m_reader.getSuperTypeName()); |
583 |
OString superType(m_reader.getSuperTypeName()); |
584 |
sal_Bool bIsBaseException = sal_False; |
584 |
sal_Bool bIsBaseException = sal_False; |
585 |
if (superType.getLength() > 0) |
585 |
if ( !superType.isEmpty() ) |
586 |
{ |
586 |
{ |
587 |
if ( superType.equals("com/sun/star/uno/Exception") ) |
587 |
if ( superType.equals("com/sun/star/uno/Exception") ) |
588 |
{ |
588 |
{ |
Lines 642-648
Link Here
|
642 |
|
642 |
|
643 |
o << indent() << "typelib_static_compound_type_init( &s_pType_" << typeName << ", " |
643 |
o << indent() << "typelib_static_compound_type_init( &s_pType_" << typeName << ", " |
644 |
<< getTypeClass(m_typeName, sal_True) << ", \"" << m_typeName.replace('/', '.') << "\", "; |
644 |
<< getTypeClass(m_typeName, sal_True) << ", \"" << m_typeName.replace('/', '.') << "\", "; |
645 |
if ( superType.getLength() > 0 || bIsBaseException ) |
645 |
if ( !superType.isEmpty() || bIsBaseException ) |
646 |
{ |
646 |
{ |
647 |
if ( bIsBaseException ) |
647 |
if ( bIsBaseException ) |
648 |
{ |
648 |
{ |
Lines 703-709
Link Here
|
703 |
<< indent() << "typelib_TypeDescription * pTD = 0;\n"; |
703 |
<< indent() << "typelib_TypeDescription * pTD = 0;\n"; |
704 |
|
704 |
|
705 |
OString superType(m_reader.getSuperTypeName()); |
705 |
OString superType(m_reader.getSuperTypeName()); |
706 |
if (superType.getLength() > 0) |
706 |
if ( !superType.isEmpty() ) |
707 |
o << indent() << "typelib_TypeDescriptionReference * pSuperType = 0;\n"; |
707 |
o << indent() << "typelib_TypeDescriptionReference * pSuperType = 0;\n"; |
708 |
|
708 |
|
709 |
sal_uInt32 count = getMemberCount(); |
709 |
sal_uInt32 count = getMemberCount(); |
Lines 728-734
Link Here
|
728 |
|
728 |
|
729 |
o << indent() << "rtl_uString_newFromAscii( &pTypeName, \"" << m_typeName.replace('/', '.') << "\" );\n"; |
729 |
o << indent() << "rtl_uString_newFromAscii( &pTypeName, \"" << m_typeName.replace('/', '.') << "\" );\n"; |
730 |
|
730 |
|
731 |
if (superType.getLength() > 0) |
731 |
if ( !superType.isEmpty() ) |
732 |
{ |
732 |
{ |
733 |
o << indent() << "typelib_typedescriptionreference_newByAsciiName(&pSuperType, typelib_TypeClass_INTERFACE, \"" |
733 |
o << indent() << "typelib_typedescriptionreference_newByAsciiName(&pSuperType, typelib_TypeClass_INTERFACE, \"" |
734 |
<< superType.replace('/', '.') << "\" );\n"; |
734 |
<< superType.replace('/', '.') << "\" );\n"; |
Lines 766-772
Link Here
|
766 |
o << indent() << "&pTD,\n" << indent() |
766 |
o << indent() << "&pTD,\n" << indent() |
767 |
<< getTypeClass(OString(), sal_True) << ", pTypeName,\n"; |
767 |
<< getTypeClass(OString(), sal_True) << ", pTypeName,\n"; |
768 |
|
768 |
|
769 |
if (superType.getLength() > 0) |
769 |
if ( !superType.isEmpty() ) |
770 |
o << indent() << "pSuperType,\n"; |
770 |
o << indent() << "pSuperType,\n"; |
771 |
else |
771 |
else |
772 |
o << indent() << "0,\n"; |
772 |
o << indent() << "0,\n"; |
Lines 868-874
Link Here
|
868 |
|
868 |
|
869 |
sal_uInt32 count = 0; |
869 |
sal_uInt32 count = 0; |
870 |
OString superType(pReader->getSuperTypeName()); |
870 |
OString superType(pReader->getSuperTypeName()); |
871 |
if (superType.getLength() > 0) |
871 |
if ( !superType.isEmpty() ) |
872 |
{ |
872 |
{ |
873 |
TypeReader aSuperReader(m_typeMgr.getTypeReader(superType)); |
873 |
TypeReader aSuperReader(m_typeMgr.getTypeReader(superType)); |
874 |
if ( aSuperReader.isValid() ) |
874 |
if ( aSuperReader.isValid() ) |
Lines 911-917
Link Here
|
911 |
TypeReader aSuperReader(m_typeMgr.getTypeReader(superType)); |
911 |
TypeReader aSuperReader(m_typeMgr.getTypeReader(superType)); |
912 |
|
912 |
|
913 |
OString baseType(aSuperReader.getSuperTypeName()); |
913 |
OString baseType(aSuperReader.getSuperTypeName()); |
914 |
if (baseType.getLength() > 0) |
914 |
if ( !baseType.isEmpty() ) |
915 |
{ |
915 |
{ |
916 |
dumpInheritedMembers(o, baseType); |
916 |
dumpInheritedMembers(o, baseType); |
917 |
} |
917 |
} |
Lines 938-947
Link Here
|
938 |
|
938 |
|
939 |
OString CunoType::getTypeClass(const OString& type, sal_Bool bCStyle) |
939 |
OString CunoType::getTypeClass(const OString& type, sal_Bool bCStyle) |
940 |
{ |
940 |
{ |
941 |
OString typeName = (type.getLength() > 0 ? type : m_typeName); |
941 |
OString typeName = ( !type.isEmpty() ? type : m_typeName ); |
942 |
RTTypeClass rtTypeClass = RT_TYPE_INVALID; |
942 |
RTTypeClass rtTypeClass = RT_TYPE_INVALID; |
943 |
|
943 |
|
944 |
if (type.getLength() > 0) |
944 |
if ( !type.isEmpty() ) |
945 |
{ |
945 |
{ |
946 |
typeName = type; |
946 |
typeName = type; |
947 |
rtTypeClass = m_typeMgr.getTypeClass(typeName); |
947 |
rtTypeClass = m_typeMgr.getTypeClass(typeName); |
Lines 1059-1065
Link Here
|
1059 |
case RT_TYPE_INVALID: |
1059 |
case RT_TYPE_INVALID: |
1060 |
{ |
1060 |
{ |
1061 |
OString tmp(getBaseType(relType)); |
1061 |
OString tmp(getBaseType(relType)); |
1062 |
if (tmp.getLength() > 0) |
1062 |
if ( !tmp.isEmpty() ) |
1063 |
{ |
1063 |
{ |
1064 |
o << tmp.getStr(); |
1064 |
o << tmp.getStr(); |
1065 |
if ( bParam && !bPointer && relType.equals("any") ) |
1065 |
if ( bParam && !bPointer && relType.equals("any") ) |
Lines 1389-1395
Link Here
|
1389 |
|
1389 |
|
1390 |
if ( bResolveTypeOnly ) |
1390 |
if ( bResolveTypeOnly ) |
1391 |
{ |
1391 |
{ |
1392 |
if ( completePrefix.getLength() > 0 ) |
1392 |
if ( !completePrefix.isEmpty() ) |
1393 |
{ |
1393 |
{ |
1394 |
baseType = bSeqType ? (completePrefix + baseType) : ( baseType + completePrefix); |
1394 |
baseType = bSeqType ? (completePrefix + baseType) : ( baseType + completePrefix); |
1395 |
} |
1395 |
} |
Lines 1575-1581
Link Here
|
1575 |
TypeReader aSuperReader(m_typeMgr.getTypeReader(superType)); |
1575 |
TypeReader aSuperReader(m_typeMgr.getTypeReader(superType)); |
1576 |
|
1576 |
|
1577 |
OString baseType(aSuperReader.getSuperTypeName()); |
1577 |
OString baseType(aSuperReader.getSuperTypeName()); |
1578 |
if (baseType.getLength() > 0) |
1578 |
if ( !baseType.isEmpty() ) |
1579 |
{ |
1579 |
{ |
1580 |
dumpInheritedFunctions(o, baseType); |
1580 |
dumpInheritedFunctions(o, baseType); |
1581 |
} |
1581 |
} |
Lines 1591-1597
Link Here
|
1591 |
inc(); |
1591 |
inc(); |
1592 |
|
1592 |
|
1593 |
OString superType(m_reader.getSuperTypeName()); |
1593 |
OString superType(m_reader.getSuperTypeName()); |
1594 |
if (superType.getLength() > 0) |
1594 |
if ( !superType.isEmpty() ) |
1595 |
dumpInheritedFunctions(o, superType); |
1595 |
dumpInheritedFunctions(o, superType); |
1596 |
/* |
1596 |
/* |
1597 |
if (getNestedTypeNames().getLength() > 0) |
1597 |
if (getNestedTypeNames().getLength() > 0) |
Lines 1915-1921
Link Here
|
1915 |
inc(); |
1915 |
inc(); |
1916 |
OString superType(m_reader.getSuperTypeName()); |
1916 |
OString superType(m_reader.getSuperTypeName()); |
1917 |
sal_Bool bWithBase = sal_False; |
1917 |
sal_Bool bWithBase = sal_False; |
1918 |
if (superType.getLength() > 0 && !superType.equals("com/sun/star/uno/XInterface")) |
1918 |
if ( !superType.isEmpty() && !superType.equals("com/sun/star/uno/XInterface")) |
1919 |
{ |
1919 |
{ |
1920 |
bWithBase = sal_True; |
1920 |
bWithBase = sal_True; |
1921 |
o << indent() << "typelib_TypeDescriptionReference * pSuperType = 0;\n" |
1921 |
o << indent() << "typelib_TypeDescriptionReference * pSuperType = 0;\n" |
Lines 1975-1981
Link Here
|
1975 |
OString superType(m_reader.getSuperTypeName()); |
1975 |
OString superType(m_reader.getSuperTypeName()); |
1976 |
sal_uInt32 count = getMemberCount(); |
1976 |
sal_uInt32 count = getMemberCount(); |
1977 |
|
1977 |
|
1978 |
if (superType.getLength() > 0) |
1978 |
if ( !superType.isEmpty() ) |
1979 |
o << indent() << "typelib_TypeDescriptionReference * pSuperType = 0;\n"; |
1979 |
o << indent() << "typelib_TypeDescriptionReference * pSuperType = 0;\n"; |
1980 |
|
1980 |
|
1981 |
if (count) |
1981 |
if (count) |
Lines 1996-2002
Link Here
|
1996 |
|
1996 |
|
1997 |
o << indent() << "rtl_uString_newFromAscii( &pTypeName, \"" << m_typeName.replace('/', '.') << "\" );\n"; |
1997 |
o << indent() << "rtl_uString_newFromAscii( &pTypeName, \"" << m_typeName.replace('/', '.') << "\" );\n"; |
1998 |
|
1998 |
|
1999 |
if (superType.getLength() > 0) |
1999 |
if ( !superType.isEmpty() ) |
2000 |
{ |
2000 |
{ |
2001 |
o << indent() << "typelib_typedescriptionreference_newByAsciiName(&pSuperType, typelib_TypeClass_INTERFACE, \"" |
2001 |
o << indent() << "typelib_typedescriptionreference_newByAsciiName(&pSuperType, typelib_TypeClass_INTERFACE, \"" |
2002 |
<< superType.replace('/', '.') << "\" );\n"; |
2002 |
<< superType.replace('/', '.') << "\" );\n"; |
Lines 2021-2027
Link Here
|
2021 |
uik.m_Data1, uik.m_Data2, uik.m_Data3, uik.m_Data4, uik.m_Data5); |
2021 |
uik.m_Data1, uik.m_Data2, uik.m_Data3, uik.m_Data4, uik.m_Data5); |
2022 |
o << buffer; |
2022 |
o << buffer; |
2023 |
|
2023 |
|
2024 |
if (superType.getLength() > 0) |
2024 |
if ( !superType.isEmpty() ) |
2025 |
o << indent() << "pSuperType,\n"; |
2025 |
o << indent() << "pSuperType,\n"; |
2026 |
else |
2026 |
else |
2027 |
o << indent() << "0,\n"; |
2027 |
o << indent() << "0,\n"; |
Lines 2046-2052
Link Here
|
2046 |
} |
2046 |
} |
2047 |
o << indent() << "typelib_typedescription_release( (typelib_TypeDescription*)pTD );\n"; |
2047 |
o << indent() << "typelib_typedescription_release( (typelib_TypeDescription*)pTD );\n"; |
2048 |
|
2048 |
|
2049 |
if (superType.getLength() > 0) |
2049 |
if ( !superType.isEmpty() ) |
2050 |
o << indent() << "typelib_typedescription_release( pSuperType );\n\n"; |
2050 |
o << indent() << "typelib_typedescription_release( pSuperType );\n\n"; |
2051 |
else |
2051 |
else |
2052 |
o << "\n"; |
2052 |
o << "\n"; |
Lines 2207-2213
Link Here
|
2207 |
|
2207 |
|
2208 |
sal_uInt32 count = 0; |
2208 |
sal_uInt32 count = 0; |
2209 |
OString superType(pReader->getSuperTypeName()); |
2209 |
OString superType(pReader->getSuperTypeName()); |
2210 |
if (superType.getLength() > 0) |
2210 |
if ( !superType.isEmpty() ) |
2211 |
{ |
2211 |
{ |
2212 |
TypeReader aSuperReader(m_typeMgr.getTypeReader(superType)); |
2212 |
TypeReader aSuperReader(m_typeMgr.getTypeReader(superType)); |
2213 |
if (aSuperReader.isValid()) |
2213 |
if (aSuperReader.isValid()) |
Lines 2877-2883
Link Here
|
2877 |
inc(); |
2877 |
inc(); |
2878 |
|
2878 |
|
2879 |
OString superType(m_reader.getSuperTypeName()); |
2879 |
OString superType(m_reader.getSuperTypeName()); |
2880 |
if (superType.getLength() > 0) |
2880 |
if ( !superType.isEmpty() ) |
2881 |
o << indent() << superType.replace('/', '_').getStr() << " _Base;\n"; |
2881 |
o << indent() << superType.replace('/', '_').getStr() << " _Base;\n"; |
2882 |
//dumpInheritedMembers(o, superType); |
2882 |
//dumpInheritedMembers(o, superType); |
2883 |
|
2883 |
|
Lines 2987-2993
Link Here
|
2987 |
inc(); |
2987 |
inc(); |
2988 |
|
2988 |
|
2989 |
OString superType(m_reader.getSuperTypeName()); |
2989 |
OString superType(m_reader.getSuperTypeName()); |
2990 |
if (superType.getLength() > 0) |
2990 |
if ( !superType.isEmpty() ) |
2991 |
o << indent() << superType.replace('/', '_').getStr() << " _Base;\n"; |
2991 |
o << indent() << superType.replace('/', '_').getStr() << " _Base;\n"; |
2992 |
//dumpInheritedMembers(o, superType); |
2992 |
//dumpInheritedMembers(o, superType); |
2993 |
|
2993 |
|