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

New commits:
commit ef7db957b518f19ab944fcebf83ca73a18e2357c
Author:     Michael Stahl <michael.st...@cib.de>
AuthorDate: Wed Jun 10 17:21:45 2020 +0200
Commit:     Thorsten Behrens <thorsten.behr...@cib.de>
CommitDate: Fri Jun 12 01:14:24 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.st...@cib.de>
    (cherry picked from commit b2b234269b13d5dfd8e7123a25d282d88fee33a0)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96104
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index f6e38600f1ba..a695cca98713 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -410,7 +410,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),
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to