summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-12-10 15:58:49 +0200
committerNoel Grandin <noel@peralex.com>2012-12-13 05:20:58 +0200
commite52a5e298b55125534cd8548ed4c1f8b694bfef6 (patch)
treecd05d4866578c0f63142a24c8ef7607778b3c78a /framework
parent2f998bdf8f5c504f09833febe0cd16ce743f57a5 (diff)
fdo#46808, use service constructor for ui::GlobalAcceleratorConfiguration
Change-Id: Icab69ba138b28c3baed4352da86a1b3b0c0cc195
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/services.h1
-rw-r--r--framework/source/accelerators/globalacceleratorconfiguration.cxx2
-rw-r--r--framework/source/uielement/menubarmanager.cxx5
-rw-r--r--framework/source/uielement/newmenucontroller.cxx5
-rw-r--r--framework/source/uielement/toolbarmanager.cxx5
5 files changed, 7 insertions, 11 deletions
diff --git a/framework/inc/services.h b/framework/inc/services.h
index d8f38672d57b..08f406f5c350 100644
--- a/framework/inc/services.h
+++ b/framework/inc/services.h
@@ -65,7 +65,6 @@ namespace framework{
#define SERVICENAME_WINDOWSTATECONFIGURATION DECLARE_ASCII("com.sun.star.ui.WindowStateConfiguration" )
#define SERVICENAME_STARTMODULE DECLARE_ASCII("com.sun.star.frame.StartModule" )
#define SERVICENAME_FRAMECONTROLLER DECLARE_ASCII("com.sun.star.frame.Controller" )
-#define SERVICENAME_GLOBALACCELERATORCONFIGURATION DECLARE_ASCII("com.sun.star.ui.GlobalAcceleratorConfiguration")
#define SERVICENAME_MODULEACCELERATORCONFIGURATION DECLARE_ASCII("com.sun.star.ui.ModuleAcceleratorConfiguration")
#define SERVICENAME_DOCUMENTACCELERATORCONFIGURATION DECLARE_ASCII("com.sun.star.ui.DocumentAcceleratorConfiguration")
#define SERVICENAME_PACKAGESTRUCTURECREATOR DECLARE_ASCII("com.sun.star.embed.PackageStructureCreator" )
diff --git a/framework/source/accelerators/globalacceleratorconfiguration.cxx b/framework/source/accelerators/globalacceleratorconfiguration.cxx
index 66f58e490494..fdc1505c92c3 100644
--- a/framework/source/accelerators/globalacceleratorconfiguration.cxx
+++ b/framework/source/accelerators/globalacceleratorconfiguration.cxx
@@ -53,7 +53,7 @@ DEFINE_XTYPEPROVIDER_2_WITH_BASECLASS(GlobalAcceleratorConfiguration,
DEFINE_XSERVICEINFO_MULTISERVICE(GlobalAcceleratorConfiguration ,
::cppu::OWeakObject ,
- SERVICENAME_GLOBALACCELERATORCONFIGURATION ,
+ DECLARE_ASCII("com.sun.star.ui.GlobalAcceleratorConfiguration"),
IMPLEMENTATIONNAME_GLOBALACCELERATORCONFIGURATION)
DEFINE_INIT_SERVICE(GlobalAcceleratorConfiguration,
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 1ef7dc919dbc..bb83d226f751 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -44,6 +44,7 @@
#include <com/sun/star/frame/XPopupMenuController.hpp>
#include <com/sun/star/frame/XUIControllerRegistration.hpp>
#include <com/sun/star/lang/SystemDependent.hpp>
+#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/ItemType.hpp>
#include <com/sun/star/ui/ImageType.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -1598,9 +1599,7 @@ void MenuBarManager::RetrieveShortcuts( std::vector< MenuItemHandler* >& aMenuSh
if ( !xGlobalAccelCfg.is() )
{
- xGlobalAccelCfg = Reference< XAcceleratorConfiguration >( getServiceFactory()->createInstance(
- SERVICENAME_GLOBALACCELERATORCONFIGURATION ),
- UNO_QUERY );
+ xGlobalAccelCfg = GlobalAcceleratorConfiguration::create( comphelper::getComponentContext(getServiceFactory()) );
m_xGlobalAcceleratorManager = xGlobalAccelCfg;
}
}
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index 8bb012d9c47d..317b16a54e67 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/awt/MenuItemStyle.hpp>
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <vcl/svapp.hxx>
@@ -215,9 +216,7 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu )
if ( !xGlobalAccelCfg.is() )
{
- xGlobalAccelCfg = Reference< XAcceleratorConfiguration >( m_xServiceManager->createInstance(
- SERVICENAME_GLOBALACCELERATORCONFIGURATION ),
- UNO_QUERY );
+ xGlobalAccelCfg = GlobalAcceleratorConfiguration::create( comphelper::getComponentContext(m_xServiceManager) );
m_xGlobalAcceleratorManager = xGlobalAccelCfg;
}
}
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 2cd1c12ccabc..cc1bac78414c 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -41,6 +41,7 @@
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
+#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/XUIElementSettings.hpp>
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
@@ -2267,9 +2268,7 @@ bool ToolBarManager::RetrieveShortcut( const rtl::OUString& rCommandURL, rtl::OU
if ( !xGlobalAccelCfg.is() )
{
- xGlobalAccelCfg = Reference< XAcceleratorConfiguration >( m_xServiceManager->createInstance(
- SERVICENAME_GLOBALACCELERATORCONFIGURATION ),
- UNO_QUERY );
+ xGlobalAccelCfg = GlobalAcceleratorConfiguration::create( comphelper::getComponentContext(m_xServiceManager) );
m_xGlobalAcceleratorManager = xGlobalAccelCfg;
}
}