diff options
-rw-r--r-- | dtrans/source/win32/dtobj/FmtFilter.cxx | 15 | ||||
-rw-r--r-- | dtrans/source/win32/dtobj/FmtFilter.hxx | 5 | ||||
-rw-r--r-- | dtrans/source/win32/dtobj/XTDataObject.cxx | 11 | ||||
-rw-r--r-- | dtrans/source/win32/ftransl/ftransl.cxx | 5 |
4 files changed, 27 insertions, 9 deletions
diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index 9efbc0be7274..3dc4cb28d253 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.cxx @@ -2,9 +2,9 @@ * * $RCSfile: FmtFilter.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: tra $ $Date: 2001-10-10 13:32:41 $ + * last change: $Author: ka $ $Date: 2002-07-20 08:41:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -193,6 +193,17 @@ HMETAFILEPICT SAL_CALL OOMFPictToWinMFPict( Sequence< sal_Int8 >& aOOMetaFilePic return hPict; } +//----------------------------------------------------------------------------- +// convert a openoffice metafile picture to a windows enhanced metafile picture +//----------------------------------------------------------------------------- + +HENHMETAFILE SAL_CALL OOMFPictToWinENHMFPict( Sequence< sal_Int8 >& aOOMetaFilePict ) +{ + HENHMETAFILE hEnhMtf = SetEnhMetaFileBits( aOOMetaFilePict.getLength(), (sal_uChar*) aOOMetaFilePict.getConstArray() ); + + return hEnhMtf; +} + //------------------------------------------------------------------------ // convert a windows device independent bitmap into a openoffice bitmap //------------------------------------------------------------------------ diff --git a/dtrans/source/win32/dtobj/FmtFilter.hxx b/dtrans/source/win32/dtobj/FmtFilter.hxx index cc39c83d2561..8f755bf13cb5 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.hxx +++ b/dtrans/source/win32/dtobj/FmtFilter.hxx @@ -2,9 +2,9 @@ * * $RCSfile: FmtFilter.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: tra $ $Date: 2001-03-20 09:26:01 $ + * last change: $Author: ka $ $Date: 2002-07-20 08:41:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -85,6 +85,7 @@ com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL WinMFPictToOOMFPict( com::sun picture with a leading METAFILEHEADER ------------------------------------------------------------------------*/ HMETAFILEPICT SAL_CALL OOMFPictToWinMFPict( com::sun::star::uno::Sequence< sal_Int8 >& aOOMetaFilePict ); +HENHMETAFILE SAL_CALL OOMFPictToWinENHMFPict( com::sun::star::uno::Sequence< sal_Int8 >& aOOMetaFilePict ); /*------------------------------------------------------------------------ input: diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx index 880174b2b698..0e02ae637597 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.cxx +++ b/dtrans/source/win32/dtobj/XTDataObject.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XTDataObject.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: tra $ $Date: 2001-07-24 07:55:54 $ + * last change: $Author: ka $ $Date: 2002-07-20 08:41:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -356,13 +356,18 @@ void SAL_CALL CXTDataObject::renderAnyDataAndSetupStgMedium( if ( CF_DIB == fetc.cfFormat ) clipDataStream = OOBmpToWinDIB( clipDataStream ); - // transfer data if ( CF_METAFILEPICT == fetc.cfFormat ) { stgmedium.tymed = TYMED_MFPICT; stgmedium.hMetaFilePict = OOMFPictToWinMFPict( clipDataStream ); stgmedium.pUnkForRelease = NULL; } + else if( CF_ENHMETAFILE == fetc.cfFormat ) + { + stgmedium.tymed = TYMED_ENHMF; + stgmedium.hMetaFilePict = OOMFPictToWinENHMFPict( clipDataStream ); + stgmedium.pUnkForRelease = NULL; + } else renderDataAndSetupStgMedium( clipDataStream.getArray( ), diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx index 3f0495d235c3..5a1a4a003b3f 100644 --- a/dtrans/source/win32/ftransl/ftransl.cxx +++ b/dtrans/source/win32/ftransl/ftransl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ftransl.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: tra $ $Date: 2002-04-04 13:28:51 $ + * last change: $Author: ka $ $Date: 2002-07-20 08:39:00 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -282,6 +282,7 @@ void SAL_CALL CDataFormatTranslator::initTranslationTable( ) m_TranslTable.push_back( mkPublicFormatEntry( OUSTR(text/plain;charset=utf-16), EMPTY_OUSTR, CF_UNICODETEXT, OUSTR(Unicode-Text), CPPUTYPE_OUSTR) ); m_TranslTable.push_back( mkPrivateFormatEntry( OUSTR(Locale), CF_LOCALE ) ); m_TranslTable.push_back( mkPrivateFormatEntry( OUSTR(Image WMF), CF_METAFILEPICT ) );// SOT_FORMAT_WMF + m_TranslTable.push_back( mkPrivateFormatEntry( OUSTR(Image EMF), CF_ENHMETAFILE ) );// SOT_FORMAT_EMF m_TranslTable.push_back( mkPrivateFormatEntry( OUSTR(FileList), CF_HDROP ) );// SOT_FORMAT_FILE_LIST m_TranslTable.push_back( mkPrivateFormatEntry( OUSTR(GDIMetaFile) ) );// SOT_FORMAT_GDIMETAFILE |