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

use proper message passing

Change-Id: I5c0b9007e5a84643ccbe3c5b6b6a913a43667e18
Reviewed-on: https://gerrit.libreoffice.org/31573Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarBjörn Michaelsen <bjoern.michaelsen@canonical.com>
üst aa7ce30c
...@@ -249,6 +249,12 @@ namespace sw ...@@ -249,6 +249,12 @@ namespace sw
DrawFrameFormatHint(DrawFrameFormatHintId eId) : m_eId(eId) {}; DrawFrameFormatHint(DrawFrameFormatHintId eId) : m_eId(eId) {};
virtual ~DrawFrameFormatHint() override; virtual ~DrawFrameFormatHint() override;
}; };
struct SW_DLLPUBLIC CheckDrawFrameFormatLayerHint final: SfxHint
{
bool* m_bCheckControlLayer;
CheckDrawFrameFormatLayerHint(bool* bCheckControlLayer) : m_bCheckControlLayer(bCheckControlLayer) {};
virtual ~CheckDrawFrameFormatLayerHint() override;
};
} }
class SW_DLLPUBLIC SwDrawFrameFormat: public SwFrameFormat class SW_DLLPUBLIC SwDrawFrameFormat: public SwFrameFormat
......
...@@ -1555,6 +1555,10 @@ void SwDrawContact::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) ...@@ -1555,6 +1555,10 @@ void SwDrawContact::SwClientNotify(const SwModify& rMod, const SfxHint& rHint)
SAL_WARN("sw.core", "unhandled DrawFrameFormatHintId"); SAL_WARN("sw.core", "unhandled DrawFrameFormatHintId");
} }
} }
else if (auto pCheckDrawFrameFormatLayerHint = dynamic_cast<const sw::CheckDrawFrameFormatLayerHint*>(&rHint))
{
*(pCheckDrawFrameFormatLayerHint->m_bCheckControlLayer) |= (GetMaster() && CheckControlLayer(GetMaster()));
}
} }
// #i26791# // #i26791#
......
...@@ -3329,6 +3329,7 @@ IMPL_FIXEDMEMPOOL_NEWDEL( SwDrawFrameFormat ) ...@@ -3329,6 +3329,7 @@ IMPL_FIXEDMEMPOOL_NEWDEL( SwDrawFrameFormat )
namespace sw namespace sw
{ {
DrawFrameFormatHint::~DrawFrameFormatHint() {} DrawFrameFormatHint::~DrawFrameFormatHint() {}
CheckDrawFrameFormatLayerHint::~CheckDrawFrameFormatLayerHint() {}
} }
SwDrawFrameFormat::~SwDrawFrameFormat() SwDrawFrameFormat::~SwDrawFrameFormat()
......
...@@ -1314,11 +1314,9 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode ) ...@@ -1314,11 +1314,9 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
if( RES_DRAWFRMFMT == pFormat->Which() && if( RES_DRAWFRMFMT == pFormat->Which() &&
pDoc->IsInHeaderFooter( pFormat->GetAnchor().GetContentAnchor()->nNode ) ) pDoc->IsInHeaderFooter( pFormat->GetAnchor().GetContentAnchor()->nNode ) )
{ {
SwDrawContact* pDrawContact = bool bCheckControlLayer = false;
static_cast<SwDrawContact*>(pFormat->FindContactObj()); pFormat->CallSwClientNotify(sw::CheckDrawFrameFormatLayerHint(&bCheckControlLayer));
if ( pDrawContact && if( bCheckControlLayer )
pDrawContact->GetMaster() &&
::CheckControlLayer( pDrawContact->GetMaster() ) )
{ {
// das soll nicht meoglich sein; hier verhindern // das soll nicht meoglich sein; hier verhindern
// Der Dtor des TextHints loescht nicht das Zeichen. // Der Dtor des TextHints loescht nicht das Zeichen.
......
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