diff options
-rw-r--r-- | include/svl/listener.hxx | 1 | ||||
-rw-r--r-- | svl/source/notify/listener.cxx | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/svl/listener.hxx b/include/svl/listener.hxx index d6dc7b0cddbb..5ba14aea953e 100644 --- a/include/svl/listener.hxx +++ b/include/svl/listener.hxx @@ -55,6 +55,7 @@ public: bool EndListening( SvtBroadcaster& rBroadcaster ); void EndListeningAll(); + /// Overwrites existing broadcasters with the ones from the specified listener void CopyAllBroadcasters( const SvtListener& r ); bool HasBroadcaster() const; diff --git a/svl/source/notify/listener.cxx b/svl/source/notify/listener.cxx index 506647784451..c668397baa47 100644 --- a/svl/source/notify/listener.cxx +++ b/svl/source/notify/listener.cxx @@ -90,6 +90,7 @@ void SvtListener::EndListeningAll() void SvtListener::CopyAllBroadcasters( const SvtListener& r ) { + EndListeningAll(); BroadcastersType aCopy(r.maBroadcasters); maBroadcasters.swap(aCopy); BroadcastersType::iterator it = maBroadcasters.begin(); |