diff options
author | Noel Grandin <noel@peralex.com> | 2015-06-29 10:11:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-06-29 10:11:53 +0200 |
commit | b55166d266f31caf7bd85e54a59c7e8b49204b16 (patch) | |
tree | f4d98e90c214a6e588e2b4e22c05b9c0f44309aa /dbaccess | |
parent | 39fd37f39db37a83c4a1491d68518e721b04fc5f (diff) |
Revert "return and use std::vector from OInterfaceContainerHelper"
This reverts commit e57314f61f67b093510c5a8a8f34a62126ba8734.
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/RowSet.cxx | 13 | ||||
-rw-r--r-- | dbaccess/source/inc/apitools.hxx | 13 |
2 files changed, 20 insertions, 6 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 8220327af727..f1723a96f4fe 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -104,15 +104,22 @@ com_sun_star_comp_dba_ORowSet_get_implementation(css::uno::XComponentContext* co } #define NOTIFY_LISTERNERS_CHECK(_rListeners,T,method) \ - std::vector< Reference< XInterface > > aListenerSeq = _rListeners.getElementsAsVector(); \ + Sequence< Reference< XInterface > > aListenerSeq = _rListeners.getElements(); \ + \ + const Reference< XInterface >* pxIntBegin = aListenerSeq.getConstArray(); \ + const Reference< XInterface >* pxInt = pxIntBegin + aListenerSeq.getLength(); \ \ _rGuard.clear(); \ bool bCheck = true; \ - for( auto iter = aListenerSeq.rbegin(); iter != aListenerSeq.rend() && bCheck; ++iter ) \ + while( pxInt > pxIntBegin && bCheck ) \ { \ try \ { \ - bCheck = static_cast< T* >( (*iter).get() )->method(aEvt); \ + while( pxInt > pxIntBegin && bCheck ) \ + { \ + --pxInt; \ + bCheck = static_cast< T* >( pxInt->get() )->method(aEvt); \ + } \ } \ catch( RuntimeException& ) \ { \ diff --git a/dbaccess/source/inc/apitools.hxx b/dbaccess/source/inc/apitools.hxx index 583fff3bda82..6672420abac6 100644 --- a/dbaccess/source/inc/apitools.hxx +++ b/dbaccess/source/inc/apitools.hxx @@ -328,14 +328,21 @@ public: return new ::cppu::OPropertyArrayHelper(aDescriptor); #define NOTIFY_LISTERNERS(_rListeners,T,method) \ - std::vector< Reference< XInterface > > aListenerSeq = _rListeners.getElementsAsVector(); \ + Sequence< Reference< XInterface > > aListenerSeq = _rListeners.getElements(); \ + \ + const Reference< XInterface >* pxIntBegin = aListenerSeq.getConstArray(); \ + const Reference< XInterface >* pxInt = pxIntBegin + aListenerSeq.getLength(); \ \ _rGuard.clear(); \ - for( auto iter = aListenerSeq.rbegin(); iter != aListenerSeq.rend(); ++iter ) \ + while( pxInt > pxIntBegin ) \ { \ try \ { \ - static_cast< T* >( (*iter).get() )->method(aEvt); \ + while( pxInt > pxIntBegin ) \ + { \ + --pxInt; \ + static_cast< T* >( pxInt->get() )->method(aEvt); \ + } \ } \ catch( RuntimeException& ) \ { \ |