summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/fmtcol.hxx2
-rw-r--r--sw/source/core/doc/fmtcol.cxx17
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