diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-23 17:46:39 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-03 15:55:03 +0200 |
commit | 10362695c2060f6aa48bd88f6b8dd6cfa556392a (patch) | |
tree | 47934dee52011b102f3dec35eda5888240920e68 /svtools | |
parent | a297372210396260da57f34da3790f76682603cc (diff) |
fdo#46808, Adapt ModuleUIConfigurationManagerSupplier UNO service to new style
Change-Id: I58b17349474b974edd24aa17ec08ffa848a92ae9
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/misc/acceleratorexecute.cxx | 5 | ||||
-rw-r--r-- | svtools/source/uno/contextmenuhelper.cxx | 21 |
2 files changed, 10 insertions, 16 deletions
diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx index 14d54251e0cb..bb07a8917fa8 100644 --- a/svtools/source/misc/acceleratorexecute.cxx +++ b/svtools/source/misc/acceleratorexecute.cxx @@ -31,7 +31,7 @@ #include <com/sun/star/frame/XModuleManager.hpp> #include <com/sun/star/frame/XDesktop.hpp> #include <com/sun/star/ui/XUIConfigurationManager.hpp> -#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp> +#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp> #include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp> #include <com/sun/star/awt/XTopWindow.hpp> #include <com/sun/star/awt/KeyModifier.hpp> @@ -403,8 +403,7 @@ css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::st { return css::uno::Reference< css::ui::XAcceleratorConfiguration >(); } css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xUISupplier( - xSMGR->createInstance(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.ModuleUIConfigurationManagerSupplier" ))), - css::uno::UNO_QUERY_THROW); + css::ui::ModuleUIConfigurationManagerSupplier::create(comphelper::ComponentContext(xSMGR).getUNOContext()) ); css::uno::Reference< css::ui::XAcceleratorConfiguration > xAccCfg; try diff --git a/svtools/source/uno/contextmenuhelper.cxx b/svtools/source/uno/contextmenuhelper.cxx index 541b3c920dfb..3942760e5a4c 100644 --- a/svtools/source/uno/contextmenuhelper.cxx +++ b/svtools/source/uno/contextmenuhelper.cxx @@ -38,7 +38,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp> #include <com/sun/star/ui/XUIConfigurationManager.hpp> -#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp> +#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp> #include <com/sun/star/ui/ImageType.hpp> #include <com/sun/star/util/URLTransformer.hpp> #include <com/sun/star/beans/PropertyValue.hpp> @@ -430,19 +430,14 @@ ContextMenuHelper::associateUIConfigurationManagers() aModuleId = xModuleManager->identify( xFrame ); uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier( - ::comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.ui.ModuleUIConfigurationManagerSupplier" ))), - uno::UNO_QUERY ); - if ( xModuleCfgMgrSupplier.is() ) + ui::ModuleUIConfigurationManagerSupplier::create( + ::comphelper::getProcessComponentContext() ) ); + uno::Reference< ui::XUIConfigurationManager > xUICfgMgr( + xModuleCfgMgrSupplier->getUIConfigurationManager( aModuleId )); + if ( xUICfgMgr.is() ) { - uno::Reference< ui::XUIConfigurationManager > xUICfgMgr( - xModuleCfgMgrSupplier->getUIConfigurationManager( aModuleId )); - if ( xUICfgMgr.is() ) - { - m_xModuleImageMgr = uno::Reference< ui::XImageManager >( - xUICfgMgr->getImageManager(), uno::UNO_QUERY ); - } + m_xModuleImageMgr = uno::Reference< ui::XImageManager >( + xUICfgMgr->getImageManager(), uno::UNO_QUERY ); } } |