summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-09-09 14:38:51 +0300
committerTor Lillqvist <tml@iki.fi>2012-09-09 14:41:03 +0300
commit9b9d45e35103e6884e0a87c35c07c74899f40614 (patch)
tree00d5c774a18f3c68afc281b05e32bd74515b6b92
parentbccb30a00782201d779487aa5bd958c6a4d5a652 (diff)
fdo#47368: Remove event listener also in Invalidate()
Change-Id: Ifa3d7ff400137b4560fa0ff890cd211147c5c234
-rw-r--r--svx/source/accessibility/AccessibleFrameSelector.cxx8
-rw-r--r--svx/source/inc/AccessibleFrameSelector.hxx1
2 files changed, 9 insertions, 0 deletions
diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx
index 925be9444d80..1def70a851db 100644
--- a/svx/source/accessibility/AccessibleFrameSelector.cxx
+++ b/svx/source/accessibility/AccessibleFrameSelector.cxx
@@ -101,6 +101,13 @@ AccFrameSelector::AccFrameSelector( FrameSelector& rFrameSel, FrameBorderType eB
AccFrameSelector::~AccFrameSelector()
{
+ RemoveFrameSelEventListener();
+}
+
+// ----------------------------------------------------------------------------
+
+void AccFrameSelector::RemoveFrameSelEventListener()
+{
if ( mpFrameSel )
{
mpFrameSel->RemoveEventListener( LINK( this, AccFrameSelector, WindowEventListener ) );
@@ -709,6 +716,7 @@ void AccFrameSelector::NotifyAccessibleEvent( const sal_Int16 _nEventId,
void AccFrameSelector::Invalidate()
{
+ RemoveFrameSelEventListener();
mpFrameSel = 0;
EventObject aEvent;
Reference < XAccessibleContext > xThis( this );
diff --git a/svx/source/inc/AccessibleFrameSelector.hxx b/svx/source/inc/AccessibleFrameSelector.hxx
index db97316f0a00..6f111725857f 100644
--- a/svx/source/inc/AccessibleFrameSelector.hxx
+++ b/svx/source/inc/AccessibleFrameSelector.hxx
@@ -118,6 +118,7 @@ protected:
private:
void IsValid() throw (::com::sun::star::uno::RuntimeException);
+ void RemoveFrameSelEventListener();
FrameSelector* mpFrameSel;
::osl::Mutex maFocusMutex;