summaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/tools/gen.hxx3
1 files changed, 3 insertions, 0 deletions
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 <algorithm>
#include <ostream>
#include <config_options.h>
+#include <cassert>
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; }