From ecae523d9603eaf7ff0acc98682576813e50c94a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 11 Dec 2012 16:31:27 +0200 Subject: fdo#46808, Create new-style frame::ToolBarControllerFactory service The service already existed, it just did not have an IDL file. Change-Id: I70d0e1a3fe77deaeec399761cadefb20954f1c92 --- framework/inc/services.h | 1 - framework/source/uielement/toolbarmanager.cxx | 6 ++---- framework/source/uifactory/toolbarcontrollerfactory.cxx | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'framework') diff --git a/framework/inc/services.h b/framework/inc/services.h index b56877cc758e..cfec934588e2 100644 --- a/framework/inc/services.h +++ b/framework/inc/services.h @@ -65,7 +65,6 @@ namespace framework{ #define SERVICENAME_DOCUMENTACCELERATORCONFIGURATION DECLARE_ASCII("com.sun.star.ui.DocumentAcceleratorConfiguration") #define SERVICENAME_PACKAGESTRUCTURECREATOR DECLARE_ASCII("com.sun.star.embed.PackageStructureCreator" ) #define SERVICENAME_TOOLBARFACTORY DECLARE_ASCII("com.sun.star.ui.ToolBarFactory" ) -#define SERVICENAME_TOOLBARCONTROLLERFACTORY DECLARE_ASCII("com.sun.star.frame.ToolBarControllerFactory" ) #define SERVICENAME_LICENSE SERVICENAME_JOB #define SERVICENAME_STATUSBARFACTORY DECLARE_ASCII("com.sun.star.ui.StatusBarFactory" ) #define SERVICENAME_UICATEGORYDESCRIPTION DECLARE_ASCII("com.sun.star.ui.UICategoryDescription" ) diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 8ab834070e31..941a1f47807d 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -241,10 +242,7 @@ ToolBarManager::ToolBarManager( const Reference< XMultiServiceFactory >& rServic if ( m_xServiceManager.is() ) { - m_xToolbarControllerRegistration = Reference< XUIControllerRegistration >( - m_xServiceManager->createInstance( SERVICENAME_TOOLBARCONTROLLERFACTORY ), - UNO_QUERY ); - + m_xToolbarControllerRegistration = frame::ToolBarControllerFactory::create( comphelper::getComponentContext(m_xServiceManager) ); m_xURLTransformer.set( URLTransformer::create( ::comphelper::getComponentContext(m_xServiceManager)) ); diff --git a/framework/source/uifactory/toolbarcontrollerfactory.cxx b/framework/source/uifactory/toolbarcontrollerfactory.cxx index fa833d7693cb..91cefa24f44a 100644 --- a/framework/source/uifactory/toolbarcontrollerfactory.cxx +++ b/framework/source/uifactory/toolbarcontrollerfactory.cxx @@ -53,7 +53,7 @@ namespace framework //***************************************************************************************************************** DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( ToolbarControllerFactory , ::cppu::OWeakObject , - SERVICENAME_TOOLBARCONTROLLERFACTORY , + DECLARE_ASCII("com.sun.star.frame.ToolBarControllerFactory"), IMPLEMENTATIONNAME_TOOLBARCONTROLLERFACTORY ) -- cgit