summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-08 11:01:32 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-03-08 11:01:32 +0100
commit6412b9c5dd10af511cc255a952be4b18a25ab9a8 (patch)
tree66eb7ad4d2a7f2fe351d8c5b5c56658ef825eb4c /svtools
parent6271381baa0d2db257070cb7ecfc9abf89faaf0f (diff)
loplugin:loopvartoosmall
Change-Id: If76fa042462897735d0d67341a3734b8cfced12c
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/svimpbox.cxx2
-rw-r--r--svtools/source/control/ruler.cxx6
-rw-r--r--svtools/source/graphic/grfmgr.cxx5
-rw-r--r--svtools/source/graphic/grfmgr2.cxx11
-rw-r--r--svtools/source/misc/langtab.cxx2
5 files changed, 13 insertions, 13 deletions
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index b25a5a068851..fb3c17827bee 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -1331,7 +1331,7 @@ void SvImpLBox::FillView()
{
sal_uInt16 nLast = (sal_uInt16)(pView->GetVisiblePos(pView->LastVisible()));
sal_uInt16 nThumb = (sal_uInt16)(pView->GetVisiblePos( pStartEntry ));
- sal_uInt16 nCurDispEntries = nLast-nThumb+1;
+ sal_uLong nCurDispEntries = nLast-nThumb+1;
if( nCurDispEntries < nVisibleCount )
{
ShowCursor( false );
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index aaaca43a0e54..b8a027a8949e 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -688,9 +688,8 @@ void Ruler::ImplDrawBorders(vcl::RenderContext& rRenderContext, long nMin, long
long n2;
long nTemp1;
long nTemp2;
- sal_uInt32 i;
- for (i = 0; i < mpData->pBorders.size(); i++)
+ for (std::vector<RulerBorder>::size_type i = 0; i < mpData->pBorders.size(); i++)
{
if (mpData->pBorders[i].nStyle & RulerBorderStyle::Invisible)
continue;
@@ -793,14 +792,13 @@ void Ruler::ImplDrawIndent(vcl::RenderContext& rRenderContext, const tools::Poly
void Ruler::ImplDrawIndents(vcl::RenderContext& rRenderContext, long nMin, long nMax, long nVirTop, long nVirBottom)
{
- sal_uInt32 j;
long n;
long nIndentHeight = (mnVirHeight / 2) - 1;
long nIndentWidth2 = nIndentHeight-3;
tools::Polygon aPoly(5);
- for (j = 0; j < mpData->pIndents.size(); j++)
+ for (std::vector<RulerIndent>::size_type j = 0; j < mpData->pIndents.size(); j++)
{
if (mpData->pIndents[j].bInvisible)
continue;
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index f315955f53b3..3225cdb186fd 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -805,10 +805,9 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo
// #105641# Also crop animations
if( aTransGraphic.IsAnimated() )
{
- sal_uInt16 nFrame;
Animation aAnim( aTransGraphic.GetAnimation() );
- for( nFrame=0; nFrame<aAnim.Count(); ++nFrame )
+ for( size_t nFrame=0; nFrame<aAnim.Count(); ++nFrame )
{
AnimationBitmap aAnimBmp( aAnim.Get( nFrame ) );
@@ -852,7 +851,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo
Point aPosOffset( aCropLeftTop.Width() < 0 ? -aCropLeftTop.Width() : 0,
aCropLeftTop.Height() < 0 ? -aCropLeftTop.Height() : 0 );
- for( nFrame=0; nFrame<aAnim.Count(); ++nFrame )
+ for( size_t nFrame=0; nFrame<aAnim.Count(); ++nFrame )
{
AnimationBitmap aAnimBmp( aAnim.Get( nFrame ) );
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index fda6832a7db9..68ade89842db 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -199,7 +199,7 @@ void GraphicManager::ImplCheckSizeOfSwappedInGraphics(const GraphicObject* pGrap
// sort by DataChangeTimeStamp so that the oldest get removed first
std::sort(aCandidates.begin(), aCandidates.end(), simpleSortByDataChangeTimeStamp());
- for(sal_uInt32 a(0); mnUsedSize >= nMaxCacheSize && a < aCandidates.size(); a++)
+ for(decltype(aCandidates)::size_type a(0); mnUsedSize >= nMaxCacheSize && a < aCandidates.size(); a++)
{
// swap out until we have no more or the goal to use less than nMaxCacheSize
// is reached
@@ -332,12 +332,12 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
double fRevScaleY;
bool scaleByAveraging = false;
- int x,y;
if(aBitmapWidth > 1 && aUnrotatedWidth > 1)
{
fRevScaleX = (double) ( aBitmapWidth - 1 ) / (double)( aUnrotatedWidth - 1 );
// create horizontal mapping table
+ long x;
for( x = 0, nTmpX = aBitmapWidth - 1L, nTmp = aBitmapWidth - 2L >= 0 ? aBitmapWidth -2L : 0L; x < aUnrotatedWidth; x++ )
{
fTmp = x * fRevScaleX;
@@ -355,7 +355,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
if(aBitmapWidth == 1)
{
fRevScaleX = 1.0 / (double)( aUnrotatedWidth );
- for ( x = 0; x < aUnrotatedWidth ; x++)
+ for ( long x = 0; x < aUnrotatedWidth ; x++)
{
pMapIX[x] = 0;
pMapFX[x] = 0;
@@ -376,6 +376,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
{
fRevScaleY = (double) ( aBitmapHeight - 1 ) / (double)( aUnrotatedHeight - 1 );
// create vertical mapping table
+ long y;
for( y = 0, nTmpY = aBitmapHeight - 1L, nTmp = aBitmapHeight - 2L >= 0 ? aBitmapHeight - 2L : 0L; y < aUnrotatedHeight; y++ )
{
fTmp = y * fRevScaleY;
@@ -393,7 +394,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
if(aBitmapHeight == 1)
{
fRevScaleY = 1.0 / (double)( aUnrotatedHeight);
- for (y = 0; y < aUnrotatedHeight; ++y)
+ for (long y = 0; y < aUnrotatedHeight; ++y)
{
pMapIY[y] = 0;
pMapFY[y] = 0;
@@ -433,6 +434,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
Rectangle aNewBound( aPoly.GetBoundRect() );
// create horizontal mapping table
+ long x;
for( x = 0, nTmpX = aNewBound.Left() + nStartX; x < aTargetWidth; x++ )
{
pCosX[ x ] = FRound( fCosAngle * ( fTmp = nTmpX++ << 8 ) );
@@ -440,6 +442,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
}
// create vertical mapping table
+ long y;
for( y = 0, nTmpY = aNewBound.Top() + nStartY; y < aTargetHeight; y++ )
{
pCosY[ y ] = FRound( fCosAngle * ( fTmp = nTmpY++ << 8 ) );
diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx
index 272f8edf3fc6..1c303f9fb72b 100644
--- a/svtools/source/misc/langtab.cxx
+++ b/svtools/source/misc/langtab.cxx
@@ -82,7 +82,7 @@ const OUString ApplyLreOrRleEmbedding( const OUString &rText )
// Thus we can avoid to check every character of the text.
bool bFound = false;
bool bIsRtlText = false;
- for (sal_uInt16 i = 0; i < nLen && !bFound; ++i)
+ for (sal_Int32 i = 0; i < nLen && !bFound; ++i)
{
sal_Int16 nDirection = rCharClass.getCharacterDirection( rText, i );
switch (nDirection)