Kaydet (Commit) 2ec9d9dd authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: tdf#90228 1.06 turns into a monster

Change-Id: I8ebb57fe8b94da2569593ffa7cf374cae64a846a
üst 026b17b7
...@@ -2331,8 +2331,9 @@ void VCLXWindow::setZoom( float fZoomX, float /*fZoomY*/ ) throw(::com::sun::sta ...@@ -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 // 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. // 1.200000000047something. To prevent this, we convert explicitly to double, and round it.
double nZoom( fZoomX ); double nZoom( fZoomX );
nZoom = ::rtl::math::round( nZoom, 4 ); Fraction aZoom(::rtl::math::round(nZoom, 4));
GetWindow()->SetZoom( Fraction( nZoom ) ); aZoom.ReduceInaccurate(10); // to avoid runovers and BigInt mapping
GetWindow()->SetZoom(aZoom);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment