diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-12-31 23:03:01 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2021-01-02 21:56:11 +0100 |
commit | ac624ef10a4620c2a12ea688e313a8d5173052cf (patch) | |
tree | eba5ab66ba08b6247bae965a5f9add261f9bb6e6 /sw/source/core/attr/calbck.cxx | |
parent | ed7d6dd9e222daef5a0d0147e0311b951f9a29ce (diff) |
SwFrame: Modify no more
Change-Id: I8e2c89f2c897535013d64720b6c2c5bbac602b14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108551
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/source/core/attr/calbck.cxx')
-rw-r--r-- | sw/source/core/attr/calbck.cxx | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index 675c4e54993b..c14baebc7f22 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -33,11 +33,6 @@ namespace sw { bool ListenerEntry::GetInfo(SfxPoolItem& rInfo) const { return m_pToTell == nullptr || m_pToTell->GetInfo( rInfo ); } - void ListenerEntry::Modify(const SfxPoolItem *const pOldValue, - const SfxPoolItem *const pNewValue) - { - SwClientNotify(*GetRegisteredIn(), sw::LegacyModifyHint(pOldValue, pNewValue)); - } void ListenerEntry::SwClientNotify(const SwModify& rModify, const SfxHint& rHint) { if (auto pLegacyHint = dynamic_cast<const sw::LegacyModifyHint*>(&rHint)) @@ -110,10 +105,8 @@ std::unique_ptr<sw::ModifyChangedHint> SwClient::CheckRegistration( const SfxPoo void SwClient::SwClientNotify(const SwModify&, const SfxHint& rHint) { - if (auto pLegacyHint = dynamic_cast<const sw::LegacyModifyHint*>(&rHint)) - { - Modify(pLegacyHint->m_pOld, pLegacyHint->m_pNew); - } + if(auto pLegacyHint = dynamic_cast<const sw::LegacyModifyHint*>(&rHint)) + CheckRegistration(pLegacyHint->m_pOld); }; void SwClient::StartListeningToSameModifyAs(const SwClient& other) @@ -130,11 +123,6 @@ void SwClient::EndListeningAll() m_pRegisteredIn->Remove(this); } -void SwClient::Modify(SfxPoolItem const*const pOldValue, SfxPoolItem const*const /*pNewValue*/) -{ - CheckRegistration( pOldValue ); -} - void SwModify::SetInDocDTOR() { // If the document gets destroyed anyway, just tell clients to @@ -359,6 +347,12 @@ void sw::WriterMultiListener::EndListeningAll() sw::ClientIteratorBase* sw::ClientIteratorBase::s_pClientIters = nullptr; +void SwModify::SwClientNotify(const SwModify&, const SfxHint& rHint) +{ + if(auto pLegacyHint = dynamic_cast<const sw::LegacyModifyHint*>(&rHint)) + NotifyClients(pLegacyHint->m_pOld, pLegacyHint->m_pNew); +} + void SwModify::CallSwClientNotify( const SfxHint& rHint ) const { DBG_TESTSOLARMUTEX(); |