diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-28 10:24:35 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-28 09:31:29 +0000 |
commit | 91adb929d747ef1434fb1732fdbf51283fda78e8 (patch) | |
tree | 928b7d95ab0cb21d8a887f1f6b47d6af261f0d12 /lotuswordpro | |
parent | 43b4903db3e925c652e25c34362490f8adc9c5ec (diff) |
clang-tidy modernize-loop-convert in h-l/*
Change-Id: I843528327b25d18476f8959cabba16371213a48a
Reviewed-on: https://gerrit.libreoffice.org/24460
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpdrawobj.cxx | 18 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwplayout.cxx | 6 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwprowlayout.cxx | 4 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpsortopt.cxx | 4 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfliststyle.cxx | 8 |
5 files changed, 18 insertions, 22 deletions
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx index 82e1fc5f9842..cab4dd260125 100644 --- a/lotuswordpro/source/filter/lwpdrawobj.cxx +++ b/lotuswordpro/source/filter/lwpdrawobj.cxx @@ -835,10 +835,10 @@ void LwpDrawEllipse::Read() { ReadClosedObjStyle(); - for (sal_uInt8 nC = 0; nC < 13; nC++) + for (SdwPoint & nC : m_aVector) { - m_pStream->ReadInt16( m_aVector[nC].x ); - m_pStream->ReadInt16( m_aVector[nC].y ); + m_pStream->ReadInt16( nC.x ); + m_pStream->ReadInt16( nC.y ); } } @@ -914,10 +914,10 @@ void LwpDrawArc::Read() m_pStream->ReadUChar( m_aArcRec.aPenColor.unused ); m_pStream->ReadUChar( m_aArcRec.nLineEnd ); - for (sal_uInt8 nC = 0; nC < 4; nC++) + for (SdwPoint & nC : m_aVector) { - m_pStream->ReadInt16( m_aVector[nC].x ); - m_pStream->ReadInt16( m_aVector[nC].y ); + m_pStream->ReadInt16( nC.x ); + m_pStream->ReadInt16( nC.y ); } } @@ -1194,10 +1194,10 @@ void LwpDrawTextArt::CreateFWPath(XFDrawPath* pPath) void LwpDrawTextArt::Read() { - for (sal_uInt8 nC = 0; nC < 4; nC++) + for (SdwPoint & nC : m_aVector) { - m_pStream->ReadInt16( m_aVector[nC].x ); - m_pStream->ReadInt16( m_aVector[nC].y ); + m_pStream->ReadInt16( nC.x ); + m_pStream->ReadInt16( nC.y ); } ReadClosedObjStyle(); diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx index c70153c02991..3e80d8a6fd0a 100644 --- a/lotuswordpro/source/filter/lwplayout.cxx +++ b/lotuswordpro/source/filter/lwplayout.cxx @@ -826,11 +826,11 @@ XFBorders* LwpMiddleLayout::GetXFBorders() LwpBorderStuff::BorderType pType[] = { LwpBorderStuff::LEFT, LwpBorderStuff::RIGHT, LwpBorderStuff::TOP, LwpBorderStuff::BOTTOM }; - for (sal_uInt8 nC = 0; nC < 4; nC++) + for (LwpBorderStuff::BorderType & nC : pType) { - if (pBorderStuff->HasSide(pType[nC])) + if (pBorderStuff->HasSide(nC)) { - LwpParaStyle::ApplySubBorder(pBorderStuff, pType[nC], pXFBorders); + LwpParaStyle::ApplySubBorder(pBorderStuff, nC, pXFBorders); } } return pXFBorders; diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx b/lotuswordpro/source/filter/lwprowlayout.cxx index 906c09cdb052..a936f0e1e251 100644 --- a/lotuswordpro/source/filter/lwprowlayout.cxx +++ b/lotuswordpro/source/filter/lwprowlayout.cxx @@ -445,10 +445,8 @@ void LwpRowLayout::CollectMergeInfo() */ void LwpRowLayout::SetCellSplit(sal_uInt16 nEffectRows) { - LwpConnectedCellLayout* pConnCell; - for (size_t i=0; i<m_ConnCellList.size(); i++) + for (LwpConnectedCellLayout* pConnCell : m_ConnCellList) { - pConnCell = m_ConnCellList[i]; sal_uInt16 nRowSpan = pConnCell->GetRowID()+pConnCell->GetNumrows(); if ( nRowSpan > nEffectRows ) { diff --git a/lotuswordpro/source/filter/lwpsortopt.cxx b/lotuswordpro/source/filter/lwpsortopt.cxx index 886bac534ebe..e740ec95cae2 100644 --- a/lotuswordpro/source/filter/lwpsortopt.cxx +++ b/lotuswordpro/source/filter/lwpsortopt.cxx @@ -79,9 +79,9 @@ void LwpSortOption::Read(LwpObjectStream *pStrm) m_nCount = pStrm->QuickReaduInt16(); m_nFlags = pStrm->QuickReaduInt16(); m_nText = pStrm->QuickReaduInt8(); - for(sal_uInt8 i=0; i<3; i++) + for(LwpSortKey & key : m_Keys) { - m_Keys[i].Read(pStrm); + key.Read(pStrm); } pStrm->SkipExtra(); } diff --git a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx index 7f7e868247f7..b989875221be 100644 --- a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx @@ -209,10 +209,9 @@ XFListStyle& XFListStyle::operator=(const XFListStyle& other) XFListStyle::~XFListStyle() { - for( int i=0; i<10; i++ ) + for(XFListLevel* p : m_pListLevels) { - if( m_pListLevels[i] ) - delete m_pListLevels[i]; + delete p; } } @@ -318,9 +317,8 @@ void XFListStyle::ToXml(IXFStream *pStrm) pAttrList->AddAttribute("style:parent-style-name",GetParentStyleName()); pStrm->StartElement( "text:list-style" ); - for( int i=0; i<10; i++ ) + for(XFListLevel* pLevel : m_pListLevels) { - XFListLevel *pLevel = m_pListLevels[i]; if( pLevel ) pLevel->ToXml(pStrm); } |