summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-02-02 16:53:49 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-02-06 12:03:28 +0100
commit4ff873bda2a3af12e5c4848843ea6b7d9592bb6b (patch)
treedf09b0860f9ab6db4f6a1f49d554f6e67848acab
parent813b0f60e86de5e0ebf678691a9ff405e293bf86 (diff)
Introduce com.sun.star.ui.theWindowStateConfiguration singleton.
Change-Id: I50861ac8952d54cb1a45846ea72a2ecac4f83409
-rw-r--r--cui/inc/pch/precompiled_cui.hxx2
-rw-r--r--cui/source/customize/cfg.cxx4
-rw-r--r--desktop/source/app/app.cxx4
-rw-r--r--framework/inc/pch/precompiled_fwk.hxx2
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx4
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx4
-rw-r--r--framework/util/fwk.component1
-rwxr-xr-xoffapi/UnoApi_offapi.mk1
-rw-r--r--offapi/com/sun/star/ui/WindowStateConfiguration.idl25
-rw-r--r--offapi/com/sun/star/ui/theWindowStateConfiguration.idl63
-rw-r--r--sfx2/inc/pch/precompiled_sfx.hxx2
-rw-r--r--sfx2/source/dialog/dockwin.cxx4
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarhelper.cxx4
13 files changed, 84 insertions, 36 deletions
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 <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>
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 <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;
}
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 <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
{
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 <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>
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 <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 )
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 <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;
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 @@
</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">
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.
-
- <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
+/**
+ A legacy (single-instance) service-variant of theWindowStateConfiguration singleton.
+
+ @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 <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: */
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 <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>
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 <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;
}
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 <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 );
}