Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
46fef3da
Commit
46fef3da
authored
Aug 21, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Aug 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Use the implementation of EM_PASTESPECIAL for WM_PASTE.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9bec53fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
30 deletions
+4
-30
editor.c
dlls/riched20/editor.c
+4
-30
No files found.
dlls/riched20/editor.c
View file @
46fef3da
...
...
@@ -2309,33 +2309,6 @@ done:
return
hr
==
S_OK
;
}
static
BOOL
ME_Paste
(
ME_TextEditor
*
editor
)
{
DWORD
dwFormat
=
0
;
EDITSTREAM
es
;
ME_GlobalDestStruct
gds
;
UINT
nRTFFormat
=
RegisterClipboardFormatA
(
"Rich Text Format"
);
UINT
cf
=
0
;
if
(
IsClipboardFormatAvailable
(
nRTFFormat
))
cf
=
nRTFFormat
,
dwFormat
=
SF_RTF
;
else
if
(
IsClipboardFormatAvailable
(
CF_UNICODETEXT
))
cf
=
CF_UNICODETEXT
,
dwFormat
=
SF_TEXT
|
SF_UNICODE
;
else
return
FALSE
;
if
(
!
OpenClipboard
(
editor
->
hWnd
))
return
FALSE
;
gds
.
hData
=
GetClipboardData
(
cf
);
gds
.
nLength
=
0
;
es
.
dwCookie
=
(
DWORD_PTR
)
&
gds
;
es
.
pfnCallback
=
dwFormat
==
SF_RTF
?
ME_ReadFromHGLOBALRTF
:
ME_ReadFromHGLOBALUnicode
;
ME_StreamIn
(
editor
,
dwFormat
|
SFF_SELECTION
,
&
es
,
FALSE
);
CloseClipboard
();
return
TRUE
;
}
static
BOOL
ME_Copy
(
ME_TextEditor
*
editor
,
const
ME_Cursor
*
start
,
int
nChars
)
{
LPDATAOBJECT
dataObj
=
NULL
;
...
...
@@ -2649,7 +2622,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
break
;
case
'V'
:
if
(
ctrl_is_down
)
return
ME_Paste
(
editor
);
return
paste_special
(
editor
,
0
,
NULL
,
FALSE
);
break
;
case
'C'
:
case
'X'
:
...
...
@@ -4076,8 +4049,9 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
}
case
WM_PASTE
:
case
WM_MBUTTONDOWN
:
ME_Paste
(
editor
);
return
0
;
wParam
=
0
;
lParam
=
0
;
/* fall through */
case
EM_PASTESPECIAL
:
paste_special
(
editor
,
wParam
,
(
REPASTESPECIAL
*
)
lParam
,
FALSE
);
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment