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-29 11:57:19 +0200
commit5492445d47b98027fc47e0d246bfae64951d4bf8 (patch)
treecadf381923b81b1373fe623b9d050b141b131669
parentf2b5c899cf29451fbf0b40827bc40d6f1f5af084 (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;