diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-11-22 21:17:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-27 15:26:22 +0100 |
commit | fdae440a4d877f93bee430a03dd55841ccbe7876 (patch) | |
tree | 5f9188116e67a235378fd63577e4559879e57ced | |
parent | 88ff4e9624940aa596bf415cd443b144332091b3 (diff) |
use more OInterfaceContainerHelper3 in connectivity::sdbcx::OCollection
Change-Id: Idf3313b374eae05c4a65c101e1e7ce91c743b420
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125928
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | connectivity/source/drivers/ado/ATables.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HTables.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/drivers/mysql_jdbc/YTables.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/sdbcx/VCollection.cxx | 8 | ||||
-rw-r--r-- | include/connectivity/sdbcx/VCollection.hxx | 6 |
5 files changed, 13 insertions, 13 deletions
diff --git a/connectivity/source/drivers/ado/ATables.cxx b/connectivity/source/drivers/ado/ATables.cxx index b8f6fb9d2c72..61a057344ff1 100644 --- a/connectivity/source/drivers/ado/ATables.cxx +++ b/connectivity/source/drivers/ado/ATables.cxx @@ -94,9 +94,9 @@ void OTables::appendNew(const OUString& _rsNewTable) // notify our container listeners ContainerEvent aEvent(static_cast<XContainer*>(this), makeAny(_rsNewTable), Any(), Any()); - OInterfaceIteratorHelper2 aListenerLoop(m_aContainerListeners); + OInterfaceIteratorHelper3 aListenerLoop(m_aContainerListeners); while (aListenerLoop.hasMoreElements()) - static_cast<XContainerListener*>(aListenerLoop.next())->elementInserted(aEvent); + aListenerLoop.next()->elementInserted(aEvent); } diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx index e92629bbb0f2..de818686b49d 100644 --- a/connectivity/source/drivers/hsqldb/HTables.cxx +++ b/connectivity/source/drivers/hsqldb/HTables.cxx @@ -161,9 +161,9 @@ void OTables::appendNew(const OUString& _rsNewTable) // notify our container listeners ContainerEvent aEvent(static_cast<XContainer*>(this), makeAny(_rsNewTable), Any(), Any()); - OInterfaceIteratorHelper2 aListenerLoop(m_aContainerListeners); + OInterfaceIteratorHelper3 aListenerLoop(m_aContainerListeners); while (aListenerLoop.hasMoreElements()) - static_cast<XContainerListener*>(aListenerLoop.next())->elementInserted(aEvent); + aListenerLoop.next()->elementInserted(aEvent); } OUString OTables::getNameForObject(const sdbcx::ObjectType& _xObject) diff --git a/connectivity/source/drivers/mysql_jdbc/YTables.cxx b/connectivity/source/drivers/mysql_jdbc/YTables.cxx index 9d598892d32b..f1ab3ee1e7b3 100644 --- a/connectivity/source/drivers/mysql_jdbc/YTables.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YTables.cxx @@ -179,9 +179,9 @@ void OTables::appendNew(const OUString& _rsNewTable) // notify our container listeners ContainerEvent aEvent(static_cast<XContainer*>(this), makeAny(_rsNewTable), Any(), Any()); - OInterfaceIteratorHelper2 aListenerLoop(m_aContainerListeners); + OInterfaceIteratorHelper3 aListenerLoop(m_aContainerListeners); while (aListenerLoop.hasMoreElements()) - static_cast<XContainerListener*>(aListenerLoop.next())->elementInserted(aEvent); + aListenerLoop.next()->elementInserted(aEvent); } OUString OTables::getNameForObject(const sdbcx::ObjectType& _xObject) diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx index 0aa6c0d3c627..8ab9072f004c 100644 --- a/connectivity/source/sdbcx/VCollection.cxx +++ b/connectivity/source/sdbcx/VCollection.cxx @@ -425,9 +425,9 @@ void OCollection::notifyElementRemoved(const OUString& _sName) { ContainerEvent aEvent(static_cast<XContainer*>(this), makeAny(_sName), Any(), Any()); // note that xExistent may be empty, in case somebody removed the data source while it is not alive at this moment - OInterfaceIteratorHelper2 aListenerLoop(m_aContainerListeners); + OInterfaceIteratorHelper3 aListenerLoop(m_aContainerListeners); while (aListenerLoop.hasMoreElements()) - static_cast<XContainerListener*>(aListenerLoop.next())->elementRemoved(aEvent); + aListenerLoop.next()->elementRemoved(aEvent); } sal_Int32 SAL_CALL OCollection::findColumn( const OUString& columnName ) @@ -519,9 +519,9 @@ void OCollection::renameObject(const OUString& _sOldName, const OUString& _sNewN { ContainerEvent aEvent(static_cast<XContainer*>(this), makeAny(_sNewName), makeAny(m_pElements->getObject(_sNewName)),makeAny(_sOldName)); // note that xExistent may be empty, in case somebody removed the data source while it is not alive at this moment - OInterfaceIteratorHelper2 aListenerLoop(m_aContainerListeners); + OInterfaceIteratorHelper3 aListenerLoop(m_aContainerListeners); while (aListenerLoop.hasMoreElements()) - static_cast<XContainerListener*>(aListenerLoop.next())->elementReplaced(aEvent); + aListenerLoop.next()->elementReplaced(aEvent); } } diff --git a/include/connectivity/sdbcx/VCollection.hxx b/include/connectivity/sdbcx/VCollection.hxx index ab0dd3bcc828..0f5a0b3fbcb9 100644 --- a/include/connectivity/sdbcx/VCollection.hxx +++ b/include/connectivity/sdbcx/VCollection.hxx @@ -31,7 +31,7 @@ #include <com/sun/star/sdbcx/XAppend.hpp> #include <com/sun/star/sdbcx/XDrop.hpp> #include <com/sun/star/sdbc/XColumnLocate.hpp> -#include <comphelper/interfacecontainer2.hxx> +#include <comphelper/interfacecontainer3.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <connectivity/CommonTools.hxx> #include <com/sun/star/container/XContainer.hpp> @@ -90,8 +90,8 @@ namespace connectivity::sdbcx protected: ::std::unique_ptr<IObjectCollection> m_pElements; - ::comphelper::OInterfaceContainerHelper2 m_aContainerListeners; - ::comphelper::OInterfaceContainerHelper2 m_aRefreshListeners; + ::comphelper::OInterfaceContainerHelper3<css::container::XContainerListener> m_aContainerListeners; + ::comphelper::OInterfaceContainerHelper3<css::util::XRefreshListener> m_aRefreshListeners; protected: ::cppu::OWeakObject& m_rParent; // parent of the collection |