summaryrefslogtreecommitdiff
path: root/svx/source/customshapes/EnhancedCustomShape2d.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-11 09:53:05 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-12 07:12:21 +0000
commit875984617cfd6c773eb93f339929eb3fabd3e97b (patch)
treeabb092c1b0d995d55f2f4508801df23377c9cc6d /svx/source/customshapes/EnhancedCustomShape2d.cxx
parent6bc3c2bdc5279314881b7e950d76d4d813470d11 (diff)
clang-tidy modernize-loop-convert in svx
Change-Id: I09e5243e5dff46ceccef1a707e648ee9cb0c37c5 Reviewed-on: https://gerrit.libreoffice.org/24875 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svx/source/customshapes/EnhancedCustomShape2d.cxx')
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx18
1 files changed, 5 insertions, 13 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index f263ac8469ae..4bad1d5f3abd 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2181,9 +2181,8 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly )
{
std::vector< SdrPathObj* > vTempList;
- for(size_t i = 0; i < vObjectList.size(); ++i)
+ for(SdrPathObj* pObj : vObjectList)
{
- SdrPathObj* pObj(vObjectList[i]);
const drawing::LineStyle eLineStyle =static_cast<const XLineStyleItem&>(pObj->GetMergedItem(XATTR_LINESTYLE)).GetValue();
const drawing::FillStyle eFillStyle = static_cast<const XFillStyleItem&>(pObj->GetMergedItem(XATTR_FILLSTYLE)).GetValue();
@@ -2208,10 +2207,8 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly )
sal_Int32 nAreaObjectCount = 0;
// correct some values and collect content data
- for ( size_t i = 0; i < vObjectList.size(); ++i )
+ for (SdrPathObj* pObj : vObjectList)
{
- SdrPathObj* pObj( vObjectList[ i ] );
-
if(pObj->IsLine())
{
nLineObjectCount++;
@@ -2234,20 +2231,16 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly )
std::vector< SdrPathObj* > vTempList;
vTempList.reserve(vObjectList.size());
- for ( size_t i = 0; i < vObjectList.size(); ++i )
+ for (SdrPathObj* pObj : vObjectList)
{
- SdrPathObj* pObj( vObjectList[ i ] );
-
if ( !pObj->IsLine() )
{
vTempList.push_back(pObj);
}
}
- for ( size_t i = 0; i < vObjectList.size(); ++i )
+ for (SdrPathObj* pObj : vObjectList)
{
- SdrPathObj* pObj( vObjectList[ i ] );
-
if ( pObj->IsLine() )
{
vTempList.push_back(pObj);
@@ -2267,9 +2260,8 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly )
{
pRet = new SdrObjGroup;
- for (size_t i = 0; i < vObjectList.size(); ++i)
+ for (SdrPathObj* pObj : vObjectList)
{
- SdrObject* pObj(vObjectList[i]);
pRet->GetSubList()->NbcInsertObject(pObj);
}
}