[Libreoffice-commits] core.git: sw/inc sw/source
Bjoern Michaelsen (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 2 18:36:39 UTC 2020
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.michaelsen at libreoffice.org>
AuthorDate: Mon Nov 2 14:32:11 2020 +0100
Commit: Bjoern Michaelsen <bjoern.michaelsen at 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.michaelsen at 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));
}
}
More information about the Libreoffice-commits
mailing list