diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2022-07-23 23:48:24 +1000 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2022-08-24 10:55:15 +0200 |
commit | 59210b075b79e4fc58f86542d9947d6ed0073abd (patch) | |
tree | af9f6c1a8d5de2d2ccde0e8671f9b320775a5f98 /svx/source/svdraw/svdobj.cxx | |
parent | 51d2e734099e5c5c56393ef9f08007a7df441794 (diff) |
tools: rename Rectangle::Justify() to Rectangle::Normalize()
Jusify() normalizes the rectangle so both the Width and Height are
positive, without changing the location of the rectangle. It ensures
that the x and y coordinates will be moved to the top left of the
rectangle.
The name is strange, so renaming Justify() to Normalize().
Change-Id: Idbf163e65e52a798e38f785b8961b8042cf0cf2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137379
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svx/source/svdraw/svdobj.cxx')
-rw-r--r-- | svx/source/svdraw/svdobj.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 06566ab4ba93..c3c01eda713d 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -1319,7 +1319,7 @@ tools::Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const } } } - aTmpRect.Justify(); + aTmpRect.Normalize(); return aTmpRect; } @@ -1380,7 +1380,7 @@ bool SdrObject::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); tools::Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); - aRect1.Justify(); + aRect1.Normalize(); rStat.SetActionRect(aRect1); setOutRectangle(aRect1); return true; @@ -1391,7 +1391,7 @@ bool SdrObject::MovCreate(SdrDragStat& rStat) tools::Rectangle aRectangle; rStat.TakeCreateRect(aRectangle); rStat.SetActionRect(aRectangle); - aRectangle.Justify(); + aRectangle.Normalize(); setOutRectangle(aRectangle); return true; } @@ -1400,7 +1400,7 @@ bool SdrObject::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { tools::Rectangle aRectangle; rStat.TakeCreateRect(aRectangle); - aRectangle.Justify(); + aRectangle.Normalize(); setOutRectangle(aRectangle); return (eCmd==SdrCreateCmd::ForceEnd || rStat.GetPointCount()>=2); @@ -1419,7 +1419,7 @@ basegfx::B2DPolyPolygon SdrObject::TakeCreatePoly(const SdrDragStat& rDrag) cons { tools::Rectangle aRect1; rDrag.TakeCreateRect(aRect1); - aRect1.Justify(); + aRect1.Normalize(); basegfx::B2DPolyPolygon aRetval; aRetval.append(basegfx::utils::createPolygonFromRect(vcl::unotools::b2DRectangleFromRectangle(aRect1))); @@ -1496,7 +1496,7 @@ tools::Rectangle lclRotateRectangle(tools::Rectangle const& rRectangle, Point co aRectangle.SetBottom(-R.Left() ); } aRectangle.Move(rRef.X(),rRef.Y()); - aRectangle.Justify(); // just in case + aRectangle.Normalize(); // just in case return aRectangle; } @@ -1525,7 +1525,7 @@ tools::Rectangle lclMirrorRectangle(tools::Rectangle const& rRectangle, Point co aRectangle.SetBottom(-R.Left() ); } aRectangle.Move(rRef1.X(),rRef1.Y()); - aRectangle.Justify(); // just in case + aRectangle.Normalize(); // just in case return aRectangle; } |