[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 11 11:20:54 UTC 2020


 sw/source/core/doc/docedt.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9082af9d268908c136b22746f47835bacd361624
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Jun 10 17:21:45 2020 +0200
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Thu Jun 11 13:20:22 2020 +0200

    crashtesting: sw: fix export of ooo24576-1.doc and ooo79410-1.sxw to odt
    
    Crashes because an at-char fly has its anchor node deleted, and during
    deletion of its text frame its SwAnchoredObject is updated, which
    asserts because of inconsistent anchor node in the fly and
    mpAnchorFrame; the immediate cause of the inconsistency is that
    SwNodes::RemoveNode() changed the fly's anchor node.
    
    The root cause is that in the sw_JoinText(bJoinPrev=true) code, a fly
    anchored at the end of the deleted node isn't moved to the surviving
    node.
    
    SwTextNode::JoinPrev() uses different arguments to
    ContentIdxStore::Save(), so use the same here.
    
    The implementation of several ContentIdxStore functions, including
    ContentIdxStoreImpl::SaveFlys(), ignore positions that are equal to the
    passed nContent index, so passing in SwTextNode::Len() looks wrong.
    
    (crash is regression from 98d1622b3721fe899c4e1faa0b4cc35695253014)
    
    Change-Id: I3a4d54258611da6b15223273a187c39770caa8e2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93583
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit b2b234269b13d5dfd8e7123a25d282d88fee33a0)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96103

diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index ad9da76b4d6b..07902efe3fd4 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -412,7 +412,7 @@ bool sw_JoinText( SwPaM& rPam, bool bJoinPrev )
                 pOldTextNd->FormatToTextAttr( pTextNd );
 
                 const std::shared_ptr< sw::mark::ContentIdxStore> pContentStore(sw::mark::ContentIdxStore::Create());
-                pContentStore->Save( pDoc, aOldIdx.GetIndex(), pOldTextNd->Len() );
+                pContentStore->Save(pDoc, aOldIdx.GetIndex(), SAL_MAX_INT32);
 
                 SwIndex aAlphaIdx(pTextNd);
                 pOldTextNd->CutText( pTextNd, aAlphaIdx, SwIndex(pOldTextNd),


More information about the Libreoffice-commits mailing list