diff options
author | Tino Rachui <tra@openoffice.org> | 2001-03-16 08:02:25 +0000 |
---|---|---|
committer | Tino Rachui <tra@openoffice.org> | 2001-03-16 08:02:25 +0000 |
commit | 3c0b46ee8ec56ee9a4cc8eb771e708c523d9f5c5 (patch) | |
tree | 049e50bd52648f19dc9f5370485c5e31a55ef9da /dtrans/source/win32/dtobj/DataFmtTransl.cxx | |
parent | Update library name and symbol renaming (diff) | |
download | core-3c0b46ee8ec56ee9a4cc8eb771e708c523d9f5c5.tar.gz core-3c0b46ee8ec56ee9a4cc8eb771e708c523d9f5c5.zip |
*** empty log message ***
Diffstat (limited to 'dtrans/source/win32/dtobj/DataFmtTransl.cxx')
-rw-r--r-- | dtrans/source/win32/dtobj/DataFmtTransl.cxx | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx index f6d831345415..570347b7a8e0 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.7 $ + * $Revision: 1.8 $ * - * last change: $Author: tra $ $Date: 2001-03-15 10:13:24 $ + * last change: $Author: tra $ $Date: 2001-03-16 09:00:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -295,28 +295,25 @@ LCID SAL_CALL CDataFormatTranslator::getCurrentLocaleFromClipboard( const Reference< XTransferable >& refXTransferable ) const { Any aAny; - CFormatEtc fetc = getFormatEtcForClipformat( CF_LOCALE ); + CFormatEtc fetc = getFormatEtcForClipformat( CF_LOCALE ); DataFlavor aFlavor = getDataFlavorFromFormatEtc( refXTransferable, fetc ); OSL_ASSERT( aFlavor.MimeType.getLength( ) ); - LCID lcid; + LCID lcid = 0; try { aAny = refXTransferable->getTransferData( aFlavor ); - if ( aAny.hasValue( ) ) - { - OSL_ASSERT( aAny.getValueType( ) == CPPUTYPE_SEQSALINT8 ); - Sequence< sal_Int8 > byteStream; - aAny >>= byteStream; + OSL_ASSERT( aAny.hasValue( ) && (aAny.getValueType( ) == CPPUTYPE_SEQSALINT8) ); - lcid = *reinterpret_cast< LCID* >( byteStream.getArray( ) ); - } + Sequence< sal_Int8 > byteStream; + aAny >>= byteStream; + + lcid = *reinterpret_cast< LCID* >( byteStream.getArray( ) ); } catch( UnsupportedFlavorException& ) { - lcid = GetThreadLocale( ); } catch( ... ) { @@ -324,7 +321,7 @@ LCID SAL_CALL CDataFormatTranslator::getCurrentLocaleFromClipboard( } if ( !IsValidLocale( lcid, LCID_SUPPORTED ) ) - lcid = GetThreadLocale( ); + lcid = GetThreadLocale( ); return lcid; } |