summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-11-03 00:27:29 +0100
committerBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-11-04 21:23:20 +0100
commitfe5623e35d81d7343af48521857610e60bb891fa (patch)
tree47b508f84244fdec00ce92b418c6cf84620bd104 /sw
parentb3d8784cfd74e30bf2f1482cce25efec2b2f7c56 (diff)
SwModify: remove the LockClientList madness
sw::WriterListener has better debug messages anyway. Change-Id: I24ae3fabe885002d250ad30e596973c26316abcc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105232 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/calbck.hxx3
-rw-r--r--sw/source/core/attr/calbck.cxx23
2 files changed, 2 insertions, 24 deletions
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index 19c7c0b1125a..ed719037fa9d 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -177,7 +177,6 @@ class SW_DLLPUBLIC SwModify: public SwClient
template<typename E, typename S, sw::IteratorMode> friend class SwIterator;
sw::WriterListener* m_pWriterListeners; // the start of the linked list of clients
bool m_bModifyLocked : 1; // don't broadcast changes now
- bool m_bLockClientList : 1; // may be set when this instance notifies its clients
bool m_bInCache : 1;
bool m_bInSwFntCache : 1;
@@ -190,7 +189,7 @@ class SW_DLLPUBLIC SwModify: public SwClient
SwModify &operator =(const SwModify&) = delete;
public:
SwModify()
- : SwClient(), m_pWriterListeners(nullptr), m_bModifyLocked(false), m_bLockClientList(false), m_bInCache(false), m_bInSwFntCache(false)
+ : SwClient(), m_pWriterListeners(nullptr), m_bModifyLocked(false), m_bInCache(false), m_bInSwFntCache(false)
{}
// broadcasting: send notifications to all clients
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
index 917efa340bbd..efa764b8783c 100644
--- a/sw/source/core/attr/calbck.cxx
+++ b/sw/source/core/attr/calbck.cxx
@@ -185,28 +185,7 @@ void SwModify::NotifyClients( const SfxPoolItem* pOldValue, const SfxPoolItem* p
return;
LockModify();
-
- // mba: WTF?!
- if( !pOldValue )
- {
- m_bLockClientList = true;
- }
- else
- {
- switch( pOldValue->Which() )
- {
- case RES_OBJECTDYING:
- case RES_REMOVE_UNO_OBJECT:
- m_bLockClientList = static_cast<const SwPtrMsgPoolItem*>(pOldValue)->pObject != this;
- break;
-
- default:
- m_bLockClientList = true;
- }
- }
-
ModifyBroadcast( pOldValue, pNewValue );
- m_bLockClientList = false;
UnlockModify();
}
@@ -224,7 +203,6 @@ bool SwModify::GetInfo( SfxPoolItem& rInfo ) const
void SwModify::Add( SwClient* pDepend )
{
DBG_TESTSOLARMUTEX();
- OSL_ENSURE( !m_bLockClientList, "Client inserted while in Modify" );
if(pDepend->m_pRegisteredIn == this )
return;
@@ -375,6 +353,7 @@ sw::ClientIteratorBase* sw::ClientIteratorBase::s_pClientIters = nullptr;
void SwModify::CallSwClientNotify( const SfxHint& rHint ) const
{
+ DBG_TESTSOLARMUTEX();
SwIterator<SwClient,SwModify> aIter(*this);
for(SwClient* pClient = aIter.First(); pClient; pClient = aIter.Next())
pClient->SwClientNotify( *this, rHint );