diff options
author | Noel Grandin <noel@peralex.com> | 2015-07-24 16:22:29 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-07-27 08:18:16 +0200 |
commit | 38ecca9b30e0fc5f7cc6264857f983e40dd58195 (patch) | |
tree | 3ad61e6d5cddcf161d27cfe4c6ca85fcf1cab8f6 /dbaccess | |
parent | efac5fa06e2d00bd67c582d8a6b1f1fc69c9b9f5 (diff) |
inline a bunch of use-once macros
no point in having a macro unless it's actually going to reduce the
number of lines of code
Change-Id: Ic8760d6506cf272d7bd088f7b3b4dcbf288099fc
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/intercept.cxx | 22 | ||||
-rw-r--r-- | dbaccess/source/inc/apitools.hxx | 23 |
2 files changed, 21 insertions, 24 deletions
diff --git a/dbaccess/source/core/dataaccess/intercept.cxx b/dbaccess/source/core/dataaccess/intercept.cxx index 7059c2290b0f..6d5b85b53953 100644 --- a/dbaccess/source/core/dataaccess/intercept.cxx +++ b/dbaccess/source/core/dataaccess/intercept.cxx @@ -412,7 +412,27 @@ void SAL_CALL OInterceptor::documentEventOccured( const ::com::sun::star::docume aEvt.IsEnabled = xModel.is() && xModel->isModified(); aEvt.Requery = sal_False; - NOTIFY_LISTERNERS((*pListener),XStatusListener,statusChanged) + Sequence< Reference< XInterface > > aListenerSeq = pListener->getElements(); + + const Reference< XInterface >* pxIntBegin = aListenerSeq.getConstArray(); + const Reference< XInterface >* pxInt = pxIntBegin + aListenerSeq.getLength(); + + _rGuard.clear(); + while( pxInt > pxIntBegin ) + { + try + { + while( pxInt > pxIntBegin ) + { + --pxInt; + static_cast< XStatusListener* >( pxInt->get() )->statusChanged(aEvt); + } + } + catch( RuntimeException& ) + { + } + } + _rGuard.reset(); } } } diff --git a/dbaccess/source/inc/apitools.hxx b/dbaccess/source/inc/apitools.hxx index 330a7e06b689..2392b3b0998b 100644 --- a/dbaccess/source/inc/apitools.hxx +++ b/dbaccess/source/inc/apitools.hxx @@ -289,29 +289,6 @@ public: END_PROPERTY_SEQUENCE() \ return new ::cppu::OPropertyArrayHelper(aDescriptor); -#define NOTIFY_LISTERNERS(_rListeners,T,method) \ - Sequence< Reference< XInterface > > aListenerSeq = _rListeners.getElements(); \ - \ - const Reference< XInterface >* pxIntBegin = aListenerSeq.getConstArray(); \ - const Reference< XInterface >* pxInt = pxIntBegin + aListenerSeq.getLength(); \ - \ - _rGuard.clear(); \ - while( pxInt > pxIntBegin ) \ - { \ - try \ - { \ - while( pxInt > pxIntBegin ) \ - { \ - --pxInt; \ - static_cast< T* >( pxInt->get() )->method(aEvt); \ - } \ - } \ - catch( RuntimeException& ) \ - { \ - } \ - } \ - _rGuard.reset(); - #endif // INCLUDED_DBACCESS_SOURCE_INC_APITOOLS_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |