summaryrefslogtreecommitdiff
path: root/framework/source/uielement
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/source/uielement
parent2f998bdf8f5c504f09833febe0cd16ce743f57a5 (diff)
fdo#46808, use service constructor for ui::GlobalAcceleratorConfiguration
Change-Id: Icab69ba138b28c3baed4352da86a1b3b0c0cc195
Diffstat (limited to 'framework/source/uielement')
-rw-r--r--framework/source/uielement/menubarmanager.cxx5
-rw-r--r--framework/source/uielement/newmenucontroller.cxx5
-rw-r--r--framework/source/uielement/toolbarmanager.cxx5
3 files changed, 6 insertions, 9 deletions
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;
}
}