diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-09-09 14:38:51 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-09-09 14:41:03 +0300 |
commit | 9b9d45e35103e6884e0a87c35c07c74899f40614 (patch) | |
tree | 00d5c774a18f3c68afc281b05e32bd74515b6b92 | |
parent | bccb30a00782201d779487aa5bd958c6a4d5a652 (diff) |
fdo#47368: Remove event listener also in Invalidate()
Change-Id: Ifa3d7ff400137b4560fa0ff890cd211147c5c234
-rw-r--r-- | svx/source/accessibility/AccessibleFrameSelector.cxx | 8 | ||||
-rw-r--r-- | svx/source/inc/AccessibleFrameSelector.hxx | 1 |
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; |