diff options
-rw-r--r-- | desktop/source/app/app.cxx | 5 | ||||
-rw-r--r-- | framework/inc/pch/precompiled_fwk.hxx | 6 | ||||
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 6 | ||||
-rw-r--r-- | framework/source/uielement/popuptoolbarcontroller.cxx | 4 | ||||
-rw-r--r-- | framework/source/uielement/statusbarmanager.cxx | 4 | ||||
-rw-r--r-- | framework/source/uielement/toolbarmanager.cxx | 4 | ||||
-rw-r--r-- | framework/util/fwk.component | 3 | ||||
-rwxr-xr-x | offapi/UnoApi_offapi.mk | 3 | ||||
-rw-r--r-- | offapi/com/sun/star/frame/PopupMenuControllerFactory.idl | 9 | ||||
-rw-r--r-- | offapi/com/sun/star/frame/StatusbarControllerFactory.idl | 12 | ||||
-rw-r--r-- | offapi/com/sun/star/frame/ToolbarControllerFactory.idl | 7 | ||||
-rw-r--r-- | offapi/com/sun/star/frame/thePopupMenuControllerFactory.idl | 46 | ||||
-rw-r--r-- | offapi/com/sun/star/frame/theStatusbarControllerFactory.idl | 47 | ||||
-rw-r--r-- | offapi/com/sun/star/frame/theToolbarControllerFactory.idl | 41 | ||||
-rw-r--r-- | sfx2/inc/pch/precompiled_sfx.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/ControllerFactory.cxx | 4 |
16 files changed, 167 insertions, 36 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 88c7fbfd3926..82c03b4705fa 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -72,8 +72,7 @@ #include <com/sun/star/ui/UIElementFactoryManager.hpp> #include <com/sun/star/ui/WindowStateConfiguration.hpp> #include <com/sun/star/frame/XUIControllerRegistration.hpp> -#include <com/sun/star/frame/ToolbarControllerFactory.hpp> -#include <com/sun/star/frame/PopupMenuControllerFactory.hpp> +#include <com/sun/star/frame/thePopupMenuControllerFactory.hpp> #include <com/sun/star/office/Quickstart.hpp> #include <toolkit/helper/vclunohelper.hxx> @@ -2199,7 +2198,7 @@ void Desktop::PreloadConfigurationData() // configuration file they also get preloaded! Reference< css::frame::XUIControllerRegistration > xPopupMenuControllerFactory = - css::frame::PopupMenuControllerFactory::create( xContext ); + css::frame::thePopupMenuControllerFactory::get( xContext ); try { xPopupMenuControllerFactory->hasController( diff --git a/framework/inc/pch/precompiled_fwk.hxx b/framework/inc/pch/precompiled_fwk.hxx index c9b8c09bfa57..db2efda756a5 100644 --- a/framework/inc/pch/precompiled_fwk.hxx +++ b/framework/inc/pch/precompiled_fwk.hxx @@ -121,11 +121,11 @@ #include <com/sun/star/frame/LayoutManagerEvents.hpp> #include <com/sun/star/frame/ModuleManager.hpp> #include <com/sun/star/frame/OfficeFrameLoader.hpp> -#include <com/sun/star/frame/PopupMenuControllerFactory.hpp> +#include <com/sun/star/frame/thePopupMenuControllerFactory.hpp> #include <com/sun/star/frame/StartModule.hpp> -#include <com/sun/star/frame/StatusbarControllerFactory.hpp> +#include <com/sun/star/frame/theStatusbarControllerFactory.hpp> #include <com/sun/star/frame/TaskCreator.hpp> -#include <com/sun/star/frame/ToolbarControllerFactory.hpp> +#include <com/sun/star/frame/theToolbarControllerFactory.hpp> #include <com/sun/star/frame/theUICommandDescription.hpp> #include <com/sun/star/frame/XComponentLoader.hpp> #include <com/sun/star/frame/XControlNotificationListener.hpp> diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 866ea133a4bf..b3fb3bf9a71e 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -43,7 +43,7 @@ #include <com/sun/star/uno/XCurrentContext.hpp> #include <com/sun/star/lang/XMultiComponentFactory.hpp> #include <com/sun/star/frame/XPopupMenuController.hpp> -#include <com/sun/star/frame/PopupMenuControllerFactory.hpp> +#include <com/sun/star/frame/thePopupMenuControllerFactory.hpp> #include <com/sun/star/lang/SystemDependent.hpp> #include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp> #include <com/sun/star/ui/ItemType.hpp> @@ -179,7 +179,7 @@ MenuBarManager::MenuBarManager( , m_xURLTransformer(_xURLTransformer) , m_nSymbolsStyle( SvtMiscOptions().GetCurrentSymbolsStyle() ) { - m_xPopupMenuControllerFactory = frame::PopupMenuControllerFactory::create(m_xContext); + m_xPopupMenuControllerFactory = frame::thePopupMenuControllerFactory::get(m_xContext); FillMenuManager( pMenu, rFrame, rDispatchProvider, rModuleIdentifier, bDelete, bDeleteChildren ); } @@ -1963,7 +1963,7 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame,AddonMenu* pAddonMen m_bIsBookmarkMenu = sal_True; OUString aModuleIdentifier; - m_xPopupMenuControllerFactory = frame::PopupMenuControllerFactory::create( + m_xPopupMenuControllerFactory = frame::thePopupMenuControllerFactory::get( ::comphelper::getProcessComponentContext()); Reference< XStatusListener > xStatusListener; diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx index c94edc5fed6b..6f513fde1dd1 100644 --- a/framework/source/uielement/popuptoolbarcontroller.cxx +++ b/framework/source/uielement/popuptoolbarcontroller.cxx @@ -32,7 +32,7 @@ #include <com/sun/star/awt/PopupMenuDirection.hpp> #include <com/sun/star/awt/XPopupMenu.hpp> -#include <com/sun/star/frame/PopupMenuControllerFactory.hpp> +#include <com/sun/star/frame/thePopupMenuControllerFactory.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/frame/XPopupMenuController.hpp> #include <com/sun/star/frame/XUIControllerFactory.hpp> @@ -129,7 +129,7 @@ throw ( css::uno::Exception, css::uno::RuntimeException ) try { m_xPopupMenuFactory.set( - css::frame::PopupMenuControllerFactory::create( m_xContext ) ); + css::frame::thePopupMenuControllerFactory::get( m_xContext ) ); m_bHasController = m_xPopupMenuFactory->hasController( m_aPopupCommand, getModuleName() ); } diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index bb5cfd2ef589..399a89ec6047 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -36,7 +36,7 @@ #include <helper/mischelper.hxx> #include <com/sun/star/frame/XFrame.hpp> -#include <com/sun/star/frame/StatusbarControllerFactory.hpp> +#include <com/sun/star/frame/theStatusbarControllerFactory.hpp> #include <com/sun/star/ui/ItemStyle.hpp> #include <com/sun/star/ui/ItemType.hpp> #include <com/sun/star/lang/XMultiComponentFactory.hpp> @@ -145,7 +145,7 @@ StatusBarManager::StatusBarManager( m_xContext( rxContext ) { - m_xStatusbarControllerFactory = frame::StatusbarControllerFactory::create( + m_xStatusbarControllerFactory = frame::theStatusbarControllerFactory::get( ::comphelper::getProcessComponentContext()); m_pStatusBar->SetClickHdl( LINK( this, StatusBarManager, Click ) ); diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index dd2b7b88e669..51bb67c4413c 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -42,7 +42,7 @@ #include <com/sun/star/lang/XMultiComponentFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/frame/ModuleManager.hpp> -#include <com/sun/star/frame/ToolbarControllerFactory.hpp> +#include <com/sun/star/frame/theToolbarControllerFactory.hpp> #include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp> #include <com/sun/star/ui/XUIElementSettings.hpp> #include <com/sun/star/ui/XUIConfigurationPersistence.hpp> @@ -211,7 +211,7 @@ ToolBarManager::ToolBarManager( const Reference< XComponentContext >& rxContext, if ( pWindow ) ((SystemWindow *)pWindow)->GetTaskPaneList()->AddWindow( m_pToolBar ); - m_xToolbarControllerFactory = frame::ToolbarControllerFactory::create( m_xContext ); + m_xToolbarControllerFactory = frame::theToolbarControllerFactory::get( m_xContext ); m_xURLTransformer = URLTransformer::create( m_xContext ); m_pToolBar->SetSelectHdl( LINK( this, ToolBarManager, Select) ); diff --git a/framework/util/fwk.component b/framework/util/fwk.component index 2a211cea5c6f..d6d5d1be0605 100644 --- a/framework/util/fwk.component +++ b/framework/util/fwk.component @@ -101,6 +101,7 @@ </implementation> <implementation name="com.sun.star.comp.framework.PopupMenuControllerFactory"> <service name="com.sun.star.frame.PopupMenuControllerFactory"/> + <singleton name="com.sun.star.frame.thePopupMenuControllerFactory"/> </implementation> <implementation name="com.sun.star.comp.framework.RecentFilesMenuController" constructor="com_sun_star_comp_framework_RecentFilesMenuController_get_implementation"> @@ -108,6 +109,7 @@ </implementation> <implementation name="com.sun.star.comp.framework.StatusBarControllerFactory"> <service name="com.sun.star.frame.StatusbarControllerFactory"/> + <singleton name="com.sun.star.frame.theStatusbarControllerFactory"/> </implementation> <implementation name="com.sun.star.comp.framework.StatusBarFactory"> <service name="com.sun.star.ui.StatusBarFactory"/> @@ -121,6 +123,7 @@ </implementation> <implementation name="com.sun.star.comp.framework.ToolBarControllerFactory"> <service name="com.sun.star.frame.ToolbarControllerFactory"/> + <singleton name="com.sun.star.frame.theToolbarControllerFactory"/> </implementation> <implementation name="com.sun.star.comp.framework.ToolBarFactory"> <service name="com.sun.star.ui.ToolBarFactory"/> diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index f2664e90d5e7..78c2e7dcd13f 100755 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -951,6 +951,9 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,com/sun/star/frame,\ ToolbarController \ ToolbarControllerFactory \ TransientDocumentsDocumentContentFactory \ + thePopupMenuControllerFactory \ + theStatusbarControllerFactory \ + theToolbarControllerFactory \ )) $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,com/sun/star/gallery,\ GalleryItem \ diff --git a/offapi/com/sun/star/frame/PopupMenuControllerFactory.idl b/offapi/com/sun/star/frame/PopupMenuControllerFactory.idl index f6c55b0bf238..009bb66a9734 100644 --- a/offapi/com/sun/star/frame/PopupMenuControllerFactory.idl +++ b/offapi/com/sun/star/frame/PopupMenuControllerFactory.idl @@ -24,13 +24,10 @@ module com { module sun { module star { module frame { -/** specifies a factory that creates instances of registered popup menu controller. +/** + A legacy (single-instance) service-variant of thePopupMenuControllerFactory singleton. - <p> - A pop-up menu controller can be registered for a command URL and a model service name. - A menu bar or context menu will automatically create a pop-up menu controller if - it contains a registered command URL. - </p> + @deprecated Use thePopupMenuControllerFactory singleton instead. @since OOo 2.0 */ diff --git a/offapi/com/sun/star/frame/StatusbarControllerFactory.idl b/offapi/com/sun/star/frame/StatusbarControllerFactory.idl index ffffabf06699..4f74f6d6c132 100644 --- a/offapi/com/sun/star/frame/StatusbarControllerFactory.idl +++ b/offapi/com/sun/star/frame/StatusbarControllerFactory.idl @@ -24,14 +24,10 @@ module com { module sun { module star { module frame { -/** specifies a factory that creates instances of registered status bar - controller. - - <p> - A status bar controller can be registered for a command URL and a model - service name. A status bar will automatically create a status bar controller - if it contains a registered command URL. - </p> +/** + A legacy (single-instance) service-variant of theStatusbarControllerFactory singleton. + + @deprecated Use theStatusbarControllerFactory singleton instead. @since OOo 2.0 */ diff --git a/offapi/com/sun/star/frame/ToolbarControllerFactory.idl b/offapi/com/sun/star/frame/ToolbarControllerFactory.idl index 69b1314808a5..56e8e3fa1026 100644 --- a/offapi/com/sun/star/frame/ToolbarControllerFactory.idl +++ b/offapi/com/sun/star/frame/ToolbarControllerFactory.idl @@ -22,11 +22,10 @@ module com { module sun { module star { module frame { -/** specifies a factory that creates instances of registered toolbar controller. +/** + A legacy (single-instance) service-variant of theToolbarControllerFactory singleton. - <p> - A toolbar controller can be registered for a command URL and a model service name. - </p> + @deprecated Use theToolbarControllerFactory singleton instead. @since OOo 2.0 */ diff --git a/offapi/com/sun/star/frame/thePopupMenuControllerFactory.idl b/offapi/com/sun/star/frame/thePopupMenuControllerFactory.idl new file mode 100644 index 000000000000..48511b7b563e --- /dev/null +++ b/offapi/com/sun/star/frame/thePopupMenuControllerFactory.idl @@ -0,0 +1,46 @@ +/* -*- 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_thePopupMenuControllerFactory_idl__ +#define __com_sun_star_frame_thePopupMenuControllerFactory_idl__ + +#include <com/sun/star/frame/XUIControllerFactory.idl> + +module com { module sun { module star { module frame { + +/** specifies a factory that creates instances of registered popup menu controller. + + <p> + A pop-up menu controller can be registered for a command URL and a model service name. + A menu bar or context menu will automatically create a pop-up menu controller if + it contains a registered command URL. + </p> + + Prior to LibreOffice 4.3, this singleton was only available as a + (single-instance) PopupMenuControllerFactory service. + + @since LibreOffice 4.3 +*/ +singleton thePopupMenuControllerFactory : XUIControllerFactory; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/frame/theStatusbarControllerFactory.idl b/offapi/com/sun/star/frame/theStatusbarControllerFactory.idl new file mode 100644 index 000000000000..3fdfb1101ab7 --- /dev/null +++ b/offapi/com/sun/star/frame/theStatusbarControllerFactory.idl @@ -0,0 +1,47 @@ +/* -*- 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_theStatusbarControllerFactory_idl__ +#define __com_sun_star_frame_theStatusbarControllerFactory_idl__ + +#include <com/sun/star/frame/XUIControllerFactory.idl> + +module com { module sun { module star { module frame { + +/** specifies a factory that creates instances of registered status bar + controller. + + <p> + A status bar controller can be registered for a command URL and a model + service name. A status bar will automatically create a status bar controller + if it contains a registered command URL. + </p> + + Prior to LibreOffice 4.3, this singleton was only available as a + (single-instance) StatusbarControllerFactory service. + + @since LibreOffice 4.3 +*/ +singleton theStatusbarControllerFactory : XUIControllerFactory; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/frame/theToolbarControllerFactory.idl b/offapi/com/sun/star/frame/theToolbarControllerFactory.idl new file mode 100644 index 000000000000..b0222af96ae8 --- /dev/null +++ b/offapi/com/sun/star/frame/theToolbarControllerFactory.idl @@ -0,0 +1,41 @@ +/* + * 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_theToolbarControllerFactory_idl__ +#define __com_sun_star_frame_theToolbarControllerFactory_idl__ + +#include <com/sun/star/frame/XUIControllerFactory.idl> + +module com { module sun { module star { module frame { + +/** specifies a factory that creates instances of registered toolbar controller. + + <p> + A toolbar controller can be registered for a command URL and a model service name. + </p> + + Prior to LibreOffice 4.3, this singleton was only available as a + (single-instance) ToolbarControllerFactory service. + + @since LibreOffice 4.3 +*/ + +singleton theToolbarControllerFactory : XUIControllerFactory; + +}; }; }; }; + +#endif diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx index f2e871335f10..208f750dd5ab 100644 --- a/sfx2/inc/pch/precompiled_sfx.hxx +++ b/sfx2/inc/pch/precompiled_sfx.hxx @@ -253,7 +253,7 @@ #include <com/sun/star/frame/IllegalArgumentIOException.hpp> #include <com/sun/star/frame/LayoutManagerEvents.hpp> #include <com/sun/star/frame/ModuleManager.hpp> -#include <com/sun/star/frame/ToolbarControllerFactory.hpp> +#include <com/sun/star/frame/theToolbarControllerFactory.hpp> #include <com/sun/star/frame/theUICommandDescription.hpp> #include <com/sun/star/frame/UntitledNumbersConst.hpp> #include <com/sun/star/frame/XBorderResizeListener.hpp> diff --git a/sfx2/source/sidebar/ControllerFactory.cxx b/sfx2/source/sidebar/ControllerFactory.cxx index 90e202ca9232..3a6e294246e5 100644 --- a/sfx2/source/sidebar/ControllerFactory.cxx +++ b/sfx2/source/sidebar/ControllerFactory.cxx @@ -23,7 +23,7 @@ #include <com/sun/star/frame/XToolbarController.hpp> #include <com/sun/star/frame/XFrame.hpp> -#include <com/sun/star/frame/ToolbarControllerFactory.hpp> +#include <com/sun/star/frame/theToolbarControllerFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <framework/sfxhelperfunctions.hxx> @@ -147,7 +147,7 @@ Reference<frame::XToolbarController> ControllerFactory::CreateToolBarController( try { Reference<XComponentContext> xContext = comphelper::getProcessComponentContext(); - Reference<frame::XUIControllerFactory> xFactory = frame::ToolbarControllerFactory::create( xContext ); + Reference<frame::XUIControllerFactory> xFactory = frame::theToolbarControllerFactory::get( xContext ); OUString sModuleName (Tools::GetModuleName(rxFrame)); if (xFactory.is() && xFactory->hasController(rsCommandName, sModuleName)) |