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 <[email protected]> AuthorDate: Thu Jun 3 14:24:50 2021 +0300 Commit: Tor Lillqvist <[email protected]> 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 <[email protected]> Reviewed-by: Tor Lillqvist <[email protected]> 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? _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
