From 3088337ad40ee8f67ecfc7cc40fa84a5f7763836 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Thu, 24 Apr 2003 13:55:07 +0000 Subject: INTEGRATION: CWS draw9 (1.16.10.1.18); FILE MERGED 2003/04/04 13:58:55 ka 1.16.10.1.18.1: #i4944#: use HGLOBAL in case of WMF, too --- dtrans/source/win32/dtobj/DOTransferable.cxx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'dtrans/source') diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx index f712db05b714..e5efb8f22a75 100644 --- a/dtrans/source/win32/dtobj/DOTransferable.cxx +++ b/dtrans/source/win32/dtobj/DOTransferable.cxx @@ -2,9 +2,9 @@ * * $RCSfile: DOTransferable.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: hr $ $Date: 2003-03-25 14:05:36 $ + * last change: $Author: rt $ $Date: 2003-04-24 14:55:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -377,6 +377,16 @@ CDOTransferable::ByteSequence_t SAL_CALL CDOTransferable::getClipboardData( CFor STGMEDIUM stgmedium; HRESULT hr = m_rDataObject->GetData( aFormatEtc, &stgmedium ); + // in case of failure to get a WMF metafile handle, try to get a memory block + if( FAILED( hr ) && + ( CF_METAFILEPICT == aFormatEtc.getClipformat() ) && + ( TYMED_MFPICT == aFormatEtc.getTymed() ) ) + { + CFormatEtc aTempFormat( aFormatEtc ); + aTempFormat.setTymed( TYMED_HGLOBAL ); + hr = m_rDataObject->GetData( aTempFormat, &stgmedium ); + } + if ( FAILED( hr ) ) { OSL_ASSERT( (hr != E_INVALIDARG) && -- cgit v1.2.3