[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Sep 20 15:38:47 UTC 2018


 sw/source/core/layout/trvlfrm.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 27170680e82a927b88e6a1ccee63b7ddf8082d01
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Aug 7 10:33:08 2018 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Sep 20 17:38:23 2018 +0200

    sw: avoid asserts from SwSortedObjs::Insert()
    
    The first frame is almost certainly already inserted in line 2057;
    This causes "<SwSortedObjs::Insert()> - already contains object".
    
    Change-Id: I4a785accdec033865da971bf25d0ebe06ec2e765
    (cherry picked from commit 7f406cbacf9c3abc45c7241535472ffab807e2f0)
    Reviewed-on: https://gerrit.libreoffice.org/60744
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 14887a9e274f..eb6417197829 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -2494,7 +2494,10 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor)
             if ( pContent->IsInFly() )
             {
                 const SwAnchoredObject* pObj = pContent->FindFlyFrame();
-                aSortObjs.Insert( *const_cast<SwAnchoredObject*>(pObj) );
+                if (!aSortObjs.Contains(*pObj))
+                {   // is this even possible, assuming valid cursor pos.?
+                    aSortObjs.Insert( *const_cast<SwAnchoredObject*>(pObj) );
+                }
             }
 
             // Consider only frames which have the same IsInDocBody value like pStartFrame


More information about the Libreoffice-commits mailing list