summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-01-28 15:27:32 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-01-28 18:52:22 +0100
commitba8413d2629352b1e5defaf154498856580e4651 (patch)
tree1fe88fed9227b84da0d44ee840cdd56b3418fc56
parentb2c89e7236d71d92a96430db0a7eca14b41c227a (diff)
Introduce com.sun.star.frame.theUICommandDescription singleton.
Change-Id: Ic88cca3722d555ba48d7da8c176556fa1ff90650
-rw-r--r--cui/inc/pch/precompiled_cui.hxx2
-rw-r--r--cui/source/customize/acccfg.cxx4
-rw-r--r--cui/source/customize/cfg.cxx4
-rw-r--r--cui/source/customize/cfgutil.cxx4
-rw-r--r--cui/source/customize/selector.cxx4
-rw-r--r--dbaccess/inc/pch/precompiled_dbu.hxx2
-rw-r--r--dbaccess/source/ui/control/opendoccontrols.cxx6
-rw-r--r--desktop/source/app/app.cxx4
-rw-r--r--desktop/source/migration/migration.cxx4
-rw-r--r--forms/source/helper/commanddescriptionprovider.cxx6
-rw-r--r--framework/inc/pch/precompiled_fwk.hxx2
-rw-r--r--framework/source/fwi/helper/mischelper.cxx4
-rw-r--r--framework/source/uiconfiguration/imagemanagerimpl.cxx4
-rw-r--r--framework/source/uielement/toolbarmanager.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/frame/UICommandDescription.idl20
-rw-r--r--offapi/com/sun/star/frame/theUICommandDescription.idl60
-rw-r--r--sd/inc/pch/precompiled_sd.hxx2
-rw-r--r--sd/source/ui/dlg/dlgass.cxx4
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx4
-rw-r--r--sfx2/inc/pch/precompiled_sfx.hxx2
-rw-r--r--sfx2/source/dialog/recfloat.cxx4
-rw-r--r--sfx2/source/dialog/templdlg.cxx4
-rw-r--r--sfx2/source/sidebar/CommandInfoProvider.cxx4
-rw-r--r--sfx2/source/view/viewsh.cxx4
-rw-r--r--svtools/inc/pch/precompiled_svt.hxx2
-rw-r--r--svtools/source/uno/contextmenuhelper.cxx4
-rw-r--r--sw/inc/pch/precompiled_sw.hxx2
-rw-r--r--sw/source/ui/lingu/olmenu.cxx4
-rw-r--r--vcl/inc/pch/precompiled_vcl.hxx2
-rw-r--r--vcl/source/window/toolbox2.cxx4
33 files changed, 117 insertions, 69 deletions
diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx
index 264817dd14b1..5108a64a1aef 100644
--- a/cui/inc/pch/precompiled_cui.hxx
+++ b/cui/inc/pch/precompiled_cui.hxx
@@ -113,7 +113,7 @@
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/frame/GlobalEventBroadcaster.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 419eeadf368b..489aace5638e 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -52,7 +52,7 @@
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/UIConfigurationManager.hpp>
@@ -830,7 +830,7 @@ void SfxAcceleratorConfigPage::InitAccCfg()
// no - initialize this instance
m_xContext = ::comphelper::getProcessComponentContext();
- m_xUICmdDescription = css::frame::UICommandDescription::create(m_xContext);
+ m_xUICmdDescription = css::frame::theUICommandDescription::get(m_xContext);
// get the current active frame, which should be our "parent"
// for this session
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 58f7b328db56..3f89c709e932 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -71,7 +71,7 @@
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/Desktop.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/graphic/GraphicProvider.hpp>
#include <com/sun/star/ui/ItemType.hpp>
#include <com/sun/star/ui/ItemStyle.hpp>
@@ -869,7 +869,7 @@ SaveInData::SaveInData(
uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext();
uno::Reference< container::XNameAccess > xNameAccess(
- css::frame::UICommandDescription::create(xContext) );
+ css::frame::theUICommandDescription::get(xContext) );
xNameAccess->getByName( aModuleId ) >>= m_xCommandToLabelMap;
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index f817ea7ef44b..4a93a6fd82b1 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -25,7 +25,7 @@
#include <com/sun/star/document/XScriptInvocationContext.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/frame/Desktop.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/frame/XDispatchInformationProvider.hpp>
#include <com/sun/star/script/browse/XBrowseNode.hpp>
#include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
@@ -597,7 +597,7 @@ void SfxConfigGroupListBox::Init(const css::uno::Reference< css::uno::XComponent
m_xGlobalCategoryInfo = css::ui::theUICategoryDescription::get( m_xContext );
m_xModuleCategoryInfo = css::uno::Reference< css::container::XNameAccess >(m_xGlobalCategoryInfo->getByName(m_sModuleLongName), css::uno::UNO_QUERY_THROW);
- m_xUICmdDescription = css::frame::UICommandDescription::create( m_xContext );
+ m_xUICmdDescription = css::frame::theUICommandDescription::get( m_xContext );
InitModule();
InitBasic();
diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx
index a33623a48538..4db4c2707e2e 100644
--- a/cui/source/customize/selector.cxx
+++ b/cui/source/customize/selector.cxx
@@ -46,7 +46,7 @@
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XDispatchInformationProvider.hpp>
#include <com/sun/star/frame/DispatchInformation.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
#include <com/sun/star/script/provider/XScriptProvider.hpp>
#include <com/sun/star/script/browse/theBrowseNodeFactory.hpp>
@@ -425,7 +425,7 @@ void SvxConfigGroupListBox::Init(bool bShowSlots, const Reference< frame::XFrame
{ aModuleId = OUString(); }
Reference< container::XNameAccess > const xNameAccess(
- frame::UICommandDescription::create(xContext) );
+ frame::theUICommandDescription::get(xContext) );
xNameAccess->getByName( aModuleId ) >>= m_xModuleCommands;
Reference< container::XNameAccess > xAllCategories =
diff --git a/dbaccess/inc/pch/precompiled_dbu.hxx b/dbaccess/inc/pch/precompiled_dbu.hxx
index c3ef98d38e02..14c809cb0123 100644
--- a/dbaccess/inc/pch/precompiled_dbu.hxx
+++ b/dbaccess/inc/pch/precompiled_dbu.hxx
@@ -112,7 +112,7 @@
#include <com/sun/star/frame/Frame.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/frame/TaskCreator.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XController2.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx
index e3372b9265b8..008f3672c371 100644
--- a/dbaccess/source/ui/control/opendoccontrols.cxx
+++ b/dbaccess/source/ui/control/opendoccontrols.cxx
@@ -24,7 +24,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/ui/XImageManager.hpp>
@@ -56,7 +56,7 @@ namespace dbaui
using ::com::sun::star::ui::XModuleUIConfigurationManagerSupplier;
using ::com::sun::star::ui::XUIConfigurationManager;
using ::com::sun::star::ui::XImageManager;
- using ::com::sun::star::frame::UICommandDescription;
+ using ::com::sun::star::frame::theUICommandDescription;
using ::com::sun::star::graphic::XGraphic;
OUString GetCommandText( const sal_Char* _pCommandURL, const OUString& _rModuleName )
@@ -77,7 +77,7 @@ namespace dbaui
if ( !xContext.is() )
break;
- Reference< XNameAccess> xNameAccess( UICommandDescription::create(xContext) );
+ Reference< XNameAccess> xNameAccess( theUICommandDescription::get(xContext) );
xNameAccess->getByName( _rModuleName ) >>= xUICommandLabels;
if ( !xUICommandLabels.is() )
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index c48f9f8e42fd..3715e72d0cba 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -68,7 +68,7 @@
#include <com/sun/star/task/OfficeRestartManager.hpp>
#include <com/sun/star/task/XRestartManager.hpp>
#include <com/sun/star/document/XEventListener.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/ui/UIElementFactoryManager.hpp>
#include <com/sun/star/ui/WindowStateConfiguration.hpp>
#include <com/sun/star/frame/XUIControllerRegistration.hpp>
@@ -2092,7 +2092,7 @@ void Desktop::PreloadModuleData( const CommandLineArgs& rArgs )
void Desktop::PreloadConfigurationData()
{
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- Reference< XNameAccess > xNameAccess = css::frame::UICommandDescription::create(xContext);
+ Reference< XNameAccess > xNameAccess = css::frame::theUICommandDescription::get(xContext);
OUString aWriterDoc( "com.sun.star.text.TextDocument" );
OUString aCalcDoc( "com.sun.star.sheet.SpreadsheetDocument" );
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index ff516601e47f..c6e046670900 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -54,7 +54,7 @@
#include <com/sun/star/embed/FileSystemStorageFactory.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/ui/UIConfigurationManager.hpp>
#include <com/sun/star/ui/XUIConfiguration.hpp>
#include <com/sun/star/ui/XUIConfigurationStorage.hpp>
@@ -83,7 +83,7 @@ OUString retrieveLabelFromCommand(const OUString& sCommand, const OUString& sMod
uno::Reference< container::XNameAccess > xUICommands;
uno::Reference< container::XNameAccess > const xNameAccess(
- frame::UICommandDescription::create(
+ frame::theUICommandDescription::get(
::comphelper::getProcessComponentContext()) );
xNameAccess->getByName( sModuleIdentifier ) >>= xUICommands;
if (xUICommands.is())
diff --git a/forms/source/helper/commanddescriptionprovider.cxx b/forms/source/helper/commanddescriptionprovider.cxx
index b1edc2a216c6..045fe585a371 100644
--- a/forms/source/helper/commanddescriptionprovider.cxx
+++ b/forms/source/helper/commanddescriptionprovider.cxx
@@ -23,7 +23,7 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <comphelper/namedvaluecollection.hxx>
#include <tools/diagnose_ex.h>
@@ -50,7 +50,7 @@ namespace frm
using ::com::sun::star::frame::ModuleManager;
using ::com::sun::star::frame::XModuleManager2;
using ::com::sun::star::beans::PropertyValue;
- using ::com::sun::star::frame::UICommandDescription;
+ using ::com::sun::star::frame::theUICommandDescription;
//====================================================================
//= DefaultCommandDescriptionProvider
@@ -90,7 +90,7 @@ namespace frm
Reference< XModuleManager2 > xModuleManager( ModuleManager::create(_rxContext) );
OUString sModuleID = xModuleManager->identify( _rxDocument );
- Reference< XNameAccess > xUICommandDescriptions( UICommandDescription::create(_rxContext) );
+ Reference< XNameAccess > xUICommandDescriptions( theUICommandDescription::get(_rxContext) );
m_xCommandAccess.set( xUICommandDescriptions->getByName( sModuleID ), UNO_QUERY_THROW );
}
catch( const Exception& )
diff --git a/framework/inc/pch/precompiled_fwk.hxx b/framework/inc/pch/precompiled_fwk.hxx
index 2fb34f6a4c61..c9b8c09bfa57 100644
--- a/framework/inc/pch/precompiled_fwk.hxx
+++ b/framework/inc/pch/precompiled_fwk.hxx
@@ -126,7 +126,7 @@
#include <com/sun/star/frame/StatusbarControllerFactory.hpp>
#include <com/sun/star/frame/TaskCreator.hpp>
#include <com/sun/star/frame/ToolbarControllerFactory.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XControlNotificationListener.hpp>
#include <com/sun/star/frame/XController.hpp>
diff --git a/framework/source/fwi/helper/mischelper.cxx b/framework/source/fwi/helper/mischelper.cxx
index a9a0684796f3..9970c52b99e2 100644
--- a/framework/source/fwi/helper/mischelper.cxx
+++ b/framework/source/fwi/helper/mischelper.cxx
@@ -21,7 +21,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/document/XDocumentLanguages.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/linguistic2/LanguageGuessing.hpp>
@@ -94,7 +94,7 @@ OUString RetrieveLabelFromCommand(
}
}
- Reference< XNameAccess > xNameAccess = frame::UICommandDescription::create( _xContext );
+ Reference< XNameAccess > xNameAccess = frame::theUICommandDescription::get( _xContext );
xNameAccess->getByName( _rModuleIdentifier ) >>= _xUICommandLabels;
}
catch ( const Exception& )
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index e03927610bb9..5a36fef0a60f 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -26,7 +26,7 @@
#include "properties.h"
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/ui/UIElementType.hpp>
#include <com/sun/star/ui/ConfigurationEvent.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
@@ -173,7 +173,7 @@ void CmdImageList::impl_fillCommandToImageNameMap()
{
const OUString aCommandImageList( UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDIMAGELIST );
Sequence< OUString > aCmdImageSeq;
- uno::Reference< XNameAccess > xCmdDesc = frame::UICommandDescription::create( m_xContext );
+ uno::Reference< XNameAccess > xCmdDesc = frame::theUICommandDescription::get( m_xContext );
if ( !m_aModuleIdentifier.isEmpty() )
{
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 3a2617b6dd64..71d8a84dd23c 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -33,7 +33,7 @@
#include <com/sun/star/ui/ItemType.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/XDockableWindow.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
@@ -795,7 +795,7 @@ uno::Sequence< beans::PropertyValue > ToolBarManager::GetPropsForCommand( const
if ( !m_aModuleIdentifier.isEmpty() )
{
- Reference< XNameAccess > xNameAccess = frame::UICommandDescription::create( m_xContext );
+ Reference< XNameAccess > xNameAccess = frame::theUICommandDescription::get( m_xContext );
xNameAccess->getByName( m_aModuleIdentifier ) >>= m_xUICommandLabels;
}
}
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 1f3917c14e99..f758c6bac24b 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -34,7 +34,7 @@
#include <com/sun/star/awt/MenuItemStyle.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
@@ -222,7 +222,7 @@ OUString ToolbarsMenuController::getUINameFromCommand( const OUString& rCommandU
{
Reference< XModuleManager2 > xModuleManager = ModuleManager::create( m_xContext );
m_aModuleIdentifier = xModuleManager->identify( m_xFrame );
- Reference< XNameAccess > xNameAccess = frame::UICommandDescription::create( m_xContext );
+ Reference< XNameAccess > xNameAccess = frame::theUICommandDescription::get( m_xContext );
xNameAccess->getByName( m_aModuleIdentifier ) >>= m_xUICommandDescription;
}
catch ( const Exception& )
diff --git a/framework/util/fwk.component b/framework/util/fwk.component
index 98f36f8d2f2d..c63d10812544 100644
--- a/framework/util/fwk.component
+++ b/framework/util/fwk.component
@@ -132,6 +132,7 @@
</implementation>
<implementation name="com.sun.star.comp.framework.UICommandDescription">
<service name="com.sun.star.frame.UICommandDescription"/>
+ <singleton name="com.sun.star.frame.theUICommandDescription"/>
</implementation>
<implementation name="com.sun.star.comp.framework.UIConfigurationManager"
constructor="com_sun_star_comp_framework_UIConfigurationManager_get_implementation">
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 519c14537762..cd7434f19d0e 100755
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -202,6 +202,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/frame,\
UICommandDescription \
theAutoRecovery \
theGlobalEventBroadcaster \
+ theUICommandDescription \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/graphic,\
GraphicObject \
diff --git a/offapi/com/sun/star/frame/UICommandDescription.idl b/offapi/com/sun/star/frame/UICommandDescription.idl
index 5d3a8149eb54..76e6db9497f0 100644
--- a/offapi/com/sun/star/frame/UICommandDescription.idl
+++ b/offapi/com/sun/star/frame/UICommandDescription.idl
@@ -26,26 +26,12 @@
module com { module sun { module star { module frame {
-/** a service which provides information about user interface commands of modules.
+/**
+ A legacy (single-instance) service-variant of theUICommandDescription singleton.
- <p>
- OpenOffice.org has an amount of commands that can be used by user interface
- elements. This service provides access to the user interface commands that
- are part of OpenOffice.org modules, like Writer or Calc.
- </p>
+ @deprecated Use theUICommandDescription singleton instead.
@since OOo 2.0
-
- Provides access to user interface commands of the installed modules.
-
- <p>
- To access the user interface command description 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 com::sun:star::ui::ModuleUICommandDescription.
- </p>
-
- @see com::sun::star::frame::ModuleManager
*/
service UICommandDescription : com::sun::star::container::XNameAccess;
diff --git a/offapi/com/sun/star/frame/theUICommandDescription.idl b/offapi/com/sun/star/frame/theUICommandDescription.idl
new file mode 100644
index 000000000000..7765df7012c3
--- /dev/null
+++ b/offapi/com/sun/star/frame/theUICommandDescription.idl
@@ -0,0 +1,60 @@
+/* -*- 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_theUICommandDescription_idl__
+#define __com_sun_star_frame_theUICommandDescription_idl__
+
+#include <com/sun/star/container/XNameAccess.idl>
+
+
+module com { module sun { module star { module frame {
+
+
+/** a singleton which provides information about user interface commands of modules.
+
+ <p>
+ OpenOffice.org has an amount of commands that can be used by user interface
+ elements. This singleton provides access to the user interface commands that
+ are part of OpenOffice.org modules, like Writer or Calc.
+ </p>
+
+ Provides access to user interface commands of the installed modules.
+
+ <p>
+ To access the user interface command description 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 com::sun:star::ui::ModuleUICommandDescription.
+ </p>
+
+ @see com::sun::star::frame::ModuleManager
+
+ Prior to LibreOffice 4.3, this singleton was only available as a
+ (single-instance) UICommandDescription service.
+
+ @since LibreOffice 4.3
+
+*/
+singleton theUICommandDescription : com::sun::star::container::XNameAccess;
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index 886739120c38..f9365d73fe2f 100644
--- a/sd/inc/pch/precompiled_sd.hxx
+++ b/sd/inc/pch/precompiled_sd.hxx
@@ -210,7 +210,7 @@
#include <com/sun/star/frame/FrameAction.hpp>
#include <com/sun/star/frame/FrameActionEvent.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/frame/UnknownModuleException.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XController.hpp>
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 58e5d25e3073..207be8873923 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -50,7 +50,7 @@
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <unotools/historyoptions.hxx>
#include <osl/file.hxx>
#include <sfx2/filedlghelper.hxx>
@@ -1734,7 +1734,7 @@ OUString AssistentDlgImpl::GetUiTextForCommand (const OUString& sCommandURL)
break;
Reference<container::XNameAccess> const xNameAccess(
- frame::UICommandDescription::create(xContext) );
+ frame::theUICommandDescription::get(xContext) );
Any a = xNameAccess->getByName(
"com.sun.star.presentation.PresentationDocument");
a >>= xUICommandLabels;
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index c30cda2e1c20..6895ef7cd270 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -23,7 +23,7 @@
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include "ViewShellBase.hxx"
#include <algorithm>
@@ -1111,7 +1111,7 @@ OUString ImplRetrieveLabelFromCommand( const Reference< XFrame >& xFrame, const
if( !aModuleIdentifier.isEmpty() )
{
Reference< XNameAccess > const xNameAccess(
- frame::UICommandDescription::create(xContext) );
+ frame::theUICommandDescription::get(xContext) );
Reference< ::com::sun::star::container::XNameAccess > m_xUICommandLabels( xNameAccess->getByName( aModuleIdentifier ), UNO_QUERY_THROW );
Sequence< PropertyValue > aPropSeq;
if( m_xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq )
diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx
index 1c8c73b01026..f2e871335f10 100644
--- a/sfx2/inc/pch/precompiled_sfx.hxx
+++ b/sfx2/inc/pch/precompiled_sfx.hxx
@@ -254,7 +254,7 @@
#include <com/sun/star/frame/LayoutManagerEvents.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/frame/ToolbarControllerFactory.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/frame/UntitledNumbersConst.hpp>
#include <com/sun/star/frame/XBorderResizeListener.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx
index df34bb029b0b..d943ddc51972 100644
--- a/sfx2/source/dialog/recfloat.cxx
+++ b/sfx2/source/dialog/recfloat.cxx
@@ -21,7 +21,7 @@
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <svl/eitem.hxx>
#include <svtools/generictoolboxcontroller.hxx>
@@ -63,7 +63,7 @@ static OUString GetLabelFromCommandURL( const OUString& rCommandURL, const uno::
xUICommandDescription = xTmpNameAccess;
if ( !xUICommandDescription.is() )
{
- xUICommandDescription = frame::UICommandDescription::create(xContext);
+ xUICommandDescription = frame::theUICommandDescription::get(xContext);
xTmpNameAccess = xUICommandDescription;
}
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 46f32380debf..5af668194f45 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -31,7 +31,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <sfx2/sfxhelp.hxx>
#include <sfx2/app.hxx>
@@ -2781,7 +2781,7 @@ IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRClick, ToolBox *, pBox )
//create a popup menu in Writer
boost::scoped_ptr<PopupMenu> pMenu(new PopupMenu);
uno::Reference< container::XNameAccess > xNameAccess(
- frame::UICommandDescription::create(
+ frame::theUICommandDescription::get(
::comphelper::getProcessComponentContext()) );
uno::Reference< container::XNameAccess > xUICommands;
OUString sTextDoc("com.sun.star.text.TextDocument");
diff --git a/sfx2/source/sidebar/CommandInfoProvider.cxx b/sfx2/source/sidebar/CommandInfoProvider.cxx
index 6753692384b7..61d1b62fcaea 100644
--- a/sfx2/source/sidebar/CommandInfoProvider.cxx
+++ b/sfx2/source/sidebar/CommandInfoProvider.cxx
@@ -25,7 +25,7 @@
#include <cppuhelper/basemutex.hxx>
#include <com/sun/star/frame/ModuleManager.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
@@ -305,7 +305,7 @@ Sequence<beans::PropertyValue> CommandInfoProvider::GetCommandProperties (const
const OUString sModuleIdentifier (GetModuleIdentifier());
if (sModuleIdentifier.getLength() > 0)
{
- Reference<container::XNameAccess> xNameAccess = frame::UICommandDescription::create(mxContext);
+ Reference<container::XNameAccess> xNameAccess = frame::theUICommandDescription::get(mxContext);
Reference<container::XNameAccess> xUICommandLabels;
if (xNameAccess->getByName(sModuleIdentifier) >>= xUICommandLabels)
xUICommandLabels->getByName(rsCommandName) >>= aProperties;
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 3d5199df34e3..cdababa4893b 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -33,7 +33,7 @@
#include <com/sun/star/container/XContainerQuery.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <cppuhelper/implbase1.hxx>
#include <osl/file.hxx>
@@ -242,7 +242,7 @@ static OUString RetrieveLabelFromCommand(
if ( !xNameAccess.is() )
{
xNameAccess = css::uno::Reference< css::container::XNameAccess >(
- css::frame::UICommandDescription::create(xContext),
+ css::frame::theUICommandDescription::get(xContext),
css::uno::UNO_QUERY_THROW );
s_xNameAccess = xNameAccess;
}
diff --git a/svtools/inc/pch/precompiled_svt.hxx b/svtools/inc/pch/precompiled_svt.hxx
index fd97b7b7e00c..cb98da32a284 100644
--- a/svtools/inc/pch/precompiled_svt.hxx
+++ b/svtools/inc/pch/precompiled_svt.hxx
@@ -142,7 +142,7 @@
#include <com/sun/star/frame/DocumentTemplates.hpp>
#include <com/sun/star/frame/Frame.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
diff --git a/svtools/source/uno/contextmenuhelper.cxx b/svtools/source/uno/contextmenuhelper.cxx
index 7c8abc635301..613266580668 100644
--- a/svtools/source/uno/contextmenuhelper.cxx
+++ b/svtools/source/uno/contextmenuhelper.cxx
@@ -31,7 +31,7 @@
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/ImageType.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -428,7 +428,7 @@ ContextMenuHelper::associateUIConfigurationManagers()
}
uno::Reference< container::XNameAccess > xNameAccess(
- frame::UICommandDescription::create(
+ frame::theUICommandDescription::get(
::comphelper::getProcessComponentContext()),
uno::UNO_QUERY_THROW );
try
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index 7b1315da3a32..a90133efa182 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -185,7 +185,7 @@
#include <com/sun/star/frame/DispatchHelper.hpp>
#include <com/sun/star/frame/DispatchResultState.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index b3114f050adf..af9a344c2e18 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -91,7 +91,7 @@
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/system/SystemShellExecute.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
using namespace ::com::sun::star;
@@ -236,7 +236,7 @@ OUString RetrieveLabelFromCommand( const OUString& aCmdURL )
try
{
uno::Reference< container::XNameAccess > const xNameAccess(
- frame::UICommandDescription::create(
+ frame::theUICommandDescription::get(
::comphelper::getProcessComponentContext() ),
uno::UNO_QUERY_THROW );
uno::Reference< container::XNameAccess > xUICommandLabels;
diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx
index 0c33fb5e51ef..b859ff2a9352 100644
--- a/vcl/inc/pch/precompiled_vcl.hxx
+++ b/vcl/inc/pch/precompiled_vcl.hxx
@@ -192,7 +192,7 @@
#include <com/sun/star/datatransfer/dnd/XDragSource.hpp>
#include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/XModuleManager2.hpp>
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 0294e3deb6eb..a9b8151d499a 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -39,7 +39,7 @@
#include <unotools/confignode.hxx>
#include <com/sun/star/frame/ModuleManager.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/XModuleManager2.hpp>
@@ -701,7 +701,7 @@ static OUString getCommandLabel(const OUString& rCommand, const uno::Reference<u
try
{
uno::Reference<container::XNameAccess> xUICommandLabels;
- uno::Reference<container::XNameAccess> xUICommandDescription(frame::UICommandDescription::create(rContext));
+ uno::Reference<container::XNameAccess> xUICommandDescription(frame::theUICommandDescription::get(rContext));
if ((xUICommandDescription->getByName(rModuleId) >>= xUICommandLabels) && xUICommandLabels.is())
{