diff options
314 files changed, 536 insertions, 537 deletions
diff --git a/basctl/source/dlged/dlgedclip.cxx b/basctl/source/dlged/dlgedclip.cxx index 931f10afe507..264e42c835b4 100644 --- a/basctl/source/dlged/dlgedclip.cxx +++ b/basctl/source/dlged/dlgedclip.cxx @@ -90,7 +90,7 @@ sal_Bool SAL_CALL DlgEdTransferableImpl::isDataFlavorSupported( const DataFlavor { const SolarMutexGuard aGuard; - for ( auto const & i : std::as_const(m_SeqFlavors) ) + for (auto const& i : m_SeqFlavors) if ( compareDataFlavors( i, rFlavor ) ) return true; return false; diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx index 523bbbf14ac5..2bd3bcfb2f80 100644 --- a/binaryurp/source/bridge.cxx +++ b/binaryurp/source/bridge.cxx @@ -772,7 +772,7 @@ void Bridge::handleCommitChangeRequest( css::uno::Sequence< css::bridge::ProtocolProperty > s; [[maybe_unused]] bool ok = (mapBinaryToCppAny(inArguments[0]) >>= s); assert(ok); - for (const auto & pp : std::as_const(s)) { + for (const auto & pp : s) { if (pp.Name == "CurrentContext") { bCcMode = true; } else { diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 6958876b1d7d..81ed060e7acb 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -473,7 +473,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testEmbeddingsGrabBag) const char* const testEmbeddedFileNames[] {"word/embeddings/Microsoft_Excel_Worksheet3.xlsx", "word/embeddings/Microsoft_Excel_Worksheet2.xlsx", "word/embeddings/Microsoft_Excel_Worksheet1.xlsx"}; - for(beans::PropertyValue const & prop : std::as_const(aGrabBag)) + for (beans::PropertyValue const& prop : aGrabBag) { if (prop.Name == "OOXEmbeddings") { @@ -1142,7 +1142,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testEmbeddingsOleObjectGrabBag) CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty bool bEmbeddings = false; const char* const testEmbeddedFileNames[] = {"word/embeddings/oleObject1.bin"}; - for(beans::PropertyValue const & prop : std::as_const(aGrabBag)) + for (beans::PropertyValue const& prop : aGrabBag) { if (prop.Name == "OOXEmbeddings") { diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx index 4e3e4bb75987..2e3988267c77 100644 --- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx +++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx @@ -127,7 +127,7 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs) m_xED_CrossesAtCategory->set_visible( m_bCrossingAxisIsCategoryAxis ); if (m_bCrossingAxisIsCategoryAxis) { - for( auto const & cat : std::as_const(m_aCategories) ) + for (auto const& cat : m_aCategories) m_xED_CrossesAtCategory->append_text(cat); } diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx index 3da0b398c893..2b194051a1f2 100644 --- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx @@ -257,7 +257,7 @@ DataPointItemConverter::DataPointItemConverter( uno::Sequence<sal_Int32> deletedLegendEntriesSeq; // "DeletedLegendEntries" xSeries->getFastPropertyValue(PROP_DATASERIES_DELETED_LEGEND_ENTRIES) >>= deletedLegendEntriesSeq; - for (const auto& deletedLegendEntry : std::as_const(deletedLegendEntriesSeq)) + for (const auto& deletedLegendEntry : deletedLegendEntriesSeq) { if (nPointIndex == deletedLegendEntry) { @@ -580,7 +580,7 @@ bool DataPointItemConverter::ApplySpecialItem( // "DeletedLegendEntries" m_xSeries->getFastPropertyValue(PROP_DATASERIES_DELETED_LEGEND_ENTRIES) >>= deletedLegendEntriesSeq; std::vector<sal_Int32> deletedLegendEntries; - for (const auto& deletedLegendEntry : std::as_const(deletedLegendEntriesSeq)) + for (const auto& deletedLegendEntry : deletedLegendEntriesSeq) { if (bHideLegendEntry || m_nPointIndex != deletedLegendEntry) deletedLegendEntries.push_back(deletedLegendEntry); diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 1b2b3654c201..0cb2a0ad234d 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1070,8 +1070,8 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) { if( bIsPoint ) { - auto aIt = std::find( std::as_const(aAttributedDataPointIndexList).begin(), std::as_const(aAttributedDataPointIndexList).end(), nPointIndex ); - if( aIt != std::as_const(aAttributedDataPointIndexList).end()) + auto aIt = std::find( aAttributedDataPointIndexList.begin(), aAttributedDataPointIndexList.end(), nPointIndex ); + if (aIt != aAttributedDataPointIndexList.end()) bSelectedPointIsFormatted = true; else bHasFormattedDataPointsOtherThanSelected = true; diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx index 44846850dcc8..f66efd82ea2c 100644 --- a/chart2/source/controller/main/ObjectHierarchy.cxx +++ b/chart2/source/controller/main/ObjectHierarchy.cxx @@ -230,7 +230,7 @@ void ObjectHierarchy::createAxesTree( std::vector< rtl::Reference< Axis > > aAxes = AxisHelper::getAllAxesOfDiagram( xDiagram, /* bOnlyVisible = */ true ); if( !m_bOrderingForElementSelector ) { - for (const auto & rAxis : std::as_const(aAxes)) + for (const auto& rAxis : aAxes) rContainer.push_back( ObjectIdentifier::createClassifiedIdentifierForObject( rAxis, xChartDoc ) ); } diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx index 49c93766cd53..670391422a85 100644 --- a/chart2/source/model/template/ChartTypeTemplate.cxx +++ b/chart2/source/model/template/ChartTypeTemplate.cxx @@ -218,7 +218,7 @@ void ChartTypeTemplate::changeDiagram( const rtl::Reference< Diagram >& xDiagram aSeriesSeq = aData.Series; sal_Int32 nIndex = 0; - for( auto const & i : std::as_const(aSeriesSeq) ) + for (auto const& i : aSeriesSeq) for( auto const & j : i ) { if( nIndex >= nFormerSeriesCount ) diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx index e4300dd01f7b..07e150bf64d3 100644 --- a/chart2/source/model/template/PieChartTypeTemplate.cxx +++ b/chart2/source/model/template/PieChartTypeTemplate.cxx @@ -446,7 +446,7 @@ void PieChartTypeTemplate::applyStyle2( { fOffsetToSet = 0.0; bSetOffset = true; - for( auto const & pointIndex : std::as_const(aAttributedDataPointIndexList) ) + for (auto const& pointIndex : aAttributedDataPointIndexList) { uno::Reference< beans::XPropertySet > xPointProp( xSeries->getDataPointByIndex( pointIndex )); @@ -471,7 +471,7 @@ void PieChartTypeTemplate::applyStyle2( xSeries->setPropertyValue( aOffsetPropName, uno::Any( fOffsetToSet )); // remove hard attributes from data points - for( auto const & pointIndex : std::as_const(aAttributedDataPointIndexList) ) + for (auto const& pointIndex : aAttributedDataPointIndexList) { uno::Reference< beans::XPropertyState > xPointState( xSeries->getDataPointByIndex( pointIndex ), uno::UNO_QUERY ); diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx index 136191f66ade..dba33728b5aa 100644 --- a/chart2/source/tools/DataSeriesHelper.cxx +++ b/chart2/source/tools/DataSeriesHelper.cxx @@ -601,8 +601,8 @@ bool hasDataLabelAtPoint( const rtl::Reference< DataSeries >& xSeries, sal_Int32 // "AttributedDataPoints" if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList ) { - auto aIt = std::find( std::as_const(aAttributedDataPointIndexList).begin(), std::as_const(aAttributedDataPointIndexList).end(), nPointIndex ); - if( aIt != std::as_const(aAttributedDataPointIndexList).end()) + auto aIt = std::find( aAttributedDataPointIndexList.begin(), aAttributedDataPointIndexList.end(), nPointIndex ); + if (aIt != aAttributedDataPointIndexList.end()) xProp = xSeries->getDataPointByIndex(nPointIndex); else xProp = xSeries; diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx b/chart2/source/tools/ReferenceSizeProvider.cxx index b1ca0b429a7b..e8d4c1d1415e 100644 --- a/chart2/source/tools/ReferenceSizeProvider.cxx +++ b/chart2/source/tools/ReferenceSizeProvider.cxx @@ -111,7 +111,7 @@ void ReferenceSizeProvider::setValuesAtAllDataSeries() // "AttributedDataPoints" if( elem->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS) >>= aPointIndexes ) { - for( sal_Int32 idx : std::as_const(aPointIndexes) ) + for (sal_Int32 idx : aPointIndexes) setValuesAtPropertySet( elem->getDataPointByIndex( idx ) ); } @@ -274,7 +274,7 @@ ReferenceSizeProvider::AutoResizeState ReferenceSizeProvider::getAutoResizeState // "AttributedDataPoints" if( elem->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS) >>= aPointIndexes ) { - for( sal_Int32 idx : std::as_const(aPointIndexes) ) + for (sal_Int32 idx : aPointIndexes) { getAutoResizeFromPropSet( elem->getDataPointByIndex( idx ), eResult ); diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 948d5ef33f1f..ef13248bf0a6 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -598,7 +598,7 @@ rtl::Reference<SvxShapeText> VSeriesPlotter::createDataLabel( const rtl::Referen } } - for( auto const & line : std::as_const(aTextList) ) + for (auto const& line : aTextList) { if( !line.isEmpty() ) { @@ -2803,7 +2803,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( for( sal_Int32 nIdx=0; nIdx<aCategoryNames.getLength(); ++nIdx ) { bool deletedLegendEntry = false; - for (const auto& deletedLegendEntryIdx : std::as_const(deletedLegendEntries)) + for (const auto& deletedLegendEntryIdx : deletedLegendEntries) { if (nIdx == deletedLegendEntryIdx) { diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index f9efceb676a5..228d4b2a1156 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -2227,7 +2227,7 @@ rtl::Reference<SvxShapeText> if( xFormattedString.hasElements() ) { OUString aLabel; - for( const auto & i : std::as_const(xFormattedString) ) + for (const auto& i : xFormattedString) aLabel += i->getString(); aLabel = ShapeFactory::getStackedString( aLabel, bStackCharacters ); @@ -2249,7 +2249,7 @@ rtl::Reference<SvxShapeText> } else { - for( const uno::Reference< chart2::XFormattedString >& rxFS : std::as_const(xFormattedString) ) + for (const uno::Reference<chart2::XFormattedString>& rxFS : xFormattedString) { xTextCursor->gotoEnd(false); xShape->insertString( xTextCursor, rxFS->getString(), false ); diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx index 87e1035aa015..0649c9c13fa5 100644 --- a/comphelper/source/misc/backupfilehelper.cxx +++ b/comphelper/source/misc/backupfilehelper.cxx @@ -411,7 +411,7 @@ namespace e.Context, anyEx ); } - for (const uno::Sequence< uno::Reference< deployment::XPackage > > & xPackageList : std::as_const(xAllPackages)) + for (const uno::Sequence< uno::Reference< deployment::XPackage > > & xPackageList : xAllPackages) { for (const uno::Reference< deployment::XPackage > & xPackage : xPackageList) { diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index 317a6092af75..bedd714bab49 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -203,7 +203,7 @@ OUString MimeConfigurationHelper::GetDocServiceNameFromFilter( const OUString& a uno::Sequence< beans::PropertyValue > aFilterData; if ( aFilterAnyData >>= aFilterData ) { - for ( const auto & prop : std::as_const(aFilterData) ) + for (const auto& prop : aFilterData) if ( prop.Name == "DocumentService" ) prop.Value >>= aDocServiceName; } @@ -234,7 +234,7 @@ OUString MimeConfigurationHelper::GetDocServiceNameFromMediaType( const OUString uno::Sequence< beans::PropertyValue > aType; if ( xEnum->nextElement() >>= aType ) { - for ( const auto & prop : std::as_const(aType) ) + for (const auto& prop : aType) { OUString aFilterName; if ( prop.Name == "PreferredFilter" @@ -565,7 +565,7 @@ OUString MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName( { OUString aFilterName; - for ( const auto & prop : std::as_const(aMediaDescr) ) + for (const auto& prop : aMediaDescr) if ( prop.Name == "FilterName" ) prop.Value >>= aFilterName; @@ -584,7 +584,7 @@ OUString MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName( OUString aTypeName = xTypeDetection->queryTypeByDescriptor(aTempMD, bAllowDeepDetection); // get FilterName - for ( const auto & prop : std::as_const(aTempMD) ) + for (const auto& prop : aTempMD) if ( prop.Name == "FilterName" ) prop.Value >>= aFilterName; @@ -604,7 +604,7 @@ OUString MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName( if ( xNameAccess.is() && ( xNameAccess->getByName( aTypeName ) >>= aTypes ) ) { - for ( const auto & prop : std::as_const(aTypes) ) + for (const auto& prop : aTypes) { if ( prop.Name == "PreferredFilter" && ( prop.Value >>= aFilterName ) ) { @@ -628,7 +628,7 @@ OUString MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName( uno::Sequence< beans::NamedValue >& aObject ) { OUString aDocName; - for ( const auto & nv : std::as_const(aObject) ) + for (const auto& nv : aObject) if ( nv.Name == "ObjectDocumentServiceName" ) { nv.Value >>= aDocName; diff --git a/configmgr/source/writemodfile.cxx b/configmgr/source/writemodfile.cxx index 09fe0949b0e9..3e7e281eb6aa 100644 --- a/configmgr/source/writemodfile.cxx +++ b/configmgr/source/writemodfile.cxx @@ -209,7 +209,7 @@ template< typename T > void writeListValue( if (i != 0) { handle.writeString(" "); } - writeValueContent_(handle, std::as_const(val)[i]); + writeValueContent_(handle, val[i]); } handle.writeString("</value>"); } @@ -220,7 +220,7 @@ template< typename T > void writeItemListValue( handle.writeString(">"); css::uno::Sequence< T > val; value >>= val; - for (const auto & i : std::as_const(val)) { + for (const auto & i : val) { handle.writeString("<it>"); writeValueContent_(handle, i); handle.writeString("</it>"); diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx index df5ef04ee523..b8e45fb027e7 100644 --- a/connectivity/source/commontools/ConnectionWrapper.cxx +++ b/connectivity/source/commontools/ConnectionWrapper.cxx @@ -202,7 +202,7 @@ void OConnectionWrapper::createUniqueId( const OUString& _rURL auto [begin, end] = asNonConstRange(_rInfo); std::sort(begin,end,TPropertyValueLessFunctor()); - for (PropertyValue const & prop : std::as_const(_rInfo)) + for (PropertyValue const& prop : _rInfo) { // we only include strings an integer values OUString sValue; @@ -218,7 +218,7 @@ void OConnectionWrapper::createUniqueId( const OUString& _rURL Sequence< OUString> aSeq; if ( prop.Value >>= aSeq ) { - for(OUString const & s : std::as_const(aSeq)) + for (OUString const& s : aSeq) sha1.update(reinterpret_cast<unsigned char const*>(s.getStr()), s.getLength() * sizeof(sal_Unicode)); } } diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx index ee80460621f5..5c5b4f60a017 100644 --- a/connectivity/source/manager/mdrivermanager.cxx +++ b/connectivity/source/manager/mdrivermanager.cxx @@ -343,7 +343,7 @@ void OSDBCDriverManager::initializeDriverPrecedence() // at the moment this is the first of all drivers we know // loop through the names in the precedence order - for ( const OUString& rDriverOrder : std::as_const(aDriverOrder) ) + for (const OUString& rDriverOrder : aDriverOrder) { if (aNoPrefDriversStart == m_aDriversBS.end()) break; diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx index 50a8be1f8436..c3c1ad0a66c8 100644 --- a/cppuhelper/source/propertysetmixin.cxx +++ b/cppuhelper/source/propertysetmixin.cxx @@ -176,7 +176,7 @@ void Data::initProperties( //XXX Special interpretation of getter/setter exceptions only // works if the specified exceptions are of the exact type, not // of a supertype: - for (const auto & ex : std::as_const(excs)) { + for (const auto & ex : excs) { if ( ex->getName() == "com.sun.star.beans.UnknownPropertyException" ) { bGetUnknown = true; @@ -184,7 +184,7 @@ void Data::initProperties( } } excs = attr->getSetExceptions(); - for (const auto & ex : std::as_const(excs)) { + for (const auto & ex : excs) { if ( ex->getName() == "com.sun.star.beans.UnknownPropertyException" ) { bSetUnknown = true; diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx index 7eccd274e7f4..cd981b8d1a87 100644 --- a/cppuhelper/source/servicemanager.cxx +++ b/cppuhelper/source/servicemanager.cxx @@ -1053,7 +1053,7 @@ void cppuhelper::ServiceManager::insert(css::uno::Any const & aElement) if (aElement >>= args) { std::vector< OUString > uris; css::uno::Reference< css::uno::XComponentContext > alienContext; - for (const auto & arg : std::as_const(args)) { + for (const auto & arg : args) { if (arg.Name == "uri") { OUString uri; if (!(arg.Value >>= uri)) { @@ -1097,7 +1097,7 @@ void cppuhelper::ServiceManager::remove(css::uno::Any const & aElement) css::uno::Sequence< css::beans::NamedValue > args; if (aElement >>= args) { std::vector< OUString > uris; - for (const auto & i : std::as_const(args)) { + for (const auto & i : args) { if (i.Name != "uri") { throw css::lang::IllegalArgumentException( "Bad argument " + i.Name, diff --git a/cui/source/customize/SvxConfigPageHelper.cxx b/cui/source/customize/SvxConfigPageHelper.cxx index c14cb3560c9f..59a2cdb64017 100644 --- a/cui/source/customize/SvxConfigPageHelper.cxx +++ b/cui/source/customize/SvxConfigPageHelper.cxx @@ -248,7 +248,7 @@ OUString SvxConfigPageHelper::GetUIModuleName( if (a >>= aSeq) { - for (css::beans::PropertyValue const& rProp : std::as_const(aSeq)) + for (css::beans::PropertyValue const& rProp : aSeq) { if (rProp.Name == "ooSetupFactoryUIName") { @@ -282,7 +282,7 @@ bool SvxConfigPageHelper::GetMenuItemData( css::uno::Sequence<css::beans::PropertyValue> aProps; if (rItemContainer->getByIndex(nIndex) >>= aProps) { - for (css::beans::PropertyValue const& rProp : std::as_const(aProps)) + for (css::beans::PropertyValue const& rProp : aProps) { if (rProp.Name == ITEM_DESCRIPTOR_COMMANDURL) { @@ -325,7 +325,7 @@ bool SvxConfigPageHelper::GetToolbarItemData( css::uno::Sequence<css::beans::PropertyValue> aProps; if (rItemContainer->getByIndex(nIndex) >>= aProps) { - for (css::beans::PropertyValue const& rProp : std::as_const(aProps)) + for (css::beans::PropertyValue const& rProp : aProps) { if (rProp.Name == ITEM_DESCRIPTOR_COMMANDURL) { diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx index f44bc70d3dc0..d41ecf389e59 100644 --- a/cui/source/customize/SvxNotebookbarConfigPage.cxx +++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx @@ -217,7 +217,7 @@ void SvxConfigPage::InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId } OUString aLabel; - for (auto const& prop : std::as_const(aPropSeq)) + for (auto const& prop : aPropSeq) if (prop.Name == "Name") prop.Value >>= aLabel; diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index f8b452193c0a..ff5702121755 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -492,7 +492,7 @@ void SaveInData::LoadSubMenus( const uno::Reference< container::XIndexAccess >& if ( a >>= aPropSeq ) { OUString aMenuLabel; - for ( const beans::PropertyValue& prop : std::as_const(aPropSeq) ) + for (const beans::PropertyValue& prop : aPropSeq) { if ( bContextMenu ) { @@ -723,7 +723,7 @@ OUString ContextMenuSaveInData::GetUIName( const OUString& rResourceURL ) catch ( const css::uno::Exception& ) {} - for ( const auto& aProp : std::as_const(aProps) ) + for (const auto& aProp : aProps) { if ( aProp.Name == ITEM_DESCRIPTOR_UINAME ) { @@ -751,7 +751,7 @@ SvxEntries* ContextMenuSaveInData::GetEntries() catch ( const css::lang::IllegalArgumentException& ) {} - for ( const auto& aElement : std::as_const(aElementsInfo) ) + for (const auto& aElement : aElementsInfo) { OUString aUrl; for ( const auto& aElementProp : aElement ) @@ -799,7 +799,7 @@ SvxEntries* ContextMenuSaveInData::GetEntries() catch ( const css::lang::IllegalArgumentException& ) {} - for ( const auto& aElement : std::as_const(aParentElementsInfo) ) + for (const auto& aElement : aParentElementsInfo) { OUString aUrl; for ( const auto& aElementProp : aElement ) @@ -1203,7 +1203,7 @@ void SvxConfigPage::Reset( const SfxItemSet* ) DBG_UNHANDLED_EXCEPTION("cui.customize"); } - for ( uno::Reference < frame::XFrame > const & xf : std::as_const(aFrameList) ) + for (uno::Reference<frame::XFrame> const& xf : aFrameList) { if ( xf.is() && xf != m_xFrame ) { @@ -2001,7 +2001,7 @@ sal_Int32 ToolbarSaveInData::GetSystemStyle( const OUString& rResourceURL ) if ( a >>= aProps ) { - for ( beans::PropertyValue const & prop : std::as_const(aProps) ) + for (beans::PropertyValue const& prop : aProps) { if ( prop.Name == ITEM_DESCRIPTOR_STYLE ) { @@ -2128,7 +2128,7 @@ OUString ToolbarSaveInData::GetSystemUIName( const OUString& rResourceURL ) if ( a >>= aProps ) { - for ( beans::PropertyValue const & prop : std::as_const(aProps) ) + for (beans::PropertyValue const& prop : aProps) { if ( prop.Name == ITEM_DESCRIPTOR_UINAME ) { @@ -2155,7 +2155,7 @@ OUString ToolbarSaveInData::GetSystemUIName( const OUString& rResourceURL ) uno::Sequence< beans::PropertyValue > aPropSeq; if ( a >>= aPropSeq ) { - for ( beans::PropertyValue const & prop : std::as_const(aPropSeq) ) + for (beans::PropertyValue const& prop : aPropSeq) { if ( prop.Name == ITEM_DESCRIPTOR_LABEL ) { @@ -2657,7 +2657,7 @@ void ToolbarSaveInData::LoadToolbar( uno::Sequence< beans::PropertyValue > aPropSeq; if ( a >>= aPropSeq ) { - for ( beans::PropertyValue const & prop : std::as_const(aPropSeq) ) + for (beans::PropertyValue const& prop : aPropSeq) { if ( prop.Name == "Name" ) { diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 54cdc56d26e1..67bb456b7d61 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -147,7 +147,7 @@ void SvxScriptOrgDialog::Init( std::u16string_view language ) } Reference<XModel> xDocumentModel; - for ( const Reference< browse::XBrowseNode >& childNode : std::as_const(children) ) + for (const Reference<browse::XBrowseNode>& childNode : children) { bool app = false; OUString uiName = childNode->getName(); @@ -178,7 +178,7 @@ void SvxScriptOrgDialog::Init( std::u16string_view language ) } catch(const uno::Exception&) {} - for ( const beans::PropertyValue& prop : std::as_const(moduleDescr)) + for (const beans::PropertyValue& prop : moduleDescr) { if ( prop.Name == "ooSetupFactoryEmptyDocumentURL" ) { @@ -278,7 +278,7 @@ void SvxScriptOrgDialog::RequestSubEntries(const weld::TreeIter& rRootEntry, Ref // if we catch an exception in getChildNodes then no entries are added } - for ( const Reference< browse::XBrowseNode >& childNode : std::as_const(children) ) + for (const Reference<browse::XBrowseNode>& childNode : children) { OUString name( childNode->getName() ); if ( childNode->getType() != browse::BrowseNodeTypes::SCRIPT) @@ -751,7 +751,7 @@ void SvxScriptOrgDialog::createEntry(const weld::TreeIter& rEntry) if(extnPos>0) extn = nodeName.copy(extnPos); } - for( const Reference< browse::XBrowseNode >& n : std::as_const(childNodes) ) + for (const Reference<browse::XBrowseNode>& n : childNodes) { if (Concat2View(aNewName+extn) == n->getName()) { @@ -778,7 +778,7 @@ void SvxScriptOrgDialog::createEntry(const weld::TreeIter& rEntry) { OUString aUserSuppliedName = aNewDlg.GetObjectName(); bValid = true; - for( const Reference< browse::XBrowseNode >& n : std::as_const(childNodes) ) + for (const Reference<browse::XBrowseNode>& n : childNodes) { if (Concat2View(aUserSuppliedName+extn) == n->getName()) { diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx index 91526e587cbd..5cccccf1995c 100644 --- a/cui/source/options/certpath.cxx +++ b/cui/source/options/certpath.cxx @@ -60,7 +60,7 @@ void CertPathDialog::Init() "thunderbird" }; - for (const auto& rNSSProfile : std::as_const(aProductList)) + for (const auto& rNSSProfile : aProductList) { if (rNSSProfile.Type == mozilla::MozillaProductType_Default) { diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index f95015c03025..4ec9bd987462 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -647,7 +647,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() : } Sequence< OUString > aCfgSvcs; - for(auto const & locale : std::as_const(aAllServiceLocales)) + for (auto const& locale : aAllServiceLocales) { LanguageType nLang = LanguageTag::convertToLanguageType( locale ); diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index a94560f1b0c4..79f0b210e4ea 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -453,7 +453,7 @@ void ODatabaseContext::storeTransientProperties( ODatabaseModelImpl& _rModelImpl if (xSetInfo.is()) aProperties = xSetInfo->getProperties(); - for ( const Property& rProperty : std::as_const(aProperties) ) + for (const Property& rProperty : aProperties) { if ( ( ( rProperty.Attributes & PropertyAttribute::TRANSIENT) != 0 ) && ( ( rProperty.Attributes & PropertyAttribute::READONLY) == 0 ) diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index 180ecff77766..fbb0ac1bd86b 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -798,7 +798,7 @@ sal_Bool ODatabaseSource::convertFastPropertyValue(Any & rConvertedValue, Any & if (!(rValue >>= aValues)) throw IllegalArgumentException(); - for ( auto const & checkName : std::as_const(aValues) ) + for (auto const& checkName : aValues) { if ( checkName.Name.isEmpty() ) throw IllegalArgumentException(); diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index cee5e04a04f4..13d0887b0caa 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -596,7 +596,7 @@ template< typename T > void ODBExport::exportDataSourceSettingsSequence( css::uno::Sequence<T> anySeq; bool bSuccess = in->Value >>= anySeq; assert(bSuccess); (void)bSuccess; - for (T const & i : std::as_const(anySeq) ) + for (T const& i : anySeq) { SvXMLElementExport aDataValue(*this,XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING_VALUE, true, false); // (no whitespace inside the tag) diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx index a34e67a241f2..dbad8365ffbf 100644 --- a/dbaccess/source/ui/browser/exsrcbrw.cxx +++ b/dbaccess/source/ui/browser/exsrcbrw.cxx @@ -158,7 +158,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const css::util::URL& aURL, con // set its properties if (xNewColProperties.is()) { - for (const css::beans::PropertyValue& rControlProp : std::as_const(aControlProps)) + for (const css::beans::PropertyValue& rControlProp : aControlProps) { try { diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 94cdee5a9f05..a2e6d009fc78 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -613,7 +613,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPr // collect the names of the additional settings PropertyValueSet aInfos; - for (const PropertyValue& rAdditionalInfo : std::as_const(aAdditionalInfo)) + for (const PropertyValue& rAdditionalInfo : aAdditionalInfo) { if( rAdditionalInfo.Name == "JDBCDRV" ) { // compatibility diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index d08e1f076d26..a6474645b374 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -882,7 +882,7 @@ bool appendToFilter(const Reference<XConnection>& _xConnection, xProp->getPropertyValue(PROPERTY_TABLEFILTER) >>= aFilter; // first check if we have something like SCHEMA.% bool bHasToInsert = true; - for (const OUString& rItem : std::as_const(aFilter)) + for (const OUString& rItem : aFilter) { if(rItem.indexOf('%') != -1) { diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx index 4a69a8cf79cc..58e2375c6537 100644 --- a/desktop/source/app/check_ext_deps.cxx +++ b/desktop/source/app/check_ext_deps.cxx @@ -261,7 +261,7 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext sal_Int32 const nMax = 2; #endif - for ( uno::Sequence< uno::Reference< deployment::XPackage > > const & xPackageList : std::as_const(xAllPackages) ) + for (uno::Sequence<uno::Reference<deployment::XPackage>> const& xPackageList : xAllPackages) { for ( sal_Int32 j = 0; (j<nMax) && (j < xPackageList.getLength()); ++j ) { diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index fd70b79822ca..c91ec4a0b132 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -363,7 +363,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & { std::vector< OUString > deps; deps.reserve(depExc.UnsatisfiedDependencies.getLength()); - for (auto const & i : std::as_const(depExc.UnsatisfiedDependencies)) + for (auto const& i : depExc.UnsatisfiedDependencies) { deps.push_back( dp_misc::Dependencies::getErrorText(i) ); } diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index e7f91f44abf0..7e8bb6a455eb 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -148,7 +148,7 @@ void Entry_Impl::checkDependencies() if ( e.Cause >>= depExc ) { OUStringBuffer aMissingDep( DpResId( RID_STR_ERROR_MISSING_DEPENDENCIES ) ); - for ( const auto& i : std::as_const(depExc.UnsatisfiedDependencies) ) + for (const auto& i : depExc.UnsatisfiedDependencies) { aMissingDep.append("\n" + dp_misc::Dependencies::getErrorText(i)); diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx index ac42a446c67c..8cf6623d9676 100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx @@ -223,7 +223,7 @@ void TheExtensionManager::checkUpdates() e.Context, anyEx ); } - for ( auto const & i : std::as_const(xAllPackages) ) + for (auto const& i : xAllPackages) { uno::Reference< deployment::XPackage > xPackage = dp_misc::getExtensionWithHighestVersion(i); OSL_ASSERT(xPackage.is()); @@ -306,7 +306,7 @@ void TheExtensionManager::createPackageList() e.Context, anyEx ); } - for ( uno::Sequence< uno::Reference< deployment::XPackage > > const & xPackageList : std::as_const(xAllPackages) ) + for (uno::Sequence<uno::Reference<deployment::XPackage>> const& xPackageList : xAllPackages) { for ( uno::Reference< deployment::XPackage > const & xPackage : xPackageList ) { diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index cbaa66024596..52d5d4e91c23 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5933,9 +5933,9 @@ static char* getLanguages(const char* pCommand) boost::property_tree::ptree aTree; aTree.put("commandName", pCommand); boost::property_tree::ptree aValues; - for ( css::lang::Locale const & rLocale : std::as_const(aLocales) ) + for (css::lang::Locale const& rLocale : aLocales) addLocale(aValues, rLocale); - for ( css::lang::Locale const & rLocale : std::as_const(aGrammarLocales) ) + for (css::lang::Locale const& rLocale : aGrammarLocales) addLocale(aValues, rLocale); aTree.add_child("commandValues", aValues); std::stringstream aStream; @@ -7448,7 +7448,7 @@ static void preloadData() std::cerr << "Preloading dictionaries: "; css::uno::Reference<linguistic2::XSupportedLocales> xSpellLocales(xSpellChecker, css::uno::UNO_QUERY_THROW); uno::Sequence< css::lang::Locale > aLocales = xSpellLocales->getLocales(); - for (auto &it : std::as_const(aLocales)) + for (auto& it : aLocales) { std::cerr << LanguageTag::convertToBcp47(it) << " "; css::beans::PropertyValues aNone; @@ -7469,7 +7469,7 @@ static void preloadData() css::uno::Reference<linguistic2::XSupportedLocales> xThesLocales(xSpellChecker, css::uno::UNO_QUERY_THROW); aLocales = xThesLocales->getLocales(); std::cerr << "Preloading thesauri: "; - for (auto &it : std::as_const(aLocales)) + for (auto& it : aLocales) { std::cerr << LanguageTag::convertToBcp47(it) << " "; css::beans::PropertyValues aNone; @@ -7505,7 +7505,7 @@ static void preloadData() aLocales = xSpell->getLocales(); } - for (const auto& aLocale : std::as_const(aLocales)) + for (const auto& aLocale : aLocales) { //TODO: Add more types and cache more aggressively. For now this initializes the fontcache. using namespace ::com::sun::star::i18n::ScriptType; diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index b0728de61a7a..d6b52c806367 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -320,7 +320,7 @@ void MigrationImpl::readAvailableMigrations(migrations_available& rAvailableMigr supported_migration aSupportedMigration; aSupportedMigration.name = supportedVersion; aSupportedMigration.nPriority = nPriority; - for (OUString const & s : std::as_const(seqVersions)) + for (OUString const& s : seqVersions) aSupportedMigration.supported_versions.push_back(s.trim()); insertSorted( rAvailableMigrations, aSupportedMigration ); SAL_INFO( "desktop.migration", " available migration '" << aSupportedMigration.name << "'" ); @@ -347,31 +347,31 @@ migrations_vr MigrationImpl::readMigrationSteps(const OUString& rMigrationName) // read included files from current step description if (tmpAccess->getByName("IncludedFiles") >>= tmpSeq) { - for (const OUString& rSeqEntry : std::as_const(tmpSeq)) + for (const OUString& rSeqEntry : tmpSeq) tmpStep.includeFiles.push_back(rSeqEntry); } // excluded files... if (tmpAccess->getByName("ExcludedFiles") >>= tmpSeq) { - for (const OUString& rSeqEntry : std::as_const(tmpSeq)) + for (const OUString& rSeqEntry : tmpSeq) tmpStep.excludeFiles.push_back(rSeqEntry); } // included nodes... if (tmpAccess->getByName("IncludedNodes") >>= tmpSeq) { - for (const OUString& rSeqEntry : std::as_const(tmpSeq)) + for (const OUString& rSeqEntry : tmpSeq) tmpStep.includeConfig.push_back(rSeqEntry); } // excluded nodes... if (tmpAccess->getByName("ExcludedNodes") >>= tmpSeq) { - for (const OUString& rSeqEntry : std::as_const(tmpSeq)) + for (const OUString& rSeqEntry : tmpSeq) tmpStep.excludeConfig.push_back(rSeqEntry); } // excluded extensions... if (tmpAccess->getByName("ExcludedExtensions") >>= tmpSeq) { - for (const OUString& rSeqEntry : std::as_const(tmpSeq)) + for (const OUString& rSeqEntry : tmpSeq) tmpStep.excludeExtensions.push_back(rSeqEntry); } @@ -977,7 +977,7 @@ void MigrationImpl::compareOldAndNewConfig(const OUString& sParent, for (int n=0; n<nOldCount; ++n) { MigrationItem aMigrationItem; if (xIndexOld->getByIndex(n) >>= aProps) { - for(beans::PropertyValue const & prop : std::as_const(aProps)) { + for(beans::PropertyValue const & prop : aProps) { if ( prop.Name == ITEM_DESCRIPTOR_COMMANDURL ) prop.Value >>= aMigrationItem.m_sCommandURL; else if ( prop.Name == ITEM_DESCRIPTOR_CONTAINER ) @@ -992,7 +992,7 @@ void MigrationImpl::compareOldAndNewConfig(const OUString& sParent, for (int n=0; n<nNewCount; ++n) { MigrationItem aMigrationItem; if (xIndexNew->getByIndex(n) >>= aProps) { - for(beans::PropertyValue const & prop : std::as_const(aProps)) { + for(beans::PropertyValue const & prop : aProps) { if ( prop.Name == ITEM_DESCRIPTOR_COMMANDURL ) prop.Value >>= aMigrationItem.m_sCommandURL; else if ( prop.Name == ITEM_DESCRIPTOR_CONTAINER ) @@ -1059,7 +1059,7 @@ void MigrationImpl::mergeOldToNewVersion(const uno::Reference< ui::XUIConfigurat uno::Sequence< beans::PropertyValue > aPropSeq; xTemp->getByIndex(i) >>= aPropSeq; - for (beans::PropertyValue const & prop : std::as_const(aPropSeq)) { + for (beans::PropertyValue const & prop : aPropSeq) { OUString sPropName = prop.Name; if ( sPropName == ITEM_DESCRIPTOR_COMMANDURL ) prop.Value >>= sCommandURL; @@ -1094,7 +1094,7 @@ void MigrationImpl::mergeOldToNewVersion(const uno::Reference< ui::XUIConfigurat OUString sCmd; uno::Sequence< beans::PropertyValue > aTempPropSeq; xTemp->getByIndex(i) >>= aTempPropSeq; - for (beans::PropertyValue const & prop : std::as_const(aTempPropSeq)) { + for (beans::PropertyValue const & prop : aTempPropSeq) { if ( prop.Name == ITEM_DESCRIPTOR_COMMANDURL ) { prop.Value >>= sCmd; break; @@ -1154,7 +1154,7 @@ uno::Reference< container::XIndexContainer > NewVersionUIInfo::getNewToolbarSett if (newProp.Name == sModuleShortName) { uno::Sequence< beans::PropertyValue > lToolbarSettingsSeq; newProp.Value >>= lToolbarSettingsSeq; - for (auto const & prop : std::as_const(lToolbarSettingsSeq)) { + for (auto const & prop : lToolbarSettingsSeq) { if (prop.Name == sToolbarName) { prop.Value >>= xNewToolbarSettings; break; diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index a4d0ca950b92..e504d0fa29a7 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -2384,7 +2384,7 @@ namespace accessibility uno::Sequence< beans::PropertyValue > aOutSequence( aProperties.getLength() ); beans::PropertyValue* pOutSequence = aOutSequence.getArray(); sal_Int32 nOutLen = 0; - for (const beans::Property& rProperty : std::as_const(aProperties)) + for (const beans::Property& rProperty : aProperties) { // calling implementation functions: // _getPropertyState and _getPropertyValue (see below) to provide @@ -2470,7 +2470,7 @@ namespace accessibility uno::Sequence< beans::PropertyValue > aOutSequence( aProperties.getLength() ); beans::PropertyValue* pOutSequence = aOutSequence.getArray(); sal_Int32 nOutLen = 0; - for (const beans::Property& rProperty : std::as_const(aProperties)) + for (const beans::Property& rProperty : aProperties) { // calling 'regular' functions that will operate on the selection PropertyState eState = xPropSet->getPropertyState( rProperty.Name ); diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index ef627941921e..0b3843852e58 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.cxx @@ -513,7 +513,7 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState ) StateChangeNotification_Impl( true, nOldState, nNewState,aGuard ); try { - for ( sal_Int32 state : std::as_const(aIntermediateStates) ) + for (sal_Int32 state : aIntermediateStates) SwitchStateTo_Impl( state ); SwitchStateTo_Impl( nNewState ); diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx index 3ccaafcdc286..f34a35a2c1ac 100644 --- a/embeddedobj/source/commonembedding/miscobj.cxx +++ b/embeddedobj/source/commonembedding/miscobj.cxx @@ -140,7 +140,7 @@ void OCommonEmbeddedObject::CommonInit_Impl( const uno::Sequence< beans::NamedVa throw uno::RuntimeException(); // something goes really wrong // verbs table - for ( auto const & verb : std::as_const(m_aObjectVerbs) ) + for (auto const& verb : m_aObjectVerbs) { if ( verb.VerbID == embed::EmbedVerbs::MS_OLEVERB_PRIMARY ) { diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx index 1460b31fd54b..cdc6d94b351b 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.cxx @@ -275,7 +275,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta // check if there is URL, URL must exist OUString aURL; - for ( beans::PropertyValue const & prop : std::as_const(aTempMedDescr) ) + for (beans::PropertyValue const& prop : aTempMedDescr) if ( prop.Name == "URL" ) prop.Value >>= aURL; @@ -332,7 +332,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta uno::Sequence< beans::PropertyValue > aTempMedDescr( lArguments ); OUString aURL; - for ( beans::PropertyValue const & prop : std::as_const(aTempMedDescr) ) + for (beans::PropertyValue const& prop : aTempMedDescr) if ( prop.Name == "URL" ) prop.Value >>= aURL; diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 824ee2c1d4c9..08ad9cfdd271 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -561,7 +561,7 @@ void DocumentHolder::FindConnectPoints( uno::Sequence< beans::PropertyValue > aProps; xMenu->getByIndex( nInd ) >>= aProps; OUString aCommand; - for ( beans::PropertyValue const & prop : std::as_const(aProps) ) + for (beans::PropertyValue const& prop : aProps) if ( prop.Name == "CommandURL" ) { prop.Value >>= aCommand; diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index c9151827a65f..bceaab63c752 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -349,7 +349,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // check if there is URL, URL must exist OUString aURL; - for ( beans::PropertyValue const & prop : std::as_const(aTempMedDescr) ) + for (beans::PropertyValue const& prop : aTempMedDescr) if ( prop.Name == "URL" ) prop.Value >>= aURL; diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx index f981a4304656..a38f59550c5e 100644 --- a/embeddedobj/source/msole/olecomponent.cxx +++ b/embeddedobj/source/msole/olecomponent.cxx @@ -248,7 +248,7 @@ bool OleComponentNative_Impl::ConvertDataForFlavor( const STGMEDIUM& aMedium, if ( pBuf && !bAnyIsReady ) { - for ( auto const & supportedFormat : std::as_const(m_aSupportedGraphFormats) ) + for (auto const& supportedFormat : m_aSupportedGraphFormats) if ( aFlavor.MimeType.match( supportedFormat.MimeType ) && aFlavor.DataType == supportedFormat.DataType && aFlavor.DataType == cppu::UnoType<uno::Sequence< sal_Int8 >>::get() ) @@ -266,7 +266,7 @@ bool OleComponentNative_Impl::ConvertDataForFlavor( const STGMEDIUM& aMedium, bool OleComponentNative_Impl::GraphicalFlavor( const datatransfer::DataFlavor& aFlavor ) { // Actually all the required graphical formats must be supported - for ( auto const & supportedFormat : std::as_const(m_aSupportedGraphFormats) ) + for (auto const& supportedFormat : m_aSupportedGraphFormats) if ( aFlavor.MimeType.match( supportedFormat.MimeType ) && aFlavor.DataType == supportedFormat.DataType ) return true; @@ -1559,7 +1559,7 @@ sal_Bool SAL_CALL OleComponent::isDataFlavorSupported( const datatransfer::DataF RetrieveObjectDataFlavors_Impl(); } - for ( auto const & supportedFormat : std::as_const(m_aDataFlavors) ) + for (auto const& supportedFormat : m_aDataFlavors) if ( supportedFormat.MimeType.equals( aFlavor.MimeType ) && supportedFormat.DataType == aFlavor.DataType ) return true; diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 2bc6cdb6066b..8379a78693f1 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -277,7 +277,7 @@ bool OleEmbeddedObject::TryToConvertToOOo( const uno::Reference< io::XStream >& uno::Sequence< beans::PropertyValue > aFilterData; if ( aFilterAnyData >>= aFilterData ) { - for ( beans::PropertyValue const & prop : std::as_const(aFilterData) ) + for (beans::PropertyValue const& prop : aFilterData) if ( prop.Name == "DocumentService" ) prop.Value >>= aDocServiceName; } diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx index 5576f8633cce..66dcab3b45fd 100644 --- a/embeddedobj/source/msole/ownview.cxx +++ b/embeddedobj/source/msole/ownview.cxx @@ -207,7 +207,7 @@ OUString OwnView_Impl::GetFilterNameFromExtentionAndInStream( aTypeName = xTypeDetection->queryTypeByDescriptor( aArgs, true ); OUString aFilterName; - for ( beans::PropertyValue const & prop : std::as_const(aArgs) ) + for (beans::PropertyValue const& prop : aArgs) if ( prop.Name == "FilterName" ) prop.Value >>= aFilterName; @@ -219,7 +219,7 @@ OUString OwnView_Impl::GetFilterNameFromExtentionAndInStream( if ( xNameAccess.is() && ( xNameAccess->getByName( aTypeName ) >>= aTypes ) ) { - for ( beans::PropertyValue const & prop : std::as_const(aTypes) ) + for (beans::PropertyValue const& prop : aTypes) { if ( prop.Name == "PreferredFilter" && ( prop.Value >>= aFilterName ) ) { diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index 12300b856517..829db69b91d4 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/docholder.cxx @@ -918,7 +918,7 @@ void DocumentHolder::setTitle(const OUString& aDocumentName) if(m_xDocument.is()) { aSeq = m_xDocument->getArgs(); - for(beans::PropertyValue const & prop : std::as_const(aSeq)) + for (beans::PropertyValue const& prop : aSeq) { if(prop.Name == "FilterName") { @@ -937,7 +937,7 @@ void DocumentHolder::setTitle(const OUString& aDocumentName) if(xNameAccess.is() && (xNameAccess->getByName(aFilterName) >>= aSeq)) { - for(beans::PropertyValue const & prop : std::as_const(aSeq)) + for (beans::PropertyValue const& prop : aSeq) if(prop.Name == "UIName") { prop.Value >>= m_aFilterName; diff --git a/embedserv/source/embed/intercept.cxx b/embedserv/source/embed/intercept.cxx index 0f1566fd780d..d321bbfa476c 100644 --- a/embedserv/source/embed/intercept.cxx +++ b/embedserv/source/embed/intercept.cxx @@ -233,7 +233,7 @@ void Interceptor::generateFeatureStateEvent() } - for(uno::Reference<css::frame::XStatusListener> const & control : std::as_const(aSeq)) + for (uno::Reference<css::frame::XStatusListener> const& control : aSeq) control->statusChanged(aStateEvent); } } diff --git a/extensions/qa/bibliography/bibliography.cxx b/extensions/qa/bibliography/bibliography.cxx index af68ee95eb70..3919b787f3fe 100644 --- a/extensions/qa/bibliography/bibliography.cxx +++ b/extensions/qa/bibliography/bibliography.cxx @@ -39,7 +39,7 @@ CPPUNIT_TEST_FIXTURE(Test, testBibliographyLoader) // Without the accompanying fix in place, this test would have failed, as the last column // (LOCAL_URL) had an empty field name: - for (const auto& rPair : std::as_const(aSeq)) + for (const auto& rPair : aSeq) { CPPUNIT_ASSERT(!rPair.Name.isEmpty()); } diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx index cba844932134..92a4c6843ec1 100644 --- a/extensions/source/bibliography/general.cxx +++ b/extensions/source/bibliography/general.cxx @@ -851,7 +851,7 @@ bool BibGeneralPage::AddXControl(const OUString& rName, weld::ComboBox& rList) { css::uno::Sequence<OUString> aEntries; xPropSet->getPropertyValue("StringItemList") >>= aEntries; - for (const OUString& rString : std::as_const(aEntries)) + for (const OUString& rString : aEntries) rList.append_text(rString); sal_Int16 nSelection = -1; diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index 85f410c54604..160b094acb64 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -1550,7 +1550,7 @@ TypeDescription IUnknownWrapper::getInterfaceMemberDescOfCurrentCall(std::u16str { TypeDescription ret; - for( auto const & rType : std::as_const(m_seqTypes) ) + for (auto const& rType : m_seqTypes) { TypeDescription _curDesc( rType ); _curDesc.makeComplete(); diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index ef79ad923001..40514f8016dd 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -278,7 +278,7 @@ namespace pcr aResolvedStrings.reserve( aStrings.getLength() ); try { - for ( const OUString& rIdStr : std::as_const(aStrings) ) + for (const OUString& rIdStr : aStrings) { OUString aPureIdStr = rIdStr.copy( 1 ); if( xStringResourceResolver->hasEntryForId( aPureIdStr ) ) @@ -331,7 +331,7 @@ namespace pcr if( ! (_rValue >>= aFontPropertyValues) ) SAL_WARN("extensions.propctrlr", "setPropertyValue: unable to get property " << PROPERTY_ID_FONT); - for ( const NamedValue& fontPropertyValue : std::as_const(aFontPropertyValues) ) + for (const NamedValue& fontPropertyValue : aFontPropertyValues) m_xComponent->setPropertyValue( fontPropertyValue.Name, fontPropertyValue.Value ); } else @@ -444,7 +444,7 @@ namespace pcr aValue <<= aNewIdStrings; // Remove old ids from resource for all locales - for( const OUString& rIdStr : std::as_const(aOldIdStrings) ) + for (const OUString& rIdStr : aOldIdStrings) { OUString aPureIdStr = rIdStr.copy( 1 ); for ( const Locale& rLocale : aLocaleSeq ) diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx index cf359bc152d8..322bc3405143 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.cxx +++ b/extensions/source/propctrlr/genericpropertyhandler.cxx @@ -458,7 +458,7 @@ namespace pcr aProperties = xPSI->getProperties(); DBG_ASSERT( aProperties.hasElements(), "GenericPropertyHandler::getSupportedProperties: no properties!" ); - for ( auto const & property : std::as_const(aProperties) ) + for (auto const& property : aProperties) { switch ( property.Type.getTypeClass() ) { diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index 836f5844e38d..296eb98d1129 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -1401,7 +1401,7 @@ namespace pcr if ( m_xModel.is() ) aHandlerFactories = m_xModel->getHandlerFactories(); - for ( auto const & handlerFactory : std::as_const(aHandlerFactories) ) + for (auto const& handlerFactory : aHandlerFactories) { if ( _rObjects.size() == 1 ) { // we're inspecting only one object -> one handler diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index 299a4f215f49..a5c6429aee69 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -865,7 +865,7 @@ bool UpdateHandler::showWarning( const OUString &rWarningText, { uno::Sequence< uno::Reference< awt::XWindow > > xChildren = xMsgBoxCtrls->getWindows(); - for ( uno::Reference< awt::XWindow > const & child : std::as_const(xChildren) ) + for (uno::Reference<awt::XWindow> const& child : xChildren) { uno::Reference< awt::XVclWindowPeer > xMsgBoxCtrl( child, uno::UNO_QUERY ); if ( xMsgBoxCtrl.is() ) diff --git a/filter/source/graphic/GraphicExportFilter.cxx b/filter/source/graphic/GraphicExportFilter.cxx index ee5843066ad5..224c4b2b0794 100644 --- a/filter/source/graphic/GraphicExportFilter.cxx +++ b/filter/source/graphic/GraphicExportFilter.cxx @@ -90,7 +90,7 @@ void GraphicExportFilter::gatherProperties( const uno::Sequence< beans::Property } } - for ( const beans::PropertyValue& rProp : std::as_const(maFilterDataSequence) ) + for (const beans::PropertyValue& rProp : maFilterDataSequence) { if ( rProp.Name == "PixelWidth" ) { diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 480b3dfe42f5..03346d727dc6 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -164,7 +164,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, if ( xPropInfo.is() && xPropInfo->hasPropertyByName( "InteropGrabBag" ) ) { xPropertySet->getPropertyValue( "InteropGrabBag" ) >>= aGrabBag; - for (const beans::PropertyValue& rProp : std::as_const(aGrabBag)) + for (const beans::PropertyValue& rProp : aGrabBag) { if (rProp.Name == "mso-edit-as") { diff --git a/filter/source/pdf/pdfdialog.cxx b/filter/source/pdf/pdfdialog.cxx index c7dd241c2049..a5c9e8aaa007 100644 --- a/filter/source/pdf/pdfdialog.cxx +++ b/filter/source/pdf/pdfdialog.cxx @@ -138,7 +138,7 @@ void SAL_CALL PDFDialog::setPropertyValues( const Sequence< PropertyValue >& rPr { maMediaDescriptor = rProps; - for( const PropertyValue& rProp : std::as_const(maMediaDescriptor) ) + for (const PropertyValue& rProp : maMediaDescriptor) { if ( rProp.Name == "FilterData" ) { diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 9f7328c113f2..70474a7fd140 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -328,7 +328,7 @@ static OUString getMimetypeForDocument( const Reference< XComponentContext >& xC Sequence< beans::PropertyValue > aFilterData; xFilterFactory->getByName( aFilterName ) >>= aFilterData; - for ( const beans::PropertyValue& rProp : std::as_const(aFilterData) ) + for (const beans::PropertyValue& rProp : aFilterData) if ( rProp.Name == "Type" ) rProp.Value >>= aTypeName; @@ -341,7 +341,7 @@ static OUString getMimetypeForDocument( const Reference< XComponentContext >& xC Sequence< beans::PropertyValue > aTypeData; xTypeDetection->getByName( aTypeName ) >>= aTypeData; - for ( const beans::PropertyValue& rProp : std::as_const(aTypeData) ) + for (const beans::PropertyValue& rProp : aTypeData) if ( rProp.Name == "MediaType" ) rProp.Value >>= aDocMimetype; } diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index 068132df6bad..e89ecc2d13d3 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -310,7 +310,7 @@ void XMLFilterTestDialog::onExportBrowse() int nFound = 0; - for( const PropertyValue& rValue : std::as_const(aValues) ) + for (const PropertyValue& rValue : aValues) { if ( rValue.Name == "Type" ) { @@ -348,7 +348,7 @@ void XMLFilterTestDialog::onExportBrowse() if( aAny >>= aValues2 ) { OUString aExtension; - for( const PropertyValue& rProp : std::as_const(aValues2) ) + for (const PropertyValue& rProp : aValues2) { if ( rProp.Name == "Extensions" ) { diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx index 44dcf41dcdc5..a037a2ccfeb9 100644 --- a/filter/source/xsltfilter/LibXSLTTransformer.cxx +++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx @@ -521,7 +521,7 @@ namespace XSLT #endif m_parameters.clear(); - for (const Any& p : std::as_const(params)) + for (const Any& p : params) { NamedValue nv; p >>= nv; diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index eaeaf9f84a0b..c8e762c62d1d 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -413,7 +413,7 @@ void SAL_CALL OComboBoxModel::read(const Reference<css::io::XObjectInputStream>& m_aListSource.clear(); css::uno::Sequence<OUString> aListSource; _rxInStream >> aListSource; - for (const OUString& rToken : std::as_const(aListSource)) + for (const OUString& rToken : aListSource) m_aListSource += rToken; } @@ -763,7 +763,7 @@ bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset ) return true; bool bFound = false; - for (const OUString& rStringItem : std::as_const(aStringItemList)) + for (const OUString& rStringItem : aStringItemList) { if ( (bFound = rStringItem == sNewValue) ) break; diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index e18ca14628c1..a5ae6c07cec4 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -2368,7 +2368,7 @@ bool OBoundControlModel::impl_approveValueBinding_nolock( const Reference< XValu // < SYNCHRONIZED } - for ( auto const & type : std::as_const(aTypeCandidates) ) + for (auto const& type : aTypeCandidates) { if ( _rxBinding->supportsType( type ) ) return true; diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 79d6be399d6b..33d31180315c 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -1416,7 +1416,7 @@ namespace frm ::std::set< sal_Int16 > aSelectionSet; // find the selection entries in our item list - for ( OUString const & selectEntry : std::as_const(aSelectEntries) ) + for (OUString const& selectEntry : aSelectEntries) { int idx = 0; for(const OUString& s : getStringItemList()) diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx index 4b3cb5942760..6cde40fb48cd 100644 --- a/fpicker/source/office/OfficeControlAccess.cxx +++ b/fpicker/source/office/OfficeControlAccess.cxx @@ -500,7 +500,7 @@ namespace svt if ( aTemplateList.hasElements() ) { - for ( const OUString& s : std::as_const(aTemplateList) ) + for (const OUString& s : aTemplateList) pListbox->append_text( s ); } } @@ -606,7 +606,7 @@ namespace svt pComboBox->clear(); // add the new ones - for (auto const & item : std::as_const(aItems)) + for (auto const& item : aItems) { pComboBox->append_text(item); } diff --git a/framework/source/dispatch/dispatchdisabler.cxx b/framework/source/dispatch/dispatchdisabler.cxx index 2341d0dd6439..b09e6109459f 100644 --- a/framework/source/dispatch/dispatchdisabler.cxx +++ b/framework/source/dispatch/dispatchdisabler.cxx @@ -29,7 +29,7 @@ void SAL_CALL DispatchDisabler::initialize( const uno::Sequence< uno::Any >& aAr if( aArguments.hasElements() && ( aArguments[0] >>= aDisabledURLs ) ) { - for( OUString const & url : std::as_const(aDisabledURLs) ) + for (OUString const& url : aDisabledURLs) maDisabledURLs.insert(url); } } diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index 7801fa5e8175..160155ccf8bb 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -1392,7 +1392,7 @@ void AddonsOptions_Impl::AppendPopupMenu( Sequence< PropertyValue >& rTargetPopu sal_uInt32 nIndex = aTargetSubMenuSeq.getLength(); aTargetSubMenuSeq.realloc( nIndex + aSourceSubMenuSeq.getLength() ); auto pTargetSubMenuSeq = aTargetSubMenuSeq.getArray(); - for ( Sequence<PropertyValue> const & rSeq : std::as_const(aSourceSubMenuSeq) ) + for (Sequence<PropertyValue> const& rSeq : aSourceSubMenuSeq) pTargetSubMenuSeq[nIndex++] = rSeq; rTargetPopupMenu.getArray()[ OFFSET_POPUPMENU_SUBMENU ].Value <<= aTargetSubMenuSeq; } diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index b915e3f82a26..bd122e6f683f 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -532,7 +532,7 @@ bool LayoutManager::readWindowStateData( const OUString& aName, UIElement& rElem if ( rPersistentWindowState->hasByName( aName ) && (rPersistentWindowState->getByName( aName ) >>= aWindowState) ) { bool bValue( false ); - for ( PropertyValue const & rProp : std::as_const(aWindowState) ) + for (PropertyValue const& rProp : aWindowState) { if ( rProp.Name == WINDOWSTATE_PROPERTY_DOCKED ) { @@ -2483,7 +2483,7 @@ void LayoutManager::implts_createMSCompatibleMenuBar( const OUString& aName ) uno::Sequence< beans::PropertyValue > aProps; xMenuIndex->getByIndex( nIndex ) >>= aProps; OUString aCommand; - for ( beans::PropertyValue const & rProp : std::as_const(aProps) ) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "CommandURL") { diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 846b111d5825..fe14de710ed7 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -3130,7 +3130,7 @@ void ToolbarLayoutManager::implts_renumberRowColumnData( ui::DockingArea nDockedArea( ui::DockingArea_DOCKINGAREA_DEFAULT ); xPersistentWindowState->getByName( rWindowElementName ) >>= aPropValueSeq; - for ( beans::PropertyValue const & rProp : std::as_const(aPropValueSeq) ) + for (beans::PropertyValue const& rProp : aPropValueSeq) { if ( rProp.Name == WINDOWSTATE_PROPERTY_DOCKINGAREA ) rProp.Value >>= nDockedArea; diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx index cdbd647c3108..2ab1a381f9e4 100644 --- a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx +++ b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx @@ -144,7 +144,7 @@ Reference< XUIConfigurationManager > SAL_CALL ModuleUIConfigurationManagerSuppli { Sequence< PropertyValue > lProps; m_xModuleMgr->getByName(sModuleIdentifier) >>= lProps; - for (PropertyValue const & rProp : std::as_const(lProps)) + for (PropertyValue const& rProp : lProps) { if ( rProp.Name == "ooSetupFactoryShortName" ) { diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx index be600fae3c46..504ef4c97808 100644 --- a/framework/source/uiconfiguration/windowstateconfiguration.cxx +++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx @@ -1287,12 +1287,12 @@ WindowStateConfiguration::WindowStateConfiguration( const Reference< XComponentC } Sequence< PropertyValue > aSeq; - for ( OUString const & aModuleIdentifier : std::as_const(aElementNames) ) + for (OUString const& aModuleIdentifier : aElementNames) { if ( xModuleManager->getByName( aModuleIdentifier ) >>= aSeq ) { OUString aWindowStateFileStr; - for ( PropertyValue const & rProp : std::as_const(aSeq) ) + for (PropertyValue const& rProp : aSeq) { if ( rProp.Name == "ooSetupFactoryWindowStateConfigRef" ) { diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx index 77d6e3e8c839..54285626ba70 100644 --- a/framework/source/uielement/comboboxtoolbarcontroller.cxx +++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx @@ -245,7 +245,7 @@ void ComboboxToolbarController::executeControlCommand( const css::frame::Control m_pComboBox->clear(); rArg.Value >>= aList; - for (OUString const & rName : std::as_const(aList)) + for (OUString const& rName : aList) m_pComboBox->append_text(rName); // send notification diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx index c3f9f191df0e..3938974c2a0f 100644 --- a/framework/source/uielement/complextoolbarcontroller.cxx +++ b/framework/source/uielement/complextoolbarcontroller.cxx @@ -175,7 +175,7 @@ void ComplexToolbarController::statusChanged( const FeatureStateEvent& Event ) { if (aControlCommand.Command == "SetQuickHelpText") { - for (NamedValue const & rArg : std::as_const(aControlCommand.Arguments)) + for (NamedValue const& rArg : aControlCommand.Arguments) { if (rArg.Name == "HelpText") { diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx index b3478a7b1edb..edce799e5055 100644 --- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx +++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx @@ -192,7 +192,7 @@ void DropdownToolbarController::executeControlCommand( const css::frame::Control m_pListBoxControl->clear(); rArg.Value >>= aList; - for (OUString const & rName : std::as_const(aList)) + for (OUString const& rName : aList) m_pListBoxControl->append_text(rName); m_pListBoxControl->set_active(0); diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index 3c5923396cfc..204cbc7cb4d3 100644 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -287,7 +287,7 @@ void GenericToolbarController::statusChanged( const FeatureStateEvent& Event ) { if (aControlCommand.Command == "SetQuickHelpText") { - for ( NamedValue const & rArg : std::as_const(aControlCommand.Arguments) ) + for (NamedValue const& rArg : aControlCommand.Arguments) { if (rArg.Name == "HelpText") { diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 1f2c25ba085a..770e6b166a1c 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -1306,7 +1306,7 @@ void MenuBarManager::FillMenu( bool bShow = true; bool bEnabled = true; - for ( beans::PropertyValue const & rProp : std::as_const(aProps) ) + for (beans::PropertyValue const& rProp : aProps) { OUString aPropName = rProp.Name; if ( aPropName == "CommandURL" ) diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index 3efb64c44bfd..be6840a1cc33 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -391,7 +391,7 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc { if ( rItemContainer->getByIndex( n ) >>= aProps ) { - for ( beans::PropertyValue const & prop : std::as_const(aProps) ) + for (beans::PropertyValue const& prop : aProps) { if ( prop.Name == "CommandURL" ) { diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx index c17b08efeeb7..871460d847f1 100644 --- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx @@ -113,7 +113,7 @@ void ToggleButtonToolbarController::executeControlCommand( const css::frame::Con m_aCurrentSelection.clear(); arg.Value >>= aList; - for ( OUString const & label : std::as_const(aList) ) + for (OUString const& label : aList) { m_aDropdownMenuList.push_back( DropdownMenuItem() ); m_aDropdownMenuList.back().mLabel = label; diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 0ef5ea3c723e..85f6cc27682a 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -1372,7 +1372,7 @@ void ToolBarManager::FillToolbarFromContainer( const Reference< XIndexAccess >& if ( rItemContainer->getByIndex( n ) >>= aProps ) { bool bIsVisible( true ); - for ( PropertyValue const & prop : std::as_const(aProps) ) + for (PropertyValue const& prop : aProps) { if ( prop.Name == ITEM_DESCRIPTOR_COMMANDURL ) prop.Value >>= aCommandURL; diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 6717a6364529..3b7e76b25fd9 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -345,7 +345,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > co if ( a >>= aWindowState ) { - for ( PropertyValue const & prop : std::as_const(aWindowState) ) + for (PropertyValue const& prop : aWindowState) { if ( prop.Name == WINDOWSTATE_PROPERTY_UINAME ) prop.Value >>= aUIName; diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index bbeb21851d2e..9e5e8a403783 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -614,7 +614,7 @@ void UICommandDescription::impl_fillElements(const char* _pName) if ( m_xModuleManager->getByName( aModuleIdentifier ) >>= aSeq ) { OUString aCommandStr; - for ( PropertyValue const & prop : std::as_const(aSeq) ) + for (PropertyValue const& prop : aSeq) { if ( prop.Name.equalsAscii(_pName) ) { diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx index cb66c585e9fa..6892805423c9 100644 --- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx @@ -126,7 +126,7 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales() uno::Sequence< OUString > aFormatList; aLinguCfg.GetSupportedDictionaryFormatsFor( "Hyphenators", "org.openoffice.lingu.LibHnjHyphenator", aFormatList ); - for (const auto& rFormat : std::as_const(aFormatList)) + for (const auto& rFormat : aFormatList) { std::vector< SvtLinguConfigDictionaryEntry > aTmpDic( aLinguCfg.GetActiveDictionariesByFormat( rFormat ) ); diff --git a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx index fe912cb6b341..ed8586dd50a5 100644 --- a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx +++ b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx @@ -317,7 +317,7 @@ sal_Bool SAL_CALL LanguageToolGrammarChecker::hasLocale(const Locale& rLocale) if (!m_aSuppLocales.hasElements()) getLocales(); - for (auto const& suppLocale : std::as_const(m_aSuppLocales)) + for (auto const& suppLocale : m_aSuppLocales) if (rLocale == suppLocale) return true; diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 6f30702fce7d..89db2c613af2 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -121,7 +121,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales() uno::Sequence< OUString > aFormatList; aLinguCfg.GetSupportedDictionaryFormatsFor( "SpellCheckers", "org.openoffice.lingu.MySpellSpellChecker", aFormatList ); - for (auto const& format : std::as_const(aFormatList)) + for (auto const& format : aFormatList) { std::vector< SvtLinguConfigDictionaryEntry > aTmpDic( aLinguCfg.GetActiveDictionariesByFormat(format) ); @@ -232,7 +232,7 @@ sal_Bool SAL_CALL SpellChecker::hasLocale(const Locale& rLocale) if (!m_aSuppLocales.hasElements()) getLocales(); - for (auto const& suppLocale : std::as_const(m_aSuppLocales)) + for (auto const& suppLocale : m_aSuppLocales) { if (rLocale == suppLocale) { diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index b8c74c938f29..6ae5ad0a76b7 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -108,7 +108,7 @@ Sequence< Locale > SAL_CALL Thesaurus::getLocales() uno::Sequence< OUString > aFormatList; aLinguCfg.GetSupportedDictionaryFormatsFor( "Thesauri", "org.openoffice.lingu.new.Thesaurus", aFormatList ); - for (const auto& rFormat : std::as_const(aFormatList)) + for (const auto& rFormat : aFormatList) { std::vector< SvtLinguConfigDictionaryEntry > aTmpDic( aLinguCfg.GetActiveDictionariesByFormat( rFormat ) ); diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index 766b67a4cc37..a051fb71a4c0 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -358,7 +358,7 @@ ConvDicNameContainer & ConvDicList::GetNameContainer() // access list of text conversion dictionaries to activate SvtLinguOptions aOpt; SvtLinguConfig().GetOptions( aOpt ); - for (const OUString& rActiveConvDic : std::as_const(aOpt.aActiveConvDics)) + for (const OUString& rActiveConvDic : aOpt.aActiveConvDics) { uno::Reference< XConversionDictionary > xDic = mxNameContainer->GetByName( rActiveConvDic ); diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx index ee593f9f489f..b577a86baf1d 100644 --- a/linguistic/source/lngprophelp.cxx +++ b/linguistic/source/lngprophelp.cxx @@ -189,7 +189,7 @@ void PropertyChgHelper::AddAsPropListener() { if (xPropSet.is()) { - for (const OUString& rPropName : std::as_const(aPropNames)) + for (const OUString& rPropName : aPropNames) { if (!rPropName.isEmpty()) xPropSet->addPropertyChangeListener( rPropName, this ); @@ -201,7 +201,7 @@ void PropertyChgHelper::RemoveAsPropListener() { if (xPropSet.is()) { - for (const OUString& rPropName : std::as_const(aPropNames)) + for (const OUString& rPropName : aPropNames) { if (!rPropName.isEmpty()) xPropSet->removePropertyChangeListener( rPropName, this ); diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index 850d4d813bfd..9452d0649a37 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -1592,7 +1592,7 @@ bool LngSvcMgr::SaveCfgSvcs( std::u16string_view rServiceName ) } OUString aNodeName( OUString::createFromAscii(pNodeName) ); - for (const lang::Locale& rLocale : std::as_const(aLocales)) + for (const lang::Locale& rLocale : aLocales) { uno::Sequence< OUString > aSvcImplNames = pDsp->GetServiceList( rLocale ); @@ -1627,7 +1627,7 @@ static uno::Sequence< OUString > GetLangSvcList( const uno::Any &rVal ) { rVal >>= aRes; #if OSL_DEBUG_LEVEL > 0 - for (const OUString& rSvcName : std::as_const(aRes)) + for (const OUString& rSvcName : aRes) { SAL_WARN_IF( rSvcName.isEmpty(), "linguistic", "service impl-name missing" ); } diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx index 50211fd929c7..a4f9671760d6 100644 --- a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx +++ b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx @@ -227,7 +227,7 @@ OUString SAL_CALL LotusWordProImportFilter::detect( css::uno::Sequence< Property OUString sTypeName( "writer_LotusWordPro_Document" ); OUString sURL; uno::Reference < XInputStream > xInputStream; - for (const PropertyValue& rValue : std::as_const(Descriptor)) + for (const PropertyValue& rValue : Descriptor) { if ( rValue.Name == "TypeName" ) rValue.Value >>= sTypeName; diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx index ac2c1f5c7e0a..3f47283d0825 100644 --- a/oox/source/core/filterbase.cxx +++ b/oox/source/core/filterbase.cxx @@ -425,7 +425,7 @@ void SAL_CALL FilterBase::initialize( const Sequence< Any >& rArgs ) Sequence<css::beans::PropertyValue> aSeq; rArgs[0] >>= aSeq; - for (const auto& rVal : std::as_const(aSeq)) + for (const auto& rVal : aSeq) { if (rVal.Name == "UserData") { diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 2c0cfa9732eb..2e7ce9a75cbc 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -1152,7 +1152,7 @@ void XmlFilterBase::exportCustomFragments() uno::Sequence<beans::PropertyValue> propList; xPropSet->getPropertyValue(UNO_NAME_MISC_OBJ_INTEROPGRABBAG) >>= propList; - for (const auto& rProp : std::as_const(propList)) + for (const auto& rProp : propList) { const OUString propName = rProp.Name; if (propName == "OOXCustomXml") diff --git a/oox/source/crypto/DocumentEncryption.cxx b/oox/source/crypto/DocumentEncryption.cxx index 6b88549299a1..dd0b4a3e42fb 100644 --- a/oox/source/crypto/DocumentEncryption.cxx +++ b/oox/source/crypto/DocumentEncryption.cxx @@ -82,7 +82,7 @@ bool DocumentEncryption::encrypt() Sequence<NamedValue> aStreams = mxPackageEncryption->encrypt(xInputStream); - for (const NamedValue & aStream : std::as_const(aStreams)) + for (const NamedValue& aStream : aStreams) { Reference<XOutputStream> xOutputStream(mrOleStorage.openOutputStream(aStream.Name), UNO_SET_THROW); BinaryXOutputStream aBinaryOutputStream(xOutputStream, true); diff --git a/oox/source/docprop/ooxmldocpropimport.cxx b/oox/source/docprop/ooxmldocpropimport.cxx index f58476c5688f..23e754d6bbcf 100644 --- a/oox/source/docprop/ooxmldocpropimport.cxx +++ b/oox/source/docprop/ooxmldocpropimport.cxx @@ -176,9 +176,9 @@ void SAL_CALL DocumentPropertiesImport::importProperties( if( aCoreStreams.hasElements() ) aParser.parseStream( aCoreStreams[ 0 ], true ); - for( const auto& rExtStream : std::as_const(aExtStreams) ) + for (const auto& rExtStream : aExtStreams) aParser.parseStream( rExtStream, true ); - for( const auto& rCustomStream : std::as_const(aCustomStreams) ) + for (const auto& rCustomStream : aCustomStreams) aParser.parseStream( rCustomStream, true ); } diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index c80e8c1ba688..e980a4f18f35 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1348,7 +1348,7 @@ void ChartExport::exportLegend( const Reference< css::chart::XChartDocument >& x { Sequence<sal_Int32> deletedLegendEntriesSeq; aSeriesProp.getProperty(deletedLegendEntriesSeq, PROP_DeletedLegendEntries); - for (const auto& deletedLegendEntry : std::as_const(deletedLegendEntriesSeq)) + for (const auto& deletedLegendEntry : deletedLegendEntriesSeq) { pFS->startElement(FSNS(XML_c, XML_legendEntry)); pFS->singleElement(FSNS(XML_c, XML_idx), XML_val, @@ -3960,7 +3960,7 @@ void ChartExport::exportDataLabels( ; } - for (const sal_Int32 nIdx : std::as_const(aAttrLabelIndices)) + for (const sal_Int32 nIdx : aAttrLabelIndices) { uno::Reference<beans::XPropertySet> xLabelPropSet = xSeries->getDataPointByIndex(nIdx); diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index a3e5356c0523..9cd97d0b5f3e 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -449,7 +449,7 @@ void DrawingML::WriteSolidFill( const Reference< XPropertySet >& rXPropSet ) { Sequence< PropertyValue > aGrabBag; mAny >>= aGrabBag; - for( const auto& rProp : std::as_const(aGrabBag) ) + for (const auto& rProp : aGrabBag) { if( rProp.Name == "SpPrSolidFillSchemeClr" ) rProp.Value >>= sColorFillScheme; @@ -615,7 +615,7 @@ void DrawingML::WriteGradientFill( const Reference< XPropertySet >& rXPropSet ) { Sequence< PropertyValue > aGrabBag; mAny >>= aGrabBag; - for( const auto& rProp : std::as_const(aGrabBag) ) + for (const auto& rProp : aGrabBag) if( rProp.Name == "GradFillDefinition" ) rProp.Value >>= aGradientStops; else if( rProp.Name == "OriginalGradFill" ) @@ -696,7 +696,7 @@ void DrawingML::WriteGrabBagGradientFill( const Sequence< PropertyValue >& aGrad sal_Int16 nTransparency = 0; ::Color nRgbClr; Sequence< PropertyValue > aTransformations; - for( const auto& rProp : std::as_const(aGradientStop) ) + for (const auto& rProp : aGradientStop) { if( rProp.Name == "SchemeClr" ) rProp.Value >>= sSchemeClr; @@ -972,7 +972,7 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc Sequence<PropertyValue> aGrabBag; mAny >>= aGrabBag; - for (const auto& rProp : std::as_const(aGrabBag)) + for (const auto& rProp : aGrabBag) { if( rProp.Name == "SpPrLnSolidFillSchemeClr" ) rProp.Value >>= sColorFillScheme; @@ -987,7 +987,7 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc else if( rProp.Name == "EmuLineWidth" ) rProp.Value >>= nEmuLineWidth; } - for (const auto& rStyleProp : std::as_const(aStyleProperties)) + for (const auto& rStyleProp : aStyleProperties) { if( rStyleProp.Name == "Color" ) rStyleProp.Value >>= nStyleColor; @@ -3166,7 +3166,7 @@ void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropS bool bHasBulletColor = false; awt::Size aGraphicSize; - for ( const PropertyValue& rPropValue : std::as_const(aPropertySequence) ) + for (const PropertyValue& rPropValue : aPropertySequence) { OUString aPropName( rPropValue.Name ); SAL_INFO("oox.shape", "pro name: " << aPropName); @@ -3320,7 +3320,7 @@ void DrawingML::WriteParagraphTabStops(const Reference<XPropertySet>& rXPropSet) if (aTabStops.getLength() > 0) mpFS->startElementNS(XML_a, XML_tabLst); - for (const css::style::TabStop& rTabStop : std::as_const(aTabStops)) + for (const css::style::TabStop& rTabStop : aTabStops) { OString sPosition = OString::number(GetPointFromCoordinate(rTabStop.Position)); OString sAlignment; @@ -3374,7 +3374,7 @@ sal_Int32 DrawingML::getBulletMarginIndentation (const Reference< XPropertySet > if (!aPropertySequence.hasElements()) return 0; - for ( const PropertyValue& rPropValue : std::as_const(aPropertySequence) ) + for (const PropertyValue& rPropValue : aPropertySequence) { OUString aPropName( rPropValue.Name ); SAL_INFO("oox.shape", "pro name: " << aPropName); @@ -3677,12 +3677,12 @@ bool DrawingML::IsFontworkShape(const css::uno::Reference<css::beans::XPropertyS { mAny >>= aCustomShapeGeometryProps; uno::Sequence<beans::PropertyValue> aTextPathSeq; - for (const auto& rProp : std::as_const(aCustomShapeGeometryProps)) + for (const auto& rProp : aCustomShapeGeometryProps) { if (rProp.Name == "TextPath") { rProp.Value >>= aTextPathSeq; - for (const auto& rTextPathItem : std::as_const(aTextPathSeq)) + for (const auto& rTextPathItem : aTextPathSeq) { if (rTextPathItem.Name == "TextPath") { @@ -3791,7 +3791,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo Sequence< PropertyValue > aProps; if ( mAny >>= aProps ) { - for ( const auto& rProp : std::as_const(aProps) ) + for (const auto& rProp : aProps) { if (rProp.Name == "TextPreRotateAngle") rProp.Value >>= nTextPreRotateAngle; @@ -3808,7 +3808,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo else if (rProp.Name == "TextPath") { rProp.Value >>= aTextPathSeq; - for (const auto& rTextPathItem : std::as_const(aTextPathSeq)) + for (const auto& rTextPathItem : aTextPathSeq) { if (rTextPathItem.Name == "ScaleX") rTextPathItem.Value >>= bScaleX; @@ -3865,7 +3865,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo { uno::Sequence<beans::PropertyValue> aGrabBag; rXPropSet->getPropertyValue("InteropGrabBag") >>= aGrabBag; - for (const auto& aProp : std::as_const(aGrabBag)) + for (const auto& aProp : aGrabBag) { if (aProp.Name == "Upright") { @@ -4665,7 +4665,7 @@ bool DrawingML::WriteCustomGeometry( uno::Sequence<awt::Size> aPathSize; bool bReplaceGeoWidth = false; bool bReplaceGeoHeight = false; - for (const beans::PropertyValue& rPathProp : std::as_const(aPathProp)) + for (const beans::PropertyValue& rPathProp : aPathProp) { if (rPathProp.Name == "Coordinates") rPathProp.Value >>= aPairs; @@ -4777,7 +4777,7 @@ bool DrawingML::WriteCustomGeometry( aPairs[0].Second.Value >>= nYMin; sal_Int32 nYMax = nYMin; - for (const auto& rPair : std::as_const(aPairs)) + for (const auto& rPair : aPairs) { sal_Int32 nX = GetCustomGeometryPointValue(rPair.First, aCustomShape2d, bReplaceGeoWidth, false); @@ -5497,7 +5497,7 @@ void DrawingML::WriteShapeStyle( const Reference< XPropertySet >& xPropSet ) Sequence< PropertyValue > aGrabBag; Sequence< PropertyValue > aFillRefProperties, aLnRefProperties, aEffectRefProperties; mAny >>= aGrabBag; - for( const auto& rProp : std::as_const(aGrabBag)) + for (const auto& rProp : aGrabBag) { if( rProp.Name == "StyleFillRef" ) rProp.Value >>= aFillRefProperties; @@ -5557,7 +5557,7 @@ void DrawingML::WriteShapeEffect( std::u16string_view sName, const Sequence< Pro // read tag attributes uno::Sequence< beans::PropertyValue > aOuterShdwProps; rEffectProp.Value >>= aOuterShdwProps; - for( const auto& rOuterShdwProp : std::as_const(aOuterShdwProps) ) + for (const auto& rOuterShdwProp : aOuterShdwProps) { if( rOuterShdwProp.Name == "algn" ) { @@ -5822,7 +5822,7 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet ) mpFS->startElementNS(XML_a, XML_effectLst); bool bGlowWritten = false; - for( const auto& rEffect : std::as_const(aEffects) ) + for (const auto& rEffect : aEffects) { if (!bGlowWritten && (rEffect.Name == "innerShdw" || rEffect.Name == "outerShdw" @@ -5913,7 +5913,7 @@ void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool { Sequence< PropertyValue > a3DEffectProps; pShapeProp->Value >>= a3DEffectProps; - for( const auto& r3DEffectProp : std::as_const(a3DEffectProps) ) + for (const auto& r3DEffectProp : a3DEffectProps) { if( r3DEffectProp.Name == "Camera" ) r3DEffectProp.Value >>= aEffectProps; @@ -5930,7 +5930,7 @@ void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool bool bCameraRotationPresent = false; rtl::Reference<sax_fastparser::FastAttributeList> aCameraAttrList = FastSerializerHelper::createAttrList(); rtl::Reference<sax_fastparser::FastAttributeList> aCameraRotationAttrList = FastSerializerHelper::createAttrList(); - for( const auto& rEffectProp : std::as_const(aEffectProps) ) + for (const auto& rEffectProp : aEffectProps) { if( rEffectProp.Name == "prst" ) { @@ -5970,7 +5970,7 @@ void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool bool bLightRigRotationPresent = false; rtl::Reference<sax_fastparser::FastAttributeList> aLightRigAttrList = FastSerializerHelper::createAttrList(); rtl::Reference<sax_fastparser::FastAttributeList> aLightRigRotationAttrList = FastSerializerHelper::createAttrList(); - for( const auto& rLightRigProp : std::as_const(aLightRigProps) ) + for (const auto& rLightRigProp : aLightRigProps) { if( rLightRigProp.Name == "rig" || rLightRigProp.Name == "dir" ) { @@ -6042,7 +6042,7 @@ void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool rtl::Reference<sax_fastparser::FastAttributeList> aBevelTAttrList = FastSerializerHelper::createAttrList(); rtl::Reference<sax_fastparser::FastAttributeList> aBevelBAttrList = FastSerializerHelper::createAttrList(); rtl::Reference<sax_fastparser::FastAttributeList> aShape3DAttrList = FastSerializerHelper::createAttrList(); - for( const auto& rShape3DProp : std::as_const(aShape3DProps) ) + for (const auto& rShape3DProp : aShape3DProps) { if( rShape3DProp.Name == "extrusionH" || rShape3DProp.Name == "contourW" || rShape3DProp.Name == "z" ) { @@ -6088,7 +6088,7 @@ void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool bBevelBPresent = true; aBevelAttrList = aBevelBAttrList; } - for( const auto& rBevelProp : std::as_const(aBevelProps) ) + for (const auto& rBevelProp : aBevelProps) { if( rBevelProp.Name == "w" || rBevelProp.Name == "h" ) { @@ -6126,7 +6126,7 @@ void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool ::Color nColor; sal_Int32 nTransparency(0); Sequence< PropertyValue > aColorTransformations; - for( const auto& rExtrusionColorProp : std::as_const(aExtrusionColorProps) ) + for (const auto& rExtrusionColorProp : aExtrusionColorProps) { if( rExtrusionColorProp.Name == "schemeClr" ) rExtrusionColorProp.Value >>= sSchemeClr; @@ -6152,7 +6152,7 @@ void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool ::Color nColor; sal_Int32 nTransparency(0); Sequence< PropertyValue > aColorTransformations; - for( const auto& rContourColorProp : std::as_const(aContourColorProps) ) + for (const auto& rContourColorProp : aContourColorProps) { if( rContourColorProp.Name == "schemeClr" ) rContourColorProp.Value >>= sSchemeClr; @@ -6195,7 +6195,7 @@ void DrawingML::WriteArtisticEffect( const Reference< XPropertySet >& rXPropSet aEffect.Value >>= aAttrs; rtl::Reference<sax_fastparser::FastAttributeList> aAttrList = FastSerializerHelper::createAttrList(); OString sRelId; - for( const auto& rAttr : std::as_const(aAttrs) ) + for (const auto& rAttr : aAttrs) { sal_Int32 nToken = ArtisticEffectProperties::getEffectToken( rAttr.Name ); if( nToken != XML_none ) @@ -6210,7 +6210,7 @@ void DrawingML::WriteArtisticEffect( const Reference< XPropertySet >& rXPropSet rAttr.Value >>= aGraphic; Sequence< sal_Int8 > aGraphicData; OUString sGraphicId; - for( const auto& rProp : std::as_const(aGraphic) ) + for (const auto& rProp : aGraphic) { if( rProp.Name == "Id" ) rProp.Value >>= sGraphicId; @@ -6276,7 +6276,7 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX // retrieve the doms from the GrabBag uno::Sequence<beans::PropertyValue> propList; xPropSet->getPropertyValue(UNO_NAME_MISC_OBJ_INTEROPGRABBAG) >>= propList; - for (const auto& rProp : std::as_const(propList)) + for (const auto& rProp : propList) { OUString propName = rProp.Name; if (propName == "OOXData") diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index c0c08c7ccf28..8c003bcdb438 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -778,7 +778,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape ) { bHasGeometrySeq = true; SAL_INFO("oox.shape", "got custom shape geometry sequence"); - for (const PropertyValue& rProp : std::as_const(aGeometrySeq)) + for (const PropertyValue& rProp : aGeometrySeq) { SAL_INFO("oox.shape", "geometry property: " << rProp.Name); if (rProp.Name == "Type") @@ -1156,7 +1156,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape ) uno::Sequence<beans::PropertyValue> grabBag; rXPropSet->getPropertyValue("InteropGrabBag") >>= grabBag; - for (auto const& it : std::as_const(grabBag)) + for (auto const& it : grabBag) if (it.Name == "3DEffectProperties") bHas3DEffectinShape = true; @@ -2385,7 +2385,7 @@ void ShapeExport::WriteTableCellProperties(const Reference< XPropertySet>& xCell if( !aTextVerticalValue && (xCellPropSet->getPropertyValue("CellInteropGrabBag") >>= aGrabBag) ) { - for (auto const& rIt : std::as_const(aGrabBag)) + for (auto const& rIt : aGrabBag) { if (rIt.Name == "mso-tcPr-vert-value") { @@ -2697,19 +2697,19 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape ) OUString progID; - for (auto const& it : std::as_const(grabBag)) + for (auto const& it : grabBag) { if (it.Name == "EmbeddedObjects") { uno::Sequence<beans::PropertyValue> objects; it.Value >>= objects; - for (auto const& object : std::as_const(objects)) + for (auto const& object : objects) { if (object.Name == entryName) { uno::Sequence<beans::PropertyValue> props; object.Value >>= props; - for (auto const& prop : std::as_const(props)) + for (auto const& prop : props) { if (prop.Name == "ProgID") { diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx index 9b2bd48e5715..d5a89e6f2388 100644 --- a/oox/source/helper/propertymap.cxx +++ b/oox/source/helper/propertymap.cxx @@ -391,7 +391,7 @@ static void lclDumpAnyValue( const Any& value) Sequence< PropertyValue > aBulletPropSeq; fprintf (stderr, "level %d\n", k); if (xNumRule->getByIndex (k) >>= aBulletPropSeq) { - for (const PropertyValue& rProp : std::as_const(aBulletPropSeq)) { + for (const PropertyValue& rProp : aBulletPropSeq) { fprintf(stderr, "%46s = ", USS (rProp.Name)); lclDumpAnyValue (rProp.Value); } @@ -820,7 +820,7 @@ static const char* lclDumpAnyValueCode( const Any& value, int level) Sequence< PropertyValue > aBulletPropSeq; fprintf (stderr, "level %d\n", k); if (xNumRule->getByIndex (k) >>= aBulletPropSeq) { - for (const PropertyValue& rProp : std::as_const(aBulletPropSeq)) { + for (const PropertyValue& rProp : aBulletPropSeq) { fprintf(stderr, "%46s = ", USS (rProp.Name)); lclDumpAnyValue (rProp.Value); } diff --git a/package/source/manifest/ManifestExport.cxx b/package/source/manifest/ManifestExport.cxx index 1d51e223e43b..9b33e6bb371e 100644 --- a/package/source/manifest/ManifestExport.cxx +++ b/package/source/manifest/ManifestExport.cxx @@ -223,7 +223,7 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > con uno::Sequence< uno::Sequence < beans::NamedValue > > aKeyInfoSequence; *pKeyInfoProperty >>= aKeyInfoSequence; - for (const uno::Sequence<beans::NamedValue>& rKeyInfoSequence : std::as_const(aKeyInfoSequence)) + for (const uno::Sequence<beans::NamedValue>& rKeyInfoSequence : aKeyInfoSequence) { uno::Sequence < sal_Int8 > aPgpKeyID; uno::Sequence < sal_Int8 > aPgpKeyPacket; diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index 68bf5d1688a0..b45f41089e0d 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -340,7 +340,7 @@ bool OWriteStream_Impl::IsEncrypted() } bool bToBeEncr = false; - for ( const auto& rProp : std::as_const(m_aProps) ) + for (const auto& rProp : m_aProps) { if ( rProp.Name == "Encrypted" ) { diff --git a/package/source/xstor/xfactory.cxx b/package/source/xstor/xfactory.cxx index d611ddfabe6c..4d48b2b5b1fe 100644 --- a/package/source/xstor/xfactory.cxx +++ b/package/source/xstor/xfactory.cxx @@ -163,7 +163,7 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithAr } sal_Int32 nNumArgs = 1; - for ( const auto& rProp : std::as_const(aDescr) ) + for (const auto& rProp : aDescr) { if ( rProp.Name == "InteractionHandler" || rProp.Name == "Password" diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index d19d1cac7f33..ba35e6973569 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -107,7 +107,7 @@ void OStorage_Impl::completeStorageStreamCopy_Impl( aPropNames.realloc( 1 ); } - for ( const auto& rPropName : std::as_const(aPropNames) ) + for (const auto& rPropName : aPropNames) xDestProps->setPropertyValue( rPropName, xSourceProps->getPropertyValue( rPropName ) ); } @@ -302,7 +302,7 @@ OStorage_Impl::~OStorage_Impl() m_xPackage.clear(); OUString aPropertyName = "URL"; - for ( const auto& rProp : std::as_const(m_xProperties) ) + for (const auto& rProp : m_xProperties) { if ( rProp.Name == aPropertyName ) { @@ -392,7 +392,7 @@ void OStorage_Impl::OpenOwnPackage() uno::Any( false ) ); sal_Int32 nArgNum = 2; - for ( const auto& rProp : std::as_const(m_xProperties) ) + for (const auto& rProp : m_xProperties) { if ( rProp.Name == "RepairPackage" || rProp.Name == "ProgressHandler" diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index c4de219f80de..8c09bfefcbb6 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -1725,7 +1725,7 @@ uno::Sequence< sal_Int8 > ZipPackage::GetEncryptionKey() else throw uno::RuntimeException(THROW_WHERE "No expected key is provided!" ); - for ( const auto& rKey : std::as_const(m_aStorageEncryptionKeys) ) + for (const auto& rKey : m_aStorageEncryptionKeys) if ( rKey.Name == aNameToFind ) rKey.Value >>= aResult; } @@ -1801,7 +1801,7 @@ void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const throw IllegalArgumentException(THROW_WHERE "unexpected algorithms list is provided.", uno::Reference< uno::XInterface >(), 2 ); } - for ( const auto& rAlgorithm : std::as_const(aAlgorithms) ) + for (const auto& rAlgorithm : aAlgorithms) { if ( rAlgorithm.Name == "StartKeyGenerationAlgorithm" ) { diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index cc763e8d6f1f..b5af8216827a 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -238,7 +238,7 @@ uno::Sequence<sal_Int8> ZipPackageStream::GetEncryptionKey(Bugs const bugs) else throw uno::RuntimeException(THROW_WHERE "No expected key is provided!" ); - for ( const auto& rKey : std::as_const(m_aStorageEncryptionKeys) ) + for (const auto& rKey : m_aStorageEncryptionKeys) if ( rKey.Name == aNameToFind ) rKey.Value >>= aResult; diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx index d693a51ceceb..8056347bfb35 100644 --- a/package/source/zippackage/zipfileaccess.cxx +++ b/package/source/zippackage/zipfileaccess.cxx @@ -214,7 +214,7 @@ void SAL_CALL OZipFileAccess::initialize( const uno::Sequence< uno::Any >& aArgu } else if (aArguments[0] >>= aArgs) { - for (const beans::NamedValue& rArg : std::as_const(aArgs)) + for (const beans::NamedValue& rArg : aArgs) { if (rArg.Name == "URL") rArg.Value >>= aParamURL; diff --git a/pyuno/source/module/pyuno_adapter.cxx b/pyuno/source/module/pyuno_adapter.cxx index 595e09a1f85d..7ed527dfe3c0 100644 --- a/pyuno/source/module/pyuno_adapter.cxx +++ b/pyuno/source/module/pyuno_adapter.cxx @@ -273,7 +273,7 @@ Any Adapter::invoke( const OUString &aFunctionName, } aOutParam.realloc( nOutLength ); - ret = std::as_const(seq)[0]; + ret = seq[0]; std::copy_n(std::next(std::cbegin(seq)), nOutLength, aOutParam.getArray()); } // else { sequence is a return value !} diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index f6723ddccc29..6d807911a8fb 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -2474,7 +2474,7 @@ OUString OReportDefinition::getDocumentBaseURL() const ::osl::MutexGuard aGuard(m_aMutex); ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); - for (beans::PropertyValue const& it : std::as_const(m_pImpl->m_aArgs)) + for (beans::PropertyValue const& it : m_pImpl->m_aArgs) { if (it.Name == "DocumentBaseURL") return it.Value.get<OUString>(); diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx index 60784020b622..9a9a4d33a280 100644 --- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx @@ -370,7 +370,7 @@ void ExportDocumentHandler::exportTableRows() m_xDelegatee->endElement(sCell); } } - for(const auto& rColumn : std::as_const(m_aColumns)) + for (const auto& rColumn : m_aColumns) { OUString sFormula = "field:[" + rColumn + "]"; rtl::Reference<comphelper::AttributeList> pList = new comphelper::AttributeList(); diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx index 690d90ca1b17..48ff4ed2df12 100644 --- a/reportdesign/source/ui/dlg/Navigator.cxx +++ b/reportdesign/source/ui/dlg/Navigator.cxx @@ -360,7 +360,7 @@ void NavigatorTree::_selectionChanged( const lang::EventObject& aEvent ) } else { - for (const uno::Reference<report::XReportComponent>& rElem : std::as_const(aSelection)) + for (const uno::Reference<report::XReportComponent>& rElem : aSelection) { bool bEntry = find(rElem, *xEntry); if (bEntry && !m_xTreeView->is_selected(*xEntry)) diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index 0ede3305aaa0..29fe406e53cb 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -767,11 +767,11 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const } else { - for (auto const& it : std::as_const(m_aFieldNames)) + for (auto const& it : m_aFieldNames) { xListControl->appendListEntry(it); } - for (auto const& it : std::as_const(m_aParamNames)) + for (auto const& it : m_aParamNames) { xListControl->appendListEntry(it); } diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 09ccc044a3c4..e983c4bc214d 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -247,7 +247,7 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC { uno::Sequence< uno::Reference<report::XReportComponent> > aCopies; rObject.Value >>= aCopies; - for (const uno::Reference<report::XReportComponent>& rCopy : std::as_const(aCopies)) + for (const uno::Reference<report::XReportComponent>& rCopy : aCopies) { SdrObject* pObject = SdrObject::getSdrObjectFromXShape( rCopy ); if ( pObject ) diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 7f48de10b08d..b6b4fe0b160b 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -1228,7 +1228,7 @@ void OViewsWindow::EndDragObj(bool _bControlKeyPressed, const OSectionView* _pSe aNewPos.setY( 0 ); Point aPrevious; - for (beans::NamedValue const & namedVal : std::as_const(aAllreadyCopiedObjects)) + for (beans::NamedValue const& namedVal : aAllreadyCopiedObjects) { uno::Sequence< uno::Reference<report::XReportComponent> > aClones; namedVal.Value >>= aClones; diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx index 0a5c227b7210..55468f0c2869 100644 --- a/sax/source/tools/fastserializer.cxx +++ b/sax/source/tools/fastserializer.cxx @@ -809,7 +809,7 @@ namespace sax_fastparser { // Sort it all std::map< sal_Int32, Int8Sequence >::iterator iter; - for ( const auto nIndex : std::as_const(maOrder) ) + for (const auto nIndex : maOrder) { iter = maData.find( nIndex ); if ( iter != maData.end() ) diff --git a/sc/qa/unit/subsequent_filters_test3.cxx b/sc/qa/unit/subsequent_filters_test3.cxx index cdde83913715..b30a9b40eccf 100644 --- a/sc/qa/unit/subsequent_filters_test3.cxx +++ b/sc/qa/unit/subsequent_filters_test3.cxx @@ -784,7 +784,7 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest3, testTextBoxBodyUpright) { uno::Sequence<beans::PropertyValue> aGrabBag; xShapeProperties->getPropertyValue("InteropGrabBag") >>= aGrabBag; - for (auto& aProp : std::as_const(aGrabBag)) + for (auto& aProp : aGrabBag) { if (aProp.Name == "Upright") { @@ -800,7 +800,7 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest3, testTextBoxBodyUpright) sal_Int32 nAngle; uno::Any aGeom = xShapeProperties->getPropertyValue("CustomShapeGeometry"); auto aGeomSeq = aGeom.get<Sequence<beans::PropertyValue>>(); - for (const auto& aProp : std::as_const(aGeomSeq)) + for (const auto& aProp : aGeomSeq) { if (aProp.Name == "TextPreRotateAngle") { diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 37a7bf73d35a..57098ed46fe6 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -2132,7 +2132,7 @@ static PivotFunc lcl_FirstSubTotal( const uno::Reference<beans::XPropertySet>& x if ( aSubAny >>= aSeq ) { PivotFunc nMask = PivotFunc::NONE; - for (const sal_Int16 nElem : std::as_const(aSeq)) + for (const sal_Int16 nElem : aSeq) nMask |= ScDataPilotConversion::FunctionBit(nElem); return nMask; } diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx index 08eedd67358d..66d8902de5f1 100644 --- a/sc/source/core/tool/addincol.cxx +++ b/sc/source/core/tool/addincol.cxx @@ -453,7 +453,7 @@ void ScUnoAddInCollection::ReadConfiguration() uno::Sequence<beans::PropertyValue> aLocalEntries; if ( aDisplayNameProperties[0] >>= aLocalEntries ) { - for ( const beans::PropertyValue& rConfig : std::as_const(aLocalEntries) ) + for (const beans::PropertyValue& rConfig : aLocalEntries) { // PropertyValue name is the locale ("convert" from // string to canonicalize). @@ -484,7 +484,7 @@ void ScUnoAddInCollection::ReadConfiguration() uno::Sequence<beans::PropertyValue> aLocalEntries; if ( aCompProperties[0] >>= aLocalEntries ) { - for ( const beans::PropertyValue& rConfig : std::as_const(aLocalEntries) ) + for (const beans::PropertyValue& rConfig : aLocalEntries) { // PropertyValue name is the locale ("convert" from // string to canonicalize). diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx index 516c1a67e91f..0a4cb09503c1 100644 --- a/sc/source/core/tool/appoptio.cxx +++ b/sc/source/core/tool/appoptio.cxx @@ -423,7 +423,7 @@ void ScAppCfg::ReadSortListCfg() } else { - for (const OUString& rStr : std::as_const(aSeq)) + for (const OUString& rStr : aSeq) { aList.emplace_back(rStr); } diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx index 8420cc696a90..1d68152127d0 100644 --- a/sc/source/filter/excel/excel.cxx +++ b/sc/source/filter/excel/excel.cxx @@ -344,7 +344,7 @@ static ErrCode lcl_ExportExcelBiff( SfxMedium& rMedium, ScDocument *pDocument, uno::Sequence<beans::NamedValue> aStreams = xPackageEncryption->encrypt(xInputStream); tools::SvRef<SotStorage> xEncryptedRootStrg = new SotStorage(pOriginalMediaStrm, false); - for (const beans::NamedValue & aStreamData : std::as_const(aStreams)) + for (const beans::NamedValue& aStreamData : aStreams) { // To avoid long paths split and open substorages recursively // Splitting paths manually, since comphelper::string::split is trimming special characters like \0x01, \0x09 diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index 0926be90e5f2..d9ef2b2f3a7f 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -1934,7 +1934,7 @@ bool XclExpChSeries::ConvertDataSeries( Sequence< sal_Int32 > aPointIndexes; if( aSeriesProp.GetProperty( aPointIndexes, EXC_CHPROP_ATTRIBDATAPOINTS ) && aPointIndexes.hasElements() ) { - for( const sal_Int32 nPointIndex : std::as_const(aPointIndexes) ) + for (const sal_Int32 nPointIndex : aPointIndexes) { if (nPointIndex >= nMaxPointCount) break; diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx index fc8b118eae41..633499eadb5e 100644 --- a/sc/source/filter/excel/xepivotxml.cxx +++ b/sc/source/filter/excel/xepivotxml.cxx @@ -721,16 +721,16 @@ void WriteGrabBagItemToStream(XclExpXmlStream& rStrm, sal_Int32 tokenId, const c css::uno::Sequence<css::xml::FastAttribute> aFastSeq; css::uno::Sequence<css::xml::Attribute> aUnkSeq; - for (const auto& a : std::as_const(aSeqs)) + for (const auto& a : aSeqs) { if (a >>= aFastSeq) { - for (const auto& rAttr : std::as_const(aFastSeq)) + for (const auto& rAttr : aFastSeq) rStrm.WriteAttributes(rAttr.Token, rAttr.Value); } else if (a >>= aUnkSeq) { - for (const auto& rAttr : std::as_const(aUnkSeq)) + for (const auto& rAttr : aUnkSeq) pStrm->write(" ") ->write(rAttr.Name) ->write("=\"") diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx index 7603d0f17833..464d30d9d2d8 100644 --- a/sc/source/filter/oox/formulabase.cxx +++ b/sc/source/filter/oox/formulabase.cxx @@ -1249,7 +1249,7 @@ bool OpCodeProviderImpl::fillTokenMap( ApiTokenMap& orTokenMap, OpCodeEntrySeque orTokenMap.clear(); if( fillEntrySeq( orEntrySeq, rxMapper, nMapGroup ) ) { - for( const FormulaOpCodeMapEntry& rEntry : std::as_const(orEntrySeq) ) + for (const FormulaOpCodeMapEntry& rEntry : orEntrySeq) orTokenMap[ rEntry.Name ] = rEntry.Token; } return orEntrySeq.hasElements(); @@ -1261,7 +1261,7 @@ bool OpCodeProviderImpl::fillFuncTokenMaps( ApiTokenMap& orIntFuncTokenMap, ApiT orExtFuncTokenMap.clear(); if( fillEntrySeq( orEntrySeq, rxMapper, css::sheet::FormulaMapGroup::FUNCTIONS ) ) { - for( const FormulaOpCodeMapEntry& rEntry : std::as_const(orEntrySeq) ) + for (const FormulaOpCodeMapEntry& rEntry : orEntrySeq) ((rEntry.Token.OpCode == OPCODE_EXTERNAL) ? orExtFuncTokenMap : orIntFuncTokenMap)[ rEntry.Name ] = rEntry.Token; } return orEntrySeq.hasElements(); diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx index 855c7dab40b0..2361122e0bfe 100644 --- a/sc/source/filter/oox/workbookhelper.cxx +++ b/sc/source/filter/oox/workbookhelper.cxx @@ -765,7 +765,7 @@ void WorkbookHelper::finalizeWorkbookImport() OUString sTabName; Reference< XNameAccess > xSheetsNC; - for (const auto& rProp : std::as_const(aSeq)) + for (const auto& rProp : aSeq) { OUString sName(rProp.Name); if (sName == SC_ACTIVETABLE) @@ -790,7 +790,7 @@ void WorkbookHelper::finalizeWorkbookImport() if ( !(aAny >>= aProperties) ) return; - for (const auto& rProp : std::as_const(aProperties)) + for (const auto& rProp : aProperties) { OUString sName(rProp.Name); if (sName == SC_POSITIONLEFT) diff --git a/sc/source/filter/xml/XMLCodeNameProvider.cxx b/sc/source/filter/xml/XMLCodeNameProvider.cxx index 347f21d0f850..3068f10e54ef 100644 --- a/sc/source/filter/xml/XMLCodeNameProvider.cxx +++ b/sc/source/filter/xml/XMLCodeNameProvider.cxx @@ -32,7 +32,7 @@ bool XMLCodeNameProvider::_getCodeName( const uno::Any& aAny, OUString& rCodeNam if( !(aAny >>= aProps) ) return false; - for( const auto& rProp : std::as_const(aProps) ) + for (const auto& rProp : aProps) { if( rProp.Name == "CodeName" ) { diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 4bbdc9669b12..243080b3b7f8 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -1363,7 +1363,7 @@ void SAL_CALL ScXMLImport::endDocument() uno::Sequence< beans::PropertyValue > aSeq; if (xIndexAccess->getByIndex(0) >>= aSeq) { - for (const auto& rProp : std::as_const(aSeq)) + for (const auto& rProp : aSeq) { OUString sName(rProp.Name); if (sName == SC_ACTIVETABLE) diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index bf40b0092062..b6de0f3bcae8 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -1044,7 +1044,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal uno::Reference<beans::XPropertySet> xOptProp(xSolver, uno::UNO_QUERY); if ( xOptProp.is() ) { - for (const beans::PropertyValue& rValue : std::as_const(maProperties)) + for (const beans::PropertyValue& rValue : maProperties) { try { @@ -1075,7 +1075,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal for (nVarPos=0; nVarPos<nVarCount; ++nVarPos) { ScAddress aCellPos; - ScUnoConversion::FillScAddress( aCellPos, std::as_const(aVariables)[nVarPos] ); + ScUnoConversion::FillScAddress(aCellPos, aVariables[nVarPos]); rFunc.SetValueCell(aCellPos, aSolution[nVarPos], false); } mpDocShell->UnlockPaint(); @@ -1113,7 +1113,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal { ScAddress aCellPos; ScUnoConversion::FillScAddress( aCellPos, aVariables[nVarPos] ); - rFunc.SetValueCell(aCellPos, std::as_const(aOldValues)[nVarPos], false); + rFunc.SetValueCell(aCellPos, aOldValues[nVarPos], false); } mpDocShell->UnlockPaint(); } diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index 6a6a12d181a1..26457e43f1b9 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -256,7 +256,7 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( // ScGlobal::SetUseTabCol does not do much else pUserList->clear(); - for (const OUString& aEntry : std::as_const(aSeq)) + for (const OUString& aEntry : aSeq) { pUserList->emplace_back(aEntry); } diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index c99247af979f..c2dddbd74fad 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -1555,7 +1555,7 @@ ScChart2DataProvider::createDataSource( aSeqVector.push_back(aSeq); } - for( const sal_Int32 nNewIndex : std::as_const(aSequenceMapping) ) + for (const sal_Int32 nNewIndex : aSequenceMapping) { // note: assuming that the values in the sequence mapping are always non-negative ::std::vector< uno::Reference< chart2::data::XLabeledDataSequence > >::size_type nOldIndex( static_cast< sal_uInt32 >( nNewIndex ) ); diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index aa0554b27f7c..c905d68aff0a 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -529,7 +529,7 @@ void ScChartObj::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const uno: if ( rValue >>= aCellRanges ) { ScRangeListRef rRangeList = new ScRangeList(); - for ( table::CellRangeAddress const & aCellRange : std::as_const(aCellRanges) ) + for (table::CellRangeAddress const& aCellRange : aCellRanges) { ScRange aRange; ScUnoConversion::FillScRange( aRange, aCellRange ); diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index d496c6c99134..1758bd36f2da 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -792,7 +792,7 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp aServiceDesc = *pOldDesc; OUString aStrVal; - for (const beans::PropertyValue& rProp : std::as_const(aArgSeq)) + for (const beans::PropertyValue& rProp : aArgSeq) { OUString aPropName(rProp.Name); diff --git a/sc/source/ui/unoobj/eventuno.cxx b/sc/source/ui/unoobj/eventuno.cxx index 88a38763783c..8541cd0c031b 100644 --- a/sc/source/ui/unoobj/eventuno.cxx +++ b/sc/source/ui/unoobj/eventuno.cxx @@ -85,7 +85,7 @@ void SAL_CALL ScSheetEventsObj::replaceByName( const OUString& aName, const uno: uno::Sequence<beans::PropertyValue> aPropSeq; if ( aElement >>= aPropSeq ) { - for (const beans::PropertyValue& rProp : std::as_const(aPropSeq)) + for (const beans::PropertyValue& rProp : aPropSeq) { if ( rProp.Name == SC_UNO_EVENTTYPE ) { diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index 3316450da370..89e616f744e2 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -407,7 +407,7 @@ public: sal_Int32 nStartRow = mrDocRow; sal_Int32 nRowCount = maSeq.getLength(); sal_Int32 nMaxColCount = 0; - for ( const uno::Sequence< seq >& rRow : std::as_const(maSeq) ) + for (const uno::Sequence<seq>& rRow : maSeq) { sal_Int32 nColCount = rRow.getLength(); if ( nColCount > nMaxColCount ) diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index 5d1ecadb08a7..95a1f3f00c15 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -1361,7 +1361,7 @@ public: uno::Sequence< beans::PropertyValue > aProperties; aElement >>= aProperties; bool isEventType = false; - for( const beans::PropertyValue& rProperty : std::as_const(aProperties) ) + for (const beans::PropertyValue& rProperty : aProperties) { if ( rProperty.Name == SC_EVENTACC_EVENTTYPE ) { diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx index bd552fbb03bc..bbe62435f97a 100644 --- a/sc/source/ui/vba/vbaworksheets.cxx +++ b/sc/source/ui/vba/vbaworksheets.cxx @@ -432,7 +432,7 @@ ScVbaWorksheets::Item(const uno::Any& Index, const uno::Any& Index2) SheetMap aSheets; uno::Sequence< uno::Any > sIndices; aConverted >>= sIndices; - for( const auto& rIndex : std::as_const(sIndices) ) + for (const auto& rIndex : sIndices) { uno::Reference< excel::XWorksheet > xWorkSheet( ScVbaWorksheets_BASE::Item( rIndex, Index2 ), uno::UNO_QUERY_THROW ); ScVbaWorksheet* pWorkSheet = excel::getImplFromDocModuleWrapper<ScVbaWorksheet>( xWorkSheet ); diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 8e7a5da93cc4..1f4f91307c44 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -1861,7 +1861,7 @@ bool ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest ) bool bInserted = false; - for (const OUString& aMemberStr : std::as_const(aMemberNames)) + for (const OUString& aMemberStr : aMemberNames) { if ( !bInserted && aMemberStr == aDestData.MemberName ) { diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 57fb7f63b72d..c959be484d8b 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -132,7 +132,7 @@ public: sal_Int32 dimensionIndex = 0; OUString sPivotTableName("DataPilot1"); - for (beans::PropertyValue const & rProperty : std::as_const(aProperties)) + for (beans::PropertyValue const& rProperty : aProperties) { if (rProperty.Name == "Rectangle") rProperty.Value >>= xRectangle; diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx index 974dcadc7c98..9f12da79e39a 100644 --- a/scaddins/source/analysis/analysishelper.cxx +++ b/scaddins/source/analysis/analysishelper.cxx @@ -1467,7 +1467,7 @@ void SortedIndividualInt32List::InsertHolidayList( if( !(rHolAny >>= aAnySeq) ) throw lang::IllegalArgumentException(); - for( const uno::Sequence< uno::Any >& rSubSeq : std::as_const(aAnySeq) ) + for (const uno::Sequence<uno::Any>& rSubSeq : aAnySeq) { for( const uno::Any& rAny : rSubSeq ) InsertHolidayList( rAnyConv, rAny, nNullDate, false/*bInsertOnWeekend*/ ); @@ -2022,7 +2022,7 @@ void ComplexList::Append( const uno::Sequence< uno::Any >& aMultPars ) if( !(r >>= aValArr) ) throw lang::IllegalArgumentException(); - for( const uno::Sequence< uno::Any >& rArr : std::as_const(aValArr) ) + for (const uno::Sequence<uno::Any>& rArr : aValArr) Append( rArr ); } break; diff --git a/sccomp/source/solver/CoinMPSolver.cxx b/sccomp/source/solver/CoinMPSolver.cxx index a6b423d2d4a2..97ed9005be82 100644 --- a/sccomp/source/solver/CoinMPSolver.cxx +++ b/sccomp/source/solver/CoinMPSolver.cxx @@ -76,7 +76,7 @@ void SAL_CALL CoinMPSolver::solve() ScSolverCellHashMap aCellsHash; aCellsHash[maObjective].reserve( nVariables + 1 ); // objective function - for (const auto& rConstr : std::as_const(maConstraints)) + for (const auto& rConstr : maConstraints) { table::CellAddress aCellAddr = rConstr.Left; aCellsHash[aCellAddr].reserve( nVariables + 1 ); // constraints: left hand side @@ -259,7 +259,7 @@ void SAL_CALL CoinMPSolver::solve() // apply single-var integer constraints - for (const auto& rConstr : std::as_const(maConstraints)) + for (const auto& rConstr : maConstraints) { sheet::SolverConstraintOperator eOp = rConstr.Operator; if ( eOp == sheet::SolverConstraintOperator_INTEGER || diff --git a/sccomp/source/solver/LpsolveSolver.cxx b/sccomp/source/solver/LpsolveSolver.cxx index 78cd25e81167..9a21ea43a2b6 100644 --- a/sccomp/source/solver/LpsolveSolver.cxx +++ b/sccomp/source/solver/LpsolveSolver.cxx @@ -112,7 +112,7 @@ void SAL_CALL LpsolveSolver::solve() ScSolverCellHashMap aCellsHash; aCellsHash[maObjective].reserve( nVariables + 1 ); // objective function - for (const auto& rConstr : std::as_const(maConstraints)) + for (const auto& rConstr : maConstraints) { table::CellAddress aCellAddr = rConstr.Left; aCellsHash[aCellAddr].reserve( nVariables + 1 ); // constraints: left hand side @@ -197,7 +197,7 @@ void SAL_CALL LpsolveSolver::solve() set_add_rowmode(lp, TRUE); - for (const auto& rConstr : std::as_const(maConstraints)) + for (const auto& rConstr : maConstraints) { // integer constraints are set later sheet::SolverConstraintOperator eOp = rConstr.Operator; @@ -265,7 +265,7 @@ void SAL_CALL LpsolveSolver::solve() // apply single-var integer constraints - for (const auto& rConstr : std::as_const(maConstraints)) + for (const auto& rConstr : maConstraints) { sheet::SolverConstraintOperator eOp = rConstr.Operator; if ( eOp == sheet::SolverConstraintOperator_INTEGER || diff --git a/sccomp/source/solver/SwarmSolver.cxx b/sccomp/source/solver/SwarmSolver.cxx index 4aac9f81e23e..01814e6f44ea 100644 --- a/sccomp/source/solver/SwarmSolver.cxx +++ b/sccomp/source/solver/SwarmSolver.cxx @@ -522,14 +522,14 @@ void SAL_CALL SwarmSolver::solve() } // Determine variable bounds - for (sheet::SolverConstraint const& rConstraint : std::as_const(maConstraints)) + for (sheet::SolverConstraint const& rConstraint : maConstraints) { table::CellAddress aLeftCellAddress = rConstraint.Left; sheet::SolverConstraintOperator eOp = rConstraint.Operator; size_t index = 0; bool bFoundVariable = false; - for (const table::CellAddress& rVariableCell : std::as_const(maVariables)) + for (const table::CellAddress& rVariableCell : maVariables) { if (aLeftCellAddress == rVariableCell) { diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index 94f5d8b41ab3..99b78e468d72 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -973,7 +973,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testBulletCharAndFont) uno::Sequence<beans::PropertyValue> aProps; xLevels->getByIndex(0) >>= aProps; // 1st level OUString sBulletChar(u'\xf06c'); - for (beans::PropertyValue const& rProp : std::as_const(aProps)) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "BulletChar") CPPUNIT_ASSERT_EQUAL_MESSAGE("BulletChar incorrect.", sBulletChar, diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 4498f66bf03a..8c51a1a06b9f 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -797,13 +797,13 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testTdf92527) uno::Sequence<beans::PropertyValue> aProps; xPropertySet2->getPropertyValue("CustomShapeGeometry") >>= aProps; uno::Sequence<beans::PropertyValue> aPathProps; - for (beans::PropertyValue const& rProp : std::as_const(aProps)) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "Path") aPathProps = rProp.Value.get<uno::Sequence<beans::PropertyValue>>(); } uno::Sequence<drawing::EnhancedCustomShapeParameterPair> aCoordinates; - for (beans::PropertyValue const& rProp : std::as_const(aPathProps)) + for (beans::PropertyValue const& rProp : aPathProps) { if (rProp.Name == "Coordinates") aCoordinates diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 7ee6e3a5e8cd..9198021f8101 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -1188,7 +1188,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testBulletsAsImageImpress8) awt::Size aSize; sal_Int16 nNumberingType = -1; - for (beans::PropertyValue const& rProperty : std::as_const(aProperties)) + for (beans::PropertyValue const& rProperty : aProperties) { if (rProperty.Name == "NumberingType") { @@ -1238,7 +1238,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testBulletsAsImageImpressOfficeOpenXml) awt::Size aSize; sal_Int16 nNumberingType = -1; - for (beans::PropertyValue const& rProperty : std::as_const(aProperties)) + for (beans::PropertyValue const& rProperty : aProperties) { if (rProperty.Name == "NumberingType") { @@ -1290,7 +1290,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testBulletsAsImageMsPowerpoint97) awt::Size aSize; sal_Int16 nNumberingType = -1; - for (beans::PropertyValue const& rProperty : std::as_const(aProperties)) + for (beans::PropertyValue const& rProperty : aProperties) { if (rProperty.Name == "NumberingType") { diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx index 2382ed4a9f22..568f0a90efca 100644 --- a/sd/qa/unit/import-tests-smartart.cxx +++ b/sd/qa/unit/import-tests-smartart.cxx @@ -1256,7 +1256,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTestSmartArt, testMissingBulletAndIndent) uno::Sequence<beans::PropertyValue> aBulletProps; xNumRule->getByIndex(1) >>= aBulletProps; - for (beans::PropertyValue const& rProp : std::as_const(aBulletProps)) + for (beans::PropertyValue const& rProp : aBulletProps) { if (rProp.Name == "LeftMargin") CPPUNIT_ASSERT_EQUAL(sal_Int32(309), rProp.Value.get<sal_Int32>()); diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index d6beee87693b..bd98d1191b72 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -281,14 +281,14 @@ CPPUNIT_TEST_FIXTURE(SdImportTest, testFreeformShapeGluePoints) xFreeformShape->getPropertyValue("CustomShapeGeometry") >>= aProps; uno::Sequence<beans::PropertyValue> aPathProps; - for (beans::PropertyValue const& rProp : std::as_const(aProps)) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "Path") aPathProps = rProp.Value.get<uno::Sequence<beans::PropertyValue>>(); } uno::Sequence<drawing::EnhancedCustomShapeParameterPair> seqGluePoints; - for (beans::PropertyValue const& rProp : std::as_const(aPathProps)) + for (beans::PropertyValue const& rProp : aPathProps) { if (rProp.Name == "GluePoints") { @@ -548,14 +548,14 @@ CPPUNIT_TEST_FIXTURE(SdImportTest, testTdf147459) xTriangleShape->getPropertyValue("CustomShapeGeometry") >>= aProps; uno::Sequence<beans::PropertyValue> aPathProps; - for (beans::PropertyValue const& rProp : std::as_const(aProps)) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "Path") aPathProps = rProp.Value.get<uno::Sequence<beans::PropertyValue>>(); } uno::Sequence<drawing::EnhancedCustomShapeParameterPair> seqGluePoints; - for (beans::PropertyValue const& rProp : std::as_const(aPathProps)) + for (beans::PropertyValue const& rProp : aPathProps) { if (rProp.Name == "GluePoints") { diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx index ac730a24d6bf..242fe82ea1bf 100644 --- a/sd/qa/unit/import-tests2.cxx +++ b/sd/qa/unit/import-tests2.cxx @@ -605,7 +605,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf104445) uno::Sequence<beans::PropertyValue> aBulletProps; xNumRule->getByIndex(0) >>= aBulletProps; - for (beans::PropertyValue const& rProp : std::as_const(aBulletProps)) + for (beans::PropertyValue const& rProp : aBulletProps) { if (rProp.Name == "NumberingType") CPPUNIT_ASSERT_EQUAL(sal_Int16(style::NumberingType::NUMBER_NONE), @@ -627,7 +627,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf104445) uno::Sequence<beans::PropertyValue> aBulletProps; xNumRule->getByIndex(0) >>= aBulletProps; - for (beans::PropertyValue const& rProp : std::as_const(aBulletProps)) + for (beans::PropertyValue const& rProp : aBulletProps) { if (rProp.Name == "NumberingType") CPPUNIT_ASSERT_EQUAL(sal_Int16(style::NumberingType::CHAR_SPECIAL), @@ -1432,7 +1432,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testOOXTheme) xPropSet->getPropertyValue("InteropGrabBag") >>= aGrabBag; bool bTheme = false; - for (beans::PropertyValue const& prop : std::as_const(aGrabBag)) + for (beans::PropertyValue const& prop : aGrabBag) { if (prop.Name == "OOXTheme") { diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx index ad7b8645fe10..0fc8e6b82c70 100644 --- a/sd/source/core/CustomAnimationPreset.cxx +++ b/sd/source/core/CustomAnimationPreset.cxx @@ -263,7 +263,7 @@ void CustomAnimationPresets::importEffects() uno::Sequence< OUString > aFiles; xNameAccess->getByName( "EffectFiles" ) >>= aFiles; - for( const auto& rFile : std::as_const(aFiles) ) + for (const auto& rFile : aFiles) { OUString aURL = comphelper::getExpandedUri(xContext, rFile); @@ -363,7 +363,7 @@ void CustomAnimationPresets::importPresets( const Reference< XMultiServiceFactor EffectDescriptorList aEffectsList; - for( const OUString& rEffectName : std::as_const(aEffects) ) + for (const OUString& rEffectName : aEffects) { CustomAnimationPresetPtr pEffect = getEffectDescriptor( rEffectName ); if( pEffect ) diff --git a/sd/source/core/TransitionPreset.cxx b/sd/source/core/TransitionPreset.cxx index 0fbec90cf108..03adee6e79ff 100644 --- a/sd/source/core/TransitionPreset.cxx +++ b/sd/source/core/TransitionPreset.cxx @@ -341,7 +341,7 @@ bool TransitionPreset::importTransitionPresetList( TransitionPresetList& rList ) uno::Sequence< OUString > aFiles; xNameAccess->getByName("TransitionFiles") >>= aFiles; - for( const auto& rFile : std::as_const(aFiles) ) + for (const auto& rFile : aFiles) { OUString aURL = comphelper::getExpandedUri(xContext, rFile); diff --git a/sd/source/filter/eppt/pptx-animations-nodectx.cxx b/sd/source/filter/eppt/pptx-animations-nodectx.cxx index 9efd07d6a665..0e00b680a8d3 100644 --- a/sd/source/filter/eppt/pptx-animations-nodectx.cxx +++ b/sd/source/filter/eppt/pptx-animations-nodectx.cxx @@ -69,7 +69,7 @@ bool initCondList(const Any& rAny, std::vector<Cond>& rList, bool bIsMainSeqChil Sequence<Any> aCondSeq; if (rAny >>= aCondSeq) { - for (const auto& rCond : std::as_const(aCondSeq)) + for (const auto& rCond : aCondSeq) { Cond aCond(rCond, bIsMainSeqChild); if (aCond.isValid()) diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 2148653dcd20..c431d9868cb3 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1751,7 +1751,7 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderShape(const Reference< XShap if (xProps->getPropertySetInfo()->hasPropertyByName("InteropGrabBag")) xProps->getPropertyValue("InteropGrabBag") >>= grabBag; - for (auto const& it : std::as_const(grabBag)) + for (auto const& it : grabBag) if (it.Name == "3DEffectProperties") bHas3DEffectinShape = true; diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx index 07a36e0eec98..ffe081ed1217 100644 --- a/sd/source/filter/ppt/pptinanimations.cxx +++ b/sd/source/filter/ppt/pptinanimations.cxx @@ -557,7 +557,7 @@ bool AnimationImporter::convertAnimationNode( const Reference< XAnimationNode >& bool bAfterEffect = false; sal_Int32 nMasterRel = 0; - for( const NamedValue& rValue : std::as_const(aUserData) ) + for (const NamedValue& rValue : aUserData) { if ( rValue.Name == "after-effect" ) { diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx index a553a0f7f8ac..a4b0d90bfead 100644 --- a/sd/source/filter/sdpptwrp.cxx +++ b/sd/source/filter/sdpptwrp.cxx @@ -262,7 +262,7 @@ bool SdPPTFilter::Export() Sequence<NamedValue> aStreams = xPackageEncryption->encrypt(xInputStream); tools::SvRef<SotStorage> xEncryptedRootStrg = new SotStorage(mrMedium.GetOutStream(), false); - for (const NamedValue & aStreamData : std::as_const(aStreams)) + for (const NamedValue& aStreamData : aStreams) { // To avoid long paths split and open substorages recursively // Splitting paths manually, since comphelper::string::split is trimming special characters like \0x01, \0x09 diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index db92bd2a820e..e8b6f55bc049 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -203,7 +203,7 @@ void SdTPAction::Construct() aVerbs = xObj->getSupportedVerbs(); } - for( const embed::VerbDescriptor& aVerb : std::as_const(aVerbs) ) + for (const embed::VerbDescriptor& aVerb : aVerbs) { if( aVerb.VerbAttributes & embed::VerbAttributes::MS_VERBATTR_ONCONTAINERMENU ) { diff --git a/sd/source/ui/framework/factories/ViewShellWrapper.cxx b/sd/source/ui/framework/factories/ViewShellWrapper.cxx index 294b7a550f60..2b590a5387a1 100644 --- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx +++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx @@ -113,7 +113,7 @@ sal_Bool SAL_CALL ViewShellWrapper::select( const css::uno::Any& aSelection ) rSelector.DeselectAllPages(); Sequence<Reference<drawing::XDrawPage> > xPages; aSelection >>= xPages; - for (const auto& rPage : std::as_const(xPages)) + for (const auto& rPage : xPages) { Reference<beans::XPropertySet> xSet (rPage, UNO_QUERY); if (xSet.is()) diff --git a/sd/source/ui/unoidl/SdUnoSlideView.cxx b/sd/source/ui/unoidl/SdUnoSlideView.cxx index d37c5fb0a229..904b4c507195 100644 --- a/sd/source/ui/unoidl/SdUnoSlideView.cxx +++ b/sd/source/ui/unoidl/SdUnoSlideView.cxx @@ -56,7 +56,7 @@ sal_Bool SAL_CALL SdUnoSlideView::select (const Any& aSelection) rSelector.DeselectAllPages(); Sequence<Reference<drawing::XDrawPage> > xPages; aSelection >>= xPages; - for (const auto& rPage : std::as_const(xPages)) + for (const auto& rPage : xPages) { Reference<beans::XPropertySet> xSet (rPage, UNO_QUERY); if (xSet.is()) diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index effb30fcecf5..1822bafe9155 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -1127,7 +1127,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno OUString aStrLibrary; OUString aStrBookmark; - for( const beans::PropertyValue& rProperty : std::as_const(aProperties) ) + for (const beans::PropertyValue& rProperty : aProperties) { if( !( nFound & FoundFlags::EventType ) && rProperty.Name == gaStrEventType ) { diff --git a/sdext/source/minimizer/fileopendialog.cxx b/sdext/source/minimizer/fileopendialog.cxx index ef0dbf4b4a43..44dfb51bc74f 100644 --- a/sdext/source/minimizer/fileopendialog.cxx +++ b/sdext/source/minimizer/fileopendialog.cxx @@ -67,7 +67,7 @@ FileOpenDialog::FileOpenDialog( const Reference< XComponentContext >& rxContext { FilterEntry aFilterEntry; bool bImpressFilter = false; - for ( const PropertyValue& rProperty : std::as_const(aFilterProperties) ) + for (const PropertyValue& rProperty : aFilterProperties) { bool bStop = false; switch( TKGet( rProperty.Name ) ) diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx index 72be9c666086..c46617175e1c 100644 --- a/sdext/source/minimizer/impoptimizer.cxx +++ b/sdext/source/minimizer/impoptimizer.cxx @@ -575,7 +575,7 @@ void ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments ) { css::uno::Sequence< css::beans::PropertyValue > aSettings; rArgument.Value >>= aSettings; - for ( const auto& rSetting : std::as_const(aSettings) ) + for (const auto& rSetting : aSettings) { switch( TKGet( rSetting.Name ) ) { diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 58963ceed2de..d3884203596a 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -949,13 +949,13 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) pViewFrame->GetDispatcher()->QueryState(SID_NOTEBOOKBAR, aNbItem); // Show toolbars - for ( const OUString& rName : std::as_const(aMandatoryToolbars) ) + for (const OUString& rName : aMandatoryToolbars) { xLayoutManager->createElement( rName ); xLayoutManager->showElement( rName ); } - for ( const OUString& rName : std::as_const(aUserToolbars) ) + for (const OUString& rName : aUserToolbars) { xLayoutManager->createElement( rName ); xLayoutManager->showElement( rName ); diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index 543c82ac4f45..69d9abcb9fb6 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -219,7 +219,7 @@ static OUString impl_getFilter( const OUString& _rURL ) if ( !sType.isEmpty() ) { // Honor a selected/detected filter. - for (const auto& rDescr : std::as_const(aDescrList)) + for (const auto& rDescr : aDescrList) { if (rDescr.Name == "FilterName") { diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index ef171e199fa3..c7253b9fcd86 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -391,7 +391,7 @@ ErrCode SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, std: uno::Sequence< beans::PropertyValue > lDescriptor = aDescriptor.getAsConstPropertyValueList(); sTypeName = xDetection->queryTypeByDescriptor(lDescriptor, true); // lDescriptor is used as In/Out param ... don't use aDescriptor.getAsConstPropertyValueList() directly! - for (const auto& rProp : std::as_const(lDescriptor)) + for (const auto& rProp : lDescriptor) { if (rProp.Name == "FilterName") // Type detection picked a preferred filter for this format. @@ -895,7 +895,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl( bool bEnabled = true ; // first get directly available properties - for( const auto& rFilterProperty : std::as_const(lFilterProperties) ) + for (const auto& rFilterProperty : lFilterProperties) { if ( rFilterProperty.Name == "FileFormatVersion" ) { @@ -951,7 +951,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl( if( aResult >>= lTypeProperties ) { // get indirect available properties then (types) - for( const auto& rTypeProperty : std::as_const(lTypeProperties) ) + for (const auto& rTypeProperty : lTypeProperties) { if ( rTypeProperty.Name == "ClipboardFormat" ) { diff --git a/sfx2/source/commandpopup/CommandPopup.cxx b/sfx2/source/commandpopup/CommandPopup.cxx index 3cc7b350dd12..73a39df2f5f8 100644 --- a/sfx2/source/commandpopup/CommandPopup.cxx +++ b/sfx2/source/commandpopup/CommandPopup.cxx @@ -64,7 +64,7 @@ void MenuContentHandler::gatherMenuContent( bool bIsVisible = true; bool bIsEnabled = true; - for (auto const& rProperty : std::as_const(aProperties)) + for (auto const& rProperty : aProperties) { OUString aPropertyName = rProperty.Name; if (aPropertyName == "CommandURL") diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx index c5aa79c2d036..7fa207dc6585 100644 --- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx +++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx @@ -758,7 +758,7 @@ void GenericPropertiesNode::fillChildren(std::unique_ptr<weld::TreeView>& pTree, { } - for (auto const& aInvocationInfo : std::as_const(aInvocationInfoSequence)) + for (auto const& aInvocationInfo : aInvocationInfoSequence) { if (aInvocationInfo.eMemberType == script::MemberType_PROPERTY) { diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 8ae4420769d4..a5d45f322603 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -2304,7 +2304,7 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName, Sequence< sal_Int64 > seqValue; rAny >>= seqValue; sal_uInt32 nIndex = m_aNumberFormatter.GetFormatIndex( NF_NUMBER_SYSTEM ); - for ( const auto& rValue : std::as_const(seqValue) ) + for (const auto& rValue : seqValue) { OUString sValue; m_aNumberFormatter.GetInputLineString( rValue, nIndex, sValue ); @@ -2318,7 +2318,7 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName, Sequence< double > seqValue; rAny >>= seqValue; sal_uInt32 nIndex = m_aNumberFormatter.GetFormatIndex( NF_NUMBER_SYSTEM ); - for ( const auto& rValue : std::as_const(seqValue) ) + for (const auto& rValue : seqValue) { OUString sValue; m_aNumberFormatter.GetInputLineString( rValue, nIndex, sValue ); @@ -2332,7 +2332,7 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName, { Sequence<sal_Bool> seqValue; rAny >>= seqValue; - for ( const auto& rValue : std::as_const(seqValue) ) + for (const auto& rValue : seqValue) { std::unique_ptr<CmisYesNo> pYesNo(new CmisYesNo(m_xBox.get(), rValue)); pYesNo->m_xYesButton->set_sensitive( bUpdatable ); @@ -2344,7 +2344,7 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName, { Sequence< OUString > seqValue; rAny >>= seqValue; - for ( const auto& rValue : std::as_const(seqValue) ) + for (const auto& rValue : seqValue) { std::unique_ptr<CmisValue> pValue(new CmisValue(m_xBox.get(), rValue)); pValue->m_xValueEdit->set_editable(bUpdatable); @@ -2355,7 +2355,7 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName, { Sequence< util::DateTime > seqValue; rAny >>= seqValue; - for ( const auto& rValue : std::as_const(seqValue) ) + for (const auto& rValue : seqValue) { std::unique_ptr<CmisDateTime> pDateTime(new CmisDateTime(m_xBox.get(), rValue)); pDateTime->m_xDateField->set_sensitive(bUpdatable); diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index f71501642fe8..b78a648ce8de 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -102,7 +102,7 @@ static bool lcl_getWindowState( const uno::Reference< container::XNameAccess >& a = xWindowStateMgr->getByName( rResourceURL ); if ( a >>= aWindowState ) { - for ( const auto& rProp : std::as_const(aWindowState) ) + for (const auto& rProp : aWindowState) { if ( rProp.Name == "UIName" ) { diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 96955837c8a6..450eac25c047 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -400,7 +400,7 @@ bool FileDialogHelper_Impl::CheckFilterOptionsCapability( const std::shared_ptr< if ( aAny >>= aProps ) { OUString aServiceName; - for( const auto& rProp : std::as_const(aProps) ) + for (const auto& rProp : aProps) { if( rProp.Name == "UIComponent" ) { diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index f98baad01b8a..58229d405d8e 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -135,7 +135,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog( if ( aAny >>= aProps ) { - for( const auto& rProp : std::as_const(aProps) ) + for (const auto& rProp : aProps) { if( rProp.Name == "UIComponent" ) { diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index ee667ed5d0bd..e5025b124384 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -169,7 +169,7 @@ void SfxObjectFactory::SetSystemTemplate( const OUString& rServiceName, const OU OUString aActualFilterTypeName; uno::Sequence< beans::PropertyValue > aActuralFilterData; xFilterFactory->getByName( aActualFilter ) >>= aActuralFilterData; - for ( const auto& rProp : std::as_const(aActuralFilterData) ) + for (const auto& rProp : aActuralFilterData) if ( rProp.Name == "Type" ) rProp.Value >>= aActualFilterTypeName; ::comphelper::SequenceAsHashMap aProps1( xTypeDetection->getByName( aActualFilterTypeName ) ); diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 157edc69f25a..6fee3f23f178 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -3853,7 +3853,7 @@ void SfxMedium::AddVersion_Impl( util::RevisionTag& rRevision ) // To determine a unique name for the stream std::vector<sal_uInt32> aLongs; sal_Int32 nLength = pImpl->aVersions.getLength(); - for ( const auto& rVersion : std::as_const(pImpl->aVersions) ) + for (const auto& rVersion : pImpl->aVersions) { sal_uInt32 nVer = static_cast<sal_uInt32>( o3tl::toInt32(rVersion.Identifier.subView(7))); size_t n; diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 20aecdd028a6..1bd57bd829e8 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -1754,7 +1754,7 @@ sal_Bool SfxDocTplService::storeTemplate( const OUString& rGroupName, uno::Sequence< beans::PropertyValue > aFilterData; xFilterFactory->getByName( aFilterName ) >>= aFilterData; OUString aTypeName; - for ( const auto& rProp : std::as_const(aFilterData) ) + for (const auto& rProp : aFilterData) if ( rProp.Name == "Type" ) rProp.Value >>= aTypeName; diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 341919356588..21275acea2f7 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -2268,7 +2268,7 @@ uno::Sequence< beans::PropertyValue > SfxObjectShell::GetDocumentProtectionFromG { uno::Sequence< beans::PropertyValue > propList; xPropSet->getPropertyValue( aGrabBagName ) >>= propList; - for( const auto& rProp : std::as_const(propList) ) + for (const auto& rProp : propList) { if (rProp.Name == "DocumentProtection") { diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 27fb68c83f87..1d9401714acf 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2988,7 +2988,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString& { uno::Sequence<beans::NamedValue> aEncryptionData; pEncryptionDataItem->GetValue() >>= aEncryptionData; - for (const auto& rItem : std::as_const(aEncryptionData)) + for (const auto& rItem : aEncryptionData) { if (rItem.Name == "CryptoType") { diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 3da83626a5ea..ad31130e514d 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -1079,7 +1079,7 @@ Sequence< beans::PropertyValue > SAL_CALL SfxBaseModel::getArgs2(const Sequence< Sequence< beans::PropertyValue > aFinalCache; sal_Int32 nFinalLength = 0; - for ( const auto& rOrg : std::as_const(m_pData->m_seqArguments) ) + for (const auto& rOrg : m_pData->m_seqArguments) { auto bNew = std::none_of(std::cbegin(seqArgsOld), std::cend(seqArgsOld), [&rOrg](const beans::PropertyValue& rOld){ return rOld.Name == rOrg.Name; }); diff --git a/sfx2/source/doc/watermarkitem.cxx b/sfx2/source/doc/watermarkitem.cxx index 4e64afd7ffbf..3f9d15544537 100644 --- a/sfx2/source/doc/watermarkitem.cxx +++ b/sfx2/source/doc/watermarkitem.cxx @@ -60,7 +60,7 @@ bool SfxWatermarkItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMemberI if ( rVal >>= aSequence ) { - for(const auto& aEntry : std::as_const(aSequence)) + for (const auto& aEntry : aSequence) { if(aEntry.Name == "Text") aEntry.Value >>= m_aText; diff --git a/sfx2/source/doc/zoomitem.cxx b/sfx2/source/doc/zoomitem.cxx index e4c160712b1d..049cfa39f951 100644 --- a/sfx2/source/doc/zoomitem.cxx +++ b/sfx2/source/doc/zoomitem.cxx @@ -106,7 +106,7 @@ bool SvxZoomItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) sal_Int16 nTypeTmp( 0 ); bool bAllConverted( true ); sal_Int16 nConvertedCount( 0 ); - for ( const auto& rProp : std::as_const(aSeq) ) + for (const auto& rProp : aSeq) { if ( rProp.Name == ZOOM_PARAM_VALUE ) { diff --git a/sfx2/source/notebookbar/NotebookbarTabControl.cxx b/sfx2/source/notebookbar/NotebookbarTabControl.cxx index d246f22cb676..16fe6a230323 100644 --- a/sfx2/source/notebookbar/NotebookbarTabControl.cxx +++ b/sfx2/source/notebookbar/NotebookbarTabControl.cxx @@ -309,7 +309,7 @@ void NotebookbarTabControl::FillShortcutsToolBox(Reference<XComponentContext> co sal_uInt16 nType = ItemType::DEFAULT; bool bVisible = true; - for ( const auto& aProp: std::as_const(aPropSequence) ) + for (const auto& aProp : aPropSequence) { if ( aProp.Name == "CommandURL" ) aProp.Value >>= aCommandURL; diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx index d6bff98de8f0..be47bed36cfb 100644 --- a/sfx2/source/notify/eventsupplier.cxx +++ b/sfx2/source/notify/eventsupplier.cxx @@ -190,7 +190,7 @@ void SfxEvents_Impl::Execute( css::uno::Sequence < css::beans::PropertyValue > c if ( !aProperties.hasElements() ) return; - for ( const auto& rProp : std::as_const(aProperties) ) + for (const auto& rProp : aProperties) { if ( rProp.Name == PROP_EVENT_TYPE ) rProp.Value >>= aType; @@ -349,7 +349,7 @@ std::unique_ptr<SvxMacro> SfxEvents_Impl::ConvertToMacro( const uno::Any& rEleme if ( !aProperties.hasElements() ) return pMacro; - for ( const auto& rProp : std::as_const(aProperties) ) + for (const auto& rProp : aProperties) { if ( rProp.Name == PROP_EVENT_TYPE ) rProp.Value >>= aType; diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx index d4e5b9722815..061039415c56 100644 --- a/sfx2/source/sidebar/ResourceManager.cxx +++ b/sfx2/source/sidebar/ResourceManager.cxx @@ -498,7 +498,7 @@ void ResourceManager::ReadContextList ( if (!(aValue >>= aValues)) return; - for (const OUString& sValue : std::as_const(aValues)) + for (const OUString& sValue : aValues) { sal_Int32 nCharacterIndex (0); const OUString sApplicationName (o3tl::trim(o3tl::getToken(sValue, 0, ',', nCharacterIndex))); diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index e9cd1f4642af..8374134e3fe3 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -1450,7 +1450,7 @@ void SAL_CALL SfxBaseController::appendInfobar(const OUString& sId, const OUStri if (!pInfoBar) throw uno::RuntimeException("Could not create Infobar"); - for (const StringPair & actionButton : std::as_const(actionButtons)) + for (const StringPair& actionButton : actionButtons) { if (actionButton.First.isEmpty() || actionButton.Second.isEmpty()) continue; diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx index 2128ae009ab2..4582cd9547a5 100644 --- a/shell/source/cmdmail/cmdmailsuppl.cxx +++ b/shell/source/cmdmail/cmdmailsuppl.cxx @@ -218,7 +218,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM // Append carbon copy recipients set in the message Sequence< OUString > aStringList = xSimpleMailMessage->getCcRecipient(); - for ( const auto& rString : std::as_const(aStringList) ) + for (const auto& rString : aStringList) { aBuffer.append(" --cc "); appendShellWord(aBuffer, rString, false); @@ -226,7 +226,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM // Append blind carbon copy recipients set in the message aStringList = xSimpleMailMessage->getBccRecipient(); - for ( const auto& rString : std::as_const(aStringList) ) + for (const auto& rString : aStringList) { aBuffer.append(" --bcc "); appendShellWord(aBuffer, rString, false); @@ -241,7 +241,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM // Append attachments set in the message aStringList = xSimpleMailMessage->getAttachement(); - for ( const auto& rString : std::as_const(aStringList) ) + for (const auto& rString : aStringList) { OUString aSystemPath; if ( FileBase::E_None == FileBase::getSystemPathFromFileURL(rString, aSystemPath) ) diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 695c48f1bab1..8a9207a2244b 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -626,7 +626,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* SmModule *pp = SM_MOD(); SmSymbolManager &rManager = pp->GetSymbolManager(); - for (const SymbolDescriptor& rDescriptor : std::as_const(aSequence)) + for (const SymbolDescriptor& rDescriptor : aSequence) { vcl::Font aFont; aFont.SetFamilyName ( rDescriptor.sFontName ); diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx index 815d7a6679c3..d531b455d7d5 100644 --- a/stoc/source/defaultregistry/defaultregistry.cxx +++ b/stoc/source/defaultregistry/defaultregistry.cxx @@ -758,10 +758,10 @@ Sequence< Reference< XRegistryKey > > SAL_CALL NestedKeyImpl::openKeys( ) return new NestedKeyImpl(name, this); }; - for (const auto& rKeyName : std::as_const(localSeq)) + for (const auto& rKeyName : localSeq) retVec.push_back(lKeyNameToRegKey(rKeyName)); - for (const auto& rKeyName : std::as_const(defaultSeq)) + for (const auto& rKeyName : defaultSeq) { if ( comphelper::findValue(localSeq, rKeyName) == -1 ) { diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx index ca8c6b2673df..074137324727 100644 --- a/stoc/source/implementationregistration/implreg.cxx +++ b/stoc/source/implementationregistration/implreg.cxx @@ -585,7 +585,7 @@ void deleteAllImplementations( const Reference < XSimpleRegistry >& xReg, { bool hasLocationUrl = false; - for (const Reference < XRegistryKey> & xImplKey : std::as_const(subKeys)) + for (const Reference<XRegistryKey>& xImplKey : subKeys) { Reference < XRegistryKey > xKey = xImplKey->openKey( slash_UNO_slash_LOCATION ); @@ -725,7 +725,7 @@ void deleteAllServiceEntries( const Reference < XSimpleRegistry >& xReg, { bool hasNoImplementations = false; - for (const Reference < XRegistryKey > & xServiceKey : std::as_const(subKeys)) + for (const Reference<XRegistryKey>& xServiceKey : subKeys) { if (xServiceKey->getValueType() == RegistryValueType_ASCIILIST) { diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 7ab9c4e5f116..20ac8ccd41c7 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -1754,7 +1754,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect( aClassSeq.realloc( nIfaceCount + 1 ); aClassSeq.getArray()[ nIfaceCount ] = xImplClass2; - for( const Reference<XIdlClass>& rxIfaceClass : std::as_const(aClassSeq) ) + for (const Reference<XIdlClass>& rxIfaceClass : aClassSeq) { if (!seen.insert(rxIfaceClass->getName()).second) { continue; diff --git a/svl/source/items/grabbagitem.cxx b/svl/source/items/grabbagitem.cxx index 39ee566866b3..c78768c53961 100644 --- a/svl/source/items/grabbagitem.cxx +++ b/svl/source/items/grabbagitem.cxx @@ -42,7 +42,7 @@ bool SfxGrabBagItem::PutValue(const uno::Any& rVal, sal_uInt8 /*nMemberId*/) if (rVal >>= aValue) { m_aMap.clear(); - for (beans::PropertyValue const& aPropertyValue : std::as_const(aValue)) + for (beans::PropertyValue const& aPropertyValue : aValue) { m_aMap[aPropertyValue.Name] = aPropertyValue.Value; } diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 91cacaa509cb..79265d7ebb09 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -3100,7 +3100,7 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset, // There is no harm though, on first invocation ImpGetDefaultFormat() will // use the first default encountered. aFormatSeq = rNumberFormatCode->getAllFormatCodes( aLocale ); - for ( const auto& rFormat : std::as_const(aFormatSeq) ) + for (const auto& rFormat : aFormatSeq) { if ( nPos - CLOffset >= SV_COUNTRY_LANGUAGE_OFFSET ) { diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 3564b56166f5..1ee18df73c3b 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -800,7 +800,7 @@ void AssignmentPersistentData::ImplCommit() bool bKnowOldTable = false; // fill the table list - for (const OUString& rTableName : std::as_const(aTableNames)) + for (const OUString& rTableName : aTableNames) { m_xTable->append_text(rTableName); if (rTableName == sOldTable) @@ -866,7 +866,7 @@ void AssignmentPersistentData::ImplCommit() pListbox->set_id(0, OUString::number(i)); // the field names - for (const OUString& rColumnName : std::as_const(aColumnNames)) + for (const OUString& rColumnName : aColumnNames) pListbox->append_text(rColumnName); if (!aInitialSelection->isEmpty() && (aColumnNameSet.end() != aColumnNameSet.find(*aInitialSelection))) diff --git a/svtools/source/dialogs/colrdlg.cxx b/svtools/source/dialogs/colrdlg.cxx index 67c52b55d754..cd4c73573d8b 100644 --- a/svtools/source/dialogs/colrdlg.cxx +++ b/svtools/source/dialogs/colrdlg.cxx @@ -85,7 +85,7 @@ short SvColorDialog::Execute(weld::Window* pParent) if( ret ) { props = xPropertyAccess->getPropertyValues(); - for( const auto& rProp : std::as_const(props) ) + for (const auto& rProp : props) { if( rProp.Name == sColor ) { @@ -146,7 +146,7 @@ IMPL_LINK( SvColorDialog, DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, Reference< XPropertyAccess > xPropertyAccess( mxDialog, UNO_QUERY_THROW ); Sequence< PropertyValue > props = xPropertyAccess->getPropertyValues(); - for( const auto& rProp : std::as_const(props) ) + for (const auto& rProp : props) { if( rProp.Name == sColor ) { diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx index 8d8fbeed71a2..4291c15a88eb 100644 --- a/svtools/source/filter/SvFilterOptionsDialog.cxx +++ b/svtools/source/filter/SvFilterOptionsDialog.cxx @@ -167,7 +167,7 @@ void SvFilterOptionsDialog::setPropertyValues( const uno::Sequence< beans::Prope { maMediaDescriptor = aProps; - for ( const auto& rProp : std::as_const(maMediaDescriptor) ) + for (const auto& rProp : maMediaDescriptor) { if ( rProp.Name == "FilterData" ) { @@ -191,7 +191,7 @@ sal_Int16 SvFilterOptionsDialog::execute() OUString aInternalFilterName; uno::Reference<graphic::XGraphic> xGraphic; - for ( const auto& rProp : std::as_const(maMediaDescriptor) ) + for (const auto& rProp : maMediaDescriptor) { const OUString& rName = rProp.Name; if ( rName == "FilterName" ) diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index 4c0d31ef3eb3..85376581ee51 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -241,7 +241,7 @@ static OUString GetImageExtensionByFactory_Impl( const OUString& rURL ) if ( !aInternalType.isEmpty() && xAccess->hasByName( aInternalType ) ) { xAccess->getByName( aInternalType ) >>= aTypeProps; - for ( const css::beans::PropertyValue& rProp : std::as_const(aTypeProps) ) + for (const css::beans::PropertyValue& rProp : aTypeProps) { if (rProp.Name == "Extensions") { diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx index 1a4b6f4baa38..853815e7d161 100644 --- a/svtools/source/uno/unoevent.cxx +++ b/svtools/source/uno/unoevent.cxx @@ -114,7 +114,7 @@ void getMacroFromAny( OUString sScriptVal; OUString sMacroVal; OUString sLibVal; - for (const PropertyValue& aValue : std::as_const(aSequence)) + for (const PropertyValue& aValue : aSequence) { if (aValue.Name == sEventType) { diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx index b5615a5b7c5f..617c97300c43 100644 --- a/svx/qa/unit/customshapes.cxx +++ b/svx/qa/unit/customshapes.cxx @@ -1242,7 +1242,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") { @@ -1251,7 +1251,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") { @@ -1334,7 +1334,7 @@ bool lcl_getShapeCoordinates(uno::Sequence<drawing::EnhancedCustomShapeParameter 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") { @@ -1343,7 +1343,7 @@ bool lcl_getShapeCoordinates(uno::Sequence<drawing::EnhancedCustomShapeParameter } } - for (beans::PropertyValue const& rProp : std::as_const(aPathProps)) + for (beans::PropertyValue const& rProp : aPathProps) { if (rProp.Name == "Coordinates") { diff --git a/svx/qa/unit/gluepointTest.cxx b/svx/qa/unit/gluepointTest.cxx index 07eb7f3fe9e0..fbade68c3558 100644 --- a/svx/qa/unit/gluepointTest.cxx +++ b/svx/qa/unit/gluepointTest.cxx @@ -62,7 +62,7 @@ bool lcl_getGeometryGluePoints( 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") { @@ -71,7 +71,7 @@ bool lcl_getGeometryGluePoints( } } - for (beans::PropertyValue const& rProp : std::as_const(aPathProps)) + for (beans::PropertyValue const& rProp : aPathProps) { if (rProp.Name == "GluePoints") { diff --git a/svx/source/accessibility/lookupcolorname.cxx b/svx/source/accessibility/lookupcolorname.cxx index 373dae4693fa..b9a546a238fd 100644 --- a/svx/source/accessibility/lookupcolorname.cxx +++ b/svx/source/accessibility/lookupcolorname.cxx @@ -79,7 +79,7 @@ ColorNameMap::ColorNameMap() if (!xNA.is()) return; - for (const auto& rName : std::as_const(aNames)) + for (const auto& rName : aNames) { // Get the numerical value for the i-th color name. try diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx index f9376d4d719d..cbe90a4cc07a 100644 --- a/svx/source/core/graphichelper.cxx +++ b/svx/source/core/graphichelper.cxx @@ -328,7 +328,7 @@ OUString GraphicHelper::ExportGraphic(weld::Window* pParent, const Graphic& rGra sal_Int32 nWidth = 0; sal_Int32 nHeight = 0; - for (const auto& rProp : std::as_const(aFilterData)) + for (const auto& rProp : aFilterData) { if (rProp.Name == "PixelWidth") { diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index b72943050e8a..ae194b8fcdea 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -2077,7 +2077,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32 nSegInfoSize = m_seqSegments.getLength(); if ( !nSegInfoSize ) { - for ( const EnhancedCustomShapeParameterPair& rCoordinate : std::as_const(m_seqCoordinates) ) + for (const EnhancedCustomShapeParameterPair& rCoordinate : m_seqCoordinates) { const Point aTempPoint(GetPoint( rCoordinate, true, true )); aNewB2DPolygon.append(basegfx::B2DPoint(aTempPoint.X(), aTempPoint.Y())); @@ -3042,7 +3042,7 @@ void EnhancedCustomShape2d::ApplyGluePoints( SdrObject* pObj ) if ( !pObj ) return; - for ( const auto& rGluePoint : std::as_const(m_seqGluePoints) ) + for (const auto& rGluePoint : m_seqGluePoints) { SdrGluePoint aGluePoint; diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index cb4977463984..1d554bdfa8db 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -114,7 +114,7 @@ void SAL_CALL EnhancedCustomShapeEngine::initialize( const Sequence< Any >& aArg if ( rArgument >>= aParameter ) break; } - for ( const beans::PropertyValue& rProp : std::as_const(aParameter) ) + for (const beans::PropertyValue& rProp : aParameter) { if ( rProp.Name == "CustomShape" ) rProp.Value >>= mxShape; diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index 63a5e5dce802..802e881ec1da 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -290,7 +290,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) aLevelAny >>= aLevel; aNumberingTypes[i] = 0; aParentNumberings[i] = 0; - for(const PropertyValue& rProp : std::as_const(aLevel)) + for (const PropertyValue& rProp : aLevel) { if ( rProp.Name == "NumberingType" ) rProp.Value >>= aNumberingTypes[i]; diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 4ab6a9f757f8..2fe0a5430e03 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -1379,7 +1379,7 @@ void FmGridControl::DeleteSelectedRows() else { // select the remaining rows - for (const sal_Int32 nSuccess : std::as_const(aDeletedRows)) + for (const sal_Int32 nSuccess : aDeletedRows) { try { diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index e8c56fb0ac38..83862229388b 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -2485,7 +2485,7 @@ void DbComboBox::SetList(const Any& rItems) css::uno::Sequence<OUString> aTest; if (rItems >>= aTest) { - for (const OUString& rString : std::as_const(aTest)) + for (const OUString& rString : aTest) rComboBox.append_text(rString); // tell the grid control that this controller is invalid and has to be re-initialized @@ -2604,7 +2604,7 @@ void DbListBox::SetList(const Any& rItems) if (aTest.hasElements()) { - for (const OUString& rString : std::as_const(aTest)) + for (const OUString& rString : aTest) rFieldList.append_text(rString); m_rColumn.getModel()->getPropertyValue(FM_PROP_VALUE_SEQ) >>= m_aValueList; @@ -2768,14 +2768,14 @@ void DbFilterField::SetList(const Any& rItems, bool bComboBox) { ComboBoxControl* pField = static_cast<ComboBoxControl*>(m_pWindow.get()); weld::ComboBox& rComboBox = pField->get_widget(); - for (const OUString& rString : std::as_const(aTest)) + for (const OUString& rString : aTest) rComboBox.append_text(rString); } else { ListBoxControl* pField = static_cast<ListBoxControl*>(m_pWindow.get()); weld::ComboBox& rFieldBox = pField->get_widget(); - for (const OUString& rString : std::as_const(aTest)) + for (const OUString& rString : aTest) rFieldBox.append_text(rString); m_rColumn.getModel()->getPropertyValue(FM_PROP_VALUE_SEQ) >>= m_aValueList; diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx index aa4bab9a3613..9637a09d79a4 100644 --- a/svx/source/form/databaselocationinput.cxx +++ b/svx/source/form/databaselocationinput.cxx @@ -90,7 +90,7 @@ namespace svx // forward the allowed extensions to the input control OUStringBuffer aExtensionList; - for ( auto const & extension : std::as_const(m_aFilterExtensions) ) + for (auto const& extension : m_aFilterExtensions) { aExtensionList.append( extension + ";" ); } diff --git a/svx/source/form/fmexch.cxx b/svx/source/form/fmexch.cxx index fcc814c92c16..2746015e1c03 100644 --- a/svx/source/form/fmexch.cxx +++ b/svx/source/form/fmexch.cxx @@ -230,7 +230,7 @@ namespace svxform { ListBoxEntrySet().swap(m_aSelectedEntries); - for (const css::uno::Sequence<sal_uInt32>& rPaths : std::as_const(m_aControlPaths)) + for (const css::uno::Sequence<sal_uInt32>& rPaths : m_aControlPaths) { std::unique_ptr<weld::TreeIter> xSearch(pTreeBox->make_iterator(pRoot)); for (const sal_uInt32 nThisPath : rPaths) diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 0b90875f4c5b..53434970d5d5 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -3312,7 +3312,7 @@ void FmXFormShell::CreateExternalView_Lock() aColumnProps.realloc(nExistentDescs + aProps.getLength()); pColumnProps = aColumnProps.getArray() + nExistentDescs; - for (const Property& rProp : std::as_const(aProps)) + for (const Property& rProp : aProps) { if (rProp.Name == FM_PROP_LABEL) // already set diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index e39367b98353..993cb8ffada6 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -1971,7 +1971,7 @@ void FormController::setContainer(const Reference< XControlContainer > & xContai m_aFilterComponents.clear(); // collecting the controls - for ( const Reference< XControl >& rControl : std::as_const(m_aControls) ) + for (const Reference<XControl>& rControl : m_aControls) implControlRemoved( rControl, true ); // make database-specific things @@ -2161,7 +2161,7 @@ void FormController::setLocks() { OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" ); // lock/unlock all controls connected to a data source - for ( const Reference< XControl >& rControl : std::as_const(m_aControls) ) + for (const Reference<XControl>& rControl : m_aControls) setControlLock( rControl ); } @@ -2299,7 +2299,7 @@ void FormController::startListening() m_bModified = false; // now register at bound fields - for ( const Reference< XControl >& rControl : std::as_const(m_aControls) ) + for (const Reference<XControl>& rControl : m_aControls) startControlModifyListening( rControl ); } @@ -2310,7 +2310,7 @@ void FormController::stopListening() m_bModified = false; // now register at bound fields - for ( const Reference< XControl >& rControl : std::as_const(m_aControls) ) + for (const Reference<XControl>& rControl : m_aControls) stopControlModifyListening( rControl ); } @@ -2619,7 +2619,7 @@ void FormController::unload() void FormController::removeBoundFieldListener() { - for ( const Reference< XControl >& rControl : std::as_const(m_aControls) ) + for (const Reference<XControl>& rControl : m_aControls) { Reference< XPropertySet > xProp( rControl, UNO_QUERY ); if ( xProp.is() ) diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 8285419d1809..08d6f969d234 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -183,7 +183,7 @@ void SAL_CALL GalleryThemePopup::statusChanged( else if ( ( rEvent.State >>= sItems ) && sItems.hasElements() ) { sal_uInt16 nId = 1; - for ( const OUString& rStr : std::as_const(sItems) ) + for (const OUString& rStr : sItems) { mxBackgroundPopup->append(OUString::number(nId), rStr); nId++; diff --git a/svx/source/items/galleryitem.cxx b/svx/source/items/galleryitem.cxx index 5e50c5efbe3c..dd14acafb383 100644 --- a/svx/source/items/galleryitem.cxx +++ b/svx/source/items/galleryitem.cxx @@ -80,7 +80,7 @@ bool SvxGalleryItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /* nMemberId css::uno::Reference< css::lang::XComponent > xDrawing; css::uno::Reference< css::graphic::XGraphic > xGraphic; - for ( const css::beans::PropertyValue& rProp : std::as_const(aSeq) ) + for (const css::beans::PropertyValue& rProp : aSeq) { if ( rProp.Name == SVXGALLERYITEM_TYPE ) { diff --git a/svx/source/items/statusitem.cxx b/svx/source/items/statusitem.cxx index d856775db1f8..e2e1c74307dc 100644 --- a/svx/source/items/statusitem.cxx +++ b/svx/source/items/statusitem.cxx @@ -75,7 +75,7 @@ bool SvxStatusItem::PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId) sal_Int16 nTypeTmp(0); bool bAllConverted(true); sal_Int16 nConvertedCount(0); - for (const auto& rProp : std::as_const(aSeq)) + for (const auto& rProp : aSeq) { if (rProp.Name == STATUS_PARAM_VALUE) { diff --git a/svx/source/items/viewlayoutitem.cxx b/svx/source/items/viewlayoutitem.cxx index 839f49a3614a..78a03efb5edd 100644 --- a/svx/source/items/viewlayoutitem.cxx +++ b/svx/source/items/viewlayoutitem.cxx @@ -112,7 +112,7 @@ bool SvxViewLayoutItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId bool bBookMode = false; bool bAllConverted( true ); sal_Int16 nConvertedCount( 0 ); - for ( const auto& rProp : std::as_const(aSeq) ) + for (const auto& rProp : aSeq) { if ( rProp.Name == VIEWLAYOUT_PARAM_COLUMNS ) { diff --git a/svx/source/items/zoomslideritem.cxx b/svx/source/items/zoomslideritem.cxx index b59247b00d31..bd7313904710 100644 --- a/svx/source/items/zoomslideritem.cxx +++ b/svx/source/items/zoomslideritem.cxx @@ -118,7 +118,7 @@ bool SvxZoomSliderItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId sal_Int16 nConvertedCount( 0 ); sal_Int32 nMinZoom( 0 ), nMaxZoom( 0 ); - for ( const auto& rProp : std::as_const(aSeq) ) + for (const auto& rProp : aSeq) { if ( rProp.Name == ZOOMSLIDER_PARAM_CURRENTZOOM ) { diff --git a/svx/source/mnuctrls/smarttagmenu.cxx b/svx/source/mnuctrls/smarttagmenu.cxx index f914be7d34e9..3c336ddbe281 100644 --- a/svx/source/mnuctrls/smarttagmenu.cxx +++ b/svx/source/mnuctrls/smarttagmenu.cxx @@ -83,7 +83,7 @@ void SmartTagMenuController::statusChanged( const css::frame::FeatureStateEvent& OUString aApplicationName; OUString aRangeText; - for ( const auto& aProperty : std::as_const(aProperties) ) + for (const auto& aProperty : aProperties) { if ( aProperty.Name == "ActionComponents" ) aProperty.Value >>= aActionComponents; diff --git a/svx/source/smarttags/SmartTagMgr.cxx b/svx/source/smarttags/SmartTagMgr.cxx index e53576dc583a..f62af603dfaf 100644 --- a/svx/source/smarttags/SmartTagMgr.cxx +++ b/svx/source/smarttags/SmartTagMgr.cxx @@ -425,7 +425,7 @@ void SmartTagMgr::ReadConfiguration( bool bExcludedTypes, bool bRecognize ) Sequence< OUString > aValues; aAny >>= aValues; - for ( const auto& rValue : std::as_const(aValues) ) + for (const auto& rValue : aValues) maDisabledSmartTagTypes.insert( rValue ); } diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index 5878c8cd9915..1dc75c4975b3 100644 --- a/svx/source/svdraw/svdogrp.cxx +++ b/svx/source/svdraw/svdogrp.cxx @@ -208,7 +208,7 @@ SdrObjList* SdrObjGroup::GetSubList() const static bool containsOOXData(const css::uno::Any& rVal) { const css::uno::Sequence<css::beans::PropertyValue>& propList(rVal.get< css::uno::Sequence<css::beans::PropertyValue> >()); - for (const auto& rProp : std::as_const(propList)) + for (const auto& rProp : propList) { if(rProp.Name.startsWith("OOX")) { diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx index 638406e4de15..fb7e49e9c5b5 100644 --- a/svx/source/unogallery/unogalthemeprovider.cxx +++ b/svx/source/unogallery/unogalthemeprovider.cxx @@ -127,7 +127,7 @@ void SAL_CALL GalleryThemeProvider::initialize( const uno::Sequence< uno::Any >& break; } - for( const beans::PropertyValue& rProp : std::as_const(aParams) ) + for (const beans::PropertyValue& rProp : aParams) { if ( rProp.Name == "ProvideHiddenThemes" ) rProp.Value >>= mbHiddenThemes; diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index 68b40d539cd0..c4dd3d292b00 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -821,7 +821,7 @@ bool XLineDashItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) css::drawing::LineDash aLineDash; OUString aName; bool bLineDash( false ); - for ( const auto& rProp : std::as_const(aPropSeq) ) + for (const auto& rProp : aPropSeq) { if ( rProp.Name == "Name" ) rProp.Value >>= aName; @@ -2344,7 +2344,7 @@ bool XFillGradientItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId { OUString aName; - for ( const auto& rProp : std::as_const(aPropSeq) ) + for (const auto& rProp : aPropSeq) { if ( rProp.Name == "Name" ) rProp.Value >>= aName; @@ -2789,7 +2789,7 @@ bool XFillHatchItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) css::drawing::Hatch aUnoHatch; OUString aName; bool bHatch( false ); - for ( const auto& rProp : std::as_const(aPropSeq) ) + for (const auto& rProp : aPropSeq) { if ( rProp.Name == "Name" ) rProp.Value >>= aName; diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index 2401bb361a9b..bf6c3c21d299 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -260,7 +260,7 @@ bool XFillBitmapItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) uno::Sequence< beans::PropertyValue > aPropSeq; if( rVal >>= aPropSeq ) { - for ( const auto& rProp : std::as_const(aPropSeq) ) + for (const auto& rProp : aPropSeq) { if ( rProp.Name == "Name" ) bSetName = (rProp.Value >>= aName); diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx index 5f46f129e261..92f1fbc3a878 100644 --- a/sw/qa/extras/globalfilter/globalfilter.cxx +++ b/sw/qa/extras/globalfilter/globalfilter.cxx @@ -1134,7 +1134,7 @@ void Test::testBulletAsImage() awt::Size aSize; sal_Int16 nNumberingType = -1; - for (beans::PropertyValue const & rProperty : std::as_const(aProperties)) + for (beans::PropertyValue const& rProperty : aProperties) { if (rProperty.Name == "NumberingType") { @@ -1182,7 +1182,7 @@ void Test::testBulletAsImage() awt::Size aSize; sal_Int16 nNumberingType = -1; - for (beans::PropertyValue const & rProperty : std::as_const(aProperties)) + for (beans::PropertyValue const& rProperty : aProperties) { if (rProperty.Name == "NumberingType") { diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx b/sw/qa/extras/htmlimport/htmlimport.cxx index dd27b2d24988..10a886c27388 100644 --- a/sw/qa/extras/htmlimport/htmlimport.cxx +++ b/sw/qa/extras/htmlimport/htmlimport.cxx @@ -148,7 +148,7 @@ CPPUNIT_TEST_FIXTURE(HtmlImportTest, testListStyleType) xLevels->getByIndex(0) >>= aProps; // 1st level bool bBulletFound=false; - for (beans::PropertyValue const & rProp : std::as_const(aProps)) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "BulletChar") { @@ -167,7 +167,7 @@ CPPUNIT_TEST_FIXTURE(HtmlImportTest, testListStyleType) uno::UNO_QUERY); xLevels->getByIndex(0) >>= aProps; // 1st level - for (beans::PropertyValue const & rProp : std::as_const(aProps)) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "NumberingType") { diff --git a/sw/qa/extras/odfexport/odfexport2.cxx b/sw/qa/extras/odfexport/odfexport2.cxx index 00ad45301810..fb72969adf64 100644 --- a/sw/qa/extras/odfexport/odfexport2.cxx +++ b/sw/qa/extras/odfexport/odfexport2.cxx @@ -759,7 +759,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf57317_autoListName) uno::UNO_QUERY); uno::Sequence<beans::PropertyValue> aProps; xLevels->getByIndex(0) >>= aProps; - for (beans::PropertyValue const& rProp : std::as_const(aProps)) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "BulletChar") return; diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 26687b36474e..9efc4ac15a97 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -824,7 +824,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf89890, "tdf89890.docx") xLevels->getByIndex(0) >>= aProps; // 1st level bool bFound = false; - for (beans::PropertyValue const & rProp : std::as_const(aProps)) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "GraphicSize") { diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 1a5e0683d757..005dd52b07d7 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -233,7 +233,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf82065_Ind_start_strict, "tdf82065_Ind_start_stri uno::Sequence<beans::PropertyValue> aProps; xLevels->getByIndex(0) >>= aProps; // 1st level bool bFoundIndentAt = false; - for (beans::PropertyValue const & rProp : std::as_const(aProps)) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "IndentAt") { diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx index 4128862c17db..febcec916aae 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx @@ -447,7 +447,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCustomShapePresetExport) auto aCustomShapeGeometry = xProperties->getPropertyValue("CustomShapeGeometry") .get<uno::Sequence<beans::PropertyValue>>(); // Find for shape type - for (const auto& aCustomGeometryIterator : std::as_const(aCustomShapeGeometry)) + for (const auto& aCustomGeometryIterator : aCustomShapeGeometry) { if (aCustomGeometryIterator.Name == "Type") CPPUNIT_ASSERT_MESSAGE( diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx index e18c1eebca5e..f8defa15d1a2 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx @@ -679,7 +679,7 @@ DECLARE_OOXMLEXPORT_TEST(testI120928, "i120928.docx") uno::Reference<awt::XBitmap> xBitmap; sal_Int16 nNumberingType = -1; - for (beans::PropertyValue const & rProp : std::as_const(aProps)) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "NumberingType") nNumberingType = rProp.Value.get<sal_Int16>(); @@ -959,7 +959,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo66781, "fdo66781.docx") uno::Sequence<beans::PropertyValue> aProps; xLevels->getByIndex(0) >>= aProps; // 1st level - for (beans::PropertyValue const & rProp : std::as_const(aProps)) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "BulletChar") { diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx index bb20cec1a508..2b87533b51b9 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx @@ -184,7 +184,7 @@ CPPUNIT_TEST_FIXTURE(Test, testStyleInheritance) // Check latent styles uno::Sequence<beans::PropertyValue> aGrabBag = getProperty< uno::Sequence<beans::PropertyValue> >(mxComponent, "InteropGrabBag"); uno::Sequence<beans::PropertyValue> aLatentStyles; - for (beans::PropertyValue const & prop : std::as_const(aGrabBag)) + for (beans::PropertyValue const& prop : aGrabBag) if (prop.Name == "latentStyles") prop.Value >>= aLatentStyles; CPPUNIT_ASSERT(aLatentStyles.getLength()); // document should have latent styles @@ -192,7 +192,7 @@ CPPUNIT_TEST_FIXTURE(Test, testStyleInheritance) // Check latent style default attributes OUString aCount; uno::Sequence<beans::PropertyValue> aLatentStyleExceptions; - for (beans::PropertyValue const & prop : std::as_const(aLatentStyles)) + for (beans::PropertyValue const& prop : aLatentStyles) { if (prop.Name == "count") aCount = prop.Value.get<OUString>(); @@ -205,7 +205,7 @@ CPPUNIT_TEST_FIXTURE(Test, testStyleInheritance) uno::Sequence<beans::PropertyValue> aLatentStyleException; aLatentStyleExceptions[0].Value >>= aLatentStyleException; OUString aName; - for (beans::PropertyValue const & prop : std::as_const(aLatentStyleException)) + for (beans::PropertyValue const& prop : aLatentStyleException) if (prop.Name == "name") aName = prop.Value.get<OUString>(); CPPUNIT_ASSERT_EQUAL(OUString("Normal"), aName); // This checks the "name" attribute of the first exception. @@ -415,7 +415,7 @@ DECLARE_OOXMLEXPORT_TEST(testSmartart, "smartart.docx") CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty bool bTheme = false; - for(beans::PropertyValue const & prop : std::as_const(aGrabBag)) + for (beans::PropertyValue const& prop : aGrabBag) { if (prop.Name == "OOXTheme") { @@ -437,7 +437,7 @@ DECLARE_OOXMLEXPORT_TEST(testSmartart, "smartart.docx") CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty bool bData = false, bLayout = false, bQStyle = false, bColor = false, bDrawing = false; - for(beans::PropertyValue const & prop : std::as_const(aGrabBag)) + for (beans::PropertyValue const& prop : aGrabBag) { if (prop.Name == "OOXData") { @@ -530,7 +530,7 @@ DECLARE_OOXMLEXPORT_TEST(testCustomXmlGrabBag, "customxml.docx") xTextDocumentPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag; CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty bool CustomXml = false; - for(beans::PropertyValue const & prop : std::as_const(aGrabBag)) + for (beans::PropertyValue const& prop : aGrabBag) { if (prop.Name == "OOXCustomXml" || prop.Name == "OOXCustomXmlProps") { diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx index 83fd5b7ff3cf..a7f63f811b2a 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx @@ -180,7 +180,7 @@ DECLARE_OOXMLEXPORT_TEST(testDMLCustomGeometry, "dml-customgeometry-cubicbezier. } uno::Sequence<drawing::EnhancedCustomShapeParameterPair> aPairs; uno::Sequence<drawing::EnhancedCustomShapeSegment> aSegments; - for (beans::PropertyValue const & rProp : std::as_const(aPathProps)) + for (beans::PropertyValue const& rProp : aPathProps) { if (rProp.Name == "Coordinates") rProp.Value >>= aPairs; diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx index 6e4cd0ae48fc..4ab893ab2483 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx @@ -773,7 +773,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo59638, "fdo59638.docx") uno::Sequence<beans::PropertyValue> aProps; xLevels->getByIndex(0) >>= aProps; // 1st level - for (beans::PropertyValue const & rProp : std::as_const(aProps)) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "BulletChar") { diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index b5f2eafdc6ae..e9bc24315d6b 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1568,7 +1568,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf101626) uno::Sequence<beans::PropertyValue> aProps; xLevels->getByIndex(0) >>= aProps; // 1st level - for (beans::PropertyValue const & rProp : std::as_const(aProps)) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "BulletChar") { @@ -1589,7 +1589,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf106606) uno::Sequence<beans::PropertyValue> aProps; xLevels->getByIndex( 0 ) >>= aProps; // 1st level - for ( beans::PropertyValue const & rProp : std::as_const(aProps)) + for (beans::PropertyValue const& rProp : aProps) { // If the image was prematurely removed from cache when processed for previous numbering list, then the sequence hasn't the property. if ( rProp.Name == "GraphicBitmap" ) diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index ed2d5371dfc4..a9059ab2c14a 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -830,7 +830,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf103345) uno::Sequence<beans::PropertyValue> aProps; xLevels->getByIndex(0) >>= aProps; // 1st level - for (beans::PropertyValue const& prop : std::as_const(aProps)) + for (beans::PropertyValue const& prop : aProps) { if (prop.Name == "NumberingType") { diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 227eedf78f6f..f10270927e00 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -421,7 +421,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo53113) rProp.Value >>= aPathProps; } uno::Sequence<drawing::EnhancedCustomShapeParameterPair> aPairs; - for (beans::PropertyValue const& rProp : std::as_const(aPathProps)) + for (beans::PropertyValue const& rProp : aPathProps) { if (rProp.Name == "Coordinates") rProp.Value >>= aPairs; @@ -544,7 +544,7 @@ DECLARE_RTFEXPORT_TEST(testI120928, "i120928.rtf") uno::Reference<awt::XBitmap> xBitmap; sal_Int16 nNumberingType = -1; - for (beans::PropertyValue const& rProp : std::as_const(aProps)) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "NumberingType") nNumberingType = rProp.Value.get<sal_Int16>(); @@ -695,7 +695,7 @@ DECLARE_RTFEXPORT_TEST(testFdo66682, "fdo66682.rtf") xLevels->getByIndex(0) >>= aProps; // 1st level OUString aListFormat; - for (beans::PropertyValue const& rProp : std::as_const(aProps)) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "ListFormat") aListFormat = rProp.Value.get<OUString>(); diff --git a/sw/qa/extras/rtfexport/rtfexport2.cxx b/sw/qa/extras/rtfexport/rtfexport2.cxx index 8e82062cfd41..4327a3911c5b 100644 --- a/sw/qa/extras/rtfexport/rtfexport2.cxx +++ b/sw/qa/extras/rtfexport/rtfexport2.cxx @@ -883,7 +883,7 @@ DECLARE_RTFEXPORT_TEST(testFdo59638, "fdo59638.rtf") uno::Sequence<beans::PropertyValue> aProps; xLevels->getByIndex(0) >>= aProps; // 1st level - for (beans::PropertyValue const& rProp : std::as_const(aProps)) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "BulletChar") { diff --git a/sw/qa/extras/rtfexport/rtfexport7.cxx b/sw/qa/extras/rtfexport/rtfexport7.cxx index 431cb92b38bc..61c06869b9a8 100644 --- a/sw/qa/extras/rtfexport/rtfexport7.cxx +++ b/sw/qa/extras/rtfexport/rtfexport7.cxx @@ -538,7 +538,7 @@ DECLARE_RTFEXPORT_TEST(testTdf104085, "tdf104085.rtf") uno::UNO_QUERY); uno::Sequence<beans::PropertyValue> aProps; xLevels->getByIndex(0) >>= aProps; - for (beans::PropertyValue const& prop : std::as_const(aProps)) + for (beans::PropertyValue const& prop : aProps) { if (prop.Name == "BulletChar") return; @@ -566,7 +566,7 @@ DECLARE_RTFEXPORT_TEST(testLeveljcCenter, "leveljc-center.rtf") uno::UNO_QUERY); uno::Sequence<beans::PropertyValue> aProps; xLevels->getByIndex(0) >>= aProps; - for (beans::PropertyValue const& prop : std::as_const(aProps)) + for (beans::PropertyValue const& prop : aProps) { if (prop.Name == "Adjust") { diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 21b7358c3df8..52135cc6e11c 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -2011,7 +2011,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf81995) uno::Sequence<beans::PropertyValue> aProps; rIndexAccess->getByIndex(j) >>= aProps; CPPUNIT_ASSERT_EQUAL(sal_Int32(12), aProps.getLength()); - for(const beans::PropertyValue& rProp : std::as_const(aProps)) + for (const beans::PropertyValue& rProp : aProps) { uno::Any aAny = rProp.Value; if(rProp.Name == "Prefix" || rProp.Name == "Suffix" || rProp.Name == "BulletChar" || rProp.Name == "BulletFontName" || rProp.Name == "Transliteration") diff --git a/sw/source/core/crsr/DropDownFormFieldButton.cxx b/sw/source/core/crsr/DropDownFormFieldButton.cxx index eb06bcc5ac2a..2198fcf80982 100644 --- a/sw/source/core/crsr/DropDownFormFieldButton.cxx +++ b/sw/source/core/crsr/DropDownFormFieldButton.cxx @@ -33,7 +33,7 @@ void DropDownFormFieldButton::InitDropdown() if (pListEntries != pParameters->end()) { pListEntries->second >>= vListEntries; - for (OUString const& i : std::as_const(vListEntries)) + for (OUString const& i : vListEntries) m_xTreeView->append_text(i); } diff --git a/sw/source/core/crsr/bookmark.cxx b/sw/source/core/crsr/bookmark.cxx index 24114b141b56..60aee0b19197 100644 --- a/sw/source/core/crsr/bookmark.cxx +++ b/sw/source/core/crsr/bookmark.cxx @@ -1007,7 +1007,7 @@ namespace sw::mark if (pListEntriesIter != pParameters->end()) { pListEntriesIter->second >>= vListEntries; - for (const OUString& sItem : std::as_const(vListEntries)) + for (const OUString& sItem : vListEntries) sPayload.append("\"" + OUStringToOString(sItem, RTL_TEXTENCODING_UTF8) + "\", "); sPayload.setLength(sPayload.getLength() - 2); } diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 65ad4abb8c1f..fcfa98634667 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -1802,13 +1802,13 @@ void SwEditShell::SignParagraph() const OUString signature = OStringToOUString(sigBuf, RTL_TEXTENCODING_UTF8, 0); - auto it = std::find_if(std::as_const(aProperties).begin(), std::as_const(aProperties).end(), [](const beans::PropertyValue& rValue) + auto it = std::find_if(aProperties.begin(), aProperties.end(), [](const beans::PropertyValue& rValue) { return rValue.Name == "Usage"; }); OUString aUsage; - if (it != std::as_const(aProperties).end()) + if (it != aProperties.end()) it->Value >>= aUsage; // 4. Add metadata diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx index 35ab9ca9c894..b3ec935847a1 100644 --- a/sw/source/core/fields/authfld.cxx +++ b/sw/source/core/fields/authfld.cxx @@ -816,7 +816,7 @@ bool SwAuthorityField::PutValue( const Any& rAny, sal_uInt16 /*nWhichId*/ ) OUStringBuffer sBuf(+(AUTH_FIELD_END - 1)); comphelper::string::padToLength(sBuf, (AUTH_FIELD_END - 1), TOX_STYLE_DELIMITER); OUString sToSet(sBuf.makeStringAndClear()); - for(const PropertyValue& rParam : std::as_const(aParam)) + for (const PropertyValue& rParam : aParam) { const sal_Int32 nFound = lcl_Find(rParam.Name); if(nFound >= 0) diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 6bc5a2431c01..cf75c108c83d 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -662,7 +662,7 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData //!! by proceeding this way we automatically get rid of //!! multiple listed or overlapping cell ranges which should //!! just be ignored silently - for (const OUString& rSubRange : std::as_const(aSubRanges)) + for (const OUString& rSubRange : aSubRanges) { OUString aTableName, aStartCell, aEndCell; bool bOk2 = GetTableAndCellsFromRangeRep( @@ -862,7 +862,7 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData uno::Reference<chart2::data::XLabeledDataSequence>* pOld_LDS = aOld_LDS.getArray(); sal_Int32 nNewCnt = 0; - for (sal_Int32 nIdx : std::as_const(aSequenceMapping)) + for (sal_Int32 nIdx : aSequenceMapping) { // check that index to be used is valid // and has not yet been used @@ -1213,7 +1213,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume GetSubranges( aCellRanges, aSortedRanges, false /*sub ranges should already be normalized*/ ); SortSubranges( aSortedRanges, (nDtaSrcIsColumns == 1) ); OUString aSortedCellRanges; - for (const OUString& rSortedRange : std::as_const(aSortedRanges)) + for (const OUString& rSortedRange : aSortedRanges) { if (!aSortedCellRanges.isEmpty()) aSortedCellRanges += ";"; @@ -1232,7 +1232,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume aSequenceMapping[i] ); pSequenceMapping[i] = std::distance(std::cbegin(aSortedMapping), it); - if (i != std::as_const(aSequenceMapping)[i]) + if (i != aSequenceMapping[i]) bNeedSequenceMapping = true; } diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index ec4b772c675d..07f17a1cd0ae 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -1319,7 +1319,7 @@ void makeRedline( SwPaM const & rPaM, aEntries.reserve(aRevertProperties.getLength()); sal_uInt16 nStyleId = USHRT_MAX; sal_uInt16 nNumId = USHRT_MAX; - for (const auto& rRevertProperty : std::as_const(aRevertProperties)) + for (const auto& rRevertProperty : aRevertProperties) { const OUString &rPropertyName = rRevertProperty.Name; SfxItemPropertyMapEntry const* pEntry = rPropSet.getPropertyMap().getByName(rPropertyName); diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 7880a749b95c..3ac7bb77aceb 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -1498,7 +1498,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any& else if(aValue >>= aParam) { tools::PolyPolygon aPoly(o3tl::narrowing<sal_uInt16>(aParam.getLength())); - for(const ::drawing::PointSequence& rPointSeq : std::as_const(aParam)) + for (const ::drawing::PointSequence& rPointSeq : aParam) { sal_Int32 nPoints = rPointSeq.getLength(); const ::awt::Point* pPoints = rPointSeq.getConstArray(); diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 3617c22b8da3..c01bc9b9897d 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -2655,7 +2655,7 @@ SwXDocumentIndex::TokenAccess_Impl::replaceByIndex( } OUStringBuffer sPattern; - for(const beans::PropertyValues& rToken : std::as_const(aSeq)) + for (const beans::PropertyValues& rToken : aSeq) { const beans::PropertyValue* pProperties = rToken.getConstArray(); const sal_Int32 nProperties = rToken.getLength(); diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 8cbfbf7f3808..a0a8668bff59 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -533,7 +533,7 @@ SwUnoCursorHelper::SetCursorPropertyValue( RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1> items( rPam.GetDoc().GetAttrPool() ); - for (beans::NamedValue const & prop : std::as_const(props)) + for (beans::NamedValue const& prop : props) { SfxItemPropertyMapEntry const*const pEntry = rMap.getByName(prop.Name); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index a865697d4a89..bc78aba148cc 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -927,7 +927,7 @@ void SdtBlockHelper::GetSdtParamsFromGrabBag(const uno::Sequence<beans::Property { uno::Sequence<beans::PropertyValue> aGrabBag; aPropertyValue.Value >>= aGrabBag; - for (const auto& rProp : std::as_const(aGrabBag)) + for (const auto& rProp : aGrabBag) { if (rProp.Name == "ooxml:CT_SdtPlaceholder_docPart_val") m_aPlaceHolderDocPart = rProp.Value.get<OUString>(); @@ -937,7 +937,7 @@ void SdtBlockHelper::GetSdtParamsFromGrabBag(const uno::Sequence<beans::Property { uno::Sequence<beans::PropertyValue> aGrabBag; aPropertyValue.Value >>= aGrabBag; - for (const auto& rProp : std::as_const(aGrabBag)) + for (const auto& rProp : aGrabBag) { if (rProp.Name == "ooxml:CT_SdtColor_val") m_aColor = rProp.Value.get<OUString>(); @@ -2557,13 +2557,13 @@ void DocxAttributeOutput::WriteSdtPlainText(const OUString & sValue, const uno:: // Store databindings data for later writing to corresponding XMLs OUString sPrefixMapping, sXpath; - for (const auto& rProp : std::as_const(aGrabBagSdt)) + for (const auto& rProp : aGrabBagSdt) { if (rProp.Name == "ooxml:CT_SdtPr_dataBinding") { uno::Sequence<beans::PropertyValue> aDataBindingProps; rProp.Value >>= aDataBindingProps; - for (const auto& rDBProp : std::as_const(aDataBindingProps)) + for (const auto& rDBProp : aDataBindingProps) { if (rDBProp.Name == "ooxml:CT_DataBinding_prefixMappings") sPrefixMapping = rDBProp.Value.get<OUString>(); @@ -3470,7 +3470,7 @@ void lclProcessRecursiveGrabBag(sal_Int32 aElementId, const css::uno::Sequence<c } } - for (const auto& rAttribute : std::as_const(aAttributes)) + for (const auto& rAttribute : aAttributes) { uno::Any aAny = rAttribute.Value; OString aValue; @@ -4833,7 +4833,7 @@ void DocxAttributeOutput::LatentStyles() // Extract default attributes first. rtl::Reference<sax_fastparser::FastAttributeList> pAttributeList = FastSerializerHelper::createAttrList(); uno::Sequence<beans::PropertyValue> aLsdExceptions; - for (const auto& rLatentStyle : std::as_const(aLatentStyles)) + for (const auto& rLatentStyle : aLatentStyles) { if (sal_Int32 nToken = DocxStringGetToken(aDefaultTokens, rLatentStyle.Name)) pAttributeList->add(FSNS(XML_w, nToken), rLatentStyle.Value.get<OUString>()); @@ -4844,13 +4844,13 @@ void DocxAttributeOutput::LatentStyles() m_pSerializer->startElementNS(XML_w, XML_latentStyles, detachFrom(pAttributeList)); // Then handle the exceptions. - for (const auto& rLsdException : std::as_const(aLsdExceptions)) + for (const auto& rLsdException : aLsdExceptions) { pAttributeList = FastSerializerHelper::createAttrList(); uno::Sequence<beans::PropertyValue> aAttributes; rLsdException.Value >>= aAttributes; - for (const auto& rAttribute : std::as_const(aAttributes)) + for (const auto& rAttribute : aAttributes) if (sal_Int32 nToken = DocxStringGetToken(aExceptionTokens, rAttribute.Name)) pAttributeList->add(FSNS(XML_w, nToken), rAttribute.Value.get<OUString>()); @@ -5839,7 +5839,7 @@ void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const S if (pObjectsInterop != std::cend(aObjectsInteropList)) pObjectsInterop->Value >>= aObjectInteropAttributes; - for( const auto& rObjectInteropAttribute : std::as_const(aObjectInteropAttributes) ) + for (const auto& rObjectInteropAttribute : aObjectInteropAttributes) { if ( rObjectInteropAttribute.Name == "ProgID" ) { @@ -9993,7 +9993,7 @@ void DocxAttributeOutput::ParaGrabBag(const SfxGrabBagItem& rItem) uno::Sequence<beans::PropertyValue> aGrabBagSeq; rGrabBagElement.second >>= aGrabBagSeq; - for (const auto& rProp : std::as_const(aGrabBagSeq)) + for (const auto& rProp : aGrabBagSeq) { OUString sVal = rProp.Value.get<OUString>(); diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index e7c1972ce9c0..869862909678 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -969,7 +969,7 @@ void DocxExport::WriteDocVars(const sax_fastparser::FSHelperPtr& pFS) // Only write docVars if there will be at least a single docVar. bool bStarted = false; constexpr OUString aPrefix(u"com.sun.star.text.fieldmaster.User."_ustr); - for (const auto& rMasterName : std::as_const(aMasterNames)) + for (const auto& rMasterName : aMasterNames) { if (!rMasterName.startsWith(aPrefix)) { @@ -1274,14 +1274,14 @@ void DocxExport::WriteSettings() uno::Sequence< beans::PropertyValue > propList; xPropSet->getPropertyValue( aGrabBagName ) >>= propList; - for( const auto& rProp : std::as_const(propList) ) + for (const auto& rProp : propList) { if ( rProp.Name == "ThemeFontLangProps" ) { uno::Sequence< beans::PropertyValue > themeFontLangProps; rProp.Value >>= themeFontLangProps; OUString aValues[3]; - for( const auto& rThemeFontLangProp : std::as_const(themeFontLangProps) ) + for (const auto& rThemeFontLangProp : themeFontLangProps) { if( rThemeFontLangProp.Name == "val" ) rThemeFontLangProp.Value >>= aValues[0]; @@ -1304,7 +1304,7 @@ void DocxExport::WriteSettings() uno::Sequence< beans::PropertyValue > aCompatSettingsSequence; rProp.Value >>= aCompatSettingsSequence; - for(const auto& rCompatSetting : std::as_const(aCompatSettingsSequence)) + for (const auto& rCompatSetting : aCompatSettingsSequence) { uno::Sequence< beans::PropertyValue > aCompatSetting; rCompatSetting.Value >>= aCompatSetting; @@ -1312,7 +1312,7 @@ void DocxExport::WriteSettings() OUString aUri; OUString aValue; - for(const auto& rPropVal : std::as_const(aCompatSetting)) + for (const auto& rPropVal : aCompatSetting) { if( rPropVal.Name == "name" ) rPropVal.Value >>= aName; @@ -1361,7 +1361,7 @@ void DocxExport::WriteSettings() bool bIsProtectionTrackChanges = false; // if grabbag protection is not enforced, allow Writer protection to override bool bEnforced = false; - for (const auto& rAttribute : std::as_const(rAttributeList)) + for (const auto& rAttribute : rAttributeList) { static DocxStringTokenMap const aTokens[] = { @@ -1511,7 +1511,7 @@ void DocxExport::WriteGlossary() uno::Sequence< beans::PropertyValue > propList; xPropSet->getPropertyValue( aName ) >>= propList; sal_Int32 collectedProperties = 0; - for ( const auto& rProp : std::as_const(propList) ) + for (const auto& rProp : propList) { OUString propName = rProp.Name; if ( propName == "OOXGlossary" ) @@ -1837,7 +1837,7 @@ void DocxExport::WriteEmbeddings() [](const beans::PropertyValue& rProp) { return rProp.Name == "OOXEmbeddings"; }); if (pProp != std::cend(propList)) pProp->Value >>= embeddingsList; - for (const auto& rEmbedding : std::as_const(embeddingsList)) + for (const auto& rEmbedding : embeddingsList) { OUString embeddingPath = rEmbedding.Name; uno::Reference<io::XInputStream> embeddingsStream; @@ -2040,14 +2040,14 @@ sal_Int32 DocxExport::getWordCompatibilityModeFromGrabBag() const uno::Sequence< beans::PropertyValue > propList; xPropSet->getPropertyValue( UNO_NAME_MISC_OBJ_INTEROPGRABBAG ) >>= propList; - for (const auto& rProp : std::as_const(propList)) + for (const auto& rProp : propList) { if (rProp.Name == "CompatSettings") { css::uno::Sequence< css::beans::PropertyValue > aCurrentCompatSettings; rProp.Value >>= aCurrentCompatSettings; - for (const auto& rCurrentCompatSetting : std::as_const(aCurrentCompatSettings)) + for (const auto& rCurrentCompatSetting : aCurrentCompatSettings) { uno::Sequence< beans::PropertyValue > aCompatSetting; rCurrentCompatSetting.Value >>= aCompatSetting; @@ -2056,7 +2056,7 @@ sal_Int32 DocxExport::getWordCompatibilityModeFromGrabBag() const OUString sUri; OUString sVal; - for (const auto& rPropVal : std::as_const(aCompatSetting)) + for (const auto& rPropVal : aCompatSetting) { if ( rPropVal.Name == "name" ) rPropVal.Value >>= sName; if ( rPropVal.Name == "uri" ) rPropVal.Value >>= sUri; diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx b/sw/source/filter/ww8/docxtablestyleexport.cxx index 46a052e0c724..0de587eaa400 100644 --- a/sw/source/filter/ww8/docxtablestyleexport.cxx +++ b/sw/source/filter/ww8/docxtablestyleexport.cxx @@ -713,7 +713,7 @@ void DocxTableStyleExport::Impl::TableStyle(const uno::Sequence<beans::PropertyV tableStyleRPr(aRPr); tableStyleTablePr(aTablePr); tableStyleTcPr(aTcPr); - for (const uno::Sequence<beans::PropertyValue>& i : std::as_const(aTableStylePrs)) + for (const uno::Sequence<beans::PropertyValue>& i : aTableStylePrs) tableStyleTableStylePr(i); m_pSerializer->endElementNS(XML_w, XML_style); diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 1a3d7973e08d..6d9271417fda 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -2493,7 +2493,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const ww8::Frame& rFrame, const Poi } xPropSet->getPropertyValue("StringItemList") >>= aStrSeq; - for (const auto& rStr : std::as_const(aStrSeq)) + for (const auto& rStr : aStrSeq) m_aRun->append( "{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFL " " + OUStringToOString(rStr, m_rExport.GetCurrentEncoding()) diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 09b16b6f8344..0819c70caa48 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -694,7 +694,7 @@ void RtfExport::WriteDocVars() // Only write docVars if there will be at least a single docVar. constexpr OUString aPrefix(u"com.sun.star.text.fieldmaster.User."_ustr); - for (const auto& rMasterName : std::as_const(aMasterNames)) + for (const auto& rMasterName : aMasterNames) { if (!rMasterName.startsWith(aPrefix)) { diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 1bd86a382f31..971f4baec4f3 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3844,7 +3844,7 @@ ErrCodeMsg SwWW8Writer::WriteStorage() uno::Sequence<beans::NamedValue> aStreams = xPackageEncryption->encrypt(xInputStream); m_pStg = pOrigStg; - for (const beans::NamedValue & aStreamData : std::as_const(aStreams)) + for (const beans::NamedValue& aStreamData : aStreams) { // To avoid long paths split and open substorages recursively // Splitting paths manually, since comphelper::string::split is trimming special characters like \0x01, \0x09 diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 1b84f82f26ab..cd68bfa8dde0 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4972,7 +4972,7 @@ void SwWW8ImplReader::ReadGlobalTemplateSettings( std::u16string_view sCreatedFr if( xSFA->isFolder( aAddinPath ) ) sGlobalTemplates = xSFA->getFolderContents( aAddinPath, false ); - for ( const auto& rGlobalTemplate : std::as_const(sGlobalTemplates) ) + for (const auto& rGlobalTemplate : sGlobalTemplates) { INetURLObject aObj; aObj.SetURL( rGlobalTemplate ); diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 578ef0ee0bcb..c5225a916fff 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -402,7 +402,7 @@ void SwXMLImport::startDocument() if( aAny >>= aFamiliesSeq ) { SfxStyleFamily nFamilyMask = SfxStyleFamily::None; - for( const OUString& rFamily : std::as_const(aFamiliesSeq) ) + for (const OUString& rFamily : aFamiliesSeq) { if( rFamily=="FrameStyles" ) nFamilyMask |= SfxStyleFamily::Frame; @@ -481,7 +481,7 @@ void SwXMLImport::startDocument() if (xProps.is() && xInfo.is()) { - for (const auto& rProp : std::as_const(aProps)) + for (const auto& rProp : aProps) { if (xInfo->hasPropertyByName(rProp.Name)) { diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index 9cb433974baa..1f4f99a8b590 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -98,7 +98,7 @@ static OUString lcl_getFlatURL( uno::Reference<beans::XPropertySet> const & xSou { OUString sExtension; OUString sCharSet; - for(const auto& rInfo : std::as_const(aInfo)) + for (const auto& rInfo : aInfo) { if(rInfo.Name == "Extension") rInfo.Value >>= sExtension; diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index e6dac3049caa..2a0b00018208 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -1471,7 +1471,7 @@ void SwInsertDBColAutoPilot::ImplCommit() { Sequence <OUString> aNames = GetNodeNames(OUString()); //remove entries that contain this data source + table at first - for(OUString const & nodeName : std::as_const(aNames)) + for (OUString const& nodeName : aNames) { Sequence<Any> aSourceProperties = GetProperties({ nodeName + "/DataSource", nodeName + "/Command" }); const Any* pSourceProps = aSourceProperties.getArray(); diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 73811cbf3e0e..9df414eca421 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -351,7 +351,7 @@ void SwSelectAddressBlockDialog::SetAddressBlocks(const uno::Sequence< OUString> sal_uInt16 nSelectedAddress) { m_aAddressBlocks = rBlocks; - for (const auto& rAddressBlock : std::as_const(m_aAddressBlocks)) + for (const auto& rAddressBlock : m_aAddressBlocks) m_xPreview->AddAddress(rAddressBlock); m_xPreview->SelectAddress(nSelectedAddress); } @@ -365,7 +365,7 @@ const uno::Sequence< OUString >& SwSelectAddressBlockDialog::GetAddressBlocks { uno::Sequence< OUString >aTemp(m_aAddressBlocks.getLength()); auto it = aTemp.getArray(); - *it = std::as_const(m_aAddressBlocks)[nSelect]; + *it = m_aAddressBlocks[nSelect]; it = std::copy_n(std::cbegin(m_aAddressBlocks), nSelect - 1, std::next(it)); std::copy(std::next(std::cbegin(m_aAddressBlocks), nSelect + 1), std::cend(m_aAddressBlocks), it); m_aAddressBlocks = aTemp; @@ -864,7 +864,7 @@ void SwAssignFieldsControl::Init(SwAssignFieldsDialog* pDialog, SwMailMergeConfi rNewLB.append_text(SwResId(SW_STR_NONE)); rNewLB.set_active(0); - for (const OUString& rField : std::as_const(aFields)) + for (const OUString& rField : aFields) rNewLB.append_text(rField); //select the ListBox //if there is an assignment diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index d53085c91276..013628d7fb03 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -431,7 +431,7 @@ void SwMMResultEmailDialog::FillInEmailSettings() // fill mail address and password ListBox assert(m_xMailToLB->get_count() == 0); assert(m_xPasswordLB->get_count() == 0); - for (const OUString& rField : std::as_const(aFields)) + for (const OUString& rField : aFields) { m_xMailToLB->append_text(rField); m_xPasswordLB->append_text(rField); diff --git a/sw/source/ui/fldui/DropDownFormFieldDialog.cxx b/sw/source/ui/fldui/DropDownFormFieldDialog.cxx index 2115bbda48e4..a28d9f1f5fab 100644 --- a/sw/source/ui/fldui/DropDownFormFieldDialog.cxx +++ b/sw/source/ui/fldui/DropDownFormFieldDialog.cxx @@ -110,7 +110,7 @@ void DropDownFormFieldDialog::InitControls() { css::uno::Sequence<OUString> vListEntries; pListEntries->second >>= vListEntries; - for (const OUString& rItem : std::as_const(vListEntries)) + for (const OUString& rItem : vListEntries) m_xListItemsTreeView->append_text(rItem); // Select the current one diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 92c25f2e9aee..6b6e9f10536f 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -1414,7 +1414,7 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, ChangeSourceHdl, weld::Toggleable&, void) uno::Sequence<beans::PropertyValue> aSeq; if( aNames >>= aSeq) { - for(const beans::PropertyValue& rProp : std::as_const(aSeq)) + for (const beans::PropertyValue& rProp : aSeq) { sal_Int16 nField = 0; rProp.Value >>= nField; diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index 432a0a28e68b..d53124e9128d 100644 --- a/sw/source/uibase/dbui/dbtree.cxx +++ b/sw/source/uibase/dbui/dbtree.cxx @@ -157,7 +157,7 @@ void SwDBTreeList::InitTreeList() { return sort.compare(x, y) < 0; }); OUString aImg(RID_BMP_DB); - for (const OUString& rDBName : std::as_const(aDBNames)) + for (const OUString& rDBName : aDBNames) { // If this database has a password or a (missing) remote connection, // then it might take a long time or spam for unnecessary credentials. diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index acf06f2e41a7..a979ce3f045e 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -324,7 +324,7 @@ SwSpellPopup::SwSpellPopup( m_aDics = xDicList->getDictionaries(); - for( const uno::Reference< linguistic2::XDictionary >& rDic : std::as_const(m_aDics) ) + for (const uno::Reference<linguistic2::XDictionary>& rDic : m_aDics) { uno::Reference< linguistic2::XDictionary > xDicTmp = rDic; if (!xDicTmp.is() || LinguMgr::GetIgnoreAllList() == xDicTmp) @@ -476,7 +476,7 @@ SwSpellPopup::SwSpellPopup( } sal_uInt16 nItemId = MN_SUGGESTION_START; - for (const OUString& aEntry : std::as_const(rSuggestions)) + for (const OUString& aEntry : rSuggestions) { m_xPopupMenu->InsertItem(nItemId, aEntry, MenuItemBits::NONE, {}, nPos++); m_xPopupMenu->SetHelpId(nItemId, HID_LINGU_REPLACE); diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx b/sw/source/uibase/misc/numberingtypelistbox.cxx index 94a26bcb9ffc..5f4c45bb8dfc 100644 --- a/sw/source/uibase/misc/numberingtypelistbox.cxx +++ b/sw/source/uibase/misc/numberingtypelistbox.cxx @@ -101,7 +101,7 @@ void SwNumberingTypeListBox::Reload(SwInsertNumTypes nTypeFlags) if (!(nTypeFlags & SwInsertNumTypes::Extended)) return; - for (sal_Int16 nCurrent : std::as_const(aTypes)) + for (sal_Int16 nCurrent : aTypes) { if (nCurrent > style::NumberingType::CHARS_LOWER_LETTER_N) { diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx index 085cc707fcf2..2f36394eee1d 100644 --- a/sw/source/uibase/uno/unomailmerge.cxx +++ b/sw/source/uibase/uno/unomailmerge.cxx @@ -554,7 +554,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( try { bool bEverythingsFine = true; - for ( const Any& rBookmark : std::as_const(aCurSelection) ) + for (const Any& rBookmark : aCurSelection) { bEverythingsFine = xRowLocate->moveToBookmark( rBookmark ); if ( !bEverythingsFine ) diff --git a/test/source/sheet/xfunctiondescriptions.cxx b/test/source/sheet/xfunctiondescriptions.cxx index 1b4ef645e2e7..4bed2b417712 100644 --- a/test/source/sheet/xfunctiondescriptions.cxx +++ b/test/source/sheet/xfunctiondescriptions.cxx @@ -41,7 +41,7 @@ void XFunctionDescriptions::testGetById() OUString aName1; uno::Sequence<beans::PropertyValue> aProps1; CPPUNIT_ASSERT(xFD->getByIndex(nNumber) >>= aProps1); - for (const auto& aProp : std::as_const(aProps1)) + for (const auto& aProp : aProps1) { if (aProp.Name == "Id") aId1 = aProp.Value.get<sal_Int32>(); diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index fc6b7b9df8d9..d6d7e0986eb1 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -1699,7 +1699,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( rtl::Reference<VCLXWindow>* ppNewCom css::uno::Sequence< css::beans::NamedValue > aProps; if( anyHandle >>= aProps ) { - for( const css::beans::NamedValue& rProp : std::as_const(aProps) ) + for (const css::beans::NamedValue& rProp : aProps) { if ( rProp.Name == "WINDOW" ) rProp.Value >>= nWindowHandle; @@ -1947,7 +1947,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::createSystemChild( con css::uno::Sequence< css::beans::NamedValue > aProps; if( Parent >>= aProps ) { - for( const css::beans::NamedValue& rProp : std::as_const(aProps) ) + for (const css::beans::NamedValue& rProp : aProps) { if ( rProp.Name == "WINDOW" ) rProp.Value >>= nWindowHandle; diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx index edc78f7d9258..a55245cafc68 100644 --- a/toolkit/source/awt/vclxwindow1.cxx +++ b/toolkit/source/awt/vclxwindow1.cxx @@ -52,7 +52,7 @@ void VCLXWindow::SetSystemParent_Impl(const css::uno::Any& rHandle) css::uno::Sequence<css::beans::NamedValue> aProps; if (rHandle >>= aProps) { - for (const css::beans::NamedValue& rProp : std::as_const(aProps)) + for (const css::beans::NamedValue& rProp : aProps) { if (rProp.Name == "WINDOW") rProp.Value >>= nHandle; diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx index 70e8817da217..c76657d9fbe6 100644 --- a/toolkit/source/controls/geometrycontrolmodel.cxx +++ b/toolkit/source/controls/geometrycontrolmodel.cxx @@ -531,7 +531,7 @@ constexpr OUStringLiteral GCM_PROPERTY_RESOURCERESOLVER = u"ResourceResolver"; ); // now loop through our own props - for ( const Property& rProp : std::as_const(aProps) ) + for (const Property& rProp : aProps) { // look for the current property in the properties of our aggregate const Property* pAggPropPos = ::std::find_if( std::cbegin(aAggregateProps), std::cend(aAggregateProps), PropertyNameEqual( rProp.Name ) ); diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx index bac4aea58547..e645c8b41570 100644 --- a/toolkit/source/controls/stdtabcontroller.cxx +++ b/toolkit/source/controls/stdtabcontroller.cxx @@ -92,7 +92,7 @@ bool StdTabController::ImplCreateComponentSequence( } bool bOK = true; - for ( const Reference< XControl >& xCtrl : std::as_const(rControls) ) + for (const Reference<XControl>& xCtrl : rControls) { // Get the matching control for this model if ( !xCtrl.is() ) @@ -259,7 +259,7 @@ void StdTabController::autoTabOrder( ) // insert sort algorithm std::vector< ComponentEntry > aCtrls; aCtrls.reserve(nCtrls); - for ( const Reference< XWindow >& rComponent : std::as_const(aCompSeq) ) + for (const Reference<XWindow>& rComponent : aCompSeq) { XWindow* pC = rComponent.get(); ComponentEntry newEntry; diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index fea09b486d63..6b24829a6310 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -643,7 +643,7 @@ void UnoControlModel::write( const css::uno::Reference< css::io::XObjectOutputSt rValue >>= aSeq; tools::Long nEntries = aSeq.getLength(); OutStream->writeLong( nEntries ); - for ( const auto& rVal : std::as_const(aSeq) ) + for (const auto& rVal : aSeq) OutStream->writeUTF( rVal ); } else if ( rType == cppu::UnoType< cppu::UnoSequenceType<cppu::UnoUnsignedShortType> >::get() ) @@ -652,7 +652,7 @@ void UnoControlModel::write( const css::uno::Reference< css::io::XObjectOutputSt rValue >>= aSeq; tools::Long nEntries = aSeq.getLength(); OutStream->writeLong( nEntries ); - for ( const auto nVal : std::as_const(aSeq) ) + for (const auto nVal : aSeq) OutStream->writeShort( nVal ); } else if ( rType == cppu::UnoType< css::uno::Sequence<sal_Int16> >::get() ) @@ -661,7 +661,7 @@ void UnoControlModel::write( const css::uno::Reference< css::io::XObjectOutputSt rValue >>= aSeq; tools::Long nEntries = aSeq.getLength(); OutStream->writeLong( nEntries ); - for ( const auto nVal : std::as_const(aSeq) ) + for (const auto nVal : aSeq) OutStream->writeShort( nVal ); } else if ( rType.getTypeClass() == TypeClass_ENUM ) diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index 769c162fd2ae..89552ceca2a0 100644 --- a/ucb/source/cacher/cachedcontentresultset.cxx +++ b/ucb/source/cacher/cachedcontentresultset.cxx @@ -554,7 +554,7 @@ sal_Int32 CCRS_PropertySetInfo bool CCRS_PropertySetInfo ::impl_queryProperty( std::u16string_view rName, Property& rProp ) const { - for( const Property& rMyProp : std::as_const(*m_xProperties) ) + for (const Property& rMyProp : *m_xProperties) { if( rMyProp.Name == rName ) { @@ -593,7 +593,7 @@ sal_Int32 CCRS_PropertySetInfo while( bFound ) { bFound = false; - for( const auto & rProp : std::as_const(*m_xProperties) ) + for (const auto& rProp : *m_xProperties) { if( nHandle == rProp.Handle ) { diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index 657641ff4bfe..d04816173e40 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -612,7 +612,7 @@ namespace cmis iCmisProps >>= aPropsSeq; std::map< std::string, libcmis::PropertyPtr > aProperties; - for ( const auto& rProp : std::as_const(aPropsSeq) ) + for (const auto& rProp : aPropsSeq) { std::string id = OUSTR_TO_STDSTR( rProp.Id ); libcmis::PropertyPtr prop = lcl_unoToCmisProperty( rProp ); diff --git a/ucb/source/ucp/file/filnot.cxx b/ucb/source/ucp/file/filnot.cxx index d384dc0ea717..db8309c6a410 100644 --- a/ucb/source/ucp/file/filnot.cxx +++ b/ucb/source/ucp/file/filnot.cxx @@ -192,7 +192,7 @@ void PropertyChangeNotifier::notifyPropertyChanged( rListener->propertiesChange( Changes ); } - for( const auto& rChange : std::as_const(Changes) ) + for (const auto& rChange : Changes) { uno::Sequence< beans::PropertyChangeEvent > seq{ rChange }; it = m_aListeners.find( rChange.PropertyName ); diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx index a1f7054e891a..8b3b9ba5b3bc 100644 --- a/unotools/source/config/compatibility.cxx +++ b/unotools/source/config/compatibility.cxx @@ -175,7 +175,7 @@ SvtCompatibilityOptions_Impl::SvtCompatibilityOptions_Impl() : ConfigItem( ROOTN // 4 subkeys for every item! bool bDefaultFound = false; sal_Int32 nDestStep = 0; - for ( const auto& rNode : std::as_const(lNodes) ) + for (const auto& rNode : lNodes) { SvtCompatibilityEntry aItem; @@ -282,7 +282,7 @@ Sequence< OUString > SvtCompatibilityOptions_Impl::impl_GetPropertyNames( Sequen sal_Int32 nDestStep = 0; // Copy entries to destination and expand every item with 2 supported sub properties. - for ( const auto& rItem : std::as_const(rItems) ) + for (const auto& rItem : rItems) { OUString sFixPath = SETNODE_ALLFILEFORMATS PATHDELIMITER + rItem + PATHDELIMITER; for ( int i = static_cast<int>(SvtCompatibilityEntry::Index::Module); i < static_cast<int>(SvtCompatibilityEntry::Index::INVALID); ++i ) diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx index 80a644b400f6..f216981fb7ca 100644 --- a/unotools/source/config/configitem.cxx +++ b/unotools/source/config/configitem.cxx @@ -288,7 +288,7 @@ void ConfigItem::impl_unpackLocalizedProperties( const Sequence< OUString > plOutValues = lOutValues.getArray(); } - for( const auto& rProperty : std::as_const(lProperties) ) + for (const auto& rProperty : lProperties) { plOutNames [nDestinationCounter] = sNodeName + rProperty.Name; plOutValues[nDestinationCounter] = rProperty.Value; diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx index b4e879265b14..49232f9026fc 100644 --- a/unotools/source/config/eventcfg.cxx +++ b/unotools/source/config/eventcfg.cxx @@ -229,7 +229,7 @@ void GlobalEventConfig_Impl::replaceByName( const OUString& aName, const Any& aE Reference< XInterface > (), 2); } OUString macroURL; - for( const auto& rProp : std::as_const(props) ) + for (const auto& rProp : props) { if ( rProp.Name == "Script" ) rProp.Value >>= macroURL; diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index 4ebd72a91c15..2022481382c3 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -1053,7 +1053,7 @@ std::vector< SvtLinguConfigDictionaryEntry > SvtLinguConfig::GetActiveDictionari const uno::Sequence< OUString > aDisabledDics( GetDisabledDictionaries() ); SvtLinguConfigDictionaryEntry aDicEntry; - for (const OUString& rElementName : std::as_const(aElementNames)) + for (const OUString& rElementName : aElementNames) { // does dictionary match the format we are looking for? if (GetDictionaryEntry( rElementName, aDicEntry ) && diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx index 5918b749e647..01378438665b 100644 --- a/unotools/source/config/moduleoptions.cxx +++ b/unotools/source/config/moduleoptions.cxx @@ -746,7 +746,7 @@ void SvtModuleOptions_Impl::MakeReadonlyStatesAvailable() sal_Int32 c = lFactories.getLength(); for (sal_Int32 i=0; i<c; ++i) { - const OUString& rFactoryName = std::as_const(lFactories)[i]; + const OUString& rFactoryName = lFactories[i]; SvtModuleOptions::EFactory eFactory; if (!ClassifyFactoryByName(rFactoryName, eFactory)) diff --git a/unotools/source/ucbhelper/progresshandlerwrap.cxx b/unotools/source/ucbhelper/progresshandlerwrap.cxx index 29c1067ec7fc..abdce7d9384d 100644 --- a/unotools/source/ucbhelper/progresshandlerwrap.cxx +++ b/unotools/source/ucbhelper/progresshandlerwrap.cxx @@ -39,7 +39,7 @@ static bool getStatusFromAny_Impl( const Any& aAny, OUString& aText, sal_Int32& Sequence< Any > aSetList; if( aAny >>= aSetList ) - for( const auto& rSet : std::as_const(aSetList) ) + for (const auto& rSet : aSetList) { if( !bNumIsSet && ( rSet >>= nNum ) ) bNumIsSet = true; diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx index 165d8d206dd0..4de5b71d947e 100644 --- a/vbahelper/source/vbahelper/vbashape.cxx +++ b/vbahelper/source/vbahelper/vbashape.cxx @@ -179,7 +179,7 @@ sal_Int32 ScVbaShape::getAutoShapeType(const css::uno::Reference< drawing::XShap uno::Sequence< beans::PropertyValue > aGeoPropSeq; if ( aGeoPropSet >>= aGeoPropSeq ) { - for( const auto& rProp : std::as_const(aGeoPropSeq) ) + for (const auto& rProp : aGeoPropSeq) { if( rProp.Name == "Type" ) { diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx index e96cda4ac926..1300e998f79c 100644 --- a/vbahelper/source/vbahelper/vbashapes.cxx +++ b/vbahelper/source/vbahelper/vbashapes.cxx @@ -146,7 +146,7 @@ ScVbaShapes::getShapesByArrayIndices( const uno::Any& Index ) uno::Sequence< uno::Any > sIndices; aConverted >>= sIndices; XNamedObjectCollectionHelper< drawing::XShape >::XNamedVec aShapes; - for( const auto& rIndex : std::as_const(sIndices) ) + for (const auto& rIndex : sIndices) { uno::Reference< drawing::XShape > xShape; if ( rIndex.getValueTypeClass() == uno::TypeClass_STRING ) diff --git a/vcl/osx/OSXTransferable.cxx b/vcl/osx/OSXTransferable.cxx index e55141a6061e..725c56537a46 100644 --- a/vcl/osx/OSXTransferable.cxx +++ b/vcl/osx/OSXTransferable.cxx @@ -146,7 +146,7 @@ Sequence< DataFlavor > SAL_CALL OSXTransferable::getTransferDataFlavors( ) sal_Bool SAL_CALL OSXTransferable::isDataFlavorSupported(const DataFlavor& aFlavor) { - for (const DataFlavor& rFlavor : std::as_const(mFlavorList)) + for (const DataFlavor& rFlavor : mFlavorList) if (compareDataFlavors(aFlavor, rFlavor)) return true; diff --git a/vcl/osx/printaccessoryview.mm b/vcl/osx/printaccessoryview.mm index 95ace78d2816..7b61adf9887a 100644 --- a/vcl/osx/printaccessoryview.mm +++ b/vcl/osx/printaccessoryview.mm @@ -1019,7 +1019,7 @@ static void addEdit( NSView* pCurParent, CGFloat rCurX, CGFloat& rCurY, CGFloat Sequence< OUString > aChoices; Sequence< sal_Bool > aChoicesDisabled; sal_Int32 aSelectionChecked = 0; - for( const beans::PropertyValue& rEntry : std::as_const(aOptProp) ) + for( const beans::PropertyValue& rEntry : aOptProp ) { if( rEntry.Name == "ControlType" ) { @@ -1068,7 +1068,7 @@ static void addEdit( NSView* pCurParent, CGFloat rCurX, CGFloat& rCurY, CGFloat CGFloat nAttachOffset = 0; bool bIgnore = false; - for( const beans::PropertyValue& rEntry : std::as_const(aOptProp) ) + for( const beans::PropertyValue& rEntry : aOptProp ) { if( rEntry.Name == "Text" ) { diff --git a/vcl/qa/cppunit/a11y/atspi2/atspi2text.cxx b/vcl/qa/cppunit/a11y/atspi2/atspi2text.cxx index eb0e2aa7e5d8..a711ba16e15f 100644 --- a/vcl/qa/cppunit/a11y/atspi2/atspi2text.cxx +++ b/vcl/qa/cppunit/a11y/atspi2/atspi2text.cxx @@ -435,7 +435,7 @@ private: sal_Unicode lastFillChar = ' '; const char* p = atspiValue.data(); - for (const auto& rTabStop : std::as_const(theTabStops)) + for (const auto& rTabStop : theTabStops) { if ((style::TabAlign_DEFAULT == rTabStop.Alignment) != defaultTabs) continue; diff --git a/vcl/qt5/QtFilePicker.cxx b/vcl/qt5/QtFilePicker.cxx index 8a13ec67235c..2af28b29a36d 100644 --- a/vcl/qt5/QtFilePicker.cxx +++ b/vcl/qt5/QtFilePicker.cxx @@ -458,7 +458,7 @@ void QtFilePicker::handleSetListValue(QComboBox* pWidget, sal_Int16 nControlActi { Sequence<OUString> aStringList; rValue >>= aStringList; - for (auto const& sItem : std::as_const(aStringList)) + for (auto const& sItem : aStringList) pWidget->addItem(toQString(sItem)); break; } diff --git a/vcl/source/filter/png/PngImageWriter.cxx b/vcl/source/filter/png/PngImageWriter.cxx index 1674f80e14a0..f2b7ac038b34 100644 --- a/vcl/source/filter/png/PngImageWriter.cxx +++ b/vcl/source/filter/png/PngImageWriter.cxx @@ -464,7 +464,7 @@ void PngImageWriter::setParameters(css::uno::Sequence<css::beans::PropertyValue> css::uno::Sequence<css::beans::PropertyValue> aAdditionalChunkSequence; if (rValue.Value >>= aAdditionalChunkSequence) { - for (const auto& rAdditionalChunk : std::as_const(aAdditionalChunkSequence)) + for (const auto& rAdditionalChunk : aAdditionalChunkSequence) { if (rAdditionalChunk.Name.getLength() == 4) { diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 1ebab3b48177..dde3d8368116 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -1574,7 +1574,7 @@ void PrinterController::setUIOptions( const css::uno::Sequence< css::beans::Prop OUString aPropName; vcl::ImplPrinterControllerData::ControlDependency aDep; css::uno::Sequence< sal_Bool > aChoicesDisabled; - for( const css::beans::PropertyValue& rEntry : std::as_const(aOptProp) ) + for (const css::beans::PropertyValue& rEntry : aOptProp) { if ( rEntry.Name == "Property" ) { diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx index bceb9fbabed1..63916164eb4b 100644 --- a/vcl/source/graphic/UnoGraphicProvider.cxx +++ b/vcl/source/graphic/UnoGraphicProvider.cxx @@ -344,7 +344,7 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co sal_uInt16 nExtWidth = 0; sal_uInt16 nExtHeight = 0; sal_uInt16 nExtMapMode = 0; - for( const auto& rProp : std::as_const(aFilterData) ) + for (const auto& rProp : aFilterData) { const OUString aName( rProp.Name ); const uno::Any aValue( rProp.Value ); diff --git a/vcl/source/window/NotebookBarAddonsMerger.cxx b/vcl/source/window/NotebookBarAddonsMerger.cxx index d8cdfebf8562..b7027d9d468f 100644 --- a/vcl/source/window/NotebookBarAddonsMerger.cxx +++ b/vcl/source/window/NotebookBarAddonsMerger.cxx @@ -117,8 +117,7 @@ void MergeNotebookBarAddons(vcl::Window* pParent, const VclBuilder::customMakeWi { aExtension = aNotebookBarAddonsItem.aAddonValues[nIdx]; - for (const css::uno::Sequence<css::beans::PropertyValue>& pExtension : - std::as_const(aExtension)) + for (const css::uno::Sequence<css::beans::PropertyValue>& pExtension : aExtension) { VclPtr<vcl::Window> pOptionalParent; pOptionalParent = VclPtr<OptionalBox>::Create(pParent); diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 9c5f519f7cfb..3fb26f4f8fd2 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -1351,7 +1351,7 @@ void PrintDialog::setupOptionalUI() sal_Int64 nMinValue = 0, nMaxValue = 0; OUString aGroupingHint; - for( const beans::PropertyValue& rEntry : std::as_const(aOptProp) ) + for (const beans::PropertyValue& rEntry : aOptProp) { if ( rEntry.Name == "ID" ) { @@ -1589,7 +1589,7 @@ void PrintDialog::setupOptionalUI() continue; // iterate options - for( const auto& rChoice : std::as_const(aChoices) ) + for (const auto& rChoice : aChoices) xList->append_text(rChoice); sal_Int32 nSelectVal = 0; diff --git a/vcl/unx/gtk3/a11y/atktextattributes.cxx b/vcl/unx/gtk3/a11y/atktextattributes.cxx index 25b43f480ab7..d34d0a3d9860 100644 --- a/vcl/unx/gtk3/a11y/atktextattributes.cxx +++ b/vcl/unx/gtk3/a11y/atktextattributes.cxx @@ -924,7 +924,7 @@ TabStopList2String( const uno::Any& rAny, bool default_tabs ) { sal_Unicode lastFillChar = ' '; - for( const auto& rTabStop : std::as_const(theTabStops) ) + for (const auto& rTabStop : theTabStops) { bool is_default_tab = (style::TabAlign_DEFAULT == rTabStop.Alignment); diff --git a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx index 4b93d0361706..53f8e2e35b34 100644 --- a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx @@ -1191,7 +1191,7 @@ void SalGtkFilePicker::HandleSetListValue(GtkComboBox *pWidget, sal_Int16 nContr { Sequence< OUString > aStringList; rValue >>= aStringList; - for (const auto& rString : std::as_const(aStringList)) + for (const auto& rString : aStringList) { ComboBoxAppendText(pWidget, rString); if (!bVersionWidthUnset) @@ -2003,7 +2003,7 @@ void SalGtkFilePicker::SetFilters() { // it's a filter group css::uno::Sequence< css::beans::StringPair > aSubFilters; filter.getSubFilters( aSubFilters ); - for( const auto& rSubFilter : std::as_const(aSubFilters) ) + for (const auto& rSubFilter : aSubFilters) aAllFormats.insert(rSubFilter.Second); } else diff --git a/vcl/win/dtrans/DOTransferable.cxx b/vcl/win/dtrans/DOTransferable.cxx index c2b54bf83a0f..38329a209c1c 100644 --- a/vcl/win/dtrans/DOTransferable.cxx +++ b/vcl/win/dtrans/DOTransferable.cxx @@ -295,7 +295,7 @@ sal_Bool SAL_CALL CDOTransferable::isDataFlavorSupported( const DataFlavor& aFla { OSL_ASSERT( isValidFlavor( aFlavor ) ); - for ( DataFlavor const & df : std::as_const(m_FlavorList) ) + for (DataFlavor const& df : m_FlavorList) if ( compareDataFlavors( aFlavor, df ) ) return true; diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index e66c0e50c0ad..e377d0a19ea5 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -1235,7 +1235,7 @@ static void lcl_convertFormulaRanges(const uno::Reference<text::XTextTable> & xT xCellProperties->getPropertyValue("CellInteropGrabBag") >>= aCellGrabBag; OUString sFormula; bool bReplace = false; - for (const auto& rProp : std::as_const(aCellGrabBag)) + for (const auto& rProp : aCellGrabBag) { if ( rProp.Name == "CellFormulaConverted" ) { diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index b50fc74c86af..958f93614d78 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -180,7 +180,7 @@ static void lcl_handleDropdownField( const uno::Reference< beans::XPropertySet > sal_Int32 nResult = pFFDataHandler->getDropDownResult().toInt32(); if (nResult > 0 && o3tl::make_unsigned(nResult) < sItems.size()) - rxFieldProps->setPropertyValue( "SelectedItem", uno::Any( std::as_const(sItems)[ nResult ] ) ); + rxFieldProps->setPropertyValue("SelectedItem", uno::Any(sItems[nResult])); if ( !pFFDataHandler->getHelpText().isEmpty() ) rxFieldProps->setPropertyValue( "Help", uno::Any( pFFDataHandler->getHelpText() ) ); } @@ -4729,7 +4729,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape uno::Sequence<beans::PropertyValue> aGrabBag; xShapePropertySet->getPropertyValue("FrameInteropGrabBag") >>= aGrabBag; - for (const auto& rProp : std::as_const(aGrabBag)) + for (const auto& rProp : aGrabBag) { if (rProp.Name == "VML-Z-ORDER") { @@ -4774,7 +4774,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape uno::Reference<beans::XPropertySet> xShapePropertySet(xShape, uno::UNO_QUERY); uno::Sequence<beans::PropertyValue> aGrabBag; xShapePropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag; - for (const auto& rProp : std::as_const(aGrabBag)) + for (const auto& rProp : aGrabBag) { if (rProp.Name == "VML-Z-ORDER") { @@ -4946,7 +4946,7 @@ bool DomainMapper_Impl::IsSdtEndBefore() { uno::Sequence<beans::PropertyValue> aCharGrabBag; rCurrentCharProp.Value >>= aCharGrabBag; - for (const auto& rProp : std::as_const(aCharGrabBag)) + for (const auto& rProp : aCharGrabBag) { if(rProp.Name == "SdtEndBefore") { diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 41c25ce50816..c2f60054b065 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -1955,12 +1955,12 @@ void SectionPropertyMap::ApplyProperties_( const uno::Reference< beans::XPropert vValues.push_back( pIter->Value ); } } - for ( const beans::PropertyValue & v : std::as_const(vCharVals) ) + for (const beans::PropertyValue& v : vCharVals) { vNames.push_back( v.Name ); vValues.push_back( v.Value ); } - for ( const beans::PropertyValue & v : std::as_const(vParaVals) ) + for (const beans::PropertyValue& v : vParaVals) { vNames.push_back( v.Name ); vValues.push_back( v.Value ); diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx index c4e0538e2a2c..15f0393bc90f 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.cxx +++ b/writerfilter/source/rtftok/rtfsdrimport.cxx @@ -979,7 +979,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap { uno::Sequence<awt::Point>& rPolygon = aPolyPolySequence.getArray()[0]; basegfx::B2DPolygon aPoly; - for (const awt::Point& rPoint : std::as_const(rPolygon)) + for (const awt::Point& rPoint : rPolygon) { aPoly.append(basegfx::B2DPoint(rPoint.X, rPoint.Y)); } diff --git a/writerperfect/qa/unit/WpftLoader.cxx b/writerperfect/qa/unit/WpftLoader.cxx index d0809b909918..a27557a54a6f 100644 --- a/writerperfect/qa/unit/WpftLoader.cxx +++ b/writerperfect/qa/unit/WpftLoader.cxx @@ -188,7 +188,7 @@ void WpftLoader::impl_detectFilterName(uno::Sequence<beans::PropertyValue>& rDes uno::Sequence<beans::PropertyValue> aTypes; if (m_xTypeMap->getByName(rTypeName) >>= aTypes) { - for (const auto& rType : std::as_const(aTypes)) + for (const auto& rType : aTypes) { OUString aFilterName; if (("PreferredFilter" == rType.Name) && (rType.Value >>= aFilterName)) diff --git a/writerperfect/source/writer/EPUBExportFilter.cxx b/writerperfect/source/writer/EPUBExportFilter.cxx index 68cc4cbbb41c..0d0c42a36aa9 100644 --- a/writerperfect/source/writer/EPUBExportFilter.cxx +++ b/writerperfect/source/writer/EPUBExportFilter.cxx @@ -70,7 +70,7 @@ sal_Bool EPUBExportFilter::filter(const uno::Sequence<beans::PropertyValue>& rDe if (aFilterOptions == "layout=fixed") nLayoutMethod = libepubgen::EPUB_LAYOUT_METHOD_FIXED; - for (const auto& rProp : std::as_const(aFilterData)) + for (const auto& rProp : aFilterData) { if (rProp.Name == "EPUBVersion") rProp.Value >>= nVersion; 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 ) ) { diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx index 823df0e9ac1b..261528b3d5a1 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx @@ -315,7 +315,7 @@ void ElementDescriptor::readComboBoxModel( StyleBag * all_styles ) { rtl::Reference<ElementDescriptor> popup = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menupopup", _xDocument ); - for ( const auto& rItemValue : std::as_const(itemValues) ) + for (const auto& rItemValue : itemValues) { rtl::Reference<ElementDescriptor> item = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menuitem", _xDocument ); item->addAttribute( XMLNS_DIALOGS_PREFIX ":value", rItemValue ); @@ -362,7 +362,7 @@ void ElementDescriptor::readListBoxModel( StyleBag * all_styles ) { rtl::Reference<ElementDescriptor> popup = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menupopup", _xDocument ); - for ( const auto& rItemValue : std::as_const(itemValues) ) + for (const auto& rItemValue : itemValues) { rtl::Reference<ElementDescriptor> item = new ElementDescriptor(_xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menuitem", _xDocument ); item->addAttribute( XMLNS_DIALOGS_PREFIX ":value", rItemValue ); diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index 9dba3e9e9066..a54575972c26 100644 --- a/xmlsecurity/source/dialogs/certificatechooser.cxx +++ b/xmlsecurity/source/dialogs/certificatechooser.cxx @@ -211,7 +211,7 @@ void CertificateChooser::ImplInitialize(bool mbSearch) } // fill list of certificates; the first entry will be selected - for (const auto& xCert : std::as_const(xCerts)) + for (const auto& xCert : xCerts) { std::shared_ptr<UserData> userData = std::make_shared<UserData>(); userData->xCertificate = xCert; diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx index 80d74c27ba53..84d89ffeff72 100644 --- a/xmlsecurity/source/helper/documentsignaturemanager.cxx +++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx @@ -179,7 +179,7 @@ bool DocumentSignatureManager::isXML(std::u16string_view rURI) if (readManifest()) { - for (const uno::Sequence<beans::PropertyValue>& entry : std::as_const(m_manifest)) + for (const uno::Sequence<beans::PropertyValue>& entry : m_manifest) { OUString sPath; OUString sMediaType; diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx index bf74fa04ce64..823368efc3c8 100644 --- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx +++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx @@ -268,7 +268,7 @@ css::uno::Sequence<css::xml::crypto::NSSProfile> SAL_CALL ONSSInitializer::getNS { uno::Sequence<OUString> aProductProfileList; xMozillaBootstrap->getProfileList(productTypeIter, aProductProfileList); - for (const auto& sProfile : std::as_const(aProductProfileList)) + for (const auto& sProfile : aProductProfileList) aProfileList.push_back({sProfile, xMozillaBootstrap->getProfilePath(productTypeIter, sProfile), productTypeIter}); } } |