summaryrefslogtreecommitdiff
path: root/svx/source/xoutdev
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/xoutdev
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/xoutdev')
-rw-r--r--svx/source/xoutdev/_xpoly.cxx12
-rw-r--r--svx/source/xoutdev/xattrbmp.cxx4
-rw-r--r--svx/source/xoutdev/xtabdash.cxx4
-rw-r--r--svx/source/xoutdev/xtable.cxx10
4 files changed, 15 insertions, 15 deletions
diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx
index ae5819ba0f2c..de87258087c8 100644
--- a/svx/source/xoutdev/_xpoly.cxx
+++ b/svx/source/xoutdev/_xpoly.cxx
@@ -886,14 +886,14 @@ ImpXPolyPolygon::ImpXPolyPolygon( const ImpXPolyPolygon& rImpXPolyPoly ) :
nRefCount = 1;
// duplicate elements
- for ( size_t i = 0, n = aXPolyList.size(); i < n; ++i )
- aXPolyList[ i ] = new XPolygon( *aXPolyList[ i ] );
+ for (XPolygon*& rp : aXPolyList)
+ rp = new XPolygon( *rp );
}
ImpXPolyPolygon::~ImpXPolyPolygon()
{
- for ( size_t i = 0, n = aXPolyList.size(); i < n; ++i )
- delete aXPolyList[ i ];
+ for (XPolygon* p : aXPolyList)
+ delete p;
aXPolyList.clear();
}
@@ -972,8 +972,8 @@ void XPolyPolygon::Clear()
}
else
{
- for( size_t i = 0, n = pImpXPolyPolygon->aXPolyList.size(); i < n; ++i )
- delete pImpXPolyPolygon->aXPolyList[ i ];
+ for(XPolygon* p : pImpXPolyPolygon->aXPolyList)
+ delete p;
pImpXPolyPolygon->aXPolyList.clear();
}
}
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index e86cb4aafc63..9fc5d04cb8ed 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -291,9 +291,9 @@ XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer)
{
sal_uInt16 aArray[64];
- for(sal_uInt16 i(0); i < 64; i++)
+ for(sal_uInt16 & i : aArray)
{
- rIn.ReadUInt16( aArray[i] );
+ rIn.ReadUInt16( i );
}
Color aColorPix;
diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx
index 56fbd47014d6..52c2209f0a3c 100644
--- a/svx/source/xoutdev/xtabdash.cxx
+++ b/svx/source/xoutdev/xtabdash.cxx
@@ -114,9 +114,9 @@ Bitmap XDashList::ImpCreateBitmapForXDash(const XDash* pDash)
if(!aDotDashArray.empty())
{
- for(size_t a(0); a < aDotDashArray.size(); a++)
+ for(double & a : aDotDashArray)
{
- aDotDashArray[a] *= fScaleValue;
+ a *= fScaleValue;
}
fFullDotDashLen *= fScaleValue;
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index f7776f15eb25..e73fd080a4be 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -126,8 +126,8 @@ XPropertyList::XPropertyList(
XPropertyList::~XPropertyList()
{
// fprintf (stderr, "Destroy type %d count %d\n", (int)meType, --count);
- for( size_t i = 0, n = maList.size(); i < n; ++i )
- delete maList[ i ];
+ for(XPropertyEntry* p : maList)
+ delete p;
maList.clear();
}
@@ -386,10 +386,10 @@ static struct {
OUString XPropertyList::GetDefaultExt( XPropertyListType t )
{
- for (size_t i = 0; i < SAL_N_ELEMENTS (pExtnMap); i++)
+ for (const auto & i : pExtnMap)
{
- if( pExtnMap[i].t == t )
- return OUString::createFromAscii( pExtnMap[ i ].pExt );
+ if( i.t == t )
+ return OUString::createFromAscii( i.pExt );
}
return OUString();
}