diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-08-12 03:43:27 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-08-12 04:48:48 +0200 |
commit | 5351e837a11fb9d19759cd1b91ca4b5d43e2f75a (patch) | |
tree | 25a8e0702d7d9e613fe62c90a9207f57e87d6834 /tools/source/generic | |
parent | 7ddf7375fb5a8c6699d4128a80b9f24ec6b914ae (diff) |
Unify and simplify tools::Rectangle methods returning Point
Make the methods use Left()/Top()/Right()/Bottom(), allowing to
avoid explicit checks for emptiness.
Also do not use std::min/max in *Center(), so that e.g. TopCenter
returns top value the same way as TopLeft and TopRight do.
Change-Id: Ie1edd7a0ab7e32b4f98d0c2fb3917ce2902bdf7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120353
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'tools/source/generic')
-rw-r--r-- | tools/source/generic/gen.cxx | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx index 1740f4b306f1..2edb63c465d9 100644 --- a/tools/source/generic/gen.cxx +++ b/tools/source/generic/gen.cxx @@ -252,16 +252,6 @@ void tools::Rectangle::setY( tools::Long y ) nTop = y; } -tools::Long tools::Rectangle::Right() const -{ - return nRight == RECT_EMPTY ? nLeft : nRight; -} - -tools::Long tools::Rectangle::Bottom() const -{ - return nBottom == RECT_EMPTY ? nTop : nBottom; -} - /// Returns the difference between right and left, assuming the range includes one end, but not the other. tools::Long tools::Rectangle::getWidth() const { |