summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-09-27 14:46:24 +0200
committerMichael Stahl <mstahl@redhat.com>2016-09-28 11:03:56 +0200
commit6c673a29947924148b9550517b98d8953680a2ca (patch)
treed479cbcdc2ac094956233d392864550ae2a2d761 /sw/source
parentbfbbbd87d33c0d51a9ff844f2175400b753ba5b9 (diff)
sw: fix sorting in MarkManager::correctMarksAbsolute()
The recently added tdf90697.rtf caused a libstdc++ assertion about non-sorted m_vAllMarks. This is because a SwXParagraph was disposed, a bookmark on it was moved by correctMarksAbsolute onto the first paragraph in a table, and there was a SwXTextRange with a UnoMark pointing to the SwTableNode, so the sort order was not maintained. So if at least one mark was moved, re-sort the array. Change-Id: I0efc7827c826e696f29f8480bab1044b31ccfe39
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/docbm.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 5e8671413427..0ecc7430ab6d 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -589,6 +589,7 @@ namespace sw { namespace mark
{
pMark->SetMarkPos(aNewPos);
bChangedPos = true;
+ isSortingNeeded = true;
}
bool bChangedOPos = false;
if (pMark->IsExpanded() &&
@@ -597,6 +598,7 @@ namespace sw { namespace mark
// shift the OtherMark to aNewPos
pMark->SetOtherMarkPos(aNewPos);
bChangedOPos= true;
+ isSortingNeeded = true;
}
// illegal selection? collapse the mark and restore sorting later
isSortingNeeded |= lcl_FixCorrectedMark(bChangedPos, bChangedOPos, pMark);