[Libreoffice-commits] core.git: svx/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 4 06:47:08 UTC 2021


 svx/source/svdraw/svddrgmt.cxx |   32 ++++++++++++++++----------------
 svx/source/svdraw/svdocirc.cxx |   10 +++++-----
 svx/source/svdraw/svdtrans.cxx |    6 +++---
 3 files changed, 24 insertions(+), 24 deletions(-)

New commits:
commit 2c9708cbb870483a8a1c93d722085be5f789d234
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sun Jan 3 20:35:18 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Jan 4 07:46:28 2021 +0100

    Wink -> Angle
    
    Change-Id: Ia4a191eafef3de205114671253ce485780e7dde1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108642
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 59381718eb22..cb07133b8390 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -3136,59 +3136,59 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt)
     if (bValid)
     {
         double a=0; // slope of the radius
-        Degree100 nPntWink(0);
+        Degree100 nPntAngle(0);
 
         if (bVertical)
         {
             a=static_cast<double>(dy1)/static_cast<double>(dx1); // slope of the radius
             nNewRad=(static_cast<tools::Long>(dy1*a)+dx1) /2;
             aNewCenter.AdjustX(nNewRad );
-            nPntWink=GetAngle(aPnt-aNewCenter);
+            nPntAngle=GetAngle(aPnt-aNewCenter);
         }
         else
         {
             a=static_cast<double>(dx1)/static_cast<double>(dy1); // slope of the radius
             nNewRad=(static_cast<tools::Long>(dx1*a)+dy1) /2;
             aNewCenter.AdjustY(nNewRad );
-            nPntWink=GetAngle(aPnt-aNewCenter)-9000_deg100;
+            nPntAngle=GetAngle(aPnt-aNewCenter)-9000_deg100;
         }
 
         if (!bAtCenter)
         {
             if (nNewRad<0)
             {
-                if (bRgt) nPntWink += 18000_deg100;
-                if (bLft) nPntWink = 18000_deg100 - nPntWink;
-                if (bLwr) nPntWink =- nPntWink;
+                if (bRgt) nPntAngle += 18000_deg100;
+                if (bLft) nPntAngle = 18000_deg100 - nPntAngle;
+                if (bLwr) nPntAngle =- nPntAngle;
             }
             else
             {
-                if (bRgt) nPntWink = -nPntWink;
-                if (bUpr) nPntWink = 18000_deg100 - nPntWink;
-                if (bLwr) nPntWink += 18000_deg100;
+                if (bRgt) nPntAngle = -nPntAngle;
+                if (bUpr) nPntAngle = 18000_deg100 - nPntAngle;
+                if (bLwr) nPntAngle += 18000_deg100;
             }
 
-            nPntWink=NormAngle36000(nPntWink);
+            nPntAngle=NormAngle36000(nPntAngle);
         }
         else
         {
-            if (nNewRad<0) nPntWink += 18000_deg100;
-            if (bVertical) nPntWink = 18000_deg100 - nPntWink;
-            nPntWink = NormAngle18000(nPntWink);
-            nPntWink = abs(nPntWink);
+            if (nNewRad<0) nPntAngle += 18000_deg100;
+            if (bVertical) nPntAngle = 18000_deg100 - nPntAngle;
+            nPntAngle = NormAngle18000(nPntAngle);
+            nPntAngle = abs(nPntAngle);
         }
 
         double nCircumference = 2 * std::abs(nNewRad) * M_PI;
 
         if (bResize)
         {
-            tools::Long nMul=static_cast<tools::Long>(nCircumference * NormAngle36000(nPntWink).get() / 36000.0);
+            tools::Long nMul=static_cast<tools::Long>(nCircumference * NormAngle36000(nPntAngle).get() / 36000.0);
 
             if (bAtCenter)
                 nMul*=2;
 
             aNewFract=Fraction(nMul,nMarkSize);
-            nAngle=nPntWink;
+            nAngle=nPntAngle;
         }
         else
         {
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index 983adc4391a3..ea000f66f5ca 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -141,13 +141,13 @@ SdrCircObj::SdrCircObj(
     SdrModel& rSdrModel,
     SdrCircKind eNewKind,
     const tools::Rectangle& rRect,
-    Degree100 nNewStartWink,
-    Degree100 nNewEndWink)
+    Degree100 nNewStartAngle,
+    Degree100 nNewEndAngle)
 :   SdrRectObj(rSdrModel, rRect)
 {
-    Degree100 nAngleDif=nNewEndWink-nNewStartWink;
-    nStartAngle=NormAngle36000(nNewStartWink);
-    nEndAngle=NormAngle36000(nNewEndWink);
+    Degree100 nAngleDif=nNewEndAngle-nNewStartAngle;
+    nStartAngle=NormAngle36000(nNewStartAngle);
+    nEndAngle=NormAngle36000(nNewEndAngle);
     if (nAngleDif==36000_deg100) nEndAngle+=nAngleDif; // full circle
     meCircleKind=eNewKind;
     bClosedObj=eNewKind!=SdrCircKind::Arc;
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index 17106eec68bd..6025dee157a3 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -123,10 +123,10 @@ void MirrorPoint(Point& rPnt, const Point& rRef1, const Point& rRef2)
         rPnt.setY(rRef1.Y()-dx1 );
     } else { // arbitrary axis
         // TODO: Optimize this! Raise perpendicular on the mirroring axis..?
-        Degree100 nRefWink=GetAngle(rRef2-rRef1);
+        Degree100 nRefAngle=GetAngle(rRef2-rRef1);
         rPnt-=rRef1;
-        Degree100 nPntWink=GetAngle(rPnt);
-        Degree100 nAngle=2_deg100*(nRefWink-nPntWink);
+        Degree100 nPntAngle=GetAngle(rPnt);
+        Degree100 nAngle=2_deg100*(nRefAngle-nPntAngle);
         double a = nAngle.get() * F_PI18000;
         double nSin=sin(a);
         double nCos=cos(a);


More information about the Libreoffice-commits mailing list