summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/taskpane.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-09-04 14:56:48 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-05 14:56:19 +0200
commit1c7a54e3a14ad932e68b9281420e6c469e5dd2e5 (patch)
tree8d2d64a9536e738cc6cda4f0690993c98b658bdd /sfx2/source/dialog/taskpane.cxx
parent55aa40bcd6ae3116c63a0eac18056bcfd011f43a (diff)
fdo#46808, Adapt frame::ModuleManager UNO service to new style
Create a merged XModuleManager2 interface for this service to implement. Which is backwards-compatible, but does not require creating a new service. Explicitly document the XNameReplace interface in the IDL, which is already implemented by the service, since there is code currently using it. Change-Id: Ib46349174b1ce495c240031e93c9427fc33d9853
Diffstat (limited to 'sfx2/source/dialog/taskpane.cxx')
-rw-r--r--sfx2/source/dialog/taskpane.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index a33e5a47201b..2f8e90476c3c 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -27,7 +27,7 @@
#include "sfxlocal.hrc"
#include "helpid.hrc"
-#include <com/sun/star/frame/XModuleManager.hpp>
+#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/ui/XToolPanel.hpp>
#include <com/sun/star/ui/XUIElementFactory.hpp>
@@ -71,6 +71,7 @@ namespace sfx2
using ::com::sun::star::uno::makeAny;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Type;
+ using ::com::sun::star::frame::ModuleManager;
using ::com::sun::star::frame::XModuleManager;
using ::com::sun::star::container::XNameAccess;
using ::com::sun::star::ui::XToolPanel;
@@ -100,7 +101,7 @@ namespace sfx2
::rtl::OUStringBuffer aPathComposer;
try
{
- const Reference< XNameAccess > xModuleAccess( aContext.createComponent( "com.sun.star.frame.ModuleManager" ), UNO_QUERY_THROW );
+ const Reference< XNameAccess > xModuleAccess( ModuleManager::create(aContext.getUNOContext()), UNO_QUERY_THROW );
const ::comphelper::NamedValueCollection aModuleProps( xModuleAccess->getByName( i_rModuleIdentifier ) );
const ::rtl::OUString sWindowStateRef( aModuleProps.getOrDefault( "ooSetupFactoryWindowStateConfigRef", ::rtl::OUString() ) );
@@ -127,8 +128,8 @@ namespace sfx2
::rtl::OUString sModuleName;
try
{
- const ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
- const Reference< XModuleManager > xModuleManager( aContext.createComponent( "com.sun.star.frame.ModuleManager" ), UNO_QUERY_THROW );
+ const Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ const Reference< XModuleManager > xModuleManager( ModuleManager::create(xContext), UNO_QUERY_THROW );
sModuleName = xModuleManager->identify( i_rDocumentFrame );
}
catch( const Exception& )