Kaydet (Commit) 52885c7b authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen Kaydeden (comit) Björn Michaelsen

use message passing

Change-Id: Idc5fbdcd6d1a11b7607995c1d492ffc829879566
Reviewed-on: https://gerrit.libreoffice.org/33718Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarBjörn Michaelsen <bjoern.michaelsen@canonical.com>
üst 734c0058
...@@ -256,6 +256,7 @@ namespace sw ...@@ -256,6 +256,7 @@ namespace sw
{ {
enum class DrawFrameFormatHintId { enum class DrawFrameFormatHintId {
DYING, DYING,
DYING_FLYFRAMEFORMAT, /* possibly can be merged with DYING, if all client handle it and handle it the same */
PREPPASTING, PREPPASTING,
PREP_INSERT_FLY, PREP_INSERT_FLY,
PREP_DELETE_FLY, PREP_DELETE_FLY,
......
...@@ -590,6 +590,17 @@ void SwFlyDrawContact::SwClientNotify(const SwModify& rMod, const SfxHint& rHint ...@@ -590,6 +590,17 @@ void SwFlyDrawContact::SwClientNotify(const SwModify& rMod, const SfxHint& rHint
if (pFormat && pFormat->Which() == RES_FLYFRMFMT && !pFormat->getIDocumentLayoutAccess().GetCurrentViewShell()) if (pFormat && pFormat->Which() == RES_FLYFRMFMT && !pFormat->getIDocumentLayoutAccess().GetCurrentViewShell())
pGetZOrdnerHint->m_rnZOrder = GetMaster()->GetOrdNum(); 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 // SwDrawContact
...@@ -1528,7 +1539,7 @@ void SwDrawContact::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) ...@@ -1528,7 +1539,7 @@ void SwDrawContact::SwClientNotify(const SwModify& rMod, const SfxHint& rHint)
GetAnchoredObj(GetMaster())->MakeObjPos(); GetAnchoredObj(GetMaster())->MakeObjPos();
break; break;
default: default:
SAL_WARN("sw.core", "unhandled DrawFrameFormatHintId"); ;
} }
} }
else if (auto pCheckDrawFrameFormatLayerHint = dynamic_cast<const sw::CheckDrawFrameFormatLayerHint*>(&rHint)) else if (auto pCheckDrawFrameFormatLayerHint = dynamic_cast<const sw::CheckDrawFrameFormatLayerHint*>(&rHint))
......
...@@ -2877,12 +2877,8 @@ SwFlyFrameFormat::~SwFlyFrameFormat() ...@@ -2877,12 +2877,8 @@ SwFlyFrameFormat::~SwFlyFrameFormat()
} while( nullptr != ( pLast = aIter.Next() )); } while( nullptr != ( pLast = aIter.Next() ));
SwIterator<SwFlyDrawContact,SwFormat> a2ndIter( *this ); 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. /// Creates the Frames if the format describes a paragraph-bound frame.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment