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 /emfio | |
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 'emfio')
-rw-r--r-- | emfio/source/reader/emfreader.cxx | 2 | ||||
-rw-r--r-- | emfio/source/reader/wmfreader.cxx | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx index e4d33ff259af..2d50a9a057bb 100644 --- a/emfio/source/reader/emfreader.cxx +++ b/emfio/source/reader/emfreader.cxx @@ -2213,7 +2213,7 @@ namespace emfio if (nLeft > nRight || nTop > nBottom) { SAL_WARN("emfio", "broken rectangle"); - return tools::Rectangle::Justify(Point(nLeft, nTop), Point(nRight, nBottom)); + return tools::Rectangle::Normalize(Point(nLeft, nTop), Point(nRight, nBottom)); } return tools::Rectangle(nLeft, nTop, nRight, nBottom); diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx index 32b31e015cbc..8a54b21f0580 100644 --- a/emfio/source/reader/wmfreader.cxx +++ b/emfio/source/reader/wmfreader.cxx @@ -271,7 +271,7 @@ namespace emfio if (aTL.X() > aBR.X() || aTL.Y() > aBR.Y()) { SAL_WARN("emfio", "broken rectangle"); - return tools::Rectangle::Justify(aTL, aBR); + return tools::Rectangle::Normalize(aTL, aBR); } return tools::Rectangle( aTL, aBR ); } @@ -427,7 +427,7 @@ namespace emfio Point aEnd( ReadYX() ); Point aStart( ReadYX() ); tools::Rectangle aRect( ReadRectangle() ); - aRect.Justify(); + aRect.Normalize(); DrawArc( aRect, aStart, aEnd ); } break; @@ -437,7 +437,7 @@ namespace emfio Point aEnd( ReadYX() ); Point aStart( ReadYX() ); tools::Rectangle aRect( ReadRectangle() ); - aRect.Justify(); + aRect.Normalize(); // #i73608# OutputDevice deviates from WMF // semantics. start==end means full ellipse here. @@ -453,7 +453,7 @@ namespace emfio Point aEnd( ReadYX() ); Point aStart( ReadYX() ); tools::Rectangle aRect( ReadRectangle() ); - aRect.Justify(); + aRect.Normalize(); DrawChord( aRect, aStart, aEnd ); } break; |