summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2021-02-08 20:21:12 +0100
committerBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2021-02-08 23:05:39 +0100
commitdc1b416c684c4e2525978e48252d55d78adcfca8 (patch)
treeaddc4f3a1d2bac2e893616dca4399bc25ec71906 /sw/inc
parent07d166a81c4287862180bba33cd6259262260ef1 (diff)
Remove SwModify::SetInDocDTOR ...
... its only used once in SwTOXType and has no place in SwModify, which is the base of ~everything in Writer still. Change-Id: I07007f08723f8db2dd09bb7c07cb0ebfc2a6506a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110594 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/calbck.hxx1
-rw-r--r--sw/inc/hints.hxx4
-rw-r--r--sw/inc/tox.hxx23
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& );