summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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/util/fwk.component1
-rwxr-xr-xoffapi/UnoApi_offapi.mk1
-rw-r--r--offapi/com/sun/star/ui/UIElementFactoryManager.idl8
-rw-r--r--offapi/com/sun/star/ui/theUIElementFactoryManager.idl44
-rw-r--r--sfx2/inc/pch/precompiled_sfx.hxx2
-rw-r--r--sfx2/source/dialog/taskpane.cxx6
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx4
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx4
11 files changed, 62 insertions, 18 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 82c03b4705fa..7c754cfa1864 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -69,7 +69,7 @@
#include <com/sun/star/task/XRestartManager.hpp>
#include <com/sun/star/document/XEventListener.hpp>
#include <com/sun/star/frame/theUICommandDescription.hpp>
-#include <com/sun/star/ui/UIElementFactoryManager.hpp>
+#include <com/sun/star/ui/theUIElementFactoryManager.hpp>
#include <com/sun/star/ui/WindowStateConfiguration.hpp>
#include <com/sun/star/frame/XUIControllerRegistration.hpp>
#include <com/sun/star/frame/thePopupMenuControllerFactory.hpp>
@@ -2185,7 +2185,7 @@ void Desktop::PreloadConfigurationData()
// preload user interface element factories
Sequence< Sequence< css::beans::PropertyValue > > aSeqSeqPropValue;
- Reference< XUIElementFactoryManager > xUIElementFactory = UIElementFactoryManager::create( xContext );
+ Reference< XUIElementFactoryManager > xUIElementFactory = theUIElementFactoryManager::get( xContext );
try
{
aSeqSeqPropValue = xUIElementFactory->getRegisteredFactories();
diff --git a/framework/inc/pch/precompiled_fwk.hxx b/framework/inc/pch/precompiled_fwk.hxx
index db2efda756a5..c88be55254d1 100644
--- a/framework/inc/pch/precompiled_fwk.hxx
+++ b/framework/inc/pch/precompiled_fwk.hxx
@@ -205,7 +205,7 @@
#include <com/sun/star/ui/ModuleAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/ModuleUIConfigurationManager.hpp>
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
-#include <com/sun/star/ui/UIElementFactoryManager.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/XModuleUIConfigurationManagerSupplier.hpp>
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 7dc9bb302281..e0d8746b73ab 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -49,7 +49,7 @@
#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/UIElementFactoryManager.hpp>
+#include <com/sun/star/ui/theUIElementFactoryManager.hpp>
#include <com/sun/star/container/XNameReplace.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/frame/LayoutManagerEvents.hpp>
@@ -123,7 +123,7 @@ LayoutManager::LayoutManager( const Reference< XComponentContext >& xContext ) :
, m_bMenuBarCloser( false )
, m_pInplaceMenuBar( NULL )
, m_xModuleManager( ModuleManager::create( xContext ))
- , m_xUIElementFactoryManager( ui::UIElementFactoryManager::create(xContext) )
+ , m_xUIElementFactoryManager( ui::theUIElementFactoryManager::get(xContext) )
, m_xPersistentWindowStateSupplier( ui::WindowStateConfiguration::create( xContext ) )
, m_pGlobalSettings( 0 )
, m_aListenerContainer( m_aLock.getShareableOslMutex() )
diff --git a/framework/util/fwk.component b/framework/util/fwk.component
index 3a1cd49485b9..ea55f649eaa3 100644
--- a/framework/util/fwk.component
+++ b/framework/util/fwk.component
@@ -147,6 +147,7 @@
</implementation>
<implementation name="com.sun.star.comp.framework.UIElementFactoryManager">
<service name="com.sun.star.ui.UIElementFactoryManager"/>
+ <singleton name="com.sun.star.ui.theUIElementFactoryManager"/>
</implementation>
<implementation name="com.sun.star.comp.framework.URLTransformer"
constructor="com_sun_star_comp_framework_URLTransformer_get_implementation">
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 78c2e7dcd13f..0314edb040d2 100755
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -426,6 +426,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/ui,\
WindowContentFactoryManager \
WindowStateConfiguration \
theUICategoryDescription \
+ theUIElementFactoryManager \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/ui/dialogs,\
AddressBookSourcePilot \
diff --git a/offapi/com/sun/star/ui/UIElementFactoryManager.idl b/offapi/com/sun/star/ui/UIElementFactoryManager.idl
index d7ab858e25b7..8a16451417fa 100644
--- a/offapi/com/sun/star/ui/UIElementFactoryManager.idl
+++ b/offapi/com/sun/star/ui/UIElementFactoryManager.idl
@@ -26,12 +26,10 @@
module com { module sun { module star { module ui {
-/** specifies a user interface factory manager that controls all registered user
- interface element factories.
+/**
+ A legacy (single-instance) service-variant of theUIElementFactoryManager singleton.
- <p>An implementation is usually obtained from a
- com::sun::star::lang::ServiceManager.
- </p>
+ @deprecated Use theUIElementFactoryManager singleton instead.
@since OOo 2.0
*/
diff --git a/offapi/com/sun/star/ui/theUIElementFactoryManager.idl b/offapi/com/sun/star/ui/theUIElementFactoryManager.idl
new file mode 100644
index 000000000000..d6125776d805
--- /dev/null
+++ b/offapi/com/sun/star/ui/theUIElementFactoryManager.idl
@@ -0,0 +1,44 @@
+/* -*- 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_theUIElementFactoryManager_idl__
+#define __com_sun_star_ui_theUIElementFactoryManager_idl__
+
+#include <com/sun/star/ui/XUIElementFactoryManager.idl>
+
+
+module com { module sun { module star { module ui {
+
+
+/** specifies a user interface factory manager that controls all registered user
+ interface element factories.
+
+ Prior to LibreOffice 4.3, this singleton was only available as a
+ (single-instance) UIElementFactoryManager service.
+
+ @since LibreOffice 4.3
+*/
+
+singleton theUIElementFactoryManager : XUIElementFactoryManager;
+
+}; }; }; };
+
+#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 208f750dd5ab..9d715a6e775d 100644
--- a/sfx2/inc/pch/precompiled_sfx.hxx
+++ b/sfx2/inc/pch/precompiled_sfx.hxx
@@ -443,7 +443,7 @@
#include <com/sun/star/ui/ImageType.hpp>
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/UIConfigurationManager.hpp>
-#include <com/sun/star/ui/UIElementFactoryManager.hpp>
+#include <com/sun/star/ui/theUIElementFactoryManager.hpp>
#include <com/sun/star/ui/UIElementType.hpp>
#include <com/sun/star/ui/WindowContentFactoryManager.hpp>
#include <com/sun/star/ui/WindowStateConfiguration.hpp>
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index 0892b06d17e4..b7307f8da04a 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -37,7 +37,7 @@
#include <com/sun/star/graphic/XGraphicProvider.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/awt/XControl.hpp>
-#include <com/sun/star/ui/UIElementFactoryManager.hpp>
+#include <com/sun/star/ui/theUIElementFactoryManager.hpp>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/types.hxx>
@@ -77,7 +77,7 @@ namespace sfx2
using ::com::sun::star::ui::XToolPanel;
using ::com::sun::star::ui::XUIElementFactory;
using ::com::sun::star::ui::XUIElementFactoryManager;
- using ::com::sun::star::ui::UIElementFactoryManager;
+ using ::com::sun::star::ui::theUIElementFactoryManager;
using ::com::sun::star::ui::XUIElement;
using ::com::sun::star::awt::XWindow;
using ::com::sun::star::frame::XFrame;
@@ -358,7 +358,7 @@ namespace sfx2
m_bAttemptedCreation = true;
try
{
- const Reference< XUIElementFactoryManager > xFactory = UIElementFactoryManager::create( ::comphelper::getProcessComponentContext() );
+ const Reference< XUIElementFactoryManager > xFactory = theUIElementFactoryManager::get( ::comphelper::getProcessComponentContext() );
::comphelper::NamedValueCollection aCreationArgs;
aCreationArgs.put( "Frame", makeAny( m_xFrame ) );
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 357c5456c4fe..8d86e65132c1 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -47,7 +47,7 @@
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/ui/ContextChangeEventMultiplexer.hpp>
#include <com/sun/star/ui/ContextChangeEventObject.hpp>
-#include <com/sun/star/ui/UIElementFactoryManager.hpp>
+#include <com/sun/star/ui/theUIElementFactoryManager.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/util/URL.hpp>
#include <com/sun/star/rendering/XSpriteCanvas.hpp>
@@ -761,7 +761,7 @@ Reference<ui::XUIElement> SidebarController::CreateUIElement (
{
const Reference<XComponentContext> xComponentContext (::comphelper::getProcessComponentContext() );
const Reference<ui::XUIElementFactory> xUIElementFactory =
- ui::UIElementFactoryManager::create( xComponentContext );
+ ui::theUIElementFactoryManager::get( xComponentContext );
// Create the XUIElement.
::comphelper::NamedValueCollection aCreationArguments;
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 3ff970a2cc7c..99dc1f0b7a6d 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -47,7 +47,7 @@
#include <com/sun/star/frame/XModuleManager.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/ui/XUIFunctionListener.hpp>
-#include <com/sun/star/ui/UIElementFactoryManager.hpp>
+#include <com/sun/star/ui/theUIElementFactoryManager.hpp>
#include <com/sun/star/frame/status/Visibility.hpp>
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
@@ -797,7 +797,7 @@ void SfxToolBoxControl::createAndPositionSubToolBar( const OUString& rSubToolBar
xUIElementFactory = xWeakUIElementFactory;
if ( !xUIElementFactory.is() )
{
- xUIElementFactory = UIElementFactoryManager::create( m_xContext );
+ xUIElementFactory = theUIElementFactoryManager::get( m_xContext );
xWeakUIElementFactory = xUIElementFactory;
}