diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 13:38:03 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 14:12:36 +0100 |
commit | 484401bb5e2aaea5cb1645743ed615f4166b6cda (patch) | |
tree | 3721b0b35fe3da541bd241f0911f453b30de78ca | |
parent | ucbhelper: Use appropriate OUString functions on string constants (diff) | |
download | core-484401bb5e2aaea5cb1645743ed615f4166b6cda.tar.gz core-484401bb5e2aaea5cb1645743ed615f4166b6cda.zip |
unotest: Use appropriate OUString functions on string constants
Change-Id: I449587dd8e6e625e886e4ffc6419c612adffcfde
-rw-r--r-- | unotest/source/cpp/getargument.cxx | 3 | ||||
-rw-r--r-- | unotest/source/cpp/gettestargument.cxx | 3 | ||||
-rw-r--r-- | unotest/source/cpp/officeconnection.cxx | 8 | ||||
-rw-r--r-- | unotest/source/cpp/toabsolutefileurl.cxx | 7 | ||||
-rw-r--r-- | unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx | 3 |
5 files changed, 8 insertions, 16 deletions
diff --git a/unotest/source/cpp/getargument.cxx b/unotest/source/cpp/getargument.cxx index 00206497f432..7a7e765e0eb1 100644 --- a/unotest/source/cpp/getargument.cxx +++ b/unotest/source/cpp/getargument.cxx @@ -32,8 +32,7 @@ namespace detail { bool getArgument(OUString const & name, OUString * value) { OSL_ASSERT(value != 0); - return rtl::Bootstrap::get( - OUString("arg-") + name, *value); + return rtl::Bootstrap::get("arg-" + name, *value); } } diff --git a/unotest/source/cpp/gettestargument.cxx b/unotest/source/cpp/gettestargument.cxx index 86ca32b254aa..93300c5730d5 100644 --- a/unotest/source/cpp/gettestargument.cxx +++ b/unotest/source/cpp/gettestargument.cxx @@ -28,8 +28,7 @@ namespace test { bool getTestArgument(OUString const & name, OUString * value) { - return detail::getArgument( - OUString("testarg.") + name, value); + return detail::getArgument("testarg." + name, value); } } diff --git a/unotest/source/cpp/officeconnection.cxx b/unotest/source/cpp/officeconnection.cxx index 91568b089633..0c9f045b23a2 100644 --- a/unotest/source/cpp/officeconnection.cxx +++ b/unotest/source/cpp/officeconnection.cxx @@ -65,9 +65,7 @@ void OfficeConnection::setUp() { OUString argUser; CPPUNIT_ASSERT( detail::getArgument(OUString("user"), &argUser)); - OUString userArg( - OUString("-env:UserInstallation=") + - toAbsoluteFileUrl(argUser)); + OUString userArg("-env:UserInstallation=" + toAbsoluteFileUrl(argUser)); OUString jreArg( "-env:UNO_JAVA_JFW_ENV_JREHOME=true"); OUString classpathArg("-env:UNO_JAVA_JFW_ENV_CLASSPATH=true"); @@ -101,9 +99,7 @@ void OfficeConnection::setUp() { context_ = css::uno::Reference< css::uno::XComponentContext >( resolver->resolve( - OUString("uno:") + - desc + - OUString(";urp;StarOffice.ComponentContext")), + "uno:" + desc + ";urp;StarOffice.ComponentContext"), css::uno::UNO_QUERY_THROW); break; } catch (css::connection::NoConnectException &) {} diff --git a/unotest/source/cpp/toabsolutefileurl.cxx b/unotest/source/cpp/toabsolutefileurl.cxx index 5cf86b14f319..32d37d94633c 100644 --- a/unotest/source/cpp/toabsolutefileurl.cxx +++ b/unotest/source/cpp/toabsolutefileurl.cxx @@ -34,15 +34,14 @@ OUString toAbsoluteFileUrl(OUString const & relativePathname) { oslProcessError e1 = osl_getProcessWorkingDir(&cwd.pData); if (e1 != osl_Process_E_None) { throw css::uno::RuntimeException( - OUString("osl_getProcessWorkingDir failed with ") + - OUString::number(e1)); + "osl_getProcessWorkingDir failed with " + OUString::number(e1)); } OUString url; osl::FileBase::RC e2 = osl::FileBase::getFileURLFromSystemPath( relativePathname, url); if (e2 != osl::FileBase::E_None) { throw css::uno::RuntimeException( - OUString("osl::FileBase::getFileURLFromSystemPath(") + + "osl::FileBase::getFileURLFromSystemPath(" + relativePathname + ") failed with " + OUString::number(e2)); @@ -51,7 +50,7 @@ OUString toAbsoluteFileUrl(OUString const & relativePathname) { e2 = osl::FileBase::getAbsoluteFileURL(cwd, url, absUrl); if (e2 != osl::FileBase::E_None) { throw css::uno::RuntimeException( - OUString("osl::FileBase::getAbsoluteFileURL(") + + "osl::FileBase::getAbsoluteFileURL(" + cwd + ", " + url + ") failed with " + OUString::number(e2)); diff --git a/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx b/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx index 2b9d773d297f..7806e4fd3a6c 100644 --- a/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx +++ b/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx @@ -68,8 +68,7 @@ bool Prot::protect( context, CppUnit::Message( convert( - OUString("An uncaught exception of type ") - + a.getValueTypeName()), + "An uncaught exception of type " + a.getValueTypeName()), convert(e.Message))); } return false; |