include/tools/gen.hxx        |    2 +-
 tools/source/generic/gen.cxx |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 5d390df540c19b88814d22a2e8b0dab86af17541
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Jul 12 17:06:28 2019 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Jul 12 20:12:20 2019 +0200

    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.gran...@collabora.co.uk>

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: */
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to