sw/inc/hints.hxx                  |    4 ++--
 sw/inc/tox.hxx                    |    2 +-
 sw/source/core/tox/tox.cxx        |    6 +++---
 sw/source/core/txtnode/atrtox.cxx |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 51ea740d68990dd23f8450f74fb249ba61619dda
Author:     Bjoern Michaelsen <bjoern.michael...@libreoffice.org>
AuthorDate: Thu Dec 26 23:06:15 2024 +0100
Commit:     Bjoern Michaelsen <bjoern.michael...@libreoffice.org>
CommitDate: Fri Dec 27 12:10:03 2024 +0100

    SwTOXMark a SwModify no more
    
    ... thus separating the 'listening' and the 'broadcasting' parts, and 
especially getting rid of the 'if I die, my listeners will be forwarded to what 
I listened to'.
    
    Change-Id: Ia652c026616ca113d5eeb1a97a20a06223371dc3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179437
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Reviewed-by: Bjoern Michaelsen <bjoern.michael...@libreoffice.org>

diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index 3140eb2cb4f2..8c82d58bd7aa 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -313,8 +313,8 @@ public:
 class RemoveUnoObjectHint final : public SfxHint
 {
 public:
-    const BroadcastingModify* m_pObject;
-    RemoveUnoObjectHint(const BroadcastingModify* pObject) : 
SfxHint(SfxHintId::SwRemoveUnoObject), m_pObject(pObject) {}
+    const BroadcasterMixin* m_pObject;
+    RemoveUnoObjectHint(const BroadcasterMixin* pObject) : 
SfxHint(SfxHintId::SwRemoveUnoObject), m_pObject(pObject) {}
 };
 class PrintHiddenParaHint final : public SfxHint
 {
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index 99e91250c48e..dcaf4f92d487 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -78,7 +78,7 @@ extern const sal_Unicode C_END_PAGE_NUM;
 
 class SW_DLLPUBLIC SwTOXMark final
     : public SfxPoolItem
-    , public sw::BroadcastingModify
+    , public sw::BroadcasterMixin
     , public SvtListener
 {
     friend void InitCore();
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index d97de0af7c49..056d427b592f 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -169,12 +169,12 @@ void SwTOXMark::Notify(const SfxHint& rHint)
 {
     if(SfxHintId::SwRemoveUnoObject == rHint.GetId())
     {
-        CallSwClientNotify(rHint);
+        GetNotifier().Broadcast(rHint);
         SetXTOXMark(nullptr);
     }
     else if (rHint.GetId() == SfxHintId::SwLegacyModify)
     {
-        CallSwClientNotify(rHint);
+        GetNotifier().Broadcast(rHint);
     }
     else if (rHint.GetId() == SfxHintId::SwCollectTextMarks)
     {
@@ -208,7 +208,7 @@ void SwTOXMark::Notify(const SfxHint& rHint)
 
 void SwTOXMark::InvalidateTOXMark()
 {
-    CallSwClientNotify(sw::RemoveUnoObjectHint(this));
+    GetNotifier().Broadcast(sw::RemoveUnoObjectHint(this));
 }
 
 OUString SwTOXMark::GetText(SwRootFrame const*const pLayout) const
diff --git a/sw/source/core/txtnode/atrtox.cxx 
b/sw/source/core/txtnode/atrtox.cxx
index b56e75c1a97f..54cb5cf4f548 100644
--- a/sw/source/core/txtnode/atrtox.cxx
+++ b/sw/source/core/txtnode/atrtox.cxx
@@ -91,7 +91,7 @@ void SwTextTOXMark::CopyTOXMark( SwDoc& rDoc )
     }
 
     // register at target tox type
-    const_cast<SwTOXType*>(pType)->Add(rTOX);
+    rTOX.StartListening(const_cast<SwTOXType*>(pType)->GetNotifier());
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Reply via email to