diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-04-26 15:25:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-04-27 15:11:25 +0200 |
commit | 60728712f0f8bf72662da0b0e446ab416e9bf347 (patch) | |
tree | e950a7cb099f51bd048e7e2e2f65607282ff5052 /cppu/source | |
parent | 87e0feafd3690a9b58890cc28f8ba0c521bfb557 (diff) |
loplugin:ostr in cppu,cppuhelper
Change-Id: I15c00d7a87396d07be2d10a0311f308a93e8eec3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166751
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'cppu/source')
-rw-r--r-- | cppu/source/threadpool/current.cxx | 12 | ||||
-rw-r--r-- | cppu/source/typelib/static_types.cxx | 36 | ||||
-rw-r--r-- | cppu/source/typelib/typelib.cxx | 30 | ||||
-rw-r--r-- | cppu/source/uno/EnvStack.cxx | 2 | ||||
-rw-r--r-- | cppu/source/uno/cascade_mapping.cxx | 2 | ||||
-rw-r--r-- | cppu/source/uno/lbenv.cxx | 2 | ||||
-rw-r--r-- | cppu/source/uno/lbmap.cxx | 4 |
7 files changed, 44 insertions, 44 deletions
diff --git a/cppu/source/threadpool/current.cxx b/cppu/source/threadpool/current.cxx index 46fdc8c253f3..aefd85f3d1b0 100644 --- a/cppu/source/threadpool/current.cxx +++ b/cppu/source/threadpool/current.cxx @@ -40,10 +40,10 @@ namespace cppu static typelib_InterfaceTypeDescription * get_type_XCurrentContext() { static typelib_InterfaceTypeDescription* s_type_XCurrentContext = []() { - OUString sTypeName("com.sun.star.uno.XCurrentContext"); + OUString sTypeName(u"com.sun.star.uno.XCurrentContext"_ustr); typelib_InterfaceTypeDescription* pTD = nullptr; typelib_TypeDescriptionReference* pMembers[1] = { nullptr }; - OUString sMethodName0("com.sun.star.uno.XCurrentContext::getValueByName"); + OUString sMethodName0(u"com.sun.star.uno.XCurrentContext::getValueByName"_ustr); typelib_typedescriptionreference_new(&pMembers[0], typelib_TypeClass_INTERFACE_METHOD, sMethodName0.pData); typelib_typedescription_newInterface( @@ -55,17 +55,17 @@ static typelib_InterfaceTypeDescription * get_type_XCurrentContext() typelib_InterfaceMethodTypeDescription* pMethod = nullptr; typelib_Parameter_Init aParameters[1]; - OUString sParamName0("Name"); - OUString sParamType0("string"); + OUString sParamName0(u"Name"_ustr); + OUString sParamType0(u"string"_ustr); aParameters[0].pParamName = sParamName0.pData; aParameters[0].eTypeClass = typelib_TypeClass_STRING; aParameters[0].pTypeName = sParamType0.pData; aParameters[0].bIn = true; aParameters[0].bOut = false; rtl_uString* pExceptions[1]; - OUString sExceptionName0("com.sun.star.uno.RuntimeException"); + OUString sExceptionName0(u"com.sun.star.uno.RuntimeException"_ustr); pExceptions[0] = sExceptionName0.pData; - OUString sReturnType0("any"); + OUString sReturnType0(u"any"_ustr); typelib_typedescription_newInterfaceMethod(&pMethod, 3, false, sMethodName0.pData, typelib_TypeClass_ANY, sReturnType0.pData, 1, aParameters, 1, pExceptions); diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx index bd6580d2591d..67b63550e1cd 100644 --- a/cppu/source/typelib/static_types.cxx +++ b/cppu/source/typelib/static_types.cxx @@ -132,7 +132,7 @@ typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass( // type if (! s_aTypes[typelib_TypeClass_TYPE]) { - OUString sTypeName("type"); + OUString sTypeName(u"type"_ustr); ::typelib_typedescriptionreference_new( &s_aTypes[typelib_TypeClass_TYPE], typelib_TypeClass_TYPE, sTypeName.pData ); // another static ref: @@ -141,7 +141,7 @@ typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass( // any if (! s_aTypes[typelib_TypeClass_ANY]) { - OUString sTypeName("any"); + OUString sTypeName(u"any"_ustr); ::typelib_typedescriptionreference_new( &s_aTypes[typelib_TypeClass_ANY], typelib_TypeClass_ANY, sTypeName.pData ); // another static ref: @@ -150,7 +150,7 @@ typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass( // string if (! s_aTypes[typelib_TypeClass_STRING]) { - OUString sTypeName("string"); + OUString sTypeName(u"string"_ustr); ::typelib_typedescriptionreference_new( &s_aTypes[typelib_TypeClass_STRING], typelib_TypeClass_STRING, sTypeName.pData ); // another static ref: @@ -159,18 +159,18 @@ typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass( // XInterface if (! s_aTypes[typelib_TypeClass_INTERFACE]) { - OUString sTypeName("com.sun.star.uno.XInterface"); + OUString sTypeName(u"com.sun.star.uno.XInterface"_ustr); typelib_InterfaceTypeDescription * pTD = nullptr; typelib_TypeDescriptionReference * pMembers[3] = { nullptr,nullptr,nullptr }; - OUString sMethodName0("com.sun.star.uno.XInterface::queryInterface"); + OUString sMethodName0(u"com.sun.star.uno.XInterface::queryInterface"_ustr); ::typelib_typedescriptionreference_new( &pMembers[0], typelib_TypeClass_INTERFACE_METHOD, sMethodName0.pData ); - OUString sMethodName1("com.sun.star.uno.XInterface::acquire"); + OUString sMethodName1(u"com.sun.star.uno.XInterface::acquire"_ustr); ::typelib_typedescriptionreference_new( &pMembers[1], typelib_TypeClass_INTERFACE_METHOD, sMethodName1.pData ); - OUString sMethodName2("com.sun.star.uno.XInterface::release"); + OUString sMethodName2(u"com.sun.star.uno.XInterface::release"_ustr); ::typelib_typedescriptionreference_new( &pMembers[2], typelib_TypeClass_INTERFACE_METHOD, sMethodName2.pData ); @@ -192,16 +192,16 @@ typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass( assert( ! s_aTypes[typelib_TypeClass_EXCEPTION] ); { typelib_TypeDescription * pTD1 = nullptr; - OUString sTypeName1("com.sun.star.uno.Exception"); + OUString sTypeName1(u"com.sun.star.uno.Exception"_ustr); typelib_CompoundMember_Init aMembers[2]; - OUString sMemberType0("string"); - OUString sMemberName0("Message"); + OUString sMemberType0(u"string"_ustr); + OUString sMemberName0(u"Message"_ustr); aMembers[0].eTypeClass = typelib_TypeClass_STRING; aMembers[0].pTypeName = sMemberType0.pData; aMembers[0].pMemberName = sMemberName0.pData; - OUString sMemberType1("com.sun.star.uno.XInterface"); - OUString sMemberName1("Context"); + OUString sMemberType1(u"com.sun.star.uno.XInterface"_ustr); + OUString sMemberName1(u"Context"_ustr); aMembers[1].eTypeClass = typelib_TypeClass_INTERFACE; aMembers[1].pTypeName = sMemberType1.pData; aMembers[1].pMemberName = sMemberName1.pData; @@ -215,7 +215,7 @@ typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass( // another static ref: ++s_aTypes[typelib_TypeClass_EXCEPTION]->nStaticRefCount; // RuntimeException - OUString sTypeName2("com.sun.star.uno.RuntimeException"); + OUString sTypeName2(u"com.sun.star.uno.RuntimeException"_ustr); ::typelib_typedescription_new( &pTD1, typelib_TypeClass_EXCEPTION, sTypeName2.pData, s_aTypes[typelib_TypeClass_EXCEPTION], 0, nullptr ); ::typelib_typedescription_register( &pTD1 ); @@ -224,24 +224,24 @@ typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass( // XInterface members typelib_InterfaceMethodTypeDescription * pMethod = nullptr; typelib_Parameter_Init aParameters[1]; - OUString sParamName0("aType"); - OUString sParamType0("type"); + OUString sParamName0(u"aType"_ustr); + OUString sParamType0(u"type"_ustr); aParameters[0].pParamName = sParamName0.pData; aParameters[0].eTypeClass = typelib_TypeClass_TYPE; aParameters[0].pTypeName = sParamType0.pData; aParameters[0].bIn = true; aParameters[0].bOut = false; rtl_uString * pExceptions[1]; - OUString sExceptionName0("com.sun.star.uno.RuntimeException"); + OUString sExceptionName0(u"com.sun.star.uno.RuntimeException"_ustr); pExceptions[0] = sExceptionName0.pData; - OUString sReturnType0("any"); + OUString sReturnType0(u"any"_ustr); typelib_typedescription_newInterfaceMethod( &pMethod, 0, false, sMethodName0.pData, typelib_TypeClass_ANY, sReturnType0.pData, 1, aParameters, 1, pExceptions ); ::typelib_typedescription_register( reinterpret_cast<typelib_TypeDescription**>(&pMethod) ); - OUString sReturnType1("void"); + OUString sReturnType1(u"void"_ustr); ::typelib_typedescription_newInterfaceMethod( &pMethod, 1, true, sMethodName1.pData, typelib_TypeClass_VOID, sReturnType1.pData, 0, nullptr, 0, nullptr ); diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx index e665b2b4273e..2b646a6dbf74 100644 --- a/cppu/source/typelib/typelib.cxx +++ b/cppu/source/typelib/typelib.cxx @@ -1879,35 +1879,35 @@ extern "C" void SAL_CALL typelib_typedescription_getByName( bInited = true; typelib_TypeDescription * pType = nullptr; - typelib_typedescription_new( &pType, typelib_TypeClass_TYPE, OUString("type").pData, nullptr, 0, nullptr ); + typelib_typedescription_new( &pType, typelib_TypeClass_TYPE, u"type"_ustr.pData, nullptr, 0, nullptr ); typelib_typedescription_register( &pType ); - typelib_typedescription_new( &pType, typelib_TypeClass_VOID, OUString("void").pData, nullptr, 0, nullptr ); + typelib_typedescription_new( &pType, typelib_TypeClass_VOID, u"void"_ustr.pData, nullptr, 0, nullptr ); typelib_typedescription_register( &pType ); - typelib_typedescription_new( &pType, typelib_TypeClass_BOOLEAN, OUString("boolean").pData, nullptr, 0, nullptr ); + typelib_typedescription_new( &pType, typelib_TypeClass_BOOLEAN, u"boolean"_ustr.pData, nullptr, 0, nullptr ); typelib_typedescription_register( &pType ); - typelib_typedescription_new( &pType, typelib_TypeClass_CHAR, OUString("char").pData, nullptr, 0, nullptr ); + typelib_typedescription_new( &pType, typelib_TypeClass_CHAR, u"char"_ustr.pData, nullptr, 0, nullptr ); typelib_typedescription_register( &pType ); - typelib_typedescription_new( &pType, typelib_TypeClass_BYTE, OUString("byte").pData, nullptr, 0, nullptr ); + typelib_typedescription_new( &pType, typelib_TypeClass_BYTE, u"byte"_ustr.pData, nullptr, 0, nullptr ); typelib_typedescription_register( &pType ); - typelib_typedescription_new( &pType, typelib_TypeClass_STRING, OUString("string").pData, nullptr, 0, nullptr ); + typelib_typedescription_new( &pType, typelib_TypeClass_STRING, u"string"_ustr.pData, nullptr, 0, nullptr ); typelib_typedescription_register( &pType ); - typelib_typedescription_new( &pType, typelib_TypeClass_SHORT, OUString("short").pData, nullptr, 0, nullptr ); + typelib_typedescription_new( &pType, typelib_TypeClass_SHORT, u"short"_ustr.pData, nullptr, 0, nullptr ); typelib_typedescription_register( &pType ); - typelib_typedescription_new( &pType, typelib_TypeClass_UNSIGNED_SHORT, OUString("unsigned short").pData, nullptr, 0, nullptr ); + typelib_typedescription_new( &pType, typelib_TypeClass_UNSIGNED_SHORT, u"unsigned short"_ustr.pData, nullptr, 0, nullptr ); typelib_typedescription_register( &pType ); - typelib_typedescription_new( &pType, typelib_TypeClass_LONG, OUString("long").pData, nullptr, 0, nullptr ); + typelib_typedescription_new( &pType, typelib_TypeClass_LONG, u"long"_ustr.pData, nullptr, 0, nullptr ); typelib_typedescription_register( &pType ); - typelib_typedescription_new( &pType, typelib_TypeClass_UNSIGNED_LONG, OUString("unsigned long").pData, nullptr, 0, nullptr ); + typelib_typedescription_new( &pType, typelib_TypeClass_UNSIGNED_LONG, u"unsigned long"_ustr.pData, nullptr, 0, nullptr ); typelib_typedescription_register( &pType ); - typelib_typedescription_new( &pType, typelib_TypeClass_HYPER, OUString("hyper").pData, nullptr, 0, nullptr ); + typelib_typedescription_new( &pType, typelib_TypeClass_HYPER, u"hyper"_ustr.pData, nullptr, 0, nullptr ); typelib_typedescription_register( &pType ); - typelib_typedescription_new( &pType, typelib_TypeClass_UNSIGNED_HYPER, OUString("unsigned hyper").pData, nullptr, 0, nullptr ); + typelib_typedescription_new( &pType, typelib_TypeClass_UNSIGNED_HYPER, u"unsigned hyper"_ustr.pData, nullptr, 0, nullptr ); typelib_typedescription_register( &pType ); - typelib_typedescription_new( &pType, typelib_TypeClass_FLOAT, OUString("float").pData, nullptr, 0, nullptr ); + typelib_typedescription_new( &pType, typelib_TypeClass_FLOAT, u"float"_ustr.pData, nullptr, 0, nullptr ); typelib_typedescription_register( &pType ); - typelib_typedescription_new( &pType, typelib_TypeClass_DOUBLE, OUString("double").pData, nullptr, 0, nullptr ); + typelib_typedescription_new( &pType, typelib_TypeClass_DOUBLE, u"double"_ustr.pData, nullptr, 0, nullptr ); typelib_typedescription_register( &pType ); - typelib_typedescription_new( &pType, typelib_TypeClass_ANY, OUString("any").pData, nullptr, 0, nullptr ); + typelib_typedescription_new( &pType, typelib_TypeClass_ANY, u"any"_ustr.pData, nullptr, 0, nullptr ); typelib_typedescription_register( &pType ); typelib_typedescription_release( pType ); } diff --git a/cppu/source/uno/EnvStack.cxx b/cppu/source/uno/EnvStack.cxx index 34fea77f46bd..7b7df2cefc5a 100644 --- a/cppu/source/uno/EnvStack.cxx +++ b/cppu/source/uno/EnvStack.cxx @@ -135,7 +135,7 @@ extern "C" void SAL_CALL uno_getCurrentEnvironment(uno_Environment ** ppEnv, rtl } else { - OUString uno_envDcp(UNO_LB_UNO); + OUString uno_envDcp(u"" UNO_LB_UNO ""_ustr); uno_getEnvironment(ppEnv, uno_envDcp.pData, nullptr); } } diff --git a/cppu/source/uno/cascade_mapping.cxx b/cppu/source/uno/cascade_mapping.cxx index f03d88e529d6..17b190032e52 100644 --- a/cppu/source/uno/cascade_mapping.cxx +++ b/cppu/source/uno/cascade_mapping.cxx @@ -208,7 +208,7 @@ void getCascadeMapping(uno_Mapping ** ppMapping, if (pAddPurpose && pAddPurpose->length) return; - OUString uno_envType(UNO_LB_UNO); + OUString uno_envType(u"" UNO_LB_UNO ""_ustr); OUString from_envType = cppu::EnvDcp::getTypeName(pFrom->pTypeName); OUString to_envType = cppu::EnvDcp::getTypeName(pTo->pTypeName); diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx index 472feae34b4e..d9b37b083e02 100644 --- a/cppu/source/uno/lbenv.cxx +++ b/cppu/source/uno/lbenv.cxx @@ -1032,7 +1032,7 @@ bool loadEnv(OUString const & cLibStem, } - uno_initEnvironmentFunc fpInit = reinterpret_cast<uno_initEnvironmentFunc>(aMod.getSymbol(UNO_INIT_ENVIRONMENT)); + uno_initEnvironmentFunc fpInit = reinterpret_cast<uno_initEnvironmentFunc>(aMod.getSymbol(u"" UNO_INIT_ENVIRONMENT ""_ustr)); if (!fpInit) return false; diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx index 04e4c28eee4c..aea90a7eb760 100644 --- a/cppu/source/uno/lbmap.cxx +++ b/cppu/source/uno/lbmap.cxx @@ -448,7 +448,7 @@ static Mapping loadExternalMapping( if (bModule) { uno_ext_getMappingFunc fpGetMapFunc = - reinterpret_cast<uno_ext_getMappingFunc>(aModule.getSymbol( UNO_EXT_GETMAPPING )); + reinterpret_cast<uno_ext_getMappingFunc>(aModule.getSymbol( u"" UNO_EXT_GETMAPPING ""_ustr )); if (fpGetMapFunc) { @@ -518,7 +518,7 @@ static Mapping getMediateMapping( // backwards: from dest to source of mapping chain // connect to uno - OUString aUnoEnvTypeName( UNO_LB_UNO ); + OUString aUnoEnvTypeName( u"" UNO_LB_UNO ""_ustr ); if (rTo.getTypeName() == aUnoEnvTypeName) // to is uno { aUno = rTo; |