From 29fc759d529ab69d0af416a547552cfa4099ab17 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 27 Sep 2016 21:40:36 +0900 Subject: [PATCH] winex11: Remove support for exporting the CF_METAFILEPICT format. It can be synthesized from CF_ENHMETAFILE. Signed-off-by: Alexandre Julliard --- dlls/winex11.drv/clipboard.c | 47 ---------------------------------- dlls/winex11.drv/x11drv.h | 1 - dlls/winex11.drv/x11drv_main.c | 1 - 3 files changed, 49 deletions(-) diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c index 63d11dd4cb4..4ee8604b10e 100644 --- a/dlls/winex11.drv/clipboard.c +++ b/dlls/winex11.drv/clipboard.c @@ -110,7 +110,6 @@ struct clipboard_format static HANDLE import_data( Atom type, const void *data, size_t size ); static HANDLE import_enhmetafile( Atom type, const void *data, size_t size ); -static HANDLE import_metafile( Atom type, const void *data, size_t size ); static HANDLE import_pixmap( Atom type, const void *data, size_t size ); static HANDLE import_image_bmp( Atom type, const void *data, size_t size ); static HANDLE import_string( Atom type, const void *data, size_t size ); @@ -125,7 +124,6 @@ static BOOL export_utf8_string( Display *display, Window win, Atom prop, Atom ta static BOOL export_compound_text( Display *display, Window win, Atom prop, Atom target, HANDLE handle ); static BOOL export_pixmap( Display *display, Window win, Atom prop, Atom target, HANDLE handle ); static BOOL export_image_bmp( Display *display, Window win, Atom prop, Atom target, HANDLE handle ); -static BOOL export_metafile( Display *display, Window win, Atom prop, Atom target, HANDLE handle ); static BOOL export_enhmetafile( Display *display, Window win, Atom prop, Atom target, HANDLE handle ); static BOOL export_text_html( Display *display, Window win, Atom prop, Atom target, HANDLE handle ); static BOOL export_hdrop( Display *display, Window win, Atom prop, Atom target, HANDLE handle ); @@ -157,7 +155,6 @@ static const struct { 0, CF_UNICODETEXT, XA_STRING, import_string, export_string }, { 0, CF_UNICODETEXT, XATOM_text_plain, import_string, export_string }, { 0, CF_BITMAP, XATOM_WCF_BITMAP, import_data, NULL }, - { 0, CF_METAFILEPICT, XATOM_WCF_METAFILEPICT, import_metafile, export_metafile }, { 0, CF_SYLK, XATOM_WCF_SYLK, import_data, export_data }, { 0, CF_DIF, XATOM_WCF_DIF, import_data, export_data }, { 0, CF_TIFF, XATOM_WCF_TIFF, import_data, export_data }, @@ -813,24 +810,6 @@ static HANDLE import_image_bmp( Atom type, const void *data, size_t size ) } -/************************************************************************** - * import_metafile - */ -static HANDLE import_metafile( Atom type, const void *data, size_t size ) -{ - METAFILEPICT *mf; - - if (size < sizeof(METAFILEPICT)) return 0; - if ((mf = GlobalAlloc( GMEM_FIXED, sizeof(METAFILEPICT) ))) - { - memcpy( mf, data, sizeof(METAFILEPICT) ); - mf->hMF = SetMetaFileBitsEx( size - sizeof(METAFILEPICT), - (const BYTE *)data + sizeof(METAFILEPICT) ); - } - return mf; -} - - /************************************************************************** * import_enhmetafile */ @@ -1223,32 +1202,6 @@ static BOOL export_image_bmp( Display *display, Window win, Atom prop, Atom targ } -/************************************************************************** - * export_metafile - * - * Export MetaFilePict. - */ -static BOOL export_metafile( Display *display, Window win, Atom prop, Atom target, HANDLE handle ) -{ - METAFILEPICT *src, *dst; - unsigned int size; - - src = GlobalLock( handle ); - size = GetMetaFileBitsEx(src->hMF, 0, NULL); - - dst = HeapAlloc( GetProcessHeap(), 0, size + sizeof(*dst) ); - if (dst) - { - *dst = *src; - GetMetaFileBitsEx( src->hMF, size, dst + 1 ); - } - GlobalUnlock( handle ); - put_property( display, win, prop, target, 8, dst, size + sizeof(*dst) ); - HeapFree( GetProcessHeap(), 0, dst ); - return TRUE; -} - - /************************************************************************** * export_enhmetafile * diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index ae0bc9c7871..f50b7987103 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -465,7 +465,6 @@ enum x11drv_atoms XATOM_WCF_ENHMETAFILE, XATOM_WCF_HDROP, XATOM_WCF_LOCALE, - XATOM_WCF_METAFILEPICT, XATOM_WCF_OEMTEXT, XATOM_WCF_PALETTE, XATOM_WCF_PENDATA, diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index 439136056f9..e67b4c47df9 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -176,7 +176,6 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] = "WCF_ENHMETAFILE", "WCF_HDROP", "WCF_LOCALE", - "WCF_METAFILEPICT", "WCF_OEMTEXT", "WCF_PALETTE", "WCF_PENDATA",