summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-12 12:22:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-12 12:22:01 +0100
commitba7605c8c0d5515bb055e46354ee806cb6a31ed4 (patch)
treecbf528a7e7ca28ac555a4b34f64252f7020a38ab
parent3dfcc045dd6a7703eaa0e2617d9247e0c90102de (diff)
sal: Use appropriate OUString functions on string constants
Change-Id: I568c2e0c9b5b234d941e17d57bcb53374626909e
-rw-r--r--sal/qa/osl/condition/osl_Condition_Const.h2
-rw-r--r--sal/qa/osl/file/osl_File_Const.h7
2 files changed, 5 insertions, 4 deletions
diff --git a/sal/qa/osl/condition/osl_Condition_Const.h b/sal/qa/osl/condition/osl_Condition_Const.h
index 614d906023cc..c7158eab86a3 100644
--- a/sal/qa/osl/condition/osl_Condition_Const.h
+++ b/sal/qa/osl/condition/osl_Condition_Const.h
@@ -37,7 +37,7 @@
#include <cppunit/plugin/TestPlugIn.h>
#define OSLTEST_DECLARE_USTRING( str_name, str_value ) \
- ::rtl::OUString a##str_name = rtl::OUString::createFromAscii( str_value )
+ ::rtl::OUString a##str_name( str_value )
// condition names
diff --git a/sal/qa/osl/file/osl_File_Const.h b/sal/qa/osl/file/osl_File_Const.h
index 97db12bdd446..ae04a07c9cf3 100644
--- a/sal/qa/osl/file/osl_File_Const.h
+++ b/sal/qa/osl/file/osl_File_Const.h
@@ -103,10 +103,10 @@ const sal_Char pBuffer_Blank[] = "";
// n###Len for its length
#define OSLTEST_DECLARE( str_name, str_value ) \
- ::rtl::OUString a##str_name = rtl::OUString::createFromAscii( ( str_value ) )
+ ::rtl::OUString a##str_name( ( str_value ) )
#define OSLTEST_DECLARE_UTF8(str_name, str_value ) \
- ::rtl::OUString a##str_name = ::rtl::Uri::decode( ::rtl::OUString::createFromAscii( ( str_value ) ), rtl_UriDecodeToIuri, RTL_TEXTENCODING_UTF8)
+ ::rtl::OUString a##str_name = ::rtl::Uri::decode( ::rtl::OUString( str_value ), rtl_UriDecodeToIuri, RTL_TEXTENCODING_UTF8)
// OS independent file definition
@@ -123,7 +123,8 @@ OSLTEST_DECLARE( UserDirectorySys, TEST_PLATFORM_ROOT TEST_PLATFORM_TEMP "" );
// common used URL:temp, canonical, root, relative, link,etc
OSLTEST_DECLARE( CanURL1, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/canonical.name" );
-OSLTEST_DECLARE( CanURL2, "ca@#;+.,$///78no\0ni..name" );
+rtl::OUString aCanURL2(
+ RTL_CONSTASCII_USTRINGPARAM("ca@#;+.,$///78no\0ni..name"));
OSLTEST_DECLARE( CanURL3, "ca@#;+.,$//tmp/678nonical//name" );
OSLTEST_DECLARE( CanURL4, "canonical.name" );
OSLTEST_DECLARE( TmpName1, "tmpdir" );