diff options
author | Ricardo Montania <ricardo@linuxafundo.com.br> | 2012-11-14 17:20:12 -0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-11-26 22:15:08 +0000 |
commit | 1d095efaf989730c298b2ad99720eacf68f71229 (patch) | |
tree | 3bc33bc08478ca90f5474da99746b209be52e025 | |
parent | 7af306fb2508f01b91749542fd383acc0e675e34 (diff) |
Some ::rtl::OUString -> OUString in bridges
Change-Id: I5412773f9cebc633a78ee5733b62f64b6d1599d4
Reviewed-on: https://gerrit.libreoffice.org/1068
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
4 files changed, 16 insertions, 27 deletions
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx b/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx index a4a2f66f46b3..56de9c4b5217 100644 --- a/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx +++ b/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx @@ -39,11 +39,6 @@ #include <hash.cxx> // need a += operator for OString and sal_Char -using ::rtl::OUString; -using ::rtl::OString; -using ::rtl::OStringBuffer; -using ::rtl::OUStringToOString; -using ::rtl::OStringToOUString; { inline OString& operator+=( OString& rString, sal_Char cAdd ) @@ -422,7 +417,7 @@ void cc50_solaris_sparc_fillUnoException( #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "> c++ exception occurred: %s\n", - ::rtl::OUStringToOString( + OUStringToOString( pExcTypeDescr->pTypeName, RTL_TEXTENCODING_ASCII_US ).getStr() ); #endif diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.cxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.cxx index 09aac8bf8c7f..2a55fcdf2d88 100644 --- a/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.cxx +++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/exceptions.cxx @@ -59,7 +59,7 @@ Function toFunction(void * pointer) { #pragma enable_warn } -bool toUnoName(char const * rttiName, rtl::OUString * unoName) { +bool toUnoName(char const * rttiName, OUString * unoName) { rtl::OStringBuffer buf; for (;;) { char const * p = std::strchr(rttiName, ':'); @@ -281,11 +281,11 @@ private: rtl::OString cppName; std::vector< __Crun::class_base_descr > bases; }; - typedef std::map< rtl::OUString, Data > Map; + typedef std::map< OUString, Data > Map; static void toCppNames( - rtl::OUString const & unoName, rtl::OString * cppName, - rtl::OString * rttiName); + OUString const & unoName, OString * cppName, + OString * rttiName); static Data const & get_(typelib_CompoundTypeDescription const * type); @@ -307,16 +307,16 @@ __Crun::static_type_info const * RttiMap::get( } void RttiMap::toCppNames( - rtl::OUString const & unoName, rtl::OString * cppName, - rtl::OString * rttiName) + OUString const & unoName, OString * cppName, + OString * rttiName) { OSL_ASSERT(cppName != NULL && rttiName != NULL); rtl::OStringBuffer bc; rtl::OStringBuffer br; br.append("__1n"); for (sal_Int32 i = 0; i != -1;) { - rtl::OUString tok(unoName.getToken(0, '.', i)); - bc.append(rtl::OUStringToOString(tok, RTL_TEXTENCODING_UTF8)); + OUString tok(unoName.getToken(0, '.', i)); + bc.append(OUStringToOString(tok, RTL_TEXTENCODING_UTF8)); // conversion should never fail, as tok should be well-formed ASCII if (i != -1) { bc.append("::"); @@ -347,7 +347,7 @@ void RttiMap::toCppNames( RttiMap::Data const & RttiMap::get_( typelib_CompoundTypeDescription const * type) { - rtl::OUString name(type->aBase.pTypeName); + OUString name(type->aBase.pTypeName); Map::iterator it(m_map->find(name)); if (it == m_map->end()) { it = m_map->insert(std::make_pair(name, Data())).first; @@ -426,16 +426,14 @@ void fillUnoException( void * cppException, char const * cppName, uno_Any * unoException, uno_Mapping * cppToUno) { - rtl::OUString name; + OUString name; typelib_TypeDescription * type = NULL; if (toUnoName(cppName, &name)) { typelib_typedescription_getByName(&type, name.pData); } if (type == NULL || type->eTypeClass != typelib_TypeClass_EXCEPTION) { css::uno::RuntimeException exc( - (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("Not a UNO exception type: ")) + - name), + "Not a UNO exception type: " + name), css::uno::Reference< css::uno::XInterface >()); uno_type_any_constructAndConvert( unoException, &exc, getCppuType(&exc).getTypeLibType(), cppToUno); diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx index abd3b23ebeb7..cf4545a7fdd7 100644 --- a/bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx +++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/uno2cpp.cxx @@ -416,6 +416,7 @@ void unoInterfaceProxyDispatch( 0, NULL, pReturn, pArgs, ppException); } else { // Setter: + OUString aVoid = "void"; typelib_MethodParameter param = { NULL, (reinterpret_cast< @@ -424,8 +425,7 @@ void unoInterfaceProxyDispatch( true, false }; typelib_TypeDescriptionReference * rtd = NULL; typelib_typedescriptionreference_new( - &rtd, typelib_TypeClass_VOID, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("void")).pData); + &rtd, typelib_TypeClass_VOID, aVoid.pData); slot.index += 1; call(proxy, slot, rtd, 1, ¶m, pReturn, pArgs, ppException); typelib_typedescriptionreference_release(rtd); diff --git a/bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx index 58863ec63350..f60afae62102 100644 --- a/bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx @@ -337,9 +337,7 @@ static typelib_TypeClass cpp_mediate( OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" ); if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex) { - throw RuntimeException( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )), - (XInterface *)pThis ); + throw RuntimeException( "illegal vtable index!", (XInterface *)pThis ); } // determine called method @@ -429,9 +427,7 @@ static typelib_TypeClass cpp_mediate( } default: { - throw RuntimeException( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )), - (XInterface *)pThis ); + throw RuntimeException( "no member description found!", (XInterface *)pThis ); } } |