summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-20 09:29:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-20 10:47:44 +0200
commitdf4c562ac613ce51d431cbb633ffe57c5305714f (patch)
tree35bc0691f68140e465c4db07e18e081f58e41555 /svx
parentc7821b8cd1bfd93ac232d9b3cc114e9ed9931bc9 (diff)
add tools::Rectangle::Justify
so rectangles can be constructed already valid Change-Id: I3ae5e24add3c81f79dcdf863f855dca439876f11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92521 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx2
-rw-r--r--svx/source/svdraw/svdopath.cxx3
2 files changed, 2 insertions, 3 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index a6d74d075077..33eb60a9dd37 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2340,7 +2340,7 @@ void EnhancedCustomShape2d::CreateSubPath(
sal_uInt32 nXor = bClockwise ? 3 : 2;
for ( sal_uInt16 i = 0; ( i < nPntCount ) && ( ( rSrcPt + 3 ) < nCoordSize ); i++ )
{
- tools::Rectangle aRect( GetPoint( seqCoordinates[ rSrcPt ], true, true ), GetPoint( seqCoordinates[ rSrcPt + 1 ], true, true ) );
+ tools::Rectangle aRect = tools::Rectangle::Justify( GetPoint( seqCoordinates[ rSrcPt ], true, true ), GetPoint( seqCoordinates[ rSrcPt + 1 ], true, true ) );
if ( aRect.GetWidth() && aRect.GetHeight() )
{
Point aStart( GetPoint( seqCoordinates[ static_cast<sal_uInt16>( rSrcPt + nXor ) ], true, true ) );
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 4ff57d767470..bba20891df41 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -1674,8 +1674,7 @@ void SdrPathObj::ImpForceLineAngle()
aGeo.RecalcTan();
// for SdrTextObj, keep aRect up to date
- maRect = tools::Rectangle(aPoint0, aPoint1);
- maRect.Justify();
+ maRect = tools::Rectangle::Justify(aPoint0, aPoint1);
}
void SdrPathObj::ImpForceKind()