summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-26 21:29:59 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-27 09:01:50 +0000
commitb602313ab871da31da4ca3a25cc2f84c12efb65e (patch)
tree915fb06b6c50546f5a2f571e5ec920335fa67487 /svtools/source
parent777a15db74a48ec5341e5b835240db3050605649 (diff)
tweak the scoping here a little
Change-Id: Idb257e3aee7d3f0316f34d34866eb2484390a798
Diffstat (limited to 'svtools/source')
-rw-r--r--svtools/source/graphic/grfmgr2.cxx18
1 files changed, 7 insertions, 11 deletions
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index f71c67a31a30..7ef820eabbeb 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -1723,10 +1723,6 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
// been generated
ImplTileInfo aTileInfo;
- // current output position while drawing
- Point aCurrPos;
- int nX, nY;
-
// check for recursion's end condition: LSB place reached?
if( nMSBFactor == 1 )
{
@@ -1768,9 +1764,9 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
{
// now fill one row from aTileInfo.aNextTileTopLeft.X() all
// the way to the right
- aCurrPos.X() = aTileInfo.aNextTileTopLeft.X();
- aCurrPos.Y() = aTileInfo.aTileTopLeft.Y();
- for( nX=0; nX < aTileInfo.nTilesEmptyX; nX += nMSBFactor )
+ // current output position while drawing
+ Point aCurrPos(aTileInfo.aNextTileTopLeft.X(), aTileInfo.aTileTopLeft.Y());
+ for (int nX=0; nX < aTileInfo.nTilesEmptyX; nX += nMSBFactor)
{
if( !aTmpGraphic.Draw( &rVDev, aCurrPos, aTileInfo.aTileSizePixel, pAttr, nFlags ) )
return false;
@@ -1791,7 +1787,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
// the way to the bottom
aCurrPos.X() = aTileInfo.aTileTopLeft.X();
aCurrPos.Y() = aTileInfo.aNextTileTopLeft.Y();
- for( nY=0; nY < aTileInfo.nTilesEmptyY; nY += nMSBFactor )
+ for (int nY=0; nY < aTileInfo.nTilesEmptyY; nY += nMSBFactor)
{
if( !aTmpGraphic.Draw( &rVDev, aCurrPos, aTileInfo.aTileSizePixel, pAttr, nFlags ) )
return false;
@@ -1838,18 +1834,18 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
rTileInfo.nTilesEmptyY = aTileInfo.nTilesEmptyY - nRemainderTilesY;
// init output position
- aCurrPos = aTileInfo.aNextTileTopLeft;
+ Point aCurrPos = aTileInfo.aNextTileTopLeft;
// fill our drawing area. Fill possibly more, to create the next
// bigger tile size -> see bitmap extraction above. This does no
// harm, since everything right or below our actual area is
// overdrawn by our caller. Just in case we're in the last level,
// we don't draw beyond the right or bottom border.
- for( nY=0; nY < aTileInfo.nTilesEmptyY && nY < nExponent*nMSBFactor; nY += nMSBFactor )
+ for (int nY=0; nY < aTileInfo.nTilesEmptyY && nY < nExponent*nMSBFactor; nY += nMSBFactor)
{
aCurrPos.X() = aTileInfo.aNextTileTopLeft.X();
- for( nX=0; nX < aTileInfo.nTilesEmptyX && nX < nExponent*nMSBFactor; nX += nMSBFactor )
+ for (int nX=0; nX < aTileInfo.nTilesEmptyX && nX < nExponent*nMSBFactor; nX += nMSBFactor)
{
if( bNoFirstTileDraw )
bNoFirstTileDraw = false; // don't draw first tile position