diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2018-02-01 01:25:25 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2018-02-01 01:25:25 +0100 |
commit | 4cd170ce853555c5b1bdbb70b13f691b8c300e98 (patch) | |
tree | 3f8ff94f65a30f334abd65917ac92687c4465956 | |
parent | e1f24e92bf61b6ecb2b9966132d2f0f7251dc85f (diff) |
intermediate: unoidx
Change-Id: Ie159108c8cc3481c62b7938a1839eea27c238bd9
-rw-r--r-- | sw/source/core/unocore/unoidx.cxx | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 13b833cf404a..a29ee64b13e9 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -1508,7 +1508,6 @@ private: ::osl::Mutex m_Mutex; // just for OInterfaceContainerHelper2 SwXDocumentIndexMark & m_rThis; SwMultiDepend m_aDepends; - bool m_bInReplaceMark; public: const SwTOXMark* m_pTOXMark; SwTOXType* m_pTOXType; @@ -1541,7 +1540,6 @@ public: SwTOXMark const*const pMark) : m_rThis(rThis) , m_aDepends(*this) - , m_bInReplaceMark(false) , m_pTOXMark(pMark) , m_pTOXType(pType) , m_rPropSet(*aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Mark(eType))) @@ -1567,9 +1565,8 @@ public: void ReplaceTOXMark(SwTOXType & rTOXType, SwTOXMark & rMark, SwPaM & rPam) { - m_bInReplaceMark = true; + m_aDepends.EndListeningAll(); // stop listening, so that we dont invalidate/dispose from the DeleteTOXMark() DeleteTOXMark(); - m_bInReplaceMark = false; try { InsertTOXMark(rTOXType, rMark, rPam, nullptr); } catch (...) { @@ -1584,19 +1581,16 @@ public: void Invalidate() { m_aDepends.EndListeningAll(); - if (!m_bInReplaceMark) // #i109983# only dispose on delete, not on replace! - { - uno::Reference<uno::XInterface> const xThis(m_wThis); - // fdo#72695: if UNO object is already dead, don't revive it with event - if (xThis.is()) - { - lang::EventObject const ev(xThis); - m_EventListeners.disposeAndClear(ev); - } - } m_pDoc = nullptr; m_pTOXMark = nullptr; m_pTOXType = nullptr; + uno::Reference<uno::XInterface> const xThis(m_wThis); + // fdo#72695: if UNO object is already dead, don't revive it with event + if (xThis.is()) + { + lang::EventObject const ev(xThis); + m_EventListeners.disposeAndClear(ev); + } } protected: // SwClient |