diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-10-05 01:46:22 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-10-06 22:09:33 +0200 |
commit | a883002d8e2fd77f80c43b7b2e6ac329d83d929d (patch) | |
tree | a74c82f382612a84997785fb9157dae522daca87 | |
parent | 19a0fbf456129e011cb9ab9ab6ab730cba274bbd (diff) |
SwGrammarContext: ::Modify no more
Change-Id: I5569ba4f7fb00477233a5ffaabf9b2c8dca207c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103939
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
-rw-r--r-- | sw/source/core/txtnode/SwGrammarContact.cxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/sw/source/core/txtnode/SwGrammarContact.cxx b/sw/source/core/txtnode/SwGrammarContact.cxx index fc6883ca92ab..ad1e510e6d2a 100644 --- a/sw/source/core/txtnode/SwGrammarContact.cxx +++ b/sw/source/core/txtnode/SwGrammarContact.cxx @@ -56,7 +56,7 @@ public: virtual void finishGrammarCheck( SwTextNode& rTextNode ) override; protected: // virtual function of SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; + virtual void SwClientNotify( const SwModify&, const SfxHint& rHint) override; }; } @@ -142,18 +142,14 @@ SwGrammarMarkUp* SwGrammarContact::getGrammarCheck( SwTextNode& rTextNode, bool return pRet; } -void SwGrammarContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem * ) +void SwGrammarContact::SwClientNotify(const SwModify&, const SfxHint& rHint) { - if( !pOld || pOld->Which() != RES_OBJECTDYING ) + auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint); + if(!pLegacy || pLegacy->GetWhich() != RES_OBJECTDYING) return; - - const SwPtrMsgPoolItem *pDead = static_cast<const SwPtrMsgPoolItem *>(pOld); - if( pDead->pObject == GetRegisteredIn() ) - { // if my current paragraph dies, I throw the proxy list away - aTimer.Stop(); - EndListeningAll(); - mpProxyList.reset(); - } + aTimer.Stop(); + EndListeningAll(); + mpProxyList.reset(); } void SwGrammarContact::finishGrammarCheck( SwTextNode& rTextNode ) |