[Libreoffice-commits] core.git: sw/inc sw/source
Bjoern Michaelsen
bjoern.michaelsen at canonical.com
Sun Dec 4 11:36:10 UTC 2016
sw/inc/frmfmt.hxx | 1 +
sw/source/core/draw/dcontact.cxx | 3 +++
sw/source/core/undo/undobj1.cxx | 9 +--------
3 files changed, 5 insertions(+), 8 deletions(-)
New commits:
commit aa7ce30c039f90bf2361abf91e99e9102f390724
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Thu Dec 1 14:08:02 2016 +0100
use proper message passing
Change-Id: I1ee686ff96615f7b8aa69c0cd4caafaae07318b7
Reviewed-on: https://gerrit.libreoffice.org/31493
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 718be2e..644271d 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 9ecd71b..2c78efc 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 c08292c..ab7d5ff 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();
More information about the Libreoffice-commits
mailing list