summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorSzabolcs Dezsi <dezsiszabi@hotmail.com>2012-04-06 19:49:53 +0200
committerJan Holesovsky <kendy@suse.cz>2012-04-06 20:03:42 +0200
commitd6bc02f8c4cd0f50f0a2631ac7634dab408efc1f (patch)
treeb5a12df1fcae025715633469b75ab4c9b6f6d279 /svl
parent0e1c0587617e0a6e4295a13599e97cdf6d1d2ea9 (diff)
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'svl')
-rw-r--r--svl/qa/unit/test_URIHelper.cxx3
-rw-r--r--svl/qa/unit/test_lngmisc.cxx14
-rw-r--r--svl/source/fsstor/fsstorage.cxx2
-rw-r--r--svl/source/numbers/zformat.cxx5
4 files changed, 11 insertions, 13 deletions
diff --git a/svl/qa/unit/test_URIHelper.cxx b/svl/qa/unit/test_URIHelper.cxx
index 380cbf56e645..117c2db02d3c 100644
--- a/svl/qa/unit/test_URIHelper.cxx
+++ b/svl/qa/unit/test_URIHelper.cxx
@@ -154,8 +154,7 @@ css::uno::Any Content::execute(
css::uno::Exception, css::ucb::CommandAbortedException,
css::uno::RuntimeException)
{
- if (!command.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("getCasePreservingURL")))
+ if ( command.Name != "getCasePreservingURL" )
{
throw css::uno::RuntimeException();
}
diff --git a/svl/qa/unit/test_lngmisc.cxx b/svl/qa/unit/test_lngmisc.cxx
index 86e871beb325..becce8988e4f 100644
--- a/svl/qa/unit/test_lngmisc.cxx
+++ b/svl/qa/unit/test_lngmisc.cxx
@@ -78,7 +78,7 @@ namespace
// Note that '-' isn't a hyphen to RemoveHyphens.
bModified = linguistic::RemoveHyphens(str2);
CPPUNIT_ASSERT(!bModified);
- CPPUNIT_ASSERT(str2.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("a-b--c---")));
+ CPPUNIT_ASSERT( str2 == "a-b--c---" );
bModified = linguistic::RemoveHyphens(str3);
CPPUNIT_ASSERT(bModified);
@@ -86,7 +86,7 @@ namespace
bModified = linguistic::RemoveHyphens(str4);
CPPUNIT_ASSERT(!bModified);
- CPPUNIT_ASSERT(str4.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("asdf")));
+ CPPUNIT_ASSERT( str4 == "asdf" );
}
void LngMiscTest::testRemoveControlChars()
@@ -109,15 +109,15 @@ namespace
bModified = linguistic::RemoveControlChars(str2);
CPPUNIT_ASSERT(!bModified);
- CPPUNIT_ASSERT(str2.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("asdf")));
+ CPPUNIT_ASSERT( str2 == "asdf" );
bModified = linguistic::RemoveControlChars(str3);
CPPUNIT_ASSERT(bModified);
- CPPUNIT_ASSERT(str3.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("asdfasdf")));
+ CPPUNIT_ASSERT( str3 == "asdfasdf" );
bModified = linguistic::RemoveControlChars(str4);
CPPUNIT_ASSERT(bModified);
- CPPUNIT_ASSERT(str4.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(" ")));
+ CPPUNIT_ASSERT( str4 == " " );
}
void LngMiscTest::testReplaceControlChars()
@@ -140,11 +140,11 @@ namespace
bModified = linguistic::ReplaceControlChars(str2);
CPPUNIT_ASSERT(!bModified);
- CPPUNIT_ASSERT(str2.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("asdf")));
+ CPPUNIT_ASSERT( str2 == "asdf" );
bModified = linguistic::ReplaceControlChars(str3);
CPPUNIT_ASSERT(bModified);
- CPPUNIT_ASSERT(str3.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("asdf asdf")));
+ CPPUNIT_ASSERT( str3 == "asdf asdf" );
bModified = linguistic::ReplaceControlChars(str4);
CPPUNIT_ASSERT(bModified);
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index 36093fa011e9..66d1aaa07fe5 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -1332,7 +1332,7 @@ void SAL_CALL FSStorage::setPropertyValue( const ::rtl::OUString& aPropertyName,
if ( !m_pImpl )
throw lang::DisposedException();
- if ( aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URL")) || aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OpenMode")) )
+ if ( aPropertyName == "URL" || aPropertyName == "OpenMode" )
throw beans::PropertyVetoException(); // TODO
else
throw beans::UnknownPropertyException(); // TODO
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index aa7a2438dac8..5efeb3efd8fa 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -3118,8 +3118,7 @@ bool SvNumberformat::ImpFallBackToGregorianCalendar( String& rOrgCalendar, doubl
if ( rCal.getUniqueID() != rGregorian )
{
sal_Int16 nVal = rCal.getValue( CalendarFieldIndex::ERA );
- if ( nVal == 0 && rCal.getLoadedCalendar().Eras[0].ID.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "Dummy" ) ) )
+ if ( nVal == 0 && rCal.getLoadedCalendar().Eras[0].ID == "Dummy" )
{
if ( !rOrgCalendar.Len() )
{
@@ -3172,7 +3171,7 @@ void SvNumberformat::ImpAppendEraG( String& OutString,
const CalendarWrapper& rCal, sal_Int16 nNatNum )
{
using namespace ::com::sun::star::i18n;
- if ( rCal.getUniqueID().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "gengou" ) ) )
+ if ( rCal.getUniqueID() == "gengou" )
{
sal_Unicode cEra;
sal_Int16 nVal = rCal.getValue( CalendarFieldIndex::ERA );