diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-12-03 23:19:39 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-12-04 00:47:57 -0500 |
commit | 4eb381147bd0c9c7a48f86de0e3ae1d4c3bbe12f (patch) | |
tree | 167bc0a2100a522a575842683fa244ee916ea6ce /include | |
parent | a09a709594dd0f6e38f8c6bf28433bd391e8842d (diff) |
pIimplize SfxBroadcaster and SfxListener.
Change-Id: I0d1d73402f11cc61ea9e7629bea34e24c22f5beb
Diffstat (limited to 'include')
-rw-r--r-- | include/svl/SfxBroadcaster.hxx | 16 | ||||
-rw-r--r-- | include/svl/lstner.hxx | 14 |
2 files changed, 8 insertions, 22 deletions
diff --git a/include/svl/SfxBroadcaster.hxx b/include/svl/SfxBroadcaster.hxx index a29a5c008798..56a335730041 100644 --- a/include/svl/SfxBroadcaster.hxx +++ b/include/svl/SfxBroadcaster.hxx @@ -21,7 +21,6 @@ #include <svl/svldllapi.h> #include <tools/rtti.hxx> -#include <vector> class SfxListener; class SfxHint; @@ -29,11 +28,8 @@ class SfxBroadcasterTest; class SVL_DLLPUBLIC SfxBroadcaster { - typedef std::vector<SfxListener*> SfxListenerArr_Impl; - - /** Contains the positions of removed listeners. */ - std::vector<size_t> m_RemovedPositions; - SfxListenerArr_Impl m_Listeners; + struct Impl; + Impl* mpImpl; private: void AddListener( SfxListener& rListener ); @@ -60,16 +56,12 @@ public: /** Get the size of the internally stored vector. * Use it to iterate over all listeners. */ - size_t GetSizeOfVector() const { - return m_Listeners.size(); - } + size_t GetSizeOfVector() const; /** Get a listener by its position in the internally stored vector. * Note that this method may return NULL */ - SfxListener* GetListener( size_t nNo ) const { - return m_Listeners[nNo]; - } + SfxListener* GetListener( size_t nNo ) const; friend class SfxListener; friend class ::SfxBroadcasterTest; diff --git a/include/svl/lstner.hxx b/include/svl/lstner.hxx index 0bdf6e23dc9e..8792c01ff041 100644 --- a/include/svl/lstner.hxx +++ b/include/svl/lstner.hxx @@ -21,21 +21,17 @@ #include <svl/svldllapi.h> #include <tools/rtti.hxx> -#include <deque> class SfxBroadcaster; class SfxHint; -typedef std::deque<SfxBroadcaster*> SfxBroadcasterArr_Impl; - #define SFX_NOTIFY( rBC, rBCT, rHint, rHintT ) \ Notify( rBC, rHint ) - - class SVL_DLLPUBLIC SfxListener { - SfxBroadcasterArr_Impl aBCs; + struct Impl; + Impl* mpImpl; private: const SfxListener& operator=(const SfxListener &); // n.i., ist verboten @@ -52,10 +48,8 @@ public: void EndListeningAll(); bool IsListening( SfxBroadcaster& rBroadcaster ) const; - sal_uInt16 GetBroadcasterCount() const - { return aBCs.size(); } - SfxBroadcaster* GetBroadcasterJOE( sal_uInt16 nNo ) const - { return aBCs[nNo]; } + sal_uInt16 GetBroadcasterCount() const; + SfxBroadcaster* GetBroadcasterJOE( sal_uInt16 nNo ) const; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); |