diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx index f04babaa0d56..940d8dc9a6e6 100644 --- a/cui/inc/pch/precompiled_cui.hxx +++ b/cui/inc/pch/precompiled_cui.hxx @@ -214,7 +214,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 1d5349db7e27..fb6491118d2a 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -86,7 +86,7 @@ #include #include #include -#include +#include #include #include "com/sun/star/ui/dialogs/TemplateDescription.hpp" #include @@ -3603,7 +3603,7 @@ ToolbarSaveInData::ToolbarSaveInData( uno::Reference xContext = ::comphelper::getProcessComponentContext(); // Initialize the m_xPersistentWindowState variable which is used // to get the default properties of system toolbars such as name - uno::Reference< container::XNameAccess > xPWSS = css::ui::WindowStateConfiguration::create( xContext ); + uno::Reference< container::XNameAccess > xPWSS = css::ui::theWindowStateConfiguration::get( xContext ); xPWSS->getByName( aModuleId ) >>= m_xPersistentWindowState; } diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index e16697bec439..d01798433306 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -70,7 +70,7 @@ #include #include #include -#include +#include #include #include #include @@ -2133,7 +2133,7 @@ void Desktop::PreloadConfigurationData() } // preload window state configuration - xNameAccess = WindowStateConfiguration::create( xContext ); + xNameAccess = theWindowStateConfiguration::get( xContext ); Reference< XNameAccess > xWindowAccess; try { diff --git a/framework/inc/pch/precompiled_fwk.hxx b/framework/inc/pch/precompiled_fwk.hxx index 2452b626b87c..ed9ceea50491 100644 --- a/framework/inc/pch/precompiled_fwk.hxx +++ b/framework/inc/pch/precompiled_fwk.hxx @@ -207,7 +207,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index ce5d1346e913..906b1aa795e7 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include #include @@ -124,7 +124,7 @@ LayoutManager::LayoutManager( const Reference< XComponentContext >& xContext ) : , m_pInplaceMenuBar( NULL ) , m_xModuleManager( ModuleManager::create( xContext )) , m_xUIElementFactoryManager( ui::theUIElementFactoryManager::get(xContext) ) - , m_xPersistentWindowStateSupplier( ui::WindowStateConfiguration::create( xContext ) ) + , m_xPersistentWindowStateSupplier( ui::theWindowStateConfiguration::get( xContext ) ) , m_pGlobalSettings( 0 ) , m_aListenerContainer( m_aLock.getShareableOslMutex() ) , m_pToolbarManager( 0 ) diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 9230df866de7..9553572cf291 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include @@ -820,7 +820,7 @@ void SAL_CALL ToolbarsMenuController::initialize( const Sequence< Any >& aArgume if ( m_bInitialized ) { Reference< XModuleManager2 > xModuleManager = ModuleManager::create( m_xContext ); - Reference< XNameAccess > xPersistentWindowStateSupplier = ::com::sun::star::ui::WindowStateConfiguration::create( m_xContext ); + Reference< XNameAccess > xPersistentWindowStateSupplier = ::com::sun::star::ui::theWindowStateConfiguration::get( m_xContext ); // Retrieve persistent window state reference for our module OUString aModuleIdentifier; diff --git a/framework/util/fwk.component b/framework/util/fwk.component index 463a3287c827..494886648ad9 100644 --- a/framework/util/fwk.component +++ b/framework/util/fwk.component @@ -169,6 +169,7 @@ + diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 9aaf26b3810d..2e1f2d75aa1d 100755 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -428,6 +428,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/ui,\ theUICategoryDescription \ theUIElementFactoryManager \ theWindowContentFactoryManager \ + theWindowStateConfiguration \ )) $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/ui/dialogs,\ AddressBookSourcePilot \ diff --git a/offapi/com/sun/star/ui/WindowStateConfiguration.idl b/offapi/com/sun/star/ui/WindowStateConfiguration.idl index 47ae92bb1cf6..562490eb33dc 100644 --- a/offapi/com/sun/star/ui/WindowStateConfiguration.idl +++ b/offapi/com/sun/star/ui/WindowStateConfiguration.idl @@ -26,27 +26,10 @@ module com { module sun { module star { module ui { -/** a service which provides window based information about user interface - elements. +/** + A legacy (single-instance) service-variant of theWindowStateConfiguration singleton. -

