summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-01-08 15:18:08 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-01-08 15:54:55 +0000
commit00205f178f4c1edfc2201fa298e7335ca3dd7b44 (patch)
treeb7fe6a5023ca0f8bbce4aa44e3ec846ce24b3dac /sd
parent5672dab6b59268cd8ce08752178d3f7564d5e8d7 (diff)
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
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/tools/PreviewRenderer.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index 4de09a10c1a6..b5f2b71f359e 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -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));