Kaydet (Commit) 94f11455 authored tarafından Thomas Arnhold's avatar Thomas Arnhold

Improve checking for emptiness

üst 3bb278f5
...@@ -221,7 +221,7 @@ SdrObject* DrawViewWrapper::getHitObject( const Point& rPnt ) const ...@@ -221,7 +221,7 @@ SdrObject* DrawViewWrapper::getHitObject( const Point& rPnt ) const
const basegfx::B2DPoint aHitPoint(rPnt.X(), rPnt.Y()); const basegfx::B2DPoint aHitPoint(rPnt.X(), rPnt.Y());
getAllHit3DObjectsSortedFrontToBack(aHitPoint, *pScene, aHitList); getAllHit3DObjectsSortedFrontToBack(aHitPoint, *pScene, aHitList);
if(aHitList.size()) if(!aHitList.empty())
{ {
// choose the frontmost hit 3D object of the scene // choose the frontmost hit 3D object of the scene
pRet = const_cast< E3dCompoundObject* >(aHitList[0]); pRet = const_cast< E3dCompoundObject* >(aHitList[0]);
......
...@@ -343,7 +343,7 @@ sal_Bool SAL_CALL PieChartTypeTemplate::matchesTemplate( ...@@ -343,7 +343,7 @@ sal_Bool SAL_CALL PieChartTypeTemplate::matchesTemplate(
DiagramHelper::getDataSeriesFromDiagram( xDiagram )); DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
//check offset of outer series //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 sal_Int32 nOuterSeriesIndex = 0; //@todo in future this will depend on Orientation of the radius axis scale
Reference< chart2::XDataSeries > xSeries( aSeriesVec[nOuterSeriesIndex] ); Reference< chart2::XDataSeries > xSeries( aSeriesVec[nOuterSeriesIndex] );
......
...@@ -1892,7 +1892,7 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x ...@@ -1892,7 +1892,7 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x
xProperties->getPropertyValue(SC_NUMBERFORMAT) >>= nNumberFormat; xProperties->getPropertyValue(SC_NUMBERFORMAT) >>= nNumberFormat;
if (!sStyleName.isEmpty()) if (!sStyleName.isEmpty())
{ {
if (xPropStates.size()) if (!xPropStates.empty())
{ {
sal_Int32 nIndex; sal_Int32 nIndex;
if (pOldName) if (pOldName)
...@@ -1968,7 +1968,7 @@ void ScXMLExport::AddStyleFromColumn(const uno::Reference<beans::XPropertySet>& ...@@ -1968,7 +1968,7 @@ void ScXMLExport::AddStyleFromColumn(const uno::Reference<beans::XPropertySet>&
rtl::OUString SC_SCOLUMNPREFIX(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX)); rtl::OUString SC_SCOLUMNPREFIX(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX));
std::vector<XMLPropertyState> xPropStates(xColumnStylesExportPropertySetMapper->Filter(xColumnProperties)); std::vector<XMLPropertyState> xPropStates(xColumnStylesExportPropertySetMapper->Filter(xColumnProperties));
if(xPropStates.size()) if(!xPropStates.empty())
{ {
std::vector< XMLPropertyState >::iterator aItr(xPropStates.begin()); std::vector< XMLPropertyState >::iterator aItr(xPropStates.begin());
std::vector< XMLPropertyState >::iterator aEndItr(xPropStates.end()); std::vector< XMLPropertyState >::iterator aEndItr(xPropStates.end());
...@@ -2013,7 +2013,7 @@ void ScXMLExport::AddStyleFromRow(const uno::Reference<beans::XPropertySet>& xRo ...@@ -2013,7 +2013,7 @@ void ScXMLExport::AddStyleFromRow(const uno::Reference<beans::XPropertySet>& xRo
rtl::OUString SC_SROWPREFIX(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX)); rtl::OUString SC_SROWPREFIX(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX));
std::vector<XMLPropertyState> xPropStates(xRowStylesExportPropertySetMapper->Filter(xRowProperties)); std::vector<XMLPropertyState> xPropStates(xRowStylesExportPropertySetMapper->Filter(xRowProperties));
if(xPropStates.size()) if(!xPropStates.empty())
{ {
rtl::OUString sParent; rtl::OUString sParent;
if (pOldName) if (pOldName)
...@@ -2365,7 +2365,7 @@ void ScXMLExport::_ExportAutoStyles() ...@@ -2365,7 +2365,7 @@ void ScXMLExport::_ExportAutoStyles()
if (xTableProperties.is()) if (xTableProperties.is())
{ {
std::vector<XMLPropertyState> xPropStates(xTableStylesExportPropertySetMapper->Filter(xTableProperties)); std::vector<XMLPropertyState> xPropStates(xTableStylesExportPropertySetMapper->Filter(xTableProperties));
if(xPropStates.size()) if(!xPropStates.empty())
{ {
rtl::OUString sParent; rtl::OUString sParent;
rtl::OUString sName; rtl::OUString sName;
......
...@@ -460,7 +460,7 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext ) ...@@ -460,7 +460,7 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
} }
// move // move
if(vNavMarks.size()) if(!vNavMarks.empty())
{ {
if(bNext) if(bNext)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment