From 5cda343212d086b5e1f06e9d4eba16d254a56628 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Thu, 31 Dec 2020 22:34:00 +0100 Subject: Fix: Move remaining direct calls to SwLayoutFrame::Modify out of the way Change-Id: I544cc42845d346eb0901ca86621a563d1173e2b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108550 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen --- sw/source/core/layout/fly.cxx | 7 +++++-- sw/source/core/layout/pagechg.cxx | 9 ++++++--- sw/source/core/layout/sectfrm.cxx | 7 +++++-- sw/source/core/layout/tabfrm.cxx | 13 ++++++++----- 4 files changed, 24 insertions(+), 12 deletions(-) (limited to 'sw') diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 02b7c724eaef..299932e8fa7c 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -675,7 +675,7 @@ void SwFlyFrame::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) pOItem = aOIter.NextItem(); } while(pNItem); if(aOldSet.Count() || aNewSet.Count()) - SwLayoutFrame::Modify(&aOldSet, &aNewSet); + SwLayoutFrame::SwClientNotify(rMod, sw::LegacyModifyHint(&aOldSet, &aNewSet)); } else UpdateAttr_(pLegacy->m_pOld, pLegacy->m_pNew, nInvFlags); @@ -1057,7 +1057,10 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, pNewSet->ClearItem( nWhich ); } else - SwLayoutFrame::Modify( pOld, pNew ); + { + SwModify aMod; + SwLayoutFrame::SwClientNotify(aMod, sw::LegacyModifyHint(pOld, pNew)); + } } } diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 611b63753bc1..95321684de87 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -531,7 +531,7 @@ void SwPageFrame::SwClientNotify(const SwModify& rModify, const SfxHint& rHint) pNItem = aNIter.NextItem(); } while(pNItem); if(aOldSet.Count() || aNewSet.Count()) - SwLayoutFrame::Modify(&aOldSet, &aNewSet); + SwLayoutFrame::SwClientNotify(rModify, sw::LegacyModifyHint(&aOldSet, &aNewSet)); } else UpdateAttr_(pLegacy->m_pOld, pLegacy->m_pNew, nInvFlags); @@ -629,7 +629,7 @@ void SwPageFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, // Calculation of the page is not necessary, because its size is // invalidated here and further invalidation is done in the // calling method and probably by calling - // at the end. + // at the end. // It can also causes inconsistences, because the lowers are // adjusted, but not calculated, and a of // a next page is called. This is performed on the switch to the @@ -708,7 +708,10 @@ void SwPageFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, pNewSet->ClearItem( nWhich ); } else - SwLayoutFrame::Modify( pOld, pNew ); + { + SwModify aMod; + SwLayoutFrame::SwClientNotify(aMod, sw::LegacyModifyHint(pOld, pNew)); + } } } diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index aab18463fe06..0de0d2a5f296 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -2588,7 +2588,7 @@ void SwSectionFrame::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) pOItem = aOIter.NextItem(); } while (pNItem); if(aOldSet.Count() || aNewSet.Count()) - SwLayoutFrame::Modify(&aOldSet, &aNewSet); + SwLayoutFrame::SwClientNotify(rMod, sw::LegacyModifyHint(&aOldSet, &aNewSet)); } else UpdateAttr_(pLegacy->m_pOld, pLegacy->m_pNew, nInvFlags); @@ -2725,7 +2725,10 @@ void SwSectionFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pN pNewSet->ClearItem( nWhich ); } else - SwLayoutFrame::Modify( pOld, pNew ); + { + SwModify aMod; + SwLayoutFrame::SwClientNotify(aMod, sw::LegacyModifyHint(pOld, pNew)); + } } } diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 88033e3ee9b6..6eb3ccfd1627 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -3257,7 +3257,7 @@ SwTwips SwTabFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) return nDist; } -void SwTabFrame::SwClientNotify(const SwModify&, const SfxHint& rHint) +void SwTabFrame::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) { auto pLegacy = dynamic_cast(&rHint); if(!pLegacy) @@ -3282,7 +3282,7 @@ void SwTabFrame::SwClientNotify(const SwModify&, const SfxHint& rHint) pOItem = aOIter.NextItem(); } while(pNItem); if(aOldSet.Count() || aNewSet.Count()) - SwLayoutFrame::Modify(&aOldSet, &aNewSet); + SwLayoutFrame::SwClientNotify(rMod, sw::LegacyModifyHint(&aOldSet, &aNewSet)); } else UpdateAttr_(pLegacy->m_pOld, pLegacy->m_pNew, nInvFlags); @@ -3411,7 +3411,10 @@ void SwTabFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, pNewSet->ClearItem( nWhich ); } else - SwLayoutFrame::Modify( pOld, pNew ); + { + SwModify aMod; + SwLayoutFrame::SwClientNotify(aMod, sw::LegacyModifyHint(pOld, pNew)); + } } } @@ -5383,7 +5386,7 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder } } -void SwCellFrame::SwClientNotify(const SwModify&, const SfxHint& rHint) +void SwCellFrame::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) { if(auto pMoveTableBoxHint = dynamic_cast(&rHint)) { @@ -5473,7 +5476,7 @@ void SwCellFrame::SwClientNotify(const SwModify&, const SfxHint& rHint) pTabFrame->InvalidatePrt(); } } - SwLayoutFrame::Modify(pLegacy->m_pOld, pLegacy->m_pNew); + SwLayoutFrame::SwClientNotify(rMod, rHint); } } -- cgit v1.2.3