diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2018-05-07 23:05:30 +0200 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@libreoffice.org> | 2018-05-08 01:55:36 +0200 |
commit | ecf50fe71596c3edba8ce437481ab80ae1cd8935 (patch) | |
tree | 4fd14b3c2db9051e754e61268bbb818c8889f1e6 | |
parent | 91b0d2122bdee361bf5412a42d48ff051159cbf2 (diff) |
remove now obsolete SwDepend
Change-Id: I511a68c2e3612714506b09b0594e96caf4d65d0b
Reviewed-on: https://gerrit.libreoffice.org/53949
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
-rw-r--r-- | sw/inc/calbck.hxx | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index 440a822b8a15..cbe45ce74b48 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -204,51 +204,6 @@ public: bool HasOnlyOneListener() { return m_pWriterListeners && m_pWriterListeners->IsLast(); } }; -// SwDepend - -/* - * Helper class for objects that need to depend on more than one SwClient - */ -class SW_DLLPUBLIC SwDepend final : public SwClient -{ - SwClient *m_pToTell; - -public: - SwDepend(SwClient *pTellHim, SwModify *pDepend) : SwClient(pDepend), m_pToTell(pTellHim) {} - SwDepend(SwDepend&) = delete; - SwDepend(SwDepend&& o) - : SwClient(std::move(o)), m_pToTell(o.m_pToTell) - { - o.m_pToTell = nullptr; - } - - /** get Client information */ - virtual bool GetInfo( SfxPoolItem& rInfo) const override - { return m_pToTell == nullptr || m_pToTell->GetInfo( rInfo ); } -private: - virtual void Modify( const SfxPoolItem* pOldValue, const SfxPoolItem *pNewValue ) override - { - SwClientNotify(*GetRegisteredIn(), sw::LegacyModifyHint(pOldValue, pNewValue)); - } - virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint ) override - { - if (auto pLegacyHint = dynamic_cast<const sw::LegacyModifyHint*>(&rHint)) - { - if( pLegacyHint->m_pNew && pLegacyHint->m_pNew->Which() == RES_OBJECTDYING ) - { - auto pModifyChanged = CheckRegistration(pLegacyHint->m_pOld); - if(pModifyChanged) - m_pToTell->SwClientNotify(rModify, *pModifyChanged); - } - else if( m_pToTell ) - m_pToTell->ModifyNotification(pLegacyHint->m_pOld, pLegacyHint->m_pNew); - } - else if(m_pToTell) - m_pToTell->SwClientNotifyCall(rModify, rHint); - } -}; - - namespace sw { class ListenerEntry; |