summaryrefslogtreecommitdiff
path: root/sal/qa/rtl
diff options
context:
space:
mode:
Diffstat (limited to 'sal/qa/rtl')
-rw-r--r--sal/qa/rtl/bootstrap/bootstrap_process.cxx14
-rw-r--r--sal/qa/rtl/locale/rtl_locale.cxx14
-rw-r--r--sal/qa/rtl/logfile/rtl_logfile.cxx12
-rw-r--r--sal/qa/rtl/oustring/rtl_OUString2.cxx100
-rw-r--r--sal/qa/rtl/oustring/rtl_ustr.cxx182
-rw-r--r--sal/qa/rtl/process/rtl_Process.cxx14
-rw-r--r--sal/qa/rtl/uri/rtl_Uri.cxx4
7 files changed, 170 insertions, 170 deletions
diff --git a/sal/qa/rtl/bootstrap/bootstrap_process.cxx b/sal/qa/rtl/bootstrap/bootstrap_process.cxx
index 6455073224b5..3b989a474b85 100644
--- a/sal/qa/rtl/bootstrap/bootstrap_process.cxx
+++ b/sal/qa/rtl/bootstrap/bootstrap_process.cxx
@@ -43,14 +43,14 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
//custom .ini/rc file
Bootstrap aBs_custom( OUString::createFromAscii(argv[3]) );
OUString suValue;
- OUString suDefault( RTL_CONSTASCII_USTRINGPARAM("mydefault") );
+ OUString suDefault( "mydefault" );
int flag = atoi( argv[1] );
switch( flag ) {
case 1:
// parameters may be passed by command line arguments
aBootstrap.getFrom(
- OUString(RTL_CONSTASCII_USTRINGPARAM("UNO_SERVICES")),
+ OUString("UNO_SERVICES"),
suValue );
if ( suValue == "service.rdb" )
{
@@ -61,7 +61,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
case 2:
// parameters may be passed by ini file
aBootstrap.getFrom(
- OUString(RTL_CONSTASCII_USTRINGPARAM("EXECUTABLE_RC")),
+ OUString("EXECUTABLE_RC"),
suValue );
if ( suValue == "true" )
{
@@ -72,7 +72,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
case 3:
// parameters may be passed by command line arguments
aBootstrap.getFrom(
- OUString(RTL_CONSTASCII_USTRINGPARAM("QADEV_BOOTSTRAP")),
+ OUString("QADEV_BOOTSTRAP"),
suValue );
if ( suValue == "sun&ms" )
{
@@ -83,7 +83,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
case 4:
// parameters may be passed by custom .ini/rc file
aBs_custom.getFrom(
- OUString(RTL_CONSTASCII_USTRINGPARAM("RTLVALUE")),
+ OUString("RTLVALUE"),
suValue );
if ( suValue == "qadev17" )
{
@@ -94,7 +94,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
case 5:
// parameters may be passed by inheritance
aBs_custom.getFrom(
- OUString(RTL_CONSTASCII_USTRINGPARAM("EXECUTABLE_RC")),
+ OUString("EXECUTABLE_RC"),
suValue );
if ( suValue == "true" )
{
@@ -105,7 +105,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
default:
// parameters may be passed by inheritance
aBs_custom.getFrom(
- OUString(RTL_CONSTASCII_USTRINGPARAM("ABCDE")),
+ OUString("ABCDE"),
suValue, suDefault );
if ( suValue == "mydefault" )
{
diff --git a/sal/qa/rtl/locale/rtl_locale.cxx b/sal/qa/rtl/locale/rtl_locale.cxx
index 2cc938701e36..8d153b87ae1e 100644
--- a/sal/qa/rtl/locale/rtl_locale.cxx
+++ b/sal/qa/rtl/locale/rtl_locale.cxx
@@ -42,7 +42,7 @@ namespace rtl_locale
// default locale for test purpose
void setDefaultLocale()
{
- rtl::OLocale::setDefault(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("de")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DE")), /* rtl::OUString() */ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("hochdeutsch")) );
+ rtl::OLocale::setDefault(rtl::OUString("de"), rtl::OUString("DE"), /* rtl::OUString() */ rtl::OUString("hochdeutsch") );
}
class getDefault : public CppUnit::TestFixture
@@ -73,7 +73,7 @@ public:
void getDefault_001()
{
- // rtl::OLocale::setDefault(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("de")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DE")), rtl::OUString());
+ // rtl::OLocale::setDefault(rtl::OUString("de"), rtl::OUString("DE"), rtl::OUString());
rtl::OLocale aLocale = ::rtl::OLocale::getDefault();
CPPUNIT_ASSERT_MESSAGE("locale must not null", aLocale.getData() != NULL);
}
@@ -107,7 +107,7 @@ public:
// insert your test code here.
void setDefault_001()
{
- rtl::OLocale::setDefault(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US")), rtl::OUString());
+ rtl::OLocale::setDefault(rtl::OUString("en"), rtl::OUString("US"), rtl::OUString());
rtl::OLocale aLocale = ::rtl::OLocale::getDefault();
CPPUNIT_ASSERT_MESSAGE("locale must not null", aLocale.getData() != NULL);
@@ -297,8 +297,8 @@ public:
// insert your test code here.
void equals_001()
{
- rtl::OLocale aLocale1 = rtl::OLocale::registerLocale(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US")), rtl::OUString());
- rtl::OLocale aLocale2 = rtl::OLocale::registerLocale(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US")));
+ rtl::OLocale aLocale1 = rtl::OLocale::registerLocale(rtl::OUString("en"), rtl::OUString("US"), rtl::OUString());
+ rtl::OLocale aLocale2 = rtl::OLocale::registerLocale(rtl::OUString("en"), rtl::OUString("US"));
sal_Bool bLocaleAreEqual = sal_False;
bLocaleAreEqual = (aLocale1 == aLocale2);
@@ -308,8 +308,8 @@ public:
void equals_002()
{
- rtl::OLocale aLocale1 = rtl::OLocale::registerLocale(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US")), rtl::OUString());
- rtl::OLocale aLocale2 = rtl::OLocale::registerLocale(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US")));
+ rtl::OLocale aLocale1 = rtl::OLocale::registerLocale(rtl::OUString("en"), rtl::OUString("US"), rtl::OUString());
+ rtl::OLocale aLocale2 = rtl::OLocale::registerLocale(rtl::OUString("en"), rtl::OUString("US"));
sal_Int32 nEqual = rtl_locale_equals(aLocale1.getData(), aLocale2.getData());
CPPUNIT_ASSERT(nEqual != 0);
diff --git a/sal/qa/rtl/logfile/rtl_logfile.cxx b/sal/qa/rtl/logfile/rtl_logfile.cxx
index 78120212da13..0d539f3f0125 100644
--- a/sal/qa/rtl/logfile/rtl_logfile.cxx
+++ b/sal/qa/rtl/logfile/rtl_logfile.cxx
@@ -73,9 +73,9 @@ inline void printUString( const ::rtl::OUString & str, const sal_Char * msg = ""
inline ::rtl::OUString getTempPath( void )
{
#ifdef UNX
- rtl::OUString suDirURL( RTL_CONSTASCII_USTRINGPARAM("file:///tmp/") );
+ rtl::OUString suDirURL( "file:///tmp/" );
#else /* Windows */
- rtl::OUString suDirURL( RTL_CONSTASCII_USTRINGPARAM("file:///c:/temp/") );
+ rtl::OUString suDirURL( "file:///c:/temp/" );
#endif
return suDirURL;
}
@@ -139,8 +139,8 @@ namespace rtl_logfile
rtl_logfile_trace("trace %d %d %d\n" , 1 , 2 ,3 );
rtl::OUString suFilePath = getTempPath();
- suFilePath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("logfile1_")) + getCurrentPID( );
- suFilePath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".log"));
+ suFilePath += rtl::OUString("logfile1_") + getCurrentPID( );
+ suFilePath += rtl::OUString(".log");
::osl::FileBase::RC nError1;
::osl::File aTestFile( suFilePath );
@@ -228,8 +228,8 @@ public:
{
printf( "\n#Do some clean-ups ... only delete logfile1_*.log here!\n" );
rtl::OUString suFilePath = getTempPath();
- suFilePath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("logfile1_")) + getCurrentPID( );
- suFilePath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".log"));
+ suFilePath += rtl::OUString("logfile1_") + getCurrentPID( );
+ suFilePath += rtl::OUString(".log");
//if ( ifFileExist( suFilePath ) == sal_True )
::osl::FileBase::RC nError1;
diff --git a/sal/qa/rtl/oustring/rtl_OUString2.cxx b/sal/qa/rtl/oustring/rtl_OUString2.cxx
index aca03781bc3e..eebbcc6b2f4a 100644
--- a/sal/qa/rtl/oustring/rtl_OUString2.cxx
+++ b/sal/qa/rtl/oustring/rtl_OUString2.cxx
@@ -57,7 +57,7 @@ namespace rtl_OUString
/// test of OUString(rtl_uString*)
void ctors_001()
{
- rtl::OUString *pStr = new rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("a String") );
+ rtl::OUString *pStr = new rtl::OUString( "a String" );
rtl::OUString aStrToTest(pStr->pData);
delete pStr;
@@ -344,21 +344,21 @@ sal_Int16 SAL_CALL checkPrecisionSize()
void test() {
CPPUNIT_ASSERT_EQUAL(
static_cast< sal_Int32 >(-0x76543210),
- (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-76543210")).
+ (rtl::OUString("-76543210").
toInt32(16)));
CPPUNIT_ASSERT_EQUAL(
static_cast< sal_Int32 >(0xFEDCBA98),
- (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("+FEDCBA98")).
+ (rtl::OUString("+FEDCBA98").
toInt32(16)));
CPPUNIT_ASSERT_EQUAL(
static_cast< sal_Int64 >(-SAL_CONST_INT64(0x76543210FEDCBA98)),
(rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("-76543210FEDCBA98")).
+ "-76543210FEDCBA98").
toInt64(16)));
CPPUNIT_ASSERT_EQUAL(
static_cast< sal_Int64 >(SAL_CONST_INT64(0xFEDCBA9876543210)),
(rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("+FEDCBA9876543210")).
+ "+FEDCBA9876543210").
toInt64(16)));
}
@@ -690,88 +690,88 @@ public:
void lastIndexOf_test_oustring_offset_001()
{
// search for sun, start at the end, found (pos==0)
- rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("sun java system"));
- rtl::OUString aSearchStr(RTL_CONSTASCII_USTRINGPARAM("sun"));
+ rtl::OUString aStr("sun java system");
+ rtl::OUString aSearchStr("sun");
lastIndexOf_oustring_offset(aStr, aSearchStr, 0, aStr.getLength());
}
void lastIndexOf_test_oustring_offset_002()
{
// search for sun, start at pos = 3, found (pos==0)
- rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("sun java system"));
- rtl::OUString aSearchStr(RTL_CONSTASCII_USTRINGPARAM("sun"));
+ rtl::OUString aStr("sun java system");
+ rtl::OUString aSearchStr("sun");
lastIndexOf_oustring_offset(aStr, aSearchStr, 0, 3);
}
void lastIndexOf_test_oustring_offset_003()
{
// search for sun, start at pos = 2, found (pos==-1)
- rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("sun java system"));
- rtl::OUString aSearchStr(RTL_CONSTASCII_USTRINGPARAM("sun"));
+ rtl::OUString aStr("sun java system");
+ rtl::OUString aSearchStr("sun");
lastIndexOf_oustring_offset(aStr, aSearchStr, -1, 2);
}
void lastIndexOf_test_oustring_offset_004()
{
// search for sun, start at the end, found (pos==0)
- rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("sun java system"));
- rtl::OUString aSearchStr(RTL_CONSTASCII_USTRINGPARAM("sun"));
+ rtl::OUString aStr("sun java system");
+ rtl::OUString aSearchStr("sun");
lastIndexOf_oustring_offset(aStr, aSearchStr, -1, -1);
}
void lastIndexOf_test_oustring_001()
{
// search for sun, found (pos==0)
- rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("sun java system"));
- rtl::OUString aSearchStr(RTL_CONSTASCII_USTRINGPARAM("sun"));
+ rtl::OUString aStr("sun java system");
+ rtl::OUString aSearchStr("sun");
lastIndexOf_oustring(aStr, aSearchStr, 0);
}
void lastIndexOf_test_oustring_002()
{
// search for sun, found (pos==4)
- rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("the sun java system"));
- rtl::OUString aSearchStr(RTL_CONSTASCII_USTRINGPARAM("sun"));
+ rtl::OUString aStr("the sun java system");
+ rtl::OUString aSearchStr("sun");
lastIndexOf_oustring(aStr, aSearchStr, 4);
}
void lastIndexOf_test_oustring_003()
{
// search for sun, found (pos==8)
- rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("the sun sun java system"));
- rtl::OUString aSearchStr(RTL_CONSTASCII_USTRINGPARAM("sun"));
+ rtl::OUString aStr("the sun sun java system");
+ rtl::OUString aSearchStr("sun");
lastIndexOf_oustring(aStr, aSearchStr, 8);
}
void lastIndexOf_test_oustring_004()
{
// search for sun, found (pos==8)
- rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("the sun sun"));
- rtl::OUString aSearchStr(RTL_CONSTASCII_USTRINGPARAM("sun"));
+ rtl::OUString aStr("the sun sun");
+ rtl::OUString aSearchStr("sun");
lastIndexOf_oustring(aStr, aSearchStr, 8);
}
void lastIndexOf_test_oustring_005()
{
// search for sun, found (pos==4)
- rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("the sun su"));
- rtl::OUString aSearchStr(RTL_CONSTASCII_USTRINGPARAM("sun"));
+ rtl::OUString aStr("the sun su");
+ rtl::OUString aSearchStr("sun");
lastIndexOf_oustring(aStr, aSearchStr, 4);
}
void lastIndexOf_test_oustring_006()
{
// search for sun, found (pos==-1)
- rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("the su su"));
- rtl::OUString aSearchStr(RTL_CONSTASCII_USTRINGPARAM("sun"));
+ rtl::OUString aStr("the su su");
+ rtl::OUString aSearchStr("sun");
lastIndexOf_oustring(aStr, aSearchStr, -1);
}
void lastIndexOf_test_oustring_007()
{
// search for earth, not found (-1)
- rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("the su su"));
- rtl::OUString aSearchStr(RTL_CONSTASCII_USTRINGPARAM("earth"));
+ rtl::OUString aStr("the su su");
+ rtl::OUString aSearchStr("earth");
lastIndexOf_oustring(aStr, aSearchStr, -1);
}
@@ -779,7 +779,7 @@ public:
{
// search for earth, not found (-1)
rtl::OUString aStr = rtl::OUString();
- rtl::OUString aSearchStr(RTL_CONSTASCII_USTRINGPARAM("earth"));
+ rtl::OUString aSearchStr("earth");
lastIndexOf_oustring(aStr, aSearchStr, -1);
}
@@ -795,7 +795,7 @@ public:
void lastIndexOf_test_salunicode_001()
{
// search for 's', found (19)
- rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("the sun sun java system"));
+ rtl::OUString aStr("the sun sun java system");
sal_Unicode suChar = L's';
lastIndexOf_salunicode(aStr, suChar, 19);
}
@@ -803,7 +803,7 @@ public:
void lastIndexOf_test_salunicode_002()
{
// search for 'x', not found (-1)
- rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("the sun sun java system"));
+ rtl::OUString aStr("the sun sun java system");
sal_Unicode suChar = L'x';
lastIndexOf_salunicode(aStr, suChar, -1);
}
@@ -811,21 +811,21 @@ public:
void lastIndexOf_test_salunicode_offset_001()
{
// search for 's', start from pos last char, found (19)
- rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("the sun sun java system"));
+ rtl::OUString aStr("the sun sun java system");
sal_Unicode cuChar = L's';
lastIndexOf_salunicode_offset(aStr, cuChar, 19, aStr.getLength());
}
void lastIndexOf_test_salunicode_offset_002()
{
// search for 's', start pos is last occur from search behind, found (17)
- rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("the sun sun java system"));
+ rtl::OUString aStr("the sun sun java system");
sal_Unicode cuChar = L's';
lastIndexOf_salunicode_offset(aStr, cuChar, 17, 19);
}
void lastIndexOf_test_salunicode_offset_003()
{
// search for 't', start pos is 1, found (0)
- rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("the sun sun java system"));
+ rtl::OUString aStr("the sun sun java system");
sal_Unicode cuChar = L't';
lastIndexOf_salunicode_offset(aStr, cuChar, 0, 1);
}
@@ -884,7 +884,7 @@ public:
void getToken_001()
{
- rtl::OUString suTokenStr(RTL_CONSTASCII_USTRINGPARAM("a;b"));
+ rtl::OUString suTokenStr("a;b");
sal_Int32 nIndex = 0;
@@ -898,7 +898,7 @@ public:
void getToken_002()
{
- rtl::OUString suTokenStr(RTL_CONSTASCII_USTRINGPARAM("a;b.c"));
+ rtl::OUString suTokenStr("a;b.c");
sal_Int32 nIndex = 0;
@@ -915,7 +915,7 @@ public:
void getToken_003()
{
- rtl::OUString suTokenStr(RTL_CONSTASCII_USTRINGPARAM("a;;b"));
+ rtl::OUString suTokenStr("a;;b");
sal_Int32 nIndex = 0;
@@ -932,7 +932,7 @@ public:
void getToken_004()
{
- rtl::OUString suTokenStr(RTL_CONSTASCII_USTRINGPARAM("longer.then.ever."));
+ rtl::OUString suTokenStr("longer.then.ever.");
sal_Int32 nIndex = 0;
@@ -952,7 +952,7 @@ public:
}
void getToken_005() {
- rtl::OUString ab(RTL_CONSTASCII_USTRINGPARAM("ab"));
+ rtl::OUString ab("ab");
sal_Int32 n = 0;
CPPUNIT_ASSERT_MESSAGE(
"token should be 'ab'", ab.getToken(0, '-', n) == ab);
@@ -1001,13 +1001,13 @@ public:
void construct()
{
#ifdef RTL_INLINE_STRINGS
- ::rtl::OUString aFoo( RTL_CONSTASCII_USTRINGPARAM("foo") );
+ ::rtl::OUString aFoo( "foo" );
CPPUNIT_ASSERT_MESSAGE("string contents", aFoo[0] == 'f');
CPPUNIT_ASSERT_MESSAGE("string contents", aFoo[1] == 'o');
CPPUNIT_ASSERT_MESSAGE("string contents", aFoo[2] == 'o');
CPPUNIT_ASSERT_MESSAGE("string length", aFoo.getLength() == 3);
- ::rtl::OUString aBaa( RTL_CONSTASCII_USTRINGPARAM("this is a very long string with a lot of long things inside it and it goes on and on and on forever etc.") );
+ ::rtl::OUString aBaa( "this is a very long string with a lot of long things inside it and it goes on and on and on forever etc." );
CPPUNIT_ASSERT_MESSAGE("string length", aBaa.getLength() == 104);
// Dig at the internals ... FIXME: should we have the bit-flag defines public ?
CPPUNIT_ASSERT_MESSAGE("string static flags", (aBaa.pData->refCount & 1<<30) != 0);
@@ -1018,9 +1018,9 @@ public:
{
// The empty string is 'static' a special case ...
rtl::OUString aEmpty = rtl::OUString().intern();
- rtl::OUString aEmpty2 = rtl::OUString::intern( RTL_CONSTASCII_USTRINGPARAM( "" ) );
+ rtl::OUString aEmpty2 = rtl::OUString::intern( "" );
- ::rtl::OUString aFoo( RTL_CONSTASCII_USTRINGPARAM("foo") );
+ ::rtl::OUString aFoo( "foo" );
::rtl::OUString aFooIntern = aFoo.intern();
CPPUNIT_ASSERT_MESSAGE( "string contents", aFooIntern == "foo" );
CPPUNIT_ASSERT_MESSAGE("string length", aFooIntern.getLength() == 3);
@@ -1094,23 +1094,23 @@ void indexOfAscii::test() {
rtl::OUString().lastIndexOfAsciiL(RTL_CONSTASCII_STRINGPARAM("")));
CPPUNIT_ASSERT_EQUAL(
sal_Int32(0),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("foo")).indexOfAsciiL(
+ rtl::OUString("foo").indexOfAsciiL(
RTL_CONSTASCII_STRINGPARAM("foo")));
CPPUNIT_ASSERT_EQUAL(
sal_Int32(0),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("foo")).lastIndexOfAsciiL(
+ rtl::OUString("foo").lastIndexOfAsciiL(
RTL_CONSTASCII_STRINGPARAM("foo")));
CPPUNIT_ASSERT_EQUAL(
sal_Int32(2),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fofoobar")).indexOfAsciiL(
+ rtl::OUString("fofoobar").indexOfAsciiL(
RTL_CONSTASCII_STRINGPARAM("foo")));
CPPUNIT_ASSERT_EQUAL(
sal_Int32(3),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("foofoofob")).
+ rtl::OUString("foofoofob").
lastIndexOfAsciiL(RTL_CONSTASCII_STRINGPARAM("foo")));
CPPUNIT_ASSERT_EQUAL(
sal_Int32(3),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("foofoobar")).indexOfAsciiL(
+ rtl::OUString("foofoobar").indexOfAsciiL(
RTL_CONSTASCII_STRINGPARAM("foo"), 1));
}
@@ -1132,15 +1132,15 @@ void endsWith::test() {
rtl::OUString().endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM("foo")));
CPPUNIT_ASSERT_EQUAL(
true,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bar")).endsWithAsciiL(
+ rtl::OUString("bar").endsWithAsciiL(
RTL_CONSTASCII_STRINGPARAM("bar")));
CPPUNIT_ASSERT_EQUAL(
true,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("foobar")).endsWithAsciiL(
+ rtl::OUString("foobar").endsWithAsciiL(
RTL_CONSTASCII_STRINGPARAM("bar")));
CPPUNIT_ASSERT_EQUAL(
false,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FOOBAR")).endsWithAsciiL(
+ rtl::OUString("FOOBAR").endsWithAsciiL(
RTL_CONSTASCII_STRINGPARAM("bar")));
}
diff --git a/sal/qa/rtl/oustring/rtl_ustr.cxx b/sal/qa/rtl/oustring/rtl_ustr.cxx
index b787488912fe..d547cf280490 100644
--- a/sal/qa/rtl/oustring/rtl_ustr.cxx
+++ b/sal/qa/rtl/oustring/rtl_ustr.cxx
@@ -57,7 +57,7 @@ namespace rtl_ustr
void compare_000_1()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString aStr1("Line must be equal.");
rtl_ustr_compare( aStr1.getStr(), NULL);
// should not GPF
}
@@ -72,8 +72,8 @@ namespace rtl_ustr
void compare_002()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
- rtl::OUString aStr2(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString aStr1("Line must be equal.");
+ rtl::OUString aStr2("Line must be equal.");
sal_Int32 nValue = rtl_ustr_compare( aStr1.getStr(), aStr2.getStr());
CPPUNIT_ASSERT_MESSAGE("compare failed, strings are equal.", nValue == 0);
@@ -81,8 +81,8 @@ namespace rtl_ustr
void compare_003()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must differ."));
- rtl::OUString aStr2(RTL_CONSTASCII_USTRINGPARAM("Line foo bar, ok, differ."));
+ rtl::OUString aStr1("Line must differ.");
+ rtl::OUString aStr2("Line foo bar, ok, differ.");
sal_Int32 nValue = rtl_ustr_compare( aStr1.getStr(), aStr2.getStr());
CPPUNIT_ASSERT_MESSAGE("compare failed, strings differ.", nValue != 0);
@@ -113,7 +113,7 @@ namespace rtl_ustr
void compare_000_1()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString aStr1("Line must be equal.");
rtl_ustr_compareIgnoreAsciiCase( aStr1.getStr(), NULL);
}
void compare_001()
@@ -127,8 +127,8 @@ namespace rtl_ustr
void compare_002()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
- rtl::OUString aStr2(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString aStr1("Line must be equal.");
+ rtl::OUString aStr2("Line must be equal.");
sal_Int32 nValue = rtl_ustr_compareIgnoreAsciiCase( aStr1.getStr(), aStr2.getStr());
CPPUNIT_ASSERT_MESSAGE("compare failed, strings are equal.", nValue == 0);
@@ -136,8 +136,8 @@ namespace rtl_ustr
void compare_002_1()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
- rtl::OUString aStr2(RTL_CONSTASCII_USTRINGPARAM("LINE MUST BE EQUAL."));
+ rtl::OUString aStr1("Line must be equal.");
+ rtl::OUString aStr2("LINE MUST BE EQUAL.");
sal_Int32 nValue = rtl_ustr_compareIgnoreAsciiCase( aStr1.getStr(), aStr2.getStr());
CPPUNIT_ASSERT_MESSAGE("compare failed, strings are equal (if case insensitve).", nValue == 0);
@@ -145,8 +145,8 @@ namespace rtl_ustr
void compare_003()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must differ."));
- rtl::OUString aStr2(RTL_CONSTASCII_USTRINGPARAM("Line foo bar, ok, differ."));
+ rtl::OUString aStr1("Line must differ.");
+ rtl::OUString aStr2("Line foo bar, ok, differ.");
sal_Int32 nValue = rtl_ustr_compareIgnoreAsciiCase( aStr1.getStr(), aStr2.getStr());
CPPUNIT_ASSERT_MESSAGE("compare failed, strings differ.", nValue != 0);
@@ -179,7 +179,7 @@ namespace rtl_ustr
void compare_000_1()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString aStr1("Line must be equal.");
rtl_ustr_shortenedCompareIgnoreAsciiCase_WithLength( aStr1.getStr(), aStr1.getLength(), NULL, 0, 1);
}
void compare_001()
@@ -193,8 +193,8 @@ namespace rtl_ustr
void compare_002()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
- rtl::OUString aStr2(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString aStr1("Line must be equal.");
+ rtl::OUString aStr2("Line must be equal.");
sal_Int32 nValue = rtl_ustr_shortenedCompareIgnoreAsciiCase_WithLength( aStr1.getStr(), aStr1.getLength(),
aStr2.getStr(), aStr2.getLength(),
@@ -204,8 +204,8 @@ namespace rtl_ustr
void compare_002_1()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
- rtl::OUString aStr2(RTL_CONSTASCII_USTRINGPARAM("LINE MUST BE EQUAL."));
+ rtl::OUString aStr1("Line must be equal.");
+ rtl::OUString aStr2("LINE MUST BE EQUAL.");
sal_Int32 nValue = rtl_ustr_shortenedCompareIgnoreAsciiCase_WithLength( aStr1.getStr(), aStr1.getLength(),
aStr2.getStr(), aStr2.getLength(),
@@ -215,8 +215,8 @@ namespace rtl_ustr
void compare_003()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must differ."));
- rtl::OUString aStr2(RTL_CONSTASCII_USTRINGPARAM("Line foo bar, ok, differ."));
+ rtl::OUString aStr1("Line must differ.");
+ rtl::OUString aStr2("Line foo bar, ok, differ.");
sal_Int32 nValue = rtl_ustr_shortenedCompareIgnoreAsciiCase_WithLength( aStr1.getStr(), aStr1.getLength(),
aStr2.getStr(), aStr2.getLength(),
@@ -226,8 +226,8 @@ namespace rtl_ustr
void compare_004()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must differ."));
- rtl::OUString aStr2(RTL_CONSTASCII_USTRINGPARAM("Line foo bar, ok, differ."));
+ rtl::OUString aStr1("Line must differ.");
+ rtl::OUString aStr2("Line foo bar, ok, differ.");
sal_Int32 nValue = rtl_ustr_shortenedCompareIgnoreAsciiCase_WithLength( aStr1.getStr(), aStr1.getLength(),
aStr2.getStr(), aStr2.getLength(),
@@ -319,7 +319,7 @@ namespace rtl_ustr
void indexOfChar_001()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line for a indexOfChar."));
+ rtl::OUString aStr1("Line for a indexOfChar.");
sal_Int32 nIndex = rtl_ustr_indexOfChar( aStr1.getStr(), 'L' );
CPPUNIT_ASSERT_MESSAGE("index is wrong.", nIndex == 0);
@@ -336,7 +336,7 @@ namespace rtl_ustr
void indexOfChar_002()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line for a indexOfChar."));
+ rtl::OUString aStr1("Line for a indexOfChar.");
sal_Int32 nIndex = rtl_ustr_indexOfChar( aStr1.getStr(), 'y' );
CPPUNIT_ASSERT_MESSAGE("index is wrong.", nIndex == -1 );
@@ -365,7 +365,7 @@ namespace rtl_ustr
void lastIndexOfChar_001()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line for a lastIndexOfChar."));
+ rtl::OUString aStr1("Line for a lastIndexOfChar.");
sal_Int32 nIndex = rtl_ustr_lastIndexOfChar( aStr1.getStr(), 'C' );
CPPUNIT_ASSERT_MESSAGE("index is wrong.", nIndex == 22);
@@ -382,7 +382,7 @@ namespace rtl_ustr
void lastIndexOfChar_002()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line for a lastIndexOfChar."));
+ rtl::OUString aStr1("Line for a lastIndexOfChar.");
sal_Int32 nIndex = rtl_ustr_lastIndexOfChar( aStr1.getStr(), 'y' );
CPPUNIT_ASSERT_MESSAGE("index is wrong.", nIndex == -1 );
@@ -413,35 +413,35 @@ namespace rtl_ustr
void indexOfStr_000_1()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line for a indexOfStr."));
+ rtl::OUString aStr1("Line for a indexOfStr.");
rtl_ustr_indexOfStr( aStr1.getStr(), 0 );
}
void indexOfStr_001()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line for a indexOfStr."));
+ rtl::OUString aStr1("Line for a indexOfStr.");
- rtl::OUString suSearch(RTL_CONSTASCII_USTRINGPARAM("Line"));
+ rtl::OUString suSearch("Line");
sal_Int32 nIndex = rtl_ustr_indexOfStr( aStr1.getStr(), suSearch );
CPPUNIT_ASSERT_MESSAGE("index is wrong.", nIndex == 0);
- /* rtl::OUString */ suSearch(RTL_CONSTASCII_USTRINGPARAM("for"));
+ /* rtl::OUString */ suSearch("for");
/* sal_Int32 */ nIndex = rtl_ustr_indexOfStr( aStr1.getStr(), suSearch );
CPPUNIT_ASSERT_MESSAGE("index is wrong.", nIndex == 5);
- /* rtl::OUString */ suSearch(RTL_CONSTASCII_USTRINGPARAM("a"));
+ /* rtl::OUString */ suSearch("a");
/* sal_Int32 */ nIndex = rtl_ustr_indexOfStr( aStr1.getStr(), suSearch );
CPPUNIT_ASSERT_MESSAGE("index is wrong.", nIndex == 9);
- /* rtl::OUString */ suSearch(RTL_CONSTASCII_USTRINGPARAM("a index"));
+ /* rtl::OUString */ suSearch("a index");
/* sal_Int32 */ nIndex = rtl_ustr_indexOfStr( aStr1.getStr(), suSearch );
CPPUNIT_ASSERT_MESSAGE("index is wrong.", nIndex ==9);
}
void indexOfStr_002()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line for a indexOfStr."));
- rtl::OUString suSearch(RTL_CONSTASCII_USTRINGPARAM("not exist"));
+ rtl::OUString aStr1("Line for a indexOfStr.");
+ rtl::OUString suSearch("not exist");
sal_Int32 nIndex = rtl_ustr_indexOfStr( aStr1.getStr(), suSearch );
CPPUNIT_ASSERT_MESSAGE("index is wrong.", nIndex == -1 );
@@ -471,31 +471,31 @@ namespace rtl_ustr
void lastIndexOfStr_000_1()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line for a lastIndexOfStr."));
+ rtl::OUString aStr1("Line for a lastIndexOfStr.");
rtl_ustr_lastIndexOfStr( aStr1.getStr(), NULL );
}
void lastIndexOfStr_001()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line for a lastIndexOfStr."));
- rtl::OUString aSearchStr(RTL_CONSTASCII_USTRINGPARAM("Index"));
+ rtl::OUString aStr1("Line for a lastIndexOfStr.");
+ rtl::OUString aSearchStr("Index");
sal_Int32 nIndex = rtl_ustr_lastIndexOfStr( aStr1.getStr(), aSearchStr.getStr() );
CPPUNIT_ASSERT_MESSAGE("index is wrong.", nIndex == 15);
- /* rtl::OString */ aSearchStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Line"));
+ /* rtl::OString */ aSearchStr = rtl::OUString("Line");
/* sal_Int32 */ nIndex = rtl_ustr_lastIndexOfStr( aStr1.getStr(), aSearchStr.getStr() );
CPPUNIT_ASSERT_MESSAGE("index is wrong.", nIndex == 0);
- /* rtl::OString */ aSearchStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(""));
+ /* rtl::OString */ aSearchStr = rtl::OUString("");
/* sal_Int32 */ nIndex = rtl_ustr_lastIndexOfStr( aStr1.getStr(), aSearchStr.getStr() );
CPPUNIT_ASSERT_MESSAGE("index is wrong.", nIndex == -1);
}
void lastIndexOfStr_002()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line for a lastIndexOfStr."));
- rtl::OUString aSearchStr(RTL_CONSTASCII_USTRINGPARAM("foo"));
+ rtl::OUString aStr1("Line for a lastIndexOfStr.");
+ rtl::OUString aSearchStr("foo");
sal_Int32 nIndex = rtl_ustr_lastIndexOfStr( aStr1.getStr(), aSearchStr.getStr() );
CPPUNIT_ASSERT_MESSAGE("index is wrong.", nIndex == -1 );
@@ -503,8 +503,8 @@ namespace rtl_ustr
void lastIndexOfStr_003()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line for a lastIndexOfStr."));
- rtl::OUString aSearchStr(RTL_CONSTASCII_USTRINGPARAM("O"));
+ rtl::OUString aStr1("Line for a lastIndexOfStr.");
+ rtl::OUString aSearchStr("O");
sal_Int32 nIndex = rtl_ustr_lastIndexOfStr( aStr1.getStr(), aSearchStr.getStr() );
CPPUNIT_ASSERT_MESSAGE("index is wrong.", nIndex == 20 );
@@ -535,8 +535,8 @@ namespace rtl_ustr
void replaceChar_001()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("replace char."));
- rtl::OUString aShouldStr1(RTL_CONSTASCII_USTRINGPARAM("ruplacu char."));
+ rtl::OUString aStr1("replace char.");
+ rtl::OUString aShouldStr1("ruplacu char.");
sal_uInt32 nLength = aStr1.getLength() * sizeof(sal_Unicode);
sal_Unicode* pStr = (sal_Unicode*) malloc( nLength + sizeof(sal_Unicode)); // length + 1 (null terminator)
@@ -578,8 +578,8 @@ namespace rtl_ustr
}
void replaceChar_WithLength_001()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("replace char."));
- rtl::OUString aShouldStr1(RTL_CONSTASCII_USTRINGPARAM("ruplace char."));
+ rtl::OUString aStr1("replace char.");
+ rtl::OUString aShouldStr1("ruplace char.");
sal_uInt32 nLength = aStr1.getLength() * sizeof(sal_Unicode);
sal_Unicode* pStr = (sal_Unicode*) malloc(nLength);
@@ -595,8 +595,8 @@ namespace rtl_ustr
void replaceChar_WithLength_002()
{
- rtl::OUString aStr1 (RTL_CONSTASCII_USTRINGPARAM("eeeeeeeeeeeee"));
- rtl::OUString aShouldStr1(RTL_CONSTASCII_USTRINGPARAM("uuuuuueeeeeee"));
+ rtl::OUString aStr1 ("eeeeeeeeeeeee");
+ rtl::OUString aShouldStr1("uuuuuueeeeeee");
sal_uInt32 nLength = aStr1.getLength() * sizeof(sal_Unicode);
sal_Unicode* pStr = (sal_Unicode*) malloc(nLength); // no null terminator is need
@@ -636,8 +636,8 @@ namespace rtl_ustr
void toAsciiLowerCase_001()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("CHANGE THIS TO ASCII LOWER CASE."));
- rtl::OUString aShouldStr1(RTL_CONSTASCII_USTRINGPARAM("change this to ascii lower case."));
+ rtl::OUString aStr1("CHANGE THIS TO ASCII LOWER CASE.");
+ rtl::OUString aShouldStr1("change this to ascii lower case.");
sal_uInt32 nLength = aStr1.getLength() * sizeof(sal_Unicode);
sal_Unicode* pStr = (sal_Unicode*) malloc(nLength + sizeof(sal_Unicode) ); // we need to add '\0' so one more
@@ -674,8 +674,8 @@ namespace rtl_ustr
void toAsciiLowerCase_WithLength_001()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("CHANGE THIS TO ASCII LOWER CASE."));
- rtl::OUString aShouldStr1(RTL_CONSTASCII_USTRINGPARAM("change thiS TO ASCII LOWER CASE."));
+ rtl::OUString aStr1("CHANGE THIS TO ASCII LOWER CASE.");
+ rtl::OUString aShouldStr1("change thiS TO ASCII LOWER CASE.");
sal_uInt32 nLength = aStr1.getLength() * sizeof(sal_Unicode);
sal_Unicode* pStr = (sal_Unicode*) malloc(nLength);
@@ -718,8 +718,8 @@ namespace rtl_ustr
void toAsciiUpperCase_001()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("change this to ascii upper case."));
- rtl::OUString aShouldStr1(RTL_CONSTASCII_USTRINGPARAM("CHANGE THIS TO ASCII UPPER CASE."));
+ rtl::OUString aStr1("change this to ascii upper case.");
+ rtl::OUString aShouldStr1("CHANGE THIS TO ASCII UPPER CASE.");
sal_uInt32 nLength = aStr1.getLength() * sizeof(sal_Unicode);
sal_Unicode* pStr = (sal_Unicode*) malloc(nLength + sizeof(sal_Unicode)); // length + null terminator
@@ -756,8 +756,8 @@ namespace rtl_ustr
void toAsciiUpperCase_WithLength_001()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("change this to ascii lower case."));
- rtl::OUString aShouldStr1(RTL_CONSTASCII_USTRINGPARAM("CHANGE THIs to ascii lower case."));
+ rtl::OUString aStr1("change this to ascii lower case.");
+ rtl::OUString aShouldStr1("CHANGE THIs to ascii lower case.");
sal_uInt32 nLength = aStr1.getLength() * sizeof(sal_Unicode);
sal_Unicode* pStr = (sal_Unicode*) malloc(nLength);
@@ -796,7 +796,7 @@ namespace rtl_ustr
void trim_WithLength_000_1()
{
- rtl::OUString suStr(RTL_CONSTASCII_USTRINGPARAM(" trim this"));
+ rtl::OUString suStr(" trim this");
sal_uInt32 nLength = suStr.getLength() * sizeof(sal_Unicode);
sal_Unicode *pStr = (sal_Unicode*)malloc(nLength);
@@ -808,7 +808,7 @@ namespace rtl_ustr
void trim_WithLength_001()
{
- rtl::OUString suStr(RTL_CONSTASCII_USTRINGPARAM(" trim this"));
+ rtl::OUString suStr(" trim this");
sal_uInt32 nLength = suStr.getLength() * sizeof(sal_Unicode);
sal_Unicode *pStr = (sal_Unicode*)malloc(nLength);
memcpy(pStr, suStr.getStr(), nLength);
@@ -822,7 +822,7 @@ namespace rtl_ustr
void trim_WithLength_002()
{
- rtl::OUString suStr(RTL_CONSTASCII_USTRINGPARAM("trim this"));
+ rtl::OUString suStr("trim this");
sal_uInt32 nLength = suStr.getLength() * sizeof(sal_Unicode);
sal_Unicode *pStr = (sal_Unicode*)malloc(nLength);
@@ -837,7 +837,7 @@ namespace rtl_ustr
void trim_WithLength_003()
{
- rtl::OUString suStr(RTL_CONSTASCII_USTRINGPARAM(" trim this"));
+ rtl::OUString suStr(" trim this");
sal_uInt32 nLength = suStr.getLength() * sizeof(sal_Unicode);
sal_Unicode *pStr = (sal_Unicode*)malloc(nLength);
@@ -851,7 +851,7 @@ namespace rtl_ustr
void trim_WithLength_004()
{
- rtl::OUString suStr(RTL_CONSTASCII_USTRINGPARAM("\r\n\t \n\r trim \n this"));
+ rtl::OUString suStr("\r\n\t \n\r trim \n this");
sal_uInt32 nLength = suStr.getLength() * sizeof(sal_Unicode);
sal_Unicode *pStr = (sal_Unicode*)malloc(nLength);
@@ -865,7 +865,7 @@ namespace rtl_ustr
void trim_WithLength_005()
{
- rtl::OUString suStr(RTL_CONSTASCII_USTRINGPARAM("\r\n\t \n\r trim \t this \n\r\t\t "));
+ rtl::OUString suStr("\r\n\t \n\r trim \t this \n\r\t\t ");
sal_uInt32 nLength = suStr.getLength() * sizeof(sal_Unicode);
sal_Unicode *pStr = (sal_Unicode*)malloc(nLength);
@@ -941,7 +941,7 @@ namespace rtl_ustr
void equal_ascii_shorter()
{
- rtl::OUString refStr(RTL_CONSTASCII_USTRINGPARAM("referenceString"));
+ rtl::OUString refStr("referenceString");
char const * pAscii = "reference";
sal_Int32 value = rtl_ustr_ascii_compare_WithLength(refStr.pData->buffer, refStr.pData->length, pAscii);
@@ -950,7 +950,7 @@ namespace rtl_ustr
void equal_ascii_shorter_asciiLength()
{
- rtl::OUString refStr(RTL_CONSTASCII_USTRINGPARAM("referenceString"));
+ rtl::OUString refStr("referenceString");
char const * pAscii = "reference";
sal_Int32 value = rtl_ustr_ascii_compare_WithLength(refStr.pData->buffer, rtl_str_getLength(pAscii), pAscii);
@@ -959,7 +959,7 @@ namespace rtl_ustr
void equal_ref_shorter()
{
- rtl::OUString refStr(RTL_CONSTASCII_USTRINGPARAM("reference"));
+ rtl::OUString refStr("reference");
char const * pAscii = "referenceString";
sal_Int32 value = rtl_ustr_ascii_compare_WithLength(refStr.pData->buffer, refStr.pData->length, pAscii);
@@ -968,7 +968,7 @@ namespace rtl_ustr
void equal()
{
- rtl::OUString refStr(RTL_CONSTASCII_USTRINGPARAM("reference"));
+ rtl::OUString refStr("reference");
char const * pAscii = "reference";
sal_Int32 value = rtl_ustr_ascii_compare_WithLength(refStr.pData->buffer, refStr.pData->length, pAscii);
@@ -977,7 +977,7 @@ namespace rtl_ustr
void unequal_reference_bigger()
{
- rtl::OUString refStr(RTL_CONSTASCII_USTRINGPARAM("defghi"));
+ rtl::OUString refStr("defghi");
char const * pAscii = "abc";
sal_Int32 value = rtl_ustr_ascii_compare_WithLength(refStr.pData->buffer, refStr.pData->length, pAscii);
@@ -986,7 +986,7 @@ namespace rtl_ustr
void unequal_ascii_bigger()
{
- rtl::OUString refStr(RTL_CONSTASCII_USTRINGPARAM("abc"));
+ rtl::OUString refStr("abc");
char const * pAscii = "defghi";
sal_Int32 value = rtl_ustr_ascii_compare_WithLength(refStr.pData->buffer, refStr.pData->length, pAscii);
@@ -1020,13 +1020,13 @@ namespace rtl_ustr
void ascii_shortenedCompareIgnoreAsciiCase_WithLength_000_1()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString aStr1("Line must be equal.");
rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength( aStr1.getStr(), aStr1.getLength(), NULL, 0);
// should not GPF
}
void ascii_shortenedCompareIgnoreAsciiCase_WithLength_000_2()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString aStr1("Line must be equal.");
rtl::OString sStr2 = "Line is shorter.";
rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength( aStr1.getStr(), sStr2.getLength(), sStr2.getStr(), 0);
// should not GPF
@@ -1042,7 +1042,7 @@ namespace rtl_ustr
void ascii_shortenedCompareIgnoreAsciiCase_WithLength_002()
{
- rtl::OUString suStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString suStr1("Line must be equal.");
rtl::OString sStr2 = "Line must be equal.";
sal_Int32 nValue = rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength( suStr1.getStr(), suStr1.getLength(), sStr2.getStr(), sStr2.getLength());
@@ -1051,7 +1051,7 @@ namespace rtl_ustr
void ascii_shortenedCompareIgnoreAsciiCase_WithLength_003()
{
- rtl::OUString suStr1(RTL_CONSTASCII_USTRINGPARAM("Line must differ."));
+ rtl::OUString suStr1("Line must differ.");
rtl::OString sStr2 = "Line must be differ and longer.";
sal_Int32 nValue = rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength( suStr1.getStr(), suStr1.getLength(), sStr2.getStr(), sStr2.getLength());
@@ -1086,13 +1086,13 @@ namespace rtl_ustr
void ascii_compareIgnoreAsciiCase_WithLength_000_1()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString aStr1("Line must be equal.");
rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength( aStr1.getStr(), 0, NULL);
// should not GPF
}
void ascii_compareIgnoreAsciiCase_WithLength_000_2()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString aStr1("Line must be equal.");
rtl::OString sStr2 = "Line is shorter.";
rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength( aStr1.getStr(), sStr2.getLength(), sStr2.getStr());
// should not GPF
@@ -1108,7 +1108,7 @@ namespace rtl_ustr
void ascii_compareIgnoreAsciiCase_WithLength_002()
{
- rtl::OUString suStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString suStr1("Line must be equal.");
rtl::OString sStr2 = "Line must be equal.";
sal_Int32 nValue = rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength( suStr1.getStr(), suStr1.getLength(), sStr2.getStr());
@@ -1117,7 +1117,7 @@ namespace rtl_ustr
void ascii_compareIgnoreAsciiCase_WithLength_003()
{
- rtl::OUString suStr1(RTL_CONSTASCII_USTRINGPARAM("Line must differ."));
+ rtl::OUString suStr1("Line must differ.");
rtl::OString sStr2 = "Line must be differ and longer.";
sal_Int32 nValue = rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength( suStr1.getStr(), suStr1.getLength(), sStr2.getStr());
@@ -1152,7 +1152,7 @@ namespace rtl_ustr
void ascii_compare_000_1()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString aStr1("Line must be equal.");
rtl_ustr_ascii_compare( aStr1.getStr(), NULL);
// should not GPF
}
@@ -1167,7 +1167,7 @@ namespace rtl_ustr
void ascii_compare_002()
{
- rtl::OUString suStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString suStr1("Line must be equal.");
rtl::OString sStr2 = "Line must be equal.";
sal_Int32 nValue = rtl_ustr_ascii_compare( suStr1.getStr(), sStr2.getStr());
@@ -1176,7 +1176,7 @@ namespace rtl_ustr
void ascii_compare_003()
{
- rtl::OUString suStr1(RTL_CONSTASCII_USTRINGPARAM("Line must differ."));
+ rtl::OUString suStr1("Line must differ.");
rtl::OString sStr2 = "Line foo bar, ok, differ.";
sal_Int32 nValue = rtl_ustr_ascii_compare( suStr1.getStr(), sStr2.getStr());
@@ -1210,7 +1210,7 @@ namespace rtl_ustr
void ascii_compareIgnoreAsciiCase_000_1()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString aStr1("Line must be equal.");
rtl_ustr_ascii_compareIgnoreAsciiCase( aStr1.getStr(), NULL);
// should not GPF
}
@@ -1225,7 +1225,7 @@ namespace rtl_ustr
void ascii_compareIgnoreAsciiCase_002()
{
- rtl::OUString suStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString suStr1("Line must be equal.");
rtl::OString sStr2 = "Line must be equal.";
sal_Int32 nValue = rtl_ustr_ascii_compareIgnoreAsciiCase( suStr1.getStr(), sStr2.getStr());
@@ -1234,7 +1234,7 @@ namespace rtl_ustr
void ascii_compareIgnoreAsciiCase_002_1()
{
- rtl::OUString suStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal, when ignore case."));
+ rtl::OUString suStr1("Line must be equal, when ignore case.");
rtl::OString sStr2 = "LINE MUST BE EQUAL, WHEN IGNORE CASE.";
sal_Int32 nValue = rtl_ustr_ascii_compareIgnoreAsciiCase( suStr1.getStr(), sStr2.getStr());
@@ -1243,7 +1243,7 @@ namespace rtl_ustr
void ascii_compareIgnoreAsciiCase_003()
{
- rtl::OUString suStr1(RTL_CONSTASCII_USTRINGPARAM("Line must differ."));
+ rtl::OUString suStr1("Line must differ.");
rtl::OString sStr2 = "Line foo bar, ok, differ.";
sal_Int32 nValue = rtl_ustr_ascii_compareIgnoreAsciiCase( suStr1.getStr(), sStr2.getStr());
@@ -1254,8 +1254,8 @@ namespace rtl_ustr
// void ascii_compareIgnoreAsciiCase_001()
// {
- // rtl::OUString suStr1(RTL_CONSTASCII_USTRINGPARAM("change this to ascii upper case."));
- // rtl::OUString aShouldStr1(RTL_CONSTASCII_USTRINGPARAM("CHANGE THIS TO ASCII UPPER CASE."));
+ // rtl::OUString suStr1("change this to ascii upper case.");
+ // rtl::OUString aShouldStr1("CHANGE THIS TO ASCII UPPER CASE.");
//
// sal_uInt32 nLength = suStr1.getLength() * sizeof(sal_Unicode);
// sal_Unicode* pStr = (sal_Unicode*) malloc(nLength + sizeof(sal_Unicode)); // length + null terminator
@@ -1308,7 +1308,7 @@ namespace rtl_ustr
void ascii_compareIgnoreAsciiCase_000_1()
{
- rtl::OUString aStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString aStr1("Line must be equal.");
rtl_ustr_ascii_compareIgnoreAsciiCase( aStr1.getStr(), NULL);
// should not GPF
}
@@ -1323,7 +1323,7 @@ namespace rtl_ustr
void ascii_compareIgnoreAsciiCase_002()
{
- rtl::OUString suStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal."));
+ rtl::OUString suStr1("Line must be equal.");
rtl::OString sStr2 = "Line must be equal.";
sal_Int32 nValue = rtl_ustr_ascii_compareIgnoreAsciiCase( suStr1.getStr(), sStr2.getStr());
@@ -1332,7 +1332,7 @@ namespace rtl_ustr
void ascii_compareIgnoreAsciiCase_002_1()
{
- rtl::OUString suStr1(RTL_CONSTASCII_USTRINGPARAM("Line must be equal, when ignore case."));
+ rtl::OUString suStr1("Line must be equal, when ignore case.");
rtl::OString sStr2 = "LINE MUST BE EQUAL, WHEN IGNORE CASE.";
sal_Int32 nValue = rtl_ustr_ascii_compareIgnoreAsciiCase( suStr1.getStr(), sStr2.getStr());
@@ -1341,7 +1341,7 @@ namespace rtl_ustr
void ascii_compareIgnoreAsciiCase_003()
{
- rtl::OUString suStr1(RTL_CONSTASCII_USTRINGPARAM("Line must differ."));
+ rtl::OUString suStr1("Line must differ.");
rtl::OString sStr2 = "Line foo bar, ok, differ.";
sal_Int32 nValue = rtl_ustr_ascii_compareIgnoreAsciiCase( suStr1.getStr(), sStr2.getStr());
@@ -1352,8 +1352,8 @@ namespace rtl_ustr
// void ascii_compareIgnoreAsciiCase_001()
// {
- // rtl::OUString suStr1(RTL_CONSTASCII_USTRINGPARAM("change this to ascii upper case."));
- // rtl::OUString aShouldStr1(RTL_CONSTASCII_USTRINGPARAM("CHANGE THIS TO ASCII UPPER CASE."));
+ // rtl::OUString suStr1("change this to ascii upper case.");
+ // rtl::OUString aShouldStr1("CHANGE THIS TO ASCII UPPER CASE.");
//
// sal_uInt32 nLength = suStr1.getLength() * sizeof(sal_Unicode);
// sal_Unicode* pStr = (sal_Unicode*) malloc(nLength + sizeof(sal_Unicode)); // length + null terminator
diff --git a/sal/qa/rtl/process/rtl_Process.cxx b/sal/qa/rtl/process/rtl_Process.cxx
index 144dd8d0205a..4f91fa03731a 100644
--- a/sal/qa/rtl/process/rtl_Process.cxx
+++ b/sal/qa/rtl/process/rtl_Process.cxx
@@ -70,7 +70,7 @@ inline ::rtl::OUString getModulePath( void )
printUString(suDirPath, "modulePath:");
suDirPath = suDirPath.copy( 0, suDirPath.lastIndexOf('/') );
suDirPath = suDirPath.copy( 0, suDirPath.lastIndexOf('/') + 1);
- suDirPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bin"));
+ suDirPath += rtl::OUString("bin");
return suDirPath;
}
@@ -93,9 +93,9 @@ public:
void getAppCommandArg_001()
{
#if defined(WNT)
- const rtl::OUString EXECUTABLE_NAME(RTL_CONSTASCII_USTRINGPARAM("child_process.exe"));
+ const rtl::OUString EXECUTABLE_NAME("child_process.exe");
#else
- const rtl::OUString EXECUTABLE_NAME(RTL_CONSTASCII_USTRINGPARAM("child_process"));
+ const rtl::OUString EXECUTABLE_NAME("child_process");
#endif
rtl::OUString suCWD = getModulePath();
// rtl::OUString suCWD2 = getExecutableDirectory();
@@ -114,7 +114,7 @@ public:
pParameters[3] = suParam3.pData;
rtl::OUString suFileURL = suCWD;
- suFileURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+ suFileURL += rtl::OUString("/");
suFileURL += EXECUTABLE_NAME;
oslProcessError osl_error = osl_executeProcess(
@@ -230,9 +230,9 @@ public:
void getGlobalProcessId_002()
{
#if defined(WNT)
- const rtl::OUString EXEC_NAME(RTL_CONSTASCII_USTRINGPARAM("child_process_id.exe"));
+ const rtl::OUString EXEC_NAME("child_process_id.exe");
#else
- const rtl::OUString EXEC_NAME(RTL_CONSTASCII_USTRINGPARAM("child_process_id"));
+ const rtl::OUString EXEC_NAME("child_process_id");
#endif
sal_uInt8 pTargetUUID1[16];
rtl_getGlobalProcessId( pTargetUUID1 );
@@ -244,7 +244,7 @@ public:
rtl::OUString suCWD = getModulePath();
oslProcess hProcess = NULL;
rtl::OUString suFileURL = suCWD;
- suFileURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+ suFileURL += rtl::OUString("/");
suFileURL += EXEC_NAME;
oslFileHandle* pChildOutputRead = new oslFileHandle();
oslProcessError osl_error = osl_executeProcess_WithRedirectedIO(
diff --git a/sal/qa/rtl/uri/rtl_Uri.cxx b/sal/qa/rtl/uri/rtl_Uri.cxx
index 7a17d85bffef..1799e6f3c79c 100644
--- a/sal/qa/rtl/uri/rtl_Uri.cxx
+++ b/sal/qa/rtl/uri/rtl_Uri.cxx
@@ -222,9 +222,9 @@ namespace Stringtest
void test_UTF8_files()
{
#ifdef UNX
- rtl::OUString suDirURL(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///tmp/atestdir")));
+ rtl::OUString suDirURL(rtl::OUString("file:///tmp/atestdir"));
#else /* Windows */
- rtl::OUString suDirURL(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///c:/temp/atestdir")));
+ rtl::OUString suDirURL(rtl::OUString("file:///c:/temp/atestdir"));
#endif
osl::Directory aDir(suDirURL);
aDir.open();