From 9a733398516b7ee08ad5b3887c75f11f0f6bbc27 Mon Sep 17 00:00:00 2001 From: Vinaya Mandke Date: Fri, 25 Jul 2014 15:05:50 +0530 Subject: fdo#81491 FILEOPEN DOCX Assert Fails while Deleting Para (FramePr) SwXText::convertToTextFrame is called for a Para with FramePr. convertToTextFrame in turn calls DelFullPara which throws an assert as a few Bookmarks are still registered to the paragraph. In MarkManager::correctMarksAbsolute, pMark->GetMarkPos().nNode.GetNode() is checked if it is pOldNode, and then the Mark Position is shifted to aNewPos. In the following condition pMark->GetOtherMarkPos().nNode.GetNode() if it is the pOldNode, and still the Mark Position is changed. However the Other Mark Position must be changed as now the Othe Mark is in pOldNode. Change-Id: I4507f6b2906d33bc65c922fffe12db2110de651b Reviewed-on: https://gerrit.libreoffice.org/10536 Reviewed-by: Miklos Vajna Tested-by: Miklos Vajna --- sw/qa/core/data/ooxml/pass/fdo81491.docx | Bin 0 -> 13756 bytes sw/source/core/doc/docbm.cxx | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 sw/qa/core/data/ooxml/pass/fdo81491.docx (limited to 'sw') diff --git a/sw/qa/core/data/ooxml/pass/fdo81491.docx b/sw/qa/core/data/ooxml/pass/fdo81491.docx new file mode 100644 index 000000000000..0da621514dff Binary files /dev/null and b/sw/qa/core/data/ooxml/pass/fdo81491.docx differ diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index db2358c76c6f..233637c34d88 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -584,7 +584,8 @@ namespace sw { namespace mark if (pMark->IsExpanded() && &pMark->GetOtherMarkPos().nNode.GetNode() == pOldNode) { - pMark->SetMarkPos(aNewPos); + // shift the OtherMark to aNewPos + pMark->SetOtherMarkPos(aNewPos); bChangedOPos= true; } // illegal selection? collapse the mark and restore sorting later -- cgit