sw/qa/core/data/rtf/pass/forcepoint110.rtf |binary sw/source/core/unocore/unoframe.cxx | 9 +++++++-- 2 files changed, 7 insertions(+), 2 deletions(-)
New commits: commit 6a26be4102e2e80bca4138fb0bdbb38cae90cbc8 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Aug 16 16:18:51 2022 +0100 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Thu Aug 18 10:54:30 2022 +0200 forcepoint#110 set PaMs to somewhere safe to park Change-Id: I4dbf27d67b74ff99583dad46a5448700f133c2f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138371 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit d9655727ac688753ea12aaedc09a006134dd4a13) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138292 Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> diff --git a/sw/qa/core/data/rtf/pass/forcepoint110.rtf b/sw/qa/core/data/rtf/pass/forcepoint110.rtf new file mode 100644 index 000000000000..b7594ff6b622 Binary files /dev/null and b/sw/qa/core/data/rtf/pass/forcepoint110.rtf differ diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 9df8a8a180f1..ba005ac284cf 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2826,8 +2826,13 @@ void SwXFrame::attachToRange(uno::Reference<text::XTextRange> const& xTextRange, aFrameSet.Put( SwFormatAnchor( RndStdIds::FLY_AT_PAGE, 1 )); } - aPam.DeleteMark(); // mark position node will be deleted! - aIntPam.DeleteMark(); // mark position node will be deleted! + // park these no longer needed PaMs somewhere safe so MakeFlyAndMove + // can delete what it likes without any assert these are pointing to + // that content + aPam.DeleteMark(); + aIntPam.DeleteMark(); + *aPam.GetPoint() = *aIntPam.GetPoint() = SwPosition(pDoc->GetNodes()); + pFormat = pDoc->MakeFlyAndMove( *pCopySource, aFrameSet, nullptr, pParentFrameFormat );