summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-10 08:39:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-10 09:58:11 +0200
commit7554ec519c49782614f474109e1962dfbb392e95 (patch)
tree1d392c8af3bcdcdb9cc5add1355a3fd4730441b6 /tools
parente77999fda551867e4fc199a489cf898821ef6d09 (diff)
make tools::Rectangle::AdjustBottom respect empty state
and make non-inline so it is easy to disable this for debugging, if need be Change-Id: I9a3f7a0356ab625681419f74af0b9884624f3642 Reviewed-on: https://gerrit.libreoffice.org/75336 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/gen.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index d298e6be4c77..021e421c3b80 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -266,5 +266,14 @@ long tools::Rectangle::AdjustRight(long nHorzMoveDelta)
return nRight;
}
+long tools::Rectangle::AdjustBottom( long nVertMoveDelta )
+{
+ if (nBottom == RECT_EMPTY)
+ nBottom = nTop + nVertMoveDelta - 1;
+ else
+ nBottom += nVertMoveDelta;
+ return nBottom;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */