summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2021-01-02 16:11:30 +0100
committerBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2021-01-03 22:47:00 +0100
commit96bafa464ebdbce3ef04bec9beae5e745bb37794 (patch)
tree9675ba4af4009253371f94c4e5fc1e1d530ffdc7 /sw/source/core/txtnode
parentb83c16834792874524019495662b2f23a066611c (diff)
NotifyClients no more
... and prevent recursive invalidation in SwAnchoredObject. Change-Id: I6f386f3ffded29663fcc74c2679b76c1b839f367 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108604 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/source/core/txtnode')
-rw-r--r--sw/source/core/txtnode/atrfld.cxx2
-rw-r--r--sw/source/core/txtnode/atrftn.cxx2
-rw-r--r--sw/source/core/txtnode/atrref.cxx2
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx18
-rw-r--r--sw/source/core/txtnode/thints.cxx6
-rw-r--r--sw/source/core/txtnode/txtedt.cxx8
6 files changed, 19 insertions, 19 deletions
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index aa4dab94b8e5..f8f326fc8f8f 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -294,7 +294,7 @@ void SwFormatField::UpdateTextNode(const SfxPoolItem* pOld, const SfxPoolItem* p
{ // invalidate cached UNO object
m_wXTextField = nullptr;
// ??? why does this Modify method not already do this?
- NotifyClients(pOld, pNew);
+ CallSwClientNotify(sw::LegacyModifyHint(pOld, pNew));
return;
}
diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx
index 5ec1f6f93a01..02188cf011de 100644
--- a/sw/source/core/txtnode/atrftn.cxx
+++ b/sw/source/core/txtnode/atrftn.cxx
@@ -165,7 +165,7 @@ void SwFormatFootnote::InvalidateFootnote()
{
SwPtrMsgPoolItem const item(RES_REMOVE_UNO_OBJECT,
&static_cast<sw::BroadcastingModify&>(*this)); // cast to base class (void*)
- NotifyClients(&item, &item);
+ CallSwClientNotify(sw::LegacyModifyHint(&item, &item));
}
void SwFormatFootnote::SetEndNote( bool b )
diff --git a/sw/source/core/txtnode/atrref.cxx b/sw/source/core/txtnode/atrref.cxx
index fdea6ce5dad7..8b11c4e525c7 100644
--- a/sw/source/core/txtnode/atrref.cxx
+++ b/sw/source/core/txtnode/atrref.cxx
@@ -68,7 +68,7 @@ void SwFormatRefMark::InvalidateRefMark()
{
SwPtrMsgPoolItem const item(RES_REMOVE_UNO_OBJECT,
&static_cast<sw::BroadcastingModify&>(*this)); // cast to base class (void*)
- NotifyClients(&item, &item);
+ CallSwClientNotify(sw::LegacyModifyHint(&item, &item));
}
// attribute for content references in the text
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index e71ea4b76119..79b0f389d358 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -396,7 +396,7 @@ void MoveMergedFlysAndFootnotes(std::vector<SwTextFrame*> const& rFrames,
if (rFirstNode.GetIndex() < rAnchor.GetContentAnchor()->nNode.GetIndex())
{
// move it to the new frame of "this"
- rFormat.NotifyClients(&rAnchor, &rAnchor);
+ rFormat.CallSwClientNotify(sw::LegacyModifyHint(&rAnchor, &rAnchor));
// note pObjs will be deleted if it becomes empty
assert(!pFrame->GetDrawObjs() || !pObjs->Contains(*pObj));
}
@@ -2278,7 +2278,7 @@ OUString SwTextNode::InsertText( const OUString & rStr, const SwIndex & rIdx,
if ( HasWriterListeners() )
{ // send this before messing with hints, which will send RES_UPDATE_ATTR
SwInsText aHint( aPos, nLen );
- NotifyClients( nullptr, &aHint );
+ CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aHint));
}
if ( HasHints() )
@@ -2708,12 +2708,12 @@ void SwTextNode::EraseText(const SwIndex &rIdx, const sal_Int32 nCount,
if( 1 == nCnt )
{
SwDelChr aHint( nStartIdx );
- NotifyClients( nullptr, &aHint );
+ CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aHint));
}
else
{
SwDelText aHint( nStartIdx, nCnt );
- NotifyClients( nullptr, &aHint );
+ CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aHint));
}
OSL_ENSURE(rIdx.GetIndex() == nStartIdx, "huh? start index has changed?");
@@ -2765,9 +2765,9 @@ void SwTextNode::GCAttr()
nMax,
0);
- NotifyClients( nullptr, &aHint );
+ CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aHint));
SwFormatChg aNew( GetTextColl() );
- NotifyClients( nullptr, &aNew );
+ CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aNew));
}
}
@@ -2839,7 +2839,7 @@ void SwTextNode::NumRuleChgd()
// Important note:
{
SvxLRSpaceItem& rLR = const_cast<SvxLRSpaceItem&>(GetSwAttrSet().GetLRSpace());
- NotifyClients( &rLR, &rLR );
+ CallSwClientNotify(sw::LegacyModifyHint(&rLR, &rLR));
}
SetWordCountDirty( true );
@@ -3708,12 +3708,12 @@ void SwTextNode::ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen,
SetIgnoreDontExpand( bOldExpFlg );
SwDelText aDelHint( nStartPos, nDelLen );
- NotifyClients( nullptr, &aDelHint );
+ CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aDelHint));
if (sInserted.getLength())
{
SwInsText aHint( nStartPos, sInserted.getLength() );
- NotifyClients( nullptr, &aHint );
+ CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aHint));
}
}
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index a5626e71f053..6052754c8b46 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1709,7 +1709,7 @@ void SwTextNode::DeleteAttribute( SwTextAttr * const pAttr )
m_pSwpHints->Delete( pAttr );
SwTextAttr::Destroy( pAttr, GetDoc().GetAttrPool() );
- NotifyClients( nullptr, &aHint );
+ CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aHint));
TryDeleteSwpHints();
}
@@ -1785,7 +1785,7 @@ void SwTextNode::DeleteAttributes(
m_pSwpHints->DeleteAtPos( nPos );
SwTextAttr::Destroy( pTextHt, GetDoc().GetAttrPool() );
- NotifyClients( nullptr, &aHint );
+ CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aHint));
}
}
}
@@ -2586,7 +2586,7 @@ void SwTextNode::FormatToTextAttr( SwTextNode* pNd )
if( aNdSet.Count() )
{
SwFormatChg aTmp1( pNd->GetFormatColl() );
- pNd->NotifyClients( &aTmp1, &aTmp1 );
+ pNd->CallSwClientNotify(sw::LegacyModifyHint(&aTmp1, &aTmp1));
}
}
}
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index edc0ac296d00..ba25c5fccba1 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -634,9 +634,9 @@ void SwTextNode::RstTextAttr(
nMax,
0);
- NotifyClients( nullptr, &aHint );
+ CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aHint));
SwFormatChg aNew( GetFormatColl() );
- NotifyClients( nullptr, &aNew );
+ CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aNew));
}
static sal_Int32 clipIndexBounds(const OUString &rStr, sal_Int32 nPos)
@@ -1983,10 +1983,10 @@ void SwTextNode::ReplaceTextOnly( sal_Int32 nPos, sal_Int32 nLen,
// notify the layout!
SwDelText aDelHint( nPos, nTLen );
- NotifyClients( nullptr, &aDelHint );
+ CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aDelHint));
SwInsText aHint( nPos, nTLen );
- NotifyClients( nullptr, &aHint );
+ CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aHint));
}
// the return values allows us to see if we did the heavy-