[Libreoffice-commits] core.git: sc/qa sc/source
Noel Grandin
noel.grandin at collabora.co.uk
Fri Jul 14 07:11:32 UTC 2017
sc/qa/unit/helper/qahelper.cxx | 2 +-
sc/qa/unit/helper/qahelper.hxx | 2 +-
sc/qa/unit/ucalc.cxx | 22 +++++++++++-----------
sc/qa/unit/ucalc_formula.cxx | 12 ++++++------
sc/qa/unit/ucalc_pivottable.cxx | 4 ++--
sc/source/core/data/documen4.cxx | 2 +-
sc/source/core/data/document.cxx | 2 +-
sc/source/core/data/dpcache.cxx | 2 +-
sc/source/core/data/dpdimsave.cxx | 6 +++---
sc/source/core/data/dpgroup.cxx | 2 +-
sc/source/core/data/dpobject.cxx | 8 ++++----
sc/source/core/data/dpsave.cxx | 2 +-
sc/source/core/data/dptabsrc.cxx | 10 +++++-----
sc/source/core/data/drwlayer.cxx | 4 ++--
sc/source/core/data/table4.cxx | 12 ++++++------
sc/source/core/tool/chgtrack.cxx | 4 ++--
sc/source/core/tool/compiler.cxx | 6 +++---
sc/source/core/tool/doubleref.cxx | 6 +++---
sc/source/core/tool/userlist.cxx | 2 +-
sc/source/filter/excel/xepivot.cxx | 4 ++--
sc/source/filter/excel/xltoolbar.cxx | 2 +-
sc/source/filter/excel/xltools.cxx | 2 +-
sc/source/filter/xml/XMLCodeNameProvider.cxx | 4 ++--
sc/source/filter/xml/XMLStylesExportHelper.cxx | 12 ++++++------
sc/source/filter/xml/XMLStylesImportHelper.hxx | 2 +-
sc/source/filter/xml/xmlexprt.cxx | 2 +-
sc/source/filter/xml/xmlimprt.cxx | 12 ++++++------
sc/source/ui/app/inputhdl.cxx | 4 ++--
sc/source/ui/cctrl/checklistmenu.cxx | 2 +-
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 ++--
sc/source/ui/docshell/docsh3.cxx | 2 +-
sc/source/ui/docshell/docsh5.cxx | 4 ++--
sc/source/ui/docshell/externalrefmgr.cxx | 10 +++++-----
sc/source/ui/docshell/tablink.cxx | 18 +++++++++---------
sc/source/ui/drawfunc/drawsh5.cxx | 2 +-
sc/source/ui/miscdlgs/acredlin.cxx | 4 ++--
sc/source/ui/miscdlgs/linkarea.cxx | 4 ++--
sc/source/ui/miscdlgs/mvtabdlg.cxx | 6 +++---
sc/source/ui/miscdlgs/scuiautofmt.cxx | 4 ++--
sc/source/ui/navipi/navipi.cxx | 2 +-
sc/source/ui/undo/areasave.cxx | 8 ++++----
sc/source/ui/unoobj/afmtuno.cxx | 2 +-
sc/source/ui/unoobj/cellsuno.cxx | 2 +-
sc/source/ui/unoobj/docuno.cxx | 2 +-
sc/source/ui/unoobj/linkuno.cxx | 2 +-
sc/source/ui/vba/vbachartobject.cxx | 2 +-
sc/source/ui/vba/vbaformatconditions.cxx | 4 ++--
sc/source/ui/vba/vbaoleobjects.cxx | 2 +-
sc/source/ui/vba/vbarange.cxx | 2 +-
sc/source/ui/vba/vbawindow.cxx | 2 +-
sc/source/ui/vba/vbaworksheet.cxx | 12 ++++++------
sc/source/ui/vba/vbaworksheets.cxx | 2 +-
sc/source/ui/view/dbfunc3.cxx | 4 ++--
sc/source/ui/view/gridwin.cxx | 4 ++--
sc/source/ui/view/gridwin2.cxx | 2 +-
sc/source/ui/view/output.cxx | 2 +-
sc/source/ui/view/tabcont.cxx | 2 +-
sc/source/ui/view/tabvwshf.cxx | 2 +-
sc/source/ui/view/viewfun2.cxx | 2 +-
sc/source/ui/view/viewutil.cxx | 4 ++--
63 files changed, 149 insertions(+), 149 deletions(-)
New commits:
commit d8e5a0db64fa022b54bddc42b1b1db0c1ddfe2d1
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Thu Jul 13 12:44:52 2017 +0200
use more OUString::operator== in sc
Change-Id: I1a7691fe59e5e93c15bd812f03366da814f9f3db
Reviewed-on: https://gerrit.libreoffice.org/39900
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 1bc44bffb9d7..11ea61d953b8 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -504,7 +504,7 @@ bool checkOutput(
if (p)
{
OUString aCheckVal = OUString::createFromAscii(p);
- bool bEqual = aCheckVal.equals(aVal);
+ bool bEqual = aCheckVal == aVal;
if (!bEqual)
{
std::cout << "Expected: " << aCheckVal << " Actual: " << aVal << std::endl;
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index 4e93f968611e..3d2a62f0d9bc 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -165,7 +165,7 @@ bool checkOutput(ScDocument* pDoc, const ScRange& aOutRange, const char* aOutput
if (p)
{
OUString aCheckVal = OUString::createFromAscii(p);
- bool bEqual = aCheckVal.equals(aVal);
+ bool bEqual = aCheckVal == aVal;
if (!bEqual)
{
cout << "Expected: " << aCheckVal << " Actual: " << aVal << endl;
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 6cf23658234b..644d86c71e4f 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -2155,9 +2155,9 @@ void Test::testStreamValid()
m_pDoc->SetString(0, 0, 0, a1);
m_pDoc->SetString(0, 1, 0, a2);
test = m_pDoc->GetString(0, 0, 0);
- CPPUNIT_ASSERT_MESSAGE("Unexpected value in Sheet1.A1", test.equals(a1));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected value in Sheet1.A1", test, a1);
test = m_pDoc->GetString(0, 1, 0);
- CPPUNIT_ASSERT_MESSAGE("Unexpected value in Sheet1.A2", test.equals(a2));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected value in Sheet1.A2", test, a2);
// Put formulas into Sheet2 to Sheet4 to reference values from Sheet1.
m_pDoc->SetString(0, 0, 1, "=Sheet1.A1");
@@ -2166,13 +2166,13 @@ void Test::testStreamValid()
m_pDoc->SetString(0, 0, 3, "=Sheet1.A2");
test = m_pDoc->GetString(0, 0, 1);
- CPPUNIT_ASSERT_MESSAGE("Unexpected value in Sheet2.A1", test.equals(a1));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected value in Sheet2.A1", test, a1);
test = m_pDoc->GetString(0, 1, 1);
- CPPUNIT_ASSERT_MESSAGE("Unexpected value in Sheet2.A2", test.equals(a2));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected value in Sheet2.A2", test, a2);
test = m_pDoc->GetString(0, 0, 2);
- CPPUNIT_ASSERT_MESSAGE("Unexpected value in Sheet3.A1", test.equals(a1));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected value in Sheet3.A1", test, a1);
test = m_pDoc->GetString(0, 0, 3);
- CPPUNIT_ASSERT_MESSAGE("Unexpected value in Sheet3.A1", test.equals(a2));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected value in Sheet3.A1", test, a2);
// Set all sheet streams valid after all the initial cell values are in
// place. In reality we need to have real XML streams stored in order to
@@ -2190,9 +2190,9 @@ void Test::testStreamValid()
// A2 downward but cell A1 remains unmoved.
m_pDoc->InsertRow(0, 0, MAXCOL, 0, 1, 2);
test = m_pDoc->GetString(0, 0, 0);
- CPPUNIT_ASSERT_MESSAGE("Cell A1 should not have moved.", test.equals(a1));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell A1 should not have moved.", test, a1);
test = m_pDoc->GetString(0, 3, 0);
- CPPUNIT_ASSERT_MESSAGE("the old cell A2 should now be at A4.", test.equals(a2));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("the old cell A2 should now be at A4.", test, a2);
ScRefCellValue aCell;
aCell.assign(*m_pDoc, ScAddress(0,1,0));
CPPUNIT_ASSERT_MESSAGE("Cell A2 should be empty.", aCell.isEmpty());
@@ -2891,7 +2891,7 @@ void Test::testToggleRefFlag()
ScRefFinder aFinder(aFormula, aPos, m_pDoc, formula::FormulaGrammar::CONV_OOO);
// Original
- CPPUNIT_ASSERT_MESSAGE("Does not equal the original text.", aFormula.equals(aFinder.GetText()));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Does not equal the original text.", aFormula, aFinder.GetText());
// column relative / row relative -> column absolute / row absolute
aFinder.ToggleRel(0, aFormula.getLength());
@@ -2922,7 +2922,7 @@ void Test::testToggleRefFlag()
ScRefFinder aFinder(aFormula, aPos, m_pDoc, formula::FormulaGrammar::CONV_XL_R1C1);
// Original
- CPPUNIT_ASSERT_MESSAGE("Does not equal the original text.", aFormula.equals(aFinder.GetText()));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Does not equal the original text.", aFormula, aFinder.GetText());
// column absolute / row absolute -> column relative / row absolute
aFinder.ToggleRel(0, aFormula.getLength());
@@ -6583,7 +6583,7 @@ ScDocShell* Test::findLoadedDocShellByName(const OUString& rName)
if (pMedium)
{
OUString aName = pMedium->GetName();
- if (aName.equals(rName))
+ if (aName == rName)
return pShell;
}
pShell = static_cast<ScDocShell*>(SfxObjectShell::GetNext(*pShell, checkSfxObjectShell<ScDocShell>, false));
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 407008dccd9c..0c9fdde78b80 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -5851,7 +5851,7 @@ void Test::testExternalRef()
m_pDoc->InsertTab(0, "Test Sheet");
m_pDoc->SetString(0, 0, 0, "='file:///extdata.fake'#Data1.A1");
OUString test = m_pDoc->GetString(0, 0, 0);
- CPPUNIT_ASSERT_MESSAGE("Value is different from the original", test.equals(name));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Value is different from the original", test, name);
// After the initial access to the external document, the external ref
// manager should create sheet cache entries for *all* sheets from that
@@ -5862,13 +5862,13 @@ void Test::testExternalRef()
vector<OUString> aTabNames;
pRefMgr->getAllCachedTableNames(nFileId, aTabNames);
CPPUNIT_ASSERT_MESSAGE("There should be at least 3 sheets.", aTabNames.size() >= 3);
- CPPUNIT_ASSERT_MESSAGE("Unexpected sheet name.", aTabNames[0].equals(aExtSh1Name));
- CPPUNIT_ASSERT_MESSAGE("Unexpected sheet name.", aTabNames[1].equals(aExtSh2Name));
- CPPUNIT_ASSERT_MESSAGE("Unexpected sheet name.", aTabNames[2].equals(aExtSh3Name));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected sheet name.", aTabNames[0], aExtSh1Name);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected sheet name.", aTabNames[1], aExtSh2Name);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected sheet name.", aTabNames[2], aExtSh3Name);
m_pDoc->SetString(1, 0, 0, "='file:///extdata.fake'#Data1.B1");
test = m_pDoc->GetString(1, 0, 0);
- CPPUNIT_ASSERT_MESSAGE("Value is different from the original", test.equals(value));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Value is different from the original", test, value);
m_pDoc->SetString(0, 1, 0, "='file:///extdata.fake'#Data1.A2");
m_pDoc->SetString(0, 2, 0, "='file:///extdata.fake'#Data1.A3");
@@ -6083,7 +6083,7 @@ void Test::testExternalRefFunctions()
sal_uInt16 nFileId = pRefMgr->getExternalFileId(aExtDocName);
const OUString* pFileName = pRefMgr->getExternalFileName(nFileId);
CPPUNIT_ASSERT_MESSAGE("file name registration has somehow failed.",
- pFileName && pFileName->equals(aExtDocName));
+ pFileName && *pFileName == aExtDocName);
sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn on auto calc.
diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx
index 1b2d64e0bb0f..e78065c11258 100644
--- a/sc/qa/unit/ucalc_pivottable.cxx
+++ b/sc/qa/unit/ucalc_pivottable.cxx
@@ -742,8 +742,8 @@ void Test::testPivotTableNamedSource()
const ScSheetSourceDesc* pDesc = pDPObj->GetSheetDesc();
CPPUNIT_ASSERT_MESSAGE("Sheet source description doesn't exist.", pDesc);
- CPPUNIT_ASSERT_MESSAGE("Named source range has been altered unexpectedly!",
- pDesc->GetRangeName().equals(aRangeName));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Named source range has been altered unexpectedly!",
+ pDesc->GetRangeName(), aRangeName);
CPPUNIT_ASSERT_MESSAGE("Cache should exist.", pDPs->GetNameCaches().hasCache(aRangeName));
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index d2f74b9f6125..a0faba4cdc72 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -1126,7 +1126,7 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
if (!rOtherDoc.IsScenario(nTemp))
{
rOtherDoc.GetName( nTemp, aOtherName );
- if ( aThisName.equals(aOtherName) )
+ if ( aThisName == aOtherName )
nOtherTab = nTemp;
}
}
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 233422b12b13..48dab01c45dd 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -270,7 +270,7 @@ bool ScDocument::GetTable( const OUString& rName, SCTAB& rTab ) const
for (SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()); i++)
if (maTabs[i])
{
- if (aUpperName.equals(maTabs[i]->GetUpperName()))
+ if (aUpperName == maTabs[i]->GetUpperName())
{
rTab = i;
return true;
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index 75b337ff83b6..9030d7307682 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -1117,7 +1117,7 @@ SCCOL ScDPCache::GetDimensionIndex(const OUString& sName) const
{
for (size_t i = 1; i < maLabelNames.size(); ++i)
{
- if (maLabelNames[i].equals(sName))
+ if (maLabelNames[i] == sName)
return static_cast<SCCOL>(i-1);
}
return -1;
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx
index 564b56e93f02..fa785fdf4925 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -176,7 +176,7 @@ OUString ScDPSaveGroupDimension::CreateGroupName(const OUString& rPrefix)
// look for existing groups
for ( ScDPSaveGroupItemVec::const_iterator aIter(aGroups.begin());
aIter != aGroups.end() && !bExists; ++aIter )
- if (aIter->GetGroupName().equals(aGroupName)) //TODO: ignore case
+ if (aIter->GetGroupName() == aGroupName) //TODO: ignore case
bExists = true;
if ( !bExists )
@@ -197,7 +197,7 @@ const ScDPSaveGroupItem* ScDPSaveGroupDimension::GetNamedGroup( const OUString&
ScDPSaveGroupItem* ScDPSaveGroupDimension::GetNamedGroupAcc( const OUString& rGroupName )
{
for (ScDPSaveGroupItemVec::iterator aIter = aGroups.begin(); aIter != aGroups.end(); ++aIter)
- if (aIter->GetGroupName().equals(rGroupName)) //TODO: ignore case
+ if (aIter->GetGroupName() == rGroupName) //TODO: ignore case
return &*aIter;
return nullptr; // none found
@@ -232,7 +232,7 @@ void ScDPSaveGroupDimension::RemoveFromGroups( const OUString& rItemName )
void ScDPSaveGroupDimension::RemoveGroup(const OUString& rGroupName)
{
for (ScDPSaveGroupItemVec::iterator aIter = aGroups.begin(); aIter != aGroups.end(); ++aIter)
- if (aIter->GetGroupName().equals(rGroupName)) //TODO: ignore case
+ if (aIter->GetGroupName() == rGroupName) //TODO: ignore case
{
aGroups.erase( aIter );
return; // don't have to look further
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index f4dab854015b..97c87bff236f 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -508,7 +508,7 @@ void ScDPGroupTableData::SetNumGroupDimension( long nIndex, const ScDPNumGroupDi
long ScDPGroupTableData::GetDimensionIndex( const OUString& rName )
{
for (long i = 0; i < nSourceCount; ++i) // nSourceCount excludes data layout
- if (pSourceData->getDimensionName(i).equals(rName)) //TODO: ignore case?
+ if (pSourceData->getDimensionName(i) == rName) //TODO: ignore case?
return i;
return -1; // none
}
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index bc655a606e6f..2ae64ecf64e3 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -3604,8 +3604,8 @@ bool ScDPCollection::GetReferenceGroups(const ScDPObject& rDPObj, const ScDPDime
if (pDesc == nullptr || pRefDesc == nullptr)
continue;
- if (pDesc->aDBName.equals(pRefDesc->aDBName) &&
- pDesc->aObject.equals(pRefDesc->aObject) &&
+ if (pDesc->aDBName == pRefDesc->aDBName &&
+ pDesc->aObject == pRefDesc->aObject &&
pDesc->GetCommandType() == pRefDesc->GetCommandType())
{
*pGroups = rRefObj.GetSaveData()->GetExistingDimensionData();
@@ -3970,7 +3970,7 @@ void ScDPCollection::GetAllTables(
if (!pDesc)
continue;
- if (!pDesc->aDBName.equals(rDBName) || !pDesc->aObject.equals(rCommand) || pDesc->GetCommandType() != nSdbType)
+ if (pDesc->aDBName != rDBName || pDesc->aObject != rCommand || pDesc->GetCommandType() != nSdbType)
// Different database source.
continue;
@@ -3985,7 +3985,7 @@ bool operator<(const ScDPCollection::DBType& left, const ScDPCollection::DBType&
if (left.mnSdbType != right.mnSdbType)
return left.mnSdbType < right.mnSdbType;
- if (!left.maDBName.equals(right.maDBName))
+ if (left.maDBName != right.maDBName)
return left.maDBName < right.maDBName;
return left.maCommand < right.maCommand;
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 7715eed721bb..26476d059911 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -822,7 +822,7 @@ bool ScDPSaveData::operator== ( const ScDPSaveData& r ) const
{
if (!r.mpGrandTotalName)
return false;
- if (!mpGrandTotalName->equals(*r.mpGrandTotalName))
+ if (*mpGrandTotalName != *r.mpGrandTotalName)
return false;
}
else if (r.mpGrandTotalName)
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 5610ed70d22e..be7ad0473dac 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -322,7 +322,7 @@ ScDPDimension* ScDPSource::AddDuplicated(const OUString& rNewName)
for (long i=0; i<nOldDimCount; i++)
{
ScDPDimension* pDim = pDimensions->getByIndex(i);
- if (pDim && pDim->getName().equals(rNewName))
+ if (pDim && pDim->getName() == rNewName)
{
//TODO: test if pDim is a duplicate of source
return pDim;
@@ -450,7 +450,7 @@ Sequence< Sequence<Any> > SAL_CALL ScDPSource::getDrillDownData(const Sequence<s
const OUString& aFieldName = rFilter.FieldName;
for (long nCol = 0; nCol < nColumnCount; ++nCol)
{
- if (aFieldName.equals(pData->getDimensionName(nCol)))
+ if (aFieldName == pData->getDimensionName(nCol))
{
ScDPDimension* pDim = GetDimensionsObject()->getByIndex( nCol );
ScDPMembers* pMembers = pDim->GetHierarchiesObject()->getByIndex(0)->
@@ -1411,7 +1411,7 @@ const ScDPItemData& ScDPDimension::GetSelectedData()
for (long i=0; i<nCount && !pSelectedData; i++)
{
ScDPMember* pMember = pMembers->getByIndex(i);
- if (aSelectedPage.equals(pMember->GetNameStr( false)))
+ if (aSelectedPage == pMember->GetNameStr(false))
{
pSelectedData.reset( new ScDPItemData(pMember->FillItemData()) );
}
@@ -1947,7 +1947,7 @@ void ScDPLevel::EvaluateSortOrder()
long nMeasureCount = pSource->GetDataDimensionCount();
for (long nMeasure=0; nMeasure<nMeasureCount; nMeasure++)
{
- if (pSource->GetDataDimName(nMeasure).equals(aSortInfo.Field))
+ if (pSource->GetDataDimName(nMeasure) == aSortInfo.Field)
{
nSortMeasure = nMeasure;
break;
@@ -1982,7 +1982,7 @@ void ScDPLevel::EvaluateSortOrder()
long nMeasureCount = pSource->GetDataDimensionCount();
for (long nMeasure=0; nMeasure<nMeasureCount; nMeasure++)
{
- if (pSource->GetDataDimName(nMeasure).equals(aAutoShowInfo.DataField))
+ if (pSource->GetDataDimName(nMeasure) == aAutoShowInfo.DataField)
{
nAutoMeasure = nMeasure;
break;
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index f7364af902b8..0c0544e27e2f 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -1511,7 +1511,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
if( pClipDoc->GetName( nSourceTab, aSourceTabName )
&& pDoc->GetName( nDestTab, aDestTabName ) )
{
- if( !aSourceTabName.equals(aDestTabName) &&
+ if( aSourceTabName != aDestTabName &&
pDoc->ValidNewTabName(aSourceTabName) )
{
bRestoreDestTabName = pDoc->RenameTab( nDestTab, aSourceTabName );
@@ -1763,7 +1763,7 @@ inline bool IsNamedObject( SdrObject* pObj, const OUString& rName )
// sal_True if rName is the object's Name or PersistName
// (used to find a named object)
- return ( pObj->GetName().equals(rName) ||
+ return ( pObj->GetName() == rName ||
( pObj->GetObjIdentifier() == OBJ_OLE2 &&
static_cast<SdrOle2Obj*>(pObj)->GetPersistName() == rName ) );
}
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index b181a1c25dcd..324eb2201a93 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -936,7 +936,7 @@ OUString ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW
short nFlag = lcl_DecompValueString( aValue, nVal, &nCellDigits );
if ( nFlag < 0 )
{
- if (aValue.equals( ScGlobal::GetOrdinalSuffix( nVal)))
+ if (aValue == ScGlobal::GetOrdinalSuffix( nVal))
aValue = ScGlobal::GetOrdinalSuffix( nVal + nDelta);
aValue = lcl_ValueString( nVal + nDelta, nCellDigits ) + aValue;
@@ -1038,7 +1038,7 @@ OUString ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW
{
if ( nHeadNoneTail < 0 )
{
- if (aValue.equals( ScGlobal::GetOrdinalSuffix( nVal)))
+ if (aValue == ScGlobal::GetOrdinalSuffix( nVal))
aValue = ScGlobal::GetOrdinalSuffix( (sal_Int32)nStart );
aValue = lcl_ValueString( (sal_Int32)nStart, nMinDigits ) + aValue;
@@ -1407,8 +1407,8 @@ void ScTable::FillAutoSimple(
nHeadNoneTail = lcl_DecompValueString(
aValue, nStringValue, &nCellDigits );
- bIsOrdinalSuffix = aValue.equals(
- ScGlobal::GetOrdinalSuffix( nStringValue));
+ bIsOrdinalSuffix = aValue ==
+ ScGlobal::GetOrdinalSuffix(nStringValue);
}
break;
default:
@@ -1817,8 +1817,8 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
bool bError = false;
bool bOverflow = false;
- bool bIsOrdinalSuffix = aValue.equals( ScGlobal::GetOrdinalSuffix(
- (sal_Int32)nStartVal));
+ bool bIsOrdinalSuffix = aValue == ScGlobal::GetOrdinalSuffix(
+ (sal_Int32)nStartVal);
rInner = nIStart;
while (true) // #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 5e208027f0ef..5177a29189f3 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -2649,7 +2649,7 @@ void ScChangeTrack::AppendContent(
aNewCell.assign(*pDoc, rPos);
ScChangeActionContent::GetStringOfCell(aNewValue, aNewCell, pDoc, rPos);
- if (!aOldValue.equals(aNewValue) || IsMatrixFormulaRangeDifferent(rOldCell, aNewCell))
+ if (aOldValue != aNewValue || IsMatrixFormulaRangeDifferent(rOldCell, aNewCell))
{ // Only track real changes
ScRange aRange( rPos );
ScChangeActionContent* pAct = new ScChangeActionContent( aRange );
@@ -2672,7 +2672,7 @@ void ScChangeTrack::AppendContent( const ScAddress& rPos,
aNewCell.assign(*pDoc, rPos);
ScChangeActionContent::GetStringOfCell(aNewValue, aNewCell, pDoc, rPos);
- if (!aOldValue.equals(aNewValue) || IsMatrixFormulaRangeDifferent(aOldCell, aNewCell))
+ if (aOldValue != aNewValue || IsMatrixFormulaRangeDifferent(aOldCell, aNewCell))
{ // Only track real changes
ScRange aRange( rPos );
ScChangeActionContent* pAct = new ScChangeActionContent( aRange );
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 345a82267249..0939e8e115c6 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2709,14 +2709,14 @@ bool ScCompiler::IsOpCode( const OUString& rName, bool bInArray )
OpCode eOp = iLook->second;
if (bInArray)
{
- if (rName.equals(mxSymbols->getSymbol(ocArrayColSep)))
+ if (rName == mxSymbols->getSymbol(ocArrayColSep))
eOp = ocArrayColSep;
- else if (rName.equals(mxSymbols->getSymbol(ocArrayRowSep)))
+ else if (rName == mxSymbols->getSymbol(ocArrayRowSep))
eOp = ocArrayRowSep;
}
else if (eOp == ocArrayColSep || eOp == ocArrayRowSep)
{
- if (rName.equals(mxSymbols->getSymbol(ocSep)))
+ if (rName == mxSymbols->getSymbol(ocSep))
eOp = ocSep;
else if (rName == ";")
{
diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx
index 5f25cc5b2648..037257659396 100644
--- a/sc/source/core/tool/doubleref.cxx
+++ b/sc/source/core/tool/doubleref.cxx
@@ -77,12 +77,12 @@ bool lcl_createStarQuery(
// For all entries after the first one, check the and/or connector in the first column.
aCellStr = pQueryRef->getString(0, nRow);
lcl_uppercase(aCellStr);
- if ( aCellStr.equals(ScGlobal::GetRscString(STR_TABLE_UND)) )
+ if ( aCellStr == ScGlobal::GetRscString(STR_TABLE_UND) )
{
rEntry.eConnect = SC_AND;
bValid = true;
}
- else if ( aCellStr.equals(ScGlobal::GetRscString(STR_TABLE_ODER)) )
+ else if ( aCellStr == ScGlobal::GetRscString(STR_TABLE_ODER) )
{
rEntry.eConnect = SC_OR;
bValid = true;
@@ -444,7 +444,7 @@ SCCOL ScDBExternalRange::findFieldColumn(const OUString& rStr, FormulaError* pEr
{
OUString aUpperVal = mpMatrix->GetString(i, 0).getString();
lcl_uppercase(aUpperVal);
- if (aUpper.equals(aUpperVal))
+ if (aUpper == aUpperVal)
return i;
}
return -1;
diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx
index 4a49e65dfe36..e3533e297c25 100644
--- a/sc/source/core/tool/userlist.cxx
+++ b/sc/source/core/tool/userlist.cxx
@@ -39,7 +39,7 @@ public:
FindByName(const OUString& rName, bool bUpper) : mrName(rName), mbUpper(bUpper) {}
bool operator() (const ScUserListData::SubStr& r) const
{
- return mbUpper ? r.maUpper.equals(mrName) : r.maReal.equals(mrName);
+ return mbUpper ? r.maUpper == mrName : r.maReal == mrName;
}
};
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 5f79475a5dd4..91f97ec2f626 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -920,7 +920,7 @@ void XclExpPTItem::SetPropertiesFromMember( const ScDPSaveMember& rSaveMem )
// visible name
const OUString* pVisName = rSaveMem.GetLayoutName();
- if (pVisName && !pVisName->equals(GetItemName()))
+ if (pVisName && *pVisName != GetItemName())
maItemInfo.SetVisName(*pVisName);
}
@@ -1003,7 +1003,7 @@ void XclExpPTField::SetPropertiesFromDim( const ScDPSaveDimension& rSaveDim )
// visible name
const OUString* pLayoutName = rSaveDim.GetLayoutName();
- if (pLayoutName && !pLayoutName->equals(GetFieldName()))
+ if (pLayoutName && *pLayoutName != GetFieldName())
maFieldInfo.SetVisName(*pLayoutName);
const OUString* pSubtotalName = rSaveDim.GetSubtotalName();
diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx
index f84fdf29208b..c8b2afc08910 100644
--- a/sc/source/filter/excel/xltoolbar.cxx
+++ b/sc/source/filter/excel/xltoolbar.cxx
@@ -390,7 +390,7 @@ ScCTB* ScCTBWrapper::GetCustomizationData( const OUString& sTBName )
ScCTB* pCTB = nullptr;
for ( std::vector< ScCTB >::iterator it = rCTB.begin(); it != rCTB.end(); ++it )
{
- if ( it->GetName().equals( sTBName ) )
+ if ( it->GetName() == sTBName )
{
pCTB = &(*it);
break;
diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx
index 374fc6256b21..176e1da6162c 100644
--- a/sc/source/filter/excel/xltools.cxx
+++ b/sc/source/filter/excel/xltools.cxx
@@ -551,7 +551,7 @@ OUString XclTools::GetBuiltInStyleName( sal_uInt8 nStyleId, const OUString& rNam
bool XclTools::IsBuiltInStyleName( const OUString& rStyleName, sal_uInt8* pnStyleId, sal_Int32* pnNextChar )
{
// "Default" becomes "Normal"
- if (rStyleName.equals(ScGlobal::GetRscString(STR_STYLENAME_STANDARD)))
+ if (rStyleName == ScGlobal::GetRscString(STR_STYLENAME_STANDARD))
{
if( pnStyleId ) *pnStyleId = EXC_STYLE_NORMAL;
if( pnNextChar ) *pnNextChar = rStyleName.getLength();
diff --git a/sc/source/filter/xml/XMLCodeNameProvider.cxx b/sc/source/filter/xml/XMLCodeNameProvider.cxx
index 8cd724f7c950..d833e2e4016e 100644
--- a/sc/source/filter/xml/XMLCodeNameProvider.cxx
+++ b/sc/source/filter/xml/XMLCodeNameProvider.cxx
@@ -66,7 +66,7 @@ sal_Bool SAL_CALL XMLCodeNameProvider::hasByName( const OUString& aName )
OUString sSheetName, sCodeName;
for( SCTAB i = 0; i < nCount; i++ )
{
- if( mpDoc->GetName( i, sSheetName ) && sSheetName.equals(aName) )
+ if( mpDoc->GetName( i, sSheetName ) && sSheetName == aName )
{
mpDoc->GetCodeName( i, sCodeName );
return !sCodeName.isEmpty();
@@ -93,7 +93,7 @@ uno::Any SAL_CALL XMLCodeNameProvider::getByName( const OUString& aName )
OUString sSheetName, sCodeName;
for( SCTAB i = 0; i < nCount; i++ )
{
- if( mpDoc->GetName( i, sSheetName ) && sSheetName.equals(aName) )
+ if( mpDoc->GetName( i, sSheetName ) && sSheetName == aName )
{
mpDoc->GetCodeName( i, sCodeName );
aProps[0].Value <<= sCodeName;
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index e1e1a39d7ae8..2a4683342ae8 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -745,7 +745,7 @@ bool ScFormatRangeStyles::AddStyleName(OUString* rpString, sal_Int32& rIndex, co
sal_Int32 i(nCount - 1);
while ((i >= 0) && (!bFound))
{
- if (aStyleNames.at(i)->equals(*rpString))
+ if (*aStyleNames.at(i) == *rpString)
bFound = true;
else
i--;
@@ -769,7 +769,7 @@ sal_Int32 ScFormatRangeStyles::GetIndexOfStyleName(const OUString& rString, cons
sal_Int32 nPrefixLength(rPrefix.getLength());
OUString sTemp(rString.copy(nPrefixLength));
sal_Int32 nIndex(sTemp.toInt32());
- if (nIndex > 0 && static_cast<size_t>(nIndex-1) < aAutoStyleNames.size() && aAutoStyleNames.at(nIndex - 1)->equals(rString))
+ if (nIndex > 0 && static_cast<size_t>(nIndex-1) < aAutoStyleNames.size() && *aAutoStyleNames.at(nIndex - 1) == rString)
{
bIsAutoStyle = true;
return nIndex - 1;
@@ -780,7 +780,7 @@ sal_Int32 ScFormatRangeStyles::GetIndexOfStyleName(const OUString& rString, cons
bool bFound(false);
while (!bFound && static_cast<size_t>(i) < aStyleNames.size())
{
- if (aStyleNames[i]->equals(rString))
+ if (*aStyleNames[i] == rString)
bFound = true;
else
++i;
@@ -795,7 +795,7 @@ sal_Int32 ScFormatRangeStyles::GetIndexOfStyleName(const OUString& rString, cons
i = 0;
while (!bFound && static_cast<size_t>(i) < aAutoStyleNames.size())
{
- if (aAutoStyleNames[i]->equals(rString))
+ if (*aAutoStyleNames[i] == rString)
bFound = true;
else
++i;
@@ -995,7 +995,7 @@ sal_Int32 ScColumnRowStylesBase::GetIndexOfStyleName(const OUString& rString, co
sal_Int32 nPrefixLength(rPrefix.getLength());
OUString sTemp(rString.copy(nPrefixLength));
sal_Int32 nIndex(sTemp.toInt32());
- if (nIndex > 0 && static_cast<size_t>(nIndex-1) < aStyleNames.size() && aStyleNames.at(nIndex - 1)->equals(rString))
+ if (nIndex > 0 && static_cast<size_t>(nIndex-1) < aStyleNames.size() && *aStyleNames.at(nIndex - 1) == rString)
return nIndex - 1;
else
{
@@ -1003,7 +1003,7 @@ sal_Int32 ScColumnRowStylesBase::GetIndexOfStyleName(const OUString& rString, co
bool bFound(false);
while (!bFound && static_cast<size_t>(i) < aStyleNames.size())
{
- if (aStyleNames.at(i)->equals(rString))
+ if (*aStyleNames.at(i) == rString)
bFound = true;
else
++i;
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.hxx b/sc/source/filter/xml/XMLStylesImportHelper.hxx
index 36b2f8d583e2..7907726d27b4 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.hxx
@@ -144,7 +144,7 @@ class ScMyStylesImportHelper
void AddRange();
static bool IsEqual(const OUString* pFirst, const OUString* pSecond)
{
- return ((pFirst && pSecond && pFirst->equals(*pSecond)) ||
+ return ((pFirst && pSecond && *pFirst == *pSecond) ||
(!pFirst && !pSecond) ||
(!pFirst && pSecond && pSecond->isEmpty()) ||
(!pSecond && pFirst && pFirst->isEmpty()));
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 51b7c81d935c..7d79adb440ba 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3889,7 +3889,7 @@ void ScXMLExport::WriteTableSource()
{
OUString sNewLink;
if (xLinkProps->getPropertyValue(SC_UNONAME_LINKURL) >>= sNewLink)
- bFound = sLink.equals(sNewLink);
+ bFound = sLink == sNewLink;
}
}
if (bFound && xLinkProps.is())
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 0425953e7826..8760c189f3fd 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -2778,7 +2778,7 @@ bool ScXMLImport::IsCurrencySymbol(const sal_Int32 nNumberFormat, const OUString
OUString sTemp;
if ( xNumberPropertySet->getPropertyValue(SC_CURRENCYSYMBOL) >>= sTemp)
{
- if (sCurrentCurrency.equals(sTemp))
+ if (sCurrentCurrency == sTemp)
return true;
// A release that saved an unknown currency may have
// saved the currency symbol of the number format
@@ -2787,7 +2787,7 @@ bool ScXMLImport::IsCurrencySymbol(const sal_Int32 nNumberFormat, const OUString
// sCurrentCurrency is the ISO code obtained through
// XMLNumberFormatAttributesExportHelper::GetCellType()
// and sBankSymbol is the currency symbol.
- if (sCurrentCurrency.getLength() == 3 && sBankSymbol.equals(sTemp))
+ if (sCurrentCurrency.getLength() == 3 && sBankSymbol == sTemp)
return true;
// #i61657# This may be a legacy currency symbol that changed in the meantime.
if (SvNumberFormatter::GetLegacyOnlyCurrencyEntry( sCurrentCurrency, sBankSymbol) != nullptr)
@@ -2866,7 +2866,7 @@ void ScXMLImport::SetType(uno::Reference <beans::XPropertySet>& rProperties,
}
else if (!rCurrency.isEmpty() && !sCurrentCurrency.isEmpty())
{
- if (!sCurrentCurrency.equals(rCurrency))
+ if (sCurrentCurrency != rCurrency)
if (!IsCurrencySymbol(rNumberFormat, sCurrentCurrency, rCurrency))
rProperties->setPropertyValue( sNumberFormat, uno::makeAny(SetCurrencySymbol(rNumberFormat, rCurrency)));
}
@@ -2881,7 +2881,7 @@ void ScXMLImport::SetType(uno::Reference <beans::XPropertySet>& rProperties,
else
{
if ((nCellType == util::NumberFormat::CURRENCY) && !rCurrency.isEmpty() && !sCurrentCurrency.isEmpty() &&
- !sCurrentCurrency.equals(rCurrency) && !IsCurrencySymbol(rNumberFormat, sCurrentCurrency, rCurrency))
+ sCurrentCurrency != rCurrency && !IsCurrencySymbol(rNumberFormat, sCurrentCurrency, rCurrency))
rProperties->setPropertyValue( sNumberFormat, uno::makeAny(SetCurrencySymbol(rNumberFormat, rCurrency)));
}
}
@@ -2987,9 +2987,9 @@ void ScXMLImport::SetStyleToRange(const ScRange& rRange, const OUString* pStyleN
sPrevCurrency.clear();
}
else if ((nCellType != nPrevCellType) ||
- ((pStyleName && !pStyleName->equals(sPrevStyleName)) ||
+ ((pStyleName && *pStyleName != sPrevStyleName) ||
(!pStyleName && !sPrevStyleName.isEmpty())) ||
- ((pCurrency && !pCurrency->equals(sPrevCurrency)) ||
+ ((pCurrency && *pCurrency != sPrevCurrency) ||
(!pCurrency && !sPrevCurrency.isEmpty())))
{
SetStyleToRanges();
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;
}
More information about the Libreoffice-commits
mailing list