summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-08-16 16:18:51 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2022-09-22 21:50:20 +0200
commit118e62794ae9c02eb8109bbdb5df07932571de73 (patch)
treea580ba4beb8e2947be1b2cea73420b23280b52ae
parentc5c136b06517c8d25ac20398c3f54862b80fe39d (diff)
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.rtfbin0 -> 7776 bytes
-rw-r--r--sw/source/core/unocore/unoframe.cxx9
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
new file mode 100644
index 000000000000..b7594ff6b622
--- /dev/null
+++ b/sw/qa/core/data/rtf/pass/forcepoint110.rtf
Binary files differ
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index e2e5c9411715..e5ced2a27fd0 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -2771,8 +2771,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 );