summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-12-11 16:31:27 +0200
committerNoel Grandin <noel@peralex.com>2012-12-21 09:12:07 +0200
commitecae523d9603eaf7ff0acc98682576813e50c94a (patch)
treed9097ffd1356c95093263ca5e593d2f64e592c8b /framework
parentcd0b83b531e7cfa424299f1e263e08ff77e1a7a5 (diff)
fdo#46808, Create new-style frame::ToolBarControllerFactory service
The service already existed, it just did not have an IDL file. Change-Id: I70d0e1a3fe77deaeec399761cadefb20954f1c92
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/services.h1
-rw-r--r--framework/source/uielement/toolbarmanager.cxx6
-rw-r--r--framework/source/uifactory/toolbarcontrollerfactory.cxx2
3 files changed, 3 insertions, 6 deletions
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 <com/sun/star/ui/ItemType.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/ToolBarControllerFactory.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/XDockableWindow.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
@@ -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
)