summaryrefslogtreecommitdiffstats
path: root/svl/inc
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-08-04 20:53:31 +0200
committerMichael Stahl <mstahl@redhat.com>2012-08-04 21:33:33 +0200
commit6868efe203cffda0ab60db2abc4637433e6caf90 (patch)
treebfee3ce345820a18a2fbeee9f260db6bbc020e87 /svl/inc
parentReplace usage of rtl/memory.h in unodevtools with equivalent from string.h (diff)
downloadcore-6868efe203cffda0ab60db2abc4637433e6caf90.tar.gz
core-6868efe203cffda0ab60db2abc4637433e6caf90.zip
SfxBroadcaster: fix STL conversion:
50cf7caee5bc6d8e066580d13c72b40926fcb69a introduced a regression that makes the smoketest fail on Windows (though strangely not on Linux), because it removed the special handling of null pointers in the SfxBroadcaster's listener array. It is evidently possible that a listener may be either added or removed at the SfxBroadcaster while that SfxBroadcaster is currently doing a Broadcast, hence AddListener and RemoveListener must be careful not to make the in progress iteration through the listener array fail. svllo.dll!SfxBroadcaster::AddListener(SfxListener & rListener={...}) Line 114 + 0x43 bytes C++ svllo.dll!SfxListener::StartListening(SfxBroadcaster & rBroadcaster={...}, unsigned char bPreventDups=0) Line 89 C++ sfxlo.dll!SfxPrintHelper::initialize(const com::sun::star::uno::Sequence<com::sun::star::uno::Any> & aArguments={...}) Line 162 C++ sfxlo.dll!SfxBaseModel::impl_getPrintHelper() Line 3693 C++ sfxlo.dll!SfxBaseModel::Notify(SfxBroadcaster & rBC={...}, const SfxHint & rHint={...}) Line 2583 C++ svllo.dll!SfxBroadcaster::Broadcast(const SfxHint & rHint={...}) Line 56 + 0xb bytes C++ sfxlo.dll!SfxApplication::NotifyEvent(const SfxEventHint & rEventHint={...}, bool bSynchron=true) Line 918 C++ sfxlo.dll!SfxObjectShell::SetInitialized_Impl(const bool i_fromInitNew=true) Line 1146 + 0x37 bytes C++ sfxlo.dll!SfxObjectShell::FinishedLoading(unsigned short nFlags=3) Line 1302 C++ Change-Id: Id27d08faaa2472b57947960a92f19c44df55b72b
Diffstat (limited to 'svl/inc')
-rw-r--r--svl/inc/svl/brdcst.hxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/svl/inc/svl/brdcst.hxx b/svl/inc/svl/brdcst.hxx
index d434a833657f..258cf6066e58 100644
--- a/svl/inc/svl/brdcst.hxx
+++ b/svl/inc/svl/brdcst.hxx
@@ -33,7 +33,7 @@ class SVL_DLLPUBLIC SfxBroadcaster
friend class SfxListener;
typedef std::vector<SfxListener*> SfxListenerArr_Impl;
- SfxListenerArr_Impl aListeners;
+ SfxListenerArr_Impl m_Listeners;
private:
void AddListener( SfxListener& rListener );
@@ -52,17 +52,14 @@ public:
virtual ~SfxBroadcaster();
void Broadcast( const SfxHint &rHint );
- bool HasListeners() const
- {
- return !aListeners.empty();
- }
+ bool HasListeners() const;
size_t GetListenerCount() const
{
- return aListeners.size();
+ return m_Listeners.size();
}
SfxListener* GetListener( sal_uInt16 nNo ) const
{
- return aListeners[nNo];
+ return m_Listeners[nNo];
}
};