summaryrefslogtreecommitdiffstats
path: root/dtrans/source/win32/dtobj/DataFmtTransl.cxx
diff options
context:
space:
mode:
authorTino Rachui <tra@openoffice.org>2001-03-02 14:46:44 +0000
committerTino Rachui <tra@openoffice.org>2001-03-02 14:46:44 +0000
commitd07363cb70cc14428f687c09a6c53b1b4b793071 (patch)
tree0e17155a66f4cfba287e94f38d320ba7ccc9eeb2 /dtrans/source/win32/dtobj/DataFmtTransl.cxx
parent*** empty log message *** (diff)
downloadcore-d07363cb70cc14428f687c09a6c53b1b4b793071.tar.gz
core-d07363cb70cc14428f687c09a6c53b1b4b793071.zip
*** empty log message ***
Diffstat (limited to 'dtrans/source/win32/dtobj/DataFmtTransl.cxx')
-rw-r--r--dtrans/source/win32/dtobj/DataFmtTransl.cxx29
1 files changed, 14 insertions, 15 deletions
diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx
index 76e1792b973b..3bdf43477cef 100644
--- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx
+++ b/dtrans/source/win32/dtobj/DataFmtTransl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: DataFmtTransl.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: tra $ $Date: 2001-03-01 15:39:15 $
+ * last change: $Author: tra $ $Date: 2001-03-02 15:45:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -99,6 +99,10 @@
#include <rtl/string.h>
#endif
+#ifndef _FETC_HXX_
+#include "Fetc.hxx"
+#endif
+
#include <windows.h>
#include <olestd.h>
@@ -139,7 +143,7 @@ CDataFormatTranslator::CDataFormatTranslator( const Reference< XMultiServiceFact
//
//------------------------------------------------------------------------
-FORMATETC CDataFormatTranslator::getFormatEtcFromDataFlavor( const DataFlavor& aDataFlavor ) const
+CFormatEtc CDataFormatTranslator::getFormatEtcFromDataFlavor( const DataFlavor& aDataFlavor ) const
{
sal_Int32 cf = CF_INVALID;
@@ -245,27 +249,22 @@ OUString CDataFormatTranslator::getClipboardFormatName( CLIPFORMAT aClipformat )
//
//------------------------------------------------------------------------
-FORMATETC SAL_CALL CDataFormatTranslator::getFormatEtcForClipformat( CLIPFORMAT cf ) const
+CFormatEtc SAL_CALL CDataFormatTranslator::getFormatEtcForClipformat( CLIPFORMAT cf ) const
{
- FORMATETC fetc;
-
- fetc.cfFormat = cf;
- fetc.ptd = NULL;
- fetc.dwAspect = DVASPECT_CONTENT;
- fetc.lindex = -1;
+ CFormatEtc fetc( cf, TYMED_NULL, NULL, DVASPECT_CONTENT );;
switch( cf )
{
case CF_METAFILEPICT:
- fetc.tymed = TYMED_MFPICT;
+ fetc.setTymed( TYMED_MFPICT );
break;
case CF_ENHMETAFILE:
- fetc.tymed = TYMED_ENHMF;
+ fetc.setTymed( TYMED_ENHMF );
break;
default:
- fetc.tymed = TYMED_HGLOBAL | TYMED_ISTREAM;
+ fetc.setTymed( TYMED_HGLOBAL | TYMED_ISTREAM );
}
return fetc;
@@ -306,8 +305,8 @@ OUString SAL_CALL CDataFormatTranslator::getCodePageFromLocaleId( LCID locale, L
LCID SAL_CALL CDataFormatTranslator::getCurrentLocaleFromClipboard(
const Reference< XTransferable >& refXTransferable ) const
{
- Any aAny;
- FORMATETC fetc = getFormatEtcForClipformat( CF_LOCALE );
+ Any aAny;
+ CFormatEtc fetc = getFormatEtcForClipformat( CF_LOCALE );
DataFlavor aFlavor = getDataFlavorFromFormatEtc( refXTransferable, fetc );
OSL_ASSERT( aFlavor.MimeType.getLength( ) );