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

Noel (via logerrit) logerrit at kemper.freedesktop.org
Tue Dec 22 09:49:15 UTC 2020


 include/svx/svdtrans.hxx                              |    8 ++--
 svx/source/customshapes/EnhancedCustomShape2d.cxx     |    4 +-
 svx/source/customshapes/EnhancedCustomShapeEngine.cxx |    8 ++--
 svx/source/sdr/misc/ImageMapInfo.cxx                  |    5 +--
 svx/source/svdraw/svdedtv2.cxx                        |    6 +--
 svx/source/svdraw/svdoashp.cxx                        |   22 ++++++-------
 svx/source/svdraw/svdocirc.cxx                        |   30 +++++++++---------
 svx/source/svdraw/svdograf.cxx                        |    4 +-
 svx/source/svdraw/svdopath.cxx                        |    4 +-
 svx/source/svdraw/svdorect.cxx                        |   24 +++++++-------
 svx/source/svdraw/svdotext.cxx                        |   24 +++++++-------
 svx/source/svdraw/svdotxat.cxx                        |    2 -
 svx/source/svdraw/svdotxdr.cxx                        |   12 +++----
 svx/source/svdraw/svdotxed.cxx                        |    2 -
 svx/source/svdraw/svdotxtr.cxx                        |    4 +-
 svx/source/svdraw/svdouno.cxx                         |    6 +--
 svx/source/svdraw/svdtrans.cxx                        |   20 ++++++------
 svx/source/tbxctrls/grafctrl.cxx                      |    8 ++--
 18 files changed, 97 insertions(+), 96 deletions(-)

New commits:
commit 0be815619691728b41463e935bd6b3faf64ff0e2
Author:     Noel <noel.grandin at collabora.co.uk>
AuthorDate: Tue Dec 22 10:40:27 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Dec 22 10:48:31 2020 +0100

    rename members of GeoStat class
    
    to make it obvious what they are used for.
    
    Change-Id: I8ed825ea0131faa969fa3fd69cd64d195ef61b6b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108145
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/svx/svdtrans.hxx b/include/svx/svdtrans.hxx
index e510f6bc4140..a5bd1e640bbf 100644
--- a/include/svx/svdtrans.hxx
+++ b/include/svx/svdtrans.hxx
@@ -215,11 +215,11 @@ class GeoStat { // Geometric state for a rect
 public:
     tools::Long     nRotationAngle;
     tools::Long     nShearAngle;
-    double   nTan;      // tan(nShearAngle)
-    double   nSin;      // sin(nRotationAngle)
-    double   nCos;      // cos(nRotationAngle)
+    double   mfTanShearAngle;      // tan(nShearAngle)
+    double   mfSinRotationAngle;   // sin(nRotationAngle)
+    double   mfCosRotationAngle;   // cos(nRotationAngle)
 
-    GeoStat(): nRotationAngle(0),nShearAngle(0),nTan(0.0),nSin(0.0),nCos(1.0) {}
+    GeoStat(): nRotationAngle(0),nShearAngle(0),mfTanShearAngle(0.0),mfSinRotationAngle(0.0),mfCosRotationAngle(1.0) {}
     void RecalcSinCos();
     void RecalcTan();
 };
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index bf4832585c54..fb8fce63bc61 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -1167,7 +1167,7 @@ bool EnhancedCustomShape2d::GetHandlePosition( const sal_uInt32 nIndex, Point& r
             const GeoStat aGeoStat(mrSdrObjCustomShape.GetGeoStat());
             if ( aGeoStat.nShearAngle )
             {
-                double nTan = aGeoStat.nTan;
+                double nTan = aGeoStat.mfTanShearAngle;
                 if (bFlipV != bFlipH)
                     nTan = -nTan;
                 ShearPoint( rReturnPosition, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), nTan );
@@ -1494,7 +1494,7 @@ bool EnhancedCustomShape2d::SetHandleControllerPosition( const sal_uInt32 nIndex
             const GeoStat aGeoStat(mrSdrObjCustomShape.GetGeoStat());
             if ( aGeoStat.nShearAngle )
             {
-                double nTan = -aGeoStat.nTan;
+                double nTan = -aGeoStat.mfTanShearAngle;
                 if (bFlipV != bFlipH)
                     nTan = -nTan;
                 ShearPoint( aP, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), nTan );
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index 15b7cd41aa44..bca7c5bea8b2 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -215,8 +215,8 @@ std::unique_ptr<SdrObject, SdrObjectFreeOp> EnhancedCustomShapeEngine::ImplForce
                 pTextObj->NbcRotate(
                     rSdrObjCustomShape.GetSnapRect().Center(),
                     rSourceGeo.nRotationAngle,
-                    rSourceGeo.nSin,
-                    rSourceGeo.nCos);
+                    rSourceGeo.mfSinRotationAngle,
+                    rSourceGeo.mfCosRotationAngle);
             }
 
             // set modified ItemSet at text object
