summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-12 17:06:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-12 20:12:20 +0200
commit5d390df540c19b88814d22a2e8b0dab86af17541 (patch)
tree7a22e1a231e5090ca9a068b4bed5604a05c56e45 /tools
parent25277bcb727994072239c9c2549c271fdd62150e (diff)
make tools::Rectangle::Bottom return Top when empty
Change-Id: Ia424b91149245907b045b43aa31a622e34e6e5bc Reviewed-on: https://gerrit.libreoffice.org/75504 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/gen.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index 459687dc961a..3783fa347c55 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <algorithm>
#include <cassert>
@@ -297,4 +298,9 @@ long tools::Rectangle::Right() const
return nRight == RECT_EMPTY ? nLeft : nRight;
}
+long tools::Rectangle::Bottom() const
+{
+ return nBottom == RECT_EMPTY ? nTop : nBottom;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */