[Libreoffice-commits] core.git: sw/inc sw/source
Bjoern Michaelsen (via logerrit)
logerrit at kemper.freedesktop.org
Mon Oct 26 06:31:34 UTC 2020
sw/inc/section.hxx | 4 ++--
sw/source/core/docnode/section.cxx | 18 ++++++++++++++----
2 files changed, 16 insertions(+), 6 deletions(-)
New commits:
commit 6cec484aeba7c08b69c11273ca9b6879609c7046
Author: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
AuthorDate: Sun Oct 25 20:31:44 2020 +0100
Commit: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
CommitDate: Mon Oct 26 07:30:59 2020 +0100
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 at libreoffice.org>
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:
More information about the Libreoffice-commits
mailing list