From 341e5c20279f971ee7acffd8d95fff09d5cf249a Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Thu, 19 Sep 2019 15:44:38 +0200 Subject: sw/filter/hmtl: SwClient/SwModify no more MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib469f83f61cea81fc551f04f6f059b3a0a2b5f18 Reviewed-on: https://gerrit.libreoffice.org/79182 Tested-by: Jenkins Reviewed-by: Björn Michaelsen --- sw/source/filter/html/swhtml.cxx | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'sw/source/filter/html/swhtml.cxx') diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 535a2373a823..c2dbad75a1d9 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -261,7 +261,6 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn, bool bNoHTMLComments, const OUString& rNamespace ) : SfxHTMLParser( rIn, bReadNewDoc, pMed ), - SwClient( nullptr ), m_aPathToFile( rPath ), m_sBaseURL( rBaseURL ), m_xAttrTab(new HTMLAttrTable), @@ -575,7 +574,7 @@ SvParserState SwHTMLParser::CallParser() rInput.ResetError(); } - m_xDoc->GetPageDesc( 0 ).Add( this ); + StartListening(m_xDoc->GetPageDesc( 0 ).GetNotifier()); SvParserState eRet = HTMLParser::CallParser(); return eRet; @@ -929,18 +928,12 @@ void SwHTMLParser::Continue( HtmlTokenId nToken ) #endif } -void SwHTMLParser::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) +void SwHTMLParser::Notify(const SfxHint& rHint) { - switch( pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ) + if(rHint.GetId() == SfxHintId::Dying) { - case RES_OBJECTDYING: - if (pOld && static_cast(pOld)->pObject == GetRegisteredIn()) - { - // then we kill ourself - EndListeningAll(); - ReleaseRef(); // otherwise we're done! - } - break; + EndListeningAll(); + ReleaseRef(); } } -- cgit