summaryrefslogtreecommitdiff
path: root/svx/source/dialog/dlgctl3d.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-08-03 13:05:24 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-08-03 21:57:23 +0200
commit81302f33073e7629d724ed269f1fa21dad29e141 (patch)
tree59c1a5422fee301751c170e6ea24a3ca9b0caddc /svx/source/dialog/dlgctl3d.cxx
parent83b25e4b9fa8f95c24759a64f8cb9716ee34a4a3 (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 'svx/source/dialog/dlgctl3d.cxx')
-rw-r--r--svx/source/dialog/dlgctl3d.cxx11
1 files changed, 2 insertions, 9 deletions
diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx
index 9f96d6277866..1e6fa863c638 100644
--- a/svx/source/dialog/dlgctl3d.cxx
+++ b/svx/source/dialog/dlgctl3d.cxx
@@ -37,6 +37,7 @@
#include <helpids.h>
#include <algorithm>
#include <svx/dialmgr.hxx>
+#include <tools/helpers.hxx>
#include <vcl/settings.hxx>
using namespace com::sun::star;
@@ -671,15 +672,7 @@ void Svx3DLightControl::Tracking( const TrackingEvent& rTEvt )
double fNewPosVer = mfSaveActionStartVer - static_cast<double>(aDeltaPos.Y());
// cut horizontal
- while(fNewPosHor < 0.0)
- {
- fNewPosHor += 360.0;
- }
-
- while(fNewPosHor >= 360.0)
- {
- fNewPosHor -= 360.0;
- }
+ fNewPosHor = NormAngle360(fNewPosHor);
// cut vertical
if(fNewPosVer < -90.0)