summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2019-09-20 01:35:39 +0200
committerBjörn Michaelsen <bjoern.michaelsen@libreoffice.org>2019-09-20 03:11:44 +0200
commit4b49aaf56d4166a2f42e5112bbdb5f17bd32267b (patch)
tree16b2af131876037de707e4578649c5a93703f3c2 /sw
parent6170da5135683735a34b9fac992a9a668b95ffe5 (diff)
no more SwClient: sw/source/filter/html
Change-Id: I45915fa65157aa6a16ecee238d9072d359d3b464 Reviewed-on: https://gerrit.libreoffice.org/79264 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/html/htmltab.cxx20
1 files changed, 12 insertions, 8 deletions
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 168a5d2e40e8..a592cd48e9b4 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -34,6 +34,7 @@
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
#include <svl/urihelper.hxx>
+#include <svl/listener.hxx>
#include <sal/log.hxx>
#include <dcontact.hxx>
@@ -4860,22 +4861,24 @@ HTMLTableOptions::HTMLTableOptions( const HTMLOptions& rOptions,
namespace
{
- class FrameDeleteWatch : public SwClient
+ class FrameDeleteWatch final: public SvtListener
{
+ SwFrameFormat* m_pFormat;
public:
- FrameDeleteWatch(SwFrameFormat* pObjectFormat)
+ FrameDeleteWatch(SwFrameFormat* pFormat)
+ : m_pFormat(pFormat)
{
- if (pObjectFormat)
- pObjectFormat->Add(this);
+ if(m_pFormat)
+ StartListening(pFormat->GetNotifier());
}
- virtual void SwClientNotify(const SwModify& rModify, const SfxHint& rHint) override
+ virtual void Notify(const SfxHint& rHint) override
{
- SwClient::SwClientNotify(rModify, rHint);
if (auto pDrawFrameFormatHint = dynamic_cast<const sw::DrawFrameFormatHint*>(&rHint))
{
if (pDrawFrameFormatHint->m_eId == sw::DrawFrameFormatHintId::DYING)
{
+ m_pFormat = nullptr;
EndListeningAll();
}
}
@@ -4883,11 +4886,12 @@ namespace
bool WasDeleted() const
{
- return !GetRegisteredIn();
+ return !m_pFormat;
}
virtual ~FrameDeleteWatch() override
{
+ m_pFormat = nullptr;
EndListeningAll();
}
};
@@ -4977,7 +4981,7 @@ void SwHTMLParser::DeleteSection(SwStartNode* pSttNd)
if (aWatch.WasDeleted())
m_pMarquee = nullptr;
else
- pObjectFormat->Remove(&aWatch);
+ aWatch.EndListeningAll();
}
}