mirror of
https://github.com/reactos/wine.git
synced 2024-11-23 11:49:50 +00:00
riched20: Add support for pasting EMFs.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bbf34a4ab1
commit
adf53a9cdb
@ -2241,6 +2241,23 @@ static HRESULT paste_text(ME_TextEditor *editor, FORMATETC *fmt, STGMEDIUM *med)
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT paste_emf(ME_TextEditor *editor, FORMATETC *fmt, STGMEDIUM *med)
|
||||
{
|
||||
HRESULT hr;
|
||||
SIZEL sz = {0, 0};
|
||||
|
||||
hr = insert_static_object( editor, med->u.hEnhMetaFile, NULL, &sz );
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
ME_CommitUndo( editor );
|
||||
ME_UpdateRepaint( editor, FALSE );
|
||||
}
|
||||
else
|
||||
ReleaseStgMedium( med );
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static struct paste_format
|
||||
{
|
||||
FORMATETC fmt;
|
||||
@ -2250,6 +2267,7 @@ static struct paste_format
|
||||
{
|
||||
{{ -1, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }, paste_rtf, rtfW },
|
||||
{{ CF_UNICODETEXT, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }, paste_text },
|
||||
{{ CF_ENHMETAFILE, NULL, DVASPECT_CONTENT, -1, TYMED_ENHMF }, paste_emf },
|
||||
{{ 0 }}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user