diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-07-03 21:18:15 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-07-03 21:20:58 -0300 |
commit | c6c99966cd4515b574e9cd21e89954dabf56009a (patch) | |
tree | f700771b96649bd421329b127fc25ed85fe1c86f /svl/qa | |
parent | c675575ce507320b6f866d02fd7eee68462f7823 (diff) |
Get rid of RTL_CONSTASCII_USTRINGPARAM in svl/
Change-Id: I64f3f966011bf07a2ee0c7327feb4a46df595210
Diffstat (limited to 'svl/qa')
-rw-r--r-- | svl/qa/unit/svl.cxx | 6 | ||||
-rw-r--r-- | svl/qa/unit/test_URIHelper.cxx | 16 | ||||
-rw-r--r-- | svl/qa/unit/test_lngmisc.cxx | 36 |
3 files changed, 27 insertions, 31 deletions
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index b051d1f58675..d0cab798bafa 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -267,21 +267,21 @@ void Test::testNumberFormat() sal_uInt32 nKey; OUString aCode; // Thai date format (implicit locale). - aCode = OUString(RTL_CONSTASCII_USTRINGPARAM("[$-1070000]d/mm/yyyy;@")); + aCode = "[$-1070000]d/mm/yyyy;@"; if (!aFormatter.PutEntry(aCode, nPos, nType, nKey)) { CPPUNIT_ASSERT_MESSAGE("failed to insert format code '[$-1070000]d/mm/yyyy;@'", false); } // Thai date format (explicit locale) - aCode = OUString(RTL_CONSTASCII_USTRINGPARAM("[$-107041E]d/mm/yyyy;@")); + aCode = "[$-107041E]d/mm/yyyy;@"; if (!aFormatter.PutEntry(aCode, nPos, nType, nKey)) { CPPUNIT_ASSERT_MESSAGE("failed to insert format code '[$-107041E]d/mm/yyyy;@'", false); } // Thai date format (using buddhist calendar type). - aCode = OUString(RTL_CONSTASCII_USTRINGPARAM("[~buddhist]D MMMM YYYY")); + aCode = "[~buddhist]D MMMM YYYY"; if (!aFormatter.PutEntry(aCode, nPos, nType, nKey)) { CPPUNIT_ASSERT_MESSAGE("failed to insert format code '[~buddhist]D MMMM YYYY'", false); diff --git a/svl/qa/unit/test_URIHelper.cxx b/svl/qa/unit/test_URIHelper.cxx index e91cb20ad93a..9cb810b38beb 100644 --- a/svl/qa/unit/test_URIHelper.cxx +++ b/svl/qa/unit/test_URIHelper.cxx @@ -163,7 +163,7 @@ css::uno::Any Content::execute( } switch (c) { case '1': - uri += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + uri += "/"; break; case '2': if (uri.getLength() > 0 && uri[uri.getLength() - 1] == '/') { @@ -231,18 +231,16 @@ void Test::finish() { void Test::testNormalizedMakeRelative() { css::uno::Sequence< css::uno::Any > args(2); - args[0] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Local")); - args[1] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office")); + args[0] <<= rtl::OUString("Local"); + args[1] <<= rtl::OUString("Office"); css::uno::Reference< css::ucb::XContentProviderManager >( (css::uno::Reference< css::lang::XMultiComponentFactory >( m_context->getServiceManager(), css::uno::UNO_QUERY_THROW)-> createInstanceWithArgumentsAndContext( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.ucb.UniversalContentBroker")), + rtl::OUString("com.sun.star.ucb.UniversalContentBroker"), args, m_context)), css::uno::UNO_QUERY_THROW)->registerContentProvider( - new Provider, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("test")), + new Provider, rtl::OUString("test"), true); struct Data { char const * base; @@ -402,9 +400,7 @@ void Test::testFindFirstURLInText() { CharClass charClass( css::uno::Reference< css::lang::XMultiServiceFactory >( m_context->getServiceManager(), css::uno::UNO_QUERY_THROW), - com::sun::star::lang::Locale( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US")), rtl::OUString())); + com::sun::star::lang::Locale("en", "US", "")); for (std::size_t i = 0; i < SAL_N_ELEMENTS(tests); ++i) { rtl::OUString input(rtl::OUString::createFromAscii(tests[i].input)); xub_StrLen begin = 0; diff --git a/svl/qa/unit/test_lngmisc.cxx b/svl/qa/unit/test_lngmisc.cxx index ab2f47093894..febc64b533b8 100644 --- a/svl/qa/unit/test_lngmisc.cxx +++ b/svl/qa/unit/test_lngmisc.cxx @@ -58,8 +58,8 @@ namespace void LngMiscTest::testRemoveHyphens() { - ::rtl::OUString str1(RTL_CONSTASCII_USTRINGPARAM("")); - ::rtl::OUString str2(RTL_CONSTASCII_USTRINGPARAM("a-b--c---")); + ::rtl::OUString str1(""); + ::rtl::OUString str2("a-b--c---"); ::rtl::OUStringBuffer str3Buf; str3Buf.append(SVT_SOFT_HYPHEN); @@ -67,7 +67,7 @@ namespace str3Buf.append(SVT_HARD_HYPHEN); ::rtl::OUString str3(str3Buf.makeStringAndClear()); - ::rtl::OUString str4(RTL_CONSTASCII_USTRINGPARAM("asdf")); + ::rtl::OUString str4("asdf"); bool bModified = linguistic::RemoveHyphens(str1); CPPUNIT_ASSERT(!bModified); @@ -89,9 +89,9 @@ namespace void LngMiscTest::testRemoveControlChars() { - ::rtl::OUString str1(RTL_CONSTASCII_USTRINGPARAM("")); - ::rtl::OUString str2(RTL_CONSTASCII_USTRINGPARAM("asdf")); - ::rtl::OUString str3(RTL_CONSTASCII_USTRINGPARAM("asdf\nasdf")); + ::rtl::OUString str1(""); + ::rtl::OUString str2("asdf"); + ::rtl::OUString str3("asdf\nasdf"); ::rtl::OUStringBuffer str4Buf(33); str4Buf.setLength(33); @@ -120,9 +120,9 @@ namespace void LngMiscTest::testReplaceControlChars() { - ::rtl::OUString str1(RTL_CONSTASCII_USTRINGPARAM("")); - ::rtl::OUString str2(RTL_CONSTASCII_USTRINGPARAM("asdf")); - ::rtl::OUString str3(RTL_CONSTASCII_USTRINGPARAM("asdf\nasdf")); + ::rtl::OUString str1(""); + ::rtl::OUString str2("asdf"); + ::rtl::OUString str3("asdf\nasdf"); ::rtl::OUStringBuffer str4Buf(33); str4Buf.setLength(33); @@ -153,14 +153,14 @@ namespace void LngMiscTest::testGetThesaurusReplaceText() { - const ::rtl::OUString str1(RTL_CONSTASCII_USTRINGPARAM("")); - const ::rtl::OUString str2(RTL_CONSTASCII_USTRINGPARAM("asdf")); - const ::rtl::OUString str3(RTL_CONSTASCII_USTRINGPARAM("asdf (abc)")); - const ::rtl::OUString str4(RTL_CONSTASCII_USTRINGPARAM("asdf*")); - const ::rtl::OUString str5(RTL_CONSTASCII_USTRINGPARAM("asdf * ")); - const ::rtl::OUString str6(RTL_CONSTASCII_USTRINGPARAM("asdf (abc) *")); - const ::rtl::OUString str7(RTL_CONSTASCII_USTRINGPARAM("asdf asdf * (abc)")); - const ::rtl::OUString str8(RTL_CONSTASCII_USTRINGPARAM(" * (abc) asdf *")); + const ::rtl::OUString str1(""); + const ::rtl::OUString str2("asdf"); + const ::rtl::OUString str3("asdf (abc)"); + const ::rtl::OUString str4("asdf*"); + const ::rtl::OUString str5("asdf * "); + const ::rtl::OUString str6("asdf (abc) *"); + const ::rtl::OUString str7("asdf asdf * (abc)"); + const ::rtl::OUString str8(" * (abc) asdf *"); ::rtl::OUString r = linguistic::GetThesaurusReplaceText(str1); CPPUNIT_ASSERT(r.isEmpty()); @@ -181,7 +181,7 @@ namespace CPPUNIT_ASSERT(r == str2); r = linguistic::GetThesaurusReplaceText(str7); - CPPUNIT_ASSERT(r == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("asdf asdf"))); + CPPUNIT_ASSERT(r == "asdf asdf"); r = linguistic::GetThesaurusReplaceText(str8); CPPUNIT_ASSERT(r.isEmpty()); |