Kaydet (Commit) ecae523d authored tarafından Noel Grandin's avatar Noel Grandin

fdo#46808, Create new-style frame::ToolBarControllerFactory service

The service already existed, it just did not have an IDL file.

Change-Id: I70d0e1a3fe77deaeec399761cadefb20954f1c92
üst cd0b83b5
......@@ -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" )
......
......@@ -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)) );
......
......@@ -53,7 +53,7 @@ namespace framework
//*****************************************************************************************************************
DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( ToolbarControllerFactory ,
::cppu::OWeakObject ,
SERVICENAME_TOOLBARCONTROLLERFACTORY ,
DECLARE_ASCII("com.sun.star.frame.ToolBarControllerFactory"),
IMPLEMENTATIONNAME_TOOLBARCONTROLLERFACTORY
)
......
......@@ -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,\
......
/* -*- 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: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment