diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-06-23 22:41:22 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-24 15:27:28 +0200 |
commit | 892455e72a57d890918f37bd2b32d6c5000ba6ff (patch) | |
tree | a15e0b73f4747a56840f3f457ca786bbbeb759aa /svl | |
parent | 6390d2c52b75b2868d5ee98863a0af4f103c12e5 (diff) |
Simplify uses of comphelper::string::equals with constant argument
Change-Id: I7b12dd04f6811f71b776ee9168703434217b59c8
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/numbers/zforfind.cxx | 4 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index 36dd18e607d7..ac8de66f82c6 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -1053,9 +1053,9 @@ bool ImpSvNumberInputScan::MayBeIso8601() { sal_Int32 n; if (nAnzNums >= 3 && nNums[2] < nAnzStrings && - comphelper::string::equals(sStrArray[nNums[0]+1], '-') && // separator year-month + sStrArray[nNums[0]+1] == "-" && // separator year-month (n = sStrArray[nNums[1]].toInt32()) >= 1 && n <= 12 && // month - comphelper::string::equals(sStrArray[nNums[1]+1], '-') && // separator month-day + sStrArray[nNums[1]+1] == "-" && // separator month-day (n = sStrArray[nNums[2]].toInt32()) >= 1 && n <= 31) // day { // Year (nNums[0]) value not checked, may be anything, but diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 5a7d557b866e..ec65c7ceee19 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -3254,7 +3254,7 @@ bool SvNumberformat::ImpIsIso8601( const ImpSvNumFor& rNumFor ) break; case NF_SYMBOLTYPE_STRING: case NF_SYMBOLTYPE_DATESEP: - if (comphelper::string::equals(rNumFor.Info().sStrArray[i], '-')) + if (rNumFor.Info().sStrArray[i] == "-") { if (eState == eAtYear) { @@ -4550,8 +4550,7 @@ bool SvNumberformat::IsNegativeInBracket() const return false; } OUString *tmpStr = NumFor[1].Info().sStrArray; - using comphelper::string::equals; - return (equals(tmpStr[0], '(') && equals(tmpStr[nAnz-1], ')')); + return tmpStr[0] == "(" && tmpStr[nAnz-1] == ")"; } bool SvNumberformat::HasPositiveBracketPlaceholder() const |