JDK-4397404 : Win32: Support for CF_METAFILEPICT data is incomplete
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2000-12-12
  • Updated: 2008-11-05
  • Resolved: 2002-08-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2 mantisFixed
Related Reports
Relates :  
Description
Date: Thu, 30 Nov 2000 16:40:55 +0300
From: "Danila A. Sinopalnikov" <###@###.###>
To: David Mendenhall <###@###.###>
Cc: ###@###.###, ###@###.###
Subject: Re: comments on image transfer diffs
Mime-Version: 1.0
Content-Disposition: inline
User-Agent: Mutt/1.1.12i

[...]

For full CF_METAFILEPICT support we need:
1.Code for processing CF_METAFILEPICT and TYMED_MFPICT 
  on the source side.
2.Corresponding mapping in flavormap.properties.

[...]

Danila.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis mantis-b02 FIXED IN: mantis mantis-b02 INTEGRATED IN: mantis mantis-b02
14-06-2004

SUGGESTED FIX Name: dsR10078 Date: 05/13/2002 Note, that DIB and ENHMETAFILE were supported up to present time. 0. Add the following line to flavormap.properties: METAFILEPICT=image/x-java-image;class=java.awt.Image 1. Add CF_METAFILEPICT constant to WDataTransferer and revise WDataTransferer.isImageFormat() method. 2. Transform image data to a byte array containing data special for CF_METAFILEPICT format in the native method WDataTransferer.imageDataToPlatformImageBytes(). One can choose any convenient structure of CF_METAFILEPICT data for decoding this CF_METAFILEPICT data to in-memory objects in AwtDragSource::GetData() and WClipboard.publishClipboardData(). 3. Decode CF_METAFILEPICT data to METAFILEPICT structure and fill STGMEDIUM structure correspondingly in AwtDragSource::GetData(). 4. Add constants CF_METAFILEPICT and TYMED_MFPICT to AwtDragSource::LoadCache() and AwtDragSource::MatchFormatEtc() in appropriate places. 5. Decode CF_METAFILEPICT data to METAFILEPICT structure and set it as clipboard data in WClipboard.publishClipboardData(). 6. In WDataTransferer.platformImageBytesToImageData() use existing code for CF_ENHMETAFILE to process CF_METAFILEPICT simply by adding 'case CF_METAFILEPICT:' near 'case CF_ENHMETAFILE:' since TYMED_MFPICT and TYMED_ENHMF objects are processed equally in AwtDropTarget::GetData() (after conversion of metafile of metafile picture to enhanced metafile). 7. Convert metafile of metafile picture to enhanced metafile and use existing code for CF_ENHMETAFILE in ClipboardTransferable.getClipboardData(). 8. We also decided to remove hard-coded supported native image formats from WDataTransferer and MDataTransferer. Enumerating the formats in these classes forced to support them in spite of other settings. DataTransferer.getImageFormatsAsLongArray() call was removed from DataTransferer.getFormatsForFlavors(). WDataTransferer.getImageFormatsAsLongArray() and MDataTransferer.getImageFormatsAsLongArray() were deleted as well as Long representations of native image formats. Now all supported native image formats are listed in flavormap.properties, the file referenced by the AWT property AWT.DnD.flavorMapFileURL or selected by application developer. It will help us to test support of particular native image format. ###@###.### 2002-05-13 ======================================================================
13-05-2002

EVALUATION Commit to merlin-beta. david.mendenhall@east 2000-12-12
12-12-2000