diff options
-rw-r--r-- | sw/inc/section.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/docnode/section.cxx | 18 |
2 files changed, 16 insertions, 6 deletions
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index bbadd99276b0..7aa1107b17f5 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -153,7 +153,7 @@ private: bool const bHidden, bool const bCondition); protected: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) override; + virtual void SwClientNotify(const SwModify&, const SfxHint&) override; public: @@ -281,7 +281,7 @@ class SW_DLLPUBLIC SwSectionFormat final SAL_DLLPRIVATE void UpdateParent(); // Parent has been changed. SwSectionFormat( SwFrameFormat* pDrvdFrame, SwDoc *pDoc ); - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) override; + virtual void SwClientNotify(const SwModify&, const SfxHint&) override; public: virtual ~SwSectionFormat() override; diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index c845e31272a7..04050ccdbb24 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -411,10 +411,15 @@ void SwSection::SetEditInReadonly(bool const bFlag) } } -void SwSection::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) +void SwSection::SwClientNotify(const SwModify&, const SfxHint& rHint) { + auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint); + if(!pLegacy) + return; + auto pOld = pLegacy->m_pOld; + auto pNew = pLegacy->m_pNew; bool bUpdateFootnote = false; - switch( pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ) + switch(pLegacy->GetWhich()) { case RES_ATTRSET_CHG: if (pNew && pOld) @@ -729,10 +734,15 @@ void SwSectionFormat::MakeFrames() } } -void SwSectionFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) +void SwSectionFormat::SwClientNotify(const SwModify&, const SfxHint& rHint) { + auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint); + if(!pLegacy) + return; bool bClients = false; - sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0; + sal_uInt16 nWhich = pLegacy->GetWhich(); + auto pOld = pLegacy->m_pOld; + auto pNew = pLegacy->m_pNew; switch( nWhich ) { case RES_ATTRSET_CHG: |