sw/inc/lineinfo.hxx | 2 +- sw/source/core/doc/lineinfo.cxx | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-)
New commits: commit 431194df900fd573d22fb0db0d140fa009f161f2 Author: Bjoern Michaelsen <bjoern.michael...@libreoffice.org> AuthorDate: Tue Oct 20 22:15:52 2020 +0200 Commit: Bjoern Michaelsen <bjoern.michael...@libreoffice.org> CommitDate: Sun Oct 25 21:11:07 2020 +0100 LineInfo: Modify no more ... Change-Id: I8c2de87bf82a34449838120e23c78647f04088b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104580 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michael...@libreoffice.org> 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 ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits