summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-10 12:32:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-10 13:46:55 +0200
commit031d30bd698117e2bcdd0df76f8b669a1e366d2c (patch)
treeb91869a0703ea067da052eee328400fe2817230d /tools
parent1ddf8be9bcb2151157823870fd0a03e022fdad60 (diff)
make tools::Rectangle::setY respect empty state
and make non-inline so it is easy to disable this for debugging, if need be Change-Id: I6feb94ca2f24246b96757575288c86c0b0c54227 Reviewed-on: https://gerrit.libreoffice.org/75342 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/gen.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index db7980ea100a..1b9e4a0d733f 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -282,5 +282,11 @@ void tools::Rectangle::setX( long x )
nLeft = x;
}
+void tools::Rectangle::setY( long y )
+{
+ if (nBottom != RECT_EMPTY)
+ nBottom += y - nTop;
+ nTop = y;
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */