[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sw/inc sw/source
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 3 14:50:38 UTC 2021
sw/inc/swrect.hxx | 15 ++++++++++++++-
sw/source/core/bastyp/swrect.cxx | 15 ---------------
2 files changed, 14 insertions(+), 16 deletions(-)
New commits:
commit 667264c967b1ed64f1e75834306eb955c98b3aec
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Jun 3 14:24:50 2021 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Thu Jun 3 16:50:03 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>
diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx
index abbc36292140..b243a6285dba 100644
--- a/sw/inc/swrect.hxx
+++ b/sw/inc/swrect.hxx
@@ -78,7 +78,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() );
+ 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 ab971bfd2a67..4f00d1d21e9d 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() );
- 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