summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-16 17:30:08 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-16 17:30:08 +0100
commit9b03a827b2955edf5dc726d498276c4f94639c8d (patch)
tree4589c9c7eb4016743a85bfbc7e82219ba3f47da1 /sal
parent7fbdb69c6ba160ad0835542736a5def07f0c642e (diff)
sal: Use appropriate OUString functions on string constants
Change-Id: I4382504549eb1e3a8c34495a21d6df10a86ac23b
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/osl/file/osl_File.cxx4
-rw-r--r--sal/qa/osl/process/osl_process.cxx4
-rw-r--r--sal/qa/rtl/doublelock/rtl_doublelocking.cxx2
-rw-r--r--sal/qa/rtl/uri/rtl_testuri.cxx36
4 files changed, 22 insertions, 24 deletions
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index fdf44a098dd7..e573d4a04a19 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -572,9 +572,9 @@ namespace osl_FileBase
void getAbsoluteFileURL::getAbsoluteFileURL_004()
{
//create two level directories under $Temp/PID/
- ::rtl::OUString aUStrUpBase = aUserDirectoryURL + ::rtl::OUString("/test1");
+ ::rtl::OUString aUStrUpBase = aUserDirectoryURL + "/test1";
createTestDirectory( aUStrUpBase );
- ::rtl::OUString aUStrBase = aUserDirectoryURL + ::rtl::OUString("/test1/dir1");
+ ::rtl::OUString aUStrBase = aUserDirectoryURL + "/test1/dir1";
createTestDirectory( aUStrBase );
::rtl::OUString suAssume = aUserDirectoryURL.concat( ::rtl::OUString("/mytestfile") );
diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx
index 07731e890bd6..5a5e8a8c9e4c 100644
--- a/sal/qa/osl/process/osl_process.cxx
+++ b/sal/qa/osl/process/osl_process.cxx
@@ -439,9 +439,9 @@ public:
{
oslProcess process;
#if defined(WNT)
- rtl::OUString suBatch = suCWD + rtl::OUString("/") + rtl::OUString("batch.bat");
+ rtl::OUString suBatch = suCWD + "/batch.bat";
#else
- rtl::OUString suBatch = suCWD + rtl::OUString("/") + rtl::OUString("batch.sh");
+ rtl::OUString suBatch = suCWD + "/batch.sh";
#endif
oslProcessError osl_error = osl_executeProcess(
suBatch.pData,
diff --git a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
index 6c4227efc2cc..79451cc6fa49 100644
--- a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
+++ b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
@@ -92,7 +92,7 @@ public:
:m_nOK(0),
m_nFails(0)
{
- m_sConstStr = rtl::OUString( CONST_TEST_STRING );
+ m_sConstStr = CONST_TEST_STRING;
}
sal_Int32 getOK() { return m_nOK; }
diff --git a/sal/qa/rtl/uri/rtl_testuri.cxx b/sal/qa/rtl/uri/rtl_testuri.cxx
index d798a856ddc8..e92afe5777c5 100644
--- a/sal/qa/rtl/uri/rtl_testuri.cxx
+++ b/sal/qa/rtl/uri/rtl_testuri.cxx
@@ -188,8 +188,7 @@ void Test::test_Uri() {
aBuffer.append(static_cast< sal_Unicode >(0xDFFF)); // %ED%BF%BF
aBuffer.append('A'); // A
aText1 = aBuffer.makeStringAndClear();
- aText2 = rtl::OUString(
- "%ED%A0%80" "%F0%90%8F%BF" "%ED%BF%BF" "A");
+ aText2 = "%ED%A0%80" "%F0%90%8F%BF" "%ED%BF%BF" "A";
CPPUNIT_ASSERT_MESSAGE(
"failure 11",
(rtl::Uri::encode(
@@ -209,8 +208,7 @@ void Test::test_Uri() {
RTL_TEXTENCODING_UTF8)
== aText2));
- aText1 = rtl::OUString(
- "%ed%a0%80" "%f0%90%8f%bf" "%ed%bf%bf" "A");
+ aText1 = "%ed%a0%80" "%f0%90%8f%bf" "%ed%bf%bf" "A";
aBuffer.append("%ED%A0%80");
aBuffer.append(static_cast< sal_Unicode >(0xD800));
aBuffer.append(static_cast< sal_Unicode >(0xDFFF));
@@ -229,7 +227,7 @@ void Test::test_Uri() {
// Check UTF-8 handling:
- aText1 = rtl::OUString("%E0%83%BF");
+ aText1 = "%E0%83%BF";
// \U+00FF encoded with three instead of two bytes
aText2 = aText1;
CPPUNIT_ASSERT_MESSAGE(
@@ -239,7 +237,7 @@ void Test::test_Uri() {
RTL_TEXTENCODING_UTF8)
== aText2));
- aText1 = rtl::OUString("%EF%BF%BF");
+ aText1 = "%EF%BF%BF";
// \U+FFFF is no legal character
aText2 = aText1;
CPPUNIT_ASSERT_MESSAGE(
@@ -251,7 +249,7 @@ void Test::test_Uri() {
// Check IURI handling:
- aText1 = rtl::OUString("%30%C3%BF");
+ aText1 = "%30%C3%BF";
aBuffer.append("%30");
aBuffer.append(static_cast< sal_Unicode >(0x00FF));
aText2 = aBuffer.makeStringAndClear();
@@ -262,8 +260,8 @@ void Test::test_Uri() {
// Check modified rtl_UriCharClassUnoParamValue (removed '[' and ']'):
- aText1 = rtl::OUString("[]%5B%5D");
- aText2 = rtl::OUString("%5B%5D%5B%5D");
+ aText1 = "[]%5B%5D";
+ aText2 = "%5B%5D%5B%5D";
CPPUNIT_ASSERT_MESSAGE(
"failure 19",
(rtl::Uri::encode(
@@ -367,7 +365,7 @@ void Test::test_Uri() {
{
sal_Unicode const aText1U[] = { ' ', '!', 0x0401, 0x045F, 0 };
aText1 = rtl::OUString(aText1U);
- aText2 = rtl::OUString("%20!%A1%FF");
+ aText2 = "%20!%A1%FF";
CPPUNIT_ASSERT_MESSAGE(
"failure 20",
(rtl::Uri::encode(
@@ -402,7 +400,7 @@ void Test::test_Uri() {
{
sal_Unicode const aText1U[] = { ' ', '!', 0x028A, 0xD849, 0xDD13, 0 };
aText1 = rtl::OUString(aText1U);
- aText2 = rtl::OUString("%20!%81%30%B1%33%95%39%C5%37");
+ aText2 = "%20!%81%30%B1%33%95%39%C5%37";
CPPUNIT_ASSERT_MESSAGE(
"failure 22",
(rtl::Uri::encode(
@@ -430,7 +428,7 @@ void Test::test_Uri() {
== aText2));
}
{
- aText1 = rtl::OUString("%20%C4%80%FF");
+ aText1 = "%20%C4%80%FF";
aText2 = rtl::OUString();
CPPUNIT_ASSERT_MESSAGE(
"failure 24",
@@ -440,7 +438,7 @@ void Test::test_Uri() {
}
#if WITH_LOCALE_ALL || WITH_LOCALE_zh
{
- aText1 = rtl::OUString("%81 ");
+ aText1 = "%81 ";
aText2 = rtl::OUString();
CPPUNIT_ASSERT_MESSAGE(
"failure 25",
@@ -449,7 +447,7 @@ void Test::test_Uri() {
== aText2));
}
{
- aText1 = rtl::OUString("%81%20");
+ aText1 = "%81%20";
aText2 = rtl::OUString();
CPPUNIT_ASSERT_MESSAGE(
"failure 26",
@@ -458,7 +456,7 @@ void Test::test_Uri() {
== aText2));
}
{
- aText1 = rtl::OUString("%81%30%B1%33");
+ aText1 = "%81%30%B1%33";
sal_Unicode const aText2U[] = { 0x028A, 0 };
aText2 = rtl::OUString(aText2U);
CPPUNIT_ASSERT_MESSAGE(
@@ -468,7 +466,7 @@ void Test::test_Uri() {
== aText2));
}
{
- aText1 = rtl::OUString("%810%B13");
+ aText1 = "%810%B13";
sal_Unicode const aText2U[] = { 0x028A, 0 };
aText2 = rtl::OUString(aText2U);
CPPUNIT_ASSERT_MESSAGE(
@@ -481,8 +479,8 @@ void Test::test_Uri() {
// Check rtl_UriEncodeStrictKeepEscapes mode:
{
- aText1 = rtl::OUString("%%ea%c3%aa");
- aText2 = rtl::OUString("%25%EA%C3%AA");
+ aText1 = "%%ea%c3%aa";
+ aText2 = "%25%EA%C3%AA";
CPPUNIT_ASSERT_MESSAGE(
"failure 29",
(rtl::Uri::encode(
@@ -493,7 +491,7 @@ void Test::test_Uri() {
{
sal_Unicode const aText1U[] = { 0x00EA, 0 };
aText1 = rtl::OUString(aText1U);
- aText2 = rtl::OUString("%C3%AA");
+ aText2 = "%C3%AA";
CPPUNIT_ASSERT_MESSAGE(
"failure 30",
(rtl::Uri::encode(