diff options
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/calbck.hxx | 1 | ||||
-rw-r--r-- | sw/inc/hints.hxx | 4 | ||||
-rw-r--r-- | sw/inc/tox.hxx | 23 |
3 files changed, 19 insertions, 9 deletions
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index 32b0d35b4c1d..0cd8efbee0ed 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -201,7 +201,6 @@ public: void LockModify() { m_bModifyLocked = true; } void UnlockModify() { m_bModifyLocked = false; } - void SetInDocDTOR(); bool IsModifyLocked() const { return m_bModifyLocked; } void CheckCaching( const sal_uInt16 nWhich ); diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx index 25fed4c87783..e83d42251882 100644 --- a/sw/inc/hints.hxx +++ b/sw/inc/hints.hxx @@ -166,6 +166,10 @@ public: const SwTableBox& m_rTableBox; MoveTableBoxHint(const SwFrameFormat& rNewFormat, const SwTableBox& rTableBox): m_rNewFormat(rNewFormat), m_rTableBox(rTableBox) {}; }; + +class DocumentDyingHint final : public SfxHint +{ +}; } class SwUpdateAttr final : public SwMsgPoolItem diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx index c7bcaacf036a..f1b496091246 100644 --- a/sw/inc/tox.hxx +++ b/sw/inc/tox.hxx @@ -19,20 +19,20 @@ #ifndef INCLUDED_SW_INC_TOX_HXX #define INCLUDED_SW_INC_TOX_HXX -#include <cppuhelper/weakref.hxx> -#include <sal/log.hxx> +#include <vector> +#include <cppuhelper/weakref.hxx> +#include <editeng/svxenum.hxx> #include <i18nlangtag/lang.h> -#include <svl/poolitem.hxx> +#include <o3tl/typed_flags_set.hxx> +#include <sal/log.hxx> #include <svl/listener.hxx> +#include <svl/poolitem.hxx> -#include <editeng/svxenum.hxx> +#include "calbck.hxx" +#include "hints.hxx" #include "swtypes.hxx" #include "toxe.hxx" -#include "calbck.hxx" -#include <o3tl/typed_flags_set.hxx> - -#include <vector> namespace com::sun::star { namespace text { class XDocumentIndexMark; } @@ -467,6 +467,13 @@ public: SwTOXBase( const SwTOXBase& rCopy, SwDoc* pDoc = nullptr ); virtual ~SwTOXBase() override; + virtual void SwClientNotify(const SwModify& rMod, const SfxHint& rHint) override + { + if(dynamic_cast<const sw::DocumentDyingHint*>(&rHint)) + GetRegisteredIn()->Remove(this); + else + SwClient::SwClientNotify(rMod, rHint); + } // a kind of CopyCtor - check if the TOXBase is at TOXType of the doc. // If not, so create it and copy all other used things. void CopyTOXBase( SwDoc*, const SwTOXBase& ); |