Kaydet (Commit) 484401bb authored tarafından Stephan Bergmann's avatar Stephan Bergmann

unotest: Use appropriate OUString functions on string constants

Change-Id: I449587dd8e6e625e886e4ffc6419c612adffcfde
üst 9c9276c9
......@@ -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);
}
}
......
......@@ -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);
}
}
......
......@@ -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 &) {}
......
......@@ -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));
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment