summaryrefslogtreecommitdiffstats
path: root/dtrans/source/win32/dtobj/DataFmtTransl.cxx
diff options
context:
space:
mode:
authorTino Rachui <tra@openoffice.org>2001-03-23 10:58:01 +0000
committerTino Rachui <tra@openoffice.org>2001-03-23 10:58:01 +0000
commit3066312aaa98dee555dc655659db749445defcf2 (patch)
tree91138bccc33ea42c2ebba2b25ea1519b7c287cc4 /dtrans/source/win32/dtobj/DataFmtTransl.cxx
parentprepare Asian kerning (diff)
downloadcore-3066312aaa98dee555dc655659db749445defcf2.tar.gz
core-3066312aaa98dee555dc655659db749445defcf2.zip
*** empty log message ***
Diffstat (limited to 'dtrans/source/win32/dtobj/DataFmtTransl.cxx')
-rw-r--r--dtrans/source/win32/dtobj/DataFmtTransl.cxx33
1 files changed, 18 insertions, 15 deletions
diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx
index b5de5aa02624..9baa6a93583b 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.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: tra $ $Date: 2001-03-20 13:39:33 $
+ * last change: $Author: tra $ $Date: 2001-03-23 11:58:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -153,23 +153,26 @@ CFormatEtc CDataFormatTranslator::getFormatEtcFromDataFlavor( const DataFlavor&
{
Any aFormat = m_XDataFormatTranslator->getSystemDataTypeFromDataFlavor( aDataFlavor );
- if ( aFormat.getValueType( ) == CPPUTYPE_SALINT32 )
+ if ( aFormat.hasValue( ) )
{
- aFormat >>= cf;
- OSL_ENSURE( CF_INVALID != cf, "Invalid Clipboard format delivered" );
- }
- else if ( aFormat.getValueType( ) == CPPUTYPE_OUSTRING )
- {
- OUString aClipFmtName;
- aFormat >>= aClipFmtName;
+ if ( aFormat.getValueType( ) == CPPUTYPE_SALINT32 )
+ {
+ aFormat >>= cf;
+ OSL_ENSURE( CF_INVALID != cf, "Invalid Clipboard format delivered" );
+ }
+ else if ( aFormat.getValueType( ) == CPPUTYPE_OUSTRING )
+ {
+ OUString aClipFmtName;
+ aFormat >>= aClipFmtName;
- OSL_ASSERT( aClipFmtName.getLength( ) );
- cf = RegisterClipboardFormatW( aClipFmtName.getStr( ) );
+ OSL_ASSERT( aClipFmtName.getLength( ) );
+ cf = RegisterClipboardFormatW( aClipFmtName.getStr( ) );
- OSL_ENSURE( CF_INVALID != cf, "RegisterClipboardFormat failed" );
+ OSL_ENSURE( CF_INVALID != cf, "RegisterClipboardFormat failed" );
+ }
+ else
+ OSL_ENSURE( sal_False, "Wrong Any-Type detected" );
}
- else
- OSL_ENSURE( sal_False, "Wrong Any-Type detected" );
}
catch( ... )
{