sw/source/core/inc/txtfly.hxx  |    4 ++--
 sw/source/core/text/inftxt.cxx |    3 +--
 sw/source/core/text/txtfly.cxx |    4 ++--
 3 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 9cc76b71abc3ffc13a8f92cd0991e505e917d3b4
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sun Aug 17 09:42:18 2025 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sun Aug 17 11:07:06 2025 +0200

    These methods can be const
    
    Change-Id: Ia020055ddab86d8e4d71b5042e794ad4d891af78
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189812
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/inc/txtfly.hxx b/sw/source/core/inc/txtfly.hxx
index 9047e127e7d8..17113553a1f8 100644
--- a/sw/source/core/inc/txtfly.hxx
+++ b/sw/source/core/inc/txtfly.hxx
@@ -266,7 +266,7 @@ public:
 
         DrawText() takes over the on optimization!
      */
-    void DrawTextOpaque( SwDrawTextInfo &rInf );
+    void DrawTextOpaque( SwDrawTextInfo &rInf ) const;
 
     /**
         Two subtleties needs to be mentioned:
@@ -276,7 +276,7 @@ public:
         Ensure that the overlapping frames (except the transparent frames)
         won't be scribbled
      */
-    void DrawFlyRect( OutputDevice* pOut, const SwRect &rRect );
+    void DrawFlyRect( OutputDevice* pOut, const SwRect &rRect ) const;
 
     /**
         Used to switch off the SwTextFly when there is no overlapping object 
(Relax).
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 3e3174311d81..71948fef5f35 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1063,8 +1063,7 @@ void SwTextPaintInfo::DrawRect( const SwRect &rRect, bool 
bRetouche ) const
     if ( OnWin() || !bRetouche )
     {
         if( m_aTextFly.IsOn() )
-            const_cast<SwTextPaintInfo*>(this)->GetTextFly().
-                DrawFlyRect( m_pOut, rRect );
+            GetTextFly().DrawFlyRect( m_pOut, rRect );
         else
             m_pOut->DrawRect( rRect.SVRect() );
     }
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 9c47224cdfc5..4e15eeab005f 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -453,7 +453,7 @@ const SwTextFrame* SwTextFly::GetMaster_()
     return m_pMaster;
 }
 
-void SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf )
+void SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf ) const
 {
     SwSaveClip aClipSave( rInf.GetpOut() );
     SwRect aRect( rInf.GetPos(), rInf.GetSize() );
@@ -574,7 +574,7 @@ void SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf )
     rInf.SetPos(aOldPos);
 }
 
-void SwTextFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect )
+void SwTextFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect ) const
 {
     SwRegionRects aRegion( rRect );
     OSL_ENSURE( !m_bTopRule, "DrawFlyRect: Wrong TopRule" );

Reply via email to