diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-10-04 21:19:13 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-10-05 08:01:31 +0200 |
commit | 8e49016473f0142cb07a1b30f4073f3e73aa4747 (patch) | |
tree | 97007805483d272764de6e74bfacaa0dc0e3c5cd /sw/inc | |
parent | b1488cd6f008049a9aaff7350deeb73cbbd535b6 (diff) |
fix broken SwRect corner getters
BottomRight() wasn't equal to Point( Right(), Bottom()). Smart *sigh*.
Change-Id: I0af1c018cdf10a4ff23d95752004e565b4102b13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123076
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/swrect.hxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx index f6d8430b9d11..b4db7384f456 100644 --- a/sw/inc/swrect.hxx +++ b/sw/inc/swrect.hxx @@ -251,6 +251,23 @@ inline tools::Long SwRect::Bottom() const return m_Size.getHeight() ? m_Point.getY() + m_Size.getHeight() - 1 : m_Point.getY(); } +inline Point SwRect::TopLeft() const +{ + return Point( Left(), Top()); +} +inline Point SwRect::TopRight() const +{ + return Point( Right(), Top()); +} +inline Point SwRect::BottomLeft() const +{ + return Point( Left(), Bottom()); +} +inline Point SwRect::BottomRight() const +{ + return Point( Right(), Bottom()); +} + inline bool SwRect::operator == ( const SwRect& rRect ) const { return (m_Point == rRect.m_Point && m_Size == rRect.m_Size); |