summaryrefslogtreecommitdiff
path: root/framework/source/loadenv
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-02-25 16:09:10 +0200
committerNoel Grandin <noel@peralex.com>2013-03-04 14:22:34 +0200
commitdc00ad1e823e3b36619cd04c7e4d169362e199b3 (patch)
tree5650e5891532dde51346d8bf5e7703569712f025 /framework/source/loadenv
parent244c7cdede13980c29850b7b68e9da16cdc61879 (diff)
fdo#46808, Use service constructor for task::InteractionHandler
a lot of code was loading the service using it's implementation name, which is why this got missed earlier. Change-Id: I0b150bc9383a1a3a09ab905c4ddb7f914e69638d
Diffstat (limited to 'framework/source/loadenv')
-rw-r--r--framework/source/loadenv/loadenv.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 332f3c911fb2..3b0f4cbe9160 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -37,6 +37,7 @@
#include "officecfg/Office/Common.hxx"
#include <com/sun/star/task/ErrorCodeRequest.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/frame/DispatchResultState.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
@@ -293,7 +294,7 @@ void LoadEnv::initializeLoading(const ::rtl::OUString&
( m_lMediaDescriptor.getUnpackedValueOrDefault( ::comphelper::MediaDescriptor::PROP_PREVIEW(), sal_False ) == sal_False );
initializeUIDefaults(
- m_xSMGR,
+ comphelper::getComponentContext(m_xSMGR),
m_lMediaDescriptor,
bUIMode,
&m_pQuietInteraction
@@ -304,7 +305,7 @@ void LoadEnv::initializeLoading(const ::rtl::OUString&
}
-void LoadEnv::initializeUIDefaults( const css::uno::Reference< css::lang::XMultiServiceFactory >& i_rSMGR,
+void LoadEnv::initializeUIDefaults( const css::uno::Reference< css::uno::XComponentContext >& i_rxContext,
::comphelper::MediaDescriptor& io_lMediaDescriptor, const bool i_bUIMode,
QuietInteraction** o_ppQuietInteraction )
{
@@ -318,7 +319,7 @@ void LoadEnv::initializeUIDefaults( const css::uno::Reference< css::lang::XMulti
nUpdateMode = css::document::UpdateDocMode::ACCORDING_TO_CONFIG;
try
{
- xInteractionHandler = css::uno::Reference< css::task::XInteractionHandler >(i_rSMGR->createInstance(IMPLEMENTATIONNAME_UIINTERACTIONHANDLER), css::uno::UNO_QUERY);
+ xInteractionHandler.set( css::task::InteractionHandler::createWithParent( i_rxContext, 0 ), css::uno::UNO_QUERY_THROW );
}
catch(const css::uno::RuntimeException&) {throw;}
catch(const css::uno::Exception& ) { }