diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-13 12:44:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-14 09:10:59 +0200 |
commit | d8e5a0db64fa022b54bddc42b1b1db0c1ddfe2d1 (patch) | |
tree | a35f8e42f3caa97132e2dc38042c393ef8fb59f4 /sc/source/ui | |
parent | loplugin:useuniqueptr (diff) | |
download | core-d8e5a0db64fa022b54bddc42b1b1db0c1ddfe2d1.tar.gz core-d8e5a0db64fa022b54bddc42b1b1db0c1ddfe2d1.zip |
use more OUString::operator== in sc
Change-Id: I1a7691fe59e5e93c15bd812f03366da814f9f3db
Reviewed-on: https://gerrit.libreoffice.org/39900
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui')
36 files changed, 74 insertions, 74 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 4bf371ca1305..d8ea6d85540b 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3630,9 +3630,9 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, else if ( bHadObject ) bTxtMod = true; else if ( bTextValid ) - bTxtMod = ( !aString.equals(aCurrentText) ); + bTxtMod = ( aString != aCurrentText ); else - bTxtMod = ( !aString.equals(GetEditText(mpEditEngine.get())) ); + bTxtMod = ( aString != GetEditText(mpEditEngine.get()) ); if ( bTxtMod || bForce ) { diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index ad8ac8b79be8..e877e38097c0 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1622,7 +1622,7 @@ SvTreeListEntry* ScCheckListBox::FindEntry( SvTreeListEntry* pParent, const OUSt SvTreeListEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos ); while ( pEntry ) { - if ( sNode.equals(GetEntryText( pEntry )) ) + if ( sNode == GetEntryText( pEntry ) ) return pEntry; pEntry = pParent ? NextSibling( pEntry ) : GetEntry( ++nRootPos ); 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<ScDBData> 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<sal_uInt16>(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; diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index aeb1b1baf857..99165cea57cf 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -753,7 +753,7 @@ static bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScD pAction->GetDescription(aActionDesc, pDoc, true); OUString aADesc; pA->GetDescription(aADesc, pSearchDoc, true); - if (aActionDesc.equals(aADesc)) + if (aActionDesc == aADesc) { OSL_FAIL( "lcl_FindAction(): found equal action!" ); return true; diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index 5d3b3c46ac8b..c3ed10e48c14 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -661,7 +661,7 @@ void ScDocShell::UseScenario( SCTAB nTab, const OUString& rName, bool bRecord ) if (nSrcTab > MAXTAB) // still searching for the scenario? { aDocument.GetName( nEndTab, aCompare ); - if (aCompare.equals(rName)) + if (aCompare == rName) nSrcTab = nEndTab; // found } } @@ -762,7 +762,7 @@ void ScDocShell::ModifyScenario( SCTAB nTab, const OUString& rName, const OUStri PostPaintGridAll(); aModificator.SetDocumentModified(); - if (!aOldName.equals(rName)) + if (aOldName != rName) SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); SfxBindings* pBindings = GetViewBindings(); diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index e90e0e5af690..2a5087d3dfe9 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -87,7 +87,7 @@ public: bool operator()(const ScExternalRefCache::TableName& rTabNameSet) const { // Ok, I'm doing case insensitive search here. - return rTabNameSet.maUpperName.equals(maSearchName); + return rTabNameSet.maUpperName == maSearchName; } private: @@ -104,7 +104,7 @@ public: bool operator()(const ScExternalRefManager::SrcFileData& rSrcData) const { - return rSrcData.maFileName.equals(mrMatchName); + return rSrcData.maFileName == mrMatchName; } private: @@ -1483,7 +1483,7 @@ void ScExternalRefLink::Closed() if (!pCurFile) return ERROR_GENERAL; - if (pCurFile->equals(aFile)) + if (*pCurFile == aFile) { // Refresh the current source document. if (!pMgr->refreshSrcDocument(mnFileId)) @@ -2690,7 +2690,7 @@ OUString ScExternalRefManager::getOwnDocumentName() const bool ScExternalRefManager::isOwnDocument(const OUString& rFile) const { - return getOwnDocumentName().equals(rFile); + return getOwnDocumentName() == rFile; } void ScExternalRefManager::convertToAbsName(OUString& rFile) const @@ -2985,7 +2985,7 @@ void ScExternalRefManager::switchSrcFile(sal_uInt16 nFileId, const OUString& rNe maSrcFiles[nFileId].maFileName = rNewFile; maSrcFiles[nFileId].maRelativeName.clear(); maSrcFiles[nFileId].maRealFileName.clear(); - if (!maSrcFiles[nFileId].maFilterName.equals(rNewFilter)) + if (maSrcFiles[nFileId].maFilterName != rNewFilter) { // Filter type has changed. maSrcFiles[nFileId].maFilterName = rNewFilter; diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index d6f850b12541..580c8983434d 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -99,7 +99,7 @@ ScTableLink::~ScTableLink() ScDocument& rDoc = pImpl->m_pDocSh->GetDocument(); SCTAB nCount = rDoc.GetTableCount(); for (SCTAB nTab=0; nTab<nCount; nTab++) - if (rDoc.IsLinked(nTab) && aFileName.equals(rDoc.GetLinkDoc(nTab))) + if (rDoc.IsLinked(nTab) && aFileName == rDoc.GetLinkDoc(nTab)) rDoc.SetLink( nTab, ScLinkMode::NONE, "", "", "", "", 0 ); } @@ -163,7 +163,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter, return false; OUString aNewUrl = ScGlobal::GetAbsDocName(rNewFile, pImpl->m_pDocSh); - bool bNewUrlName = !aFileName.equals(aNewUrl); + bool bNewUrlName = aFileName != aNewUrl; std::shared_ptr<const SfxFilter> pFilter = pImpl->m_pDocSh->GetFactory().GetFilterContainer()->GetFilter4FilterName(rNewFilter); if (!pFilter) @@ -175,7 +175,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter, bool bUndo(rDoc.IsUndoEnabled()); // if new filter has been selected, forget options - if (!aFilterName.equals(rNewFilter)) + if (aFilterName != rNewFilter) aOptions.clear(); if ( pNewOptions ) // options hard-specfied? aOptions = *pNewOptions; @@ -223,7 +223,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter, for (SCTAB nTab=0; nTab<nCount; nTab++) { ScLinkMode nMode = rDoc.GetLinkMode(nTab); - if (nMode != ScLinkMode::NONE && aFileName.equals(rDoc.GetLinkDoc(nTab))) + if (nMode != ScLinkMode::NONE && aFileName == rDoc.GetLinkDoc(nTab)) { OUString aTabName = rDoc.GetLinkTab(nTab); @@ -353,8 +353,8 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter, bNotFound = true; } - if ( bNewUrlName || !aFilterName.equals(rNewFilter) || - !aOptions.equals(aNewOpt) || pNewOptions || + if ( bNewUrlName || aFilterName != rNewFilter || + aOptions != aNewOpt || pNewOptions || nNewRefresh != GetRefreshDelay() ) rDoc.SetLink( nTab, nMode, aNewUrl, rNewFilter, aNewOpt, aTabName, nNewRefresh ); @@ -365,9 +365,9 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter, if ( bNewUrlName ) aFileName = aNewUrl; - if (!aFilterName.equals(rNewFilter)) + if (aFilterName != rNewFilter) aFilterName = rNewFilter; - if (!aOptions.equals(aNewOpt)) + if (aOptions != aNewOpt) aOptions = aNewOpt; // clean up @@ -435,7 +435,7 @@ bool ScDocumentLoader::GetFilterName( const OUString& rFileName, if ( pDocSh->HasName() ) { SfxMedium* pMed = pDocSh->GetMedium(); - if ( pMed->GetName().equals(rFileName) ) + if ( pMed->GetName() == rFileName ) { rFilter = pMed->GetFilter()->GetFilterName(); rOptions = GetOptions(*pMed); diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx index f9ab423910d0..35c0230818f4 100644 --- a/sc/source/ui/drawfunc/drawsh5.cxx +++ b/sc/source/ui/drawfunc/drawsh5.cxx @@ -483,7 +483,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) ScDocShell* pDocSh = pViewData->GetDocShell(); pDlg->GetName(aName); - if (!aName.equals(pSelected->GetName())) + if (aName != pSelected->GetName()) { // handle name change const sal_uInt16 nObjType(pSelected->GetObjIdentifier()); diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index 3492fe07d109..ae1dbd9c5630 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -1193,12 +1193,12 @@ bool ScAcceptChgDlg::InsertAcceptedORejected(SvTreeListEntry* pParent) ScChangeActionState eState = SC_CAS_VIRGIN; OUString aString = pTheView->GetEntryText(pParent); OUString a2String = aString.copy(0, aStrAllAccepted.getLength()); - if (a2String.equals(aStrAllAccepted)) + if (a2String == aStrAllAccepted) eState=SC_CAS_ACCEPTED; else { a2String = aString.copy(0, aStrAllRejected.getLength()); - if (a2String.equals(aStrAllRejected)) + if (a2String == aStrAllRejected) eState=SC_CAS_REJECTED; } diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx index 2e214d14271b..1fdf02ac7e0e 100644 --- a/sc/source/ui/miscdlgs/linkarea.cxx +++ b/sc/source/ui/miscdlgs/linkarea.cxx @@ -94,7 +94,7 @@ IMPL_LINK_NOARG(ScLinkedAreaDlg, FileHdl, ComboBox&, void) if (pSourceShell) { SfxMedium* pMed = pSourceShell->GetMedium(); - if ( aEntered.equals(pMed->GetName()) ) + if ( aEntered == pMed->GetName() ) { // already loaded - nothing to do return; @@ -206,7 +206,7 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, const OUString aWebQFilterName( FILTERNAME_QUERY ); std::shared_ptr<const SfxFilter> pFilter = pMed->GetFilter(); - if (pFilter && aHTMLFilterName.equals(pFilter->GetFilterName())) + if (pFilter && aHTMLFilterName == pFilter->GetFilterName()) { std::shared_ptr<const SfxFilter> pNewFilter = ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName( aWebQFilterName ); diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx index 2a64d8738528..0d3abf9fd624 100644 --- a/sc/source/ui/miscdlgs/mvtabdlg.cxx +++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx @@ -165,10 +165,10 @@ void ScMoveTableDlg::CheckNewTabName() const sal_Int32 nLast = pLbTable->GetEntryCount(); for ( sal_Int32 i=0; i<nLast && !bFound; ++i ) { - if ( aNewName.equals(pLbTable->GetEntry(i)) ) + if ( aNewName == pLbTable->GetEntry(i) ) { // Only for move within same document the same name is allowed. - if (!bMoveInCurrentDoc || !maDefaultName.equals( pEdTabName->GetText())) + if (!bMoveInCurrentDoc || maDefaultName != pEdTabName->GetText()) bFound = true; } } @@ -282,7 +282,7 @@ IMPL_LINK_NOARG(ScMoveTableDlg, OkHdl, Button*, void) { // Return an empty string, when the new name is the same as the // original name. - if (maDefaultName.equals(pEdTabName->GetText())) + if (maDefaultName == pEdTabName->GetText()) pEdTabName->SetText(OUString()); } diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index 9ffc212a781b..fbf1245de8d1 100644 --- a/sc/source/ui/miscdlgs/scuiautofmt.cxx +++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx @@ -227,7 +227,7 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, AddHdl, Button*, void) { aFormatName = pDlg->GetInputString(); - if ( !aFormatName.isEmpty() && !aFormatName.equals(aStrStandard) && pFormat->find(aFormatName) == pFormat->end() ) + if ( !aFormatName.isEmpty() && aFormatName != aStrStandard && pFormat->find(aFormatName) == pFormat->end() ) { ScAutoFormatData* pNewData = new ScAutoFormatData( *pSelFmtData ); @@ -335,7 +335,7 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, RenameHdl, Button*, void) for (; it != itEnd; ++it) { aEntry = it->second->GetName(); - if (aFormatName.equals(aEntry)) + if (aFormatName == aEntry) break; } if (it == itEnd) diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index c145b0ec9422..340674c3d0be 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -745,7 +745,7 @@ void ScNavigatorDlg::SetCurrentTableStr( const OUString& rName ) for (SCTAB i = 0; i<nCount; i++) { pDoc->GetName(i, aTabName); - if (aTabName.equals(rName)) + if (aTabName == rName) { // Check if this is a Scenario sheet and if so select the sheet // where it belongs to, which is the previous non-Scenario sheet. diff --git a/sc/source/ui/undo/areasave.cxx b/sc/source/ui/undo/areasave.cxx index 2a2b906cadc7..a37420e7783a 100644 --- a/sc/source/ui/undo/areasave.cxx +++ b/sc/source/ui/undo/areasave.cxx @@ -46,10 +46,10 @@ ScAreaLinkSaver::ScAreaLinkSaver( const ScAreaLinkSaver& rCopy ) : bool ScAreaLinkSaver::IsEqualSource( const ScAreaLink& rCompare ) const { - return ( aFileName.equals(rCompare.GetFile()) && - aFilterName.equals(rCompare.GetFilter()) && - aOptions.equals(rCompare.GetOptions()) && - aSourceArea.equals(rCompare.GetSource()) && + return ( aFileName == rCompare.GetFile() && + aFilterName == rCompare.GetFilter() && + aOptions == rCompare.GetOptions() && + aSourceArea == rCompare.GetSource() && nRefresh == rCompare.GetRefreshDelay() ); } diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx index 7d53c7313011..fe1e0d2553a1 100644 --- a/sc/source/ui/unoobj/afmtuno.cxx +++ b/sc/source/ui/unoobj/afmtuno.cxx @@ -152,7 +152,7 @@ static bool lcl_FindAutoFormatIndex( const ScAutoFormat& rFormats, const OUStrin { const ScAutoFormatData *const pEntry = it->second.get(); const OUString& aEntryName = pEntry->GetName(); - if ( aEntryName.equals(rName) ) + if ( aEntryName == rName ) { size_t nPos = std::distance(itBeg, it); rOutIndex = nPos; diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index e08dda7d405c..e5ca3cf4ca58 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -7534,7 +7534,7 @@ void SAL_CALL ScTableSheetObj::link( const OUString& aUrl, const OUString& aShee if (dynamic_cast<const ScTableLink*>( pBase) != nullptr) { ScTableLink* pTabLink = static_cast<ScTableLink*>(pBase); - if ( aFileString.equals(pTabLink->GetFileName()) ) + if ( aFileString == pTabLink->GetFileName() ) pTabLink->Update(); // include Paint&Undo //! The file name should only exists once (?) diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index a6e3f8769a39..84f46138e8d5 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -4267,7 +4267,7 @@ bool ScScenariosObj::GetScenarioIndex_Impl( const OUString& rName, SCTAB& rIndex SCTAB nCount = (SCTAB)getCount(); for (SCTAB i=0; i<nCount; i++) if (rDoc.GetName( nTab+i+1, aTabName )) - if (aTabName.equals(rName)) + if (aTabName == rName) { rIndex = i; return true; diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index a9b04fa65cb5..64892b6a6bc9 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -118,7 +118,7 @@ ScTableLink* ScSheetLinkObj::GetLink_Impl() const if (dynamic_cast<const ScTableLink*>( pBase) != nullptr) { ScTableLink* pTabLink = static_cast<ScTableLink*>(pBase); - if ( pTabLink->GetFileName().equals(aFileName) ) + if ( pTabLink->GetFileName() == aFileName ) return pTabLink; } } diff --git a/sc/source/ui/vba/vbachartobject.cxx b/sc/source/ui/vba/vbachartobject.cxx index 0cf8f2dd7f7c..617e61128e8f 100644 --- a/sc/source/ui/vba/vbachartobject.cxx +++ b/sc/source/ui/vba/vbachartobject.cxx @@ -62,7 +62,7 @@ ScVbaChartObject::setShape() uno::Reference< beans::XPropertySet > xShapePropertySet(xShape, uno::UNO_QUERY_THROW ); OUString sName; xShapePropertySet->getPropertyValue(PERSIST_NAME ) >>=sName; - if ( sName.equals(sPersistName)) + if ( sName == sPersistName ) { xNamedShape.set( xShape, uno::UNO_QUERY_THROW ); return xShape; diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx index 3e326f087c1c..566ebbe68c8a 100644 --- a/sc/source/ui/vba/vbaformatconditions.cxx +++ b/sc/source/ui/vba/vbaformatconditions.cxx @@ -190,7 +190,7 @@ ScVbaFormatConditions::Add( ::sal_Int32 _nType, const uno::Any& _aOperator, cons for (sal_Int32 i = mxSheetConditionalEntries->getCount()-1; i >= 0; i--) { uno::Reference< sheet::XSheetConditionalEntry > xSheetConditionalEntry( mxSheetConditionalEntries->getByIndex(i), uno::UNO_QUERY_THROW ); - if (xSheetConditionalEntry->getStyleName().equals(sStyleName)) + if (xSheetConditionalEntry->getStyleName() == sStyleName) { xFormatCondition = new ScVbaFormatCondition(uno::Reference< XHelperInterface >( mxRangeParent, uno::UNO_QUERY_THROW ), mxContext, xSheetConditionalEntry, xStyle, this, mxParentRangePropertySet); notifyRange(); @@ -253,7 +253,7 @@ ScVbaFormatConditions::removeFormatCondition( const OUString& _sStyleName, bool for (sal_Int32 i = 0; i < nElems; i++) { uno::Reference< sheet::XSheetConditionalEntry > xSheetConditionalEntry( mxSheetConditionalEntries->getByIndex(i), uno::UNO_QUERY_THROW ); - if (_sStyleName.equals(xSheetConditionalEntry->getStyleName())) + if (_sStyleName == xSheetConditionalEntry->getStyleName()) { mxSheetConditionalEntries->removeByIndex(i); if (_bRemoveStyle) diff --git a/sc/source/ui/vba/vbaoleobjects.cxx b/sc/source/ui/vba/vbaoleobjects.cxx index 6b700cc33f6f..c6cce4902c1d 100644 --- a/sc/source/ui/vba/vbaoleobjects.cxx +++ b/sc/source/ui/vba/vbaoleobjects.cxx @@ -147,7 +147,7 @@ ScVbaOLEObjects::getItemByStringIndex( const OUString& sIndex ) uno::Reference< drawing::XControlShape > xControlShape( aUnoObj, uno::UNO_QUERY_THROW ); uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl() ); uno::Reference< container::XNamed > xNamed( xControlModel, uno::UNO_QUERY_THROW ); - if( sIndex.equals( xNamed->getName() )) + if( sIndex == xNamed->getName() ) { return createCollectionObject( aUnoObj ); } diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index b4896e3f9802..5aae79fd6889 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -3314,7 +3314,7 @@ const OUString& sPropName ) sal_Int32 count=0; for ( ; count < nItems; ++count, ++pProp ) - if ( pProp->Name.equals( sPropName ) ) + if ( pProp->Name == sPropName ) return count; if ( count == nItems ) throw uno::RuntimeException("Range::Sort unknown sort property" ); diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index 5586c9347daa..5f6629597606 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -319,7 +319,7 @@ ScVbaWindow::getCaption() // name == title + extension ( .csv, ,odt, .xls ) // etc. then also use the name - if ( !sTitle.equals( sName ) ) + if ( sTitle != sName ) { // starts with title if ( sName.startsWith( sTitle ) ) diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx index 05098b3ffcfd..7ffddf9a4f99 100644 --- a/sc/source/ui/vba/vbaworksheet.cxx +++ b/sc/source/ui/vba/vbaworksheet.cxx @@ -996,14 +996,14 @@ ScVbaWorksheet::getControlShape( const OUString& sName ) uno::Any aUnoObj = xIndexAccess->getByIndex( index ); // It seems there are some drawing objects that can not query into Control shapes? uno::Reference< drawing::XControlShape > xControlShape( aUnoObj, uno::UNO_QUERY ); - if( xControlShape.is() ) - { - uno::Reference< container::XNamed > xNamed( xControlShape->getControl(), uno::UNO_QUERY_THROW ); - if( sName.equals( xNamed->getName() )) + if( xControlShape.is() ) { - return aUnoObj; + uno::Reference< container::XNamed > xNamed( xControlShape->getControl(), uno::UNO_QUERY_THROW ); + if( sName == xNamed->getName() ) + { + return aUnoObj; + } } - } } return uno::Any(); } diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx index ac4ec9424269..e6b356639144 100644 --- a/sc/source/ui/vba/vbaworksheets.cxx +++ b/sc/source/ui/vba/vbaworksheets.cxx @@ -118,7 +118,7 @@ public: for ( ; cachePos != it_end; ++cachePos ) { uno::Reference< container::XNamed > xName( *cachePos, uno::UNO_QUERY_THROW ); - if ( aName.equals( xName->getName() ) ) + if ( aName == xName->getName() ) break; } return ( cachePos != it_end ); diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 52f7e68bd48e..51f028f5503d 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -1277,7 +1277,7 @@ static OUString lcl_replaceMemberNameInSubtotal(const OUString& rSubtotal, const if (c == ' ') { OUString aWord = aWordBuf.makeStringAndClear(); - if (aWord.equals(rMemberName)) + if (aWord == rMemberName) aBuf.append('?'); else aBuf.append(aWord); @@ -1302,7 +1302,7 @@ static OUString lcl_replaceMemberNameInSubtotal(const OUString& rSubtotal, const if (!aWordBuf.isEmpty()) { OUString aWord = aWordBuf.makeStringAndClear(); - if (aWord.equals(rMemberName)) + if (aWord == rMemberName) aBuf.append('?'); else aBuf.append(aWord); diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 59cd5d61cefe..6725ffb5ef8c 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -3564,7 +3564,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt ) if (pDocSh && pDocSh->HasName()) aThisName = pDocSh->GetMedium()->GetName(); - if ( !rData.aLinkDoc.equals(aThisName) ) + if ( rData.aLinkDoc != aThisName ) nRet = rEvt.mnAction; } else if (!rData.aJumpTarget.isEmpty()) @@ -4203,7 +4203,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt ) if (pDocSh && pDocSh->HasName()) aThisName = pDocSh->GetMedium()->GetName(); - if ( rData.aLinkDoc.equals(aThisName) ) // error - no link within a document + if ( rData.aLinkDoc == aThisName ) // error - no link within a document bOk = false; else { diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 7688dd25b9a2..632ef881a1d4 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -579,7 +579,7 @@ void ScGridWindow::UpdateDPFromFieldPopupMenu() { // This is an original member name. Use it as-is. OUString aName = itr->aName; - if (aName.equals(ScGlobal::GetRscString(STR_EMPTYDATA))) + if (aName == ScGlobal::GetRscString(STR_EMPTYDATA)) // Translate the special empty name into an empty string. aName.clear(); diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 900d880ccee7..d4059c8247ce 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -120,7 +120,7 @@ void ScActionColorChanger::Update( const ScChangeAction& rAction ) nColor = nSetColor; else // by author { - if (!aLastUserName.equals(rAction.GetUser())) + if (aLastUserName != rAction.GetUser()) { aLastUserName = rAction.GetUser(); std::set<OUString>::const_iterator it = rUsers.find(aLastUserName); diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index a786a8ab5f18..de7a18ea4f72 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -351,7 +351,7 @@ void ScTabControl::UpdateStatus() aString.clear(); } - if ( !aString.equals(GetPageText(static_cast<sal_uInt16>(i)+1)) || (GetTabBgColor(static_cast<sal_uInt16>(i)+1) != aTabBgColor) ) + if ( aString != GetPageText(static_cast<sal_uInt16>(i)+1) || (GetTabBgColor(static_cast<sal_uInt16>(i)+1) != aTabBgColor) ) bModified = true; } diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index 03b35199c6b2..5a2449cca069 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -481,7 +481,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { pScSh->GetTitle(); - if (aDocName.equals(pScSh->GetTitle())) + if (aDocName == pScSh->GetTitle()) { nDoc = i; ScDocument& rDestDoc = pScSh->GetDocument(); diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 9c30d27d39ef..63fb7b9ca681 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -2456,7 +2456,7 @@ void ScViewFunc::InsertTableLink( const OUString& rFile, for (SCTAB i=0; i<nCount; i++) { rSrcDoc.GetName( i, aTemp ); - if ( aTemp.equals(rTabName) ) + if ( aTemp == rTabName ) nTab = i; } } diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index 30376f3529ac..c5bca8dec8c2 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -153,10 +153,10 @@ bool ScViewUtil::IsActionShown( const ScChangeAction& rAction, { // GetUser() at ChangeTrack is the current user ScChangeTrack* pTrack = rDocument.GetChangeTrack(); - if ( !pTrack || rAction.GetUser().equals(pTrack->GetUser()) ) + if ( !pTrack || rAction.GetUser() == pTrack->GetUser() ) return false; } - else if ( !rAction.GetUser().equals(rSettings.GetTheAuthorToShow()) ) + else if ( rAction.GetUser() != rSettings.GetTheAuthorToShow() ) return false; } |