summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-12-31 22:34:00 +0100
committerBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2021-01-02 04:21:14 +0100
commit5cda343212d086b5e1f06e9d4eba16d254a56628 (patch)
treed6d945b513a035266fbf4012f6269ffd8876e0c0 /sw
parentc38f638360579036f0d323ea68c5c1db13c7d450 (diff)
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 <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/fly.cxx7
-rw-r--r--sw/source/core/layout/pagechg.cxx9
-rw-r--r--sw/source/core/layout/sectfrm.cxx7
-rw-r--r--sw/source/core/layout/tabfrm.cxx13
4 files changed, 24 insertions, 12 deletions
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 <SwPageFrame::Modify(..)> and probably by calling
- // <SwLayoutFrame::Modify(..)> at the end.
+ // <SwLayoutFrame::SwClientNotify(..)> at the end.
// It can also causes inconsistences, because the lowers are
// adjusted, but not calculated, and a <SwPageFrame::MakeAll()> 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<const sw::LegacyModifyHint*>(&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<const sw::MoveTableBoxHint*>(&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);
}
}