diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-08-07 10:33:08 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-09-20 17:38:23 +0200 |
commit | 27170680e82a927b88e6a1ccee63b7ddf8082d01 (patch) | |
tree | d1d8f1223949afa140391aaa70bc9be8e04c2981 | |
parent | StartUndo with END arg should have been EndUndo (diff) | |
download | core-27170680e82a927b88e6a1ccee63b7ddf8082d01.tar.gz core-27170680e82a927b88e6a1ccee63b7ddf8082d01.zip |
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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/layout/trvlfrm.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
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 |