diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-03-07 19:50:17 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-03-07 19:50:51 +0100 |
commit | e46c717b0b8cd9be060b31debb54ba82ac7e5b9d (patch) | |
tree | 3ee452dc303809fa8e1b1ea91c8a090e6d3ebcdf /editeng | |
parent | 43b13117c0adf303cd3578bf268b4ac8feb04f6b (diff) |
loplugin:loopvartoosmall
Change-Id: I7c962d91f5c54fa188594174c14ab1d0b1bc6963
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editdbg.cxx | 5 | ||||
-rw-r--r-- | editeng/source/editeng/impedit4.cxx | 5 | ||||
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 4 | ||||
-rw-r--r-- | editeng/source/misc/txtrange.cxx | 12 | ||||
-rw-r--r-- | editeng/source/outliner/outliner.cxx | 4 |
5 files changed, 14 insertions, 16 deletions
diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx index c5c87a92695f..a1bd2c83785d 100644 --- a/editeng/source/editeng/editdbg.cxx +++ b/editeng/source/editeng/editdbg.cxx @@ -406,8 +406,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, bool bInfoBox ) fprintf( fp, "\n\nLines:" ); // First the content ... - sal_uInt16 nLine; - for ( nLine = 0; nLine < pPPortion->GetLines().Count(); nLine++ ) + for ( sal_Int32 nLine = 0; nLine < pPPortion->GetLines().Count(); nLine++ ) { EditLine& rLine = pPPortion->GetLines()[nLine]; @@ -415,7 +414,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, bool bInfoBox ) fprintf( fp, "\nLine %i\t>%s<", nLine, aLine.getStr() ); } // then the internal data ... - for ( nLine = 0; nLine < pPPortion->GetLines().Count(); nLine++ ) + for ( sal_Int32 nLine = 0; nLine < pPPortion->GetLines().Count(); nLine++ ) { EditLine& rLine = pPPortion->GetLines()[nLine]; fprintf( fp, "\nZeile %i:\tStart: %" SAL_PRIdINT32 ",\tEnd: %" SAL_PRIdINT32, nLine, rLine.GetStart(), rLine.GetEnd() ); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 80cfabf8e2d7..53fe08351869 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -360,8 +360,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) rOutput << endl; rOutput.WriteChar( '{' ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_FONTTBL ); - sal_uInt16 j; - for ( j = 0; j < aFontTable.size(); j++ ) + for ( std::vector<SvxFontItem*>::size_type j = 0; j < aFontTable.size(); j++ ) { SvxFontItem* pFontItem = aFontTable[ j ]; rOutput.WriteChar( '{' ); @@ -434,7 +433,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) } rOutput.WriteChar( '{' ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_COLORTBL ); - for ( j = 0; j < aColorList.size(); j++ ) + for ( SvxColorList::size_type j = 0; j < aColorList.size(); j++ ) { Color const color = aColorList[j]; if (color != COL_AUTO) // auto is represented by "empty" element diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index dbf222d004a3..893f812baccd 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1822,12 +1822,12 @@ static bool lcl_FindAbbreviation(const SvStringsISortDtor* pList, const OUString { OUString sAbk('~'); SvStringsISortDtor::const_iterator it = pList->find( sAbk ); - sal_uInt16 nPos = it - pList->begin(); + SvStringsISortDtor::size_type nPos = it - pList->begin(); if( nPos < pList->size() ) { OUString sLowerWord(sWord.toAsciiLowerCase()); OUString sAbr; - for( sal_uInt16 n = nPos; + for( SvStringsISortDtor::size_type n = nPos; n < pList->size() && '~' == ( sAbr = (*pList)[ n ])[ 0 ]; ++n ) diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx index 10bcbe5e63b7..afa88b53cbe9 100644 --- a/editeng/source/misc/txtrange.cxx +++ b/editeng/source/misc/txtrange.cxx @@ -495,13 +495,13 @@ void SvxBoundArgs::Concat( const tools::PolyPolygon* pPoly ) aBoolArr.clear(); bInner = false; Calc( *pPoly ); // Note that this updates pLongArr, which is why we swapped it out earlier. - sal_uInt16 nCount = pLongArr->size(); - sal_uInt16 nIdx = 0; - sal_uInt16 i = 0; + std::deque<long>::size_type nCount = pLongArr->size(); + std::deque<long>::size_type nIdx = 0; + std::deque<long>::size_type i = 0; bool bSubtract = pTextRanger->IsInner(); while( i < nCount ) { - sal_uLong nOldCount = pOld->size(); + std::deque<long>::size_type nOldCount = pOld->size(); if( nIdx == nOldCount ) { // Reached the end of the old Array... if( !bSubtract ) @@ -510,7 +510,7 @@ void SvxBoundArgs::Concat( const tools::PolyPolygon* pPoly ) } long nLeft = (*pLongArr)[ i++ ]; long nRight = (*pLongArr)[ i++ ]; - sal_uInt16 nLeftPos = nIdx + 1; + std::deque<long>::size_type nLeftPos = nIdx + 1; while( nLeftPos < nOldCount && nLeft > (*pOld)[ nLeftPos ] ) nLeftPos += 2; if( nLeftPos >= nOldCount ) @@ -519,7 +519,7 @@ void SvxBoundArgs::Concat( const tools::PolyPolygon* pPoly ) pOld->insert( pOld->begin() + nOldCount, pLongArr->begin() + i - 2, pLongArr->end() ); break; } - sal_uInt16 nRightPos = nLeftPos - 1; + std::deque<long>::size_type nRightPos = nLeftPos - 1; while( nRightPos < nOldCount && nRight >= (*pOld)[ nRightPos ] ) nRightPos += 2; if( nRightPos < nLeftPos ) diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 41564f4108de..236e265e7d2d 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -448,7 +448,7 @@ void Outliner::SetText( const OUString& rText, Paragraph* pPara ) ( ImplGetOutlinerMode() == OutlinerMode::OutlineView ) ) { // Extract Tabs - sal_uInt16 nTabs = 0; + sal_Int32 nTabs = 0; while ( ( nTabs < aStr.getLength() ) && ( aStr[nTabs] == '\t' ) ) nTabs++; if ( nTabs ) @@ -457,7 +457,7 @@ void Outliner::SetText( const OUString& rText, Paragraph* pPara ) // Keep depth? (see Outliner::Insert) if( !(pPara->nFlags & ParaFlag::HOLDDEPTH) ) { - nCurDepth = nTabs-1; + nCurDepth = nTabs-1; //TODO: sal_Int32 -> sal_Int16! ImplCheckDepth( nCurDepth ); pPara->SetDepth( nCurDepth ); pPara->nFlags &= (~ParaFlag::HOLDDEPTH); |