diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2018-01-24 00:56:50 +0100 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@libreoffice.org> | 2018-01-25 20:48:55 +0100 |
commit | 360f2d1b46174fcb33323dcac978bfe8796bad19 (patch) | |
tree | 83a2108e4859134e66ddaedcef7976ccacdc753d /sw/source/core/attr/format.cxx | |
parent | 26d34f319ba48216785f7fdbf9e6bfdaf2dc6ad2 (diff) |
introduce SwClient::EndListeningAll()
- this is to reduce the use of GetRegisterdIn(), which should be an
implementation detail
- remove SwTOXMark::DeRegister() which did the same for a part of the
class tree
- remove SwUndoSetFlyFormat::DeRegisterFromFormat(), same
- remove doubletracking FrameDeleteWatch::m_bDeleted, just check
GetRegisteredIn()
Change-Id: Id9364076759446ee5ff1898683c3ca700c1014c9
Reviewed-on: https://gerrit.libreoffice.org/48548
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/source/core/attr/format.cxx')
-rw-r--r-- | sw/source/core/attr/format.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index d590ea4a5693..f526a300cbef 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -127,8 +127,7 @@ SwFormat &SwFormat::operator=(const SwFormat& rFormat) if( GetRegisteredIn() != rFormat.GetRegisteredIn() ) { - if( GetRegisteredIn() ) - GetRegisteredInNonConst()->Remove(this); + EndListeningAll(); if( rFormat.GetRegisteredIn() ) { const_cast<SwFormat&>(rFormat).GetRegisteredInNonConst()->Add(this); @@ -267,7 +266,7 @@ void SwFormat::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValu else { // otherwise de-register at least from dying one - GetRegisteredIn()->Remove( this ); + EndListeningAll(); m_aSet.SetParent( nullptr ); } } |