diff options
author | Noel Grandin <noel@peralex.com> | 2012-09-04 14:56:48 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-05 14:56:19 +0200 |
commit | 1c7a54e3a14ad932e68b9281420e6c469e5dd2e5 (patch) | |
tree | 8d2d64a9536e738cc6cda4f0690993c98b658bdd /embeddedobj | |
parent | 55aa40bcd6ae3116c63a0eac18056bcfd011f43a (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 'embeddedobj')
-rw-r--r-- | embeddedobj/source/commonembedding/embedobj.cxx | 8 | ||||
-rw-r--r-- | embeddedobj/source/general/docholder.cxx | 7 |
2 files changed, 5 insertions, 10 deletions
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index 337b01beb12d..06ad663ee351 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.cxx @@ -42,10 +42,11 @@ #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/frame/XComponentLoader.hpp> #include <com/sun/star/frame/XDispatchProviderInterception.hpp> -#include <com/sun/star/frame/XModuleManager.hpp> +#include <com/sun/star/frame/ModuleManager.hpp> #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/embed/EmbedMisc.hpp> +#include <comphelper/componentcontext.hxx> #include <rtl/logfile.hxx> @@ -322,10 +323,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) uno::Reference< embed::XComponentSupplier > xCompSupl( m_xClientSite, uno::UNO_QUERY_THROW ); uno::Reference< uno::XInterface > xContDoc( xCompSupl->getComponent(), uno::UNO_QUERY_THROW ); - uno::Reference< frame::XModuleManager > xManager( - m_xFactory->createInstance( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager" ) ) ), - uno::UNO_QUERY_THROW ); + uno::Reference< frame::XModuleManager2 > xManager( frame::ModuleManager::create(comphelper::ComponentContext(m_xFactory).getUNOContext()) ); aModuleName = xManager->identify( xContDoc ); } diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 05314398b6fa..fd073eda383d 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -60,7 +60,7 @@ #include <com/sun/star/embed/XInplaceClient.hpp> #include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/frame/XMenuBarMergingAcceptor.hpp> -#include <com/sun/star/frame/XModuleManager.hpp> +#include <com/sun/star/frame/ModuleManager.hpp> #include <com/sun/star/ui/XDockingAreaAcceptor.hpp> #include <com/sun/star/ui/XUIElementSettings.hpp> #include <com/sun/star/ui/XUIConfigurationManager.hpp> @@ -576,10 +576,7 @@ uno::Reference< container::XIndexAccess > DocumentHolder::RetrieveOwnMenu_Impl() if ( !xResult.is() ) { // no internal document configuration, use the one from the module - uno::Reference< ::com::sun::star::frame::XModuleManager > xModuleMan( - m_xFactory->createInstance( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager" ) ) ), - uno::UNO_QUERY_THROW ); + uno::Reference< frame::XModuleManager2 > xModuleMan( frame::ModuleManager::create(comphelper::ComponentContext(m_xFactory).getUNOContext()) ); ::rtl::OUString aModuleIdent = xModuleMan->identify( uno::Reference< uno::XInterface >( m_xComponent, uno::UNO_QUERY ) ); |