[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sw/inc sw/source
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Mon Oct 4 07:38:40 UTC 2021
sw/inc/swrect.hxx | 15 ++++++++++++++-
sw/source/core/bastyp/swrect.cxx | 15 ---------------
2 files changed, 14 insertions(+), 16 deletions(-)
New commits:
commit 6e9dfa22c54da4a86dee5260470217f2dd0cfbf3
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Jun 3 14:24:50 2021 +0300
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Mon Oct 4 09:38:07 2021 +0200
Make SwRect::Union() inline
Change-Id: I40e3e5f4d7ae7c2ab3d58d1dc9bf71ceb9f0b437
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116663
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122918
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx
index 5de1dfe6ce32..23f69a490137 100644
--- a/sw/inc/swrect.hxx
+++ b/sw/inc/swrect.hxx
@@ -77,7 +77,20 @@ public:
void Justify();
- SwRect &Union( const SwRect& rRect );
+ SwRect &Union( const SwRect& rRect )
+ {
+ if ( Top() > rRect.Top() )
+ Top( rRect.Top() );
+ if ( Left() > rRect.Left() )
+ Left( rRect.Left() );
+ tools::Long n = rRect.Right();
+ if ( Right() < n )
+ Right( n );
+ n = rRect.Bottom();
+ if ( Bottom() < n )
+ Bottom( n );
+ return *this;
+ }
SwRect &Intersection( const SwRect& rRect );
// Same as Intersection, only assume that Rects are overlapping!
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
index 7d9f38412ae6..eb178663897e 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -38,21 +38,6 @@ Point SwRect::Center() const
Top() + Height() / 2 );
}
-SwRect& SwRect::Union( const SwRect& rRect )
-{
- if ( Top() > rRect.Top() )
- Top( rRect.Top() );
- if ( Left() > rRect.Left() )
- Left( rRect.Left() );
- tools::Long n = rRect.Right();
- if ( Right() < n )
- Right( n );
- n = rRect.Bottom();
- if ( Bottom() < n )
- Bottom( n );
- return *this;
-}
-
SwRect& SwRect::Intersection( const SwRect& rRect )
{
// any similarity between me and given element?
More information about the Libreoffice-commits
mailing list