diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-12-17 23:00:24 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-18 07:36:32 +0100 |
commit | 4e144751f12a06e358e4f7efa7c8f13954e6cfd7 (patch) | |
tree | c6df66d58d02ecaf5caa437a944665fe83959402 /filter/source/xsltdialog | |
parent | 39c618caf5aa19da95285bec6cab7108bee3984c (diff) |
loplugin:unusedindex
Change-Id: I256a807dd2a4c81126b5a76f3d472e31b8224146
Reviewed-on: https://gerrit.libreoffice.org/46652
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter/source/xsltdialog')
-rw-r--r-- | filter/source/xsltdialog/xmlfilterdialogcomponent.cxx | 5 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltertestdialog.cxx | 21 |
2 files changed, 13 insertions, 13 deletions
diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx index 807d01138b04..0e55cd318141 100644 --- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx +++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx @@ -307,11 +307,10 @@ sal_Int16 SAL_CALL XMLFilterDialogComponent::execute( ) void SAL_CALL XMLFilterDialogComponent::initialize( const Sequence< Any >& aArguments ) { - const Any* pArguments = aArguments.getConstArray(); - for(sal_Int32 i=0; i<aArguments.getLength(); ++i, ++pArguments) + for(const Any& rArgument : aArguments) { PropertyValue aProperty; - if(*pArguments >>= aProperty) + if(rArgument >>= aProperty) { if( aProperty.Name == "ParentWindow" ) { diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index 03935a726b8c..5e26875c2f09 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -326,35 +326,36 @@ void XMLFilterTestDialog::onExportBrowse() continue; OUString aInterfaceName; - PropertyValue* pValues = aValues.getArray(); OUString aType, aService; sal_Int32 nFlags( 0 ); int nFound = 0; - for( sal_Int32 nValue = 0; (nValue < aValues.getLength()) && (nFound != 15); nValue++, pValues++ ) + for( const PropertyValue& rValue : aValues ) { - if ( pValues->Name == "Type" ) + if ( rValue.Name == "Type" ) { - pValues->Value >>= aType; + rValue.Value >>= aType; nFound |= 1; } - else if ( pValues->Name == "DocumentService" ) + else if ( rValue.Name == "DocumentService" ) { - pValues->Value >>= aService; + rValue.Value >>= aService; nFound |= 2; } - else if ( pValues->Name == "Flags" ) + else if ( rValue.Name == "Flags" ) { - pValues->Value >>= nFlags; + rValue.Value >>= nFlags; nFound |= 4; } - if ( pValues->Name == "UIName" ) + else if ( rValue.Name == "UIName" ) { - pValues->Value >>= aInterfaceName; + rValue.Value >>= aInterfaceName; nFound |= 8; } + if (nFound == 15) + break; } if( (nFound == 15) && (!aType.isEmpty() && aService == m_pFilterInfo->maDocumentService) ) |