diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-13 12:43:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-13 15:20:58 +0200 |
commit | 3697b87b70c69e17e1d0398e0192a11dab179fe3 (patch) | |
tree | a498cce1f1351e6f92385aa9245c66c0724b6430 /i18npool | |
parent | 9bc95521aaa35b533894b3934519acdbd7a47815 (diff) |
use more OUString::operator== in forms..sal
Change-Id: I70d7e50f8c1e019524ccad915f0cca912c5035dc
Reviewed-on: https://gerrit.libreoffice.org/39899
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
5 files changed, 15 insertions, 15 deletions
diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx index 245e9ff3771b..38bca648f27f 100644 --- a/i18npool/source/collator/collatorImpl.cxx +++ b/i18npool/source/collator/collatorImpl.cxx @@ -145,7 +145,7 @@ CollatorImpl::createCollator(const lang::Locale& rLocale, const OUString& servic { for (size_t l = 0; l < lookupTable.size(); l++) { cachedItem = lookupTable[l]; - if (cachedItem->service.equals(serviceName)) {// cross locale sharing + if (cachedItem->service == serviceName) {// cross locale sharing lookupTable.push_back(cachedItem = new lookupTableItem(rLocale, rSortAlgorithm, serviceName, cachedItem->xC)); return true; } diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index 42abd7bbbf48..a5308ba3696a 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -1024,7 +1024,7 @@ Sequence< sal_Int16 > DefaultNumberingProvider::getSupportedNumberingTypes( ) sal_Int16 DefaultNumberingProvider::getNumberingType( const OUString& rNumberingIdentifier ) { for(sal_Int16 i = 0; i < nSupported_NumberingTypes; i++) - if(rNumberingIdentifier.equals(makeNumberingIdentifier(i))) + if(rNumberingIdentifier == makeNumberingIdentifier(i)) return aSupportedTypes[i].nType; throw RuntimeException(); } @@ -1032,7 +1032,7 @@ sal_Int16 DefaultNumberingProvider::getNumberingType( const OUString& rNumbering sal_Bool DefaultNumberingProvider::hasNumberingType( const OUString& rNumberingIdentifier ) { for(sal_Int16 i = 0; i < nSupported_NumberingTypes; i++) - if(rNumberingIdentifier.equals(makeNumberingIdentifier(i))) + if(rNumberingIdentifier == makeNumberingIdentifier(i)) return true; return false; } diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 55ad5b730463..a17ff49cefcf 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -1638,7 +1638,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const if (!ref_name.isEmpty() && i > 0) { for (j = 0; j < i; j++) { str = getChildAt(j)->getAttr().getValueByName("unoid"); - if (str.equals(ref_name)) + if (str == ref_name) daysNode = getChildAt(j)->getChildAt(0); } } @@ -1671,7 +1671,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const if (!ref_name.isEmpty() && i > 0) { for (j = 0; j < i; j++) { str = getChildAt(j)->getAttr().getValueByName("unoid"); - if (str.equals(ref_name)) + if (str == ref_name) monthsNode = getChildAt(j)->getChildAt(1); } } @@ -1707,7 +1707,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const if (!ref_name.isEmpty() && i > 0) { for (j = 0; j < i; j++) { str = getChildAt(j)->getAttr().getValueByName("unoid"); - if (str.equals(ref_name)) + if (str == ref_name) genitiveMonthsNode = getChildAt(j)->getChildAt(1); } } @@ -1744,7 +1744,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const if (!ref_name.isEmpty() && i > 0) { for (j = 0; j < i; j++) { str = getChildAt(j)->getAttr().getValueByName("unoid"); - if (str.equals(ref_name)) + if (str == ref_name) partitiveMonthsNode = getChildAt(j)->getChildAt(1); } } @@ -1777,7 +1777,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const if (!ref_name.isEmpty() && i > 0) { for (j = 0; j < i; j++) { str = getChildAt(j)->getAttr().getValueByName("unoid"); - if (str.equals(ref_name)) + if (str == ref_name) erasNode = getChildAt(j)->getChildAt(2); } } diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 2a344cfdd2fe..78a37c15308a 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -605,7 +605,7 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName( Sequence< CalendarItem2 > &LocaleDataImpl::getCalendarItemByName(const OUString& name, const Locale& rLocale, const Sequence< Calendar2 >& calendarsSeq, sal_Int16 item) { - if (!ref_name.equals(name)) { + if (ref_name != name) { OUString aLocStr, id; sal_Int32 nLastUnder = name.lastIndexOf( cUnder); SAL_WARN_IF( nLastUnder < 1, "i18npool", @@ -625,7 +625,7 @@ Sequence< CalendarItem2 > &LocaleDataImpl::getCalendarItemByName(const OUString& } sal_Int32 index; for (index = 0; index < cals.getLength(); index++) { - if (id.equals(cals[index].Name)) { + if (id == cals[index].Name) { ref_cal = cals[index]; break; } @@ -903,7 +903,7 @@ LocaleDataImpl::getCollatorRuleByAlgorithm( const Locale& rLocale, const OUStrin sal_Int16 collatorCount = 0; sal_Unicode **collatorArray = func(collatorCount); for(sal_Int16 i = 0; i < collatorCount; i++) - if (algorithm.equals(collatorArray[i * COLLATOR_ELEMENTS + COLLATOR_OFFSET_ALGO])) + if (algorithm == collatorArray[i * COLLATOR_ELEMENTS + COLLATOR_OFFSET_ALGO]) return OUString(collatorArray[i * COLLATOR_ELEMENTS + COLLATOR_OFFSET_RULE]); } return OUString(); @@ -1038,7 +1038,7 @@ LocaleDataImpl::getIndexArrayForAlgorithm(const Locale& rLocale, const OUString& sal_Unicode **indexArray = getIndexArray(rLocale, indexCount); if ( indexArray ) { for(sal_Int16 i = 0; i < indexCount; i++) { - if (algorithm.equals(indexArray[i*5])) + if (algorithm == indexArray[i*5]) return indexArray+i*5; } } diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx index c99a5d1e1398..aeb3e3caca97 100644 --- a/i18npool/source/nativenumber/nativenumbersupplier.cxx +++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx @@ -577,9 +577,9 @@ OUString SAL_CALL NativeNumberSupplierService::getNativeNumberString(const OUStr } if (number || num >= 0) { - if (!aLocale.Language.equals(rLocale.Language) || - !aLocale.Country.equals(rLocale.Country) || - !aLocale.Variant.equals(rLocale.Variant)) { + if (aLocale.Language != rLocale.Language || + aLocale.Country != rLocale.Country || + aLocale.Variant != rLocale.Variant) { LocaleDataItem item = LocaleDataImpl::get()->getLocaleItem( rLocale ); aLocale = rLocale; DecimalChar[NumberChar_HalfWidth]=item.decimalSeparator.toChar(); |