Kaydet (Commit) 00205f17 authored tarafından Caolán McNamara's avatar Caolán McNamara

Fraction fiasco: avoid assert on clicking "master pages" in impress sidebar

avoids the dread assert in vcl wrt. "detect overflows" in ImplLogicToPixel of
vcl/source/outdev/map.cxx but the whole thing looks a nightmare if a high
precision double is given as an arg to Fraction and the underlying boost foo
uses longs longer than 32bits to represent that.

Change-Id: Ia0fa911cf07ed613e0b1bbd97b63a291f29628cb
üst 5672dab6
......@@ -171,9 +171,9 @@ Image PreviewRenderer::RenderSubstitution (
// visible.
MapMode aMapMode (mpPreviewDevice->GetMapMode());
aMapMode.SetMapUnit(MAP_100TH_MM);
const double nFinalScale (25.0 * rPreviewPixelSize.Width() / 28000.0);
aMapMode.SetScaleX(nFinalScale);
aMapMode.SetScaleY(nFinalScale);
Fraction aFinalScale(25 * rPreviewPixelSize.Width(), 28000);
aMapMode.SetScaleX(aFinalScale);
aMapMode.SetScaleY(aFinalScale);
const sal_Int32 nFrameWidth (mbHasFrame ? snFrameWidth : 0);
aMapMode.SetOrigin(mpPreviewDevice->PixelToLogic(
Point(nFrameWidth,nFrameWidth),aMapMode));
......
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