summaryrefslogtreecommitdiff
path: root/framework
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 /framework
parentb2c89e7236d71d92a96430db0a7eca14b41c227a (diff)
Introduce com.sun.star.frame.theUICommandDescription singleton.
Change-Id: Ic88cca3722d555ba48d7da8c176556fa1ff90650
Diffstat (limited to 'framework')
-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
6 files changed, 10 insertions, 9 deletions
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">