From f789715a414bd1115401f93d11f09260f891956c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 23 Aug 2012 15:43:05 +0200 Subject: fdo#46808, Use factory methods for frame::DispatchHelper instances Change-Id: I7bdf16fc6d042e5ecd404c604a8b7c31c1ac7bc1 --- extensions/source/nsplugin/source/so_instance.cxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'extensions/source') diff --git a/extensions/source/nsplugin/source/so_instance.cxx b/extensions/source/nsplugin/source/so_instance.cxx index cc545c8cf0c1..b70a3e60ab40 100644 --- a/extensions/source/nsplugin/source/so_instance.cxx +++ b/extensions/source/nsplugin/source/so_instance.cxx @@ -28,6 +28,7 @@ #include +#include #include #include #include @@ -299,14 +300,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) debug_fprintf(NSP_LOG_APPEND, "load document success\n"); // create frame::XDispatchHelper and frame::XDispatchProvider - m_xDispatcher = Reference< frame::XDispatchHelper > ( - mxRemoteMSF->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.DispatchHelper"))), - uno::UNO_QUERY ); - if(!m_xDispatcher.is()) - { - debug_fprintf(NSP_LOG_APPEND, "m_xDispatcher can not be getten\n"); - return sal_False; - } + m_xDispatcher = Reference< frame::XDispatchHelper >( frame::DispatchHelper::create( xContext ) ); m_xDispatchProvider = Reference< frame::XDispatchProvider >(m_xFrame, uno::UNO_QUERY); if(!m_xDispatchProvider.is()) { -- cgit