summaryrefslogtreecommitdiff
path: root/UnoControls/source
diff options
context:
space:
mode:
Diffstat (limited to 'UnoControls/source')
-rw-r--r--UnoControls/source/base/basecontainercontrol.cxx8
-rw-r--r--UnoControls/source/base/multiplexer.cxx8
-rw-r--r--UnoControls/source/controls/OConnectionPointContainerHelper.cxx5
-rw-r--r--UnoControls/source/controls/OConnectionPointHelper.cxx7
-rw-r--r--UnoControls/source/inc/OConnectionPointContainerHelper.hxx6
5 files changed, 18 insertions, 16 deletions
diff --git a/UnoControls/source/base/basecontainercontrol.cxx b/UnoControls/source/base/basecontainercontrol.cxx
index dbcfb77bbc2e..a440505149ed 100644
--- a/UnoControls/source/base/basecontainercontrol.cxx
+++ b/UnoControls/source/base/basecontainercontrol.cxx
@@ -219,7 +219,7 @@ void SAL_CALL BaseContainerControl::addControl ( const OUString& rName, const Re
}
// Send message to all listener
- OInterfaceContainerHelper* pInterfaceContainer = m_aListeners.getContainer( cppu::UnoType<XContainerListener>::get());
+ comphelper::OInterfaceContainerHelper2* pInterfaceContainer = m_aListeners.getContainer( cppu::UnoType<XContainerListener>::get());
if (!pInterfaceContainer)
return;
@@ -231,7 +231,7 @@ void SAL_CALL BaseContainerControl::addControl ( const OUString& rName, const Re
aEvent.Element <<= rControl;
// Get all listener
- OInterfaceIteratorHelper aIterator (*pInterfaceContainer);
+ comphelper::OInterfaceIteratorHelper2 aIterator (*pInterfaceContainer);
// Send event
while ( aIterator.hasMoreElements() )
@@ -266,7 +266,7 @@ void SAL_CALL BaseContainerControl::removeControl ( const Reference< XControl >
maControlInfoList.erase(maControlInfoList.begin() + n);
// Send message to all other listener
- OInterfaceContainerHelper * pInterfaceContainer = m_aListeners.getContainer( cppu::UnoType<XContainerListener>::get());
+ comphelper::OInterfaceContainerHelper2 * pInterfaceContainer = m_aListeners.getContainer( cppu::UnoType<XContainerListener>::get());
if (pInterfaceContainer)
{
@@ -275,7 +275,7 @@ void SAL_CALL BaseContainerControl::removeControl ( const Reference< XControl >
aEvent.Source = *this;
aEvent.Element <<= rControl;
- OInterfaceIteratorHelper aIterator (*pInterfaceContainer);
+ comphelper::OInterfaceIteratorHelper2 aIterator (*pInterfaceContainer);
while ( aIterator.hasMoreElements() )
{
diff --git a/UnoControls/source/base/multiplexer.cxx b/UnoControls/source/base/multiplexer.cxx
index 6e737c7f9b26..c7bf65c170c1 100644
--- a/UnoControls/source/base/multiplexer.cxx
+++ b/UnoControls/source/base/multiplexer.cxx
@@ -38,11 +38,11 @@ namespace unocontrols {
#define MULTIPLEX( INTERFACE, METHOD, EVENTTYP, EVENT ) \
\
/* First get all interfaces from container with right type.*/ \
- OInterfaceContainerHelper* pContainer = m_aListenerHolder.getContainer( cppu::UnoType<INTERFACE>::get() ); \
+ comphelper::OInterfaceContainerHelper2* pContainer = m_aListenerHolder.getContainer( cppu::UnoType<INTERFACE>::get() ); \
/* Do the follow only, if elements in container exist.*/ \
if( !pContainer ) \
return; \
- OInterfaceIteratorHelper aIterator( *pContainer ); \
+ comphelper::OInterfaceIteratorHelper2 aIterator( *pContainer ); \
EVENTTYP aLocalEvent = EVENT; \
/* Remark: The control is the event source not the peer.*/ \
/* We must change the source of the event. */ \
@@ -156,7 +156,7 @@ void OMRCListenerMultiplexerHelper::setPeer( const Reference< XWindow >& xPeer )
if( m_xPeer.is() )
{
// get all types from the listener added to the peer
- const Sequence< Type > aContainedTypes = m_aListenerHolder.getContainedTypes();
+ const std::vector< Type > aContainedTypes = m_aListenerHolder.getContainedTypes();
// loop over all listener types and remove the listeners from the peer
for( const auto& rContainedType : aContainedTypes )
impl_unadviseFromPeer( m_xPeer, rContainedType );
@@ -165,7 +165,7 @@ void OMRCListenerMultiplexerHelper::setPeer( const Reference< XWindow >& xPeer )
if( m_xPeer.is() )
{
// get all types from the listener added to the peer
- const Sequence< Type > aContainedTypes = m_aListenerHolder.getContainedTypes();
+ const std::vector< Type > aContainedTypes = m_aListenerHolder.getContainedTypes();
// loop over all listener types and add the listeners to the peer
for( const auto& rContainedType : aContainedTypes )
impl_adviseToPeer( m_xPeer, rContainedType );
diff --git a/UnoControls/source/controls/OConnectionPointContainerHelper.cxx b/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
index d0e9d30b611b..bf687a0df5d6 100644
--- a/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
+++ b/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
@@ -22,6 +22,7 @@
#include <OConnectionPointHelper.hxx>
#include <cppuhelper/queryinterface.hxx>
+#include <comphelper/sequence.hxx>
// namespaces
@@ -94,7 +95,7 @@ void SAL_CALL OConnectionPointContainerHelper::release() noexcept
Sequence< Type > SAL_CALL OConnectionPointContainerHelper::getConnectionPointTypes()
{
// Container is threadsafe himself !
- return m_aMultiTypeContainer.getContainedTypes();
+ return comphelper::containerToSequence(m_aMultiTypeContainer.getContainedTypes());
}
// XConnectionPointContainer
@@ -105,7 +106,7 @@ Reference< XConnectionPoint > SAL_CALL OConnectionPointContainerHelper::queryCon
Reference< XConnectionPoint > xConnectionPoint;
// Get all elements of the container, which have the searched type.
- OInterfaceContainerHelper* pSpecialContainer = m_aMultiTypeContainer.getContainer( aType );
+ comphelper::OInterfaceContainerHelper2* pSpecialContainer = m_aMultiTypeContainer.getContainer( aType );
if ( pSpecialContainer && pSpecialContainer->getLength() > 0 )
{
// Ready for multithreading
diff --git a/UnoControls/source/controls/OConnectionPointHelper.cxx b/UnoControls/source/controls/OConnectionPointHelper.cxx
index f44aef51aab1..b6ddaaa513a0 100644
--- a/UnoControls/source/controls/OConnectionPointHelper.cxx
+++ b/UnoControls/source/controls/OConnectionPointHelper.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/lang/InvalidListenerException.hpp>
#include <cppuhelper/queryinterface.hxx>
+#include <comphelper/sequence.hxx>
// namespaces
@@ -188,13 +189,13 @@ Sequence< Reference< XInterface > > SAL_CALL OConnectionPointHelper::getConnecti
// Set default return value, if method failed.
Sequence< Reference< XInterface > > seqReturnConnections;
// Get reference to private member of OConnectionPointHelperContainer!
- OMultiTypeInterfaceContainerHelper& aSharedContainer = m_pContainerImplementation->impl_getMultiTypeContainer();
+ comphelper::OMultiTypeInterfaceContainerHelper2& aSharedContainer = m_pContainerImplementation->impl_getMultiTypeContainer();
// Get pointer to specialized container which hold all interfaces of searched type.
- OInterfaceContainerHelper* pSpecialContainer = aSharedContainer.getContainer( m_aInterfaceType );
+ comphelper::OInterfaceContainerHelper2* pSpecialContainer = aSharedContainer.getContainer( m_aInterfaceType );
// Get elements of searched type, if some else exist.
if ( pSpecialContainer != nullptr )
{
- seqReturnConnections = pSpecialContainer->getElements();
+ seqReturnConnections = comphelper::containerToSequence(pSpecialContainer->getElements());
}
// Don't forget this!
impl_UnlockContainer();
diff --git a/UnoControls/source/inc/OConnectionPointContainerHelper.hxx b/UnoControls/source/inc/OConnectionPointContainerHelper.hxx
index 54eed76e6ce1..c1e46b457f79 100644
--- a/UnoControls/source/inc/OConnectionPointContainerHelper.hxx
+++ b/UnoControls/source/inc/OConnectionPointContainerHelper.hxx
@@ -21,7 +21,7 @@
#include <com/sun/star/lang/XConnectionPointContainer.hpp>
#include <cppuhelper/weak.hxx>
-#include <cppuhelper/interfacecontainer.hxx>
+#include <comphelper/multicontainer2.hxx>
namespace com::sun::star::lang { class XConnectionPoint; }
@@ -92,11 +92,11 @@ public:
// Is necessary to get container member at OConnectionPoint-instance.
// Impl methods are not threadsafe!
// "Parent" function must do this.
- ::cppu::OMultiTypeInterfaceContainerHelper& impl_getMultiTypeContainer() { return m_aMultiTypeContainer; }
+ comphelper::OMultiTypeInterfaceContainerHelper2& impl_getMultiTypeContainer() { return m_aMultiTypeContainer; }
private:
::osl::Mutex& m_aSharedMutex;
- ::cppu::OMultiTypeInterfaceContainerHelper m_aMultiTypeContainer; // Container to hold listener
+ comphelper::OMultiTypeInterfaceContainerHelper2 m_aMultiTypeContainer; // Container to hold listener
};
}