diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-08-16 16:18:51 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-09-23 14:27:40 +0200 |
commit | 24255514ef5c4373f5155b31e87a0016c3063252 (patch) | |
tree | f11e44f90d0117d65cb751c187f711df4cbe35ea | |
parent | crashtesting: keep a reference to the passed in LibXSLTTransformer (diff) | |
download | core-24255514ef5c4373f5155b31e87a0016c3063252.tar.gz core-24255514ef5c4373f5155b31e87a0016c3063252.zip |
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.stahl@allotropia.de>
(cherry picked from commit d9655727ac688753ea12aaedc09a006134dd4a13)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138292
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
(cherry picked from commit 6a26be4102e2e80bca4138fb0bdbb38cae90cbc8)
-rw-r--r-- | sw/qa/core/data/rtf/pass/forcepoint110.rtf | bin | 0 -> 7776 bytes | |||
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 9 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sw/qa/core/data/rtf/pass/forcepoint110.rtf b/sw/qa/core/data/rtf/pass/forcepoint110.rtf Binary files differnew file mode 100644 index 000000000000..b7594ff6b622 --- /dev/null +++ b/sw/qa/core/data/rtf/pass/forcepoint110.rtf diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index b0de9f773463..6328408cb0af 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2713,8 +2713,13 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan 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( *m_pCopySource, aFrameSet, nullptr, pParentFrameFormat ); |