diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-10 16:12:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-11 12:50:55 +0200 |
commit | 20571c472528c4f98fe3f55700d134915d32a49a (patch) | |
tree | 9b350824d845b8aaeb13d087ef74febb454b821b /filter/source/xsltdialog | |
parent | b401896a56149aa2871b65a330a6f601a9830ccd (diff) |
use more range-for on uno::Sequence
Change-Id: Ifad32425d79be5a22d33d721bdc5fb993f699759
Reviewed-on: https://gerrit.libreoffice.org/39763
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter/source/xsltdialog')
-rw-r--r-- | filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 18 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltertestdialog.cxx | 5 |
2 files changed, 7 insertions, 16 deletions
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index 09850c095b04..1abaf3c1b3ac 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -388,15 +388,11 @@ OUString XMLFilterSettingsDialog::createUniqueInterfaceName( const OUString& rIn try { Sequence< OUString > aFilterNames( mxFilterContainer->getElementNames() ); - OUString* pFilterName = aFilterNames.getArray(); - - const sal_Int32 nCount = aFilterNames.getLength(); - sal_Int32 nFilter; Sequence< PropertyValue > aValues; - for( nFilter = 0; (nFilter < nCount); nFilter++, pFilterName++ ) + for( OUString const & filterName : aFilterNames) { - Any aAny( mxFilterContainer->getByName( *pFilterName ) ); + Any aAny( mxFilterContainer->getByName( filterName ) ); if( !(aAny >>= aValues) ) continue; @@ -1042,28 +1038,24 @@ void XMLFilterSettingsDialog::initFilterList() if( mxFilterContainer.is() ) { Sequence< OUString > aFilterNames( mxFilterContainer->getElementNames() ); - OUString* pFilterName = aFilterNames.getArray(); - - const sal_Int32 nCount = aFilterNames.getLength(); - sal_Int32 nFilter; Sequence< PropertyValue > aValues; std::unique_ptr<filter_info_impl> pTempFilter( new filter_info_impl ); Sequence< OUString > aUserData; - for( nFilter = 0; nFilter < nCount; nFilter++, pFilterName++ ) + for( OUString const & filterName : aFilterNames ) { aUserData.realloc(0); try { - Any aAny( mxFilterContainer->getByName( *pFilterName ) ); + Any aAny( mxFilterContainer->getByName( filterName ) ); if( !(aAny >>= aValues) ) continue; OUString aFilterService; - pTempFilter->maFilterName = *pFilterName; + pTempFilter->maFilterName = filterName; const sal_Int32 nValueCount( aValues.getLength() ); PropertyValue* pValues = aValues.getArray(); diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index 23348fdd68b4..3cf1f5abd618 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -315,13 +315,12 @@ void XMLFilterTestDialog::onExportBrowse() if( xFilterContainer.is() && xTypeDetection.is() ) { Sequence< OUString > aFilterNames( xFilterContainer->getElementNames() ); - OUString* pFilterName = aFilterNames.getArray(); - for( sal_Int32 nFilter = 0; nFilter < aFilterNames.getLength(); nFilter++, pFilterName++ ) + for( OUString const & filterName : aFilterNames ) { Sequence< PropertyValue > aValues; - Any aAny( xFilterContainer->getByName( *pFilterName ) ); + Any aAny( xFilterContainer->getByName( filterName ) ); if( !(aAny >>= aValues) ) continue; |