summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-11-05 00:55:00 +0100
committerBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-11-05 14:10:32 +0100
commitc44fa10aa2a04945196622c73272c775374be486 (patch)
tree0935924be251a34392b04818aef59673a5a0bf82 /sw/source/core/unocore
parentc967a7f0130d804a73fa7073c4a1703fcd51bd75 (diff)
retire most of SwModify
only remaining uses are: - in calbck.{c,h}xx - in uwriter unittests - as a parameter of SwClientNotify all other uses have been replaced with sw::BroadcastingModify, which contains sw::BroadcastingMixin functionality. Existing code should then be moved to sw::BroadcastingMixin (only) as soon as possible. Change-Id: Ief7895597633c2fcb97e1cbc182905d75feb1567 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105320 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/source/core/unocore')
-rw-r--r--sw/source/core/unocore/unoportenum.cxx10
-rw-r--r--sw/source/core/unocore/unorefmk.cxx2
2 files changed, 5 insertions, 7 deletions
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index f6919bbc7467..fbb2a8744d8a 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -1199,11 +1199,11 @@ static void lcl_ExtractFramePositions(FrameClientSortList_t& rFrames, sal_Int32
if (rFrame.nIndex > nCurrentIndex)
break;
- const SwModify* pFrame = rFrame.pFrameClient->GetRegisteredIn();
+ const auto pFrame = static_cast<const SwFrameFormat*>(rFrame.pFrameClient->GetRegisteredIn());
if (!pFrame)
continue;
- auto& rFormat = *static_cast<SwFrameFormat*>(const_cast<SwModify*>(pFrame));
+ auto& rFormat = *const_cast<SwFrameFormat*>(pFrame);
const SwFormatAnchor& rAnchor = rFormat.GetAnchor();
const SwPosition* pPosition = rAnchor.GetContentAnchor();
if (!pPosition)
@@ -1235,12 +1235,10 @@ static sal_Int32 lcl_ExportFrames(
while (!i_rFrames.empty() && (i_rFrames.front().nIndex == i_nCurrentIndex))
// do not check for i_nEnd here; this is done implicitly by lcl_MoveCursor
{
- const SwModify * const pFrame =
- i_rFrames.front().pFrameClient->GetRegisteredIn();
+ auto pFrame = static_cast<SwFrameFormat*>(i_rFrames.front().pFrameClient->GetRegisteredIn());
if (pFrame) // Frame could be disposed
{
- SwXTextPortion* pPortion = new SwXTextPortion(i_pUnoCursor, i_xParent,
- *static_cast<SwFrameFormat*>( const_cast<SwModify*>( pFrame ) ) );
+ SwXTextPortion* pPortion = new SwXTextPortion(i_pUnoCursor, i_xParent, *pFrame );
rPortions.emplace_back(pPortion);
}
i_rFrames.pop_front();
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index aa94abd1a229..62b34a61cd4f 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -652,7 +652,7 @@ inline const ::sw::Meta* SwXMeta::Impl::GetMeta() const
return m_pMeta;
}
-// SwModify
+// sw::BroadcastingModify
void SwXMeta::Impl::Notify(const SfxHint& rHint)
{
m_pTextPortions.reset(); // throw away cache (SwTextNode changed)