diff options
author | Rüdiger Timm <rt@openoffice.org> | 2005-01-31 08:14:10 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2005-01-31 08:14:10 +0000 |
commit | 61fa247f12972c5f3b088011e98487ff79f1bc1a (patch) | |
tree | 33f64ad1508e0ffe24e372afa3f8bf4c44e6d197 /svx/source/dialog/insdlg.cxx | |
parent | 3dae678e39a78b6df6bde77e481239dd6e2c7733 (diff) |
INTEGRATION: CWS mav15 (1.3.16); FILE MERGED
2005/01/18 15:46:38 mav 1.3.16.1: #119038# possibility to link to an encrypted document
Diffstat (limited to 'svx/source/dialog/insdlg.cxx')
-rw-r--r-- | svx/source/dialog/insdlg.cxx | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/svx/source/dialog/insdlg.cxx b/svx/source/dialog/insdlg.cxx index e54d007eb317..94404377bacb 100644 --- a/svx/source/dialog/insdlg.cxx +++ b/svx/source/dialog/insdlg.cxx @@ -2,9 +2,9 @@ * * $RCSfile: insdlg.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: kz $ $Date: 2005-01-21 16:39:42 $ + * last change: $Author: rt $ $Date: 2005-01-31 09:14:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -99,6 +99,9 @@ #ifndef _COM_SUN_STAR_UCB_COMMANDABORTEDEXCEPTION_HPP_ #include <com/sun/star/ucb/CommandAbortedException.hpp> #endif +#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_ +#include <com/sun/star/task/XInteractionHandler.hpp> +#endif #include "insdlg.hxx" #include "dialmgr.hxx" @@ -375,10 +378,29 @@ short SvInsertOleDlg::Execute() if ( aFileName.Len() ) { // create MediaDescriptor for file to create object from - uno::Sequence < beans::PropertyValue > aMedium(1); + uno::Sequence < beans::PropertyValue > aMedium( 2 ); aMedium[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ); aMedium[0].Value <<= ::rtl::OUString( aFileName ); + uno::Reference< task::XInteractionHandler > xInteraction; + uno::Reference< lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory(); + if ( xFactory.is() ) + xInteraction = uno::Reference< task::XInteractionHandler >( + xFactory->createInstance( + DEFINE_CONST_UNICODE("com.sun.star.task.InteractionHandler") ), + uno::UNO_QUERY_THROW ); + + if ( xInteraction.is() ) + { + aMedium[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ) ); + aMedium[1].Value <<= xInteraction; + } + else + { + OSL_ASSERT( "Can not get InteractionHandler!\n" ); + aMedium.realloc( 1 ); + } + // create object from media descriptor if ( bLink ) m_xObj = aCnt.InsertEmbeddedLink( aMedium, aName ); |