Introduce com.sun.star.ui.theWindowStateConfiguration singleton.
Change-Id: I50861ac8952d54cb1a45846ea72a2ecac4f83409
This commit is contained in:
@@ -214,7 +214,7 @@
|
||||
#include <com/sun/star/ui/theUICategoryDescription.hpp>
|
||||
#include <com/sun/star/ui/UIConfigurationManager.hpp>
|
||||
#include <com/sun/star/ui/UIElementType.hpp>
|
||||
#include <com/sun/star/ui/WindowStateConfiguration.hpp>
|
||||
#include <com/sun/star/ui/theWindowStateConfiguration.hpp>
|
||||
#include <com/sun/star/ui/XModuleUIConfigurationManager.hpp>
|
||||
#include <com/sun/star/ui/XUIConfiguration.hpp>
|
||||
#include <com/sun/star/ui/XUIConfigurationListener.hpp>
|
||||
|
@@ -86,7 +86,7 @@
|
||||
#include <com/sun/star/ui/XUIElement.hpp>
|
||||
#include <com/sun/star/ui/UIElementType.hpp>
|
||||
#include <com/sun/star/ui/ImageType.hpp>
|
||||
#include <com/sun/star/ui/WindowStateConfiguration.hpp>
|
||||
#include <com/sun/star/ui/theWindowStateConfiguration.hpp>
|
||||
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
|
||||
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
|
||||
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
|
||||
@@ -3603,7 +3603,7 @@ ToolbarSaveInData::ToolbarSaveInData(
|
||||
uno::Reference<uno::XComponentContext> 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;
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@
|
||||
#include <com/sun/star/document/XEventListener.hpp>
|
||||
#include <com/sun/star/frame/theUICommandDescription.hpp>
|
||||
#include <com/sun/star/ui/theUIElementFactoryManager.hpp>
|
||||
#include <com/sun/star/ui/WindowStateConfiguration.hpp>
|
||||
#include <com/sun/star/ui/theWindowStateConfiguration.hpp>
|
||||
#include <com/sun/star/frame/XUIControllerRegistration.hpp>
|
||||
#include <com/sun/star/frame/thePopupMenuControllerFactory.hpp>
|
||||
#include <com/sun/star/office/Quickstart.hpp>
|
||||
@@ -2133,7 +2133,7 @@ void Desktop::PreloadConfigurationData()
|
||||
}
|
||||
|
||||
// preload window state configuration
|
||||
xNameAccess = WindowStateConfiguration::create( xContext );
|
||||
xNameAccess = theWindowStateConfiguration::get( xContext );
|
||||
Reference< XNameAccess > xWindowAccess;
|
||||
try
|
||||
{
|
||||
|
@@ -207,7 +207,7 @@
|
||||
#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
|
||||
#include <com/sun/star/ui/theUIElementFactoryManager.hpp>
|
||||
#include <com/sun/star/ui/UIElementType.hpp>
|
||||
#include <com/sun/star/ui/WindowStateConfiguration.hpp>
|
||||
#include <com/sun/star/ui/theWindowStateConfiguration.hpp>
|
||||
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
|
||||
#include <com/sun/star/ui/XStatusbarItem.hdl>
|
||||
#include <com/sun/star/ui/XUIConfiguration.hpp>
|
||||
|
@@ -48,7 +48,7 @@
|
||||
#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
|
||||
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
|
||||
#include <com/sun/star/ui/UIElementType.hpp>
|
||||
#include <com/sun/star/ui/WindowStateConfiguration.hpp>
|
||||
#include <com/sun/star/ui/theWindowStateConfiguration.hpp>
|
||||
#include <com/sun/star/ui/theUIElementFactoryManager.hpp>
|
||||
#include <com/sun/star/container/XNameReplace.hpp>
|
||||
#include <com/sun/star/container/XNameContainer.hpp>
|
||||
@@ -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 )
|
||||
|
@@ -42,7 +42,7 @@
|
||||
#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
|
||||
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
|
||||
#include <com/sun/star/ui/UIElementType.hpp>
|
||||
#include <com/sun/star/ui/WindowStateConfiguration.hpp>
|
||||
#include <com/sun/star/ui/theWindowStateConfiguration.hpp>
|
||||
|
||||
#include <vcl/menu.hxx>
|
||||
#include <vcl/svapp.hxx>
|
||||
@@ -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;
|
||||
|
@@ -169,6 +169,7 @@
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.framework.WindowStateConfiguration">
|
||||
<service name="com.sun.star.ui.WindowStateConfiguration"/>
|
||||
<singleton name="com.sun.star.ui.theWindowStateConfiguration"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.framework.jobs.JobDispatch"
|
||||
constructor="com_sun_star_comp_framework_jobs_JobDispatch_get_implementation">
|
||||
|
@@ -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 \
|
||||
|
@@ -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.
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
Provides access to window based information about user interface elements
|
||||
of all installed application modules.
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
@see com::sun::star::frame::ModuleManager
|
||||
@deprecated Use theWindowStateConfiguration singleton instead.
|
||||
|
||||
@since OOo 2.0
|
||||
*/
|
||||
|
63
offapi/com/sun/star/ui/theWindowStateConfiguration.idl
Normal file
63
offapi/com/sun/star/ui/theWindowStateConfiguration.idl
Normal file
@@ -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 <com/sun/star/container/XNameAccess.idl>
|
||||
|
||||
|
||||
module com { module sun { module star { module ui {
|
||||
|
||||
|
||||
/** a singleton which provides window based information about user interface
|
||||
elements.
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
Provides access to window based information about user interface elements
|
||||
of all installed application modules.
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
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: */
|
@@ -446,7 +446,7 @@
|
||||
#include <com/sun/star/ui/theUIElementFactoryManager.hpp>
|
||||
#include <com/sun/star/ui/UIElementType.hpp>
|
||||
#include <com/sun/star/ui/theWindowContentFactoryManager.hpp>
|
||||
#include <com/sun/star/ui/WindowStateConfiguration.hpp>
|
||||
#include <com/sun/star/ui/theWindowStateConfiguration.hpp>
|
||||
#include <com/sun/star/ui/XDockingAreaAcceptor.hpp>
|
||||
#include <com/sun/star/ui/XImageManager.hpp>
|
||||
#include <com/sun/star/ui/XToolPanel.hpp>
|
||||
|
@@ -45,7 +45,7 @@
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
#include <com/sun/star/frame/ModuleManager.hpp>
|
||||
#include <com/sun/star/container/XNameAccess.hpp>
|
||||
#include <com/sun/star/ui/WindowStateConfiguration.hpp>
|
||||
#include <com/sun/star/ui/theWindowStateConfiguration.hpp>
|
||||
#include <com/sun/star/ui/theWindowContentFactoryManager.hpp>
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,7 @@
|
||||
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
|
||||
#include <com/sun/star/ui/XUIElement.hpp>
|
||||
#include <com/sun/star/ui/UIElementType.hpp>
|
||||
#include <com/sun/star/ui/WindowStateConfiguration.hpp>
|
||||
#include <com/sun/star/ui/theWindowStateConfiguration.hpp>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <vbahelper/vbahelper.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
@@ -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 );
|
||||
}
|
||||
|
Reference in New Issue
Block a user