summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-11-10 22:50:47 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-11-11 00:09:42 +0100
commit938cd22ae87d7098143a0e18e1e348479cdf69e9 (patch)
tree8c90cf7e76f310e4ec098ee83218ebb93a132e2d /sw
parentf93a2e530d94c4ef73e234b8cc5d3dd79977a8c8 (diff)
remove b_mInDocDTOR flag altogether
Change-Id: I09ca56854f23fe1fc452648042990bee29082f88
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/calbck.hxx5
-rw-r--r--sw/source/core/attr/calbck.cxx7
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);