sw/inc/deletelistener.hxx | 8 ++++++-- sw/source/core/doc/fmtcol.cxx | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-)
New commits: commit c957fc0d669884f3d1e27fa5296e045198a6013a Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sat Feb 22 19:43:05 2025 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sun Feb 23 20:09:14 2025 +0100 cid#1643142 avoid Missing move assignment operator Change-Id: Ic9b3ea98f0dbdf059e22d845e7189a26586e46eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182038 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/sw/inc/deletelistener.hxx b/sw/inc/deletelistener.hxx index 631e0a6060f3..da79383d75bd 100644 --- a/sw/inc/deletelistener.hxx +++ b/sw/inc/deletelistener.hxx @@ -36,12 +36,16 @@ public: { StartListeningIfNonnull(); } - WeakBroadcastingPtr& operator=(const WeakBroadcastingPtr& rOther) + void Assign(T* pBroadcasting) { if (m_pBroadcasting) EndListening(m_pBroadcasting->GetNotifier()); - m_pBroadcasting = rOther.m_pBroadcasting; + m_pBroadcasting = pBroadcasting; StartListeningIfNonnull(); + } + WeakBroadcastingPtr& operator=(const WeakBroadcastingPtr& rOther) + { + Assign(rOther.m_pBroadcasting); return *this; } diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx index 802114a18a1f..556329e1da9e 100644 --- a/sw/source/core/doc/fmtcol.cxx +++ b/sw/source/core/doc/fmtcol.cxx @@ -597,7 +597,7 @@ SwCollCondition::~SwCollCondition() void SwCollCondition::RegisterToFormat(SwTextFormatColl& rColl) { - m_pCollection = &rColl; + m_pCollection.Assign(&rColl); } bool SwCollCondition::operator==( const SwCollCondition& rCmp ) const