sw/source/filter/html/swhtml.cxx | 17 +++++------------ sw/source/filter/html/swhtml.hxx | 7 +++---- sw/source/ui/fldui/fldpage.cxx | 1 - 3 files changed, 8 insertions(+), 17 deletions(-)
New commits: commit 341e5c20279f971ee7acffd8d95fff09d5cf249a Author: Bjoern Michaelsen <bjoern.michael...@libreoffice.org> AuthorDate: Thu Sep 19 15:44:38 2019 +0200 Commit: Björn Michaelsen <bjoern.michael...@libreoffice.org> CommitDate: Thu Sep 19 17:29:25 2019 +0200 sw/filter/hmtl: SwClient/SwModify no more Change-Id: Ib469f83f61cea81fc551f04f6f059b3a0a2b5f18 Reviewed-on: https://gerrit.libreoffice.org/79182 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michael...@libreoffice.org> 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<const SwPtrMsgPoolItem *>(pOld)->pObject == GetRegisteredIn()) - { - // then we kill ourself - EndListeningAll(); - ReleaseRef(); // otherwise we're done! - } - break; + EndListeningAll(); + ReleaseRef(); } } diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index b931042a3fe7..b9173c6271ab 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -22,6 +22,7 @@ #include <config_java.h> #include <sfx2/sfxhtml.hxx> +#include <svl/listener.hxx> #include <svl/macitem.hxx> #include <svtools/htmltokn.h> #include <editeng/svxenum.hxx> @@ -30,8 +31,6 @@ #include <com/sun/star/drawing/XShape.hpp> #include <com/sun/star/form/XFormComponent.hpp> -#include <calbck.hxx> - #include <memory> #include <vector> #include <deque> @@ -326,7 +325,7 @@ namespace o3tl template<> struct typed_flags<HtmlFrameFormatFlags> : is_typed_flags<HtmlFrameFormatFlags, 0x0f> {}; } -class SwHTMLParser : public SfxHTMLParser, public SwClient +class SwHTMLParser : public SfxHTMLParser, public SvtListener { friend class SectionSaveStruct; friend class CellSaveStruct; @@ -888,7 +887,7 @@ protected: virtual ~SwHTMLParser() override; // If the document is removed, remove the parser as well - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) override; + virtual void Notify(const SfxHint&) override; virtual void AddMetaUserDefined( OUString const & i_rMetaName ) override; commit 35b5f3ab41dc5683dc572393c8bd5e2619f70a73 Author: Bjoern Michaelsen <bjoern.michael...@libreoffice.org> AuthorDate: Thu Sep 19 15:32:10 2019 +0200 Commit: Björn Michaelsen <bjoern.michael...@libreoffice.org> CommitDate: Thu Sep 19 17:29:14 2019 +0200 no more SwClient/SwModify in sw/ui Change-Id: Idbf5e6826093a2e7dba3680cf08a2df348bce8b9 Reviewed-on: https://gerrit.libreoffice.org/79181 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michael...@libreoffice.org> diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx index 30521244396a..705ec45fdc7c 100644 --- a/sw/source/ui/fldui/fldpage.cxx +++ b/sw/source/ui/fldui/fldpage.cxx @@ -38,7 +38,6 @@ #include <cmdid.h> #include <globals.hrc> #include <sfx2/bindings.hxx> -#include <calbck.hxx> using namespace ::com::sun::star; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits