editeng/source/editeng/editdbg.cxx   |    5 ++---
 editeng/source/editeng/impedit4.cxx  |    5 ++---
 editeng/source/misc/svxacorr.cxx     |    4 ++--
 editeng/source/misc/txtrange.cxx     |   12 ++++++------
 editeng/source/outliner/outliner.cxx |    4 ++--
 5 files changed, 14 insertions(+), 16 deletions(-)

New commits:
commit e46c717b0b8cd9be060b31debb54ba82ac7e5b9d
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue Mar 7 19:50:17 2017 +0100

    loplugin:loopvartoosmall
    
    Change-Id: I7c962d91f5c54fa188594174c14ab1d0b1bc6963

diff --git a/editeng/source/editeng/editdbg.cxx 
b/editeng/source/editeng/editdbg.cxx
index c5c87a9..a1bd2c8 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 80cfabf..53fe083 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 dbf222d..893f812 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 10bcbe5..afa88b5 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 41564f4..236e265 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);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to