[Libreoffice-commits] core.git: sd/source

Caolán McNamara caolanm at redhat.com
Tue Nov 18 08:36:11 PST 2014


 sd/source/ui/app/sdxfer.cxx |    9 +++++++++
 sd/source/ui/inc/sdxfer.hxx |    4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit cb3992630ce2452d1eb599ff1268efb4a1b99e04
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Nov 18 16:35:06 2014 +0000

    assert because still listening to the wrong view when SetView used
    
    we're still listening to the old one here when we set a new one
    
    Change-Id: Iaf64ba17a7adf2489a4f0475bba03a2500a556c0

diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 4317209..dda4f74 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -806,6 +806,15 @@ void SdTransferable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
     }
 }
 
+void SdTransferable::SetView(const ::sd::View* pView)
+{
+    if (mpSdView)
+        EndListening(*const_cast<sd::View*>(mpSdView));
+    mpSdView = pView;
+    if (mpSdView)
+        StartListening(*const_cast<sd::View*>(mpSdView));
+}
+
 bool SdTransferable::SetTableRTF( SdDrawDocument* pModel, const DataFlavor& rFlavor)
 {
     if ( pModel )
diff --git a/sd/source/ui/inc/sdxfer.hxx b/sd/source/ui/inc/sdxfer.hxx
index 2554415a..a395bdf 100644
--- a/sd/source/ui/inc/sdxfer.hxx
+++ b/sd/source/ui/inc/sdxfer.hxx
@@ -50,8 +50,8 @@ public:
     void                            SetWorkDocument( const SdDrawDocument* pWorkDoc ) { mpSdDrawDocument = mpSdDrawDocumentIntern = (SdDrawDocument*) pWorkDoc; }
     const SdDrawDocument*           GetWorkDocument() const { return mpSdDrawDocument; }
 
-    void                            SetView( const ::sd::View* pView ) { mpSdView = pView; }
-    const ::sd::View*                   GetView() const { return mpSdView; }
+    void                            SetView(const ::sd::View* pView);
+    const ::sd::View*               GetView() const { return mpSdView; }
 
     void                            SetObjectDescriptor( const TransferableObjectDescriptor& rObjDesc );
 


More information about the Libreoffice-commits mailing list