diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-08-03 13:05:24 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-08-03 21:57:23 +0200 |
commit | 81302f33073e7629d724ed269f1fa21dad29e141 (patch) | |
tree | 59c1a5422fee301751c170e6ea24a3ca9b0caddc /sd/source/ui/func/fusel.cxx | |
parent | 83b25e4b9fa8f95c24759a64f8cb9716ee34a4a3 (diff) |
Move angle normalization code from various places to tools
Also rename svx angle normalization functions in include/svx/svdtrans.hxx, that
deal with 100ths of degree, to avoid confusion: NormAngle180 -> NormAngle18000;
NormAngle360 -> NormAngle36000.
Some places were fixed that previously returned inclusive ranges (i.e., both 0
and 360), see changes in these files:
chart2/source/view/main/PlottingPositionHelper.cxx
chart2/source/view/main/PolarLabelPositionHelper.cxx
chart2/source/view/main/ShapeFactory.cxx
filter/source/graphicfilter/idxf/dxf2mtf.cxx
sw/source/core/graphic/grfatr.cxx
(the latter now matches the comment in the function).
Change-Id: I9f274bbb4168360d60dceff02aeba6332c519a59
Reviewed-on: https://gerrit.libreoffice.org/58556
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sd/source/ui/func/fusel.cxx')
-rw-r--r-- | sd/source/ui/func/fusel.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 84fcea47cbec..c934d50c3b6f 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -178,7 +178,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) long nAngle0 = GetAngle(aMDPos - mpView->GetRef1()); nAngle0 -= 27000; - nAngle0 = NormAngle360(nAngle0); + nAngle0 = NormAngle36000(nAngle0); bMirrorSide0 = nAngle0 < 18000; if (!pHdl && mpView->Is3DRotationCreationActive()) @@ -740,7 +740,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) **********************************************************/ long nAngle1 = GetAngle(aPnt - mpView->GetRef1()); nAngle1 -= 27000; - nAngle1 = NormAngle360(nAngle1); + nAngle1 = NormAngle36000(nAngle1); bool bMirrorSide1 = nAngle1 < 18000; if (bMirrorSide0 != bMirrorSide1) |