diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-01-27 15:42:54 +0600 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-01-27 12:43:48 +0100 |
commit | 0fa827dbb2147d1d3850b2181eb6ab6a02a04500 (patch) | |
tree | 721d02c64c26365e605a2348fd1ff744c4dd8d29 /xmloff | |
parent | db227dc7d032d642983c313ab74c34a301464c2a (diff) |
Drop std::as_const from css::uno::Sequence iterations
Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove
non-const Sequence::begin()/end() in internal code, 2021-10-15) and
commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const
Sequence::operator[] in internal code, 2021-11-05).
Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/qa/unit/draw.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLExport.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLPlotAreaContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLSeries2Context.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/SettingsExportHelper.cxx | 2 | ||||
-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 | ||||
-rw-r--r-- | xmloff/source/forms/elementexport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/forms/propertyexport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/styleexp.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/xmltabe.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLRedlineExport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionExport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/txtflde.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/txtfldi.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/xforms/xformsimport.cxx | 2 |
18 files changed, 34 insertions, 34 deletions
diff --git a/xmloff/qa/unit/draw.cxx b/xmloff/qa/unit/draw.cxx index 8d89065d4438..eea4e1362425 100644 --- a/xmloff/qa/unit/draw.cxx +++ b/xmloff/qa/unit/draw.cxx @@ -634,7 +634,7 @@ bool lcl_getShapeSegments(uno::Sequence<drawing::EnhancedCustomShapeSegment>& rS if (!(anotherAny >>= aCustomShapeGeometry)) return false; uno::Sequence<beans::PropertyValue> aPathProps; - for (beans::PropertyValue const& rProp : std::as_const(aCustomShapeGeometry)) + for (beans::PropertyValue const& rProp : aCustomShapeGeometry) { if (rProp.Name == "Path") { @@ -643,7 +643,7 @@ bool lcl_getShapeSegments(uno::Sequence<drawing::EnhancedCustomShapeSegment>& rS } } - for (beans::PropertyValue const& rProp : std::as_const(aPathProps)) + for (beans::PropertyValue const& rProp : aPathProps) { if (rProp.Name == "Segments") { diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 5426509e8c31..4fb0227a162a 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -327,7 +327,7 @@ CustomLabelData lcl_getCustomLabelField(SvXMLExport const& rExport, CustomLabelData aData; Sequence<uno::Reference<chart2::XDataPointCustomLabelField>> aCustomLabels; aAny >>= aCustomLabels; - for (const auto& rField: std::as_const(aCustomLabels)) + for (const auto& rField : aCustomLabels) { if (rField->getFieldType() == chart2::DataPointCustomLabelFieldType_CELLRANGE) { @@ -3553,7 +3553,7 @@ void SchXMLExportHelper_Impl::exportDataPoints( } else { - for( sal_Int32 nCurrIndex : std::as_const(aDataPointSeq) ) + for (sal_Int32 nCurrIndex : aDataPointSeq) { aPropertyStates.clear(); aDataLabelPropertyStates.clear(); @@ -3684,7 +3684,7 @@ void SchXMLExportHelper_Impl::exportDataPoints( mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_REPEATED, OUString::number( aLastPoint.mnRepeat )); - for (const auto& deletedLegendEntry : std::as_const(deletedLegendEntriesSeq)) + for (const auto& deletedLegendEntry : deletedLegendEntriesSeq) { if (nIndex == deletedLegendEntry) { @@ -3710,7 +3710,7 @@ void SchXMLExportHelper_Impl::exportDataPoints( mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_REPEATED, OUString::number( aLastPoint.mnRepeat )); - for (const auto& deletedLegendEntry : std::as_const(deletedLegendEntriesSeq)) + for (const auto& deletedLegendEntry : deletedLegendEntriesSeq) { if (nIndex == deletedLegendEntry) { diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 93f18d4b1efa..d24b9c29f380 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -759,7 +759,7 @@ void SchXMLDataPointContext::startFastElement (sal_Int32 /*Element*/, Reference<beans::XPropertySet> xSeriesProp(mDataPoint.m_xSeries, uno::UNO_QUERY); xSeriesProp->getPropertyValue("DeletedLegendEntries") >>= deletedLegendEntriesSeq; std::vector<sal_Int32> deletedLegendEntries; - for (const auto& deletedLegendEntry : std::as_const(deletedLegendEntriesSeq)) + for (const auto& deletedLegendEntry : deletedLegendEntriesSeq) { deletedLegendEntries.push_back(deletedLegendEntry); } diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index cf4e33e769cf..2aa19d55af2f 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -1247,7 +1247,7 @@ void SchXMLSeries2Context::setStylesToDataPoints( SeriesDefaultsAndStyles& rSeri if (xPointPropInfo.is()) { uno::Sequence<beans::Property> aProperties = xPointPropInfo->getProperties(); - for (const auto& rProperty : std::as_const(aProperties)) + for (const auto& rProperty : aProperties) { if (!rProperty.Name.startsWith("Char") || rProperty.Name.startsWith("Chart")) diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx index ea562f101959..648a5d3a2e13 100644 --- a/xmloff/source/core/SettingsExportHelper.cxx +++ b/xmloff/source/core/SettingsExportHelper.cxx @@ -371,7 +371,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 : std::as_const(aProps)) + for (const auto& rProp : aProps) CallTypeFunction(rProp.Value, rProp.Name); m_rContext.EndElement( true ); } diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 289f1a542ec7..438cc984a3c6 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -1952,7 +1952,7 @@ void SdXMLExport::exportPresentationSettings() OUStringBuffer sTmp; - for( const auto& rShowName : std::as_const(aShowNames) ) + for (const auto& rShowName : aShowNames) { AddAttribute(XML_NAMESPACE_PRESENTATION, XML_NAME, rShowName ); diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 2d195b5b4761..438a9d8e3a4f 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -1721,7 +1721,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 : std::as_const(aClickProperties) ) + for (const auto& rProperty : aClickProperties) { if( !( nFound & Found::CLICKEVENTTYPE ) && rProperty.Name == gsEventType ) { @@ -3278,7 +3278,7 @@ void XMLShapeExport::ImpExportAppletShape( // export parameters uno::Sequence< beans::PropertyValue > aCommands; xPropSet->getPropertyValue("AppletCommands") >>= aCommands; - for( const auto& rCommand : std::as_const(aCommands) ) + for (const auto& rCommand : aCommands) { rCommand.Value >>= aStr; mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, rCommand.Name ); @@ -3325,7 +3325,7 @@ void XMLShapeExport::ImpExportPluginShape( // export parameters uno::Sequence< beans::PropertyValue > aCommands; xPropSet->getPropertyValue("PluginCommands") >>= aCommands; - for( const auto& rCommand : std::as_const(aCommands) ) + for (const auto& rCommand : aCommands) { rCommand.Value >>= aStr; mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, rCommand.Name ); @@ -4375,7 +4375,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc bool bCoordinates = false; OUString aCustomShapeType( "non-primitive" ); - for ( const beans::PropertyValue& rGeoProp : std::as_const(aGeoPropSeq) ) + for (const beans::PropertyValue& rGeoProp : aGeoPropSeq) { switch( EASGet( rGeoProp.Name ) ) { @@ -4426,7 +4426,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc if ( rGeoProp.Value >>= aExtrusionPropSeq ) { bool bSkewValuesProvided = false; - for ( const beans::PropertyValue& rProp : std::as_const(aExtrusionPropSeq) ) + for (const beans::PropertyValue& rProp : aExtrusionPropSeq) { switch( EASGet( rProp.Name ) ) { @@ -4780,7 +4780,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc uno::Sequence< beans::PropertyValue > aTextPathPropSeq; if ( rGeoProp.Value >>= aTextPathPropSeq ) { - for ( const beans::PropertyValue& rProp : std::as_const(aTextPathPropSeq) ) + for (const beans::PropertyValue& rProp : aTextPathPropSeq) { switch( EASGet( rProp.Name ) ) { @@ -4840,7 +4840,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc uno::Sequence< beans::PropertyValue > aPathPropSeq; if ( rGeoProp.Value >>= aPathPropSeq ) { - for ( const beans::PropertyValue& rProp : std::as_const(aPathPropSeq) ) + for (const beans::PropertyValue& rProp : aPathPropSeq) { switch( EASGet( rProp.Name ) ) { @@ -4897,7 +4897,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc { if ( aGluePoints.hasElements() ) { - for( const auto& rGluePoint : std::as_const(aGluePoints) ) + for (const auto& rGluePoint : aGluePoints) { ExportParameter( aStrBuffer, rGluePoint.First ); ExportParameter( aStrBuffer, rGluePoint.Second ); @@ -4955,7 +4955,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc { if ( aPathTextFrames.hasElements() ) { - for ( const auto& rPathTextFrame : std::as_const(aPathTextFrames) ) + for (const auto& rPathTextFrame : 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 aaee9668fa37..f556e1b9c84f 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -3092,7 +3092,7 @@ void SdXMLPluginShapeContext::endFastElement(sal_Int32 nElement) xProps->setPropertyValue("MediaMimeType", uno::Any(maMimeType) ); - for( const auto& rParam : std::as_const(maParams) ) + for (const auto& rParam : maParams) { const OUString& rName = rParam.Name; diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index 1217a7b7f8a2..d48d5b2d044c 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -401,7 +401,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 : std::as_const(aListItems)) + for (const auto& rListItem : aListItems) { m_rContext.getGlobalContext().ClearAttrList(); AddAttribute( @@ -1236,7 +1236,7 @@ namespace xmloff DBG_CHECK_PROPERTY(_rPropertyName, Sequence< sal_Int16 >); m_xProps->getPropertyValue(_rPropertyName) >>= aValueSequence; - for (const auto& rValue : std::as_const(aValueSequence)) + for (const auto& rValue : aValueSequence) _rOut.insert(rValue); } diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index 4015a67a7129..11f036b220bc 100644 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -93,7 +93,7 @@ namespace xmloff css::uno::Sequence<T> anySeq; bool bSuccess = value >>= anySeq; assert(bSuccess); (void)bSuccess; - for (T const & i : std::as_const(anySeq)) + for (T const& i : anySeq) { OUString sValue(implConvertAny(Any(i))); AddAttribute(XML_NAMESPACE_OFFICE, eValueAttName, sValue ); diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index 15e2d714d385..3c1afad031ef 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -87,7 +87,7 @@ void XMLStyleExport::exportStyleContent( const Reference< XStyle >& rStyle ) aProperty >>= aSeq; - for (beans::NamedValue const& rNamedCond : std::as_const(aSeq)) + for (beans::NamedValue const& rNamedCond : aSeq) { OUString aStyleName; diff --git a/xmloff/source/style/xmltabe.cxx b/xmloff/source/style/xmltabe.cxx index 661caedf6f69..e2af1726490e 100644 --- a/xmloff/source/style/xmltabe.cxx +++ b/xmloff/source/style/xmltabe.cxx @@ -108,7 +108,7 @@ void SvxXMLTabStopExport::Export( const uno::Any& rAny ) SvXMLElementExport rElem( rExport, XML_NAMESPACE_STYLE, XML_TAB_STOPS, true, true ); - for( const auto& rTab : std::as_const(aSeq) ) + for (const auto& rTab : aSeq) { if( style::TabAlign_DEFAULT != rTab.Alignment ) exportTabStop( &rTab ); diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx index 33ddcdb17902..e0c60d8b76d2 100644 --- a/xmloff/source/text/XMLRedlineExport.cxx +++ b/xmloff/source/text/XMLRedlineExport.cxx @@ -571,7 +571,7 @@ void XMLRedlineExport::ExportStartOrEndRedline( bool bIsStart = true; OUString sId; bool bIdOK = false; // have we seen an ID? - for(const auto& rValue : std::as_const(aValues)) + for (const auto& rValue : aValues) { if (rValue.Name == "RedlineIdentifier") { diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index fc3adc0c8856..90d0c325b603 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -1540,7 +1540,7 @@ void XMLSectionExport::ExportLevelParagraphStyles( true, true); // iterate over styles in this level - for(const auto& rStyleName : std::as_const(aStyleNames)) + for (const auto& rStyleName : aStyleNames) { // stylename attribute GetExport().AddAttribute(XML_NAMESPACE_TEXT, @@ -1652,7 +1652,7 @@ void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport) aAny = xPropSet->getPropertyValue("SortKeys"); Sequence<Sequence<PropertyValue> > aKeys; aAny >>= aKeys; - for(const Sequence<PropertyValue> & rKey : std::as_const(aKeys)) + for (const Sequence<PropertyValue>& rKey : aKeys) { for(const PropertyValue& rValue : rKey) { diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index 83debd8eb7f7..3b76fdee190e 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -1997,7 +1997,7 @@ void XMLTextFieldExport::ExportFieldDeclarations( aFieldMasters = xFieldMasterNameAccess->getElementNames(); } - for(const OUString& sFieldMaster : std::as_const(aFieldMasters)) { + for(const OUString& sFieldMaster : aFieldMasters) { // workaround for #no-bug# if ( sFieldMaster.startsWithIgnoreAsciiCase( @@ -2739,7 +2739,7 @@ void XMLTextFieldExport::ProcessBibliographyData( aAny >>= aValues; // one attribute per value (unless empty) - for (const auto& rProp : std::as_const(aValues)) + for (const auto& rProp : aValues) { if( rProp.Name == "BibiliographicType" ) { diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index 532824a728af..3d8c099bbc4b 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -2413,7 +2413,7 @@ void XMLMacroFieldImportContext::PrepareField( Sequence<PropertyValue> aValues; pEvents->GetEventSequence( "OnClick", aValues ); - for( const auto& rValue : std::as_const(aValues) ) + for (const auto& rValue : aValues) { if ( rValue.Name == "ScriptType" ) { diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index f55ee1055825..6ea41f7c0c63 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -632,7 +632,7 @@ void FieldParamExporter::Export() { Sequence<OUString> vValue; aValue >>= vValue; - for(const OUString & i : std::as_const(vValue)) + for (const OUString& i : vValue) { ExportParameter(rParameter, i); } @@ -2190,7 +2190,7 @@ void XMLTextParagraphExport::exportParagraph( else rPropSetHelper.getValue( PARA_OUTLINE_CONTENT_VISIBLE, xPropSet ) >>= propList; - for (const auto& rProp : std::as_const(propList)) + for (const auto& rProp : propList) { OUString propName = rProp.Name; if (propName == "OutlineContentVisibleAttr") diff --git a/xmloff/source/xforms/xformsimport.cxx b/xmloff/source/xforms/xformsimport.cxx index 7ff2743329b3..a082c553b3c3 100644 --- a/xmloff/source/xforms/xformsimport.cxx +++ b/xmloff/source/xforms/xformsimport.cxx @@ -163,7 +163,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 : std::as_const(aModelSettings) ) + for (auto const& setting : aModelSettings) { if ( !xModelPSI->hasPropertyByName( setting.Name ) ) { |