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 #include #include -#include -#include +#include #include #include @@ -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 #include #include -#include +#include #include -#include +#include #include -#include +#include #include #include #include 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 #include #include -#include +#include #include #include #include @@ -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 #include -#include +#include #include #include #include @@ -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 #include -#include +#include #include #include #include @@ -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 #include #include -#include +#include #include #include #include @@ -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 @@ + @@ -108,6 +109,7 @@ + @@ -121,6 +123,7 @@ + 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. -

- 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. -

+ @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. +/** + A legacy (single-instance) service-variant of theStatusbarControllerFactory singleton. -

- 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. -

+ @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. -

- A toolbar controller can be registered for a command URL and a model service name. -

+ @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 + +module com { module sun { module star { module frame { + +/** specifies a factory that creates instances of registered popup menu controller. + +

+ 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. +

+ + 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 + +module com { module sun { module star { module frame { + +/** specifies a factory that creates instances of registered status bar + controller. + +

+ 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. +

+ + 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 + +module com { module sun { module star { module frame { + +/** specifies a factory that creates instances of registered toolbar controller. + +

+ A toolbar controller can be registered for a command URL and a model service name. +

+ + 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 #include #include -#include +#include #include #include #include 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 #include -#include +#include #include #include @@ -147,7 +147,7 @@ Reference ControllerFactory::CreateToolBarController( try { Reference xContext = comphelper::getProcessComponentContext(); - Reference xFactory = frame::ToolbarControllerFactory::create( xContext ); + Reference xFactory = frame::theToolbarControllerFactory::get( xContext ); OUString sModuleName (Tools::GetModuleName(rxFrame)); if (xFactory.is() && xFactory->hasController(rsCommandName, sModuleName))