summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-06-20 11:07:33 +0100
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-07-01 09:19:34 +0200
commit76e2b5aaf3d1715f0f7eefe00f1dfb6a54ed1ced (patch)
tree11b4dede24e5a8628f46ac28ea99b2e5ab89bc0d
parent6b833fe6151b00e8f112c000380442a05d654475 (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.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index a145a07a07ca..eb5814485f4b 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -301,6 +301,11 @@ 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) );
+ SetMapMode( aMapMode );
Paint( rRect, this );
}