diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-25 10:56:28 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-04-25 11:57:07 +0200 |
commit | a5810faae384f7f73e8e835c1f536785a60881d2 (patch) | |
tree | 32586f5af184c764d103e64c3c31b366f421c832 /desktop/source/migration | |
parent | cafc53f8b4c08443524b1da6f4918d49afd45bb5 (diff) |
clang-tidy modernize-loop-convert in d*
Change-Id: I0830a41b48e884ef63d32b5873c7007195659bb9
Diffstat (limited to 'desktop/source/migration')
-rw-r--r-- | desktop/source/migration/migration.cxx | 18 | ||||
-rw-r--r-- | desktop/source/migration/services/oo3extensionmigration.cxx | 8 |
2 files changed, 13 insertions, 13 deletions
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index c2f81bcb8b22..b8e933341141 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -241,14 +241,14 @@ bool MigrationImpl::doMigration() const OUString sMenubarResourceURL("private:resource/menubar/menubar"); const OUString sToolbarResourcePre("private:resource/toolbar/"); - for (size_t i=0; i<vModulesInfo.size(); ++i) { - OUString sModuleIdentifier = mapModuleShortNameToIdentifier(vModulesInfo[i].sModuleShortName); + for (MigrationModuleInfo & i : vModulesInfo) { + OUString sModuleIdentifier = mapModuleShortNameToIdentifier(i.sModuleShortName); if (sModuleIdentifier.isEmpty()) continue; uno::Sequence< uno::Any > lArgs(2); OUString aOldCfgDataPath = m_aInfo.userdata + "/user/config/soffice.cfg/modules/"; - lArgs[0] <<= aOldCfgDataPath + vModulesInfo[i].sModuleShortName; + lArgs[0] <<= aOldCfgDataPath + i.sModuleShortName; lArgs[1] <<= embed::ElementModes::READ; uno::Reference< uno::XComponentContext > xContext(comphelper::getProcessComponentContext()); @@ -261,24 +261,24 @@ bool MigrationImpl::doMigration() xOldCfgManager->reload(); } - uno::Reference< ui::XUIConfigurationManager > xCfgManager = aNewVersionUIInfo.getConfigManager(vModulesInfo[i].sModuleShortName); + uno::Reference< ui::XUIConfigurationManager > xCfgManager = aNewVersionUIInfo.getConfigManager(i.sModuleShortName); - if (vModulesInfo[i].bHasMenubar) { + if (i.bHasMenubar) { uno::Reference< container::XIndexContainer > xOldVersionMenuSettings(xOldCfgManager->getSettings(sMenubarResourceURL, true), uno::UNO_QUERY); - uno::Reference< container::XIndexContainer > xNewVersionMenuSettings = aNewVersionUIInfo.getNewMenubarSettings(vModulesInfo[i].sModuleShortName); + uno::Reference< container::XIndexContainer > xNewVersionMenuSettings = aNewVersionUIInfo.getNewMenubarSettings(i.sModuleShortName); OUString sParent; compareOldAndNewConfig(sParent, xOldVersionMenuSettings, xNewVersionMenuSettings, sMenubarResourceURL); mergeOldToNewVersion(xCfgManager, xNewVersionMenuSettings, sModuleIdentifier, sMenubarResourceURL); } - sal_Int32 nToolbars = vModulesInfo[i].m_vToolbars.size(); + sal_Int32 nToolbars = i.m_vToolbars.size(); if (nToolbars >0) { for (sal_Int32 j=0; j<nToolbars; ++j) { - OUString sToolbarName = vModulesInfo[i].m_vToolbars[j]; + OUString sToolbarName = i.m_vToolbars[j]; OUString sToolbarResourceURL = sToolbarResourcePre + sToolbarName; uno::Reference< container::XIndexContainer > xOldVersionToolbarSettings(xOldCfgManager->getSettings(sToolbarResourceURL, true), uno::UNO_QUERY); - uno::Reference< container::XIndexContainer > xNewVersionToolbarSettings = aNewVersionUIInfo.getNewToolbarSettings(vModulesInfo[i].sModuleShortName, sToolbarName); + uno::Reference< container::XIndexContainer > xNewVersionToolbarSettings = aNewVersionUIInfo.getNewToolbarSettings(i.sModuleShortName, sToolbarName); OUString sParent; compareOldAndNewConfig(sParent, xOldVersionToolbarSettings, xNewVersionToolbarSettings, sToolbarResourceURL); mergeOldToNewVersion(xCfgManager, xNewVersionToolbarSettings, sModuleIdentifier, sToolbarResourceURL); diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx index 414df39f06f9..b8b067735f68 100644 --- a/desktop/source/migration/services/oo3extensionmigration.cxx +++ b/desktop/source/migration/services/oo3extensionmigration.cxx @@ -225,9 +225,9 @@ bool OO3ExtensionMigration::scanDescriptionXml( const OUString& sDescriptionXmlU if ( !aExtIdentifier.isEmpty() ) { // scan extension identifier and try to match with our black list entries - for ( size_t i = 0; i < m_aBlackList.size(); i++ ) + for (OUString & i : m_aBlackList) { - utl::SearchParam param(m_aBlackList[i], utl::SearchParam::SRCH_REGEXP); + utl::SearchParam param(i, utl::SearchParam::SRCH_REGEXP); utl::TextSearch ts(param, LANGUAGE_DONTKNOW); sal_Int32 start = 0; @@ -250,9 +250,9 @@ bool OO3ExtensionMigration::scanDescriptionXml( const OUString& sDescriptionXmlU // Try to use the folder name to match our black list // as some extensions don't provide an identifier in the // description.xml! - for ( size_t i = 0; i < m_aBlackList.size(); i++ ) + for (OUString & i : m_aBlackList) { - utl::SearchParam param(m_aBlackList[i], utl::SearchParam::SRCH_REGEXP); + utl::SearchParam param(i, utl::SearchParam::SRCH_REGEXP); utl::TextSearch ts(param, LANGUAGE_DONTKNOW); sal_Int32 start = 0; |