@@ -317,7 +317,7 @@ Reference< drawing::XShape > SAL_CALL EnhancedCustomShapeEngine::render()
         if ( rGeoStat.nShearAngle )
         {
             tools::Long nShearAngle = rGeoStat.nShearAngle;
-            double nTan = rGeoStat.nTan;
+            double nTan = rGeoStat.mfTanShearAngle;
             if (bFlipV != bFlipH)
             {
                 nShearAngle = -nShearAngle;
@@ -418,7 +418,7 @@ drawing::PolyPolygonBezierCoords SAL_CALL EnhancedCustomShapeEngine::getLineGeom
             if ( rGeoStat.nShearAngle )
             {
                 tools::Long nShearAngle = rGeoStat.nShearAngle;
-                double nTan = rGeoStat.nTan;
+                double nTan = rGeoStat.mfTanShearAngle;
                 if (bFlipV != bFlipH)
                 {
                     nShearAngle = -nShearAngle;
diff --git a/svx/source/sdr/misc/ImageMapInfo.cxx b/svx/source/sdr/misc/ImageMapInfo.cxx
index e396dc95842b..d0c78bf911d4 100644
--- a/svx/source/sdr/misc/ImageMapInfo.cxx
+++ b/svx/source/sdr/misc/ImageMapInfo.cxx
@@ -78,7 +78,8 @@ IMapObject* SvxIMapInfo::GetHitIMapObject(const SdrObject* pObj, const Point& rW
 
             // Undo rotation
             if (rGeo.nRotationAngle)
-                RotatePoint(aRelPoint, rRect.TopLeft(), -rGeo.nSin, rGeo.nCos);
+                RotatePoint(aRelPoint, rRect.TopLeft(), -rGeo.mfSinRotationAngle,
+                            rGeo.mfCosRotationAngle);
 
             // Undo mirroring
             if (pGeoData->bMirrored)
@@ -86,7 +87,7 @@ IMapObject* SvxIMapInfo::GetHitIMapObject(const SdrObject* pObj, const Point& rW
 
             // Undo shearing
             if (rGeo.nShearAngle)
-                ShearPoint(aRelPoint, rRect.TopLeft(), -rGeo.nTan);
+                ShearPoint(aRelPoint, rRect.TopLeft(), -rGeo.mfTanShearAngle);
 
             if (pGrafObj->GetGrafPrefMapMode().GetMapUnit() == MapUnit::MapPixel)
                 aGraphSize = Application::GetDefaultDevice()->PixelToLogic(
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 3ce25459bea6..f688c32df82b 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1697,7 +1697,7 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL,
                     {
                         pTextObj->NbcRotate(
                             pCustomShape->GetSnapRect().Center(), rSourceGeo.nRotationAngle,
-                            rSourceGeo.nSin, rSourceGeo.nCos);
+                            rSourceGeo.mfSinRotationAngle, rSourceGeo.mfCosRotationAngle);
                     }
 
                     // set modified ItemSet at text object
@@ -2156,10 +2156,10 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
 
                 // apply original transformation
                 if (aGeoStat.nShearAngle)
-                    pCandidate->NbcShear(aLogicRect.TopLeft(), aGeoStat.nShearAngle, aGeoStat.nTan, false);
+                    pCandidate->NbcShear(aLogicRect.TopLeft(), aGeoStat.nShearAngle, aGeoStat.mfTanShearAngle, false);
 
                 if (aGeoStat.nRotationAngle)
-                    pCandidate->NbcRotate(aLogicRect.TopLeft(), aGeoStat.nRotationAngle, aGeoStat.nSin, aGeoStat.nCos);
+                    pCandidate->NbcRotate(aLogicRect.TopLeft(), aGeoStat.nRotationAngle, aGeoStat.mfSinRotationAngle, aGeoStat.mfCosRotationAngle);
 
                 SdrMark aNewMark(pCandidate, pPV);
                 aNewMarked.InsertEntry(aNewMark);
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 30552b63fa4d..f575b2622447 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -1698,8 +1698,8 @@ SdrGluePoint SdrObjCustomShape::GetVertexGluePoint(sal_uInt16 nPosNum) const
         case 2: aPt=maRect.BottomCenter(); aPt.AdjustY(nWdt ); break;
         case 3: aPt=maRect.LeftCenter();   aPt.AdjustX( -nWdt ); break;
     }
-    if (aGeo.nShearAngle!=0) ShearPoint(aPt,maRect.TopLeft(),aGeo.nTan);
-    if (aGeo.nRotationAngle!=0) RotatePoint(aPt,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+    if (aGeo.nShearAngle!=0) ShearPoint(aPt,maRect.TopLeft(),aGeo.mfTanShearAngle);
+    if (aGeo.nRotationAngle!=0) RotatePoint(aPt,maRect.TopLeft(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
     aPt-=GetSnapRect().Center();
     SdrGluePoint aGP(aPt);
     aGP.SetPercent(false);
@@ -1744,7 +1744,7 @@ void SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded()
     bool bMirroredY = IsMirroredY();
 
     tools::Long nShearAngle = aGeo.nShearAngle;
-    double fTan = aGeo.nTan;
+    double fTan = aGeo.mfTanShearAngle;
 
     if ( aGeo.nRotationAngle || nShearAngle || bMirroredX || bMirroredY )
     {
@@ -1920,8 +1920,8 @@ void SdrObjCustomShape::DragResizeCustomShape( const tools::Rectangle& rNewRect
         ( aGeo.nRotationAngle || aGeo.nShearAngle ) )
     {
         Point aNewPos( aNewRect.TopLeft() );
-        if ( aGeo.nShearAngle ) ShearPoint( aNewPos, aOld.TopLeft(), aGeoStat.nTan );
-        if ( aGeo.nRotationAngle )  RotatePoint(aNewPos, aOld.TopLeft(), aGeoStat.nSin, aGeoStat.nCos );
+        if ( aGeo.nShearAngle ) ShearPoint( aNewPos, aOld.TopLeft(), aGeoStat.mfTanShearAngle );
+        if ( aGeo.nRotationAngle )  RotatePoint(aNewPos, aOld.TopLeft(), aGeoStat.mfSinRotationAngle, aGeoStat.mfCosRotationAngle );
         aNewRect.SetPos( aNewPos );
     }
     if ( aNewRect == maRect )
@@ -2390,7 +2390,7 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool
                     Point aD1(rR.TopLeft());
                     aD1-=aR0.TopLeft();
                     Point aD2(aD1);
-                    RotatePoint(aD2,Point(),aGeo.nSin,aGeo.nCos);
+                    RotatePoint(aD2,Point(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
                     aD2-=aD1;
                     rR.Move(aD2.X(),aD2.Y());
                 }
@@ -2510,7 +2510,7 @@ void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools
         Point aCenter(aViewInit.Center());
         aCenter-=aViewInit.TopLeft();
         Point aCenter0(aCenter);
-        RotatePoint(aCenter,Point(),aGeo.nSin,aGeo.nCos);
+        RotatePoint(aCenter,Point(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
         aCenter-=aCenter0;
         aViewInit.Move(aCenter.X(),aCenter.Y());
     }
@@ -2613,7 +2613,7 @@ void SdrObjCustomShape::TakeTextAnchorRect( tools::Rectangle& rAnchorRect ) cons
         if ( aGeo.nRotationAngle )
         {
             Point aP( rAnchorRect.TopLeft() );
-            RotatePoint( aP, aRotateRef, aGeo.nSin, aGeo. nCos );
+            RotatePoint( aP, aRotateRef, aGeo.mfSinRotationAngle, aGeo.mfCosRotationAngle );
             rAnchorRect.SetPos( aP );
         }
     }
@@ -2745,7 +2745,7 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle&
             aTextPos.AdjustY(nFreeHgt );
     }
     if (aGeo.nRotationAngle!=0)
-        RotatePoint(aTextPos,aAnkRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+        RotatePoint(aTextPos,aAnkRect.TopLeft(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
 
     if (pAnchorRect)
         *pAnchorRect=aAnkRect;
@@ -3040,7 +3040,7 @@ void SdrObjCustomShape::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix,
         // back the mirroring of the shear angle
         aGeoStat.nShearAngle = FRound(basegfx::rad2deg(atan(fShearX)) * 100.0);
         aGeoStat.RecalcTan();
-        Shear(Point(), aGeoStat.nShearAngle, aGeoStat.nTan, false);
+        Shear(Point(), aGeoStat.nShearAngle, aGeoStat.mfTanShearAngle, false);
     }
 
     // rotation?
@@ -3053,7 +3053,7 @@ void SdrObjCustomShape::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix,
         // mirrored -> mirror value here
         aGeoStat.nRotationAngle = NormAngle36000(FRound(-fRotate / F_PI18000));
         aGeoStat.RecalcSinCos();
-        Rotate(Point(), aGeoStat.nRotationAngle, aGeoStat.nSin, aGeoStat.nCos);
+        Rotate(Point(), aGeoStat.nRotationAngle, aGeoStat.mfSinRotationAngle, aGeoStat.mfCosRotationAngle);
     }
 
     // translate?
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index 47e03148a5fd..951f626b9f77 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -483,12 +483,12 @@ void SdrCircObj::AddToHdlList(SdrHdlList& rHdlList) const
 
         if (aGeo.nShearAngle)
         {
-            ShearPoint(aPnt,maRect.TopLeft(),aGeo.nTan);
+            ShearPoint(aPnt,maRect.TopLeft(),aGeo.mfTanShearAngle);
         }
 
         if (aGeo.nRotationAngle)
         {
-            RotatePoint(aPnt,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+            RotatePoint(aPnt,maRect.TopLeft(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
         }
 
         std::unique_ptr<SdrHdl> pH(new SdrHdl(aPnt,eLocalKind));
@@ -531,10 +531,10 @@ bool SdrCircObj::applySpecialDrag(SdrDragStat& rDrag)
         Point aPt(rDrag.GetNow());
 
         if (aGeo.nRotationAngle!=0)
-            RotatePoint(aPt,maRect.TopLeft(),-aGeo.nSin,aGeo.nCos);
+            RotatePoint(aPt,maRect.TopLeft(),-aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
 
         if (aGeo.nShearAngle!=0)
-            ShearPoint(aPt,maRect.TopLeft(),-aGeo.nTan);
+            ShearPoint(aPt,maRect.TopLeft(),-aGeo.mfTanShearAngle);
 
         aPt -= maRect.Center();
 
@@ -911,12 +911,12 @@ void SdrCircObj::NbcMirror(const Point& rRef1, const Point& rRef2)
         if (nHgt==0) aTmpPt2.setY(0 );
         aTmpPt2+=aCenter;
         if (aGeo.nRotationAngle!=0) {
-            RotatePoint(aTmpPt1,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
-            RotatePoint(aTmpPt2,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+            RotatePoint(aTmpPt1,maRect.TopLeft(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
+            RotatePoint(aTmpPt2,maRect.TopLeft(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
         }
         if (aGeo.nShearAngle!=0) {
-            ShearPoint(aTmpPt1,maRect.TopLeft(),aGeo.nTan);
-            ShearPoint(aTmpPt2,maRect.TopLeft(),aGeo.nTan);
+            ShearPoint(aTmpPt1,maRect.TopLeft(),aGeo.mfTanShearAngle);
+            ShearPoint(aTmpPt2,maRect.TopLeft(),aGeo.mfTanShearAngle);
         }
     }
     SdrTextObj::NbcMirror(rRef1,rRef2);
@@ -925,13 +925,13 @@ void SdrCircObj::NbcMirror(const Point& rRef1, const Point& rRef2)
         MirrorPoint(aTmpPt2,rRef1,rRef2);
         // unrotate:
         if (aGeo.nRotationAngle!=0) {
-            RotatePoint(aTmpPt1,maRect.TopLeft(),-aGeo.nSin,aGeo.nCos); // -sin for reversion
-            RotatePoint(aTmpPt2,maRect.TopLeft(),-aGeo.nSin,aGeo.nCos); // -sin for reversion
+            RotatePoint(aTmpPt1,maRect.TopLeft(),-aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle); // -sin for reversion
+            RotatePoint(aTmpPt2,maRect.TopLeft(),-aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle); // -sin for reversion
         }
         // unshear:
         if (aGeo.nShearAngle!=0) {
-            ShearPoint(aTmpPt1,maRect.TopLeft(),-aGeo.nTan); // -tan for reversion
-            ShearPoint(aTmpPt2,maRect.TopLeft(),-aGeo.nTan); // -tan for reversion
+            ShearPoint(aTmpPt1,maRect.TopLeft(),-aGeo.mfTanShearAngle); // -tan for reversion
+            ShearPoint(aTmpPt2,maRect.TopLeft(),-aGeo.mfTanShearAngle); // -tan for reversion
         }
         Point aCenter(maRect.Center());
         aTmpPt1-=aCenter;
@@ -1012,7 +1012,7 @@ void SdrCircObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
             Point aDst(rRect.TopLeft());
             aDst-=maRect.TopLeft();
             Point aDst0(aDst);
-            RotatePoint(aDst,Point(),aGeo.nSin,aGeo.nCos);
+            RotatePoint(aDst,Point(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
             aDst-=aDst0;
             rRect.Move(aDst.X(),aDst.Y());
         }
@@ -1020,12 +1020,12 @@ void SdrCircObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
     if (aGeo.nShearAngle==0)
         return;
 
-    tools::Long nDst=FRound((rRect.Bottom()-rRect.Top())*aGeo.nTan);
+    tools::Long nDst=FRound((rRect.Bottom()-rRect.Top())*aGeo.mfTanShearAngle);
     if (aGeo.nShearAngle>0) {
         Point aRef(rRect.TopLeft());
         rRect.AdjustLeft( -nDst );
         Point aTmpPt(rRect.TopLeft());
-        RotatePoint(aTmpPt,aRef,aGeo.nSin,aGeo.nCos);
+        RotatePoint(aTmpPt,aRef,aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
         aTmpPt-=rRect.TopLeft();
         rRect.Move(aTmpPt.X(),aTmpPt.Y());
     } else {
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index f175f9c33181..991b3b288f46 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -920,13 +920,13 @@ SdrObjectUniquePtr SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAddText )
                     if(aGeoStat.nShearAngle)
                     {
                         aGeoStat.RecalcTan();
-                        pGrp->NbcShear(maRect.TopLeft(), aGeoStat.nShearAngle, aGeoStat.nTan, false);
+                        pGrp->NbcShear(maRect.TopLeft(), aGeoStat.nShearAngle, aGeoStat.mfTanShearAngle, false);
                     }
 
                     if(aGeoStat.nRotationAngle)
                     {
                         aGeoStat.RecalcSinCos();
-                        pGrp->NbcRotate(maRect.TopLeft(), aGeoStat.nRotationAngle, aGeoStat.nSin, aGeoStat.nCos);
+                        pGrp->NbcRotate(maRect.TopLeft(), aGeoStat.nRotationAngle, aGeoStat.mfSinRotationAngle, aGeoStat.mfCosRotationAngle);
                     }
                 }
 
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index a26aaec73210..1c3cae84e816 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -2353,10 +2353,10 @@ void SdrPathObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
     else
     {
         XPolyPolygon aXPP(GetPathPoly());
-        RotateXPoly(aXPP,Point(),-aGeo.nSin,aGeo.nCos);
+        RotateXPoly(aXPP,Point(),-aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
         rRect=aXPP.GetBoundRect();
         Point aTmp(rRect.TopLeft());
-        RotatePoint(aTmp,Point(),aGeo.nSin,aGeo.nCos);
+        RotatePoint(aTmp,Point(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
         aTmp-=rRect.TopLeft();
         rRect.Move(aTmp.X(),aTmp.Y());
     }
diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx
index c3a2a66c8483..7491f6c85c91 100644
--- a/svx/source/svdraw/svdorect.cxx
+++ b/svx/source/svdraw/svdorect.cxx
@@ -115,8 +115,8 @@ XPolygon SdrRectObj::ImpCalcXPoly(const tools::Rectangle& rRect1, tools::Long nR
     aXPoly=aNewPoly;
 
     // these angles always relate to the top left corner of aRect
-    if (aGeo.nShearAngle!=0) ShearXPoly(aXPoly,maRect.TopLeft(),aGeo.nTan);
-    if (aGeo.nRotationAngle!=0) RotateXPoly(aXPoly,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+    if (aGeo.nShearAngle!=0) ShearXPoly(aXPoly,maRect.TopLeft(),aGeo.mfTanShearAngle);
+    if (aGeo.nRotationAngle!=0) RotateXPoly(aXPoly,maRect.TopLeft(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
     return aXPoly;
 }
 
@@ -173,13 +173,13 @@ void SdrRectObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
     if (aGeo.nShearAngle==0)
         return;
 
-    tools::Long nDst=FRound((maRect.Bottom()-maRect.Top())*aGeo.nTan);
+    tools::Long nDst=FRound((maRect.Bottom()-maRect.Top())*aGeo.mfTanShearAngle);
     if (aGeo.nShearAngle>0)
     {
         Point aRef(rRect.TopLeft());
         rRect.AdjustLeft( -nDst );
         Point aTmpPt(rRect.TopLeft());
-        RotatePoint(aTmpPt,aRef,aGeo.nSin,aGeo.nCos);
+        RotatePoint(aTmpPt,aRef,aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
         aTmpPt-=rRect.TopLeft();
         rRect.Move(aTmpPt.X(),aTmpPt.Y());
     }
@@ -339,11 +339,11 @@ void SdrRectObj::AddToHdlList(SdrHdlList& rHdlList) const
 
         if(aGeo.nShearAngle)
         {
-            ShearPoint(aPnt,maRect.TopLeft(),aGeo.nTan);
+            ShearPoint(aPnt,maRect.TopLeft(),aGeo.mfTanShearAngle);
         }
         if(aGeo.nRotationAngle)
         {
-            RotatePoint(aPnt,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+            RotatePoint(aPnt,maRect.TopLeft(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
         }
 
         std::unique_ptr<SdrHdl> pH(new SdrHdl(aPnt,eKind));
@@ -381,7 +381,7 @@ bool SdrRectObj::applySpecialDrag(SdrDragStat& rDrag)
         Point aPt(rDrag.GetNow());
 
         if(aGeo.nRotationAngle)
-            RotatePoint(aPt,maRect.TopLeft(),-aGeo.nSin,aGeo.nCos);
+            RotatePoint(aPt,maRect.TopLeft(),-aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
 
         sal_Int32 nRad(aPt.X() - maRect.Left());
 
@@ -419,7 +419,7 @@ OUString SdrRectObj::getSpecialDragComment(const SdrDragStat& rDrag) const
 
             // -sin for reversal
             if(aGeo.nRotationAngle)
-                RotatePoint(aPt, maRect.TopLeft(), -aGeo.nSin, aGeo.nCos);
+                RotatePoint(aPt, maRect.TopLeft(), -aGeo.mfSinRotationAngle, aGeo.mfCosRotationAngle);
 
             sal_Int32 nRad(aPt.X() - maRect.Left());
 
@@ -506,8 +506,8 @@ SdrGluePoint SdrRectObj::GetVertexGluePoint(sal_uInt16 nPosNum) const
         case 2: aPt=maRect.BottomCenter(); aPt.AdjustY(nWdt ); break;
         case 3: aPt=maRect.LeftCenter();   aPt.AdjustX( -nWdt ); break;
     }
-    if (aGeo.nShearAngle!=0) ShearPoint(aPt,maRect.TopLeft(),aGeo.nTan);
-    if (aGeo.nRotationAngle!=0) RotatePoint(aPt,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+    if (aGeo.nShearAngle!=0) ShearPoint(aPt,maRect.TopLeft(),aGeo.mfTanShearAngle);
+    if (aGeo.nRotationAngle!=0) RotatePoint(aPt,maRect.TopLeft(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
     aPt-=GetSnapRect().Center();
     SdrGluePoint aGP(aPt);
     aGP.SetPercent(false);
@@ -532,8 +532,8 @@ SdrGluePoint SdrRectObj::GetCornerGluePoint(sal_uInt16 nPosNum) const
         case 2: aPt=maRect.BottomRight(); aPt.AdjustX(nWdt ); aPt.AdjustY(nWdt ); break;
         case 3: aPt=maRect.BottomLeft();  aPt.AdjustX( -nWdt ); aPt.AdjustY(nWdt ); break;
     }
-    if (aGeo.nShearAngle!=0) ShearPoint(aPt,maRect.TopLeft(),aGeo.nTan);
-    if (aGeo.nRotationAngle!=0) RotatePoint(aPt,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+    if (aGeo.nShearAngle!=0) ShearPoint(aPt,maRect.TopLeft(),aGeo.mfTanShearAngle);
+    if (aGeo.nRotationAngle!=0) RotatePoint(aPt,maRect.TopLeft(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
     aPt-=GetSnapRect().Center();
     SdrGluePoint aGP(aPt);
     aGP.SetPercent(false);
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 5685f0934872..710e81d6bfee 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -384,7 +384,7 @@ void SdrTextObj::ImpCheckShear()
 {
     if (bNoShear && aGeo.nShearAngle!=0) {
         aGeo.nShearAngle=0;
-        aGeo.nTan=0;
+        aGeo.mfTanShearAngle=0;
     }
 }
 
@@ -611,7 +611,7 @@ void SdrTextObj::TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const
     }
     if (aGeo.nRotationAngle!=0) {
         Point aTmpPt(aAnkRect.TopLeft());
-        RotatePoint(aTmpPt,aRotateRef,aGeo.nSin,aGeo.nCos);
+        RotatePoint(aTmpPt,aRotateRef,aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
         aTmpPt-=aAnkRect.TopLeft();
         aAnkRect.Move(aTmpPt.X(),aTmpPt.Y());
     }
@@ -777,7 +777,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRe
             aTextPos.AdjustY(nFreeHgt );
     }
     if (aGeo.nRotationAngle!=0)
-        RotatePoint(aTextPos,aAnkRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+        RotatePoint(aTextPos,aAnkRect.TopLeft(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
 
     if (pAnchorRect)
         *pAnchorRect=aAnkRect;
@@ -1053,8 +1053,8 @@ SdrTextObj& SdrTextObj::operator=(const SdrTextObj& rObj)
 basegfx::B2DPolyPolygon SdrTextObj::TakeXorPoly() const
 {
     tools::Polygon aPol(maRect);
-    if (aGeo.nShearAngle!=0) ShearPoly(aPol,maRect.TopLeft(),aGeo.nTan);
-    if (aGeo.nRotationAngle!=0) RotatePoly(aPol,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+    if (aGeo.nShearAngle!=0) ShearPoly(aPol,maRect.TopLeft(),aGeo.mfTanShearAngle);
+    if (aGeo.nRotationAngle!=0) RotatePoly(aPol,maRect.TopLeft(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
 
     basegfx::B2DPolyPolygon aRetval;
     aRetval.append(aPol.getB2DPolygon());
@@ -1080,7 +1080,7 @@ basegfx::B2DPolyPolygon SdrTextObj::TakeContour() const
         bool bFitToSize(IsFitToSize());
         if (bFitToSize) aR=aAnchor2;
         tools::Polygon aPol(aR);
-        if (aGeo.nRotationAngle!=0) RotatePoly(aPol,aR.TopLeft(),aGeo.nSin,aGeo.nCos);
+        if (aGeo.nRotationAngle!=0) RotatePoly(aPol,aR.TopLeft(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
 
         aRetval.append(aPol.getB2DPolygon());
     }
@@ -1093,8 +1093,8 @@ void SdrTextObj::RecalcSnapRect()
     if (aGeo.nRotationAngle!=0 || aGeo.nShearAngle!=0)
     {
         tools::Polygon aPol(maRect);
-        if (aGeo.nShearAngle!=0) ShearPoly(aPol,maRect.TopLeft(),aGeo.nTan);
-        if (aGeo.nRotationAngle!=0) RotatePoly(aPol,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+        if (aGeo.nShearAngle!=0) ShearPoly(aPol,maRect.TopLeft(),aGeo.mfTanShearAngle);
+        if (aGeo.nRotationAngle!=0) RotatePoly(aPol,maRect.TopLeft(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
         maSnapRect=aPol.GetBoundRect();
     } else {
         maSnapRect = maRect;
@@ -1116,8 +1116,8 @@ Point SdrTextObj::GetSnapPoint(sal_uInt32 i) const
         case 3: aP=maRect.BottomRight(); break;
         default: aP=maRect.Center(); break;
     }
-    if (aGeo.nShearAngle!=0) ShearPoint(aP,maRect.TopLeft(),aGeo.nTan);
-    if (aGeo.nRotationAngle!=0) RotatePoint(aP,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+    if (aGeo.nShearAngle!=0) ShearPoint(aP,maRect.TopLeft(),aGeo.mfTanShearAngle);
+    if (aGeo.nRotationAngle!=0) RotatePoint(aP,maRect.TopLeft(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
     return aP;
 }
 
@@ -1674,7 +1674,7 @@ void SdrTextObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b
         GeoStat aGeoStat;
         aGeoStat.nShearAngle = FRound(basegfx::rad2deg(atan(fShearX)) * 100.0);
         aGeoStat.RecalcTan();
-        Shear(Point(), aGeoStat.nShearAngle, aGeoStat.nTan, false);
+        Shear(Point(), aGeoStat.nShearAngle, aGeoStat.mfTanShearAngle, false);
     }
 
     // rotation?
@@ -1687,7 +1687,7 @@ void SdrTextObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b
         // mirrored -> mirror value here
         aGeoStat.nRotationAngle = NormAngle36000(FRound(-fRotate / F_PI18000));
         aGeoStat.RecalcSinCos();
-        Rotate(Point(), aGeoStat.nRotationAngle, aGeoStat.nSin, aGeoStat.nCos);
+        Rotate(Point(), aGeoStat.nRotationAngle, aGeoStat.mfSinRotationAngle, aGeoStat.mfCosRotationAngle);
     }
 
     // translate?
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index 5ba5ec6a82cc..50908c1a24c1 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -228,7 +228,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt,
         Point aD1(rR.TopLeft());
         aD1 -= aOldRect.TopLeft();
         Point aD2(aD1);
-        RotatePoint(aD2, Point(), aGeo.nSin, aGeo.nCos);
+        RotatePoint(aD2, Point(), aGeo.mfSinRotationAngle, aGeo.mfCosRotationAngle);
         aD2 -= aD1;
         rR.Move(aD2.X(), aD2.Y());
     }
diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx
index 86adbdac2daa..b7a7f54b76a3 100644
--- a/svx/source/svdraw/svdotxdr.cxx
+++ b/svx/source/svdraw/svdotxdr.cxx
@@ -54,8 +54,8 @@ void SdrTextObj::AddToHdlList(SdrHdlList& rHdlList) const
             case 6: aPnt=maRect.BottomCenter(); eKind=SdrHdlKind::Lower; break;
             case 7: aPnt=maRect.BottomRight();  eKind=SdrHdlKind::LowerRight; break;
         }
-        if (aGeo.nShearAngle!=0) ShearPoint(aPnt,maRect.TopLeft(),aGeo.nTan);
-        if (aGeo.nRotationAngle!=0) RotatePoint(aPnt,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+        if (aGeo.nShearAngle!=0) ShearPoint(aPnt,maRect.TopLeft(),aGeo.mfTanShearAngle);
+        if (aGeo.nRotationAngle!=0) RotatePoint(aPnt,maRect.TopLeft(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
         std::unique_ptr<SdrHdl> pH(new SdrHdl(aPnt,eKind));
         pH->SetObj(const_cast<SdrTextObj*>(this));
         pH->SetRotationAngle(aGeo.nRotationAngle);
@@ -79,9 +79,9 @@ tools::Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const
     bool bBigOrtho=bEcke && bOrtho && rDrag.GetView()->IsBigOrtho();
     Point aPos(rDrag.GetNow());
     // Unrotate:
-    if (aGeo.nRotationAngle!=0) RotatePoint(aPos,aTmpRect.TopLeft(),-aGeo.nSin,aGeo.nCos);
+    if (aGeo.nRotationAngle!=0) RotatePoint(aPos,aTmpRect.TopLeft(),-aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
     // Unshear:
-    if (aGeo.nShearAngle!=0) ShearPoint(aPos,aTmpRect.TopLeft(),-aGeo.nTan);
+    if (aGeo.nShearAngle!=0) ShearPoint(aPos,aTmpRect.TopLeft(),-aGeo.mfTanShearAngle);
 
     bool bLft=(eHdl==SdrHdlKind::UpperLeft || eHdl==SdrHdlKind::Left  || eHdl==SdrHdlKind::LowerLeft);
     bool bRgt=(eHdl==SdrHdlKind::UpperRight || eHdl==SdrHdlKind::Right || eHdl==SdrHdlKind::LowerRight);
@@ -155,10 +155,10 @@ bool SdrTextObj::applySpecialDrag(SdrDragStat& rDrag)
         Point aNewPos(aNewRect.TopLeft());
 
         if(aGeo.nShearAngle)
-            ShearPoint(aNewPos,maRect.TopLeft(),aGeo.nTan);
+            ShearPoint(aNewPos,maRect.TopLeft(),aGeo.mfTanShearAngle);
 
         if(aGeo.nRotationAngle)
-            RotatePoint(aNewPos,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+            RotatePoint(aNewPos,maRect.TopLeft(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
 
         aNewRect.SetPos(aNewPos);
     }
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index 6e423029f582..96341a007d5b 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -138,7 +138,7 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Recta
         Point aCenter(aViewInit.Center());
         aCenter-=aViewInit.TopLeft();
         Point aCenter0(aCenter);
-        RotatePoint(aCenter,Point(),aGeo.nSin,aGeo.nCos);
+        RotatePoint(aCenter,Point(),aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
         aCenter-=aCenter0;
         aViewInit.Move(aCenter.X(),aCenter.Y());
     }
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
index 14cfe824f67c..ce2ae53ffc8a 100644
--- a/svx/source/svdraw/svdotxtr.cxx
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -196,8 +196,8 @@ void SdrTextObj::NbcRotate(const Point& rRef, tools::Long nAngle, double sn, dou
     maRect.SetBottom(maRect.Top()+dy );
     if (aGeo.nRotationAngle==0) {
         aGeo.nRotationAngle=NormAngle36000(nAngle);
-        aGeo.nSin=sn;
-        aGeo.nCos=cs;
+        aGeo.mfSinRotationAngle=sn;
+        aGeo.mfCosRotationAngle=cs;
     } else {
         aGeo.nRotationAngle=NormAngle36000(aGeo.nRotationAngle+nAngle);
         aGeo.RecalcSinCos();
diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx
index 95c73228e64e..b4203689f5a5 100644
--- a/svx/source/svdraw/svdouno.cxx
+++ b/svx/source/svdraw/svdouno.cxx
@@ -308,9 +308,9 @@ void SdrUnoObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fracti
 
     aGeo.nRotationAngle  = 0;
     aGeo.nShearAngle = 0;
-    aGeo.nSin       = 0.0;
-    aGeo.nCos       = 1.0;
-    aGeo.nTan       = 0.0;
+    aGeo.mfSinRotationAngle       = 0.0;
+    aGeo.mfCosRotationAngle       = 1.0;
+    aGeo.mfTanShearAngle       = 0.0;
     SetRectsDirty();
 }
 
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index f225e3d5d6b6..f3efd09c9f27 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -451,22 +451,22 @@ tools::Long GetLen(const Point& rPnt)
 void GeoStat::RecalcSinCos()
 {
     if (nRotationAngle==0) {
-        nSin=0.0;
-        nCos=1.0;
+        mfSinRotationAngle=0.0;
+        mfCosRotationAngle=1.0;
     } else {
         double a = nRotationAngle * F_PI18000;
-        nSin=sin(a);
-        nCos=cos(a);
+        mfSinRotationAngle=sin(a);
+        mfCosRotationAngle=cos(a);
     }
 }
 
 void GeoStat::RecalcTan()
 {
     if (nShearAngle==0) {
-        nTan=0.0;
+        mfTanShearAngle=0.0;
     } else {
         double a = nShearAngle * F_PI18000;
-        nTan=tan(a);
+        mfTanShearAngle=tan(a);
     }
 }
 
@@ -479,8 +479,8 @@ tools::Polygon Rect2Poly(const tools::Rectangle& rRect, const GeoStat& rGeo)
     aPol[2]=rRect.BottomRight();
     aPol[3]=rRect.BottomLeft();
     aPol[4]=rRect.TopLeft();
-    if (rGeo.nShearAngle!=0) ShearPoly(aPol,rRect.TopLeft(),rGeo.nTan);
-    if (rGeo.nRotationAngle!=0) RotatePoly(aPol,rRect.TopLeft(),rGeo.nSin,rGeo.nCos);
+    if (rGeo.nShearAngle!=0) ShearPoly(aPol,rRect.TopLeft(),rGeo.mfTanShearAngle);
+    if (rGeo.nRotationAngle!=0) RotatePoly(aPol,rRect.TopLeft(),rGeo.mfSinRotationAngle,rGeo.mfCosRotationAngle);
     return aPol;
 }
 
@@ -492,12 +492,12 @@ void Poly2Rect(const tools::Polygon& rPol, tools::Rectangle& rRect, GeoStat& rGe
     rGeo.RecalcSinCos();
 
     Point aPt1(rPol[1]-rPol[0]);
-    if (rGeo.nRotationAngle!=0) RotatePoint(aPt1,Point(0,0),-rGeo.nSin,rGeo.nCos); // -Sin to reverse rotation
+    if (rGeo.nRotationAngle!=0) RotatePoint(aPt1,Point(0,0),-rGeo.mfSinRotationAngle,rGeo.mfCosRotationAngle); // -Sin to reverse rotation
     tools::Long nWdt=aPt1.X();
 
     Point aPt0(rPol[0]);
     Point aPt3(rPol[3]-rPol[0]);
-    if (rGeo.nRotationAngle!=0) RotatePoint(aPt3,Point(0,0),-rGeo.nSin,rGeo.nCos); // -Sin to reverse rotation
+    if (rGeo.nRotationAngle!=0) RotatePoint(aPt3,Point(0,0),-rGeo.mfSinRotationAngle,rGeo.mfCosRotationAngle); // -Sin to reverse rotation
     tools::Long nHgt=aPt3.Y();
 
 
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 10fc939395c3..126e6e02efbf 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -703,15 +703,15 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
                                     {
                                         ShearPoly(aPol,
                                                 aNewRect.TopLeft(),
-                                                aGeo.nTan);
-                                        ShearPoint(aOffset, Point(0,0), aGeo.nTan);
+                                                aGeo.mfTanShearAngle);
+                                        ShearPoint(aOffset, Point(0,0), aGeo.mfTanShearAngle);
                                     }
                                     if (aGeo.nRotationAngle!=0)
                                     {
                                         RotatePoly(aPol,
                                                 aNewRect.TopLeft(),
-                                                aGeo.nSin,aGeo.nCos);
-                                        RotatePoint(aOffset, Point(0,0), aGeo.nSin,aGeo.nCos);
+                                                aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
+                                        RotatePoint(aOffset, Point(0,0), aGeo.mfSinRotationAngle,aGeo.mfCosRotationAngle);
                                     }
 
                                     // apply offset


More information about the Libreoffice-commits mailing list