diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-07-10 08:20:14 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-07-10 16:12:42 +0200 |
commit | b26ddd42b434c84e5f8c939c2903fc7a0f79285f (patch) | |
tree | 51534931b87a4bc88fd0b79caf1abe9ce9977a6e /svx/source/svdraw | |
parent | 6ed4c4a1b008e7bd4917d9cca255c862fbcd08aa (diff) |
svx: prefix members of GeoStat
See tdf#94879 for motivation.
Change-Id: Id8d116bfa375f7dd30ca8dcdec0ee02df8105030
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154234
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r-- | svx/source/svdraw/svdedtv2.cxx | 16 | ||||
-rw-r--r-- | svx/source/svdraw/svdoashp.cxx | 50 | ||||
-rw-r--r-- | svx/source/svdraw/svdocirc.cxx | 46 | ||||
-rw-r--r-- | svx/source/svdraw/svdograf.cxx | 20 | ||||
-rw-r--r-- | svx/source/svdraw/svdomeas.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdopath.cxx | 22 | ||||
-rw-r--r-- | svx/source/svdraw/svdorect.cxx | 36 | ||||
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 48 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxat.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxdr.cxx | 16 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxed.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxtr.cxx | 44 | ||||
-rw-r--r-- | svx/source/svdraw/svdouno.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdtrans.cxx | 22 |
14 files changed, 171 insertions, 171 deletions
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 138d74058268..8ef7afa195cb 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -1696,10 +1696,10 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, // if rotated, copy GeoStat, too. const GeoStat& rSourceGeo = pCustomShape->GetGeoStat(); - if(rSourceGeo.nRotationAngle) + if(rSourceGeo.m_nRotationAngle) { pTextObj->NbcRotate( - pCustomShape->GetSnapRect().Center(), rSourceGeo.nRotationAngle, + pCustomShape->GetSnapRect().Center(), rSourceGeo.m_nRotationAngle, rSourceGeo.mfSinRotationAngle, rSourceGeo.mfCosRotationAngle); } @@ -2179,10 +2179,10 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo) GeoStat aGeoStat(pGraf ? pGraf->GetGeoStat() : pOle2->GetGeoStat()); size_t nObj = nInsPos; - if (aGeoStat.nShearAngle) + if (aGeoStat.m_nShearAngle) aGeoStat.RecalcTan(); - if (aGeoStat.nRotationAngle) + if (aGeoStat.m_nRotationAngle) aGeoStat.RecalcSinCos(); for (size_t i = 0; i < nInsCnt; i++) @@ -2194,11 +2194,11 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo) SdrObject* pCandidate = pOL->GetObj(nObj); // apply original transformation - if (aGeoStat.nShearAngle) - pCandidate->NbcShear(aLogicRect.TopLeft(), aGeoStat.nShearAngle, aGeoStat.mfTanShearAngle, false); + if (aGeoStat.m_nShearAngle) + pCandidate->NbcShear(aLogicRect.TopLeft(), aGeoStat.m_nShearAngle, aGeoStat.mfTanShearAngle, false); - if (aGeoStat.nRotationAngle) - pCandidate->NbcRotate(aLogicRect.TopLeft(), aGeoStat.nRotationAngle, aGeoStat.mfSinRotationAngle, aGeoStat.mfCosRotationAngle); + if (aGeoStat.m_nRotationAngle) + pCandidate->NbcRotate(aLogicRect.TopLeft(), aGeoStat.m_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 01c23527c514..ca960f43fec6 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1567,7 +1567,7 @@ void SdrObjCustomShape::NbcResize( const Point& rRef, const Fraction& rxFact, co } // updating fObjectRotation - Degree100 nTextObjRotation = maGeo.nRotationAngle; + Degree100 nTextObjRotation = maGeo.m_nRotationAngle; double fAngle = toDegrees(nTextObjRotation); if (IsMirroredX()) { @@ -1602,10 +1602,10 @@ void SdrObjCustomShape::NbcRotate( const Point& rRef, Degree100 nAngle, double s // the rotation angle for ashapes is stored in fObjectRotation, this rotation // has to be applied to the text object (which is internally using maGeo.nAngle). - SdrTextObj::NbcRotate( getRectangle().TopLeft(), -maGeo.nRotationAngle, // retrieving the unrotated text object + SdrTextObj::NbcRotate( getRectangle().TopLeft(), -maGeo.m_nRotationAngle, // retrieving the unrotated text object -maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle ); - maGeo.nRotationAngle = 0_deg100; // resetting aGeo data + maGeo.m_nRotationAngle = 0_deg100; // resetting aGeo data maGeo.RecalcSinCos(); Degree100 nW(static_cast<sal_Int32>( fObjectRotation * 100 )); // applying our object rotation @@ -1663,7 +1663,7 @@ void SdrObjCustomShape::NbcMirror( const Point& rRef1, const Point& rRef2 ) SdrTextObj::NbcMirror( rRef1, rRef2 ); // update fObjectRotation - Degree100 nTextObjRotation = maGeo.nRotationAngle; + Degree100 nTextObjRotation = maGeo.m_nRotationAngle; double fAngle = toDegrees(nTextObjRotation); bool bSingleFlip = (IsMirroredX()!= IsMirroredY()); @@ -1691,7 +1691,7 @@ void SdrObjCustomShape::NbcShear( const Point& rRef, Degree100 nAngle, double tn SdrTextObj::NbcShear(rRef,nAngle,tn,bVShear); // updating fObjectRotation - Degree100 nTextObjRotation = maGeo.nRotationAngle; + Degree100 nTextObjRotation = maGeo.m_nRotationAngle; double fAngle = toDegrees(nTextObjRotation); if (IsMirroredX()) { @@ -1735,9 +1735,9 @@ SdrGluePoint SdrObjCustomShape::GetVertexGluePoint(sal_uInt16 nPosNum) const case 2: aPt = aRectangle.BottomCenter(); aPt.AdjustY(nWdt ); break; case 3: aPt = aRectangle.LeftCenter(); aPt.AdjustX( -nWdt ); break; } - if (maGeo.nShearAngle != 0_deg100) + if (maGeo.m_nShearAngle != 0_deg100) ShearPoint(aPt, aRectangle.TopLeft(), maGeo.mfTanShearAngle); - if (maGeo.nRotationAngle != 0_deg100) + if (maGeo.m_nRotationAngle != 0_deg100) RotatePoint(aPt, aRectangle.TopLeft(), maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); aPt-=GetSnapRect().Center(); SdrGluePoint aGP(aPt); @@ -1782,10 +1782,10 @@ void SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded() bool bMirroredX = IsMirroredX(); bool bMirroredY = IsMirroredY(); - Degree100 nShearAngle = maGeo.nShearAngle; + Degree100 nShearAngle = maGeo.m_nShearAngle; double fTan = maGeo.mfTanShearAngle; - if (maGeo.nRotationAngle || nShearAngle || bMirroredX || bMirroredY) + if (maGeo.m_nRotationAngle || nShearAngle || bMirroredX || bMirroredY) { tools::Polygon aPoly(getRectangle()); if( nShearAngle ) @@ -1794,8 +1794,8 @@ void SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded() for (sal_uInt16 i=0; i<nPointCount; i++) ShearPoint(aPoly[i], getRectangle().Center(), fTan ); } - if (maGeo.nRotationAngle) - aPoly.Rotate( getRectangle().Center(), to<Degree10>(maGeo.nRotationAngle) ); + if (maGeo.m_nRotationAngle) + aPoly.Rotate( getRectangle().Center(), to<Degree10>(maGeo.m_nRotationAngle) ); tools::Rectangle aBoundRect( aPoly.GetBoundRect() ); sal_Int32 nXDiff = aBoundRect.Left() - getRectangle().Left(); @@ -1956,11 +1956,11 @@ void SdrObjCustomShape::DragResizeCustomShape( const tools::Rectangle& rNewRect GeoStat aGeoStat( GetGeoStat() ); if ( aNewRect.TopLeft() != getRectangle().TopLeft() && - ( maGeo.nRotationAngle || maGeo.nShearAngle ) ) + ( maGeo.m_nRotationAngle || maGeo.m_nShearAngle ) ) { Point aNewPos( aNewRect.TopLeft() ); - if ( maGeo.nShearAngle ) ShearPoint( aNewPos, aOld.TopLeft(), aGeoStat.mfTanShearAngle ); - if ( maGeo.nRotationAngle ) RotatePoint(aNewPos, aOld.TopLeft(), aGeoStat.mfSinRotationAngle, aGeoStat.mfCosRotationAngle ); + if ( maGeo.m_nShearAngle ) ShearPoint( aNewPos, aOld.TopLeft(), aGeoStat.mfTanShearAngle ); + if ( maGeo.m_nRotationAngle ) RotatePoint(aNewPos, aOld.TopLeft(), aGeoStat.mfSinRotationAngle, aGeoStat.mfCosRotationAngle ); aNewRect.SetPos( aNewPos ); } if (aNewRect == getRectangle()) @@ -2434,7 +2434,7 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool rR.SetBottom(rR.Top()+nHgt ); } } - if ( maGeo.nRotationAngle ) + if ( maGeo.m_nRotationAngle ) { Point aD1(rR.TopLeft()); aD1-=aR0.TopLeft(); @@ -2553,7 +2553,7 @@ void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools { tools::Rectangle aViewInit; TakeTextAnchorRect( aViewInit ); - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) { Point aCenter(aViewInit.Center()); aCenter-=aViewInit.TopLeft(); @@ -2651,7 +2651,7 @@ void SdrObjCustomShape::TakeTextAnchorRect( tools::Rectangle& rAnchorRect ) cons rAnchorRect.SetRight( rAnchorRect.Left() + 1 ); // minimal width is 2 if ( rAnchorRect.GetHeight() < 2 ) rAnchorRect.SetBottom( rAnchorRect.Top() + 1 ); // minimal height is 2 - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) { Point aP( rAnchorRect.TopLeft() ); RotatePoint(aP, aRotateRef, maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); @@ -2785,7 +2785,7 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& if (eVAdj==SDRTEXTVERTADJUST_BOTTOM) aTextPos.AdjustY(nFreeHgt ); } - if (maGeo.nRotationAngle != 0_deg100) + if (maGeo.m_nRotationAngle != 0_deg100) RotatePoint(aTextPos,aAnkRect.TopLeft(), maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); if (pAnchorRect) @@ -3026,9 +3026,9 @@ void SdrObjCustomShape::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, // reset object shear and rotations fObjectRotation = 0.0; - maGeo.nRotationAngle = 0_deg100; + maGeo.m_nRotationAngle = 0_deg100; maGeo.RecalcSinCos(); - maGeo.nShearAngle = 0_deg100; + maGeo.m_nShearAngle = 0_deg100; maGeo.RecalcTan(); // if anchor is used, make position relative to it @@ -3061,9 +3061,9 @@ void SdrObjCustomShape::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, // #i123181# The fix for #121932# here was wrong, the trunk version does not correct the // mirrored shear values, neither at the object level, nor on the API or XML level. Taking // back the mirroring of the shear angle - aGeoStat.nShearAngle = Degree100(FRound(basegfx::rad2deg<100>(atan(fShearX)))); + aGeoStat.m_nShearAngle = Degree100(FRound(basegfx::rad2deg<100>(atan(fShearX)))); aGeoStat.RecalcTan(); - Shear(Point(), aGeoStat.nShearAngle, aGeoStat.mfTanShearAngle, false); + Shear(Point(), aGeoStat.m_nShearAngle, aGeoStat.mfTanShearAngle, false); } // rotation? @@ -3074,9 +3074,9 @@ void SdrObjCustomShape::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, // #i78696# // fRotate is mathematically correct, but aGeoStat.nRotationAngle is // mirrored -> mirror value here - aGeoStat.nRotationAngle = NormAngle36000(Degree100(FRound(-basegfx::rad2deg<100>(fRotate)))); + aGeoStat.m_nRotationAngle = NormAngle36000(Degree100(FRound(-basegfx::rad2deg<100>(fRotate)))); aGeoStat.RecalcSinCos(); - Rotate(Point(), aGeoStat.nRotationAngle, aGeoStat.mfSinRotationAngle, aGeoStat.mfCosRotationAngle); + Rotate(Point(), aGeoStat.m_nRotationAngle, aGeoStat.mfSinRotationAngle, aGeoStat.mfCosRotationAngle); } // translate? @@ -3115,7 +3115,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf { // get turn and shear double fRotate = basegfx::deg2rad(fObjectRotation); - double fShearX = toRadians(maGeo.nShearAngle); + double fShearX = toRadians(maGeo.m_nShearAngle); // get aRectangle, this is the unrotated snaprect tools::Rectangle aRectangle(getRectangle()); diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index ab8bc58ddf85..becc496c76f1 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -194,7 +194,7 @@ bool SdrCircObj::PaintNeedsXPolyCirc() const // ellipse segments. // If not WIN, then (for now) also for circle/ellipse segments and circle/ // ellipse arcs (for precision) - bool bNeed = maGeo.nRotationAngle || maGeo.nShearAngle || meCircleKind == SdrCircKind::Cut; + bool bNeed = maGeo.m_nRotationAngle || maGeo.m_nShearAngle || meCircleKind == SdrCircKind::Cut; // If not WIN, then for everything except full circle (for now!) if (meCircleKind!=SdrCircKind::Full) bNeed = true; @@ -290,7 +290,7 @@ basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrCircKind eCircleKind, } // #i76950# - if (maGeo.nShearAngle || maGeo.nRotationAngle) + if (maGeo.m_nShearAngle || maGeo.m_nRotationAngle) { // translate top left to (0,0) const basegfx::B2DPoint aTopLeft(aRange.getMinimum()); @@ -300,7 +300,7 @@ basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrCircKind eCircleKind, // shear, rotate and back to top left (if needed) aMatrix = basegfx::utils::createShearXRotateTranslateB2DHomMatrix( -maGeo.mfTanShearAngle, - maGeo.nRotationAngle ? toRadians(36000_deg100 - maGeo.nRotationAngle) : 0.0, + maGeo.m_nRotationAngle ? toRadians(36000_deg100 - maGeo.m_nRotationAngle) : 0.0, aTopLeft) * aMatrix; // apply transformation @@ -319,7 +319,7 @@ void SdrCircObj::RecalcXPoly() OUString SdrCircObj::TakeObjNameSingul() const { TranslateId pID=STR_ObjNameSingulCIRC; - if (getRectangle().GetWidth() == getRectangle().GetHeight() && maGeo.nShearAngle == 0_deg100) + if (getRectangle().GetWidth() == getRectangle().GetHeight() && maGeo.m_nShearAngle == 0_deg100) { switch (meCircleKind) { case SdrCircKind::Full: pID=STR_ObjNameSingulCIRC; break; @@ -348,7 +348,7 @@ OUString SdrCircObj::TakeObjNameSingul() const OUString SdrCircObj::TakeObjNamePlural() const { TranslateId pID=STR_ObjNamePluralCIRC; - if (getRectangle().GetWidth() == getRectangle().GetHeight() && maGeo.nShearAngle == 0_deg100) + if (getRectangle().GetWidth() == getRectangle().GetHeight() && maGeo.m_nShearAngle == 0_deg100) { switch (meCircleKind) { case SdrCircKind::Full: pID=STR_ObjNamePluralCIRC; break; @@ -470,12 +470,12 @@ void SdrCircObj::AddToHdlList(SdrHdlList& rHdlList) const break; } - if (maGeo.nShearAngle) + if (maGeo.m_nShearAngle) { ShearPoint(aPnt, aRectangle.TopLeft(), maGeo.mfTanShearAngle); } - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) { RotatePoint(aPnt, aRectangle.TopLeft(), maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); } @@ -483,7 +483,7 @@ void SdrCircObj::AddToHdlList(SdrHdlList& rHdlList) const std::unique_ptr<SdrHdl> pH(new SdrHdl(aPnt,eLocalKind)); pH->SetPointNum(nPNum); pH->SetObj(const_cast<SdrCircObj*>(this)); - pH->SetRotationAngle(maGeo.nRotationAngle); + pH->SetRotationAngle(maGeo.m_nRotationAngle); rHdlList.AddHdl(std::move(pH)); } } @@ -519,10 +519,10 @@ bool SdrCircObj::applySpecialDrag(SdrDragStat& rDrag) { Point aPt(rDrag.GetNow()); - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) RotatePoint(aPt, getRectangle().TopLeft(), -maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); - if (maGeo.nShearAngle) + if (maGeo.m_nShearAngle) ShearPoint(aPt, getRectangle().TopLeft(), -maGeo.mfTanShearAngle); aPt -= getRectangle().Center(); @@ -820,10 +820,10 @@ void SdrCircObj::NbcMove(const Size& aSize) void SdrCircObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { - Degree100 nAngle0 = maGeo.nRotationAngle; - bool bNoShearRota = (maGeo.nRotationAngle == 0_deg100 && maGeo.nShearAngle == 0_deg100); + Degree100 nAngle0 = maGeo.m_nRotationAngle; + bool bNoShearRota = (maGeo.m_nRotationAngle == 0_deg100 && maGeo.m_nShearAngle == 0_deg100); SdrTextObj::NbcResize(rRef,xFact,yFact); - bNoShearRota |= (maGeo.nRotationAngle == 0_deg100 && maGeo.nShearAngle == 0_deg100); + bNoShearRota |= (maGeo.m_nRotationAngle == 0_deg100 && maGeo.m_nShearAngle == 0_deg100); if (meCircleKind!=SdrCircKind::Full) { bool bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); bool bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); @@ -855,8 +855,8 @@ void SdrCircObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract nS0=-nE0; nE0=-nTmp; } - nS0 -= maGeo.nRotationAngle; - nE0 -= maGeo.nRotationAngle; + nS0 -= maGeo.m_nRotationAngle; + nE0 -= maGeo.m_nRotationAngle; } } Degree100 nAngleDif=nE0-nS0; @@ -898,12 +898,12 @@ void SdrCircObj::NbcMirror(const Point& rRef1, const Point& rRef2) if (nWdt==0) aTmpPt2.setX(0 ); if (nHgt==0) aTmpPt2.setY(0 ); aTmpPt2+=aCenter; - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) { RotatePoint(aTmpPt1, getRectangle().TopLeft(), maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); RotatePoint(aTmpPt2, getRectangle().TopLeft(), maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); } - if (maGeo.nShearAngle) + if (maGeo.m_nShearAngle) { ShearPoint(aTmpPt1, getRectangle().TopLeft(), maGeo.mfTanShearAngle); ShearPoint(aTmpPt2, getRectangle().TopLeft(), maGeo.mfTanShearAngle); @@ -914,13 +914,13 @@ void SdrCircObj::NbcMirror(const Point& rRef1, const Point& rRef2) MirrorPoint(aTmpPt1,rRef1,rRef2); MirrorPoint(aTmpPt2,rRef1,rRef2); // unrotate: - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) { RotatePoint(aTmpPt1, getRectangle().TopLeft(), -maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); // -sin for reversion RotatePoint(aTmpPt2, getRectangle().TopLeft(), -maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); // -sin for reversion } // unshear: - if (maGeo.nShearAngle) + if (maGeo.m_nShearAngle) { ShearPoint(aTmpPt1, getRectangle().TopLeft(), -maGeo.mfTanShearAngle); // -tan for reversion ShearPoint(aTmpPt2, getRectangle().TopLeft(), -maGeo.mfTanShearAngle); // -tan for reversion @@ -1000,7 +1000,7 @@ void SdrCircObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const if (meCircleKind==SdrCircKind::Section) { Union(rRect, getRectangle().Center()); } - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) { Point aDst(rRect.TopLeft()); aDst -= getRectangle().TopLeft(); @@ -1010,11 +1010,11 @@ void SdrCircObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const rRect.Move(aDst.X(),aDst.Y()); } } - if (maGeo.nShearAngle==0_deg100) + if (maGeo.m_nShearAngle==0_deg100) return; tools::Long nDst = FRound((rRect.Bottom() - rRect.Top()) * maGeo.mfTanShearAngle); - if (maGeo.nShearAngle > 0_deg100) + if (maGeo.m_nShearAngle > 0_deg100) { Point aRef(rRect.TopLeft()); rRect.AdjustLeft( -nDst ); @@ -1038,7 +1038,7 @@ void SdrCircObj::RecalcSnapRect() void SdrCircObj::NbcSetSnapRect(const tools::Rectangle& rRect) { - if (maGeo.nRotationAngle || maGeo.nShearAngle || meCircleKind != SdrCircKind::Full) + if (maGeo.m_nRotationAngle || maGeo.m_nShearAngle || meCircleKind != SdrCircKind::Full) { tools::Rectangle aSR0(GetSnapRect()); tools::Long nWdt0=aSR0.Right()-aSR0.Left(); diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index b36daff54745..0f7151e2957e 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -410,7 +410,7 @@ GraphicAttr SdrGrafObj::GetGraphicAttr( SdrGrafObjTransformsAttrs nTransformFlag { const bool bMirror = bool( nTransformFlags & SdrGrafObjTransformsAttrs::MIRROR ); const bool bRotate = bool( nTransformFlags & SdrGrafObjTransformsAttrs::ROTATE ) && - (maGeo.nRotationAngle && maGeo.nRotationAngle != 18000_deg100); + (maGeo.m_nRotationAngle && maGeo.m_nRotationAngle != 18000_deg100); // Need cropping info earlier const_cast<SdrGrafObj*>(this)->ImpSetAttrToGrafInfo(); @@ -421,7 +421,7 @@ GraphicAttr SdrGrafObj::GetGraphicAttr( SdrGrafObjTransformsAttrs nTransformFlag if( bMirror ) { - sal_uInt16 nMirrorCase = ( maGeo.nRotationAngle == 18000_deg100 ) ? ( bMirrored ? 3 : 4 ) : ( bMirrored ? 2 : 1 ); + sal_uInt16 nMirrorCase = ( maGeo.m_nRotationAngle == 18000_deg100 ) ? ( bMirrored ? 3 : 4 ) : ( bMirrored ? 2 : 1 ); bool bHMirr = nMirrorCase == 2 || nMirrorCase == 4; bool bVMirr = nMirrorCase == 3 || nMirrorCase == 4; @@ -429,7 +429,7 @@ GraphicAttr SdrGrafObj::GetGraphicAttr( SdrGrafObjTransformsAttrs nTransformFlag } if( bRotate ) - aActAttr.SetRotation( to<Degree10>(maGeo.nRotationAngle ) ); + aActAttr.SetRotation( to<Degree10>(maGeo.m_nRotationAngle ) ); } return aActAttr; @@ -559,9 +559,9 @@ void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const { bool bNoPresGrf = ( mpGraphicObject->GetType() != GraphicType::NONE ) && !m_bEmptyPresObj; - rInfo.bResizeFreeAllowed = maGeo.nRotationAngle.get() % 9000 == 0 || - maGeo.nRotationAngle.get() % 18000 == 0 || - maGeo.nRotationAngle.get() % 27000 == 0; + rInfo.bResizeFreeAllowed = maGeo.m_nRotationAngle.get() % 9000 == 0 || + maGeo.m_nRotationAngle.get() % 18000 == 0 || + maGeo.m_nRotationAngle.get() % 27000 == 0; rInfo.bResizePropAllowed = true; rInfo.bRotateFreeAllowed = bNoPresGrf; @@ -916,16 +916,16 @@ rtl::Reference<SdrObject> SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAdd // copy transformation GeoStat aGeoStat(GetGeoStat()); - if(aGeoStat.nShearAngle) + if(aGeoStat.m_nShearAngle) { aGeoStat.RecalcTan(); - pGrp->NbcShear(getRectangle().TopLeft(), aGeoStat.nShearAngle, aGeoStat.mfTanShearAngle, false); + pGrp->NbcShear(getRectangle().TopLeft(), aGeoStat.m_nShearAngle, aGeoStat.mfTanShearAngle, false); } - if(aGeoStat.nRotationAngle) + if(aGeoStat.m_nRotationAngle) { aGeoStat.RecalcSinCos(); - pGrp->NbcRotate(getRectangle().TopLeft(), aGeoStat.nRotationAngle, aGeoStat.mfSinRotationAngle, aGeoStat.mfCosRotationAngle); + pGrp->NbcRotate(getRectangle().TopLeft(), aGeoStat.m_nRotationAngle, aGeoStat.mfSinRotationAngle, aGeoStat.mfCosRotationAngle); } } diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index b19667696523..9831cf9124c9 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -690,8 +690,8 @@ void SdrMeasureObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const aTextPos.AdjustY( -(aTextSize2.Width()) ); } } - if (aMPol.nTextAngle != maGeo.nRotationAngle) { - const_cast<SdrMeasureObj*>(this)->maGeo.nRotationAngle=aMPol.nTextAngle; + if (aMPol.nTextAngle != maGeo.m_nRotationAngle) { + const_cast<SdrMeasureObj*>(this)->maGeo.m_nRotationAngle=aMPol.nTextAngle; const_cast<SdrMeasureObj*>(this)->maGeo.RecalcSinCos(); } RotatePoint(aTextPos,aPt1b,aMPol.nLineSin,aMPol.nLineCos); @@ -700,8 +700,8 @@ void SdrMeasureObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const rRect.Normalize(); const_cast<SdrMeasureObj*>(this)->setRectangle(rRect); - if (aMPol.nTextAngle != maGeo.nRotationAngle) { - const_cast<SdrMeasureObj*>(this)->maGeo.nRotationAngle=aMPol.nTextAngle; + if (aMPol.nTextAngle != maGeo.m_nRotationAngle) { + const_cast<SdrMeasureObj*>(this)->maGeo.m_nRotationAngle=aMPol.nTextAngle; const_cast<SdrMeasureObj*>(this)->maGeo.RecalcSinCos(); } } diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 78012451b2bd..d76faf320439 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -1676,8 +1676,8 @@ void SdrPathObj::ImpForceLineAngle() const basegfx::B2DPoint aB2DDelt(aB2DPoint1 - aB2DPoint0); const Point aDelt(FRound(aB2DDelt.getX()), FRound(aB2DDelt.getY())); - maGeo.nRotationAngle=GetAngle(aDelt); - maGeo.nShearAngle=0_deg100; + maGeo.m_nRotationAngle=GetAngle(aDelt); + maGeo.m_nShearAngle=0_deg100; maGeo.RecalcSinCos(); maGeo.RecalcTan(); @@ -2345,7 +2345,7 @@ void SdrPathObj::NbcMirror(const Point& rRefPnt1, const Point& rRefPnt2) void SdrPathObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const { - if(!maGeo.nRotationAngle) + if(!maGeo.m_nRotationAngle) { rRect = GetSnapRect(); } @@ -2807,17 +2807,17 @@ bool SdrPathObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DP } else { - if(maGeo.nShearAngle || maGeo.nRotationAngle) + if(maGeo.m_nShearAngle || maGeo.m_nRotationAngle) { // get rotate and shear in drawingLayer notation - fRotate = toRadians(maGeo.nRotationAngle); - fShearX = toRadians(maGeo.nShearAngle); + fRotate = toRadians(maGeo.m_nRotationAngle); + fShearX = toRadians(maGeo.m_nShearAngle); // build mathematically correct (negative shear and rotate) object transform // containing shear and rotate to extract unsheared, unrotated polygon basegfx::B2DHomMatrix aObjectMatrix; aObjectMatrix.shearX(-maGeo.mfTanShearAngle); - aObjectMatrix.rotate(toRadians(36000_deg100 - maGeo.nRotationAngle)); + aObjectMatrix.rotate(toRadians(36000_deg100 - maGeo.m_nRotationAngle)); // create inverse from it and back-transform polygon basegfx::B2DHomMatrix aInvObjectMatrix(aObjectMatrix); @@ -2905,9 +2905,9 @@ void SdrPathObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b basegfx::B2DPolyPolygon aNewPolyPolygon(rPolyPolygon); // reset object shear and rotations - maGeo.nRotationAngle = 0_deg100; + maGeo.m_nRotationAngle = 0_deg100; maGeo.RecalcSinCos(); - maGeo.nShearAngle = 0_deg100; + maGeo.m_nShearAngle = 0_deg100; maGeo.RecalcTan(); if( getSdrModelFromSdrObject().IsWriter() ) @@ -2953,7 +2953,7 @@ void SdrPathObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b if(!basegfx::fTools::equalZero(fShearX)) { aTransform.shearX(tan(-atan(fShearX))); - maGeo.nShearAngle = Degree100(FRound(basegfx::rad2deg<100>(atan(fShearX)))); + maGeo.m_nShearAngle = Degree100(FRound(basegfx::rad2deg<100>(atan(fShearX)))); maGeo.RecalcTan(); } @@ -2967,7 +2967,7 @@ void SdrPathObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b // #i78696# // fRotate is mathematically correct, but aGeoStat.nRotationAngle is // mirrored -> mirror value here - maGeo.nRotationAngle = NormAngle36000(Degree100(FRound(-basegfx::rad2deg<100>(fRotate)))); + maGeo.m_nRotationAngle = NormAngle36000(Degree100(FRound(-basegfx::rad2deg<100>(fRotate)))); maGeo.RecalcSinCos(); } diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx index a11151fb280d..7f805a2d2892 100644 --- a/svx/source/svdraw/svdorect.cxx +++ b/svx/source/svdraw/svdorect.cxx @@ -122,8 +122,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 (maGeo.nShearAngle) ShearXPoly(aXPoly, getRectangle().TopLeft(), maGeo.mfTanShearAngle); - if (maGeo.nRotationAngle) RotateXPoly(aXPoly, getRectangle().TopLeft(), maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); + if (maGeo.m_nShearAngle) ShearXPoly(aXPoly, getRectangle().TopLeft(), maGeo.mfTanShearAngle); + if (maGeo.m_nRotationAngle) RotateXPoly(aXPoly, getRectangle().TopLeft(), maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); return aXPoly; } @@ -145,7 +145,7 @@ const XPolygon& SdrRectObj::GetXPoly() const void SdrRectObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const { bool bNoTextFrame=!IsTextFrame(); - rInfo.bResizeFreeAllowed=bNoTextFrame || ((maGeo.nRotationAngle.get() % 9000) == 0); + rInfo.bResizeFreeAllowed=bNoTextFrame || ((maGeo.m_nRotationAngle.get() % 9000) == 0); rInfo.bResizePropAllowed=true; rInfo.bRotateFreeAllowed=true; rInfo.bRotate90Allowed =true; @@ -178,11 +178,11 @@ SdrObjKind SdrRectObj::GetObjIdentifier() const void SdrRectObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const { rRect = getRectangle(); - if (maGeo.nShearAngle==0_deg100) + if (maGeo.m_nShearAngle==0_deg100) return; tools::Long nDst=FRound((getRectangle().Bottom()-getRectangle().Top()) * maGeo.mfTanShearAngle); - if (maGeo.nShearAngle>0_deg100) + if (maGeo.m_nShearAngle>0_deg100) { Point aRef(rRect.TopLeft()); rRect.AdjustLeft( -nDst ); @@ -206,7 +206,7 @@ OUString SdrRectObj::TakeObjNameSingul() const bool bRounded = GetEckenradius() != 0; // rounded down TranslateId pResId = bRounded ? STR_ObjNameSingulRECTRND : STR_ObjNameSingulRECT; - if (maGeo.nShearAngle) + if (maGeo.m_nShearAngle) { pResId = bRounded ? STR_ObjNameSingulPARALRND : STR_ObjNameSingulPARAL; // parallelogram or, maybe, rhombus } @@ -232,7 +232,7 @@ OUString SdrRectObj::TakeObjNamePlural() const bool bRounded = GetEckenradius() != 0; // rounded down TranslateId pResId = bRounded ? STR_ObjNamePluralRECTRND : STR_ObjNamePluralRECT; - if (maGeo.nShearAngle) + if (maGeo.m_nShearAngle) { pResId = bRounded ? STR_ObjNamePluralPARALRND : STR_ObjNamePluralPARAL; // parallelogram or rhombus } @@ -259,7 +259,7 @@ basegfx::B2DPolyPolygon SdrRectObj::TakeXorPoly() const void SdrRectObj::RecalcSnapRect() { tools::Long nEckRad=GetEckenradius(); - if ((maGeo.nRotationAngle || maGeo.nShearAngle) && nEckRad!=0) { + if ((maGeo.m_nRotationAngle || maGeo.m_nShearAngle) && nEckRad!=0) { maSnapRect=GetXPoly().GetBoundRect(); } else { SdrTextObj::RecalcSnapRect(); @@ -291,7 +291,7 @@ void SdrRectObj::AddToHdlList(SdrHdlList& rHdlList) const OSL_ENSURE(!IsTextEditActive(), "Do not use an ImpTextframeHdl for highlighting text in active text edit, this will collide with EditEngine paints (!)"); std::unique_ptr<SdrHdl> pH(new ImpTextframeHdl(getRectangle())); pH->SetObj(const_cast<SdrRectObj*>(this)); - pH->SetRotationAngle(maGeo.nRotationAngle); + pH->SetRotationAngle(maGeo.m_nRotationAngle); rHdlList.AddHdl(std::move(pH)); } @@ -323,18 +323,18 @@ void SdrRectObj::AddToHdlList(SdrHdlList& rHdlList) const case 9: aPnt = rRectangle.BottomRight(); eKind = SdrHdlKind::LowerRight; break; } - if (maGeo.nShearAngle) + if (maGeo.m_nShearAngle) { ShearPoint(aPnt,rRectangle.TopLeft(),maGeo.mfTanShearAngle); } - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) { RotatePoint(aPnt,rRectangle.TopLeft(),maGeo.mfSinRotationAngle,maGeo.mfCosRotationAngle); } std::unique_ptr<SdrHdl> pH(new SdrHdl(aPnt,eKind)); pH->SetObj(const_cast<SdrRectObj*>(this)); - pH->SetRotationAngle(maGeo.nRotationAngle); + pH->SetRotationAngle(maGeo.m_nRotationAngle); rHdlList.AddHdl(std::move(pH)); } } @@ -366,7 +366,7 @@ bool SdrRectObj::applySpecialDrag(SdrDragStat& rDrag) { Point aPt(rDrag.GetNow()); - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) RotatePoint(aPt, getRectangle().TopLeft(), -maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); sal_Int32 nRad(aPt.X() - getRectangle().Left()); @@ -404,7 +404,7 @@ OUString SdrRectObj::getSpecialDragComment(const SdrDragStat& rDrag) const Point aPt(rDrag.GetNow()); // -sin for reversal - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) RotatePoint(aPt, getRectangle().TopLeft(), -maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); sal_Int32 nRad(aPt.X() - getRectangle().Left()); @@ -491,9 +491,9 @@ SdrGluePoint SdrRectObj::GetVertexGluePoint(sal_uInt16 nPosNum) const case 2: aPt = rRectangle.BottomCenter(); aPt.AdjustY(nWdt ); break; case 3: aPt = rRectangle.LeftCenter(); aPt.AdjustX( -nWdt ); break; } - if (maGeo.nShearAngle) + if (maGeo.m_nShearAngle) ShearPoint(aPt, rRectangle.TopLeft(), maGeo.mfTanShearAngle); - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) RotatePoint(aPt, rRectangle.TopLeft(), maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); aPt-=GetSnapRect().Center(); SdrGluePoint aGP(aPt); @@ -520,9 +520,9 @@ SdrGluePoint SdrRectObj::GetCornerGluePoint(sal_uInt16 nPosNum) const case 2: aPt = rRectangle.BottomRight(); aPt.AdjustX(nWdt ); aPt.AdjustY(nWdt ); break; case 3: aPt = rRectangle.BottomLeft(); aPt.AdjustX( -nWdt ); aPt.AdjustY(nWdt ); break; } - if (maGeo.nShearAngle) + if (maGeo.m_nShearAngle) ShearPoint(aPt, rRectangle.TopLeft(),maGeo.mfTanShearAngle); - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) RotatePoint(aPt, rRectangle.TopLeft(),maGeo.mfSinRotationAngle,maGeo.mfCosRotationAngle); aPt-=GetSnapRect().Center(); SdrGluePoint aGP(aPt); diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index a27e112d85cb..123f264c7f81 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -419,9 +419,9 @@ void SdrTextObj::ImpJustifyRect(tools::Rectangle& rRect) void SdrTextObj::ImpCheckShear() { - if (mbNoShear && maGeo.nShearAngle) + if (mbNoShear && maGeo.m_nShearAngle) { - maGeo.nShearAngle = 0_deg100; + maGeo.m_nShearAngle = 0_deg100; maGeo.mfTanShearAngle = 0; } } @@ -429,7 +429,7 @@ void SdrTextObj::ImpCheckShear() void SdrTextObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const { bool bNoTextFrame=!IsTextFrame(); - rInfo.bResizeFreeAllowed=bNoTextFrame || ((maGeo.nRotationAngle.get() % 9000) == 0); + rInfo.bResizeFreeAllowed=bNoTextFrame || ((maGeo.m_nRotationAngle.get() % 9000) == 0); rInfo.bResizePropAllowed=true; rInfo.bRotateFreeAllowed=true; rInfo.bRotate90Allowed =true; @@ -565,10 +565,10 @@ void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, tools::Rectangle basegfx::B2DHomMatrix aMatrix(basegfx::utils::createTranslateB2DHomMatrix( -rAnchorRect.Left(), -rAnchorRect.Top())); - if(maGeo.nRotationAngle) + if(maGeo.m_nRotationAngle) { // Unrotate! - aMatrix.rotate(-toRadians(maGeo.nRotationAngle)); + aMatrix.rotate(-toRadians(maGeo.m_nRotationAngle)); } aXorPolyPolygon.transform(aMatrix); @@ -668,7 +668,7 @@ void SdrTextObj::TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const if (aAnkRect.GetWidth()<2) aAnkRect.SetRight(aAnkRect.Left()+1 ); // minimum size h and v: 2 px if (aAnkRect.GetHeight()<2) aAnkRect.SetBottom(aAnkRect.Top()+1 ); } - if (maGeo.nRotationAngle) { + if (maGeo.m_nRotationAngle) { Point aTmpPt(aAnkRect.TopLeft()); RotatePoint(aTmpPt,aRotateRef,maGeo.mfSinRotationAngle,maGeo.mfCosRotationAngle); aTmpPt-=aAnkRect.TopLeft(); @@ -838,7 +838,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRe if (eVAdj==SDRTEXTVERTADJUST_BOTTOM) aTextPos.AdjustY(nFreeHgt ); } - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) RotatePoint(aTextPos,aAnkRect.TopLeft(),maGeo.mfSinRotationAngle,maGeo.mfCosRotationAngle); if (pAnchorRect) @@ -1100,9 +1100,9 @@ rtl::Reference<SdrObject> SdrTextObj::CloneSdrObject(SdrModel& rTargetModel) con basegfx::B2DPolyPolygon SdrTextObj::TakeXorPoly() const { tools::Polygon aPol(getRectangle()); - if (maGeo.nShearAngle) + if (maGeo.m_nShearAngle) ShearPoly(aPol, getRectangle().TopLeft(), maGeo.mfTanShearAngle); - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) RotatePoly(aPol, getRectangle().TopLeft(), maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); basegfx::B2DPolyPolygon aRetval; @@ -1129,7 +1129,7 @@ basegfx::B2DPolyPolygon SdrTextObj::TakeContour() const bool bFitToSize(IsFitToSize()); if (bFitToSize) aR=aAnchor2; tools::Polygon aPol(aR); - if (maGeo.nRotationAngle) RotatePoly(aPol,aR.TopLeft(), maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); + if (maGeo.m_nRotationAngle) RotatePoly(aPol,aR.TopLeft(), maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); aRetval.append(aPol.getB2DPolygon()); } @@ -1139,7 +1139,7 @@ basegfx::B2DPolyPolygon SdrTextObj::TakeContour() const void SdrTextObj::RecalcSnapRect() { - if (maGeo.nRotationAngle || maGeo.nShearAngle) + if (maGeo.m_nRotationAngle || maGeo.m_nShearAngle) { maSnapRect = Rect2Poly(getRectangle(), maGeo).GetBoundRect(); } else { @@ -1163,9 +1163,9 @@ Point SdrTextObj::GetSnapPoint(sal_uInt32 i) const case 3: aP = aRectangle.BottomRight(); break; default: aP = aRectangle.Center(); break; } - if (maGeo.nShearAngle) + if (maGeo.m_nShearAngle) ShearPoint(aP, aRectangle.TopLeft(), maGeo.mfTanShearAngle); - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) RotatePoint(aP, aRectangle.TopLeft(), maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); return aP; } @@ -1654,8 +1654,8 @@ bool SdrTextObj::IsTopToBottom() const bool SdrTextObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& /*rPolyPolygon*/) const { // get turn and shear - double fRotate = toRadians(maGeo.nRotationAngle); - double fShearX = toRadians(maGeo.nShearAngle); + double fRotate = toRadians(maGeo.m_nRotationAngle); + double fShearX = toRadians(maGeo.m_nShearAngle); // get aRect, this is the unrotated snaprect tools::Rectangle aRectangle(getRectangle()); @@ -1708,9 +1708,9 @@ void SdrTextObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b } // reset object shear and rotations - maGeo.nRotationAngle = 0_deg100; + maGeo.m_nRotationAngle = 0_deg100; maGeo.RecalcSinCos(); - maGeo.nShearAngle = 0_deg100; + maGeo.m_nShearAngle = 0_deg100; maGeo.RecalcTan(); // if anchor is used, make position relative to it @@ -1741,9 +1741,9 @@ void SdrTextObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b if(!basegfx::fTools::equalZero(fShearX)) { GeoStat aGeoStat; - aGeoStat.nShearAngle = Degree100(FRound(basegfx::rad2deg<100>(atan(fShearX)))); + aGeoStat.m_nShearAngle = Degree100(FRound(basegfx::rad2deg<100>(atan(fShearX)))); aGeoStat.RecalcTan(); - Shear(Point(), aGeoStat.nShearAngle, aGeoStat.mfTanShearAngle, false); + Shear(Point(), aGeoStat.m_nShearAngle, aGeoStat.mfTanShearAngle, false); } // rotation? @@ -1754,9 +1754,9 @@ void SdrTextObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b // #i78696# // fRotate is matematically correct, but aGeoStat.nRotationAngle is // mirrored -> mirror value here - aGeoStat.nRotationAngle = NormAngle36000(Degree100(FRound(-basegfx::rad2deg<100>(fRotate)))); + aGeoStat.m_nRotationAngle = NormAngle36000(Degree100(FRound(-basegfx::rad2deg<100>(fRotate)))); aGeoStat.RecalcSinCos(); - Rotate(Point(), aGeoStat.nRotationAngle, aGeoStat.mfSinRotationAngle, aGeoStat.mfCosRotationAngle); + Rotate(Point(), aGeoStat.m_nRotationAngle, aGeoStat.mfSinRotationAngle, aGeoStat.mfCosRotationAngle); } // translate? @@ -1891,10 +1891,10 @@ GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle( // get outliner set up. To avoid getting a somehow rotated MetaFile, // temporarily disable object rotation. - Degree100 nAngle(maGeo.nRotationAngle); - maGeo.nRotationAngle = 0_deg100; + Degree100 nAngle(maGeo.m_nRotationAngle); + maGeo.m_nRotationAngle = 0_deg100; ImpSetupDrawOutlinerForPaint( bContourFrame, rOutliner, aTextRect, aAnchorRect, aPaintRect, aFitXCorrection ); - maGeo.nRotationAngle = nAngle; + maGeo.m_nRotationAngle = nAngle; tools::Rectangle aScrollFrameRect(aPaintRect); const SfxItemSet& rSet = GetObjectItemSet(); diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx index 35a467327dc9..4957a4fe9806 100644 --- a/svx/source/svdraw/svdotxat.cxx +++ b/svx/source/svdraw/svdotxat.cxx @@ -224,7 +224,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt, } } - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) { // Object is rotated. Point aD1(rR.TopLeft()); diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx index c4a9046d0c0e..b758b75fe59c 100644 --- a/svx/source/svdraw/svdotxdr.cxx +++ b/svx/source/svdraw/svdotxdr.cxx @@ -55,13 +55,13 @@ void SdrTextObj::AddToHdlList(SdrHdlList& rHdlList) const case 6: aPnt = aRectangle.BottomCenter(); eKind=SdrHdlKind::Lower; break; case 7: aPnt = aRectangle.BottomRight(); eKind=SdrHdlKind::LowerRight; break; } - if (maGeo.nShearAngle) + if (maGeo.m_nShearAngle) ShearPoint(aPnt, aRectangle.TopLeft(), maGeo.mfTanShearAngle); - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) RotatePoint(aPnt, aRectangle.TopLeft(), maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); std::unique_ptr<SdrHdl> pH(new SdrHdl(aPnt,eKind)); pH->SetObj(const_cast<SdrTextObj*>(this)); - pH->SetRotationAngle(maGeo.nRotationAngle); + pH->SetRotationAngle(maGeo.m_nRotationAngle); rHdlList.AddHdl(std::move(pH)); } } @@ -82,9 +82,9 @@ tools::Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const bool bBigOrtho=bEcke && bOrtho && rDrag.GetView()->IsBigOrtho(); Point aPos(rDrag.GetNow()); // Unrotate: - if (maGeo.nRotationAngle) RotatePoint(aPos,aTmpRect.TopLeft(),-maGeo.mfSinRotationAngle,maGeo.mfCosRotationAngle); + if (maGeo.m_nRotationAngle) RotatePoint(aPos,aTmpRect.TopLeft(),-maGeo.mfSinRotationAngle,maGeo.mfCosRotationAngle); // Unshear: - if (maGeo.nShearAngle) ShearPoint(aPos,aTmpRect.TopLeft(),-maGeo.mfTanShearAngle); + if (maGeo.m_nShearAngle) ShearPoint(aPos,aTmpRect.TopLeft(),-maGeo.mfTanShearAngle); bool bLft=(eHdl==SdrHdlKind::UpperLeft || eHdl==SdrHdlKind::Left || eHdl==SdrHdlKind::LowerLeft); bool bRgt=(eHdl==SdrHdlKind::UpperRight || eHdl==SdrHdlKind::Right || eHdl==SdrHdlKind::LowerRight); @@ -153,14 +153,14 @@ bool SdrTextObj::applySpecialDrag(SdrDragStat& rDrag) { tools::Rectangle aNewRect(ImpDragCalcRect(rDrag)); - if(aNewRect.TopLeft() != getRectangle().TopLeft() && (maGeo.nRotationAngle || maGeo.nShearAngle)) + if(aNewRect.TopLeft() != getRectangle().TopLeft() && (maGeo.m_nRotationAngle || maGeo.m_nShearAngle)) { Point aNewPos(aNewRect.TopLeft()); - if (maGeo.nShearAngle) + if (maGeo.m_nShearAngle) ShearPoint(aNewPos, getRectangle().TopLeft(), maGeo.mfTanShearAngle); - if (maGeo.nRotationAngle) + if (maGeo.m_nRotationAngle) RotatePoint(aNewPos, getRectangle().TopLeft(), maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle); aNewRect.SetPos(aNewPos); diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index 96523d679471..120bf26b1751 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -115,7 +115,7 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl) if(pOutlinerParaObject) { - if (maGeo.nRotationAngle || IsFontwork()) + if (maGeo.m_nRotationAngle || IsFontwork()) { // only repaint here, no real objectchange BroadcastObjectChange(); @@ -134,7 +134,7 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Recta Size aPaperMin,aPaperMax; tools::Rectangle aViewInit; TakeTextAnchorRect(aViewInit); - if (maGeo.nRotationAngle) { + if (maGeo.m_nRotationAngle) { Point aCenter(aViewInit.Center()); aCenter-=aViewInit.TopLeft(); Point aCenter0(aCenter); diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index 1454bc52f946..fbe6b0b3579b 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -42,7 +42,7 @@ using namespace com::sun::star; void SdrTextObj::NbcSetSnapRect(const tools::Rectangle& rRect) { - if (maGeo.nRotationAngle || maGeo.nShearAngle) + if (maGeo.m_nRotationAngle || maGeo.m_nShearAngle) { // Either the rotation or shear angle exists. tools::Rectangle aSR0(GetSnapRect()); @@ -84,12 +84,12 @@ void SdrTextObj::NbcSetLogicRect(const tools::Rectangle& rRect) Degree100 SdrTextObj::GetRotateAngle() const { - return maGeo.nRotationAngle; + return maGeo.m_nRotationAngle; } Degree100 SdrTextObj::GetShearAngle(bool /*bVertical*/) const { - return maGeo.nShearAngle; + return maGeo.m_nShearAngle; } void SdrTextObj::NbcMove(const Size& rSize) @@ -102,8 +102,8 @@ void SdrTextObj::NbcMove(const Size& rSize) void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { - bool bNotSheared=maGeo.nShearAngle==0_deg100; - bool bRotate90=bNotSheared && maGeo.nRotationAngle.get() % 9000 ==0; + bool bNotSheared=maGeo.m_nShearAngle==0_deg100; + bool bRotate90=bNotSheared && maGeo.m_nRotationAngle.get() % 9000 ==0; bool bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); bool bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); if (bXMirr || bYMirr) { @@ -120,7 +120,7 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract } } - if (maGeo.nRotationAngle==0_deg100 && maGeo.nShearAngle==0_deg100) { + if (maGeo.m_nRotationAngle==0_deg100 && maGeo.m_nShearAngle==0_deg100) { auto aRectangle = getRectangle(); ResizeRect(aRectangle, rRef, xFact, yFact); setRectangle(aRectangle); @@ -128,7 +128,7 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract { maRectangle.Normalize(); moveRectangle(aRectangle.Right() - aRectangle.Left(), aRectangle.Bottom() - aRectangle.Top()); - maGeo.nRotationAngle=18000_deg100; + maGeo.m_nRotationAngle=18000_deg100; maGeo.RecalcSinCos(); } } @@ -157,19 +157,19 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract } if (bRotate90) { - bool bRota90=maGeo.nRotationAngle.get() % 9000 ==0; + bool bRota90=maGeo.m_nRotationAngle.get() % 9000 ==0; if (!bRota90) { // there's seems to be a rounding error occurring: correct it - Degree100 a=NormAngle36000(maGeo.nRotationAngle); + Degree100 a=NormAngle36000(maGeo.m_nRotationAngle); if (a<4500_deg100) a=0_deg100; else if (a<13500_deg100) a=9000_deg100; else if (a<22500_deg100) a=18000_deg100; else if (a<31500_deg100) a=27000_deg100; else a=0_deg100; - maGeo.nRotationAngle=a; + maGeo.m_nRotationAngle=a; maGeo.RecalcSinCos(); } - if (bNotSheared!=(maGeo.nShearAngle==0_deg100)) { // correct a rounding error occurring with Shear - maGeo.nShearAngle=0_deg100; + if (bNotSheared!=(maGeo.m_nShearAngle==0_deg100)) { // correct a rounding error occurring with Shear + maGeo.m_nShearAngle=0_deg100; maGeo.RecalcTan(); } } @@ -198,12 +198,12 @@ void SdrTextObj::NbcRotate(const Point& rRef, Degree100 nAngle, double sn, doubl tools::Rectangle aRectangle(aPoint1, aPoint2); setRectangle(aRectangle); - if (maGeo.nRotationAngle==0_deg100) { - maGeo.nRotationAngle=NormAngle36000(nAngle); + if (maGeo.m_nRotationAngle==0_deg100) { + maGeo.m_nRotationAngle=NormAngle36000(nAngle); maGeo.mfSinRotationAngle=sn; maGeo.mfCosRotationAngle=cs; } else { - maGeo.nRotationAngle=NormAngle36000(maGeo.nRotationAngle+nAngle); + maGeo.m_nRotationAngle=NormAngle36000(maGeo.m_nRotationAngle+nAngle); maGeo.RecalcSinCos(); } SetBoundAndSnapRectsDirty(); @@ -238,12 +238,12 @@ void SdrTextObj::NbcShear(const Point& rRef, Degree100 /*nAngle*/, double tn, bo void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2) { SetGlueReallyAbsolute(true); - bool bNotSheared=maGeo.nShearAngle==0_deg100; + bool bNotSheared=maGeo.m_nShearAngle==0_deg100; bool bRotate90 = false; if (bNotSheared && (rRef1.X()==rRef2.X() || rRef1.Y()==rRef2.Y() || std::abs(rRef1.X()-rRef2.X())==std::abs(rRef1.Y()-rRef2.Y()))) { - bRotate90=maGeo.nRotationAngle.get() % 9000 ==0; + bRotate90=maGeo.m_nRotationAngle.get() % 9000 ==0; } tools::Polygon aPol(Rect2Poly(getRectangle(),maGeo)); sal_uInt16 i; @@ -262,20 +262,20 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2) setRectangle(aRectangle); if (bRotate90) { - bool bRota90=maGeo.nRotationAngle.get() % 9000 ==0; + bool bRota90=maGeo.m_nRotationAngle.get() % 9000 ==0; if (bRotate90 && !bRota90) { // there's seems to be a rounding error occurring: correct it - Degree100 a=NormAngle36000(maGeo.nRotationAngle); + Degree100 a=NormAngle36000(maGeo.m_nRotationAngle); if (a<4500_deg100) a=0_deg100; else if (a<13500_deg100) a=9000_deg100; else if (a<22500_deg100) a=18000_deg100; else if (a<31500_deg100) a=27000_deg100; else a=0_deg100; - maGeo.nRotationAngle=a; + maGeo.m_nRotationAngle=a; maGeo.RecalcSinCos(); } } - if (bNotSheared!=(maGeo.nShearAngle==0_deg100)) { // correct a rounding error occurring with Shear - maGeo.nShearAngle=0_deg100; + if (bNotSheared!=(maGeo.m_nShearAngle==0_deg100)) { // correct a rounding error occurring with Shear + maGeo.m_nShearAngle=0_deg100; maGeo.RecalcTan(); } diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx index 5cf4a5e55709..2027520d1ccc 100644 --- a/svx/source/svdraw/svdouno.cxx +++ b/svx/source/svdraw/svdouno.cxx @@ -291,17 +291,17 @@ void SdrUnoObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fracti { SdrRectObj::NbcResize(rRef,xFact,yFact); - if (maGeo.nShearAngle==0_deg100 && maGeo.nRotationAngle==0_deg100) + if (maGeo.m_nShearAngle==0_deg100 && maGeo.m_nRotationAngle==0_deg100) return; // small correctors - if (maGeo.nRotationAngle>=9000_deg100 && maGeo.nRotationAngle<27000_deg100) + if (maGeo.m_nRotationAngle>=9000_deg100 && maGeo.m_nRotationAngle<27000_deg100) { moveRectangle(getRectangle().Left() - getRectangle().Right(), getRectangle().Top() - getRectangle().Bottom()); } - maGeo.nRotationAngle = 0_deg100; - maGeo.nShearAngle = 0_deg100; + maGeo.m_nRotationAngle = 0_deg100; + maGeo.m_nShearAngle = 0_deg100; maGeo.mfSinRotationAngle = 0.0; maGeo.mfCosRotationAngle = 1.0; maGeo.mfTanShearAngle = 0.0; diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx index 563b268f67d9..967ce9042c04 100644 --- a/svx/source/svdraw/svdtrans.cxx +++ b/svx/source/svdraw/svdtrans.cxx @@ -443,11 +443,11 @@ tools::Long GetLen(const Point& rPnt) void GeoStat::RecalcSinCos() { - if (nRotationAngle==0_deg100) { + if (m_nRotationAngle==0_deg100) { mfSinRotationAngle=0.0; mfCosRotationAngle=1.0; } else { - double a = toRadians(nRotationAngle); + double a = toRadians(m_nRotationAngle); mfSinRotationAngle=sin(a); mfCosRotationAngle=cos(a); } @@ -455,10 +455,10 @@ void GeoStat::RecalcSinCos() void GeoStat::RecalcTan() { - if (nShearAngle==0_deg100) { + if (m_nShearAngle==0_deg100) { mfTanShearAngle=0.0; } else { - double a = toRadians(nShearAngle); + double a = toRadians(m_nShearAngle); mfTanShearAngle=tan(a); } } @@ -472,8 +472,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) ShearPoly(aPol,rRect.TopLeft(),rGeo.mfTanShearAngle); - if (rGeo.nRotationAngle) RotatePoly(aPol,rRect.TopLeft(),rGeo.mfSinRotationAngle,rGeo.mfCosRotationAngle); + if (rGeo.m_nShearAngle) ShearPoly(aPol,rRect.TopLeft(),rGeo.mfTanShearAngle); + if (rGeo.m_nRotationAngle) RotatePoly(aPol,rRect.TopLeft(),rGeo.mfSinRotationAngle,rGeo.mfCosRotationAngle); return aPol; } @@ -481,20 +481,20 @@ namespace svx { tools::Rectangle polygonToRectangle(const tools::Polygon& rPolygon, GeoStat& rGeo) { - rGeo.nRotationAngle = GetAngle(rPolygon[1] - rPolygon[0]); - rGeo.nRotationAngle = NormAngle36000(rGeo.nRotationAngle); + rGeo.m_nRotationAngle = GetAngle(rPolygon[1] - rPolygon[0]); + rGeo.m_nRotationAngle = NormAngle36000(rGeo.m_nRotationAngle); // rotation successful rGeo.RecalcSinCos(); Point aPoint1(rPolygon[1] - rPolygon[0]); - if (rGeo.nRotationAngle) + if (rGeo.m_nRotationAngle) RotatePoint(aPoint1, Point(0,0), -rGeo.mfSinRotationAngle, rGeo.mfCosRotationAngle); // -Sin to reverse rotation tools::Long nWidth = aPoint1.X(); Point aPoint0(rPolygon[0]); Point aPoint3(rPolygon[3] - rPolygon[0]); - if (rGeo.nRotationAngle) + if (rGeo.m_nRotationAngle) RotatePoint(aPoint3, Point(0,0), -rGeo.mfSinRotationAngle, rGeo.mfCosRotationAngle); // -Sin to reverse rotation tools::Long nHeight = aPoint3.Y(); @@ -522,7 +522,7 @@ tools::Rectangle polygonToRectangle(const tools::Polygon& rPolygon, GeoStat& rGe if (nShearAngle > SDRMAXSHEAR) nShearAngle = SDRMAXSHEAR; - rGeo.nShearAngle = nShearAngle; + rGeo.m_nShearAngle = nShearAngle; rGeo.RecalcTan(); Point aRU(aPoint0); |