diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-10-20 22:15:52 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-10-25 21:11:07 +0100 |
commit | 431194df900fd573d22fb0db0d140fa009f161f2 (patch) | |
tree | ab2c1695704794729554912d244ca82955404a76 | |
parent | 17d48cd63a19adf41d1355f74468a621e5c6f108 (diff) |
LineInfo: Modify no more ...
Change-Id: I8c2de87bf82a34449838120e23c78647f04088b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104580
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
-rw-r--r-- | sw/inc/lineinfo.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/lineinfo.cxx | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx index 5bc245894777..5ea2348432c9 100644 --- a/sw/inc/lineinfo.hxx +++ b/sw/inc/lineinfo.hxx @@ -49,7 +49,7 @@ class SW_DLLPUBLIC SwLineNumberInfo final : public SwClient /**< purpose of deri bool m_bCountInFlys; ///< Count also within FlyFrames? bool m_bRestartEachPage; /**< Restart counting at the first paragraph of each page (even on follows when paragraphs are split) */ - virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; + virtual void SwClientNotify( const SwModify&, const SfxHint& ) override; public: SwLineNumberInfo(); diff --git a/sw/source/core/doc/lineinfo.cxx b/sw/source/core/doc/lineinfo.cxx index 9922e3aa1012..094c3854a8e9 100644 --- a/sw/source/core/doc/lineinfo.cxx +++ b/sw/source/core/doc/lineinfo.cxx @@ -112,9 +112,12 @@ void SwLineNumberInfo::SetCharFormat( SwCharFormat *pChFormat ) pChFormat->Add( this ); } -void SwLineNumberInfo::Modify( const SfxPoolItem* pOld, const SfxPoolItem* /*pNew*/ ) +void SwLineNumberInfo::SwClientNotify(const SwModify&, const SfxHint& rHint) { - CheckRegistration( pOld ); + auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint); + if(!pLegacy) + return; + CheckRegistration( pLegacy->m_pOld ); SwDoc *pDoc = static_cast<SwCharFormat*>(GetRegisteredIn())->GetDoc(); SwRootFrame* pRoot = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); if( pRoot ) |