diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-01-05 10:49:45 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-01-05 12:23:16 +0100 |
commit | d988b0cdeb54d84a0347a036a277c21c12544ab9 (patch) | |
tree | 7c24b2034fb4169cd0e924dff91a4c6e3032c0ba /sw/source/core/txtnode/ndtxt.cxx | |
parent | 2407f8aca45a3fde5a0c6808d62a0435ff1de565 (diff) |
Revert "NotifyClients no more"
This reverts commit 96bafa464ebdbce3ef04bec9beae5e745bb37794. It started to
cause an ASan heap-use-after-free during CppunitTest_sw_uiwriter, see the
comments starting at <https://gerrit.libreoffice.org/c/core/+/108604/
5#message-681a6100cff11cb51d20e5a2b2fb38da1f92ab32> "NotifyClients no more".
Change-Id: Id0eef2e75ea047d4b337c51df929eea81fb69f5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108717
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/core/txtnode/ndtxt.cxx')
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 79b0f389d358..e71ea4b76119 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.CallSwClientNotify(sw::LegacyModifyHint(&rAnchor, &rAnchor)); + rFormat.NotifyClients(&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 ); - CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aHint)); + NotifyClients( nullptr, &aHint ); } if ( HasHints() ) @@ -2708,12 +2708,12 @@ void SwTextNode::EraseText(const SwIndex &rIdx, const sal_Int32 nCount, if( 1 == nCnt ) { SwDelChr aHint( nStartIdx ); - CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aHint)); + NotifyClients( nullptr, &aHint ); } else { SwDelText aHint( nStartIdx, nCnt ); - CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aHint)); + NotifyClients( nullptr, &aHint ); } OSL_ENSURE(rIdx.GetIndex() == nStartIdx, "huh? start index has changed?"); @@ -2765,9 +2765,9 @@ void SwTextNode::GCAttr() nMax, 0); - CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aHint)); + NotifyClients( nullptr, &aHint ); SwFormatChg aNew( GetTextColl() ); - CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aNew)); + NotifyClients( nullptr, &aNew ); } } @@ -2839,7 +2839,7 @@ void SwTextNode::NumRuleChgd() // Important note: { SvxLRSpaceItem& rLR = const_cast<SvxLRSpaceItem&>(GetSwAttrSet().GetLRSpace()); - CallSwClientNotify(sw::LegacyModifyHint(&rLR, &rLR)); + NotifyClients( &rLR, &rLR ); } SetWordCountDirty( true ); @@ -3708,12 +3708,12 @@ void SwTextNode::ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen, SetIgnoreDontExpand( bOldExpFlg ); SwDelText aDelHint( nStartPos, nDelLen ); - CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aDelHint)); + NotifyClients( nullptr, &aDelHint ); if (sInserted.getLength()) { SwInsText aHint( nStartPos, sInserted.getLength() ); - CallSwClientNotify(sw::LegacyModifyHint(nullptr, &aHint)); + NotifyClients( nullptr, &aHint ); } } |