summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-09 14:51:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-10 08:33:25 +0200
commited0f690b93d478380366d96655a3efe5848c6737 (patch)
treed1baff1e66d12db29e7a1a4e145eb55ca370c67a /tools
parent03c708bf085f91480c014d7fa31e7a317b2c7b8f (diff)
make tools::Rectangle::AdjustRight respect empty state
and make non-inline so it is easy to disable this for debugging, if need be Change-Id: I69c717be91712b73e9d3b8f9c83d26305c052bd5 Reviewed-on: https://gerrit.libreoffice.org/75300 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/gen.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index 020be91ac3c0..d298e6be4c77 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -257,6 +257,14 @@ void tools::Rectangle::shrink(long nShrinkBy)
nBottom -= nShrinkBy;
}
+long tools::Rectangle::AdjustRight(long nHorzMoveDelta)
+{
+ if (nRight == RECT_EMPTY)
+ nRight = nLeft + nHorzMoveDelta - 1;
+ else
+ nRight += nHorzMoveDelta;
+ return nRight;
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */