From e52a5e298b55125534cd8548ed4c1f8b694bfef6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 10 Dec 2012 15:58:49 +0200 Subject: fdo#46808, use service constructor for ui::GlobalAcceleratorConfiguration Change-Id: Icab69ba138b28c3baed4352da86a1b3b0c0cc195 --- framework/source/uielement/menubarmanager.cxx | 5 ++--- framework/source/uielement/newmenucontroller.cxx | 5 ++--- framework/source/uielement/toolbarmanager.cxx | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) (limited to 'framework/source/uielement') 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 #include #include +#include #include #include #include @@ -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 #include #include +#include #include #include @@ -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 #include #include +#include #include #include #include @@ -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; } } -- cgit