summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2015-05-31 23:11:52 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2015-05-31 23:35:56 +0200
commitac52b11a150cd260cfb58aa3013abcf499d04468 (patch)
treee01a7cafcb030aaf802adc15513dfec40a30a4fc
parent591b3d1551f6bddbbda1fbe7e6d5f766de6a29d3 (diff)
Use size_t and range-based fo loops
Change-Id: I41a30326a2507b1a21b7f9ed17edb21e373ab526
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index fe05420c5b31..9e24f9ae6362 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -248,10 +248,9 @@ sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrameFormat& rFrameFormat,
bEmpty = true;
if( pHTMLPosFlyFrms )
{
- for( sal_uInt16 i=0; i<pHTMLPosFlyFrms->size(); i++ )
+ for( auto pHTMLPosFlyFrm : *pHTMLPosFlyFrms )
{
- sal_uLong nIdx = (*pHTMLPosFlyFrms)[i]
- ->GetNdIndex().GetIndex();
+ sal_uLong nIdx = pHTMLPosFlyFrm->GetNdIndex().GetIndex();
bEmpty = (nIdx != nStt) && (nIdx != nStt-1);
if( !bEmpty || nIdx > nStt )
break;
@@ -367,9 +366,9 @@ bool SwHTMLWriter::OutFlyFrm( sal_uLong nNdIdx, sal_Int32 nContentIdx, sal_uInt8
bFlysLeft = bRestart = false;
// suche nach dem Anfang der FlyFrames
- sal_uInt16 i;
+ size_t i {0};
- for( i = 0; i < pHTMLPosFlyFrms->size() &&
+ for( ; i < pHTMLPosFlyFrms->size() &&
(*pHTMLPosFlyFrms)[i]->GetNdIndex().GetIndex() < nNdIdx; i++ )
;
for( ; !bRestart && i < pHTMLPosFlyFrms->size() &&
@@ -1940,7 +1939,7 @@ void SwHTMLWriter::CollectLinkTargets()
const ImageMap *pIMap = pURL->GetMap();
if( pIMap )
{
- for( sal_uInt16 i=0; i<pIMap->GetIMapObjectCount(); i++ )
+ for( size_t i=0; i<pIMap->GetIMapObjectCount(); ++i )
{
const IMapObject* pObj = pIMap->GetIMapObject( i );
if( pObj )