From 39d45390f4fab1e9e85f211d74ed2c08fda5b652 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Tue, 19 Mar 2013 11:39:07 +0100 Subject: removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings declarations s/(OUString\s+[a-zA-Z_][A-Za-z0-9_]*\s*)\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/$1\($2\)/gms Change-Id: Iad20f242c80c4bdc69df17e2d7a69d58ea53654b Reviewed-on: https://gerrit.libreoffice.org/2835 Reviewed-by: Thomas Arnhold Tested-by: Thomas Arnhold --- cppu/source/threadpool/current.cxx | 14 ++++++-------- cppu/source/typelib/static_types.cxx | 36 ++++++++++++++++++------------------ cppu/source/uno/cascade_mapping.cxx | 8 ++++---- 3 files changed, 28 insertions(+), 30 deletions(-) (limited to 'cppu/source') diff --git a/cppu/source/threadpool/current.cxx b/cppu/source/threadpool/current.cxx index 2aa66b61d29a..d8b6727df8c3 100644 --- a/cppu/source/threadpool/current.cxx +++ b/cppu/source/threadpool/current.cxx @@ -46,11 +46,10 @@ static typelib_InterfaceTypeDescription * get_type_XCurrentContext() ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); if (0 == s_type_XCurrentContext) { - OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XCurrentContext") ); + OUString sTypeName("com.sun.star.uno.XCurrentContext"); typelib_InterfaceTypeDescription * pTD = 0; typelib_TypeDescriptionReference * pMembers[1] = { 0 }; - OUString sMethodName0( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XCurrentContext::getValueByName") ); + OUString sMethodName0("com.sun.star.uno.XCurrentContext::getValueByName"); typelib_typedescriptionreference_new( &pMembers[0], typelib_TypeClass_INTERFACE_METHOD, @@ -67,18 +66,17 @@ static typelib_InterfaceTypeDescription * get_type_XCurrentContext() typelib_InterfaceMethodTypeDescription * pMethod = 0; typelib_Parameter_Init aParameters[1]; - OUString sParamName0( RTL_CONSTASCII_USTRINGPARAM("Name") ); - OUString sParamType0( RTL_CONSTASCII_USTRINGPARAM("string") ); + OUString sParamName0("Name"); + OUString sParamType0("string"); aParameters[0].pParamName = sParamName0.pData; aParameters[0].eTypeClass = typelib_TypeClass_STRING; aParameters[0].pTypeName = sParamType0.pData; aParameters[0].bIn = sal_True; aParameters[0].bOut = sal_False; rtl_uString * pExceptions[1]; - OUString sExceptionName0( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException") ); + OUString sExceptionName0("com.sun.star.uno.RuntimeException"); pExceptions[0] = sExceptionName0.pData; - OUString sReturnType0( RTL_CONSTASCII_USTRINGPARAM("any") ); + OUString sReturnType0("any"); typelib_typedescription_newInterfaceMethod( &pMethod, 3, sal_False, diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx index a01040146e18..f12cf1f7d286 100644 --- a/cppu/source/typelib/static_types.cxx +++ b/cppu/source/typelib/static_types.cxx @@ -161,7 +161,7 @@ CPPU_DLLPUBLIC typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_ // type if (! s_aTypes[typelib_TypeClass_TYPE]) { - OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("type") ); + OUString sTypeName("type"); ::typelib_typedescriptionreference_new( &s_aTypes[typelib_TypeClass_TYPE], typelib_TypeClass_TYPE, sTypeName.pData ); // another static ref: @@ -170,7 +170,7 @@ CPPU_DLLPUBLIC typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_ // any if (! s_aTypes[typelib_TypeClass_ANY]) { - OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("any") ); + OUString sTypeName("any"); ::typelib_typedescriptionreference_new( &s_aTypes[typelib_TypeClass_ANY], typelib_TypeClass_ANY, sTypeName.pData ); // another static ref: @@ -179,7 +179,7 @@ CPPU_DLLPUBLIC typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_ // string if (! s_aTypes[typelib_TypeClass_STRING]) { - OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("string") ); + OUString sTypeName("string"); ::typelib_typedescriptionreference_new( &s_aTypes[typelib_TypeClass_STRING], typelib_TypeClass_STRING, sTypeName.pData ); // another static ref: @@ -188,18 +188,18 @@ CPPU_DLLPUBLIC typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_ // XInterface if (! s_aTypes[typelib_TypeClass_INTERFACE]) { - OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface") ); + OUString sTypeName("com.sun.star.uno.XInterface"); typelib_InterfaceTypeDescription * pTD = 0; typelib_TypeDescriptionReference * pMembers[3] = { 0,0,0 }; - OUString sMethodName0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface::queryInterface") ); + OUString sMethodName0("com.sun.star.uno.XInterface::queryInterface"); ::typelib_typedescriptionreference_new( &pMembers[0], typelib_TypeClass_INTERFACE_METHOD, sMethodName0.pData ); - OUString sMethodName1( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface::acquire") ); + OUString sMethodName1("com.sun.star.uno.XInterface::acquire"); ::typelib_typedescriptionreference_new( &pMembers[1], typelib_TypeClass_INTERFACE_METHOD, sMethodName1.pData ); - OUString sMethodName2( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface::release") ); + OUString sMethodName2("com.sun.star.uno.XInterface::release"); ::typelib_typedescriptionreference_new( &pMembers[2], typelib_TypeClass_INTERFACE_METHOD, sMethodName2.pData ); @@ -221,16 +221,16 @@ CPPU_DLLPUBLIC typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_ assert( ! s_aTypes[typelib_TypeClass_EXCEPTION] ); { typelib_TypeDescription * pTD1 = 0; - OUString sTypeName1( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.Exception") ); + OUString sTypeName1("com.sun.star.uno.Exception"); typelib_CompoundMember_Init aMembers[2]; - OUString sMemberType0( RTL_CONSTASCII_USTRINGPARAM("string") ); - OUString sMemberName0( RTL_CONSTASCII_USTRINGPARAM("Message") ); + OUString sMemberType0("string"); + OUString sMemberName0("Message"); aMembers[0].eTypeClass = typelib_TypeClass_STRING; aMembers[0].pTypeName = sMemberType0.pData; aMembers[0].pMemberName = sMemberName0.pData; - OUString sMemberType1( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface") ); - OUString sMemberName1( RTL_CONSTASCII_USTRINGPARAM("Context") ); + OUString sMemberType1("com.sun.star.uno.XInterface"); + OUString sMemberName1("Context"); aMembers[1].eTypeClass = typelib_TypeClass_INTERFACE; aMembers[1].pTypeName = sMemberType1.pData; aMembers[1].pMemberName = sMemberName1.pData; @@ -243,7 +243,7 @@ CPPU_DLLPUBLIC typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_ // another static ref: ++s_aTypes[typelib_TypeClass_EXCEPTION]->nStaticRefCount; // RuntimeException - OUString sTypeName2( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException") ); + OUString sTypeName2("com.sun.star.uno.RuntimeException"); ::typelib_typedescription_new( &pTD1, typelib_TypeClass_EXCEPTION, sTypeName2.pData, s_aTypes[typelib_TypeClass_EXCEPTION], 0, 0 ); ::typelib_typedescription_register( &pTD1 ); @@ -252,24 +252,24 @@ CPPU_DLLPUBLIC typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_ // XInterface members typelib_InterfaceMethodTypeDescription * pMethod = 0; typelib_Parameter_Init aParameters[1]; - OUString sParamName0( RTL_CONSTASCII_USTRINGPARAM("aType") ); - OUString sParamType0( RTL_CONSTASCII_USTRINGPARAM("type") ); + OUString sParamName0("aType"); + OUString sParamType0("type"); aParameters[0].pParamName = sParamName0.pData; aParameters[0].eTypeClass = typelib_TypeClass_TYPE; aParameters[0].pTypeName = sParamType0.pData; aParameters[0].bIn = sal_True; aParameters[0].bOut = sal_False; rtl_uString * pExceptions[1]; - OUString sExceptionName0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException") ); + OUString sExceptionName0("com.sun.star.uno.RuntimeException"); pExceptions[0] = sExceptionName0.pData; - OUString sReturnType0( RTL_CONSTASCII_USTRINGPARAM("any") ); + OUString sReturnType0("any"); typelib_typedescription_newInterfaceMethod( &pMethod, 0, sal_False, sMethodName0.pData, typelib_TypeClass_ANY, sReturnType0.pData, 1, aParameters, 1, pExceptions ); ::typelib_typedescription_register( (typelib_TypeDescription**)&pMethod ); - OUString sReturnType1( RTL_CONSTASCII_USTRINGPARAM("void") ); + OUString sReturnType1("void"); ::typelib_typedescription_newInterfaceMethod( &pMethod, 1, sal_True, sMethodName1.pData, typelib_TypeClass_VOID, sReturnType1.pData, 0, 0, 0, 0 ); diff --git a/cppu/source/uno/cascade_mapping.cxx b/cppu/source/uno/cascade_mapping.cxx index 08d65ea5ab5d..5e53ea8d476c 100644 --- a/cppu/source/uno/cascade_mapping.cxx +++ b/cppu/source/uno/cascade_mapping.cxx @@ -199,10 +199,10 @@ static rtl::OUString getPrefix(rtl::OUString const & str1, rtl::OUString const & return result; } -// rtl::OUString str1(RTL_CONSTASCII_USTRINGPARAM("abc:def:ghi")); -// rtl::OUString str2(RTL_CONSTASCII_USTRINGPARAM("abc:def")); -// rtl::OUString str3(RTL_CONSTASCII_USTRINGPARAM("abc")); -// rtl::OUString str4(RTL_CONSTASCII_USTRINGPARAM("")); +// rtl::OUString str1("abc:def:ghi"); +// rtl::OUString str2("abc:def"); +// rtl::OUString str3("abc"); +// rtl::OUString str4(""); // rtl::OUString pref; -- cgit v1.2.3