diff options
author | Noel Grandin <noel@peralex.com> | 2013-02-26 16:24:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-03-07 08:23:38 +0200 |
commit | cd8ea20aa4b85128956a79c80f7953d30e99e802 (patch) | |
tree | 2ec962196db84427e97bbc9bb73f9566d70b6fd1 /desktop | |
parent | 1b4b53a2ecd7f2283a2c86b2c474786918cbfbf2 (diff) |
fdo#46808, Convert ui::UIConfigurationManager to new-style
Change-Id: I62c37eb6d0e0b2a681a84e1fa0067d0a9f967cf2
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/migration/migration.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
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 <com/sun/star/embed/XStorage.hpp> #include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp> #include <com/sun/star/frame/UICommandDescription.hpp> +#include <com/sun/star/ui/UIConfigurationManager.hpp> #include <com/sun/star/ui/XUIConfiguration.hpp> #include <com/sun/star/ui/XUIConfigurationStorage.hpp> #include <com/sun/star/ui/XUIConfigurationPersistence.hpp> @@ -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); |