diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2016-12-01 14:08:02 +0100 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2016-12-04 11:35:38 +0000 |
commit | aa7ce30c039f90bf2361abf91e99e9102f390724 (patch) | |
tree | 227134a29388038d96e4f19de101ae7979232845 | |
parent | 68b64b41e5e156facb3fe20bb109a8e02dc97111 (diff) |
use proper message passing
Change-Id: I1ee686ff96615f7b8aa69c0cd4caafaae07318b7
Reviewed-on: https://gerrit.libreoffice.org/31493
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
-rw-r--r-- | sw/inc/frmfmt.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/draw/dcontact.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/undo/undobj1.cxx | 9 |
3 files changed, 5 insertions, 8 deletions
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx index 718be2e298a2..644271d6ba53 100644 --- a/sw/inc/frmfmt.hxx +++ b/sw/inc/frmfmt.hxx @@ -240,6 +240,7 @@ namespace sw DYING, PREPPASTING, PREP_INSERT_FLY, + PREP_DELETE_FLY, PAGE_OUT_OF_BOUNDS, }; struct SW_DLLPUBLIC DrawFrameFormatHint final: SfxHint diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 9ecd71bb1936..2c78efc50da2 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -1545,6 +1545,9 @@ void SwDrawContact::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) // move object to visible layer MoveObjToVisibleLayer(GetMaster()); break; + case sw::DrawFrameFormatHintId::PREP_DELETE_FLY: + RemoveMasterFromDrawPage(); + break; case sw::DrawFrameFormatHintId::PAGE_OUT_OF_BOUNDS: DisconnectFromLayout(); break; diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx index c08292cf5c20..ab7d5ff9612a 100644 --- a/sw/source/core/undo/undobj1.cxx +++ b/sw/source/core/undo/undobj1.cxx @@ -162,14 +162,7 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc ) } // OD 02.07.2003 #108784# - remove 'master' drawing object from drawing page else - { - SwDrawContact* pDrawContact = - static_cast<SwDrawContact*>(pFrameFormat->FindContactObj()); - if ( pDrawContact ) - { - pDrawContact->RemoveMasterFromDrawPage(); - } - } + pFrameFormat->CallSwClientNotify(sw::DrawFrameFormatHint(sw::DrawFrameFormatHintId::PREP_DELETE_FLY)); const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor(); const SwPosition* pPos = rAnchor.GetContentAnchor(); |