From df4c562ac613ce51d431cbb633ffe57c5305714f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 20 Apr 2020 09:29:23 +0200 Subject: 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 --- include/tools/gen.hxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx index fb4a14f1db7b..7365d60728a4 100644 --- a/include/tools/gen.hxx +++ b/include/tools/gen.hxx @@ -25,6 +25,7 @@ #include #include #include +#include class SvStream; namespace rtl @@ -386,6 +387,8 @@ public: Rectangle( long nLeft, long nTop ); Rectangle( const Point& rLT, const Size& rSize ); + static Rectangle Justify( const Point& rLT, const Point& rRB ); + long Left() const { return nLeft; } long Right() const; long Top() const { return nTop; } -- cgit