sw/source/core/text/porrst.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 9dd884a6df1a00f56b81f7a4f05195a4e2b1ca71
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Mon May 19 17:38:33 2025 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon May 19 22:39:41 2025 +0200

    Don't call EmptyHeight() twice
    
    Change-Id: Ic10d101387f38a687d8d05e6bb4c92eb24946003
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185537
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 2063139c7b1c..75c689196334 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -420,7 +420,8 @@ bool SwTextFrame::FormatEmpty()
 {
     OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrame::FormatEmpty with 
swapped frame" );
 
-    bool bCollapse = EmptyHeight( ) == 1 && IsCollapse( );
+    SwTwips nHeight = EmptyHeight();
+    bool bCollapse = nHeight == 1 && IsCollapse();
 
     // sw_redlinehide: just disable FormatEmpty optimisation for now
     // Split fly frames: non-last parts of the anchor want this optimization 
to clear the old
@@ -480,8 +481,6 @@ bool SwTextFrame::FormatEmpty()
         }
     }
 
-    SwTwips nHeight = EmptyHeight();
-
     if (aSet.GetParaGrid().GetValue() &&
             IsInDocBody() )
     {

Reply via email to