sw/source/core/doc/docedt.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit b2b234269b13d5dfd8e7123a25d282d88fee33a0 Author: Michael Stahl <michael.st...@cib.de> AuthorDate: Wed Jun 10 17:21:45 2020 +0200 Commit: Michael Stahl <michael.st...@cib.de> CommitDate: Thu Jun 11 11:14:01 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> 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), _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits