Commit 53b74b0d authored by Kevin Koltzau's avatar Kevin Koltzau Committed by Alexandre Julliard

riched20: Call GetClipboardData callback on cut/copy.

parent 33af76f9
......@@ -1767,11 +1767,14 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
case WM_CUT:
case WM_COPY:
{
LPDATAOBJECT dataObj;
LPDATAOBJECT dataObj = NULL;
CHARRANGE range;
HRESULT hr;
HRESULT hr = S_OK;
ME_GetSelection(editor, (int*)&range.cpMin, (int*)&range.cpMax);
hr = ME_GetDataObject(editor, &range, &dataObj);
if(editor->lpOleCallback)
hr = IRichEditOleCallback_GetClipboardData(editor->lpOleCallback, &range, RECO_COPY, &dataObj);
if(FAILED(hr) || !dataObj)
hr = ME_GetDataObject(editor, &range, &dataObj);
if(SUCCEEDED(hr)) {
hr = OleSetClipboard(dataObj);
IDataObject_Release(dataObj);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment