sw/inc/frmfmt.hxx | 1 + sw/source/core/draw/dcontact.cxx | 13 ++++++++++++- sw/source/core/layout/atrfrm.cxx | 6 +----- 3 files changed, 14 insertions(+), 6 deletions(-)
New commits: commit 52885c7b82e6cfdd9072af2dc597edcb31192e89 Author: Bjoern Michaelsen <bjoern.michael...@canonical.com> Date: Mon Jan 30 20:17:39 2017 +0100 use message passing Change-Id: Idc5fbdcd6d1a11b7607995c1d492ffc829879566 Reviewed-on: https://gerrit.libreoffice.org/33718 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx index f8ee778..c0f7e30 100644 --- a/sw/inc/frmfmt.hxx +++ b/sw/inc/frmfmt.hxx @@ -256,6 +256,7 @@ namespace sw { enum class DrawFrameFormatHintId { DYING, + DYING_FLYFRAMEFORMAT, /* possibly can be merged with DYING, if all client handle it and handle it the same */ PREPPASTING, PREP_INSERT_FLY, PREP_DELETE_FLY, diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 714dc40..266adad 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -590,6 +590,17 @@ void SwFlyDrawContact::SwClientNotify(const SwModify& rMod, const SfxHint& rHint if (pFormat && pFormat->Which() == RES_FLYFRMFMT && !pFormat->getIDocumentLayoutAccess().GetCurrentViewShell()) pGetZOrdnerHint->m_rnZOrder = GetMaster()->GetOrdNum(); } + else if (auto pDrawFrameFormatHint = dynamic_cast<const sw::DrawFrameFormatHint*>(&rHint)) + { + switch(pDrawFrameFormatHint->m_eId) + { + case sw::DrawFrameFormatHintId::DYING_FLYFRAMEFORMAT: + delete this; + break; + default: + ; + } + } } // SwDrawContact @@ -1528,7 +1539,7 @@ void SwDrawContact::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) GetAnchoredObj(GetMaster())->MakeObjPos(); break; default: - SAL_WARN("sw.core", "unhandled DrawFrameFormatHintId"); + ; } } else if (auto pCheckDrawFrameFormatLayerHint = dynamic_cast<const sw::CheckDrawFrameFormatLayerHint*>(&rHint)) diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 566f785..ad17408 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -2877,12 +2877,8 @@ SwFlyFrameFormat::~SwFlyFrameFormat() } while( nullptr != ( pLast = aIter.Next() )); SwIterator<SwFlyDrawContact,SwFormat> a2ndIter( *this ); - SwFlyDrawContact* pC = a2ndIter.First(); - if( pC ) - do { - delete pC; - } while( nullptr != ( pC = a2ndIter.Next() )); + CallSwClientNotify(sw::DrawFrameFormatHint(sw::DrawFrameFormatHintId::DYING_FLYFRAMEFORMAT)); } /// Creates the Frames if the format describes a paragraph-bound frame.
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits