summaryrefslogtreecommitdiff
path: root/sd
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 /sd
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 'sd')
-rw-r--r--sd/source/ui/annotations/annotationwindow.cxx3
-rw-r--r--sd/source/ui/view/sdwindow.cxx3
2 files changed, 2 insertions, 4 deletions
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index 6d96fc1d26af..9a73e71c41c2 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -376,8 +376,7 @@ void AnnotationWindow::Rescale()
if ( mpMeta )
{
vcl::Font aFont( mpMeta->GetSettings().GetStyleSettings().GetFieldFont() );
- sal_Int32 nHeight = aFont.GetFontHeight();
- nHeight = nHeight * aMode.GetScaleY().GetNumerator() / aMode.GetScaleY().GetDenominator();
+ sal_Int32 nHeight = long(aFont.GetFontHeight() * aMode.GetScaleY());
aFont.SetFontHeight( nHeight );
mpMeta->SetControlFont( aFont );
}
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index e5cfc408c57a..c2972fa03db4 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -190,8 +190,7 @@ long Window::GetZoom() const
{
if( GetMapMode().GetScaleX().GetDenominator() )
{
- return GetMapMode().GetScaleX().GetNumerator() * 100L
- / GetMapMode().GetScaleX().GetDenominator();
+ return long(GetMapMode().GetScaleX() * 100);
}
else
{