sw/inc/calbck.hxx              |    3 +--
 sw/source/core/attr/calbck.cxx |   23 +----------------------
 2 files changed, 2 insertions(+), 24 deletions(-)

New commits:
commit fe5623e35d81d7343af48521857610e60bb891fa
Author:     Bjoern Michaelsen <bjoern.michael...@libreoffice.org>
AuthorDate: Tue Nov 3 00:27:29 2020 +0100
Commit:     Bjoern Michaelsen <bjoern.michael...@libreoffice.org>
CommitDate: Wed Nov 4 21:23:20 2020 +0100

    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.michael...@libreoffice.org>

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 );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to