[Libreoffice-commits] core.git: sw/source
Bjoern Michaelsen (via logerrit)
logerrit at kemper.freedesktop.org
Tue Oct 6 20:10:17 UTC 2020
sw/source/core/txtnode/SwGrammarContact.cxx | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
New commits:
commit a883002d8e2fd77f80c43b7b2e6ac329d83d929d
Author: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
AuthorDate: Mon Oct 5 01:46:22 2020 +0200
Commit: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
CommitDate: Tue Oct 6 22:09:33 2020 +0200
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 at libreoffice.org>
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 )
More information about the Libreoffice-commits
mailing list