diff options
author | Szabolcs Dezsi <dezsiszabi@hotmail.com> | 2012-04-06 19:49:53 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-04-06 20:03:42 +0200 |
commit | d6bc02f8c4cd0f50f0a2631ac7634dab408efc1f (patch) | |
tree | b5a12df1fcae025715633469b75ab4c9b6f6d279 /l10ntools | |
parent | 0e1c0587617e0a6e4295a13599e97cdf6d1d2ea9 (diff) |
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/help/HelpIndexer.cxx | 5 | ||||
-rw-r--r-- | l10ntools/source/localize.cxx | 3 | ||||
-rw-r--r-- | l10ntools/source/tagtest.cxx | 24 | ||||
-rw-r--r-- | l10ntools/source/xmlparse.cxx | 2 |
4 files changed, 15 insertions, 19 deletions
diff --git a/l10ntools/source/help/HelpIndexer.cxx b/l10ntools/source/help/HelpIndexer.cxx index 38d5639f18cb..341346490608 100644 --- a/l10ntools/source/help/HelpIndexer.cxx +++ b/l10ntools/source/help/HelpIndexer.cxx @@ -57,10 +57,7 @@ bool HelpIndexer::indexDocuments() { } rtl::OUString sLang = d_lang.getToken(0, '-'); - bool bUseCJK = - sLang.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ja")) || - sLang.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ko")) || - sLang.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh")); + bool bUseCJK = sLang == "ja" || sLang == "ko" || sLang == "zh"; // Construct the analyzer appropriate for the given language lucene::analysis::Analyzer *analyzer; diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx index 5e9fcb9a492b..2279dd9c0bfe 100644 --- a/l10ntools/source/localize.cxx +++ b/l10ntools/source/localize.cxx @@ -423,8 +423,7 @@ void handleDirectory( handleDirectory( stat.getFileURL(), 1, stat.getFileName(), rtl::OUString()); - } else if (stat.getFileName().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("clone"))) + } else if ( stat.getFileName() == "clone" ) { handleDirectory( stat.getFileURL(), -1, rtl::OUString(), diff --git a/l10ntools/source/tagtest.cxx b/l10ntools/source/tagtest.cxx index 3e85544cfdcb..e31faa452a6b 100644 --- a/l10ntools/source/tagtest.cxx +++ b/l10ntools/source/tagtest.cxx @@ -396,11 +396,11 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList ) sal_Bool TokenInfo::IsPropertyRelevant( const rtl::OString &rName, const rtl::OUString &rValue ) const { - if ( aTagName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("alt")) && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("xml-lang")) ) + if ( aTagName == "alt" && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("xml-lang")) ) return sal_False; - if ( aTagName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ahelp")) && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("visibility")) && rValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("visible")) ) + if ( aTagName == "ahelp" && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("visibility")) && rValue == "visible" ) return sal_False; - if ( aTagName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("image")) && (rName.equalsL(RTL_CONSTASCII_STRINGPARAM("width")) || rName.equalsL(RTL_CONSTASCII_STRINGPARAM("height"))) ) + if ( aTagName == "image" && (rName.equalsL(RTL_CONSTASCII_STRINGPARAM("width")) || rName.equalsL(RTL_CONSTASCII_STRINGPARAM("height"))) ) return sal_False; return sal_True; @@ -415,7 +415,7 @@ sal_Bool TokenInfo::IsPropertyValueValid( const rtl::OString &rName, const rtl:: rValue.EqualsAscii("appl") || rValue.EqualsAscii("distrib"); } */ - if ( aTagName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("caseinline")) && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("select")) ) + if ( aTagName == "caseinline" && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("select")) ) { return !rValue.isEmpty(); } @@ -426,9 +426,9 @@ sal_Bool TokenInfo::IsPropertyValueValid( const rtl::OString &rName, const rtl:: sal_Bool TokenInfo::IsPropertyInvariant( const rtl::OString &rName, const rtl::OUString &rValue ) const { - if ( aTagName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("link")) && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("name")) ) + if ( aTagName == "link" && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("name")) ) return sal_False; - if ( aTagName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("link")) && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("href")) ) + if ( aTagName == "link" && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("href")) ) { // check for external reference return !(rValue.matchIgnoreAsciiCaseAsciiL( @@ -444,12 +444,12 @@ sal_Bool TokenInfo::IsPropertyInvariant( const rtl::OString &rName, const rtl::O sal_Bool TokenInfo::IsPropertyFixable( const rtl::OString &rName ) const { // name everything that is allowed to be fixed automatically here - if ( (aTagName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ahelp")) && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("hid"))) - || (aTagName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("link")) && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("href"))) - || (aTagName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("alt")) && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("id"))) - || (aTagName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("variable")) && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("id"))) - || (aTagName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("image")) && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("src"))) - || (aTagName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("image")) && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("id")) )) + if ( (aTagName == "ahelp" && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("hid"))) + || (aTagName == "link" && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("href"))) + || (aTagName == "alt" && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("id"))) + || (aTagName == "variable" && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("id"))) + || (aTagName == "image" && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("src"))) + || (aTagName == "image" && rName.equalsL(RTL_CONSTASCII_STRINGPARAM("id")) )) return sal_True; return sal_False; } diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx index 31a75540130a..ad5197bafb8d 100644 --- a/l10ntools/source/xmlparse.cxx +++ b/l10ntools/source/xmlparse.cxx @@ -667,7 +667,7 @@ void XMLElement::ChangeLanguageTag( const rtl::OUString &rValue ) { for (size_t i = 0; i < pAttributes->size(); ++i) { - if ( (*pAttributes)[ i ]->GetName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("xml-lang")) ) + if ( (*pAttributes)[ i ]->GetName() == "xml-lang" ) (*pAttributes)[ i ]->setValue(rValue); } } |