sw/source/core/layout/flowfrm.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0d7db2f8e7e4f0066aaaefef081f4b8616f730dc
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Mon Jan 13 12:48:39 2025 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Jan 14 16:47:48 2025 +0100

    sw: tweak assert in SwFlowFrame::IsKeep()
    
    There is a slight inconsistency that causes this to trigger in 
kde84547-1.doc
    
    For text frames, IsHiddenNowImpl() needs to be called because that is
    what SwContentFrame::MakeAll() is calling.
    
    (regression from commit cd8468bcba952ab9b0d6ca97152a63d7469a9209)
    
    Change-Id: Icb8cb238b8460c07b99a6479cb78c523494f7248
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180172
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    Tested-by: Jenkins
    (cherry picked from commit 8ec4fd8fe58c1c10100be43c0a94c0b2e06aa626)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180196
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/source/core/layout/flowfrm.cxx 
b/sw/source/core/layout/flowfrm.cxx
index dbd9fbff238d..397ed5bb9671 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -258,7 +258,7 @@ bool SwFlowFrame::IsKeep(SvxFormatKeepItem const& rKeep,
         SvxFormatBreakItem const& rBreak,
         bool const bCheckIfLastRowShouldKeep) const
 {
-    assert(!m_rThis.IsHiddenNow()); // check it before?
+    assert(m_rThis.IsTextFrame() ? !static_cast<SwTextFrame 
const&>(m_rThis).IsHiddenNowImpl() : !m_rThis.IsHiddenNow()); // check it 
before?
     // 1. The keep attribute is ignored inside footnotes
     // 2. For compatibility reasons, the keep attribute is
     //    ignored for frames inside table cells

Reply via email to