summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/inc/services.h1
-rw-r--r--framework/source/uielement/toolbarmanager.cxx6
-rw-r--r--framework/source/uifactory/toolbarcontrollerfactory.cxx2
-rw-r--r--offapi/UnoApi_offapi.mk1
-rw-r--r--offapi/com/sun/star/frame/ToolBarControllerFactory.idl41
5 files changed, 45 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
)
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 29f07f54cb96..55c1d38443da 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -129,6 +129,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/frame,\
GlobalEventBroadcaster \
MediaTypeDetectionHelper \
ModuleManager \
+ ToolBarControllerFactory \
UICommandDescription \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/graphic,\
diff --git a/offapi/com/sun/star/frame/ToolBarControllerFactory.idl b/offapi/com/sun/star/frame/ToolBarControllerFactory.idl
new file mode 100644
index 000000000000..8b62631253b5
--- /dev/null
+++ b/offapi/com/sun/star/frame/ToolBarControllerFactory.idl
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef __com_sun_star_frame_ToolBarControllerFactory_idl__
+#define __com_sun_star_frame_ToolBarControllerFactory_idl__
+
+#include <com/sun/star/frame/XUIControllerRegistration.idl>
+
+
+module com { module sun { module star { module frame {
+
+
+/**
+ This interface could be incomplete since I derived it from it's sole place of use.
+
+ @since LibreOffice 4.1
+ */
+service ToolBarControllerFactory : XUIControllerRegistration;
+
+}; }; }; };
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */