diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2012-01-21 12:00:59 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2012-01-21 19:58:45 +0100 |
commit | 94f114550a8fd9f21e70fa98a4b564d7643d47d4 (patch) | |
tree | 82dcbc1edecc3199ce29b383dd67e073e9094b81 /chart2 | |
parent | 3bb278f5bfa1cb28ba051bc6980a93d52f9b29e1 (diff) |
Improve checking for emptiness
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/drawinglayer/DrawViewWrapper.cxx | 2 | ||||
-rw-r--r-- | chart2/source/model/template/PieChartTypeTemplate.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx index e573944e5be4..fad41f051074 100644 --- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx +++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx @@ -221,7 +221,7 @@ SdrObject* DrawViewWrapper::getHitObject( const Point& rPnt ) const const basegfx::B2DPoint aHitPoint(rPnt.X(), rPnt.Y()); getAllHit3DObjectsSortedFrontToBack(aHitPoint, *pScene, aHitList); - if(aHitList.size()) + if(!aHitList.empty()) { // choose the frontmost hit 3D object of the scene pRet = const_cast< E3dCompoundObject* >(aHitList[0]); diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx index 41709c0dbd72..ece6b3e91e12 100644 --- a/chart2/source/model/template/PieChartTypeTemplate.cxx +++ b/chart2/source/model/template/PieChartTypeTemplate.cxx @@ -343,7 +343,7 @@ sal_Bool SAL_CALL PieChartTypeTemplate::matchesTemplate( DiagramHelper::getDataSeriesFromDiagram( xDiagram )); //check offset of outer series - if( aSeriesVec.size() ) + if( !aSeriesVec.empty() ) { sal_Int32 nOuterSeriesIndex = 0; //@todo in future this will depend on Orientation of the radius axis scale Reference< chart2::XDataSeries > xSeries( aSeriesVec[nOuterSeriesIndex] ); |