diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-18 12:15:10 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-10-20 16:10:53 +0200 |
commit | 44b96b1d76bb1c7b6d78344ee54e31ffee54e342 (patch) | |
tree | 7fd84e1324c12568b31be22fc715c11534d3dc56 | |
parent | Related: fdo#38838 remove operator=(const sal_Unicode*) (diff) | |
download | core-44b96b1d76bb1c7b6d78344ee54e31ffee54e342.tar.gz core-44b96b1d76bb1c7b6d78344ee54e31ffee54e342.zip |
fdo#70285 cleanup generated C++ code
Change-Id: Ic43628de53c5139ef43bb48723fb1e0788af1cd1
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | codemaker/source/commoncpp/commoncpp.cxx | 2 | ||||
-rw-r--r-- | codemaker/source/cppumaker/cpputype.cxx | 199 |
2 files changed, 95 insertions, 106 deletions
diff --git a/codemaker/source/commoncpp/commoncpp.cxx b/codemaker/source/commoncpp/commoncpp.cxx index 5d8d79bb3f49..98f4b73ccc88 100644 --- a/codemaker/source/commoncpp/commoncpp.cxx +++ b/codemaker/source/commoncpp/commoncpp.cxx @@ -79,7 +79,7 @@ OString translateUnoToCppType( if (sort == codemaker::UnoType::SORT_INTERFACE_TYPE && nucleus == "com.sun.star.uno.XInterface") { - buf.append("::com::sun::star::uno::XInterface"); + buf.append("::css::uno::XInterface"); } else { //TODO: check that nucleus is a valid (UTF-8) identifier buf.append(u2b(nucleus)); diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx index 7f073e40e19e..8d8d31427d18 100644 --- a/codemaker/source/cppumaker/cpputype.cxx +++ b/codemaker/source/cppumaker/cpputype.cxx @@ -330,12 +330,12 @@ void CppuType::dumpGetCppuTypePreamble(FileStream & out) { out << " > {\npublic:\n"; inc(); out << indent() - << "static inline ::com::sun::star::uno::Type const & get() {\n"; + << "static inline ::css::uno::Type const & get() {\n"; } else { if (codemaker::cppumaker::dumpNamespaceOpen(out, name_, false)) { out << "\n\n"; } - out << ("inline ::com::sun::star::uno::Type const &" + out << ("inline ::css::uno::Type const &" " cppu_detail_getUnoType(SAL_UNUSED_PARAMETER "); dumpType(out, name_, false, false, true); out << " const *) {\n"; @@ -358,7 +358,7 @@ void CppuType::dumpGetCppuTypePostamble(FileStream & out) { } } dumpTemplateHead(out); - out << ("inline ::com::sun::star::uno::Type const & SAL_CALL" + out << ("inline ::css::uno::Type const & SAL_CALL" " getCppuType(SAL_UNUSED_PARAMETER "); dumpType(out, name_); dumpTemplateParameters(out); @@ -551,7 +551,7 @@ void CppuType::dumpHFileContent( || isPolymorphic())) { out << "\n" << indent() - << ("inline ::com::sun::star::uno::Type const &" + << ("inline ::css::uno::Type const &" " cppu_detail_getUnoType(SAL_UNUSED_PARAMETER "); dumpType(out, name_, false, false, true); out << " const *);\n"; @@ -561,7 +561,7 @@ void CppuType::dumpHFileContent( } out << "\n"; dumpTemplateHead(out); - out << "inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType("; + out << "inline ::css::uno::Type const & SAL_CALL getCppuType("; dumpType(out, name_, true); dumpTemplateParameters(out); out << " *) SAL_THROW(());\n\n#endif\n"; @@ -570,25 +570,25 @@ void CppuType::dumpHFileContent( void CppuType::dumpGetCppuType(FileStream & out) { if (name_ == "com.sun.star.uno.XInterface") { out << indent() - << ("inline ::com::sun::star::uno::Type const & SAL_CALL" + << ("inline ::css::uno::Type const & SAL_CALL" " getCppuType(SAL_UNUSED_PARAMETER "); dumpType(out, name_, true); out << " *) SAL_THROW(()) {\n"; inc(); out << indent() - << ("return ::cppu::UnoType< ::com::sun::star::uno::XInterface" + << ("return ::cppu::UnoType< ::css::uno::XInterface" " >::get();\n"); dec(); out << indent() << "}\n"; } else if (name_ == "com.sun.star.uno.Exception") { out << indent() - << ("inline ::com::sun::star::uno::Type const & SAL_CALL" + << ("inline ::css::uno::Type const & SAL_CALL" " getCppuType(SAL_UNUSED_PARAMETER "); dumpType(out, name_, true); out << " *) SAL_THROW(()) {\n"; inc(); out << indent() - << ("return ::cppu::UnoType< ::com::sun::star::uno::Exception" + << ("return ::cppu::UnoType< ::css::uno::Exception" " >::get();\n"); dec(); out << indent() << "}\n"; @@ -611,7 +611,7 @@ void CppuType::dumpLightGetCppuType(FileStream & out) { << getTypeClass(name_, true) << ", \"" << name_ << "\" );\n"; dec(); out << indent() << "}\n" << indent() - << ("return * reinterpret_cast< ::com::sun::star::uno::Type * >(" + << ("return * reinterpret_cast< ::css::uno::Type * >(" " &the_type );\n"); dumpGetCppuTypePostamble(out); } @@ -637,85 +637,85 @@ OUString CppuType::getTypeClass(OUString const & name, bool cStyle) { case codemaker::UnoType::SORT_VOID: return cStyle ? OUString("typelib_TypeClass_VOID") - : OUString("::com::sun::star::uno::TypeClass_VOID"); + : OUString("::css::uno::TypeClass_VOID"); case codemaker::UnoType::SORT_BOOLEAN: return cStyle ? OUString("typelib_TypeClass_BOOLEAN") - : OUString("::com::sun::star::uno::TypeClass_BOOLEAN"); + : OUString("::css::uno::TypeClass_BOOLEAN"); case codemaker::UnoType::SORT_BYTE: return cStyle ? OUString("typelib_TypeClass_BYTE") - : OUString("::com::sun::star::uno::TypeClass_BYTE"); + : OUString("::css::uno::TypeClass_BYTE"); case codemaker::UnoType::SORT_SHORT: return cStyle ? OUString("typelib_TypeClass_SHORT") - : OUString("::com::sun::star::uno::TypeClass_SHORT"); + : OUString("::css::uno::TypeClass_SHORT"); case codemaker::UnoType::SORT_UNSIGNED_SHORT: return cStyle ? OUString("typelib_TypeClass_UNSIGNED_SHORT") - : OUString("::com::sun::star::uno::TypeClass_UNSIGNED_SHORT"); + : OUString("::css::uno::TypeClass_UNSIGNED_SHORT"); case codemaker::UnoType::SORT_LONG: return cStyle ? OUString("typelib_TypeClass_LONG") - : OUString("::com::sun::star::uno::TypeClass_LONG"); + : OUString("::css::uno::TypeClass_LONG"); case codemaker::UnoType::SORT_UNSIGNED_LONG: return cStyle ? OUString("typelib_TypeClass_UNSIGNED_LONG") - : OUString("::com::sun::star::uno::TypeClass_UNSIGNED_LONG"); + : OUString("::css::uno::TypeClass_UNSIGNED_LONG"); case codemaker::UnoType::SORT_HYPER: return cStyle ? OUString("typelib_TypeClass_HYPER") - : OUString("::com::sun::star::uno::TypeClass_HYPER"); + : OUString("::css::uno::TypeClass_HYPER"); case codemaker::UnoType::SORT_UNSIGNED_HYPER: return cStyle ? OUString("typelib_TypeClass_UNSIGNED_HYPER") - : OUString("::com::sun::star::uno::TypeClass_UNSIGNED_HYPER"); + : OUString("::css::uno::TypeClass_UNSIGNED_HYPER"); case codemaker::UnoType::SORT_FLOAT: return cStyle ? OUString("typelib_TypeClass_FLOAT") - : OUString("::com::sun::star::uno::TypeClass_FLOAT"); + : OUString("::css::uno::TypeClass_FLOAT"); case codemaker::UnoType::SORT_DOUBLE: return cStyle ? OUString("typelib_TypeClass_DOUBLE") - : OUString("::com::sun::star::uno::TypeClass_DOUBLE"); + : OUString("::css::uno::TypeClass_DOUBLE"); case codemaker::UnoType::SORT_CHAR: return cStyle ? OUString("typelib_TypeClass_CHAR") - : OUString("::com::sun::star::uno::TypeClass_CHAR"); + : OUString("::css::uno::TypeClass_CHAR"); case codemaker::UnoType::SORT_STRING: return cStyle ? OUString("typelib_TypeClass_STRING") - : OUString("::com::sun::star::uno::TypeClass_STRING"); + : OUString("::css::uno::TypeClass_STRING"); case codemaker::UnoType::SORT_TYPE: return cStyle ? OUString("typelib_TypeClass_TYPE") - : OUString("::com::sun::star::uno::TypeClass_TYPE"); + : OUString("::css::uno::TypeClass_TYPE"); case codemaker::UnoType::SORT_ANY: return cStyle ? OUString("typelib_TypeClass_ANY") - : OUString("::com::sun::star::uno::TypeClass_ANY"); + : OUString("::css::uno::TypeClass_ANY"); case codemaker::UnoType::SORT_SEQUENCE_TYPE: return cStyle ? OUString("typelib_TypeClass_SEQUENCE") - : OUString("::com::sun::star::uno::TypeClass_SEQUENCE"); + : OUString("::css::uno::TypeClass_SEQUENCE"); case codemaker::UnoType::SORT_ENUM_TYPE: return cStyle ? OUString("typelib_TypeClass_ENUM") - : OUString("::com::sun::star::uno::TypeClass_ENUM"); + : OUString("::css::uno::TypeClass_ENUM"); case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE: case codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE: case codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE: return cStyle ? OUString("typelib_TypeClass_STRUCT") - : OUString("::com::sun::star::uno::TypeClass_STRUCT"); + : OUString("::css::uno::TypeClass_STRUCT"); case codemaker::UnoType::SORT_EXCEPTION_TYPE: return cStyle ? OUString("typelib_TypeClass_EXCEPTION") - : OUString("::com::sun::star::uno::TypeClass_EXCEPTION"); + : OUString("::css::uno::TypeClass_EXCEPTION"); case codemaker::UnoType::SORT_INTERFACE_TYPE: return cStyle ? OUString("typelib_TypeClass_INTERFACE") - : OUString("::com::sun::star::uno::TypeClass_INTERFACE"); + : OUString("::css::uno::TypeClass_INTERFACE"); case codemaker::UnoType::SORT_TYPEDEF: return getTypeClass( dynamic_cast< unoidl::TypedefEntity * >(ent.get())->getType(), @@ -739,7 +739,7 @@ void CppuType::dumpType( } for (sal_Int32 i = 0; i != k; ++i) { out << (cppuUnoType - ? "::cppu::UnoSequenceType" : "::com::sun::star::uno::Sequence") + ? "::cppu::UnoSequenceType" : "::css::uno::Sequence") << "< "; } switch (m_typeMgr->getSort(n)) { @@ -783,10 +783,10 @@ void CppuType::dumpType( out << "::rtl::OUString"; break; case codemaker::UnoType::SORT_TYPE: - out << "::com::sun::star::uno::Type"; + out << "::css::uno::Type"; break; case codemaker::UnoType::SORT_ANY: - out << "::com::sun::star::uno::Any"; + out << "::css::uno::Any"; break; case codemaker::UnoType::SORT_ENUM_TYPE: case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE: @@ -810,7 +810,7 @@ void CppuType::dumpType( break; case codemaker::UnoType::SORT_INTERFACE_TYPE: if (!native) { - out << "::com::sun::star::uno::Reference< "; + out << "::css::uno::Reference< "; } out << codemaker::cpp::scopedCppName(u2b(n)); if (!native) { @@ -1090,7 +1090,7 @@ void InterfaceType::dumpDeclaration(FileStream & out) { dumpAttributes(out); dumpMethods(out); out << "\n" << indent() - << ("static inline ::com::sun::star::uno::Type const & SAL_CALL" + << ("static inline ::css::uno::Type const & SAL_CALL" " static_type(void * = 0);\n\n"); dec(); out << "protected:\n"; @@ -1111,7 +1111,7 @@ void InterfaceType::dumpHxxFile( includes.dump(out, &name_); out << "\n"; dumpGetCppuType(out); - out << "\n::com::sun::star::uno::Type const & " + out << "\n::css::uno::Type const & " << codemaker::cpp::scopedCppName(u2b(name_)) << "::static_type(SAL_UNUSED_PARAMETER void *) {\n"; inc(); @@ -1231,7 +1231,7 @@ void InterfaceType::dumpNormalGetCppuType(FileStream & out) { << (bases == 0 ? "0" : "aSuperTypes") << " );\n"; dec(); out << indent() << "}\n" << indent() - << ("return * reinterpret_cast< ::com::sun::star::uno::Type * >(" + << ("return * reinterpret_cast< ::css::uno::Type * >(" " &the_type );\n"); dumpGetCppuTypePostamble(out); } @@ -1240,10 +1240,10 @@ void InterfaceType::dumpComprehensiveGetCppuType(FileStream & out) { codemaker::cppumaker::dumpNamespaceOpen(out, name_, false); OUString staticTypeClass("the" + id_ + "Type"); out << " namespace detail {\n\n" << indent() << "struct " << staticTypeClass - << " : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, " + << " : public rtl::StaticWithInit< ::css::uno::Type *, " << staticTypeClass << " >\n" << indent() << "{\n"; inc(); - out << indent() << "::com::sun::star::uno::Type * operator()() const\n" + out << indent() << "::css::uno::Type * operator()() const\n" << indent() << "{\n"; inc(); out << indent() << "::rtl::OUString sTypeName( \"" << name_ << "\" );\n\n" @@ -1294,7 +1294,7 @@ void InterfaceType::dumpComprehensiveGetCppuType(FileStream & out) { out << indent() << ("typelib_typedescription_release( (typelib_TypeDescription*)pTD" " );\n\n") - << indent() << "return new ::com::sun::star::uno::Type( " + << indent() << "return new ::css::uno::Type( " << getTypeClass(name_) << ", sTypeName ); // leaked\n"; dec(); out << indent() << "}\n"; @@ -1303,7 +1303,7 @@ void InterfaceType::dumpComprehensiveGetCppuType(FileStream & out) { codemaker::cppumaker::dumpNamespaceClose(out, name_, false); out << " }\n\n"; dumpGetCppuTypePreamble(out); - out << indent() << "const ::com::sun::star::uno::Type &rRet = *detail::" + out << indent() << "const ::css::uno::Type &rRet = *detail::" << staticTypeClass << "::get();\n" << indent() << "// End inline typedescription generation\n" << indent() << "static bool bInitStarted = false;\n" << indent() @@ -1350,8 +1350,7 @@ void InterfaceType::dumpCppuAttributeRefs(FileStream & out, sal_uInt32 & index) << "],\n"; inc(38); out << indent() - << ("(typelib_TypeClass)" - "::com::sun::star::uno::TypeClass_INTERFACE_ATTRIBUTE,\n") + << ("(typelib_TypeClass)::css::uno::TypeClass_INTERFACE_ATTRIBUTE,\n") << indent() << "sAttributeName" << n << ".pData );\n"; dec(38); ++n; @@ -1370,8 +1369,7 @@ void InterfaceType::dumpCppuMethodRefs(FileStream & out, sal_uInt32 & index) { << "],\n"; inc(38); out << indent() - << ("(typelib_TypeClass)" - "::com::sun::star::uno::TypeClass_INTERFACE_METHOD,\n") + << ("(typelib_TypeClass)::css::uno::TypeClass_INTERFACE_METHOD,\n") << indent() << "sMethodName" << n << ".pData );\n"; dec(38); ++n; @@ -1382,7 +1380,7 @@ void InterfaceType::addComprehensiveGetCppuTypeIncludes( codemaker::cppumaker::Includes & includes) const { // The comprehensive getCppuType method always includes a line - // "getCppuType( (const ::com::sun::star::uno::RuntimeException*)0 );": + // "getCppuType( (const ::css::uno::RuntimeException*)0 );": includes.addCppuUnotypeHxx(); includes.add("com.sun.star.uno.RuntimeException"); } @@ -1584,7 +1582,7 @@ void InterfaceType::dumpExceptionSpecification( if (!first) { out << ", "; } - out << "::com::sun::star::uno::RuntimeException"; + out << "::css::uno::RuntimeException"; } out << ")"; #if !defined DBG_UTIL @@ -1952,8 +1950,7 @@ void PlainStructType::dumpLightGetCppuType(FileStream & out) { << getTypeClass(name_, true) << ", \"" << name_ << "\");\n"; dec(); out << indent() << "}\n" << indent() - << ("return *reinterpret_cast< ::com::sun::star::uno::Type * >(" - "&the_type);\n"); + << ("return *reinterpret_cast< ::css::uno::Type * >(&the_type);\n"); dumpGetCppuTypePostamble(out); } @@ -1993,8 +1990,7 @@ void PlainStructType::dumpNormalGetCppuType(FileStream & out) { out << ", " << entity_->getDirectMembers().size() << ", the_members, 0);\n"; dec(); out << indent() << "}\n" << indent() - << ("return *reinterpret_cast< ::com::sun::star::uno::Type * >(" - "&the_type);\n"); + << ("return *reinterpret_cast< ::css::uno::Type * >(&the_type);\n"); dumpGetCppuTypePostamble(out); } @@ -2003,10 +1999,10 @@ void PlainStructType::dumpComprehensiveGetCppuType(FileStream & out) { codemaker::cppumaker::dumpNamespaceOpen(out, name_, false); out << " namespace detail {\n\n" << indent() << "struct " << staticTypeClass - << " : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, " + << " : public rtl::StaticWithInit< ::css::uno::Type *, " << staticTypeClass << " >\n" << indent() << "{\n"; inc(); - out << indent() << "::com::sun::star::uno::Type * operator()() const\n" + out << indent() << "::css::uno::Type * operator()() const\n" << indent() << "{\n"; inc(); out << indent() << "::rtl::OUString the_name( \"" << name_ << "\" );\n"; @@ -2061,7 +2057,7 @@ void PlainStructType::dumpComprehensiveGetCppuType(FileStream & out) { out << ", " << entity_->getDirectMembers().size() << ", the_members);\n" << indent() << "::typelib_typedescription_register(&the_newType);\n" << indent() << "::typelib_typedescription_release(the_newType);\n" - << indent() << "return new ::com::sun::star::uno::Type(" + << indent() << "return new ::css::uno::Type(" << getTypeClass(name_) << ", the_name); // leaked\n"; dec(); out << indent() << "}\n"; @@ -2378,8 +2374,7 @@ void PolyStructType::dumpLightGetCppuType(FileStream & out) { << ", the_buffer.getStr());\n"; dec(); out << indent() << "}\n" << indent() - << ("return *reinterpret_cast< ::com::sun::star::uno::Type * >(" - "&the_type);\n"); + << ("return *reinterpret_cast< ::css::uno::Type * >(&the_type);\n"); dumpGetCppuTypePostamble(out); } @@ -2448,7 +2443,7 @@ void PolyStructType::dumpNormalGetCppuType(FileStream & out) { << ", the_members, the_parameterizedTypes);\n"; dec(); out << indent() << "}\n" << indent() - << ("return *reinterpret_cast< ::com::sun::star::uno::Type * >(" + << ("return *reinterpret_cast< ::css::uno::Type * >(" "&the_type);\n"); dumpGetCppuTypePostamble(out); } @@ -2458,12 +2453,12 @@ void PolyStructType::dumpComprehensiveGetCppuType(FileStream & out) { dumpTemplateHead(out); OUString staticTypeClass("the" + id_ + "Type"); out << "struct " << staticTypeClass - << " : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, " + << " : public rtl::StaticWithInit< ::css::uno::Type *, " << staticTypeClass; dumpTemplateParameters(out); out << " >\n" << indent() << "{\n"; inc(); - out << indent() << "::com::sun::star::uno::Type * operator()() const\n" + out << indent() << "::css::uno::Type * operator()() const\n" << indent() << "{\n"; inc(); out << indent() << "::rtl::OUStringBuffer the_buffer;\n" << indent() @@ -2502,7 +2497,7 @@ void PolyStructType::dumpComprehensiveGetCppuType(FileStream & out) { { sal_uInt32 k = static_cast< sal_uInt32 >(parameters.size() - 1); out << indent() - << "::com::sun::star::uno::Type const & the_ptype" << k + << "::css::uno::Type const & the_ptype" << k << " = ::cppu::getTypeFavourChar(static_cast< "; dumpTypeParameterName(out, i->type); out << " * >(0));\n" << indent() @@ -2558,7 +2553,7 @@ void PolyStructType::dumpComprehensiveGetCppuType(FileStream & out) { << entity_->getMembers().size() << ", the_members);\n" << indent() << "::typelib_typedescription_register(&the_newType);\n" << indent() << "::typelib_typedescription_release(the_newType);\n" << indent() - << "return new ::com::sun::star::uno::Type(" << getTypeClass(name_) + << "return new ::css::uno::Type(" << getTypeClass(name_) << ", the_name); // leaked\n"; dec(); out << indent() << "}\n"; @@ -2828,7 +2823,7 @@ void ExceptionType::dumpLightGetCppuType(FileStream & out) { << getTypeClass(name_, true) << ", \"" << name_ << "\" );\n"; dec(); out << indent() << "}\n" << indent() - << ("return * reinterpret_cast< ::com::sun::star::uno::Type * >(" + << ("return * reinterpret_cast< ::css::uno::Type * >(" " &the_type );\n"); dumpGetCppuTypePostamble(out); } @@ -2846,7 +2841,7 @@ void ExceptionType::dumpNormalGetCppuType(FileStream & out) { baseException = true; } else { out << indent() - << ("const ::com::sun::star::uno::Type& rBaseType =" + << ("const ::css::uno::Type& rBaseType =" " ::cppu::UnoType< "); dumpType(out, base, true, false, false, true); out << " >::get();\n\n"; @@ -2865,7 +2860,7 @@ void ExceptionType::dumpNormalGetCppuType(FileStream & out) { OUString modType(typeToIdentifier(type)); if (seen.insert(type).second) { out << indent() - << "const ::com::sun::star::uno::Type& rMemberType_" + << "const ::css::uno::Type& rMemberType_" << modType << " = ::cppu::UnoType< "; dumpType(out, type, false, false, false, true); out << " >::get();\n"; @@ -2890,7 +2885,7 @@ void ExceptionType::dumpNormalGetCppuType(FileStream & out) { << " );\n"; dec(); out << indent() << "}\n" << indent() - << ("return * reinterpret_cast< const ::com::sun::star::uno::Type * >(" + << ("return * reinterpret_cast< const ::css::uno::Type * >(" " &the_type );\n"); dumpGetCppuTypePostamble(out); } @@ -2900,10 +2895,10 @@ void ExceptionType::dumpComprehensiveGetCppuType(FileStream & out) { out << " namespace detail {\n\n"; OUString staticTypeClass("the" + id_ + "Type"); out << indent() << "struct " << staticTypeClass - << " : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, " + << " : public rtl::StaticWithInit< ::css::uno::Type *, " << staticTypeClass << " >\n" << indent() << "{\n"; inc(); - out << indent() << "::com::sun::star::uno::Type * operator()() const\n" + out << indent() << "::css::uno::Type * operator()() const\n" << indent() << "{\n"; inc(); out << indent() << "::rtl::OUString sTypeName( \"" << name_ << "\" );\n\n" @@ -2912,7 +2907,7 @@ void ExceptionType::dumpComprehensiveGetCppuType(FileStream & out) { OUString base(entity_->getDirectBase()); if (!base.isEmpty()) { out << indent() - << ("const ::com::sun::star::uno::Type& rSuperType =" + << ("const ::css::uno::Type& rSuperType =" " ::cppu::UnoType< "); dumpType(out, base, false, false, false, true); out << " >::get();\n"; @@ -2961,7 +2956,7 @@ void ExceptionType::dumpComprehensiveGetCppuType(FileStream & out) { " );\n\n") << indent() << "typelib_typedescription_release( pTD );\n" << indent() << "// End inline typedescription generation\n\n" << indent() - << "return new ::com::sun::star::uno::Type( " << getTypeClass(name_) + << "return new ::css::uno::Type( " << getTypeClass(name_) << ", sTypeName ); // leaked\n"; dec(); out << indent() << "}\n"; @@ -3146,7 +3141,7 @@ void EnumType::dumpNormalGetCppuType(FileStream& o) dec(); o << indent() << "}\n"; o << indent() - << ("return * reinterpret_cast< ::com::sun::star::uno::Type * >(" + << ("return * reinterpret_cast< ::css::uno::Type * >(" " &the_type );\n"); dumpGetCppuTypePostamble(o); } @@ -3160,10 +3155,10 @@ void EnumType::dumpComprehensiveGetCppuType(FileStream& o) o << " namespace detail {\n\n"; OUString sStaticTypeClass("the" + id_ + "Type"); - o << indent() << "struct " << sStaticTypeClass << " : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, " << sStaticTypeClass << " >\n"; + o << indent() << "struct " << sStaticTypeClass << " : public rtl::StaticWithInit< ::css::uno::Type *, " << sStaticTypeClass << " >\n"; o << indent() << "{\n"; inc(); - o << indent() << "::com::sun::star::uno::Type * operator()() const\n"; + o << indent() << "::css::uno::Type * operator()() const\n"; o << indent() << "{\n"; inc(); @@ -3213,7 +3208,7 @@ void EnumType::dumpComprehensiveGetCppuType(FileStream& o) o << indent() << "typelib_typedescription_release( pTD );\n" << indent() << "// End inline typedescription generation\n\n"; - o << indent() << "return new ::com::sun::star::uno::Type( " + o << indent() << "return new ::css::uno::Type( " << getTypeClass(name_) << ", sTypeName ); // leaked\n"; dec(); @@ -3427,39 +3422,37 @@ void ServiceType::dumpHxxFile( i != entity_->getConstructors().end(); ++i) { if (i->defaultConstructor) { - o << indent() << "static ::com::sun::star::uno::Reference< " + o << indent() << "static ::css::uno::Reference< " << scopedBaseName << " > " << codemaker::cpp::translateUnoToCppIdentifier( "create", "method", codemaker::cpp::ITM_NONGLOBAL, &cppName) - << ("(::com::sun::star::uno::Reference<" - " ::com::sun::star::uno::XComponentContext > const &" + << ("(::css::uno::Reference< ::css::uno::XComponentContext > const &" " the_context) {\n"); inc(); o << indent() << "assert(the_context.is());\n" << indent() - << "::com::sun::star::uno::Reference< " << scopedBaseName + << "::css::uno::Reference< " << scopedBaseName << " > the_instance;\n" << indent() << "try {\n"; inc(); o << indent() - << "the_instance = ::com::sun::star::uno::Reference< " + << "the_instance = ::css::uno::Reference< " << scopedBaseName << (" >(the_context->getServiceManager()->" "createInstanceWithContext(::rtl::OUString(" " \"") << name_ - << "\" ), the_context), ::com::sun::star::uno::UNO_QUERY);\n"; + << "\" ), the_context), ::css::uno::UNO_QUERY);\n"; dec(); o << indent() - << "} catch (const ::com::sun::star::uno::RuntimeException &) {\n"; + << "} catch (const ::css::uno::RuntimeException &) {\n"; inc(); o << indent() << "throw;\n"; dec(); o << indent() - << ("} catch (const ::com::sun::star::uno::Exception &" - " the_exception) {\n"); + << ("} catch (const ::css::uno::Exception & the_exception) {\n"); inc(); o << indent() - << ("throw ::com::sun::star::uno::DeploymentException(" + << ("throw ::css::uno::DeploymentException(" "::rtl::OUString( " "\"component context fails to supply service ") << name_ << " of type " << baseName @@ -3469,7 +3462,7 @@ void ServiceType::dumpHxxFile( << "if (!the_instance.is()) {\n"; inc(); o << indent() - << ("throw ::com::sun::star::uno::DeploymentException(" + << ("throw ::css::uno::DeploymentException(" "::rtl::OUString( " "\"component context fails to supply service ") << name_ << " of type " << baseName @@ -3479,13 +3472,12 @@ void ServiceType::dumpHxxFile( dec(); o << indent() << "}\n\n"; } else { - o << indent() << "static ::com::sun::star::uno::Reference< " + o << indent() << "static ::css::uno::Reference< " << scopedBaseName << " > " << codemaker::cpp::translateUnoToCppIdentifier( u2b(i->name), "method", codemaker::cpp::ITM_NONGLOBAL, &cppName) - << ("(::com::sun::star::uno::Reference<" - " ::com::sun::star::uno::XComponentContext > const &" + << ("(::css::uno::Reference< ::css::uno::XComponentContext > const &" " the_context"); bool rest = hasRestParameter(*i); for (std::vector< @@ -3511,8 +3503,7 @@ void ServiceType::dumpHxxFile( o << indent() << "assert(the_context.is());\n"; if (!rest && !i->parameters.empty()) { o << indent() - << ("::com::sun::star::uno::Sequence<" - " ::com::sun::star::uno::Any > the_arguments(") + << ("::css::uno::Sequence< ::css::uno::Any > the_arguments(") << i->parameters.size() << ");\n"; std::vector< unoidl::SingleInterfaceBasedServiceEntity::Constructor:: @@ -3534,7 +3525,7 @@ void ServiceType::dumpHxxFile( u2b(j->type), &rank, 0))) == codemaker::UnoType::SORT_CHAR) { - o << "= ::com::sun::star::uno::Any(&" << param + o << "= ::css::uno::Any(&" << param << ", ::cppu::UnoType< "; for (sal_Int32 k = 0; k < rank; ++k) { o << "::cppu::UnoSequenceType< "; @@ -3550,7 +3541,7 @@ void ServiceType::dumpHxxFile( o << ";\n"; } } - o << indent() << "::com::sun::star::uno::Reference< " + o << indent() << "::css::uno::Reference< " << scopedBaseName << " > the_instance;\n"; codemaker::ExceptionTree tree; for (std::vector< OUString >::const_iterator j( @@ -3564,7 +3555,7 @@ void ServiceType::dumpHxxFile( inc(); } o << indent() - << "the_instance = ::com::sun::star::uno::Reference< " + << "the_instance = ::css::uno::Reference< " << scopedBaseName << (" >(the_context->getServiceManager()->" "createInstanceWithArgumentsAndContext(::rtl::OUString(" @@ -3575,27 +3566,25 @@ void ServiceType::dumpHxxFile( u2b(i->parameters.back().name), "param", codemaker::cpp::ITM_NONGLOBAL); } else if (i->parameters.empty()) { - o << ("::com::sun::star::uno::Sequence<" - " ::com::sun::star::uno::Any >()"); + o << ("::css::uno::Sequence< ::css::uno::Any >()"); } else { o << "the_arguments"; } - o << ", the_context), ::com::sun::star::uno::UNO_QUERY);\n"; + o << ", the_context), ::css::uno::UNO_QUERY);\n"; if (!tree.getRoot()->present) { dec(); o << indent() - << ("} catch (const ::com::sun::star::uno::RuntimeException &)" - " {\n"); + << ("} catch (const ::css::uno::RuntimeException &) {\n"); inc(); o << indent() << "throw;\n"; dec(); dumpCatchClauses(o, tree.getRoot()); o << indent() - << ("} catch (const ::com::sun::star::uno::Exception &" + << ("} catch (const ::css::uno::Exception &" " the_exception) {\n"); inc(); o << indent() - << ("throw ::com::sun::star::uno::DeploymentException(" + << ("throw ::css::uno::DeploymentException(" "::rtl::OUString( " "\"component context fails to supply service ") << name_ << " of type " << baseName @@ -3606,7 +3595,7 @@ void ServiceType::dumpHxxFile( o << indent() << "if (!the_instance.is()) {\n"; inc(); o << indent() - << ("throw ::com::sun::star::uno::DeploymentException(" + << ("throw ::css::uno::DeploymentException(" "::rtl::OUString( " "\"component context fails to supply service ") << name_ << " of type " << baseName @@ -3692,23 +3681,23 @@ void SingletonType::dumpHxxFile( } o << "\nclass " << cppName << " {\npublic:\n"; inc(); - o << indent() << "static ::com::sun::star::uno::Reference< " + o << indent() << "static ::css::uno::Reference< " << scopedBaseName << " > " << codemaker::cpp::translateUnoToCppIdentifier( "get", "method", codemaker::cpp::ITM_NONGLOBAL, &cppName) - << ("(::com::sun::star::uno::Reference<" - " ::com::sun::star::uno::XComponentContext > const & the_context)" + << ("(::css::uno::Reference<" + " ::css::uno::XComponentContext > const & the_context)" " {\n"); inc(); o << indent() << "assert(the_context.is());\n" << indent() - << "::com::sun::star::uno::Reference< " << scopedBaseName + << "::css::uno::Reference< " << scopedBaseName << " > instance;\n" << indent() << ("if (!(the_context->getValueByName(" "::rtl::OUString( \"/singletons/") << name_ << "\" )) >>= instance) || !instance.is()) {\n"; inc(); o << indent() - << ("throw ::com::sun::star::uno::DeploymentException(" + << ("throw ::css::uno::DeploymentException(" "::rtl::OUString( \"component context" " fails to supply singleton ") << name_ << " of type " << baseName << "\" ), the_context);\n"; |