From 57027233275260b066442037a904ec34a703ae09 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 28 May 2015 15:44:10 +0200 Subject: loplugin:loopvartoosmall (cherry picked from commit 6140ca9f1d728475e332f9fa96ee62dda58687ea) Change-Id: Icb31e51575f7fffd36be73bbd87a3c5e56c3aa26 --- editeng/source/editeng/editdbg.cxx | 6 +++--- editeng/source/editeng/editdoc.cxx | 2 +- editeng/source/editeng/impedit2.cxx | 2 +- editeng/source/editeng/impedit3.cxx | 2 +- editeng/source/editeng/impedit5.cxx | 2 +- editeng/source/items/textitem.cxx | 2 +- editeng/source/misc/svxacorr.cxx | 4 ++-- editeng/source/rtf/svxrtf.cxx | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) (limited to 'editeng/source') diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx index 70cf4b66267b..34f7ddf3a180 100644 --- a/editeng/source/editeng/editdbg.cxx +++ b/editeng/source/editeng/editdbg.cxx @@ -462,11 +462,11 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, bool bInfoBox ) fprintf( fp, "\nMinAutoPaperSize: %li x %li", pEE->GetMinAutoPaperSize().Width(), pEE->GetMinAutoPaperSize().Height() ); fprintf( fp, "\nUpdate: %i", pEE->GetUpdateMode() ); fprintf( fp, "\nNumber of Views: %" SAL_PRI_SIZET "i", pEE->GetViewCount() ); - for ( sal_uInt16 nView = 0; nView < pEE->GetViewCount(); nView++ ) + for ( size_t nView = 0; nView < pEE->GetViewCount(); nView++ ) { EditView* pV = pEE->GetView( nView ); DBG_ASSERT( pV, "View not found!" ); - fprintf( fp, "\nView %i: Focus=%i", nView, pV->GetWindow()->HasFocus() ); + fprintf( fp, "\nView %zu: Focus=%i", nView, pV->GetWindow()->HasFocus() ); Rectangle aR( pV->GetOutputArea() ); fprintf( fp, "\n OutputArea: nX=%li, nY=%li, dX=%li, dY=%li, MapMode = %i", aR.TopLeft().X(), aR.TopLeft().Y(), aR.GetSize().Width(), aR.GetSize().Height() , pV->GetWindow()->GetMapMode().GetMapUnit() ); aR = pV->GetVisArea(); @@ -492,7 +492,7 @@ bool ParaPortion::DbgCheckTextPortions(ParaPortion const& rPara) { // check, if Portion length ok: sal_uInt16 nXLen = 0; - for (sal_uInt16 nPortion = 0; nPortion < rPara.aTextPortionList.Count(); nPortion++) + for (sal_Int32 nPortion = 0; nPortion < rPara.aTextPortionList.Count(); nPortion++) { nXLen = nXLen + rPara.aTextPortionList[nPortion]->GetLen(); } diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index ff7e1ac74084..d1211eea223e 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -1359,7 +1359,7 @@ void ContentNode::ExpandAttribs( sal_Int32 nIndex, sal_Int32 nNew, SfxItemPool& { // Check if this kind of attribute was empty and expanded here... sal_uInt16 nW = pAttrib->GetItem()->Which(); - for ( sal_uInt16 nA = 0; nA < nAttr; nA++ ) + for ( sal_Int32 nA = 0; nA < nAttr; nA++ ) { const EditCharAttrib& r = aCharAttribList.GetAttribs()[nA]; if ( ( r.GetStart() == 0 ) && ( r.GetItem()->Which() == nW ) ) diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 7835b78e5de3..2e108de197e2 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -2133,7 +2133,7 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, sal_Int32 n ParaPortion* pDestPortion = GetParaPortions().SafeGetObject( nNewPos ); ParaPortionList aTmpPortionList; - for (sal_Int32 i = aOldPositions.Min(); i <= aOldPositions.Max(); i++ ) + for (long i = aOldPositions.Min(); i <= aOldPositions.Max(); i++ ) { // always aOldPositions.Min(), since Remove(). ParaPortion* pTmpPortion = GetParaPortions().Release(aOldPositions.Min()); diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index d5a3023e691e..bed86502040d 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -2320,7 +2320,7 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_Int32& rS if ( mpIMEInfos && mpIMEInfos->nLen && mpIMEInfos->pAttribs && ( mpIMEInfos->aPos.GetNode() == pNode ) ) { sal_uInt16 nLastAttr = 0xFFFF; - for( sal_uInt16 n = 0; n < mpIMEInfos->nLen; n++ ) + for( sal_Int32 n = 0; n < mpIMEInfos->nLen; n++ ) { if ( mpIMEInfos->pAttribs[n] != nLastAttr ) { diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx index 726c4065e6d1..f8150c8496fa 100644 --- a/editeng/source/editeng/impedit5.cxx +++ b/editeng/source/editeng/impedit5.cxx @@ -209,7 +209,7 @@ EditUndoSetAttribs* ImpEditEngine::CreateAttribUndo( EditSelection aSel, const S ContentAttribsInfo* pInf = new ContentAttribsInfo( pNode->GetContentAttribs().GetItems() ); pUndo->AppendContentInfo(pInf); - for ( sal_uInt16 nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ ) + for ( sal_Int32 nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ ) { const EditCharAttrib& rAttr = pNode->GetCharAttribs().GetAttribs()[nAttr]; if (rAttr.GetLen()) diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index cf7c1bcd548b..0375fea59fd2 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -156,7 +156,7 @@ SvxFontListItem::SvxFontListItem( const FontList* pFontLst, sal_Int32 nCount = pFontList->GetFontNameCount(); aFontNameSeq.realloc( nCount ); - for ( sal_uInt16 i = 0; i < nCount; i++ ) + for ( sal_Int32 i = 0; i < nCount; i++ ) aFontNameSeq[i] = pFontList->GetFontName(i).GetName(); } } diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 4f2027828f3f..f7d5fc77b9fa 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -2522,7 +2522,7 @@ bool SvxAutoCorrectLanguageLists::MakeCombinedChanges( std::vectorFindAndRemove( &aWordToDelete ); @@ -2546,7 +2546,7 @@ bool SvxAutoCorrectLanguageLists::MakeCombinedChanges( std::vectorFindAndRemove( pWordToAdd ); diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index f1a303ea5d25..a15182dfd566 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -1076,7 +1076,7 @@ void SvxRTFParser::SetAttrSet( SvxRTFItemStackType &rSet ) // then process all the children if( rSet.pChildList ) - for( sal_uInt16 n = 0; n < rSet.pChildList->size(); ++n ) + for( size_t n = 0; n < rSet.pChildList->size(); ++n ) SetAttrSet( (*rSet.pChildList)[ n ] ); } -- cgit v1.2.3