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 | |
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')
41 files changed, 86 insertions, 83 deletions
diff --git a/xmloff/inc/XMLScriptExportHandler.hxx b/xmloff/inc/XMLScriptExportHandler.hxx index e232376fe752..1708d7a1ba3d 100644 --- a/xmloff/inc/XMLScriptExportHandler.hxx +++ b/xmloff/inc/XMLScriptExportHandler.hxx @@ -40,7 +40,7 @@ public: virtual void Export( SvXMLExport& rExport, const OUString& rEventName, - css::uno::Sequence<css::beans::PropertyValue> & rValues, + const css::uno::Sequence<css::beans::PropertyValue> & rValues, bool bUseWhitespace) override; }; diff --git a/xmloff/inc/XMLStarBasicExportHandler.hxx b/xmloff/inc/XMLStarBasicExportHandler.hxx index de909e0d24eb..878d748680f9 100644 --- a/xmloff/inc/XMLStarBasicExportHandler.hxx +++ b/xmloff/inc/XMLStarBasicExportHandler.hxx @@ -40,7 +40,7 @@ public: virtual void Export( SvXMLExport& rExport, const OUString& rEventName, - css::uno::Sequence<css::beans::PropertyValue> & rValues, + const css::uno::Sequence<css::beans::PropertyValue> & rValues, bool bUseWhitespace) override; }; diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 5d38b50b1dce..1b0d52ef4bc8 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -962,7 +962,7 @@ void SchXMLChartContext::MergeSeriesForStockChart() bool bHasJapaneseCandlestick = true; uno::Reference< chart2::XDataSeriesContainer > xDSContainer; uno::Reference< chart2::XCoordinateSystemContainer > xCooSysCnt( xDiagram, uno::UNO_QUERY_THROW ); - uno::Sequence< uno::Reference< chart2::XCoordinateSystem > > aCooSysSeq( xCooSysCnt->getCoordinateSystems()); + const uno::Sequence< uno::Reference< chart2::XCoordinateSystem > > aCooSysSeq( xCooSysCnt->getCoordinateSystems()); for( const auto& rCooSys : aCooSysSeq ) { uno::Reference< chart2::XChartTypeContainer > xCTCnt( rCooSys, uno::UNO_QUERY_THROW ); diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 90e0adcb1f1e..2157955521ce 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -212,7 +212,7 @@ public: void exportPropertyMapping( const css::uno::Reference< css::chart2::data::XDataSource > & xSource, - Sequence< OUString >& rSupportedMappings ); + const Sequence< OUString >& rSupportedMappings ); void exportCandleStickSeries( const css::uno::Sequence< @@ -319,7 +319,7 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen { Reference< chart2::XCoordinateSystemContainer > xCooSysCnt( xDiagram, uno::UNO_QUERY_THROW ); - Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq( + const Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq( xCooSysCnt->getCoordinateSystems()); for( const auto& rCooSys : aCooSysSeq ) { @@ -881,7 +881,7 @@ void lcl_exportNumberFormat( const OUString& rPropertyName, const Reference< bea if( !xErrorBarDataSource.is()) return aResult; - Sequence< Reference< chart2::data::XLabeledDataSequence > > aSequences( + const Sequence< Reference< chart2::data::XLabeledDataSequence > > aSequences( xErrorBarDataSource->getDataSequences()); for( const auto& rSequence : aSequences ) { @@ -2487,14 +2487,14 @@ void SchXMLExportHelper_Impl::exportSeries( std::vector< XMLPropertyState > aPropertyStates; - Sequence< Reference< chart2::XCoordinateSystem > > + const Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq( xBCooSysCnt->getCoordinateSystems()); for( const auto& rCooSys : aCooSysSeq ) { Reference< chart2::XChartTypeContainer > xCTCnt( rCooSys, uno::UNO_QUERY ); if( ! xCTCnt.is()) continue; - Sequence< Reference< chart2::XChartType > > aCTSeq( xCTCnt->getChartTypes()); + const Sequence< Reference< chart2::XChartType > > aCTSeq( xCTCnt->getChartTypes()); for( const auto& rChartType : aCTSeq ) { Reference< chart2::XDataSeriesContainer > xDSCnt( rChartType, uno::UNO_QUERY ); @@ -2812,7 +2812,7 @@ void SchXMLExportHelper_Impl::exportSeries( } void SchXMLExportHelper_Impl::exportPropertyMapping( - const Reference< chart2::data::XDataSource > & xSource, Sequence< OUString >& rSupportedMappings ) + const Reference< chart2::data::XDataSource > & xSource, const Sequence< OUString >& rSupportedMappings ) { Reference< chart2::XChartDocument > xNewDoc( mrExport.GetModel(), uno::UNO_QUERY ); Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeqCnt( @@ -2851,7 +2851,7 @@ void SchXMLExportHelper_Impl::exportRegressionCurve( Reference< chart2::XRegressionCurveContainer > xRegressionCurveContainer( xSeries, uno::UNO_QUERY ); if( xRegressionCurveContainer.is() ) { - Sequence< Reference< chart2::XRegressionCurve > > aRegCurveSeq = xRegressionCurveContainer->getRegressionCurves(); + const Sequence< Reference< chart2::XRegressionCurve > > aRegCurveSeq = xRegressionCurveContainer->getRegressionCurves(); for( const auto& xRegCurve : aRegCurveSeq ) { @@ -3593,7 +3593,7 @@ void SchXMLExportHelper_Impl::InitRangeSegmentationProperties( const Reference< if( xDataProvider.is()) { Reference< chart2::data::XDataSource > xDataSource( lcl_pressUsedDataIntoRectangularFormat( xChartDoc, mbHasCategoryLabels )); - Sequence< beans::PropertyValue > aArgs( xDataProvider->detectArguments( xDataSource )); + const Sequence< beans::PropertyValue > aArgs( xDataProvider->detectArguments( xDataSource )); OUString sCellRange, sBrokenRange; bool bBrokenRangeAvailable = false; for( const auto& rArg : aArgs ) diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index 5f4c92f3501a..52e24fdf56d3 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -379,13 +379,13 @@ void SchXMLImportHelper::DeleteDataSeries( { Reference< chart2::XCoordinateSystemContainer > xCooSysCnt( xDoc->getFirstDiagram(), uno::UNO_QUERY_THROW ); - Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq( + const Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq( xCooSysCnt->getCoordinateSystems()); for( const auto& rCooSys : aCooSysSeq ) { Reference< chart2::XChartTypeContainer > xCTCnt( rCooSys, uno::UNO_QUERY_THROW ); - Sequence< Reference< chart2::XChartType > > aChartTypes( xCTCnt->getChartTypes()); + const Sequence< Reference< chart2::XChartType > > aChartTypes( xCTCnt->getChartTypes()); for( const auto& rChartType : aChartTypes ) { diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index 9b2af97f4c33..51d49b12067a 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -183,7 +183,7 @@ void lcl_insertErrorBarLSequencesToMap( if( ( xSeriesProp->getPropertyValue( "ErrorBarY" ) >>= xErrorBarSource ) && xErrorBarSource.is() ) { - Sequence< Reference< chart2::data::XLabeledDataSequence > > aLSequences( + const Sequence< Reference< chart2::data::XLabeledDataSequence > > aLSequences( xErrorBarSource->getDataSequences()); for( const auto& rLSequence : aLSequences ) { diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx index b206d10df4d8..e8a44512515f 100644 --- a/xmloff/source/chart/SchXMLSeriesHelper.cxx +++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx @@ -46,12 +46,12 @@ using ::com::sun::star::uno::Sequence; { Reference< chart2::XCoordinateSystemContainer > xCooSysCnt( xDiagram, uno::UNO_QUERY_THROW ); - Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq( + const Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq( xCooSysCnt->getCoordinateSystems()); for( const auto& rCooSys : aCooSysSeq ) { Reference< chart2::XChartTypeContainer > xCTCnt( rCooSys, uno::UNO_QUERY_THROW ); - Sequence< Reference< chart2::XChartType > > aChartTypeSeq( xCTCnt->getChartTypes()); + const Sequence< Reference< chart2::XChartType > > aChartTypeSeq( xCTCnt->getChartTypes()); for( const auto& rChartType : aChartTypeSeq ) { Reference< chart2::XDataSeriesContainer > xDSCnt( rChartType, uno::UNO_QUERY_THROW ); @@ -105,7 +105,7 @@ uno::Reference< chart2::XChartType > lcl_getChartTypeOfSeries( if( !xCooSysContainer.is()) return nullptr; - uno::Sequence< uno::Reference< chart2::XCoordinateSystem > > aCooSysList( xCooSysContainer->getCoordinateSystems() ); + const uno::Sequence< uno::Reference< chart2::XCoordinateSystem > > aCooSysList( xCooSysContainer->getCoordinateSystems() ); for( const auto& xCooSys : aCooSysList ) { //iterate through all chart types in the current coordinate system @@ -113,7 +113,7 @@ uno::Reference< chart2::XChartType > lcl_getChartTypeOfSeries( SAL_WARN_IF( !xChartTypeContainer.is(), "xmloff.chart", "xChartTypeContainer is NULL"); if( !xChartTypeContainer.is() ) continue; - uno::Sequence< uno::Reference< chart2::XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() ); + const uno::Sequence< uno::Reference< chart2::XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() ); for( const auto& xChartType : aChartTypeList ) { //iterate through all series in this chart type diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index 439f3f24c95c..b05b8f3bfd3f 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -950,17 +950,17 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary( try { Reference< chart2::XCoordinateSystemContainer > xCooSysCnt( xChartDoc->getFirstDiagram(), uno::UNO_QUERY_THROW ); - Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq( xCooSysCnt->getCoordinateSystems() ); + const Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq( xCooSysCnt->getCoordinateSystems() ); for( const auto& rCooSys : aCooSysSeq ) { Reference< chart2::XChartTypeContainer > xCooSysContainer( rCooSys, uno::UNO_QUERY_THROW ); - Sequence< Reference< chart2::XChartType > > aChartTypeSeq( xCooSysContainer->getChartTypes()); + const Sequence< Reference< chart2::XChartType > > aChartTypeSeq( xCooSysContainer->getChartTypes()); for( const auto& rChartType : aChartTypeSeq ) { Reference< chart2::XDataSeriesContainer > xSeriesContainer( rChartType, uno::UNO_QUERY ); if(!xSeriesContainer.is()) continue; - Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xSeriesContainer->getDataSeries() ); + const Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xSeriesContainer->getDataSeries() ); std::vector< Reference< chart2::XDataSeries > > aRemainingSeries; for( const auto& rSeries : aSeriesSeq ) @@ -970,7 +970,7 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary( { bool bHasUnhiddenColumns = false; OUString aRange; - uno::Sequence< Reference< chart2::data::XLabeledDataSequence > > aSequences( xDataSource->getDataSequences() ); + const uno::Sequence< Reference< chart2::data::XLabeledDataSequence > > aSequences( xDataSource->getDataSequences() ); for( const auto& xLabeledSequence : aSequences ) { if(!xLabeledSequence.is()) @@ -1011,7 +1011,7 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary( //first detect which columns are really used std::map< sal_Int32, bool > aUsageMap; OUString aRange; - Sequence< Reference< chart2::data::XLabeledDataSequence > > aUsedSequences( xDataSource->getDataSequences() ); + const Sequence< Reference< chart2::data::XLabeledDataSequence > > aUsedSequences( xDataSource->getDataSequences() ); for( const auto& xLabeledSequence : aUsedSequences ) { if(!xLabeledSequence.is()) diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index 3757dfce8e22..155871ab3ac6 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -684,7 +684,7 @@ void copyProperties( { Reference< beans::XPropertySetInfo > xSrcInfo( xSource->getPropertySetInfo(), uno::UNO_SET_THROW ); Reference< beans::XPropertySetInfo > xDestInfo( xDestination->getPropertySetInfo(), uno::UNO_SET_THROW ); - Sequence< beans::Property > aProperties( xSrcInfo->getProperties()); + const Sequence< beans::Property > aProperties( xSrcInfo->getProperties()); for( const auto& rProperty : aProperties ) { OUString aName( rProperty.Name); diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx index 4defc9d35049..c7128965d6b6 100644 --- a/xmloff/source/core/SettingsExportHelper.cxx +++ b/xmloff/source/core/SettingsExportHelper.cxx @@ -362,7 +362,7 @@ void XMLSettingsExportHelper::exportMapEntry(const uno::Any& rAny, if (bNameAccess) m_rContext.AddAttribute( XML_NAME, rName ); m_rContext.StartElement( XML_CONFIG_ITEM_MAP_ENTRY ); - for (const auto& rProp : aProps) + for (const auto& rProp : std::as_const(aProps)) CallTypeFunction(rProp.Value, rProp.Name); m_rContext.EndElement( true ); } @@ -379,7 +379,7 @@ void XMLSettingsExportHelper::exportNameAccess( { m_rContext.AddAttribute( XML_NAME, rName ); m_rContext.StartElement( XML_CONFIG_ITEM_MAP_NAMED ); - uno::Sequence< OUString > aNames(aNamed->getElementNames()); + const uno::Sequence< OUString > aNames(aNamed->getElementNames()); for (const auto& rElementName : aNames) exportMapEntry(aNamed->getByName(rElementName), rElementName, true); m_rContext.EndElement( true ); diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 2ca4a01fd0a3..9abd27bb9b1f 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -627,7 +627,7 @@ void SAL_CALL SvXMLExport::setSourceDocument( const uno::Reference< lang::XCompo Reference< XNameAccess > xNamespaceMap( xIfc, UNO_QUERY ); if( xNamespaceMap.is() ) { - Sequence< OUString > aPrefixes( xNamespaceMap->getElementNames() ); + const Sequence< OUString > aPrefixes( xNamespaceMap->getElementNames() ); for( OUString const & prefix : aPrefixes ) { OUString aURL; @@ -1530,7 +1530,7 @@ void SvXMLExport::ExportStyles_( bool ) if( xGradient->hasElements() ) { - uno::Sequence< OUString > aNamesSeq ( xGradient->getElementNames() ); + const uno::Sequence< OUString > aNamesSeq ( xGradient->getElementNames() ); for( const OUString& rStrName : aNamesSeq ) { try @@ -1560,7 +1560,7 @@ void SvXMLExport::ExportStyles_( bool ) if( xHatch->hasElements() ) { - uno::Sequence< OUString > aNamesSeq ( xHatch->getElementNames() ); + const uno::Sequence< OUString > aNamesSeq ( xHatch->getElementNames() ); for( const OUString& rStrName : aNamesSeq ) { try @@ -1587,7 +1587,7 @@ void SvXMLExport::ExportStyles_( bool ) { if( xBitmap->hasElements() ) { - uno::Sequence< OUString > aNamesSeq ( xBitmap->getElementNames() ); + const uno::Sequence< OUString > aNamesSeq ( xBitmap->getElementNames() ); for( const OUString& rStrName : aNamesSeq ) { try @@ -1617,7 +1617,7 @@ void SvXMLExport::ExportStyles_( bool ) if( xTransGradient->hasElements() ) { - uno::Sequence< OUString > aNamesSeq ( xTransGradient->getElementNames() ); + const uno::Sequence< OUString > aNamesSeq ( xTransGradient->getElementNames() ); for( const OUString& rStrName : aNamesSeq ) { try @@ -1647,7 +1647,7 @@ void SvXMLExport::ExportStyles_( bool ) if( xMarker->hasElements() ) { - uno::Sequence< OUString > aNamesSeq ( xMarker->getElementNames() ); + const uno::Sequence< OUString > aNamesSeq ( xMarker->getElementNames() ); for( const OUString& rStrName : aNamesSeq ) { try @@ -1677,7 +1677,7 @@ void SvXMLExport::ExportStyles_( bool ) if( xDashes->hasElements() ) { - uno::Sequence< OUString > aNamesSeq ( xDashes->getElementNames() ); + const uno::Sequence< OUString > aNamesSeq ( xDashes->getElementNames() ); for( const OUString& rStrName : aNamesSeq ) { try diff --git a/xmloff/source/core/xmlictxt.cxx b/xmloff/source/core/xmlictxt.cxx index 1014b0e3e2c6..a448e9fa773c 100644 --- a/xmloff/source/core/xmlictxt.cxx +++ b/xmloff/source/core/xmlictxt.cxx @@ -102,7 +102,7 @@ void SAL_CALL SvXMLImportContext::startUnknownElement(const OUString & /*rNamesp mrImport.maAttrList->AddAttribute( sAttrName, "CDATA", it.toString() ); } - uno::Sequence< xml::Attribute > unknownAttribs = Attribs->getUnknownAttributes(); + const uno::Sequence< xml::Attribute > unknownAttribs = Attribs->getUnknownAttributes(); for ( const auto& rUnknownAttrib : unknownAttribs ) { const OUString& rAttrValue = rUnknownAttrib.Value; diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 525b557969dc..a8001b591950 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -1626,7 +1626,8 @@ void SvXMLImport::SetAutoStyles( SvXMLStylesContext *pAutoStyles ) if (pAutoStyles && mxNumberStyles.is() && (mnImportFlags & SvXMLImportFlags::CONTENT) ) { uno::Reference<xml::sax::XAttributeList> xAttrList; - for (const auto& name : mxNumberStyles->getElementNames()) + const uno::Sequence<OUString> aStyleNames = mxNumberStyles->getElementNames(); + for (const auto& name : aStyleNames) { uno::Any aAny(mxNumberStyles->getByName(name)); sal_Int32 nKey(0); diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx index 7833996fc7e8..dcfae65672f1 100644 --- a/xmloff/source/core/xmluconv.cxx +++ b/xmloff/source/core/xmluconv.cxx @@ -692,7 +692,7 @@ void SvXMLUnitConverter::convertPropertySet(uno::Sequence<beans::PropertyValue>& uno::Reference< beans::XPropertySetInfo > xPropertySetInfo = aProperties->getPropertySetInfo(); if (xPropertySetInfo.is()) { - uno::Sequence< beans::Property > aProps = xPropertySetInfo->getProperties(); + const uno::Sequence< beans::Property > aProps = xPropertySetInfo->getProperties(); if (aProps.hasElements()) { rProps.realloc(aProps.getLength()); 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; diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index 9f92db511cd9..13ebf89709c5 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -400,7 +400,7 @@ namespace xmloff Sequence< OUString > aListItems; m_xProps->getPropertyValue(PROPERTY_STRING_ITEM_LIST) >>= aListItems; // loop through it and write the sub elements - for (const auto& rListItem : aListItems) + for (const auto& rListItem : std::as_const(aListItems)) { m_rContext.getGlobalContext().ClearAttrList(); AddAttribute( @@ -1260,7 +1260,7 @@ namespace xmloff DBG_CHECK_PROPERTY(_rPropertyName, Sequence< sal_Int16 >); m_xProps->getPropertyValue(_rPropertyName) >>= aValueSequence; - for (const auto& rValue : aValueSequence) + for (const auto& rValue : std::as_const(aValueSequence)) _rOut.insert(rValue); } diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index 7c9340657ad7..f83802638968 100644 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -223,7 +223,7 @@ namespace xmloff void OPropertyExport::examinePersistence() { m_aRemainingProps.clear(); - Sequence< Property > aProperties = m_xPropertyInfo->getProperties(); + const Sequence< Property > aProperties = m_xPropertyInfo->getProperties(); for (const auto& rProp : aProperties) { // no transient props diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx index 02e720b643db..882b4ae3bf76 100644 --- a/xmloff/source/script/XMLEventExport.cxx +++ b/xmloff/source/script/XMLEventExport.cxx @@ -110,7 +110,7 @@ void XMLEventExport::Export( Reference<XNameAccess> const & rAccess, bool bStarted = false; // iterate over all event types - Sequence<OUString> aNames = rAccess->getElementNames(); + const Sequence<OUString> aNames = rAccess->getElementNames(); for(const auto& rName : aNames) { // translate name diff --git a/xmloff/source/script/XMLScriptExportHandler.cxx b/xmloff/source/script/XMLScriptExportHandler.cxx index b2fe8d6497c5..aaed4ded0e86 100644 --- a/xmloff/source/script/XMLScriptExportHandler.cxx +++ b/xmloff/source/script/XMLScriptExportHandler.cxx @@ -44,7 +44,7 @@ XMLScriptExportHandler::~XMLScriptExportHandler() void XMLScriptExportHandler::Export( SvXMLExport& rExport, const OUString& rEventQName, - Sequence<PropertyValue> & rValues, + const Sequence<PropertyValue> & rValues, bool bUseWhitespace) { diff --git a/xmloff/source/script/XMLStarBasicExportHandler.cxx b/xmloff/source/script/XMLStarBasicExportHandler.cxx index 0502bbedcd00..ed6d3a136b04 100644 --- a/xmloff/source/script/XMLStarBasicExportHandler.cxx +++ b/xmloff/source/script/XMLStarBasicExportHandler.cxx @@ -49,7 +49,7 @@ XMLStarBasicExportHandler::~XMLStarBasicExportHandler() void XMLStarBasicExportHandler::Export( SvXMLExport& rExport, const OUString& rEventQName, - Sequence<PropertyValue> & rValues, + const Sequence<PropertyValue> & rValues, bool bUseWhitespace) { rExport.AddAttribute(XML_NAMESPACE_SCRIPT, XML_LANGUAGE, diff --git a/xmloff/source/style/AttributeContainerHandler.cxx b/xmloff/source/style/AttributeContainerHandler.cxx index 5db11689e28d..07d98dedc472 100644 --- a/xmloff/source/style/AttributeContainerHandler.cxx +++ b/xmloff/source/style/AttributeContainerHandler.cxx @@ -47,7 +47,7 @@ bool XMLAttributeContainerHandler::equals( if( ( r1 >>= xContainer1 ) && ( r2 >>= xContainer2 ) ) { - uno::Sequence< OUString > aAttribNames1( xContainer1->getElementNames() ); + const uno::Sequence< OUString > aAttribNames1( xContainer1->getElementNames() ); uno::Sequence< OUString > aAttribNames2( xContainer2->getElementNames() ); if( aAttribNames1.getLength() == aAttribNames2.getLength() ) diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx index d9b205b1c7df..af44e28525d7 100644 --- a/xmloff/source/style/XMLFontAutoStylePool.cxx +++ b/xmloff/source/style/XMLFontAutoStylePool.cxx @@ -304,14 +304,16 @@ std::unordered_set<OUString> XMLFontAutoStylePool::getUsedFontList() uno::Reference<container::XNameAccess> xFamilies(xFamiliesSupp->getStyleFamilies()); if (xFamilies.is()) { - for (OUString const & sFamilyName : xFamilies->getElementNames()) + const uno::Sequence<OUString> aFamilyNames = xFamilies->getElementNames(); + for (OUString const & sFamilyName : aFamilyNames) { uno::Reference<container::XNameAccess> xStyleContainer; xFamilies->getByName(sFamilyName) >>= xStyleContainer; if (xStyleContainer.is()) { - for (OUString const & rName : xStyleContainer->getElementNames()) + const uno::Sequence<OUString> aStyleNames = xStyleContainer->getElementNames(); + for (OUString const & rName : aStyleNames) { uno::Reference<style::XStyle> xStyle; xStyleContainer->getByName(rName) >>= xStyle; diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx index 64c7645e4980..4baa8a43f24c 100644 --- a/xmloff/source/style/XMLPageExport.cxx +++ b/xmloff/source/style/XMLPageExport.cxx @@ -199,7 +199,7 @@ void XMLPageExport::exportStyles( bool bUsed, bool bAutoStyles ) { if( xPageStyles.is() ) { - uno::Sequence< OUString> aSeq = xPageStyles->getElementNames(); + const uno::Sequence< OUString> aSeq = xPageStyles->getElementNames(); for(const auto& rName : aSeq) { Reference< XStyle > xStyle(xPageStyles->getByName( rName ),uno::UNO_QUERY); diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index e7f39c6314fe..afffbf832d1a 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -90,7 +90,7 @@ void XMLStyleExport::exportStyleContent( const Reference< XStyle >& rStyle ) aProperty >>= aSeq; - for (beans::NamedValue const& rNamedCond : aSeq) + for (beans::NamedValue const& rNamedCond : std::as_const(aSeq)) { OUString aStyleName; diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx index a0ed1e483d9d..76fd72c71deb 100644 --- a/xmloff/source/style/xmlexppr.cxx +++ b/xmloff/source/style/xmlexppr.cxx @@ -316,7 +316,7 @@ void FilterPropertiesInfo_Impl::FillPropertyStateArray( } else { - Sequence < beans::GetPropertyTolerantResult > aResults(xTolPropSet->getPropertyValuesTolerant(rApiNames)); + const Sequence < beans::GetPropertyTolerantResult > aResults(xTolPropSet->getPropertyValuesTolerant(rApiNames)); OSL_ENSURE( rApiNames.getLength() == aResults.getLength(), "wrong implemented XTolerantMultiPropertySet" ); FilterPropertyInfoList_Impl::iterator aPropIter(aPropInfos.begin()); XMLPropertyState aNewProperty( -1 ); @@ -919,7 +919,7 @@ void SvXMLExportPropertyMapper::_exportXML( std::unique_ptr<SvXMLNamespaceMap> pNewNamespaceMap; const SvXMLNamespaceMap *pNamespaceMap = &rNamespaceMap; - uno::Sequence< OUString > aAttribNames( xAttrContainer->getElementNames() ); + const uno::Sequence< OUString > aAttribNames( xAttrContainer->getElementNames() ); OUStringBuffer sNameBuffer; xml::AttributeData aData; diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx index 79f8a5f09b45..d21c219f12cb 100644 --- a/xmloff/source/style/xmlimppr.cxx +++ b/xmloff/source/style/xmlimppr.cxx @@ -688,7 +688,7 @@ bool SvXMLImportPropertyMapper::FillTolerantMultiPropertySet_( // and, finally, try to set the values try { - Sequence< SetPropertyTolerantFailed > aResults(rTolMultiPropSet->setPropertyValuesTolerant( aNames, aValues )); + const Sequence< SetPropertyTolerantFailed > aResults(rTolMultiPropSet->setPropertyValuesTolerant( aNames, aValues )); bSuccessful = !aResults.hasElements(); for( const auto& rResult : aResults) { diff --git a/xmloff/source/style/xmltabe.cxx b/xmloff/source/style/xmltabe.cxx index 63cb2ce79f94..d9cd53384f60 100644 --- a/xmloff/source/style/xmltabe.cxx +++ b/xmloff/source/style/xmltabe.cxx @@ -113,7 +113,7 @@ void SvxXMLTabStopExport::Export( const uno::Any& rAny ) SvXMLElementExport rElem( rExport, XML_NAMESPACE_STYLE, XML_TAB_STOPS, true, true ); - for( const auto& rTab : aSeq ) + for( const auto& rTab : std::as_const(aSeq) ) { if( style::TabAlign_DEFAULT != rTab.Alignment ) exportTabStop( &rTab ); diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx index e700de15670f..6ac62d6d6cb2 100644 --- a/xmloff/source/text/XMLRedlineExport.cxx +++ b/xmloff/source/text/XMLRedlineExport.cxx @@ -539,7 +539,7 @@ void XMLRedlineExport::ExportStartOrEndRedline( bool bIsStart = true; OUString sId; bool bIdOK = false; // have we seen an ID? - for(const auto& rValue : aValues) + for(const auto& rValue : std::as_const(aValues)) { if (rValue.Name == "RedlineIdentifier") { diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index f01dd7d16879..421bbd51aa25 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -1143,7 +1143,7 @@ SvXMLEnumMapEntry<sal_Int16> const aBibliographyDataFieldMap[] = void XMLSectionExport::ExportIndexTemplateElement( SectionTypeEnum eType, //i90246 - Sequence<PropertyValue> & rValues) + const Sequence<PropertyValue> & rValues) { // variables for template values @@ -1525,7 +1525,7 @@ void XMLSectionExport::ExportLevelParagraphStyles( true, true); // iterate over styles in this level - for(const auto& rStyleName : aStyleNames) + for(const auto& rStyleName : std::as_const(aStyleNames)) { // stylename attribute GetExport().AddAttribute(XML_NAMESPACE_TEXT, diff --git a/xmloff/source/text/XMLSectionExport.hxx b/xmloff/source/text/XMLSectionExport.hxx index c2291e373652..da8145bfdcd5 100644 --- a/xmloff/source/text/XMLSectionExport.hxx +++ b/xmloff/source/text/XMLSectionExport.hxx @@ -243,7 +243,7 @@ private: /// export a single template element (e.g. span or tab-stop) void ExportIndexTemplateElement( SectionTypeEnum eType, //i90246, needed for ODF 1.0, 1.0 and 1.2 management - css::uno::Sequence< + const css::uno::Sequence< css::beans::PropertyValue> & rValues); /// export level paragraph styles diff --git a/xmloff/source/text/XMLTextColumnsExport.cxx b/xmloff/source/text/XMLTextColumnsExport.cxx index ff7bb4e4c89d..ec42039dde8c 100644 --- a/xmloff/source/text/XMLTextColumnsExport.cxx +++ b/xmloff/source/text/XMLTextColumnsExport.cxx @@ -62,7 +62,7 @@ void XMLTextColumnsExport::exportXML( const Any& rAny ) Reference < XTextColumns > xColumns; rAny >>= xColumns; - Sequence < TextColumn > aColumns = xColumns->getColumns(); + const Sequence < TextColumn > aColumns = xColumns->getColumns(); sal_Int32 nCount = aColumns.getLength(); OUStringBuffer sValue; diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index ca796c95cc58..19d7ed74cad9 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -1965,7 +1965,7 @@ void XMLTextFieldExport::ExportFieldDeclarations( aFieldMasters = xFieldMasterNameAccess->getElementNames(); } - for(const OUString& sFieldMaster : aFieldMasters) { + for(const OUString& sFieldMaster : std::as_const(aFieldMasters)) { // workaround for #no-bug# if ( sFieldMaster.startsWithIgnoreAsciiCase( @@ -2706,7 +2706,7 @@ void XMLTextFieldExport::ProcessBibliographyData( aAny >>= aValues; // one attribute per value (unless empty) - for (const auto& rProp : aValues) + for (const auto& rProp : std::as_const(aValues)) { if( rProp.Name == "BibiliographicType" ) { diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index 95986dd42a0a..8a9bcbf84671 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -2490,7 +2490,7 @@ void XMLMacroFieldImportContext::PrepareField( Sequence<PropertyValue> aValues; pEvents->GetEventSequence( "OnClick", aValues ); - for( const auto& rValue : aValues ) + for( const auto& rValue : std::as_const(aValues) ) { if ( rValue.Name == "ScriptType" ) { diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 5a9ebfcb3dfd..d7bf4e5f433f 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -461,7 +461,7 @@ void FieldParamExporter::Export() const Type aBoolType = cppu::UnoType<sal_Bool>::get(); const Type aSeqType = cppu::UnoType<Sequence<OUString>>::get(); const Type aIntType = ::cppu::UnoType<sal_Int32>::get(); - Sequence<OUString> vParameters(m_xFieldParams->getElementNames()); + const Sequence<OUString> vParameters(m_xFieldParams->getElementNames()); for(const auto & rParameter : vParameters) { const Any aValue = m_xFieldParams->getByName(rParameter); @@ -507,7 +507,7 @@ void FieldParamExporter::Export() { Sequence<OUString> vValue; aValue >>= vValue; - for(const OUString & i : vValue) + for(const OUString & i : std::as_const(vValue)) { ExportParameter(rParameter, i); } diff --git a/xmloff/source/xforms/xformsapi.cxx b/xmloff/source/xforms/xformsapi.cxx index 19d2f1a051b7..1c1d21125418 100644 --- a/xmloff/source/xforms/xformsapi.cxx +++ b/xmloff/source/xforms/xformsapi.cxx @@ -113,7 +113,7 @@ static Reference<XPropertySet> lcl_findXFormsBindingOrSubmission( if( xForms.is() ) { // iterate over all models - Sequence<OUString> aNames = xForms->getElementNames(); + const Sequence<OUString> aNames = xForms->getElementNames(); for( const auto& rName : aNames ) { Reference<xforms::XModel2> xModel( diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx index 09053850c952..76a5a47300eb 100644 --- a/xmloff/source/xforms/xformsexport.cxx +++ b/xmloff/source/xforms/xformsexport.cxx @@ -86,7 +86,7 @@ void exportXForms( SvXMLExport& rExport ) Reference<XNameContainer> xForms = xSupplier->getXForms(); if( xForms.is() ) { - Sequence<OUString> aNames = xForms->getElementNames(); + const Sequence<OUString> aNames = xForms->getElementNames(); for( const auto& rName : aNames ) { @@ -331,7 +331,7 @@ void exportXFormsBinding( SvXMLExport& rExport, if( xNamespaces.is() ) { // iterate over Prefixes for this binding - Sequence<OUString> aPrefixes = xNamespaces->getElementNames(); + const Sequence<OUString> aPrefixes = xNamespaces->getElementNames(); for( const OUString& rPrefix : aPrefixes ) { OUString sURI; @@ -763,7 +763,7 @@ void getXFormsSettings( const Reference< XNameAccess >& _rXForms, Sequence< Prop // are the names of the XForm models, and which in turn provides named sequences of // PropertyValues - which denote the actual property values of the given named model. - Sequence< OUString > aModelNames( _rXForms->getElementNames() ); + const Sequence< OUString > aModelNames( _rXForms->getElementNames() ); Reference< XNameContainer > xModelSettings = document::NamedPropertyValues::create( comphelper::getProcessComponentContext() ); diff --git a/xmloff/source/xforms/xformsimport.cxx b/xmloff/source/xforms/xformsimport.cxx index 03b1ca1d6043..24f948763b06 100644 --- a/xmloff/source/xforms/xformsimport.cxx +++ b/xmloff/source/xforms/xformsimport.cxx @@ -149,7 +149,7 @@ void applyXFormsSettings( const Reference< XNameAccess >& _rXForms, const Sequen try { - Sequence< OUString > aSettingsForModels( xModelSettings->getElementNames() ); + const Sequence< OUString > aSettingsForModels( xModelSettings->getElementNames() ); for ( auto const & modelName : aSettingsForModels ) { // the settings for this particular model @@ -167,7 +167,7 @@ void applyXFormsSettings( const Reference< XNameAccess >& _rXForms, const Sequen Reference< XPropertySet > xModelProps( _rXForms->getByName( modelName ), UNO_QUERY_THROW ); Reference< XPropertySetInfo > xModelPSI( xModelProps->getPropertySetInfo(), UNO_SET_THROW ); - for ( auto const & setting : aModelSettings ) + for ( auto const & setting : std::as_const(aModelSettings) ) { if ( !xModelPSI->hasPropertyByName( setting.Name ) ) { |