[Libreoffice-commits] core.git: desktop/source
Juergen Funk
juergen.funk_ml at cib.de
Tue Jan 20 05:39:21 PST 2015
desktop/source/migration/migration.cxx | 33 ----------------------------
desktop/source/migration/migration_impl.hxx | 3 --
2 files changed, 1 insertion(+), 35 deletions(-)
New commits:
commit 282baa9012a4f43931be12fd429d15c081e7bf28
Author: Juergen Funk <juergen.funk_ml at cib.de>
Date: Tue Jan 20 13:32:11 2015 +0100
Remove unused code
- a inline function not use
- a variable will be set but not use
Change-Id: I67674a6cd05ddb058d11d46188d5c9d039ed40fb
Signed-off-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 553138e..15d3b5b 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -302,7 +302,6 @@ bool MigrationImpl::doMigration()
}
m_aOldVersionItemsHashMap.clear();
- m_aNewVersionItemsHashMap.clear();
}
// execute the migration items from Setup.xcu
@@ -1151,36 +1150,6 @@ void MigrationImpl::compareOldAndNewConfig(const OUString& sParent,
sSibling = it->m_sCommandURL;
}
-
- uno::Reference< container::XIndexContainer > xPopup;
- for (it = vNewItems.begin(); it!=vNewItems.end(); ++it)
- {
- ::std::vector< MigrationItem >::iterator pFound = ::std::find(vOldItems.begin(), vOldItems.end(), *it);
- if (pFound != vOldItems.end() && it->m_xPopupMenu.is())
- {
- OUString sName;
- if (!sParent.isEmpty())
- sName = sParent + MENU_SEPARATOR + it->m_sCommandURL;
- else
- sName = it->m_sCommandURL;
- compareOldAndNewConfig(sName, pFound->m_xPopupMenu, it->m_xPopupMenu, sResourceURL);
- }
- else if (::std::find(vOldItems.begin(), vOldItems.end(), *it) == vOldItems.end())
- {
- MigrationItem aMigrationItem(sParent, sSibling, it->m_sCommandURL, it->m_xPopupMenu);
- if (m_aNewVersionItemsHashMap.find(sResourceURL)==m_aNewVersionItemsHashMap.end())
- {
- ::std::vector< MigrationItem > vMigrationItems;
- m_aNewVersionItemsHashMap.insert(MigrationHashMap::value_type(sResourceURL, vMigrationItems));
- m_aNewVersionItemsHashMap[sResourceURL].push_back(aMigrationItem);
- }
- else
- {
- if (::std::find(m_aNewVersionItemsHashMap[sResourceURL].begin(), m_aNewVersionItemsHashMap[sResourceURL].end(), aMigrationItem)==m_aNewVersionItemsHashMap[sResourceURL].end())
- m_aNewVersionItemsHashMap[sResourceURL].push_back(aMigrationItem);
- }
- }
- }
}
void MigrationImpl::mergeOldToNewVersion(const uno::Reference< ui::XUIConfigurationManager >& xCfgManager,
@@ -1247,7 +1216,7 @@ void MigrationImpl::mergeOldToNewVersion(const uno::Reference< ui::XUIConfigurat
if (it->m_sPrevSibling.isEmpty())
xTemp->insertByIndex(0, uno::makeAny(aPropSeq));
- else if (!it->m_sPrevSibling.isEmpty())
+ else
{
sal_Int32 nCount = xTemp->getCount();
sal_Int32 i = 0;
diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx
index 4f304fb..bffba28 100644
--- a/desktop/source/migration/migration_impl.hxx
+++ b/desktop/source/migration/migration_impl.hxx
@@ -121,8 +121,6 @@ struct MigrationItem
aMigrationItem.m_sCommandURL == m_sCommandURL &&
aMigrationItem.m_xPopupMenu.is() == m_xPopupMenu.is() );
}
-
- OUString GetPrevSibling() const { return m_sPrevSibling; }
};
typedef std::unordered_map< OUString, std::vector< MigrationItem >,
@@ -185,7 +183,6 @@ private:
install_info m_aInfo; // info about the version being migrated
strings_vr m_vrFileList; // final list of files to be copied
MigrationHashMap m_aOldVersionItemsHashMap;
- MigrationHashMap m_aNewVersionItemsHashMap;
OUString m_sModuleIdentifier;
// functions to control the migration process
More information about the Libreoffice-commits
mailing list