diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-10-25 20:31:44 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-10-26 07:30:59 +0100 |
commit | 6cec484aeba7c08b69c11273ca9b6879609c7046 (patch) | |
tree | b18266b60f4e6bef3e3f49135122c1b94a2dc283 /sw | |
parent | 1f44f1786bbd306e1aea578842ffcc197fbd60ab (diff) |
Section/SectionFormat: Modify no more ...
Change-Id: I4f890013401c0ca1313ec0b9f6c2827019759446
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104778
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw')
-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: |