summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-02-26 22:01:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-02-26 22:01:46 +0100
commit19403aef11a536e2ecb5589b87a94d3a345512ea (patch)
treedd838c8523aad72e626dae1b232ff83b8d9cec52 /drawinglayer
parenta407e4da6564d0ab316d7e0e4f4e876a798181d0 (diff)
loplugin:loopvartoosmall
Change-Id: I06d7d5d7cae13b9b1f62955f53407df8c9001f26
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx8
-rw-r--r--drawinglayer/source/primitive2d/metafileprimitive2d.cxx2
-rw-r--r--drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx14
3 files changed, 13 insertions, 11 deletions
diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
index 0164e4b9df97..7014dcf67cfc 100644
--- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
@@ -181,9 +181,13 @@ namespace drawinglayer
// check if buffering is complete
bool bBufferingComplete(true);
- for (sal_uInt32 a(0); bBufferingComplete && a < maBufferedPrimitives.size(); a++)
+ for (auto const & a: maBufferedPrimitives)
{
- bBufferingComplete = maBufferedPrimitives[a].is();
+ if (!a.is())
+ {
+ bBufferingComplete = false;
+ break;
+ }
}
if (bBufferingComplete)
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index f1d728bd5592..7a13ff76ae4c 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -3085,7 +3085,7 @@ namespace
// better to use this info
const MetaGradientExAction* pMetaGradientExAction = nullptr;
bool bDone(false);
- sal_uInt32 b(nAction + 1);
+ size_t b(nAction + 1);
for(; !bDone && b < nCount; b++)
{
diff --git a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx
index a53caf43e315..bc1465388e7f 100644
--- a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx
@@ -92,8 +92,6 @@ namespace drawinglayer
const basegfx::B3DRange& rRange,
const basegfx::B2DVector& rTextureSize)
{
- sal_uInt32 a;
-
// handle texture coordinates X
const bool bParallelX(css::drawing::TextureProjectionMode_PARALLEL == eModeX);
const bool bSphereX(!bParallelX && (css::drawing::TextureProjectionMode_SPHERE == eModeX));
@@ -105,9 +103,9 @@ namespace drawinglayer
if(bParallelX || bParallelY)
{
// apply parallel texture coordinates in X and/or Y
- for(a = 0; a < rFill.size(); a++)
+ for(auto & a: rFill)
{
- rFill[a] = basegfx::tools::applyDefaultTextureCoordinatesParallel(rFill[a], rRange, bParallelX, bParallelY);
+ a = basegfx::tools::applyDefaultTextureCoordinatesParallel(a, rRange, bParallelX, bParallelY);
}
}
@@ -116,9 +114,9 @@ namespace drawinglayer
// apply spherical texture coordinates in X and/or Y
const basegfx::B3DPoint aCenter(rRange.getCenter());
- for(a = 0; a < rFill.size(); a++)
+ for(auto & a: rFill)
{
- rFill[a] = basegfx::tools::applyDefaultTextureCoordinatesSphere(rFill[a], aCenter, bSphereX, bSphereY);
+ a = basegfx::tools::applyDefaultTextureCoordinatesSphere(a, aCenter, bSphereX, bSphereY);
}
}
@@ -126,9 +124,9 @@ namespace drawinglayer
basegfx::B2DHomMatrix aTexMatrix;
aTexMatrix.scale(rTextureSize.getX(), rTextureSize.getY());
- for(a = 0; a < rFill.size(); a++)
+ for(auto & a: rFill)
{
- rFill[a].transformTextureCoordinates(aTexMatrix);
+ a.transformTextureCoordinates(aTexMatrix);
}
}