- OpenOffice.org has an amount of user interface elements that can be positioned, - resized, closed and their style can be changed. This service provides access - to the window based information of available user interface elements which are - part of OpenOffice.org modules, like Writer or Calc. -

- - Provides access to window based information about user interface elements - of all installed application modules. - -

- To access the window based information of a module, a unique module specifier - must be provided to com::sun::star::container::XNameAccess::getByName() function. - The module specifier can be retrieved from the com::sun::star::frame::ModuleManager - service. The interface provides references to a com::sun:star::ui::ModuleWindowStateConfiguration. -

- - @see com::sun::star::frame::ModuleManager + @deprecated Use theWindowStateConfiguration singleton instead. @since OOo 2.0 */ diff --git a/offapi/com/sun/star/ui/theWindowStateConfiguration.idl b/offapi/com/sun/star/ui/theWindowStateConfiguration.idl new file mode 100644 index 000000000000..b8d257b0c461 --- /dev/null +++ b/offapi/com/sun/star/ui/theWindowStateConfiguration.idl @@ -0,0 +1,63 @@ +/* -*- 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_ui_theWindowStateConfiguration_idl__ +#define __com_sun_star_ui_theWindowStateConfiguration_idl__ + +#include + + +module com { module sun { module star { module ui { + + +/** a singleton which provides window based information about user interface + elements. + +

+ OpenOffice.org has an amount of user interface elements that can be positioned, + resized, closed and their style can be changed. This singleton provides access + to the window based information of available user interface elements which are + part of OpenOffice.org modules, like Writer or Calc. +

+ + Provides access to window based information about user interface elements + of all installed application modules. + +

+ To access the window based information of a module, a unique module specifier + must be provided to com::sun::star::container::XNameAccess::getByName() function. + The module specifier can be retrieved from the com::sun::star::frame::ModuleManager + service. The interface provides references to a com::sun:star::ui::ModuleWindowStateConfiguration. +

+ + Prior to LibreOffice 4.3, this singleton was only available as a + (single-instance) WindowStateConfiguration service. + + @see com::sun::star::frame::ModuleManager + + @since LibreOffice 4.3 +*/ + +singleton theWindowStateConfiguration : com::sun::star::container::XNameAccess; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx index 577a8d424e5b..298bde31dd42 100644 --- a/sfx2/inc/pch/precompiled_sfx.hxx +++ b/sfx2/inc/pch/precompiled_sfx.hxx @@ -446,7 +446,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 5b73ec158ea7..35c160776e40 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #define MAX_TOGGLEAREA_WIDTH 20 @@ -177,7 +177,7 @@ SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd , uno::Reference< container::XNameAccess > xWindowStateConfiguration( m_xWindowStateConfiguration ); if ( !xWindowStateConfiguration.is() ) { - xWindowStateConfiguration = ui::WindowStateConfiguration::create( xContext ); + xWindowStateConfiguration = ui::theWindowStateConfiguration::get( xContext ); m_xWindowStateConfiguration = xWindowStateConfiguration; } diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx index a162cbfc47b3..117b3ef46f06 100644 --- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx +++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include @@ -115,7 +115,7 @@ void VbaCommandBarHelper::Init( ) throw (css::uno::RuntimeException) m_xAppCfgMgr.set( xUICfgMgrSupp->getUIConfigurationManager( maModuleId ), uno::UNO_QUERY_THROW ); - css::uno::Reference< css::container::XNameAccess > xNameAccess = css::ui::WindowStateConfiguration::create( mxContext ); + css::uno::Reference< css::container::XNameAccess > xNameAccess = css::ui::theWindowStateConfiguration::get( mxContext ); m_xWindowState.set( xNameAccess->getByName( maModuleId ), uno::UNO_QUERY_THROW ); }