summaryrefslogtreecommitdiff
path: root/cui/source/options/treeopt.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/options/treeopt.cxx')
-rw-r--r--cui/source/options/treeopt.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 9100312ce566..16bfa7f434d2 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -64,9 +64,10 @@
#include <com/sun/star/awt/XControl.hpp>
#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
-#include <com/sun/star/frame/XModuleManager.hpp>
+#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/loader/CannotActivateFactoryException.hpp>
#include <com/sun/star/util/XMacroExpander.hpp>
+#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <editeng/optitems.hxx>
#include <editeng/unolingu.hxx>
@@ -1492,8 +1493,7 @@ rtl::OUString getCurrentFactory_Impl( const Reference< XFrame >& _xFrame )
{
rtl::OUString sIdentifier;
Reference < XFrame > xCurrentFrame( _xFrame );
- Reference < XModuleManager > xModuleManager( ::comphelper::getProcessServiceFactory()->createInstance(
- DEFINE_CONST_UNICODE("com.sun.star.frame.ModuleManager") ), UNO_QUERY );
+ Reference < XModuleManager2 > xModuleManager( ModuleManager::create(::comphelper::getProcessComponentContext()) );
if ( !xCurrentFrame.is() )
{
Reference< XDesktop > xDesktop( ::comphelper::getProcessServiceFactory()->createInstance(
@@ -1502,7 +1502,7 @@ rtl::OUString getCurrentFactory_Impl( const Reference< XFrame >& _xFrame )
xCurrentFrame = xDesktop->getCurrentFrame();
}
- if ( xCurrentFrame.is() && xModuleManager.is() )
+ if ( xCurrentFrame.is() )
{
try
{
@@ -1945,8 +1945,7 @@ rtl::OUString OfaTreeOptionsDialog::GetModuleIdentifier(
{
rtl::OUString sModule;
Reference < XFrame > xCurrentFrame( rFrame );
- Reference < XModuleManager > xModuleManager( xMFac->createInstance(
- C2U("com.sun.star.frame.ModuleManager") ), UNO_QUERY );
+ Reference < XModuleManager2 > xModuleManager( ModuleManager::create(comphelper::ComponentContext(xMFac).getUNOContext()) );
if ( !xCurrentFrame.is() )
{