diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-15 20:26:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-16 08:11:34 +0200 |
commit | 50679d449fa71bebdc3cba1d30c6c81ac846990c (patch) | |
tree | f903dc5160a9953cd9211efe44261ba7cd77b520 /xmloff/source/draw | |
parent | a0073744aac89648e89506b79e227b17dacf58d0 (diff) |
loplugin:sequenceloop in xmloff
Change-Id: I1fde11da5f6e97255a9140f11c298d6d525f7230
Reviewed-on: https://gerrit.libreoffice.org/77543
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r-- | xmloff/source/draw/XMLImageMapExport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/animationexport.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlexp.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 18 | ||||
-rw-r--r-- | xmloff/source/draw/ximpshap.cxx | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/xmloff/source/draw/XMLImageMapExport.cxx b/xmloff/source/draw/XMLImageMapExport.cxx index c9daabece5ce..e34f85dd891f 100644 --- a/xmloff/source/draw/XMLImageMapExport.cxx +++ b/xmloff/source/draw/XMLImageMapExport.cxx @@ -134,7 +134,7 @@ void XMLImageMapExport::ExportMapEntry( enum XMLTokenEnum eType = XML_TOKEN_INVALID; // distinguish map entries by their service name - Sequence<OUString> sServiceNames = + const Sequence<OUString> sServiceNames = xServiceInfo->getSupportedServiceNames(); for( const OUString& rName : sServiceNames ) { diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx index a55f1e991685..7382888d08f9 100644 --- a/xmloff/source/draw/animationexport.cxx +++ b/xmloff/source/draw/animationexport.cxx @@ -724,7 +724,7 @@ void AnimationsExporterImpl::prepareNode( const Reference< XAnimationNode >& xNo break; } - Sequence< NamedValue > aUserData( xNode->getUserData() ); + const Sequence< NamedValue > aUserData( xNode->getUserData() ); for( const auto& rValue : aUserData ) { if( IsXMLToken( rValue.Name, XML_MASTER_ELEMENT ) ) @@ -875,7 +875,7 @@ void AnimationsExporterImpl::exportNode( const Reference< XAnimationNode >& xNod sal_Int16 nContainerNodeType = EffectNodeType::DEFAULT; OUString aPresetId; - Sequence< NamedValue > aUserData( xNode->getUserData() ); + const Sequence< NamedValue > aUserData( xNode->getUserData() ); for( const auto& rValue : aUserData ) { if( IsXMLToken( rValue.Name, XML_NODE_TYPE ) ) @@ -1161,7 +1161,7 @@ void AnimationsExporterImpl::exportAnimate( const Reference< XAnimate >& xAnimat if(nNodeType != AnimationNodeType::SET) { - Sequence< double > aKeyTimes( xAnimate->getKeyTimes() ); + const Sequence< double > aKeyTimes( xAnimate->getKeyTimes() ); if( aKeyTimes.hasElements() ) { for( const auto& rKeyTime : aKeyTimes ) @@ -1202,7 +1202,7 @@ void AnimationsExporterImpl::exportAnimate( const Reference< XAnimate >& xAnimat } } - Sequence< TimeFilterPair > aTimeFilter( xAnimate->getTimeFilter() ); + const Sequence< TimeFilterPair > aTimeFilter( xAnimate->getTimeFilter() ); if( aTimeFilter.hasElements() ) { for( const auto& rPair : aTimeFilter ) diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 3b58e8468328..f6d4e938efeb 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -1966,7 +1966,7 @@ void SdXMLExport::exportPresentationSettings() OUStringBuffer sTmp; - for( const auto& rShowName : aShowNames ) + for( const auto& rShowName : std::as_const(aShowNames) ) { AddAttribute(XML_NAMESPACE_PRESENTATION, XML_NAME, rShowName ); diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 4a818e118ae4..92d8f2358716 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -1596,7 +1596,7 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x uno::Sequence< beans::PropertyValue > aClickProperties; if( xEvents->hasByName( gsOnClick ) && (xEvents->getByName( gsOnClick ) >>= aClickProperties) ) { - for( const auto& rProperty : aClickProperties ) + for( const auto& rProperty : std::as_const(aClickProperties) ) { if( !( nFound & Found::CLICKEVENTTYPE ) && rProperty.Name == gsEventType ) { @@ -3113,7 +3113,7 @@ void XMLShapeExport::ImpExportAppletShape( // export parameters uno::Sequence< beans::PropertyValue > aCommands; xPropSet->getPropertyValue("AppletCommands") >>= aCommands; - for( const auto& rCommand : aCommands ) + for( const auto& rCommand : std::as_const(aCommands) ) { rCommand.Value >>= aStr; mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, rCommand.Name ); @@ -3159,7 +3159,7 @@ void XMLShapeExport::ImpExportPluginShape( // export parameters uno::Sequence< beans::PropertyValue > aCommands; xPropSet->getPropertyValue("PluginCommands") >>= aCommands; - for( const auto& rCommand : aCommands ) + for( const auto& rCommand : std::as_const(aCommands) ) { rCommand.Value >>= aStr; mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, rCommand.Name ); @@ -4120,7 +4120,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc bool bCoordinates = false; OUString aCustomShapeType( "non-primitive" ); - for ( const beans::PropertyValue& rGeoProp : aGeoPropSeq ) + for ( const beans::PropertyValue& rGeoProp : std::as_const(aGeoPropSeq) ) { switch( EASGet( rGeoProp.Name ) ) { @@ -4173,7 +4173,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc uno::Sequence< beans::PropertyValue > aExtrusionPropSeq; if ( rGeoProp.Value >>= aExtrusionPropSeq ) { - for ( const beans::PropertyValue& rProp : aExtrusionPropSeq ) + for ( const beans::PropertyValue& rProp : std::as_const(aExtrusionPropSeq) ) { switch( EASGet( rProp.Name ) ) { @@ -4481,7 +4481,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc uno::Sequence< beans::PropertyValue > aTextPathPropSeq; if ( rGeoProp.Value >>= aTextPathPropSeq ) { - for ( const beans::PropertyValue& rProp : aTextPathPropSeq ) + for ( const beans::PropertyValue& rProp : std::as_const(aTextPathPropSeq) ) { switch( EASGet( rProp.Name ) ) { @@ -4541,7 +4541,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc uno::Sequence< beans::PropertyValue > aPathPropSeq; if ( rGeoProp.Value >>= aPathPropSeq ) { - for ( const beans::PropertyValue& rProp : aPathPropSeq ) + for ( const beans::PropertyValue& rProp : std::as_const(aPathPropSeq) ) { switch( EASGet( rProp.Name ) ) { @@ -4598,7 +4598,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc { if ( aGluePoints.hasElements() ) { - for( const auto& rGluePoint : aGluePoints ) + for( const auto& rGluePoint : std::as_const(aGluePoints) ) { ExportParameter( aStrBuffer, rGluePoint.First ); ExportParameter( aStrBuffer, rGluePoint.Second ); @@ -4656,7 +4656,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc { if ( aPathTextFrames.hasElements() ) { - for ( const auto& rPathTextFrame : aPathTextFrames ) + for ( const auto& rPathTextFrame : std::as_const(aPathTextFrames) ) { ExportParameter( aStrBuffer, rPathTextFrame.TopLeft.First ); ExportParameter( aStrBuffer, rPathTextFrame.TopLeft.Second ); diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index d61cee0a708e..56efcdb64b2d 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -3105,7 +3105,7 @@ void SdXMLPluginShapeContext::EndElement() xProps->setPropertyValue("MediaMimeType", uno::makeAny(maMimeType) ); - for( const auto& rParam : maParams ) + for( const auto& rParam : std::as_const(maParams) ) { const OUString& rName = rParam.Name; |