From ed0f690b93d478380366d96655a3efe5848c6737 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 9 Jul 2019 14:51:19 +0200 Subject: 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 --- tools/source/generic/gen.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools') 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: */ -- cgit