diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-01-19 19:45:45 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-01-25 08:52:03 +0200 |
commit | 752cd07d085ac0aadc99bd512d49072843139032 (patch) | |
tree | 21ff2f55761b34bfdd721b5e1ed43333e8874e46 /io | |
parent | 0e7cd653ea90da388820220bf6a3eb140b57bbd6 (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 'io')
-rw-r--r-- | io/Library_io.mk | 1 | ||||
-rw-r--r-- | io/source/stm/opump.cxx | 13 |
2 files changed, 8 insertions, 6 deletions
diff --git a/io/Library_io.mk b/io/Library_io.mk index cfe879f5e155..3468c9edca81 100644 --- a/io/Library_io.mk +++ b/io/Library_io.mk @@ -14,6 +14,7 @@ $(eval $(call gb_Library_use_external,io,boost_headers)) $(eval $(call gb_Library_use_udk_api,io)) $(eval $(call gb_Library_use_libraries,io,\ + comphelper \ cppu \ cppuhelper \ sal \ diff --git a/io/source/stm/opump.cxx b/io/source/stm/opump.cxx index 3386ba48966f..01faa23ae7d4 100644 --- a/io/source/stm/opump.cxx +++ b/io/source/stm/opump.cxx @@ -35,7 +35,7 @@ #include <uno/mapping.hxx> #include <cppuhelper/implbase.hxx> #include <cppuhelper/factory.hxx> -#include <cppuhelper/interfacecontainer.hxx> +#include <comphelper/interfacecontainer2.hxx> #include <cppuhelper/supportsservice.hxx> #include <osl/mutex.hxx> #include <osl/thread.h> @@ -44,6 +44,7 @@ using namespace osl; using namespace std; using namespace cppu; +using namespace comphelper; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::registry; @@ -63,7 +64,7 @@ namespace io_stm { Reference< XConnectable > m_xSucc; Reference< XInputStream > m_xInput; Reference< XOutputStream > m_xOutput; - OInterfaceContainerHelper m_cnt; + OInterfaceContainerHelper2 m_cnt; bool m_closeFired; void run(); @@ -123,7 +124,7 @@ Pump::~Pump() void Pump::fireError( const Any & exception ) { - OInterfaceIteratorHelper iter( m_cnt ); + OInterfaceIteratorHelper2 iter( m_cnt ); while( iter.hasMoreElements() ) { try @@ -151,7 +152,7 @@ void Pump::fireClose() if( bFire ) { - OInterfaceIteratorHelper iter( m_cnt ); + OInterfaceIteratorHelper2 iter( m_cnt ); while( iter.hasMoreElements() ) { try @@ -168,7 +169,7 @@ void Pump::fireClose() void Pump::fireStarted() { - OInterfaceIteratorHelper iter( m_cnt ); + OInterfaceIteratorHelper2 iter( m_cnt ); while( iter.hasMoreElements() ) { try @@ -184,7 +185,7 @@ void Pump::fireStarted() void Pump::fireTerminated() { - OInterfaceIteratorHelper iter( m_cnt ); + OInterfaceIteratorHelper2 iter( m_cnt ); while( iter.hasMoreElements() ) { try |