summaryrefslogtreecommitdiff
path: root/animations
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-01-19 19:45:45 +0200
committerNoel Grandin <noel@peralex.com>2016-01-25 08:52:03 +0200
commit752cd07d085ac0aadc99bd512d49072843139032 (patch)
tree21ff2f55761b34bfdd721b5e1ed43333e8874e46 /animations
parent0e7cd653ea90da388820220bf6a3eb140b57bbd6 (diff)
InterfaceContainer2 with vector instead of Sequence
create an InterfaceContainer2 class to replace InterfaceContainer. It uses a std::vector instead of a Sequence for the mutable listener list, which provides far better performance. Switch all our internal use-sites to the new class. Change-Id: I6b56cfa511ded2395faa22e68fab3b2f16c3cb88
Diffstat (limited to 'animations')
-rw-r--r--animations/Library_animcore.mk1
-rw-r--r--animations/source/animcore/animcore.cxx10
2 files changed, 6 insertions, 5 deletions
diff --git a/animations/Library_animcore.mk b/animations/Library_animcore.mk
index f0fca838f298..6246d571f38c 100644
--- a/animations/Library_animcore.mk
+++ b/animations/Library_animcore.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_Library_set_componentfile,animcore,animations/source/animcore/a
$(eval $(call gb_Library_use_sdk_api,animcore))
$(eval $(call gb_Library_use_libraries,animcore,\
+ comphelper \
cppu \
cppuhelper \
sal \
diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx
index ab1bf53575b7..e4771a19170d 100644
--- a/animations/source/animcore/animcore.cxx
+++ b/animations/source/animcore/animcore.cxx
@@ -47,7 +47,7 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/queryinterface.hxx>
-#include <cppuhelper/interfacecontainer.hxx>
+#include <comphelper/interfacecontainer2.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/weakref.hxx>
@@ -60,8 +60,8 @@
using ::osl::Mutex;
using ::osl::Guard;
-using ::cppu::OInterfaceContainerHelper;
-using ::cppu::OInterfaceIteratorHelper;
+using ::comphelper::OInterfaceContainerHelper2;
+using ::comphelper::OInterfaceIteratorHelper2;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::uno::XInterface;
@@ -287,7 +287,7 @@ public:
void fireChangeListener();
private:
- OInterfaceContainerHelper maChangeListener;
+ OInterfaceContainerHelper2 maChangeListener;
static void initTypeProvider( sal_Int16 nNodeType ) throw();
@@ -2129,7 +2129,7 @@ void AnimationNode::fireChangeListener()
{
Guard< Mutex > aGuard( maMutex );
- OInterfaceIteratorHelper aIterator( maChangeListener );
+ OInterfaceIteratorHelper2 aIterator( maChangeListener );
if( aIterator.hasMoreElements() )
{
Reference< XInterface > xSource( static_cast<OWeakObject*>(this), UNO_QUERY );