diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-12 17:06:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-12 20:12:20 +0200 |
commit | 5d390df540c19b88814d22a2e8b0dab86af17541 (patch) | |
tree | 7a22e1a231e5090ca9a068b4bed5604a05c56e45 | |
parent | 25277bcb727994072239c9c2549c271fdd62150e (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>
-rw-r--r-- | include/tools/gen.hxx | 2 | ||||
-rw-r--r-- | tools/source/generic/gen.cxx | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx index dd0514396567..63d13e146336 100644 --- a/include/tools/gen.hxx +++ b/include/tools/gen.hxx @@ -388,7 +388,7 @@ public: long Left() const { return nLeft; } long Right() const; long Top() const { return nTop; } - long Bottom() const { return nBottom; } + long Bottom() const; void SetLeft(long v) { nLeft = v; } void SetRight(long v) { nRight = v; } 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: */ |