[Libreoffice-commits] core.git: sw/inc sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Feb 26 19:11:40 UTC 2019


 sw/inc/unoredlines.hxx                 |    8 ++++----
 sw/source/core/unocore/unoredlines.cxx |    8 +++-----
 2 files changed, 7 insertions(+), 9 deletions(-)

New commits:
commit 861e3220a15138c5ec8f572c3cd898f99ea7df99
Author:     Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
AuthorDate: Mon Feb 25 21:28:05 2019 +0100
Commit:     Björn Michaelsen <bjoern.michaelsen at libreoffice.org>
CommitDate: Tue Feb 26 20:11:17 2019 +0100

    UNO redlines: uno SvtListener instead of SwClient
    
    Change-Id: Ie07147c9d6af469ed1088148dd8b9bdb64ae8590
    Reviewed-on: https://gerrit.libreoffice.org/68362
    Tested-by: Jenkins
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at libreoffice.org>

diff --git a/sw/inc/unoredlines.hxx b/sw/inc/unoredlines.hxx
index 380745c41672..f28ec2344179 100644
--- a/sw/inc/unoredlines.hxx
+++ b/sw/inc/unoredlines.hxx
@@ -24,6 +24,7 @@
 #include "docary.hxx"
 #include "unocoll.hxx"
 #include "unobaseclass.hxx"
+#include <svl/listener.hxx>
 #include <com/sun/star/container/XEnumerationAccess.hpp>
 
 class SwRangeRedline;
@@ -69,7 +70,7 @@ public:
 
 class SwXRedlineEnumeration
     : public SwSimpleEnumeration_Base
-    , public SwClient
+    , public SvtListener
 {
     SwDoc* pDoc;
     SwRedlineTable::size_type nCurrentIndex;
@@ -86,9 +87,8 @@ public:
     virtual OUString SAL_CALL getImplementationName() override;
     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
-protected:
-    //SwClient
-    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override;
+
+    virtual void Notify( const SfxHint& ) override;
 };
 
 #endif
diff --git a/sw/source/core/unocore/unoredlines.cxx b/sw/source/core/unocore/unoredlines.cxx
index 5038d261729b..3012bffc071d 100644
--- a/sw/source/core/unocore/unoredlines.cxx
+++ b/sw/source/core/unocore/unoredlines.cxx
@@ -33,7 +33,6 @@
 #include <IDocumentStylePoolAccess.hxx>
 #include <docary.hxx>
 #include <redline.hxx>
-#include <calbck.hxx>
 
 using namespace ::com::sun::star;
 
@@ -126,7 +125,7 @@ SwXRedlineEnumeration::SwXRedlineEnumeration(SwDoc& rDoc) :
     pDoc(&rDoc),
     nCurrentIndex(0)
 {
-    pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
+    StartListening(pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD)->GetNotifier());
 }
 
 SwXRedlineEnumeration::~SwXRedlineEnumeration()
@@ -168,10 +167,9 @@ uno::Sequence< OUString > SwXRedlineEnumeration::getSupportedServiceNames()
     return uno::Sequence< OUString >();
 }
 
-void SwXRedlineEnumeration::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
+void SwXRedlineEnumeration::Notify( const SfxHint& rHint )
 {
-    ClientModify(this, pOld, pNew);
-    if(!GetRegisteredIn())
+    if(rHint.GetId() == SfxHintId::Dying)
         pDoc = nullptr;
 }
 


More information about the Libreoffice-commits mailing list