summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-08-28 22:46:03 +0200
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-08-30 21:37:18 +0200
commitb8b0bc543f2de0ef66d9550ee75853bff1e919fa (patch)
tree6d2e55858188aef14f444add68e4e8d1e658dd64
parentf4bf6baa0ba6f01e2aa28593cc61e9165a957d8c (diff)
Only set outdev origin for tiled rendering.
Change-Id: Iec3e438867a94ec3465474f7b830275373c72bd3
-rw-r--r--sc/source/ui/view/gridwin4.cxx20
1 files changed, 15 insertions, 5 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 38f1be230648..4565c9f55f88 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -464,7 +464,14 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
}
MapMode aPixelMapMode = MapMode( MAP_PIXEL );
- aPixelMapMode.SetOrigin( pOutDev->GetMapMode().GetOrigin() );
+ // We should only fiddle with the origin for tiled rendering (as it is set to
+ // something otherwise useful for normal rendering).
+ // Perhaps it would be better to instead pass in the desired origin to set for tiled
+ // rendering?
+ if ( pOutDev != this )
+ {
+ aPixelMapMode.SetOrigin( pOutDev->GetMapMode().GetOrigin() );
+ }
ScModule* pScMod = SC_MOD();
bool bTextWysiwyg = pScMod->GetInputOptions().GetTextWysiwyg();
@@ -651,10 +658,13 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
}
// define drawing layer map mode and paint rectangle
- MapMode aDrawMode = pViewData->GetPaintMapMode();
- Point aOrigin = aPixelMapMode.GetOrigin();
- aDrawMode.SetMapUnit( MAP_100TH_MM );
- aDrawMode.SetOrigin( pOutDev->PixelToLogic( aOrigin, aDrawMode ) );
+ MapMode aDrawMode = GetDrawMapMode();
+ if ( pOutDev != this )
+ {
+ Point aOrigin = aPixelMapMode.GetOrigin();
+ aDrawMode.SetMapUnit( MAP_100TH_MM );
+ aDrawMode.SetOrigin( pOutDev->PixelToLogic( aOrigin, aDrawMode ) );
+ }
Rectangle aDrawingRectLogic;