Fix an InteractionHandler new-style service use

Change-Id: I593467dce8f1e70e1f5068d722dfa0654d3346b7
This commit is contained in:
Stephan Bergmann
2012-10-04 18:05:46 +02:00
parent 8e753f8446
commit 31713fee3c

View File

@@ -59,6 +59,7 @@
#include <com/sun/star/embed/XVisualObject.hpp> #include <com/sun/star/embed/XVisualObject.hpp>
#include <com/sun/star/document/MacroExecMode.hpp> #include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/task/InteractionHandler.hpp> #include <com/sun/star/task/InteractionHandler.hpp>
#include <comphelper/processfactory.hxx>
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <rtl/process.h> #include <rtl/process.h>
@@ -113,9 +114,8 @@ void DocumentHolder::LoadDocInFrame( sal_Bool bPluginMode )
m_xFrame,uno::UNO_QUERY); m_xFrame,uno::UNO_QUERY);
if( xComponentLoader.is() && m_xDocument.is() ) if( xComponentLoader.is() && m_xDocument.is() )
{ {
uno::Reference< task::XInteractionHandler > xHandler( uno::Reference< task::XInteractionHandler2 > xHandler(
task::InteractionHandler::create(comphelper::getComponentContext(m_xFactory)), task::InteractionHandler::createWithParent(comphelper::getComponentContext(m_xFactory), 0) );
uno::UNO_QUERY_THROW );
uno::Any aAny; uno::Any aAny;
sal_Int32 nLen = 3; sal_Int32 nLen = 3;
@@ -158,8 +158,6 @@ void DocumentHolder::LoadDocInFrame( sal_Bool bPluginMode )
beans::PropertyState_DIRECT_VALUE); beans::PropertyState_DIRECT_VALUE);
} }
if ( xHandler.is() )
{
aSeq.realloc( nLen+=2 ); aSeq.realloc( nLen+=2 );
aAny <<= xHandler; aAny <<= xHandler;
aSeq[nLen-2] = beans::PropertyValue( aSeq[nLen-2] = beans::PropertyValue(
@@ -176,7 +174,6 @@ void DocumentHolder::LoadDocInFrame( sal_Bool bPluginMode )
-1, -1,
aAny, aAny,
beans::PropertyState_DIRECT_VALUE); beans::PropertyState_DIRECT_VALUE);
}
xComponentLoader->loadComponentFromURL( xComponentLoader->loadComponentFromURL(
rtl::OUString( rtl::OUString(