From 38ecca9b30e0fc5f7cc6264857f983e40dd58195 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 24 Jul 2015 16:22:29 +0200 Subject: 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 --- dbaccess/source/core/dataaccess/intercept.cxx | 22 +++++++++++++++++++++- dbaccess/source/inc/apitools.hxx | 23 ----------------------- 2 files changed, 21 insertions(+), 24 deletions(-) (limited to 'dbaccess') 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: */ -- cgit