summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorElton Chung <elton@layerjet.com>2012-02-19 16:59:40 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2012-02-19 17:07:46 +0400
commitd30b4e9fb66f377295d8eeea8c1b1cf879aecdf6 (patch)
treea99079bda02a9d8dd5bd0d54666164f362314c52 /sc
parent704c9477039e37b4910db6aa8dd644751dd5e6a5 (diff)
Get rid of size() == 0
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/dociter.cxx6
-rw-r--r--sc/source/core/data/dptablecache.cxx2
-rw-r--r--sc/source/ui/vba/vbahyperlinks.cxx2
-rw-r--r--sc/source/ui/view/viewdata.cxx4
4 files changed, 7 insertions, 7 deletions
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 86a4d7c923ed..9588638bdf32 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -311,7 +311,7 @@ sal_Bool ScValueIterator::GetThis(double& rValue, sal_uInt16& rErr)
}
}
pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
- } while ( pCol->maItems.size() == 0 );
+ } while ( pCol->maItems.empty() );
pCol->Search( nRow, nColRow );
}
@@ -1040,7 +1040,7 @@ ScBaseCell* ScCellIterator::GetThis()
return NULL; // Ende und Aus
}
pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
- } while ( pCol->maItems.size() == 0 );
+ } while ( pCol->maItems.empty() );
pCol->Search( nRow, nColRow );
}
@@ -1152,7 +1152,7 @@ ScBaseCell* ScQueryCellIterator::GetThis()
nFirstQueryField = rEntry.nField;
}
pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
- } while ( pCol->maItems.size() == 0 );
+ } while ( pCol->maItems.empty() );
pCol->Search( nRow, nColRow );
bFirstStringIgnore = bIgnoreMismatchOnLeadingStrings &&
!mpParam->bHasHeader && rItem.meType == ScQueryEntry::ByString &&
diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx
index d5c3f2ae2700..cc60e6f03f4e 100644
--- a/sc/source/core/data/dptablecache.cxx
+++ b/sc/source/core/data/dptablecache.cxx
@@ -640,7 +640,7 @@ void ScDPCache::AddLabel(ScDPItemData *pData)
{
OSL_ENSURE( IsValid(), " IsValid() == false " );
- if ( maLabelNames.size() == 0 )
+ if ( maLabelNames.empty() )
maLabelNames.push_back( new ScDPItemData(ScGlobal::GetRscString(STR_PIVOT_DATA)) );
//reset name if needed
diff --git a/sc/source/ui/vba/vbahyperlinks.cxx b/sc/source/ui/vba/vbahyperlinks.cxx
index 85c6ae6c218c..d83a76d5f864 100644
--- a/sc/source/ui/vba/vbahyperlinks.cxx
+++ b/sc/source/ui/vba/vbahyperlinks.cxx
@@ -46,7 +46,7 @@ namespace {
bool lclContains( const ScRangeList& rScOuter, const uno::Reference< excel::XRange >& rxInner ) throw (uno::RuntimeException)
{
const ScRangeList& rScInner = ScVbaRange::getScRangeList( rxInner );
- if( (rScInner.size() == 0) || (rScOuter.size() == 0) )
+ if( rScInner.empty() || rScOuter.empty() )
throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Empty range objects" ) ), uno::Reference< uno::XInterface >() );
for( size_t nIndex = 0, nCount = rScInner.size(); nIndex < nCount; ++nIndex )
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 8a9640392316..a220fdf010f6 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -563,7 +563,7 @@ void ScViewData::CreateTabData( std::vector< SCTAB >& rvTabs )
void ScViewData::SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs )
{
- sal_Bool bAll = ( tabs.size() == 0 );
+ sal_Bool bAll = ( tabs.empty() );
if ( !bAll ) // create associated table data
CreateTabData( tabs );
@@ -603,7 +603,7 @@ void ScViewData::SetZoomType( SvxZoomType eNew, sal_Bool bAll )
void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, std::vector< SCTAB >& tabs )
{
- sal_Bool bAll = ( tabs.size() == 0 );
+ sal_Bool bAll = ( tabs.empty() );
if ( !bAll ) // create associated table data
CreateTabData( tabs );
Fraction aFrac20( 1,5 );