[Libreoffice-commits] core.git: sw/inc sw/source
Bjoern Michaelsen (via logerrit)
logerrit at kemper.freedesktop.org
Mon Oct 26 06:30:23 UTC 2020
sw/inc/fmtcol.hxx | 2 +-
sw/source/core/doc/fmtcol.cxx | 17 ++++++++++-------
2 files changed, 11 insertions(+), 8 deletions(-)
New commits:
commit 1f44f1786bbd306e1aea578842ffcc197fbd60ab
Author: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
AuthorDate: Sun Oct 25 21:12:19 2020 +0100
Commit: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
CommitDate: Mon Oct 26 07:29:44 2020 +0100
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 at libreoffice.org>
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
More information about the Libreoffice-commits
mailing list