From d8e5a0db64fa022b54bddc42b1b1db0c1ddfe2d1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 13 Jul 2017 12:44:52 +0200 Subject: use more OUString::operator== in sc Change-Id: I1a7691fe59e5e93c15bd812f03366da814f9f3db Reviewed-on: https://gerrit.libreoffice.org/39900 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/ui/dbgui/dbnamdlg.cxx | 2 +- sc/source/ui/dbgui/filtdlg.cxx | 8 ++++---- sc/source/ui/dbgui/pfiltdlg.cxx | 8 ++++---- sc/source/ui/dbgui/pvfundlg.cxx | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'sc/source/ui/dbgui') diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index 0b2155e1ac3a..e7ca94284268 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -503,7 +503,7 @@ public: explicit FindByName(const OUString& rName) : mrName(rName) {} bool operator() (std::unique_ptr const& p) const { - return p->GetName().equals(mrName); + return p->GetName() == mrName; } }; diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 6ce9b10bed84..12fbf3d4964e 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -581,7 +581,7 @@ void ScFilterDlg::UpdateHdrInValueList( size_t nList ) const ScTypedStrData& rHdrEntry = m_EntryLists[nColumn]->maList[nPos]; const OUString& aHdrStr = rHdrEntry.GetString(); - bool bWasThere = aHdrStr.equals(pValList->GetEntry(nListPos)); + bool bWasThere = aHdrStr == pValList->GetEntry(nListPos); bool bInclude = !pBtnHeader->IsChecked(); if (bInclude) // Include entry @@ -1043,7 +1043,7 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, Edit&, rEd, void ) nQE=i+nOffset; } - if ( aStrEmpty.equals(aStrVal) || aStrNotEmpty.equals(aStrVal) ) + if ( aStrEmpty == aStrVal || aStrNotEmpty == aStrVal ) { pLbCond->SelectEntry(OUString('=')); pLbCond->Disable(); @@ -1064,12 +1064,12 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, Edit&, rEd, void ) if ( rEntry.bDoQuery || maRefreshExceptQuery[nQE] ) { bool bByEmptyOrNotByEmpty = false; - if ( aStrEmpty.equals(aStrVal) ) + if ( aStrEmpty == aStrVal ) { bByEmptyOrNotByEmpty = true; rEntry.SetQueryByEmpty(); } - else if ( aStrNotEmpty.equals(aStrVal) ) + else if ( aStrNotEmpty == aStrVal ) { bByEmptyOrNotByEmpty = true; rEntry.SetQueryByNonEmpty(); diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx index 81839de0a414..c8087c3e90f0 100644 --- a/sc/source/ui/dbgui/pfiltdlg.cxx +++ b/sc/source/ui/dbgui/pfiltdlg.cxx @@ -199,7 +199,7 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet ) aCondLbArr [i]->SelectEntryPos( nCondPos ); UpdateValueList( static_cast(i+1) ); aValueEdArr[i]->SetText( aValStr ); - if (aValStr.equals(aStrEmpty) || aValStr.equals(aStrNotEmpty)) + if (aValStr == aStrEmpty || aValStr == aStrNotEmpty) aCondLbArr[i]->Disable(); } else @@ -379,12 +379,12 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem() * as constant in nVal in connection with the bQueryByString switch * set to false */ - if ( aStrVal.equals(aStrEmpty) ) + if ( aStrVal == aStrEmpty ) { OSL_ASSERT(eOp == SC_EQUAL); rEntry.SetQueryByEmpty(); } - else if ( aStrVal.equals(aStrNotEmpty) ) + else if ( aStrVal == aStrNotEmpty ) { OSL_ASSERT(eOp == SC_EQUAL); rEntry.SetQueryByNonEmpty(); @@ -547,7 +547,7 @@ IMPL_LINK( ScPivotFilterDlg, ValModifyHdl, Edit&, rEd, void ) // if cond of the special values "empty"/"non-empty" was chosen only the // =-operand makes sense: - if ( aStrEmpty.equals(aStrVal) || aStrNotEmpty.equals(aStrVal) ) + if ( aStrEmpty == aStrVal || aStrNotEmpty == aStrVal ) { pLb->SelectEntry(OUString('=')); pLb->Disable(); diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index 042ddc4907d3..7a956c22a602 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -347,7 +347,7 @@ sal_Int32 ScDPFunctionDlg::FindBaseItemPos( const OUString& rEntry, sal_Int32 nS // translate the displayed field name back to its original field name. const OUString& rInName = mpLbBaseItem->GetEntry(nPos); const OUString& rName = GetBaseItemName(rInName); - if (rName.equals(rEntry)) + if (rName == rEntry) { bFound = true; break; @@ -775,7 +775,7 @@ sal_Int32 ScDPSubtotalOptDlg::FindListBoxEntry( // translate the displayed field name back to its original field name. ScDPName aName = GetFieldName(rLBox.GetEntry(nPos)); OUString aUnoName = ScDPUtil::createDuplicateDimensionName(aName.maName, aName.mnDupCount); - if (aUnoName.equals(rEntry)) + if (aUnoName == rEntry) { bFound = true; break; -- cgit