summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-18 16:35:06 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-18 16:35:45 +0000
commitcb3992630ce2452d1eb599ff1268efb4a1b99e04 (patch)
treeccc71355a2ec5da63ec13139e53481f0255ddd64
parent6f5a948612a541fff845cbef44e79adaf9c45793 (diff)
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
-rw-r--r--sd/source/ui/app/sdxfer.cxx9
-rw-r--r--sd/source/ui/inc/sdxfer.hxx4
2 files changed, 11 insertions, 2 deletions
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 43172099a9c8..dda4f74a5fe0 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 2554415a88c3..a395bdfe779a 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 );