sw/inc/paratr.hxx | 2 +- sw/source/core/para/paratr.cxx | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-)
New commits: commit 014303fb89c35ae3f40092b22dcad2c74fb60e15 Author: Bjoern Michaelsen <bjoern.michael...@libreoffice.org> AuthorDate: Mon Nov 2 14:32:11 2020 +0100 Commit: Bjoern Michaelsen <bjoern.michael...@libreoffice.org> CommitDate: Mon Nov 2 19:35:55 2020 +0100 SwFormatDrop: remove Modify/ModifyBroadcast/ModifyNotification from this beauty Change-Id: I858e0c26849f227f821966d3627114b276b5717d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105185 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michael...@libreoffice.org> diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx index 7cc18282eed6..e9428a39cdff 100644 --- a/sw/inc/paratr.hxx +++ b/sw/inc/paratr.hxx @@ -68,7 +68,7 @@ private: SwFormatDrop & operator= (const SwFormatDrop &) = delete; protected: - virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; + virtual void SwClientNotify(const SwModify&, const SfxHint&) override; public: diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx index 959a5a78dda9..c2d9eb0cf311 100644 --- a/sw/source/core/para/paratr.cxx +++ b/sw/source/core/para/paratr.cxx @@ -70,19 +70,20 @@ void SwFormatDrop::SetCharFormat( SwCharFormat *pNew ) pNew->Add( this ); } -void SwFormatDrop::Modify( const SfxPoolItem*, const SfxPoolItem * ) +void SwFormatDrop::SwClientNotify(const SwModify&, const SfxHint&) { - if( m_pDefinedIn ) + if(!m_pDefinedIn) + return; + if(dynamic_cast<const SwFormat*>(m_pDefinedIn) == nullptr) { - if( dynamic_cast< const SwFormat *>( m_pDefinedIn ) == nullptr) - m_pDefinedIn->ModifyNotification( this, this ); - else if( m_pDefinedIn->HasWriterListeners() && - !m_pDefinedIn->IsModifyLocked() ) - { - // Notify those who are dependent on the format on our own. - // The format itself wouldn't pass on the notify as it does not get past the check. - m_pDefinedIn->ModifyBroadcast( this, this ); - } + SwModify aMod; + m_pDefinedIn->SwClientNotify(aMod, sw::LegacyModifyHint(this, this)); + } + else if(m_pDefinedIn->HasWriterListeners() && !m_pDefinedIn->IsModifyLocked()) + { + // Notify those who are dependent on the format on our own. + // The format itself wouldn't pass on the notify as it does not get past the check. + m_pDefinedIn->CallSwClientNotify(sw::LegacyModifyHint(this, this)); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits