diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/calbck.hxx | 5 | ||||
-rw-r--r-- | sw/source/core/attr/calbck.cxx | 7 |
2 files changed, 3 insertions, 9 deletions
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index f718507444b0..dcd6dc99ccdd 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -149,7 +149,6 @@ class SW_DLLPUBLIC SwModify: public SwClient 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_bInDocDTOR : 1; // workaround for problems when a lot of objects are destroyed bool m_bInCache : 1; bool m_bInSwFntCache : 1; @@ -162,10 +161,10 @@ class SW_DLLPUBLIC SwModify: public SwClient SwModify &operator =(const SwModify&) = delete; public: SwModify() - : SwClient(nullptr), m_pWriterListeners(nullptr), m_bModifyLocked(false), m_bLockClientList(false), m_bInDocDTOR(false), m_bInCache(false), m_bInSwFntCache(false) + : SwClient(nullptr), m_pWriterListeners(nullptr), m_bModifyLocked(false), m_bLockClientList(false), m_bInCache(false), m_bInSwFntCache(false) {} explicit SwModify( SwModify* pToRegisterIn ) - : SwClient(pToRegisterIn), m_pWriterListeners(nullptr), m_bModifyLocked(false), m_bLockClientList(false), m_bInDocDTOR(false), m_bInCache(false), m_bInSwFntCache(false) + : SwClient(pToRegisterIn), m_pWriterListeners(nullptr), m_bModifyLocked(false), m_bLockClientList(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 51a188c34f6f..d7ec7cd2f8a4 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -77,13 +77,13 @@ void SwClient::Modify(SfxPoolItem const*const pOldValue, SfxPoolItem const*const void SwModify::SetInDocDTOR() { - m_bInDocDTOR = true; // If the document gets destroyed anyway, just tell clients to // forget me so that they don't try to get removed from my list // later when they also get destroyed SwIterator<SwClient,SwModify> aIter(*this); for(SwClient* pClient = aIter.First(); pClient; pClient = aIter.Next()) pClient->pRegisteredIn = nullptr; + m_pWriterListeners = nullptr; } SwModify::~SwModify() @@ -97,8 +97,6 @@ SwModify::~SwModify() if ( IsInSwFntCache() ) pSwFontCache->Delete( this ); - if(m_bInDocDTOR) - return; // notify all clients that they shall remove themselves SwPtrMsgPoolItem aDyObject( RES_OBJECTDYING, this ); NotifyClients( &aDyObject, &aDyObject ); @@ -203,9 +201,6 @@ void SwModify::Add( SwClient* pDepend ) SwClient* SwModify::Remove( SwClient* pDepend ) { - if(m_bInDocDTOR) - return nullptr; - DBG_TESTSOLARMUTEX(); assert(pDepend->pRegisteredIn == this); |