Kaydet (Commit) 9a733398 authored tarafından Vinaya Mandke's avatar Vinaya Mandke Kaydeden (comit) Miklos Vajna

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/10536Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst bac3cdb1
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment