Summary: | ImageTransfer.isSupportedType() gives different result than fetching content from clipboard | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Marco mvmsoft <sw-evaluation> |
Component: | SWT | Assignee: | Duong Nguyen <duongn> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | steve_northover |
Version: | 3.4 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Marco mvmsoft
2008-10-09 05:12:54 EDT
Duong to investigate. The problem is that our ImageTransfer only supports "CF_DIB" and isSupportedType only checks whether this type id is one of the available type in the clipboard. In this particular case "CF_DIB" type is not available. However, the clipboard has an "autoConvert" feature that will attempt to convert the data to the requested type when it can. In this particular case, it's able to convert one of the available type (most likely CF_BITMAP) to CF_DIB. As the result, you can get the image even though the ImageTransfer type reported that the type is not available. We need to provide a new API for clipboard to query whether the data type is available. on win32, the native call is QueryGetData on wpf, the native call is Clipboard_ContainsData I have not checked GTK and MAC. However, if the equivalent native call is not supported on these platforms, we can revert back to just checking for type id for a match as we do now. NOTE: This will require new API for Clipboard. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. |