diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-13 10:20:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-13 15:46:47 +0200 |
commit | 1b1afc10f4d90e37c5e81961b8b8902133e65b00 (patch) | |
tree | fb6f68d743b334b8df4fc374afe68dc49fd6cbb8 /chart2 | |
parent | cc233992dfe0fa9732c24774852d037d161546ce (diff) |
Fraction: make conversion operators and constructor explicit
and simplify some of the calculations that needed to be changed.
Which resulted in one unit test needing to change by one pixel,
let's hope not an indication of a real problem.
Change-Id: Ie56434f35f4e58d21ee6f671392e93dc7542fca3
Reviewed-on: https://gerrit.libreoffice.org/42240
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/main/ChartWindow.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx index 1b5ffa817373..c0f9d242610c 100644 --- a/chart2/source/controller/main/ChartWindow.cxx +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -343,8 +343,8 @@ void ChartWindow::LogicInvalidate(const tools::Rectangle* pRectangle) if (pEditWin) { MapMode aCWMapMode = GetMapMode(); - double fXScale = aCWMapMode.GetScaleX(); - double fYScale = aCWMapMode.GetScaleY(); + double fXScale( aCWMapMode.GetScaleX() ); + double fYScale( aCWMapMode.GetScaleY() ); if (!IsMapModeEnabled()) { @@ -410,8 +410,8 @@ tools::Rectangle ChartWindow::GetBoundingBox() // In all cases, the following code fragment // returns the chart bounding box in twips. MapMode aCWMapMode = GetMapMode(); - double fXScale = aCWMapMode.GetScaleX(); - double fYScale = aCWMapMode.GetScaleY(); + double fXScale( aCWMapMode.GetScaleX() ); + double fYScale( aCWMapMode.GetScaleY() ); Point aOffset = GetOffsetPixelFrom(*pRootWin); aOffset.X() *= (TWIPS_PER_PIXEL / fXScale); aOffset.Y() *= (TWIPS_PER_PIXEL / fYScale); |