summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-10-06 22:03:47 +0200
committerBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-10-17 23:42:43 +0200
commitafa1479e3dfe185f6ebe3c5217cbf1bdb7374eff (patch)
treeb27a357682832b0be5568af5f44111049a8c9cf6 /sw/source/core
parentd89a2b67ee74998b12ca7d23fb2b1717301a3f95 (diff)
SwAutoCompleteClient: Modify no more ...
Change-Id: Iec2a869de825b81c8e7b81dec746fa68e11ef864 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104045 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/doc/acmplwrd.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index 720dfd6c9120..ebf380b6e081 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -55,7 +55,7 @@ public:
static sal_uLong GetElementCount() {return s_nSwAutoCompleteClientCount;}
#endif
protected:
- virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override;
+ virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
};
class SwAutoCompleteWord_Impl
@@ -131,16 +131,17 @@ SwAutoCompleteClient& SwAutoCompleteClient::operator=(const SwAutoCompleteClient
return *this;
}
-void SwAutoCompleteClient::Modify( const SfxPoolItem* pOld, const SfxPoolItem *)
+void SwAutoCompleteClient::SwClientNotify(const SwModify&, const SfxHint& rHint)
{
- switch( pOld ? pOld->Which() : 0 )
+ auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint);
+ if(!pLegacy)
+ return;
+ switch(pLegacy->GetWhich())
{
- case RES_REMOVE_UNO_OBJECT:
- case RES_OBJECTDYING:
- if( static_cast<void*>(GetRegisteredIn()) == static_cast<const SwPtrMsgPoolItem *>(pOld)->pObject )
+ case RES_REMOVE_UNO_OBJECT:
+ case RES_OBJECTDYING:
EndListeningAll();
- m_pAutoCompleteWord->DocumentDying(*m_pDoc);
- break;
+ m_pAutoCompleteWord->DocumentDying(*m_pDoc);
}
}