summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-03-31 13:36:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-03-31 13:38:02 +0100
commit2ec9d9dd81f3f4ee6785ba938f9a79395972b71e (patch)
tree761913eeff6c11f849642e6a1651f5b78ee71b9d
parent026b17b7d725109f586622755b435ded3673c43a (diff)
Resolves: tdf#90228 1.06 turns into a monster
Change-Id: I8ebb57fe8b94da2569593ffa7cf374cae64a846a
-rw-r--r--toolkit/source/awt/vclxwindow.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 5e53141995e2..588641713110 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -2331,8 +2331,9 @@ void VCLXWindow::setZoom( float fZoomX, float /*fZoomY*/ ) throw(::com::sun::sta
// The implicit conversion from float to double can result in a precision loss, i.e. 1.2 is converted to
// 1.200000000047something. To prevent this, we convert explicitly to double, and round it.
double nZoom( fZoomX );
- nZoom = ::rtl::math::round( nZoom, 4 );
- GetWindow()->SetZoom( Fraction( nZoom ) );
+ Fraction aZoom(::rtl::math::round(nZoom, 4));
+ aZoom.ReduceInaccurate(10); // to avoid runovers and BigInt mapping
+ GetWindow()->SetZoom(aZoom);
}
}