summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-08 11:01:32 +0100
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2017-12-05 08:17:47 -0500
commit31997f54ed2652a5401f8c7e7026eb83316604e8 (patch)
treeb524a51ad28b240ef65438c8785900a8434a8d3e /svtools
parent4ffee8f4532cc561cd0c717b4bd6e52a99f5c43d (diff)
loplugin:loopvartoosmall
Change-Id: If76fa042462897735d0d67341a3734b8cfced12c (cherry picked from commit 6412b9c5dd10af511cc255a952be4b18a25ab9a8) (cherry picked from commit 3f447f4a613dc692f4775b2d8988711213b01b42)
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 b5355525ee6d..a0f4b8e65165 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 e2a78c16c971..1561a01706f8 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -697,9 +697,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;
@@ -802,14 +801,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 c452101e8929..a7c9278409d0 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 87d7fb4e5d29..16df489d81a7 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)