summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-08-11 09:17:56 +0200
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-08-11 09:17:56 +0200
commit373d18fbed8d439317a292ffab26b06bc12f71b7 (patch)
tree2c11ba3c6a5be709b214b3c74f0aa15d352496fa
parent8a6ee4b5c0954fea6b95213ee45de13336fa0caf (diff)
Set correct scaling for normal painting.
As we no longer read the scaling from the viewdata, we should instead set it on the output device when doing normal rendering. However the grid still doesn't exactly match the external axes yet, there are probably more rounding errors wherever they are painted. Change-Id: I25b1bd9b344115578fe892aa94fbf753a3c10c81
-rw-r--r--sc/source/ui/view/gridwin4.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 85b2c6166386..4576f404aff3 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -301,6 +301,12 @@ void ScGridWindow::PrePaint()
void ScGridWindow::Paint( const Rectangle& rRect )
{
+ MapMode aMapMode( GetMapMode() );
+ aMapMode.SetMapUnit( MAP_TWIP );
+ aMapMode.SetScaleX( pViewData->GetZoomX() * Fraction(0.96) );
+ aMapMode.SetScaleY( pViewData->GetZoomY() * Fraction(0.96) );
+ maPaintMapMode = aMapMode;
+// SetMapMode( aMapMode );
Paint( rRect, this );
}