summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-07-21 12:01:01 +0200
committerMichael Stahl <mstahl@redhat.com>2017-07-21 12:08:32 +0200
commit2e486daff35ab16e810bfdafb24b19bcbf2fe8cd (patch)
treeeebbb1de82ff862a2fdfdf53dea3c6b963e19433 /sw/inc
parentd7ba631598061f68c1f0dca54b6e227b82d7c73a (diff)
tdf#108867 sw: fix dangling text box frame format pointers in Undo
If the text box is removed, the SwFrameFormat of the drawing shape still retains a pointer to the frame SwFrameFormat, and the latter is owned by the SwUndoFlyBase. This is pretty bad, so try to clear & reset the connection between them in SwUndoFlyBase::InsFly() and DelFly(). Hopefully nothing will actually delete the drawing shape SwFrameFormat while the Undo object is alive. Note that when the SwUndoInsLayFormat is created when the text box is added, the GetOtherTextBoxFormat() returns null as it's set later, that's why the constructor can't do anything. Change-Id: Iae562b6f8f272e47b2b5cf8ee80778db15d29ce0
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/frmfmt.hxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 2dd3c81a52f8..6c2de6c35e20 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -61,6 +61,7 @@ class SW_DLLPUBLIC SwFrameFormat: public SwFormat
friend class ::sw::DocumentLayoutManager; ///< Is allowed to call protected CTor.
friend class SwFrameFormats; ///< Is allowed to update the list backref.
friend class SwTextBoxHelper;
+ friend class SwUndoFlyBase; ///< calls SetOtherTextBoxFormat
css::uno::WeakReference<css::uno::XInterface> m_wXObject;