sw/source/core/bastyp/swrect.cxx |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 49626a1d83dd53ebcb54a2a006648208b0e69b5d
Author:     Mike Kaganski <[email protected]>
AuthorDate: Mon Dec 15 15:42:56 2025 +0100
Commit:     Mike Kaganski <[email protected]>
CommitDate: Mon Dec 15 18:49:52 2025 +0100

    Make SwRect's "function pointers" methods use inline ones
    
    ... where they indeed do the same thing. Because some of them
    (Right_, Bottom_) differ by 1. The difference was introduced in
    commit e6cd3653a69816b556d1b7a204d3339eccf4dc1c (Fix: Vertical
    footnotes, 2001-11-22), with not much explanation...
    
    Anyhow: at least for the rest, the change allows to simplify,
    and see that they actually do the same thing.
    
    Change-Id: Ia7fb1c9db9d3c541ea59f4792bf9f6af4fc311f5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195674
    Reviewed-by: Mike Kaganski <[email protected]>
    Tested-by: Jenkins

diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
index 29002a799976..7617087848aa 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -106,18 +106,18 @@ void SwRect::Justify()
 }
 
 // Similar to the inline methods, but we need the function pointers
-void SwRect::Width_( const tools::Long nNew ) { m_Size.setWidth(nNew); }
-void SwRect::Height_( const tools::Long nNew ) { m_Size.setHeight(nNew); }
-void SwRect::Left_( const tools::Long nLeft ){ m_Size.AdjustWidth(m_Point.X() 
- nLeft ); m_Point.setX(nLeft); }
+void SwRect::Width_( const tools::Long nNew ) { Width(nNew); }
+void SwRect::Height_( const tools::Long nNew ) { Height(nNew); }
+void SwRect::Left_( const tools::Long nLeft ) { Left(nLeft); }
 void SwRect::Right_( const tools::Long nRight ){ m_Size.setWidth(nRight - 
m_Point.X()); }
-void SwRect::Top_( const tools::Long nTop ){ m_Size.AdjustHeight(m_Point.Y() - 
nTop ); m_Point.setY(nTop); }
+void SwRect::Top_( const tools::Long nTop ) { Top(nTop); }
 void SwRect::Bottom_( const tools::Long nBottom ){ m_Size.setHeight(nBottom - 
m_Point.Y()); }
 
-tools::Long SwRect::Width_() const{ return m_Size.Width(); }
-tools::Long SwRect::Height_() const{ return m_Size.Height(); }
-tools::Long SwRect::Left_() const{ return m_Point.X(); }
+tools::Long SwRect::Width_() const{ return Width(); }
+tools::Long SwRect::Height_() const{ return Height(); }
+tools::Long SwRect::Left_() const{ return Left(); }
 tools::Long SwRect::Right_() const{ return m_Point.X() + m_Size.Width(); }
-tools::Long SwRect::Top_() const{ return m_Point.Y(); }
+tools::Long SwRect::Top_() const{ return Top(); }
 tools::Long SwRect::Bottom_() const{ return m_Point.Y() + m_Size.Height(); }
 
 void SwRect::AddWidth( const tools::Long nAdd ) { m_Size.AdjustWidth(nAdd ); }

Reply via email to