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
This commit is contained in:
Rüdiger Timm 2003-04-24 13:55:07 +00:00
parent 9fc274ab59
commit 3088337ad4

View file

@ -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) &&