From cd8ea20aa4b85128956a79c80f7953d30e99e802 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 26 Feb 2013 16:24:53 +0200 Subject: fdo#46808, Convert ui::UIConfigurationManager to new-style Change-Id: I62c37eb6d0e0b2a681a84e1fa0067d0a9f967cf2 --- desktop/source/migration/migration.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'desktop/source/migration') diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index 61c57c1c9b75..56400e0b81a6 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -267,14 +268,12 @@ sal_Bool MigrationImpl::doMigration() uno::Reference< uno::XComponentContext > xContext(comphelper::getProcessComponentContext()); uno::Reference< lang::XSingleServiceFactory > xStorageFactory(embed::FileSystemStorageFactory::create(xContext)); uno::Reference< embed::XStorage > xModules(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY); - uno::Reference< ui::XUIConfigurationManager > xOldCfgManager(xContext->getServiceManager()->createInstanceWithContext("com.sun.star.ui.UIConfigurationManager", xContext), uno::UNO_QUERY ); - uno::Reference< ui::XUIConfigurationStorage > xOldCfgStorage( xOldCfgManager, uno::UNO_QUERY ); - uno::Reference< ui::XUIConfigurationPersistence > xOldCfgPersistence( xOldCfgManager, uno::UNO_QUERY ); + uno::Reference< ui::XUIConfigurationManager2 > xOldCfgManager = ui::UIConfigurationManager::create(xContext); - if ( xOldCfgStorage.is() && xOldCfgPersistence.is() && xModules.is() ) + if ( xModules.is() ) { - xOldCfgStorage->setStorage( xModules ); - xOldCfgPersistence->reload(); + xOldCfgManager->setStorage( xModules ); + xOldCfgManager->reload(); } uno::Reference< ui::XUIConfigurationManager > xCfgManager = aNewVersionUIInfo.getConfigManager(vModulesInfo[i].sModuleShortName); -- cgit