summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-03-19 11:39:07 +0100
committerThomas Arnhold <thomas@arnhold.org>2013-03-19 10:48:30 +0000
commit39d45390f4fab1e9e85f211d74ed2c08fda5b652 (patch)
treeac4b224a66a18429cd4722a61ee3d401f8e9951c /cppu
parent5c908d0431ee975c1ee7aa245af83b9eb7f95da6 (diff)
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 <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'cppu')
-rw-r--r--cppu/qa/test_any.cxx40
-rw-r--r--cppu/source/threadpool/current.cxx14
-rw-r--r--cppu/source/typelib/static_types.cxx36
-rw-r--r--cppu/source/uno/cascade_mapping.cxx8
4 files changed, 48 insertions, 50 deletions
diff --git a/cppu/qa/test_any.cxx b/cppu/qa/test_any.cxx
index aadc1b35338c..31c26fa4ee9c 100644
--- a/cppu/qa/test_any.cxx
+++ b/cppu/qa/test_any.cxx
@@ -291,7 +291,7 @@ void Test::testVoid() {
CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2');
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -389,7 +389,7 @@ void Test::testBoolean() {
CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2');
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -488,7 +488,7 @@ void Test::testByte() {
}
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -587,7 +587,7 @@ void Test::testShort() {
}
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -688,7 +688,7 @@ void Test::testUnsignedShort() {
}
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -783,7 +783,7 @@ void Test::testLong() {
CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2');
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -878,7 +878,7 @@ void Test::testUnsignedLong() {
CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2');
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -973,7 +973,7 @@ void Test::testHyper() {
CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2');
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -1068,7 +1068,7 @@ void Test::testUnsignedHyper() {
CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2');
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -1163,7 +1163,7 @@ void Test::testFloat() {
CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2');
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -1258,7 +1258,7 @@ void Test::testDouble() {
CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2');
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -1358,7 +1358,7 @@ void Test::testChar() {
}
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -1453,7 +1453,7 @@ void Test::testString() {
CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2');
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", (a >>= b) && b == "1" );
}
{
@@ -1548,7 +1548,7 @@ void Test::testType() {
CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2');
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -1644,7 +1644,7 @@ void Test::testSequence() {
CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2');
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -1745,7 +1745,7 @@ void Test::testEnum() {
CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2');
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -1844,7 +1844,7 @@ void Test::testStruct() {
CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2');
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -1964,7 +1964,7 @@ void Test::testException() {
CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2');
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -2080,7 +2080,7 @@ void Test::testInterface() {
CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2');
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
@@ -2194,7 +2194,7 @@ void Test::testNull() {
CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2');
}
{
- rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
+ rtl::OUString b("2");
CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
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;