summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-10 10:04:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-10 12:28:19 +0200
commit1ddf8be9bcb2151157823870fd0a03e022fdad60 (patch)
tree7ff8b895269de087b9cc967610356762f0cab413 /tools
parent03263d6fffb711f4cf3527c77949253c97ff40fb (diff)
make tools::Rectangle::setX respect empty state
and make non-inline so it is easy to disable this for debugging, if need be Change-Id: I2beae23bbdea36e91e0e367f9a94cbc35be3cd24 Reviewed-on: https://gerrit.libreoffice.org/75337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/gen.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index 021e421c3b80..db7980ea100a 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -275,5 +275,12 @@ long tools::Rectangle::AdjustBottom( long nVertMoveDelta )
return nBottom;
}
+void tools::Rectangle::setX( long x )
+{
+ if (nRight != RECT_EMPTY)
+ nRight += x - nLeft;
+ nLeft = x;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */