[1/2] ole32: Accept TYMED_FILE as a possible source of CF_METAFILEPICT format.
Dmitry Timoshkov
dmitry at baikal.ru
Fri Oct 23 05:32:17 CDT 2015
Microsoft Photo Editor 3.0 creates OLE storage documents with storage medium
type set to TYMED_FILE, this patch makes OleLoad() recognize such an object
as a valid CF_METAFILEPICT format, and OleDraw() later successfully paints
object contents on the screen.
Other clipboard formats left as is, probably TYMED_FILE source should be
accepted for them as well, but this needs an additional investigation.
Please apply after "ole32: Print a FIXME when the "CONTENTS" stream refers
to unsupported format."
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
dlls/ole32/datacache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c
index caabd10..3db0edf 100644
--- a/dlls/ole32/datacache.c
+++ b/dlls/ole32/datacache.c
@@ -285,7 +285,7 @@ static DataCacheEntry *DataCache_GetEntryForFormatEtc(DataCache *This, const FOR
static HRESULT check_valid_clipformat_and_tymed(CLIPFORMAT cfFormat, DWORD tymed)
{
if (!cfFormat || !tymed ||
- (cfFormat == CF_METAFILEPICT && tymed == TYMED_MFPICT) ||
+ (cfFormat == CF_METAFILEPICT && (tymed == TYMED_MFPICT || tymed == TYMED_FILE)) ||
(cfFormat == CF_BITMAP && tymed == TYMED_GDI) ||
(cfFormat == CF_DIB && tymed == TYMED_HGLOBAL) ||
(cfFormat == CF_ENHMETAFILE && tymed == TYMED_ENHMF))
--
2.6.2
More information about the wine-patches
mailing list