summaryrefslogtreecommitdiff
path: root/svtools/source/brwbox
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-13 10:16:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-13 15:47:04 +0200
commit158434ee87cfff8870f7c411f435ad46782ab818 (patch)
tree8e3b6fb6d6986318454760b3f8224763d8cad648 /svtools/source/brwbox
parent1b1afc10f4d90e37c5e81961b8b8902133e65b00 (diff)
no need to call GetNumerator() / GetDenominator() for Fraction
simplify the calculations - why have a Fraction and then just split it up for the calculation? Change-Id: I81af95e1ee1633f77e088c0990f308b1c169a6a2 Reviewed-on: https://gerrit.libreoffice.org/42242 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source/brwbox')
-rw-r--r--svtools/source/brwbox/datwin.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index c47e69729ffe..1fa89d1ca296 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -167,10 +167,7 @@ void BrowserColumn::Draw( BrowseBox const & rBox, OutputDevice& rDev, const Poin
void BrowserColumn::ZoomChanged(const Fraction& rNewZoom)
{
- double n = (double)_nOriginalWidth;
- n *= (double)rNewZoom.GetNumerator();
- n /= (double)rNewZoom.GetDenominator();
-
+ double n(_nOriginalWidth * rNewZoom);
_nWidth = n>0 ? (long)(n+0.5) : -(long)(-n+0.5);
}