Huw Davies : ole32: OleFlushClipboard should render all formats to the clipboard.
Alexandre Julliard
julliard at winehq.org
Thu Apr 16 14:34:52 CDT 2009
Module: wine
Branch: master
Commit: 18d413bb7488f62e8038693b640f37f2bc5ef5d3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=18d413bb7488f62e8038693b640f37f2bc5ef5d3
Author: Huw Davies <huw at codeweavers.com>
Date: Thu Apr 16 12:34:43 2009 +0100
ole32: OleFlushClipboard should render all formats to the clipboard.
---
dlls/ole32/clipboard.c | 30 +-----------------------------
1 files changed, 1 insertions(+), 29 deletions(-)
diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c
index 7188297..dde09ea 100644
--- a/dlls/ole32/clipboard.c
+++ b/dlls/ole32/clipboard.c
@@ -1709,8 +1709,6 @@ HRESULT WINAPI OleGetClipboard(IDataObject **obj)
*/
HRESULT WINAPI OleFlushClipboard(void)
{
- IEnumFORMATETC* penumFormatetc = NULL;
- FORMATETC rgelt;
HRESULT hr;
ole_clipbrd *clipbrd;
HWND wnd;
@@ -1728,38 +1726,12 @@ HRESULT WINAPI OleFlushClipboard(void)
if (!OpenClipboard(wnd)) return CLIPBRD_E_CANT_OPEN;
- /*
- * Render all HGLOBAL formats supported by the source into
- * the windows clipboard.
- */
- if ( FAILED( hr = IDataObject_EnumFormatEtc( clipbrd->src_data,
- DATADIR_GET,
- &penumFormatetc) ))
- goto end;
-
-
- while ( S_OK == IEnumFORMATETC_Next(penumFormatetc, 1, &rgelt, NULL) )
- {
- if ( rgelt.tymed == TYMED_HGLOBAL )
- {
- CHAR szFmtName[80];
- TRACE("(cfFormat=%d:%s)\n", rgelt.cfFormat,
- GetClipboardFormatNameA(rgelt.cfFormat, szFmtName, sizeof(szFmtName)-1)
- ? szFmtName : "");
-
- if ( FAILED(render_format( clipbrd->src_data, &rgelt )) )
- continue;
- }
- }
-
- IEnumFORMATETC_Release(penumFormatetc);
+ SendMessageW(wnd, WM_RENDERALLFORMATS, 0, 0);
hr = set_dataobject_format(NULL);
set_src_dataobject(clipbrd, NULL);
-end:
-
if ( !CloseClipboard() ) hr = CLIPBRD_E_CANT_CLOSE;
return hr;
More information about the wine-cvs
mailing list