diff options
-rw-r--r-- | forms/source/component/ComboBox.cxx | 7 | ||||
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 5 | ||||
-rw-r--r-- | forms/source/component/Edit.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/FormComponent.cxx | 4 | ||||
-rw-r--r-- | forms/source/component/ListBox.cxx | 2 | ||||
-rw-r--r-- | fpicker/source/office/OfficeControlAccess.cxx | 2 | ||||
-rw-r--r-- | fpicker/source/office/fpsmartcontent.cxx | 6 | ||||
-rw-r--r-- | framework/source/jobs/jobdata.cxx | 2 | ||||
-rw-r--r-- | framework/source/uielement/generictoolbarcontroller.cxx | 2 | ||||
-rw-r--r-- | framework/source/uielement/newmenucontroller.cxx | 2 | ||||
-rw-r--r-- | i18npool/source/localedata/localedata.cxx | 2 | ||||
-rw-r--r-- | oox/source/core/filterbase.cxx | 2 | ||||
-rw-r--r-- | oox/source/crypto/AgileEngine.cxx | 3 | ||||
-rw-r--r-- | oox/source/export/shapes.cxx | 6 |
14 files changed, 26 insertions, 21 deletions
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index 62a0b54b1e14..912834f6d89d 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -415,7 +415,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 : aListSource) + for (const OUString& rToken : std::as_const(aListSource)) m_aListSource += rToken; } @@ -642,7 +642,8 @@ void OComboBoxModel::loadData( bool _bForce ) Reference<XNameAccess> xFieldNames = getTableFields(xConnection, m_aListSource); if (xFieldNames.is()) { - for (const OUString& rustrNames : xFieldNames->getElementNames()) + const Sequence<OUString> aFieldNames = xFieldNames->getElementNames(); + for (const OUString& rustrNames : aFieldNames) aStringList.push_back(rustrNames); } } @@ -763,7 +764,7 @@ bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset ) if ( getPropertyValue( PROPERTY_STRINGITEMLIST ) >>= aStringItemList ) { bool bFound = false; - for (const OUString& rStringItem : aStringItemList) + for (const OUString& rStringItem : std::as_const(aStringItemList)) { if ( (bFound = rStringItem == sNewValue) ) break; diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index a24e9eee91da..4f621a7d5e60 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -305,7 +305,7 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& _cloneSource ) Reference< XPropertySetInfo > xDestPSI( getPropertySetInfo(), UNO_SET_THROW ); - Sequence< Property > aSourceProperties( xSourcePSI->getProperties() ); + const Sequence< Property > aSourceProperties( xSourcePSI->getProperties() ); for ( auto const & sourceProperty : aSourceProperties ) { if ( xDestPSI->hasPropertyByName( sourceProperty.Name ) ) @@ -631,7 +631,8 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc // Find the right control bool bFound = false; - for( auto const& xControl : xControlContainer->getControls() ) + const Sequence<Reference<XControl>> aControls = xControlContainer->getControls(); + for( auto const& xControl : aControls ) { Reference<XPropertySet> xModel(xControl->getModel(), UNO_QUERY); if ((bFound = xModel == xComponentSet)) diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx index 3573224206b1..4ab433ff4fcf 100644 --- a/forms/source/component/Edit.cxx +++ b/forms/source/component/Edit.cxx @@ -418,7 +418,7 @@ namespace return; } - Sequence< Property > aSourceProps( xSourceInfo->getProperties() ); + const Sequence< Property > aSourceProps( xSourceInfo->getProperties() ); for ( auto const & sourceprop : aSourceProps ) { if ( !xDestInfo->hasPropertyByName( sourceprop.Name ) ) diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index eb4cbf3f9598..e0c7b3e04bd6 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -2366,7 +2366,7 @@ bool OBoundControlModel::impl_approveValueBinding_nolock( const Reference< XValu // < SYNCHRONIZED } - for ( auto const & type : aTypeCandidates ) + for ( auto const & type : std::as_const(aTypeCandidates) ) { if ( _rxBinding->supportsType( type ) ) return true; @@ -2594,7 +2594,7 @@ void OBoundControlModel::calculateExternalValueType() m_aExternalValueType = Type(); if ( !m_xExternalBinding.is() ) return; - Sequence< Type > aTypeCandidates( getSupportedBindingTypes() ); + const Sequence< Type > aTypeCandidates( getSupportedBindingTypes() ); for ( auto const & typeCandidate : aTypeCandidates ) { if ( m_xExternalBinding->supportsType( typeCandidate ) ) diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index c6abd1b8c882..95a80552370c 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -1417,7 +1417,7 @@ namespace frm ::std::set< sal_Int16 > aSelectionSet; // find the selection entries in our item list - for ( OUString const & selectEntry : aSelectEntries ) + for ( OUString const & selectEntry : std::as_const(aSelectEntries) ) { int idx = 0; for(const OUString& s : getStringItemList()) diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx index 723d8d3268c5..29336e09b75e 100644 --- a/fpicker/source/office/OfficeControlAccess.cxx +++ b/fpicker/source/office/OfficeControlAccess.cxx @@ -616,7 +616,7 @@ namespace svt static_cast< ListBox* >( _pControl )->Clear(); // add the new ones - for ( auto const & item : aItems ) + for ( auto const & item : std::as_const(aItems) ) { static_cast< ListBox* >( _pControl )->InsertEntry( item ); } diff --git a/fpicker/source/office/fpsmartcontent.cxx b/fpicker/source/office/fpsmartcontent.cxx index 53b3a8b3d291..0f65ac68d1b8 100644 --- a/fpicker/source/office/fpsmartcontent.cxx +++ b/fpicker/source/office/fpsmartcontent.cxx @@ -263,7 +263,8 @@ namespace svt bool bRet = false; try { - for ( auto const& rInfo : m_pContent->queryCreatableContentsInfo() ) + const css::uno::Sequence<css::ucb::ContentInfo> aContentsInfo = m_pContent->queryCreatableContentsInfo(); + for ( auto const& rInfo : aContentsInfo ) { // Simply look for the first KIND_FOLDER... if ( rInfo.Attributes & ContentInfoAttribute::KIND_FOLDER ) @@ -291,7 +292,8 @@ namespace svt { OUString sFolderType; - for ( auto const& rInfo : m_pContent->queryCreatableContentsInfo() ) + const css::uno::Sequence<css::ucb::ContentInfo> aContentsInfo = m_pContent->queryCreatableContentsInfo(); + for ( auto const& rInfo : aContentsInfo ) { // Simply look for the first KIND_FOLDER... if ( rInfo.Attributes & ContentInfoAttribute::KIND_FOLDER ) diff --git a/framework/source/jobs/jobdata.cxx b/framework/source/jobs/jobdata.cxx index d18f2628ceaf..5d51c97bdeaa 100644 --- a/framework/source/jobs/jobdata.cxx +++ b/framework/source/jobs/jobdata.cxx @@ -504,7 +504,7 @@ std::vector< OUString > JobData::getEnabledJobsForEvent( const css::uno::Referen // We create an additional job name list with the same size, then the original list... // step over all job entries... check her timestamps... and put only job names to the // destination list, which represent an enabled job. - css::uno::Sequence< OUString > lAllJobs = xJobList->getElementNames(); + const css::uno::Sequence< OUString > lAllJobs = xJobList->getElementNames(); sal_Int32 c = lAllJobs.getLength(); std::vector< OUString > lEnabledJobs(c); diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index 61ddc35a4ffc..0049006c9099 100644 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -318,7 +318,7 @@ void MenuToolbarController::initialize( const css::uno::Sequence< css::uno::Any Sequence< PropertyValue > aProps; // drop down menu info is currently the first ( and only ) menu in the menusettings container xMenuContainer->getByIndex(0) >>= aProps; - for ( const auto& aProp : aProps ) + for ( const auto& aProp : std::as_const(aProps) ) { if ( aProp.Name == "ItemDescriptorContainer" ) { diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index fc013759ae71..c02923a8d762 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -321,7 +321,7 @@ void NewMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & if(xMenuItemDispatch == nullptr) return; - css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > aDynamicMenuEntries = + const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > aDynamicMenuEntries = SvtDynamicMenuOptions().GetMenu( m_bNewMenu ? EDynamicMenuType::NewMenu : EDynamicMenuType::WizardMenu ); OUString aTitle; diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 06ec029eac51..433b34c72de3 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -840,7 +840,7 @@ LocaleDataImpl::getAllCurrencies2( const Locale& rLocale ) Sequence< Currency > SAL_CALL LocaleDataImpl::getAllCurrencies( const Locale& rLocale ) { - Sequence< Currency2 > aCur2( getAllCurrencies2( rLocale)); + const Sequence< Currency2 > aCur2( getAllCurrencies2( rLocale)); Sequence< Currency > aCur1( aCur2.getLength()); Currency* p1 = aCur1.getArray(); for (const Currency2& r2 : aCur2) diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx index ede7b7ac06c3..8bcf91e53b4c 100644 --- a/oox/source/core/filterbase.cxx +++ b/oox/source/core/filterbase.cxx @@ -427,7 +427,7 @@ void SAL_CALL FilterBase::initialize( const Sequence< Any >& rArgs ) { Sequence<css::beans::PropertyValue> aSeq; rArgs[0] >>= aSeq; - for (const auto& rVal : aSeq) + for (const auto& rVal : std::as_const(aSeq)) { if (rVal.Name == "UserData") { diff --git a/oox/source/crypto/AgileEngine.cxx b/oox/source/crypto/AgileEngine.cxx index 883daeed4ede..7c2a0e9c93d2 100644 --- a/oox/source/crypto/AgileEngine.cxx +++ b/oox/source/crypto/AgileEngine.cxx @@ -85,7 +85,8 @@ public: { const OUString& rLocalName = stripNamespacePrefix(rName); - for (const Attribute& rAttribute : aAttributeList->getUnknownAttributes()) + const css::uno::Sequence<Attribute> aUnknownAttributes = aAttributeList->getUnknownAttributes(); + for (const Attribute& rAttribute : aUnknownAttributes) { const OUString& rAttrLocalName = stripNamespacePrefix(rAttribute.Name); diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index ebdac1259ffd..a5928223ff1c 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -2002,19 +2002,19 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape ) OUString progID; - for (auto const& it : grabBag) + for (auto const& it : std::as_const(grabBag)) { if (it.Name == "EmbeddedObjects") { uno::Sequence<beans::PropertyValue> objects; it.Value >>= objects; - for (auto const& object : objects) + for (auto const& object : std::as_const(objects)) { if (object.Name == entryName) { uno::Sequence<beans::PropertyValue> props; object.Value >>= props; - for (auto const& prop : props) + for (auto const& prop : std::as_const(props)) { if (prop.Name == "ProgID") { |