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 /dbaccess/source/ui/inc | |
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 'dbaccess/source/ui/inc')
-rw-r--r-- | dbaccess/source/ui/inc/callbacks.hxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/exsrcbrw.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/formadapter.hxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/sbamultiplex.hxx | 11 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/unodatbr.hxx | 6 |
5 files changed, 14 insertions, 13 deletions
diff --git a/dbaccess/source/ui/inc/callbacks.hxx b/dbaccess/source/ui/inc/callbacks.hxx index a87ccf374dd9..9c2a579a7a51 100644 --- a/dbaccess/source/ui/inc/callbacks.hxx +++ b/dbaccess/source/ui/inc/callbacks.hxx @@ -31,7 +31,7 @@ class Control; struct AcceptDropEvent; struct ExecuteDropEvent; -namespace cppu { class OInterfaceContainerHelper; } +namespace comphelper { class OInterfaceContainerHelper2; } namespace dbaui { @@ -84,7 +84,7 @@ namespace dbaui /** returns the container of registered context menu interceptors, or NULL if the implementation does not support context menu interception */ - virtual ::cppu::OInterfaceContainerHelper* + virtual ::comphelper::OInterfaceContainerHelper2* getContextMenuInterceptors() = 0; /** returns the current selection in the given control diff --git a/dbaccess/source/ui/inc/exsrcbrw.hxx b/dbaccess/source/ui/inc/exsrcbrw.hxx index 09c0ea6a6fe9..3a533e8fadf4 100644 --- a/dbaccess/source/ui/inc/exsrcbrw.hxx +++ b/dbaccess/source/ui/inc/exsrcbrw.hxx @@ -34,7 +34,7 @@ namespace dbaui :public SbaXDataBrowserController ,public css::util::XModifyBroadcaster { - ::cppu::OInterfaceContainerHelper m_aModifyListeners; + ::comphelper::OInterfaceContainerHelper2 m_aModifyListeners; // for multiplexing the modify events SbaXFormAdapter* m_pDataSourceImpl; bool m_bInQueryDispatch; diff --git a/dbaccess/source/ui/inc/formadapter.hxx b/dbaccess/source/ui/inc/formadapter.hxx index 82eb85c7b730..c9d7093db9de 100644 --- a/dbaccess/source/ui/inc/formadapter.hxx +++ b/dbaccess/source/ui/inc/formadapter.hxx @@ -136,8 +136,8 @@ namespace dbaui SbaXVetoableChangeMultiplexer m_aVetoablePropertyChangeListeners; SbaXPropertiesChangeMultiplexer m_aPropertiesChangeListeners; - ::cppu::OInterfaceContainerHelper m_aDisposeListeners; - ::cppu::OInterfaceContainerHelper m_aContainerListeners; + ::comphelper::OInterfaceContainerHelper2 m_aDisposeListeners; + ::comphelper::OInterfaceContainerHelper2 m_aContainerListeners; // hierarchy administration css::uno::Reference< css::uno::XInterface > m_xParent; diff --git a/dbaccess/source/ui/inc/sbamultiplex.hxx b/dbaccess/source/ui/inc/sbamultiplex.hxx index c5b097de4db0..67999030cb4d 100644 --- a/dbaccess/source/ui/inc/sbamultiplex.hxx +++ b/dbaccess/source/ui/inc/sbamultiplex.hxx @@ -41,6 +41,7 @@ #include <com/sun/star/frame/XStatusListener.hpp> #include <comphelper/uno3.hxx> #include <cppuhelper/interfacecontainer.hxx> +#include <comphelper/interfacecontainer2.hxx> #include <cppuhelper/queryinterface.hxx> #include <cppuhelper/weak.hxx> @@ -64,7 +65,7 @@ namespace dbaui class classname \ :public OSbaWeakSubObject \ ,public listenerclass \ - ,public ::cppu::OInterfaceContainerHelper \ + ,public ::comphelper::OInterfaceContainerHelper2 \ { \ public: \ classname( ::cppu::OWeakObject& rSource, \ @@ -83,7 +84,7 @@ namespace dbaui virtual sal_Bool SAL_CALL methodname(const eventtype& e) throw (css::uno::RuntimeException, std::exception) override; \ #define END_DECLARE_LISTENER_MULTIPLEXER() \ - /* resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators */ \ + /* resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators */ \ void * SAL_CALL operator new( size_t size ) throw() { return OSbaWeakSubObject::operator new(size); } \ void SAL_CALL operator delete( void * p ) throw() { OSbaWeakSubObject::operator delete(p); } \ }; \ @@ -94,7 +95,7 @@ namespace dbaui \ classname::classname(::cppu::OWeakObject& rSource, ::osl::Mutex& _rMutex) \ :OSbaWeakSubObject(rSource) \ - ,OInterfaceContainerHelper(_rMutex) \ + ,OInterfaceContainerHelper2(_rMutex) \ { \ } \ \ @@ -120,7 +121,7 @@ namespace dbaui { \ eventtype aMulti(e); \ aMulti.Source = &m_rParent; \ - ::cppu::OInterfaceIteratorHelper aIt(*this); \ + ::comphelper::OInterfaceIteratorHelper2 aIt(*this); \ while (aIt.hasMoreElements()) \ static_cast< listenerclass*>(aIt.next())->methodname(aMulti); \ } \ @@ -130,7 +131,7 @@ namespace dbaui { \ eventtype aMulti(e); \ aMulti.Source = &m_rParent; \ - ::cppu::OInterfaceIteratorHelper aIt(*this); \ + ::comphelper::OInterfaceIteratorHelper2 aIt(*this); \ bool bResult = true; \ while (bResult && aIt.hasMoreElements()) \ bResult = static_cast< listenerclass*>(aIt.next())->methodname(aMulti); \ diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx index 4c58d72c2463..c70fa481c47b 100644 --- a/dbaccess/source/ui/inc/unodatbr.hxx +++ b/dbaccess/source/ui/inc/unodatbr.hxx @@ -91,8 +91,8 @@ namespace dbaui svx::ODataAccessDescriptor m_aDocumentDataSource; // if we're part of a document, this is the state of the DocumentDataSource slot - ::cppu::OInterfaceContainerHelper m_aSelectionListeners; - ::cppu::OInterfaceContainerHelper m_aContextMenuInterceptors; + ::comphelper::OInterfaceContainerHelper2 m_aSelectionListeners; + ::comphelper::OInterfaceContainerHelper2 m_aContextMenuInterceptors; OTableCopyHelper::DropDescriptor m_aAsyncDrop; OTableCopyHelper m_aTableCopyHelper; @@ -232,7 +232,7 @@ namespace dbaui // IContextMenuProvider virtual PopupMenu* getContextMenu( Control& _rControl ) const override; virtual IController& getCommandController() override; - virtual ::cppu::OInterfaceContainerHelper* + virtual ::comphelper::OInterfaceContainerHelper2* getContextMenuInterceptors() override; virtual css::uno::Any getCurrentSelection( Control& _rControl ) const override; |