summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-06-11 10:06:49 +0200
committerNoel Grandin <noel@peralex.com>2015-06-11 10:07:08 +0200
commit776a3f14f2d987312b926ebc1ad09321a3a87f0d (patch)
tree09be8f37156fb9147e306dbd27d5dfa8e282c43f /sc
parentf60e521f24863643c7befed7f84db7d659c3c547 (diff)
convert expressions like 'size() == 0' to 'empty()'
Change-Id: Ia5c8c0f38a347f398d587970a22e03f29ffd37af
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/dociter.cxx6
-rw-r--r--sc/source/core/tool/token.cxx4
-rw-r--r--sc/source/filter/excel/xestyle.cxx4
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx6
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx4
5 files changed, 12 insertions, 12 deletions
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 575f13f465d6..39ae93b8c743 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -1998,7 +1998,7 @@ void ScHorizontalCellIterator::SetTab( SCTAB nTabP )
}
}
- if (maColPositions.size() == 0)
+ if (maColPositions.empty())
return;
maColPos = maColPositions.begin();
@@ -2080,7 +2080,7 @@ bool ScHorizontalCellIterator::SkipInvalidInRow()
debugiter("remove column %d at row %d\n",
(int)maColPos->mnCol, (int)nRow);
maColPos = maColPositions.erase(maColPos);
- if (maColPositions.size() == 0)
+ if (maColPositions.empty())
{
debugiter("no more columns\n");
mbMore = false;
@@ -2102,7 +2102,7 @@ bool ScHorizontalCellIterator::SkipInvalidInRow()
}
// No more columns with anything interesting in them ?
- if (maColPositions.size() == 0)
+ if (maColPositions.empty())
{
debugiter("no more live columns left - done\n");
mbMore = false;
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 4e20d93d8195..457f1bd33e4c 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -545,7 +545,7 @@ FormulaTokenRef extendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2
pRefList = rTok2.GetRefList();
if (pRefList)
{
- if (!pRefList->size())
+ if (pRefList->empty())
return NULL;
if (bExternal)
return NULL; // external reference list not possible
@@ -569,7 +569,7 @@ FormulaTokenRef extendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2
case svRefList:
{
const ScRefList* p = pt[i]->GetRefList();
- if (!p->size())
+ if (p->empty())
return NULL;
ScRefList::const_iterator it( p->begin());
ScRefList::const_iterator end( p->end());
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index df5c75b2e822..c4e5c86f0f9c 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -487,7 +487,7 @@ void XclExpPaletteImpl::WriteBody( XclExpStream& rStrm )
void XclExpPaletteImpl::SaveXml( XclExpXmlStream& rStrm )
{
- if( !maPalette.size() )
+ if( maPalette.empty() )
return;
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
@@ -1411,7 +1411,7 @@ void XclExpNumFmtBuffer::Save( XclExpStream& rStrm )
void XclExpNumFmtBuffer::SaveXml( XclExpXmlStream& rStrm )
{
- if( !maFormatMap.size() )
+ if( maFormatMap.empty() )
return;
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index 080a1340456f..001286c379c1 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -394,7 +394,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
// The cell will own the text object instance.
mpDoc->SetEditText(ScAddress(nCol,nRow,nTab), mpEngine->CreateTextObject(pE->aSel));
}
- if ( pE->maImageList.size() )
+ if ( !pE->maImageList.empty() )
bHasGraphics |= GraphicSize( nCol, nRow, nTab, pE );
if ( pE->pName )
{ // Anchor Name => RangeName
@@ -470,7 +470,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, ScEEParseEntry* pE )
{
- if ( !pE->maImageList.size() )
+ if ( pE->maImageList.empty() )
return false;
bool bHasGraphics = false;
OutputDevice* pDefaultDev = Application::GetDefaultDevice();
@@ -534,7 +534,7 @@ bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, ScEEParseE
void ScEEImport::InsertGraphic( SCCOL nCol, SCROW nRow, SCTAB nTab,
ScEEParseEntry* pE )
{
- if ( !pE->maImageList.size() )
+ if ( pE->maImageList.empty() )
return ;
ScDrawLayer* pModel = mpDoc->GetDrawLayer();
if (!pModel)
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 6edee14ed8c4..9254cc98df21 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -1391,7 +1391,7 @@ void SAL_CALL ScTabViewObj::removeEnhancedMouseClickHandler( const uno::Referenc
else
++it;
}
- if ((aMouseClickHandlers.size() == 0) && (nCount > 0)) // only if last listener removed
+ if (aMouseClickHandlers.empty() && (nCount > 0)) // only if last listener removed
EndMouseListening();
}
@@ -1422,7 +1422,7 @@ void SAL_CALL ScTabViewObj::removeActivationEventListener( const uno::Reference<
else
++it;
}
- if ((aActivationListeners.size() == 0) && (nCount > 0)) // only if last listener removed
+ if (aActivationListeners.empty() && (nCount > 0)) // only if last listener removed
EndActivationListening();
}