diff options
Diffstat (limited to 'xmloff/source/draw/shapeexport.cxx')
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 22c421e19a70..b78d6c3b2f89 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -437,14 +437,8 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap } } - std::vector< XMLPropertyState >::iterator aIter = aPropStates.begin(); - std::vector< XMLPropertyState >::iterator aEnd = aPropStates.end(); - while( aIter != aEnd ) - { - if( aIter->mnIndex != -1 ) - nCount++; - ++aIter; - } + nCount = std::count_if(aPropStates.cbegin(), aPropStates.cend(), + [](const XMLPropertyState& rProp) { return rProp.mnIndex != -1; }); } if(nCount == 0) @@ -501,15 +495,8 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap } } - nCount = 0; - std::vector< XMLPropertyState >::iterator aIter = aPropStates.begin(); - std::vector< XMLPropertyState >::iterator aEnd = aPropStates.end(); - while( aIter != aEnd ) - { - if( aIter->mnIndex != -1 ) - nCount++; - ++aIter; - } + nCount = std::count_if(aPropStates.cbegin(), aPropStates.cend(), + [](const XMLPropertyState& rProp) { return rProp.mnIndex != -1; }); if( nCount ) { |