summaryrefslogtreecommitdiff
path: root/desktop/source/migration
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-08-23 18:06:05 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-03 15:55:03 +0200
commit7a464263cc5c2ca2b7128734ff4860e02d662818 (patch)
tree4614aa57736484cb46c8702f6afee1c2e663e8a0 /desktop/source/migration
parent10362695c2060f6aa48bd88f6b8dd6cfa556392a (diff)
fdo#46808, Adapt UICommandDescription UNO service to new style
Change-Id: Ibca112904f137ff981ae9be3e5bd56aa11aec352
Diffstat (limited to 'desktop/source/migration')
-rw-r--r--desktop/source/migration/migration.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 87702bade412..8424f0975400 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -61,6 +61,7 @@
#include <com/sun/star/embed/FileSystemStorageFactory.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/UICommandDescription.hpp>
#include <com/sun/star/ui/XUIConfiguration.hpp>
#include <com/sun/star/ui/XUIConfigurationStorage.hpp>
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
@@ -91,12 +92,9 @@ static const char XDG_CONFIG_PART[] = "/.config";
::rtl::OUString sLabel;
uno::Reference< container::XNameAccess > xUICommands;
- uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.UICommandDescription")) ), uno::UNO_QUERY );
- if ( xNameAccess.is() )
- {
- uno::Any a = xNameAccess->getByName( sModuleIdentifier );
- a >>= xUICommands;
- }
+ uno::Reference< container::XNameAccess > xNameAccess( ui::UICommandDescription::create(::comphelper::getProcessComponentContext()) );
+ uno::Any a = xNameAccess->getByName( sModuleIdentifier );
+ a >>= xUICommands;
if (xUICommands.is())
{
if ( !sCommand.isEmpty() )