INTEGRATION: CWS jl31 (1.37.6); FILE MERGED

2006/02/20 15:56:18 sb 1.37.6.1: #i62339# Use new getTypeFavourChar instead of getCppuType for the type parameters of UNO polymorphic struct type templates.
This commit is contained in:
Rüdiger Timm
2006-03-09 09:26:41 +00:00
parent 702e4b89af
commit 496e736cbb

View File

@@ -4,9 +4,9 @@
* *
* $RCSfile: cpputype.cxx,v $ * $RCSfile: cpputype.cxx,v $
* *
* $Revision: 1.37 $ * $Revision: 1.38 $
* *
* last change: $Author: hr $ $Date: 2006-01-26 17:42:38 $ * last change: $Author: rt $ $Date: 2006-03-09 10:26:41 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
@@ -2815,12 +2815,13 @@ void StructureType::dumpLightGetCppuType(FileStream & out) {
sal_uInt16 n = m_reader.getReferenceCount(); sal_uInt16 n = m_reader.getReferenceCount();
for (sal_uInt16 i = 0; i < n; ++i) { for (sal_uInt16 i = 0; i < n; ++i) {
out << indent() out << indent()
<< ("the_buffer.append(::rtl::OUStringToOString(getCppuType< "); << ("the_buffer.append(::rtl::OUStringToOString("
"::cppu::getTypeFavourChar(static_cast< ");
dumpTypeParameterName( dumpTypeParameterName(
out, out,
rtl::OUStringToOString( rtl::OUStringToOString(
m_reader.getReferenceTypeName(i), RTL_TEXTENCODING_UTF8)); m_reader.getReferenceTypeName(i), RTL_TEXTENCODING_UTF8));
out << " >().getTypeName(), RTL_TEXTENCODING_UTF8));\n"; out << " * >(0)).getTypeName(), RTL_TEXTENCODING_UTF8));\n";
if (i != n - 1) { if (i != n - 1) {
out << indent() << "the_buffer.append(',');\n"; out << indent() << "the_buffer.append(',');\n";
} }
@@ -2858,12 +2859,13 @@ void StructureType::dumpNormalGetCppuType(FileStream & out) {
sal_uInt16 n = m_reader.getReferenceCount(); sal_uInt16 n = m_reader.getReferenceCount();
for (sal_uInt16 i = 0; i < n; ++i) { for (sal_uInt16 i = 0; i < n; ++i) {
out << indent() out << indent()
<< ("the_buffer.append(::rtl::OUStringToOString(getCppuType< "); << ("the_buffer.append(::rtl::OUStringToOString("
"::cppu::getTypeFavourChar(static_cast< ");
dumpTypeParameterName( dumpTypeParameterName(
out, out,
rtl::OUStringToOString( rtl::OUStringToOString(
m_reader.getReferenceTypeName(i), RTL_TEXTENCODING_UTF8)); m_reader.getReferenceTypeName(i), RTL_TEXTENCODING_UTF8));
out << " >().getTypeName(), RTL_TEXTENCODING_UTF8));\n"; out << " * >(0)).getTypeName(), RTL_TEXTENCODING_UTF8));\n";
if (i != n - 1) { if (i != n - 1) {
out << indent() << "the_buffer.append(',');\n"; out << indent() << "the_buffer.append(',');\n";
} }
@@ -2880,15 +2882,14 @@ void StructureType::dumpNormalGetCppuType(FileStream & out) {
rtl::OUStringToOString( rtl::OUStringToOString(
m_reader.getFieldTypeName(i), RTL_TEXTENCODING_UTF8)); m_reader.getFieldTypeName(i), RTL_TEXTENCODING_UTF8));
if ((m_reader.getFieldFlags(i) & RT_ACCESS_PARAMETERIZED_TYPE) != 0) { if ((m_reader.getFieldFlags(i) & RT_ACCESS_PARAMETERIZED_TYPE) != 0) {
out << "getCppuType< "; out << "::cppu::getTypeFavourChar(static_cast< ";
dumpTypeParameterName(out, type); dumpTypeParameterName(out, type);
out << " >()";
} else { } else {
out << "::getCppuType(static_cast< "; out << "::getCppuType(static_cast< ";
dumpType(out, type); dumpType(out, type);
out << " * >(0))";
} }
out << ".getTypeLibType()" << (i == fields - 1 ? " };" : ",") << "\n"; out << " * >(0)).getTypeLibType()" << (i == fields - 1 ? " };" : ",")
<< "\n";
} }
dec(); dec();
if (isPolymorphic()) { if (isPolymorphic()) {
@@ -2945,12 +2946,13 @@ void StructureType::dumpComprehensiveGetCppuType(FileStream & out) {
<< m_typeName.replace('/', '.') << "<\"));\n"; << m_typeName.replace('/', '.') << "<\"));\n";
sal_uInt16 n = m_reader.getReferenceCount(); sal_uInt16 n = m_reader.getReferenceCount();
for (sal_uInt16 i = 0; i < n; ++i) { for (sal_uInt16 i = 0; i < n; ++i) {
out << indent() << "the_buffer.append(getCppuType< "; out << indent()
<< "the_buffer.append(::cppu::getTypeFavourChar(static_cast< ";
dumpTypeParameterName( dumpTypeParameterName(
out, out,
rtl::OUStringToOString( rtl::OUStringToOString(
m_reader.getReferenceTypeName(i), RTL_TEXTENCODING_UTF8)); m_reader.getReferenceTypeName(i), RTL_TEXTENCODING_UTF8));
out << " >().getTypeName());\n"; out << " * >(0)).getTypeName());\n";
if (i != n - 1) { if (i != n - 1) {
out << indent() out << indent()
<< ("the_buffer.append(" << ("the_buffer.append("
@@ -2983,11 +2985,12 @@ void StructureType::dumpComprehensiveGetCppuType(FileStream & out) {
sal_uInt32 n = static_cast< sal_uInt32 >(parameters.size() - 1); sal_uInt32 n = static_cast< sal_uInt32 >(parameters.size() - 1);
out << indent() out << indent()
<< "::com::sun::star::uno::Type const & the_ptype" << n << "::com::sun::star::uno::Type const & the_ptype" << n
<< " = getCppuType< "; << " = ::cppu::getTypeFavourChar(static_cast< ";
dumpTypeParameterName(out, type); dumpTypeParameterName(out, type);
out << " >();\n" << indent() << "::typelib_TypeClass the_pclass" out << " * >(0));\n" << indent()
<< n << " = (::typelib_TypeClass) the_ptype" << "::typelib_TypeClass the_pclass" << n
<< n << ".getTypeClass();\n" << indent() << " = (::typelib_TypeClass) the_ptype" << n
<< ".getTypeClass();\n" << indent()
<< "::rtl::OUString the_pname" << n << "(the_ptype" << n << "::rtl::OUString the_pname" << n << "(the_ptype" << n
<< ".getTypeName());\n"; << ".getTypeName());\n";
} }