summaryrefslogtreecommitdiff
path: root/unotest
diff options
context:
space:
mode:
authorChr. Rossmanith <ChrRossmanith@gmx.de>2013-03-12 14:44:42 +0100
committerChr. Rossmanith <ChrRossmanith@gmx.de>2013-03-12 21:02:26 +0100
commit413fe6c65a8dfbb5549da200f4523ef2347e11f8 (patch)
tree142be3ce0eb36e9a07dfabaeb92a2f0bafd516e8 /unotest
parent32ac07a9296ce2cfaaef57c177b3d88e75b28f23 (diff)
Removed RTL_CONSTASCII_(U)STRINGPARAM in unotest
Change-Id: Iba14ed093bcb97ac1f6996e62e6191cf09574bfd
Diffstat (limited to 'unotest')
-rw-r--r--unotest/source/cpp/filters-test.cxx6
-rw-r--r--unotest/source/cpp/getargument.cxx2
-rw-r--r--unotest/source/cpp/gettestargument.cxx2
-rw-r--r--unotest/source/cpp/macros_test.cxx2
-rw-r--r--unotest/source/cpp/officeconnection.cxx47
-rw-r--r--unotest/source/cpp/toabsolutefileurl.cxx18
-rw-r--r--unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx4
7 files changed, 30 insertions, 51 deletions
diff --git a/unotest/source/cpp/filters-test.cxx b/unotest/source/cpp/filters-test.cxx
index 07467a37f415..376118f35af5 100644
--- a/unotest/source/cpp/filters-test.cxx
+++ b/unotest/source/cpp/filters-test.cxx
@@ -103,9 +103,9 @@ void FiltersTest::recursiveScan(filterStatus nExpected,
continue;
if (
- (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("BID"), nLastSlash+1)) ||
- (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("CVE"), nLastSlash+1)) ||
- (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("EDB"), nLastSlash+1))
+ (sURL.match("BID", nLastSlash+1)) ||
+ (sURL.match("CVE", nLastSlash+1)) ||
+ (sURL.match("EDB", nLastSlash+1))
)
{
bEncrypted = true;
diff --git a/unotest/source/cpp/getargument.cxx b/unotest/source/cpp/getargument.cxx
index 7b1945d5d803..83a4a02d2856 100644
--- a/unotest/source/cpp/getargument.cxx
+++ b/unotest/source/cpp/getargument.cxx
@@ -33,7 +33,7 @@ namespace detail {
bool getArgument(rtl::OUString const & name, rtl::OUString * value) {
OSL_ASSERT(value != 0);
return rtl::Bootstrap::get(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("arg-")) + name, *value);
+ rtl::OUString("arg-") + name, *value);
}
}
diff --git a/unotest/source/cpp/gettestargument.cxx b/unotest/source/cpp/gettestargument.cxx
index 509c1cfad7b7..ed27b44ae5b0 100644
--- a/unotest/source/cpp/gettestargument.cxx
+++ b/unotest/source/cpp/gettestargument.cxx
@@ -29,7 +29,7 @@ namespace test {
bool getTestArgument(rtl::OUString const & name, rtl::OUString * value) {
return detail::getArgument(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("testarg.")) + name, value);
+ rtl::OUString("testarg.") + name, value);
}
}
diff --git a/unotest/source/cpp/macros_test.cxx b/unotest/source/cpp/macros_test.cxx
index be13798dd7d0..b33492fdd694 100644
--- a/unotest/source/cpp/macros_test.cxx
+++ b/unotest/source/cpp/macros_test.cxx
@@ -57,7 +57,7 @@ uno::Reference< com::sun::star::lang::XComponent > MacrosTest::loadFromDesktop(c
args[1].State = com::sun::star::beans::PropertyState_DIRECT_VALUE;
}
- uno::Reference< com::sun::star::lang::XComponent> xComponent= xLoader->loadComponentFromURL(rURL, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_default")), 0, args);
+ uno::Reference< com::sun::star::lang::XComponent> xComponent= xLoader->loadComponentFromURL(rURL, rtl::OUString("_default"), 0, args);
rtl::OUString sMessage = rtl::OUString( "loading failed: " ) + rURL;
CPPUNIT_ASSERT_MESSAGE(rtl::OUStringToOString( sMessage, RTL_TEXTENCODING_UTF8 ).getStr( ), xComponent.is());
return xComponent;
diff --git a/unotest/source/cpp/officeconnection.cxx b/unotest/source/cpp/officeconnection.cxx
index 4de06f66cc96..e4b71eab2534 100644
--- a/unotest/source/cpp/officeconnection.cxx
+++ b/unotest/source/cpp/officeconnection.cxx
@@ -50,45 +50,34 @@ void OfficeConnection::setUp() {
rtl::OUString argSoffice;
CPPUNIT_ASSERT(
detail::getArgument(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("soffice")),
+ rtl::OUString("soffice"),
&argSoffice));
- if (argSoffice.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("path:"))) {
- desc = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pipe,name=")) +
- uniquePipeName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("oootest")));
- rtl::OUString noquickArg(
- RTL_CONSTASCII_USTRINGPARAM("--quickstart=no"));
- rtl::OUString nofirstArg(
- RTL_CONSTASCII_USTRINGPARAM("--nofirststartwizard"));
- rtl::OUString norestoreArg(RTL_CONSTASCII_USTRINGPARAM("--norestore"));
- rtl::OUString nologoArg(RTL_CONSTASCII_USTRINGPARAM("--nologo"));
+ if (argSoffice.match("path:")) {
+ desc = "pipe,name=" + uniquePipeName(rtl::OUString("oootest"));
+ rtl::OUString noquickArg("--quickstart=no");
+ rtl::OUString nofirstArg("--nofirststartwizard");
+ rtl::OUString norestoreArg("--norestore");
+ rtl::OUString nologoArg("--nologo");
// disable use of the unix standalone splash screen app for the
// tests (probably not needed in combination with --headless?)
- rtl::OUString headlessArg(RTL_CONSTASCII_USTRINGPARAM("--headless"));
- rtl::OUString acceptArg(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--accept=")) + desc +
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";urp")));
+ rtl::OUString headlessArg("--headless");
+ rtl::OUString acceptArg("--accept=" + desc + ";urp");
rtl::OUString argUser;
CPPUNIT_ASSERT(
- detail::getArgument(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user")), &argUser));
+ detail::getArgument(rtl::OUString("user"), &argUser));
rtl::OUString userArg(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("-env:UserInstallation=")) +
+ rtl::OUString("-env:UserInstallation=") +
toAbsoluteFileUrl(argUser));
rtl::OUString jreArg(
- RTL_CONSTASCII_USTRINGPARAM("-env:UNO_JAVA_JFW_ENV_JREHOME=true"));
- rtl::OUString classpathArg(
- RTL_CONSTASCII_USTRINGPARAM(
- "-env:UNO_JAVA_JFW_ENV_CLASSPATH=true"));
+ "-env:UNO_JAVA_JFW_ENV_JREHOME=true");
+ rtl::OUString classpathArg("-env:UNO_JAVA_JFW_ENV_CLASSPATH=true");
rtl_uString * args[] = {
noquickArg.pData, nofirstArg.pData, norestoreArg.pData,
nologoArg.pData, headlessArg.pData, acceptArg.pData, userArg.pData,
jreArg.pData, classpathArg.pData };
rtl_uString ** envs = 0;
rtl::OUString argEnv;
- if (detail::getArgument(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("env")), &argEnv))
+ if (detail::getArgument(rtl::OUString("env"), &argEnv))
{
envs = &argEnv.pData;
}
@@ -99,7 +88,7 @@ void OfficeConnection::setUp() {
argSoffice.copy(RTL_CONSTASCII_LENGTH("path:"))).pData,
args, SAL_N_ELEMENTS(args), 0, 0, 0, envs, envs == 0 ? 0 : 1,
&process_));
- } else if (argSoffice.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("connect:"))) {
+ } else if (argSoffice.match("connect:")) {
desc = argSoffice.copy(RTL_CONSTASCII_LENGTH("connect:"));
} else {
CPPUNIT_FAIL(
@@ -111,11 +100,9 @@ void OfficeConnection::setUp() {
context_ =
css::uno::Reference< css::uno::XComponentContext >(
resolver->resolve(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uno:")) +
+ rtl::OUString("uno:") +
desc +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ";urp;StarOffice.ComponentContext"))),
+ rtl::OUString(";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 966dc3e29232..67c415e93a09 100644
--- a/unotest/source/cpp/toabsolutefileurl.cxx
+++ b/unotest/source/cpp/toabsolutefileurl.cxx
@@ -34,9 +34,7 @@ rtl::OUString toAbsoluteFileUrl(rtl::OUString const & relativePathname) {
oslProcessError e1 = osl_getProcessWorkingDir(&cwd.pData);
if (e1 != osl_Process_E_None) {
throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "osl_getProcessWorkingDir failed with ")) +
+ (rtl::OUString("osl_getProcessWorkingDir failed with ") +
OUString::number(e1)),
css::uno::Reference< css::uno::XInterface >());
}
@@ -45,11 +43,9 @@ rtl::OUString toAbsoluteFileUrl(rtl::OUString const & relativePathname) {
relativePathname, url);
if (e2 != osl::FileBase::E_None) {
throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "osl::FileBase::getFileURLFromSystemPath(")) +
+ (rtl::OUString("osl::FileBase::getFileURLFromSystemPath(") +
relativePathname +
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(") failed with ")) +
+ rtl::OUString(") failed with ") +
OUString::number(e2)),
css::uno::Reference< css::uno::XInterface >());
}
@@ -57,11 +53,9 @@ rtl::OUString toAbsoluteFileUrl(rtl::OUString const & relativePathname) {
e2 = osl::FileBase::getAbsoluteFileURL(cwd, url, absUrl);
if (e2 != osl::FileBase::E_None) {
throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "osl::FileBase::getAbsoluteFileURL(")) +
- cwd + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(", ")) + url +
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(") failed with ")) +
+ (rtl::OUString("osl::FileBase::getAbsoluteFileURL(") +
+ cwd + rtl::OUString(", ") + url +
+ rtl::OUString(") failed with ") +
OUString::number(e2)),
css::uno::Reference< css::uno::XInterface >());
}
diff --git a/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx b/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
index 3cd43f480cbd..3265f8801e1e 100644
--- a/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
+++ b/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
@@ -68,9 +68,7 @@ bool Prot::protect(
context,
CppUnit::Message(
convert(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "An uncaught exception of type "))
+ rtl::OUString("An uncaught exception of type ")
+ a.getValueTypeName()),
convert(e.Message)));
}