summaryrefslogtreecommitdiff
path: root/framework/source/uielement
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-12-10 16:26:01 +0200
committerNoel Grandin <noel@peralex.com>2012-12-13 05:20:58 +0200
commit9779ae8bdeffe1c296803dffefa0d69b0fb8f975 (patch)
tree4e7cf6fa46922ffbe915f820842866499814337f /framework/source/uielement
parente52a5e298b55125534cd8548ed4c1f8b694bfef6 (diff)
fdo#46808, use service constructor for ui::
::ModuleUIConfigurationManagerSupplier Change-Id: I06e8b3ef9b525da014a2bb7702587d360779aebc
Diffstat (limited to 'framework/source/uielement')
-rw-r--r--framework/source/uielement/menubarmanager.cxx12
-rw-r--r--framework/source/uielement/newmenucontroller.cxx7
-rw-r--r--framework/source/uielement/toolbarmanager.cxx12
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx8
4 files changed, 16 insertions, 23 deletions
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index bb83d226f751..846d2cebf57d 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -49,7 +49,7 @@
#include <com/sun/star/ui/ImageType.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
-#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/ItemStyle.hpp>
#include <com/sun/star/frame/status/Visibility.hpp>
@@ -1576,9 +1576,8 @@ void MenuBarManager::RetrieveShortcuts( std::vector< MenuItemHandler* >& aMenuSh
if ( !xModuleAccelCfg.is() )
{
- Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier( getServiceFactory()->createInstance(
- SERVICENAME_MODULEUICONFIGURATIONMANAGERSUPPLIER ),
- UNO_QUERY );
+ Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier =
+ ModuleUIConfigurationManagerSupplier::create( comphelper::getComponentContext(getServiceFactory()) );
try
{
Reference< XUIConfigurationManager > xUICfgMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( m_aModuleIdentifier );
@@ -1662,9 +1661,8 @@ void MenuBarManager::RetrieveImageManagers()
if ( !m_xModuleImageManager.is() )
{
- Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier( getServiceFactory()->createInstance(
- SERVICENAME_MODULEUICONFIGURATIONMANAGERSUPPLIER ),
- UNO_QUERY );
+ Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier =
+ ModuleUIConfigurationManagerSupplier::create( comphelper::getComponentContext(getServiceFactory()) );
Reference< XUIConfigurationManager > xUICfgMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( m_aModuleIdentifier );
m_xModuleImageManager.set( xUICfgMgr->getImageManager(), UNO_QUERY );
m_xModuleImageManager->addConfigurationListener( Reference< XUIConfigurationListener >(
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index 317b16a54e67..867a890a5e29 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -30,7 +30,7 @@
#include <com/sun/star/awt/XDevice.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/awt/MenuItemStyle.hpp>
-#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
@@ -203,9 +203,8 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu )
if ( !xModuleAccelCfg.is() )
{
- Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier( m_xServiceManager->createInstance(
- SERVICENAME_MODULEUICONFIGURATIONMANAGERSUPPLIER ),
- UNO_QUERY );
+ Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier =
+ ModuleUIConfigurationManagerSupplier::create( comphelper::getComponentContext(m_xServiceManager) );
Reference< XUIConfigurationManager > xUICfgMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( m_aModuleIdentifier );
if ( xUICfgMgr.is() )
{
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index cc1bac78414c..af16d7308079 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -44,7 +44,7 @@
#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/XUIElementSettings.hpp>
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
-#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/ImageType.hpp>
#include <com/sun/star/ui/UIElementType.hpp>
@@ -1220,9 +1220,8 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
if ( !m_xModuleImageManager.is() )
{
- Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier( m_xServiceManager->createInstance(
- SERVICENAME_MODULEUICONFIGURATIONMANAGERSUPPLIER ),
- UNO_QUERY );
+ Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier =
+ ModuleUIConfigurationManagerSupplier::create( comphelper::getComponentContext( m_xServiceManager ) );
m_xUICfgMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( m_aModuleIdentifier );
m_xModuleImageManager = Reference< XImageManager >( m_xUICfgMgr->getImageManager(), UNO_QUERY );
m_xModuleImageManager->addConfigurationListener( Reference< XUIConfigurationListener >(
@@ -2245,9 +2244,8 @@ bool ToolBarManager::RetrieveShortcut( const rtl::OUString& rCommandURL, rtl::OU
if ( !xModuleAccelCfg.is() )
{
- Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier( m_xServiceManager->createInstance(
- SERVICENAME_MODULEUICONFIGURATIONMANAGERSUPPLIER ),
- UNO_QUERY );
+ Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier =
+ ModuleUIConfigurationManagerSupplier::create( comphelper::getComponentContext(m_xServiceManager) );
try
{
Reference< XUIConfigurationManager > xUICfgMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( m_aModuleIdentifier );
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 43a4517f6f97..34520aa830ec 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -38,7 +38,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/ui/XUIElementSettings.hpp>
-#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/UIElementType.hpp>
@@ -837,10 +837,8 @@ void SAL_CALL ToolbarsMenuController::initialize( const Sequence< Any >& aArgume
aModuleIdentifier = xModuleManager->identify( m_xFrame );
xPersistentWindowStateSupplier->getByName( aModuleIdentifier ) >>= m_xPersistentWindowState;
- Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier;
- if ( m_xServiceManager.is() )
- xModuleCfgSupplier = Reference< XModuleUIConfigurationManagerSupplier >(
- m_xServiceManager->createInstance( SERVICENAME_MODULEUICONFIGURATIONMANAGERSUPPLIER ), UNO_QUERY );
+ Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier =
+ ModuleUIConfigurationManagerSupplier::create( comphelper::getComponentContext(m_xServiceManager) );
m_xModuleCfgMgr = xModuleCfgSupplier->getUIConfigurationManager( aModuleIdentifier );
Reference< XController > xController = m_xFrame->getController();