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

New commits:
commit 7d3b439de357c8e97c0a73f6f63e67ec980e432d
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Tue Mar 12 16:21:57 2024 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Wed Mar 13 09:21:48 2024 +0100

    tdf#157241 sw: layout: inconsistent conditions in lcl_RecalcSplitLine()
    
    A mistake, when checking before the condition is "if (pTab == &rTab)"
    but when checking after it is "if (pTab)" - the latter is correct as the
    former is checked *inside* the block, after resolving to top-level table.
    
    This caused erroneously setting rIsFootnoteGrowth = true in
    SwTabFrame::MakeAll() of tab 939 in the bugdoc, when in fact the footnote
    container shrunk from 5 to 2 footnotes.
    
    (regression from commit c303981cfd95ce1c3881366023d5495ae2edce97)
    
    Change-Id: Ib4cad9fef0e500ebe7a3636c2371a4108b32fb5f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164717
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 10d1b163777e..edb10beb35c6 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -667,7 +667,7 @@ static bool lcl_RecalcSplitLine( SwRowFrame& rLastLine, 
SwRowFrame& rFollowLine,
             {
                 SwContentFrame const*const pAnchor = pFootnote->GetRef();
                 SwTabFrame const* pTab = pAnchor->FindTabFrame();
-                if (pTab == &rTab)
+                if (pTab)
                 {
                     while (pTab->GetUpper()->IsInTab())
                     {

Reply via email to