[Libreoffice-commits] core.git: sw/qa sw/source

Vinaya Mandke vinaya.mandke at synerzip.com
Fri Aug 1 03:00:19 PDT 2014


 sw/qa/core/data/ooxml/pass/fdo81491.docx |binary
 sw/source/core/doc/docbm.cxx             |    3 ++-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9a733398516b7ee08ad5b3887c75f11f0f6bbc27
Author: Vinaya Mandke <vinaya.mandke at synerzip.com>
Date:   Fri Jul 25 15:05:50 2014 +0530

    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 <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

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 0000000..0da6215
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 db2358c..233637c 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


More information about the Libreoffice-commits mailing list