diff options
author | jp <jp@openoffice.org> | 2001-03-08 20:00:07 +0000 |
---|---|---|
committer | jp <jp@openoffice.org> | 2001-03-08 20:00:07 +0000 |
commit | 8f5264e0f993506870c321b798763985cd74c79e (patch) | |
tree | 6fab8702dacc481c352a94804daaf1c2ae9ba628 /sc/source/ui/docshell/impex.cxx | |
parent | fcb6f2863b3b7369463bf3a5ab1b1c6e2b45bacd (diff) |
change: old data transfer API to the new
Diffstat (limited to 'sc/source/ui/docshell/impex.cxx')
-rw-r--r-- | sc/source/ui/docshell/impex.cxx | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 96a989746..dd6ad9a70 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -2,9 +2,9 @@ * * $RCSfile: impex.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: sab $ $Date: 2001-02-14 15:31:48 $ + * last change: $Author: jp $ $Date: 2001-03-08 20:49:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -358,7 +358,6 @@ BOOL ScImportExport::ImportData( SvData& rData ) } } - BOOL ScImportExport::ExportData( SvData& rData ) { SvMemoryStream aStrm; @@ -371,6 +370,29 @@ BOOL ScImportExport::ExportData( SvData& rData ) return FALSE; } +BOOL ScImportExport::ImportData( const String& rMimeType, + const ::com::sun::star::uno::Any & rValue ) +{ + DBG_ASSERT( !this, "Implementation is missing" ); + return FALSE; +} + +BOOL ScImportExport::ExportData( const String& rMimeType, + ::com::sun::star::uno::Any & rValue ) +{ + SvMemoryStream aStrm; + if( ExportStream( aStrm, + SotExchange::GetFormatIdFromMimeType( rMimeType ) )) + { + aStrm << (BYTE) 0; + rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >( + (sal_Int8*)aStrm.GetData(), + aStrm.Seek( STREAM_SEEK_TO_END ) ); + return TRUE; + } + return FALSE; +} + // static inline void ScImportExport::SetNoEndianSwap( SvStream& rStrm ) |