[Libreoffice-commits] core.git: sw/source
Bjoern Michaelsen (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 28 18:57:05 UTC 2020
sw/source/core/inc/UndoCore.hxx | 2 +-
sw/source/core/undo/undobj1.cxx | 23 ++++++++++-------------
2 files changed, 11 insertions(+), 14 deletions(-)
New commits:
commit 8a48afac3e31a69622c9006c6ae35e26287d37b9
Author: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
AuthorDate: Sat Sep 19 13:54:01 2020 +0200
Commit: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
CommitDate: Mon Sep 28 20:56:21 2020 +0200
SwUndoSetFlyFormat: SwClient::Modify no more
Change-Id: I366745a410c8b3f1e6198392d899a16c9ac36b9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103034
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
diff --git a/sw/source/core/inc/UndoCore.hxx b/sw/source/core/inc/UndoCore.hxx
index a86e30c8369c..b94f95b08601 100644
--- a/sw/source/core/inc/UndoCore.hxx
+++ b/sw/source/core/inc/UndoCore.hxx
@@ -196,7 +196,7 @@ class SwUndoSetFlyFormat : public SwUndo, public SwClient
bool m_bAnchorChanged;
void PutAttr( sal_uInt16 nWhich, const SfxPoolItem* pItem );
- void Modify( const SfxPoolItem*, const SfxPoolItem* ) override;
+ void SwClientNotify(const SwModify&, const SfxHint&) override;
void GetAnchor( SwFormatAnchor& rAnhor, sal_uLong nNode, sal_Int32 nContent );
public:
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index 3feab0a10c74..051161319a8c 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -693,22 +693,19 @@ void SwUndoSetFlyFormat::PutAttr( sal_uInt16 nWhich, const SfxPoolItem* pItem )
m_pItemSet->InvalidateItem( nWhich );
}
-void SwUndoSetFlyFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* )
+void SwUndoSetFlyFormat::SwClientNotify(const SwModify&, const SfxHint& rHint)
{
- if( !pOld )
+ auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint);
+ if(!pLegacy || !pLegacy->m_pOld)
return;
-
- sal_uInt16 nWhich = pOld->Which();
-
- if( nWhich < POOLATTR_END )
- PutAttr( nWhich, pOld );
- else if( RES_ATTRSET_CHG == nWhich )
+ const sal_uInt16 nWhich = pLegacy->m_pOld->Which();
+ if(nWhich < POOLATTR_END)
+ PutAttr(nWhich, pLegacy->m_pOld);
+ else if(RES_ATTRSET_CHG == nWhich)
{
- SfxItemIter aIter( *static_cast<const SwAttrSetChg*>(pOld)->GetChgSet() );
- for (const SfxPoolItem* pItem = aIter.GetCurItem(); pItem; pItem = aIter.NextItem())
- {
- PutAttr( pItem->Which(), pItem );
- }
+ SfxItemIter aIter(*static_cast<const SwAttrSetChg*>(pLegacy->m_pOld)->GetChgSet());
+ for(const SfxPoolItem* pItem = aIter.GetCurItem(); pItem; pItem = aIter.NextItem())
+ PutAttr(pItem->Which(), pItem);
}
}
More information about the Libreoffice-commits
mailing list