diff options
author | Oliver Bolte <obo@openoffice.org> | 2006-10-13 10:22:07 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2006-10-13 10:22:07 +0000 |
commit | 589f645e55246500f865ae5a95837fd967f45e5b (patch) | |
tree | d7906c3387dd87126559deeb54b59b1dd932c483 /svx/source/dialog | |
parent | 5cf9a878bb43bf82d8577111e431a68622d9bbd3 (diff) |
INTEGRATION: CWS opofxmlstorage (1.8.22); FILE MERGED
2006/09/06 13:36:44 mav 1.8.22.2: #122878# fix the warning
2006/08/16 15:44:16 mav 1.8.22.1: #i68684# support iconified objects
Diffstat (limited to 'svx/source/dialog')
-rw-r--r-- | svx/source/dialog/insdlg.cxx | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/svx/source/dialog/insdlg.cxx b/svx/source/dialog/insdlg.cxx index 2b1201996fb4..d2530cf1e9bd 100644 --- a/svx/source/dialog/insdlg.cxx +++ b/svx/source/dialog/insdlg.cxx @@ -4,9 +4,9 @@ * * $RCSfile: insdlg.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: obo $ $Date: 2006-09-17 04:25:52 $ + * last change: $Author: obo $ $Date: 2006-10-13 11:22:07 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -100,6 +100,7 @@ #include <sfx2/viewsh.hxx> #include <sfx2/filedlghelper.hxx> #include <svtools/ownlist.hxx> +#include <comphelper/seqstream.hxx> #include "svuidlg.hrc" @@ -125,6 +126,11 @@ BOOL InsertObjectDialog_Impl::IsCreateNew() const return FALSE; } +uno::Reference< io::XInputStream > InsertObjectDialog_Impl::GetIconIfIconified( ::rtl::OUString* pGraphicMediaType ) +{ + return uno::Reference< io::XInputStream >(); +} + InsertObjectDialog_Impl::InsertObjectDialog_Impl( Window * pParent, const ResId & rResId, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage ) : ModalDialog( pParent, rResId ) , m_xStorage( xStorage ) @@ -304,7 +310,18 @@ short SvInsertOleDlg::Execute() OSL_ENSURE( aNewInf.Object.is(), "The object must be created or an exception must be thrown!" ); m_xObj = aNewInf.Object; - // TODO/LATER: use the options from aNewInf ( iconified objects related ) + for ( sal_Int32 nInd = 0; nInd < aNewInf.Options.getLength(); nInd++ ) + if ( aNewInf.Options[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Icon" ) ) ) ) + { + aNewInf.Options[nInd].Value >>= m_aIconMetaFile; + } + else if ( aNewInf.Options[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IconFormat" ) ) ) ) + { + datatransfer::DataFlavor aFlavor; + if ( aNewInf.Options[nInd].Value >>= aFlavor ) + m_aIconMediaType = aFlavor.MimeType; + } + } } catch( ucb::CommandAbortedException& ) @@ -400,6 +417,19 @@ short SvInsertOleDlg::Execute() return nRet; } +uno::Reference< io::XInputStream > SvInsertOleDlg::GetIconIfIconified( ::rtl::OUString* pGraphicMediaType ) +{ + if ( m_aIconMetaFile.getLength() ) + { + if ( pGraphicMediaType ) + *pGraphicMediaType = m_aIconMediaType; + + return uno::Reference< io::XInputStream >( new ::comphelper::SequenceInputStream( m_aIconMetaFile ) ); + } + + return uno::Reference< io::XInputStream >(); +} + IMPL_LINK( SvInsertPlugInDialog, BrowseHdl, PushButton *, EMPTYARG ) { Sequence< OUString > aFilterNames, aFilterTypes; |