summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-06-10 17:21:45 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-06-12 01:14:24 +0200
commitef7db957b518f19ab944fcebf83ca73a18e2357c (patch)
treec5b8d8941b4de7a9da2e07855f1614524544420a
parent129006ee5bec721bfb8bae9cd55586b353e230b7 (diff)
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@cib.de> (cherry picked from commit b2b234269b13d5dfd8e7123a25d282d88fee33a0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96104 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--sw/source/core/doc/docedt.cxx2
1 files changed, 1 insertions, 1 deletions
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),