diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-05 13:27:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-06 08:35:23 +0200 |
commit | ab9b38a4064141705aa3a3de9a5d73b465ad3af3 (patch) | |
tree | 888fcc6b517c44d77e2d297c13ee84fb487dd7a7 /svx/source | |
parent | 13341ffa49d58f313a05edae4f4f04c215658e9f (diff) |
use more begin()/end() for Sequence
Change-Id: I399be6b6ef7a6ce01e883569a177c0969bc29c69
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/form/databaselocationinput.cxx | 7 | ||||
-rw-r--r-- | svx/source/form/filtnav.cxx | 9 | ||||
-rw-r--r-- | svx/source/form/fmvwimp.cxx | 10 | ||||
-rw-r--r-- | svx/source/form/formcontroller.cxx | 12 | ||||
-rw-r--r-- | svx/source/form/formcontrolling.cxx | 4 |
5 files changed, 16 insertions, 26 deletions
diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx index 110f74b28866..e461c58e9bb7 100644 --- a/svx/source/form/databaselocationinput.cxx +++ b/svx/source/form/databaselocationinput.cxx @@ -94,12 +94,9 @@ namespace svx // forward the allowed extensions to the input control OUStringBuffer aExtensionList; - for ( const OUString* pExtension = m_aFilterExtensions.getConstArray(); - pExtension != m_aFilterExtensions.getConstArray() + m_aFilterExtensions.getLength(); - ++pExtension - ) + for ( auto const & extension : m_aFilterExtensions ) { - aExtensionList.append( *pExtension ); + aExtensionList.append( extension ); aExtensionList.append( ';' ); } m_rLocationInput.SetFilter( aExtensionList.makeStringAndClear() ); diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 199e667feac7..e6a855e860d4 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -569,17 +569,14 @@ void FmFilterModel::Update(const Reference< XIndexAccess > & xControllers, FmPar OUString aTitle(SvxResId(RID_STR_FILTER_FILTER_FOR)); Sequence< Sequence< OUString > > aExpressions = xFilterController->getPredicateExpressions(); - for ( const Sequence< OUString >* pConjunctionTerm = aExpressions.getConstArray(); - pConjunctionTerm != aExpressions.getConstArray() + aExpressions.getLength(); - ++pConjunctionTerm - ) + for ( auto const & conjunctionTerm : aExpressions ) { // we always display one row, even if there's no term to be displayed FmFilterItems* pFilterItems = new FmFilterItems( pFormItem, aTitle ); Insert( pFormItem->GetChildren().end(), pFilterItems ); - const Sequence< OUString >& rDisjunction( *pConjunctionTerm ); - for ( const OUString* pDisjunctiveTerm = rDisjunction.getConstArray(); + const Sequence< OUString >& rDisjunction( conjunctionTerm ); + for ( const OUString* pDisjunctiveTerm = rDisjunction.getConstArray(); pDisjunctiveTerm != rDisjunction.getConstArray() + rDisjunction.getLength(); ++pDisjunctiveTerm ) diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 3ca840e48802..019419d204cd 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -865,16 +865,14 @@ static Reference< XControl > lcl_firstFocussableControl( const Sequence< Referen Reference< XControl > xReturn; // loop through all the controls - const Reference< XControl >* pControls = _rControls.getConstArray(); - const Reference< XControl >* pControlsEnd = _rControls.getConstArray() + _rControls.getLength(); - for ( ; pControls != pControlsEnd; ++pControls ) + for ( auto const & control : _rControls ) { - if ( !pControls->is() ) + if ( !control.is() ) continue; - if ( FmXFormView::isFocusable( *pControls ) ) + if ( FmXFormView::isFocusable( control ) ) { - xReturn = *pControls; + xReturn = control; break; } } diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index db123f977bb9..7c3d2d6f840f 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -3558,16 +3558,14 @@ Reference< XControl > FormController::locateControl( const Reference< XControlMo try { Sequence< Reference< XControl > > aControls( getControls() ); - const Reference< XControl >* pControls = aControls.getConstArray(); - const Reference< XControl >* pControlsEnd = aControls.getConstArray() + aControls.getLength(); - for ( ; pControls != pControlsEnd; ++pControls ) + for ( auto const & control : aControls ) { - OSL_ENSURE( pControls->is(), "FormController::locateControl: NULL-control?" ); - if ( pControls->is() ) + OSL_ENSURE( control.is(), "FormController::locateControl: NULL-control?" ); + if ( control.is() ) { - if ( ( *pControls)->getModel() == _rxModel ) - return *pControls; + if ( control->getModel() == _rxModel ) + return control; } } OSL_FAIL( "FormController::locateControl: did not find a control for this model!" ); diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx index 30996bfd7062..23459b2069e8 100644 --- a/svx/source/form/formcontrolling.cxx +++ b/svx/source/form/formcontrolling.cxx @@ -388,8 +388,8 @@ namespace svx ::std::vector< sal_Int32 > aFeatures( Features.getLength() ); ::std::transform( - Features.getConstArray(), - Features.getConstArray() + Features.getLength(), + Features.begin(), + Features.end(), aFeatures.begin(), FormFeatureToSlotId() ); |