From 0fa827dbb2147d1d3850b2181eb6ab6a02a04500 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sat, 27 Jan 2024 15:42:54 +0600 Subject: Drop std::as_const from css::uno::Sequence iterations Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- unotools/source/config/compatibility.cxx | 4 ++-- unotools/source/config/configitem.cxx | 2 +- unotools/source/config/eventcfg.cxx | 2 +- unotools/source/config/lingucfg.cxx | 2 +- unotools/source/config/moduleoptions.cxx | 2 +- unotools/source/ucbhelper/progresshandlerwrap.cxx | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) (limited to 'unotools') 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(SvtCompatibilityEntry::Index::Module); i < static_cast(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 aSetList; if( aAny >>= aSetList ) - for( const auto& rSet : std::as_const(aSetList) ) + for (const auto& rSet : aSetList) { if( !bNumIsSet && ( rSet >>= nNum ) ) bNumIsSet = true; -- cgit