diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-10-25 21:12:19 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-10-26 07:29:44 +0100 |
commit | 1f44f1786bbd306e1aea578842ffcc197fbd60ab (patch) | |
tree | 379c51a9205bdb455c039a4d1ddfa2c8d9eb0382 /sw | |
parent | 3e9620707a029720ce7b293206961c5e73f1565f (diff) |
SwTextFormatColl: Modify no more ...
Change-Id: Idbacff4f7bdd0f986c55c68f796c00b6f82d61ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104782
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/fmtcol.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/fmtcol.cxx | 17 |
2 files changed, 11 insertions, 8 deletions
diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx index cc612d48ce38..20b5409f21e0 100644 --- a/sw/inc/fmtcol.hxx +++ b/sw/inc/fmtcol.hxx @@ -88,7 +88,7 @@ protected: } /// To get UL- / LR- / FontHeight-changes. - virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; + virtual void SwClientNotify(const SwModify&, const SfxHint&) override; public: diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx index 93089178dd62..891a11795dce 100644 --- a/sw/source/core/doc/fmtcol.cxx +++ b/sw/source/core/doc/fmtcol.cxx @@ -108,14 +108,16 @@ namespace TextFormatCollFunc } } // end of namespace TextFormatCollFunc -void SwTextFormatColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) +void SwTextFormatColl::SwClientNotify(const SwModify& rModify, const SfxHint& rHint) { - if( GetDoc()->IsInDtor() ) + auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint); + if(!pLegacy) + return; + if(GetDoc()->IsInDtor()) { - SwFormatColl::Modify( pOld, pNew ); + SwFormatColl::SwClientNotify(rModify, rHint); return; } - bool bNewParent( false ); // #i66431# - adjust type of <bNewParent> const SvxULSpaceItem *pNewULSpace = nullptr, *pOldULSpace = nullptr; const SvxLRSpaceItem *pNewLRSpace = nullptr, *pOldLRSpace = nullptr; @@ -125,8 +127,9 @@ void SwTextFormatColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew const SwNumRuleItem* pNewNumRuleItem( nullptr ); const SwAttrSetChg *pNewChgSet = nullptr, *pOldChgSet = nullptr; - - switch( pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ) + const auto pOld = pLegacy->m_pOld; + const auto pNew = pLegacy->m_pNew; + switch( pLegacy->GetWhich() ) { case RES_ATTRSET_CHG: // Only recalculate if we're not the sender! @@ -312,7 +315,7 @@ void SwTextFormatColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew } if( bContinue ) - SwFormatColl::Modify( pOld, pNew ); + SwFormatColl::SwClientNotify(rModify, rHint); } bool SwTextFormatColl::IsAtDocNodeSet() const |