sw/source/core/layout/sortedobjs.cxx |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 297063248661d92211cb9ad7d0ba4f930fa35d24
Author:     Mike Kaganski <[email protected]>
AuthorDate: Mon Feb 9 19:21:39 2026 +0500
Commit:     Mike Kaganski <[email protected]>
CommitDate: Mon Feb 9 18:19:06 2026 +0100

    Use "chain" instead of "group"
    
    Thanks Miklos for noticing that.
    Also, expand the comment to clarify the reason for this part of code.
    
    Change-Id: I6621f2df982099125a3a904d133f55728b185a00
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198999
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <[email protected]>

diff --git a/sw/source/core/layout/sortedobjs.cxx 
b/sw/source/core/layout/sortedobjs.cxx
index f74ba71b675b..e53fcf507ddc 100644
--- a/sw/source/core/layout/sortedobjs.cxx
+++ b/sw/source/core/layout/sortedobjs.cxx
@@ -222,12 +222,16 @@ struct ObjAnchorOrder
 
             if (pLHSplitFly && pRHSplitFly)
             {
-                // standalone split fly after grouped
-                auto isInGroup
+                // standalone split fly after chained. This case happens when 
a follow fly gets
+                // emptied, dropped from chain, and eventually will be 
removed; but at this point,
+                // it's still there in the sorted vector. Without this code, 
the vector would not
+                // be properly partitioned relative to newly added follow, 
causing assertion in
+                // clang/dbgutil:
+                auto isInChain
                     = [](const SwFlyAtContentFrame* p) { return p->HasFollow() 
|| p->IsFollow(); };
-                if (isInGroup(pLHSplitFly) && !isInGroup(pRHSplitFly))
+                if (isInChain(pLHSplitFly) && !isInChain(pRHSplitFly))
                     return true;
-                if (!isInGroup(pLHSplitFly) && isInGroup(pRHSplitFly))
+                if (!isInChain(pLHSplitFly) && isInChain(pRHSplitFly))
                     return false;
 
                 if (pLHSplitFly->HasFollow() && pRHSplitFly->IsFollow())

Reply via email to