summaryrefslogtreecommitdiff
path: root/framework/source/uifactory
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/uifactory
parente52a5e298b55125534cd8548ed4c1f8b694bfef6 (diff)
fdo#46808, use service constructor for ui::
::ModuleUIConfigurationManagerSupplier Change-Id: I06e8b3ef9b525da014a2bb7702587d360779aebc
Diffstat (limited to 'framework/source/uifactory')
-rw-r--r--framework/source/uifactory/menubarfactory.cxx10
-rw-r--r--framework/source/uifactory/statusbarfactory.cxx2
-rw-r--r--framework/source/uifactory/toolboxfactory.cxx2
3 files changed, 7 insertions, 7 deletions
diff --git a/framework/source/uifactory/menubarfactory.cxx b/framework/source/uifactory/menubarfactory.cxx
index 8cdc6bf756a7..53670710d475 100644
--- a/framework/source/uifactory/menubarfactory.cxx
+++ b/framework/source/uifactory/menubarfactory.cxx
@@ -28,7 +28,7 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
@@ -91,7 +91,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::l
Reference< ::com::sun::star::ui::XUIElement > xMenuBar( (OWeakObject *)pMenuBarWrapper, UNO_QUERY );
Reference< ::com::sun::star::frame::XModuleManager2 > xModuleManager = m_xModuleManager;
aLock.unlock();
- CreateUIElement(ResourceURL,Args,"MenuOnly","private:resource/menubar/",xMenuBar,xModuleManager,m_xServiceManager);
+ CreateUIElement(ResourceURL,Args,"MenuOnly","private:resource/menubar/",xMenuBar,xModuleManager, comphelper::getComponentContext(m_xServiceManager));
return xMenuBar;
}
void MenuBarFactory::CreateUIElement(const ::rtl::OUString& ResourceURL
@@ -100,7 +100,7 @@ void MenuBarFactory::CreateUIElement(const ::rtl::OUString& ResourceURL
,const char* _pAsciiName
,const Reference< ::com::sun::star::ui::XUIElement >& _xMenuBar
,const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager2 >& _xModuleManager
- ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceManager)
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext)
{
Reference< XUIConfigurationManager > xCfgMgr;
Reference< XUIConfigurationManager > xConfigSource;
@@ -150,8 +150,8 @@ void MenuBarFactory::CreateUIElement(const ::rtl::OUString& ResourceURL
rtl::OUString aModuleIdentifier = _xModuleManager->identify( Reference< XInterface >( xFrame, UNO_QUERY ));
if ( !aModuleIdentifier.isEmpty() )
{
- Reference< ::com::sun::star::ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier(
- _xServiceManager->createInstance( SERVICENAME_MODULEUICONFIGURATIONMANAGERSUPPLIER ), UNO_QUERY );
+ Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier =
+ ModuleUIConfigurationManagerSupplier::create( _rxContext );
xCfgMgr = xModuleCfgSupplier->getUIConfigurationManager( aModuleIdentifier );
bHasSettings = xCfgMgr->hasSettings( aResourceURL );
}
diff --git a/framework/source/uifactory/statusbarfactory.cxx b/framework/source/uifactory/statusbarfactory.cxx
index df64bc16f899..dd5448915b75 100644
--- a/framework/source/uifactory/statusbarfactory.cxx
+++ b/framework/source/uifactory/statusbarfactory.cxx
@@ -78,7 +78,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::l
Reference< ::com::sun::star::ui::XUIElement > xMenuBar( (OWeakObject *)pWrapper, UNO_QUERY );
Reference< ::com::sun::star::frame::XModuleManager2 > xModuleManager = m_xModuleManager;
aLock.unlock();
- MenuBarFactory::CreateUIElement(ResourceURL,Args,NULL,"private:resource/statusbar/",xMenuBar,xModuleManager,m_xServiceManager);
+ MenuBarFactory::CreateUIElement(ResourceURL,Args,NULL,"private:resource/statusbar/",xMenuBar,xModuleManager, comphelper::getComponentContext(m_xServiceManager));
return xMenuBar;
}
diff --git a/framework/source/uifactory/toolboxfactory.cxx b/framework/source/uifactory/toolboxfactory.cxx
index 69a037c7a934..2a2f790ed2fc 100644
--- a/framework/source/uifactory/toolboxfactory.cxx
+++ b/framework/source/uifactory/toolboxfactory.cxx
@@ -74,7 +74,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::l
Reference< ::com::sun::star::ui::XUIElement > xMenuBar( (OWeakObject *)pWrapper, UNO_QUERY );
Reference< ::com::sun::star::frame::XModuleManager2 > xModuleManager = m_xModuleManager;
aLock.unlock();
- CreateUIElement(ResourceURL,Args,"PopupMode","private:resource/toolbar/",xMenuBar,xModuleManager,m_xServiceManager);
+ CreateUIElement(ResourceURL,Args,"PopupMode","private:resource/toolbar/",xMenuBar,xModuleManager,comphelper::getComponentContext(m_xServiceManager));
return xMenuBar;
}