diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-05-16 11:12:48 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-06-29 07:25:22 +0000 |
commit | e57314f61f67b093510c5a8a8f34a62126ba8734 (patch) | |
tree | 7991c3a6f20c93b752628528196022474c6b4a7f /sd | |
parent | 371200675c2fb2fef0ac8362ebd7bf4203835440 (diff) |
return and use std::vector from OInterfaceContainerHelper
since most of the time we don’t need a heavyweight uno::Sequence.
Adds a new method getElementsAsVector().
Change-Id: I9e72bef0c0c723ffd0dd7d4152db5baec6784a7a
Reviewed-on: https://gerrit.libreoffice.org/15747
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/stlsheet.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 4ed628920757..86d9ba39f9e4 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -345,14 +345,13 @@ bool SdStyleSheet::IsUsed() const OInterfaceContainerHelper * pContainer = mrBHelper.getContainer( cppu::UnoType<XModifyListener>::get() ); if( pContainer ) { - Sequence< Reference< XInterface > > aModifyListeners( pContainer->getElements() ); - Reference< XInterface > *p = aModifyListeners.getArray(); - sal_Int32 nCount = aModifyListeners.getLength(); - while( nCount-- && !bResult ) + for( auto & x : pContainer->getElements() ) { - Reference< XStyle > xStyle( *p++, UNO_QUERY ); - if( xStyle.is() ) + Reference< XStyle > xStyle( x, UNO_QUERY ); + if( xStyle.is() ) { bResult = xStyle->isInUse(); + break; + } } } } |