Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
935e7f05
Commit
935e7f05
authored
Dec 10, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added support for IDM_PASTE command in browser mode.
parent
6b463d85
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
2 deletions
+60
-2
nsiface.idl
dlls/mshtml/nsiface.idl
+23
-0
olecmd.c
dlls/mshtml/olecmd.c
+37
-2
No files found.
dlls/mshtml/nsiface.idl
View file @
935e7f05
...
...
@@ -3548,6 +3548,29 @@ interface nsIHTMLEditor : nsISupports
[
object
,
uuid
(
b8100c90
-
73b
e
-
11
d2
-
92
a5
-
00105
a1b0d64
),
local
]
interface
nsIClipboardCommands
:
nsISupports
{
nsresult
CanCutSelection
(
bool
*
_retval
)
;
nsresult
CanCopySelection
(
bool
*
_retval
)
;
nsresult
CanCopyLinkLocation
(
bool
*
_retval
)
;
nsresult
CanCopyImageLocation
(
bool
*
_retval
)
;
nsresult
CanCopyImageContents
(
bool
*
_retval
)
;
nsresult
CanPaste
(
bool
*
_retval
)
;
nsresult
CutSelection
()
;
nsresult
CopySelection
()
;
nsresult
CopyLinkLocation
()
;
nsresult
CopyImageLocation
()
;
nsresult
CopyImageContents
()
;
nsresult
Paste
()
;
nsresult
SelectAll
()
;
nsresult
SelectNone
()
;
}
[
object
,
uuid
(
edb99640
-
8378
-
4106
-
8673
-
e701a086eb1c
),
local
]
...
...
dlls/mshtml/olecmd.c
View file @
935e7f05
...
...
@@ -62,6 +62,28 @@ void do_ns_command(HTMLDocument *This, const char *cmd, nsICommandParams *nspara
nsICommandManager_Release
(
cmdmgr
);
}
static
nsIClipboardCommands
*
get_clipboard_commands
(
HTMLDocument
*
doc
)
{
nsIClipboardCommands
*
clipboard_commands
;
nsIDocShell
*
doc_shell
;
nsresult
nsres
;
nsres
=
get_nsinterface
((
nsISupports
*
)
doc
->
window
->
nswindow
,
&
IID_nsIDocShell
,
(
void
**
)
&
doc_shell
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDocShell interface
\n
"
);
return
NULL
;
}
nsres
=
nsIDocShell_QueryInterface
(
doc_shell
,
&
IID_nsIClipboardCommands
,
(
void
**
)
&
clipboard_commands
);
nsIDocShell_Release
(
doc_shell
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIClipboardCommands interface
\n
"
);
return
NULL
;
}
return
clipboard_commands
;
}
/**********************************************************
* IOleCommandTarget implementation
*/
...
...
@@ -569,13 +591,26 @@ static HRESULT query_mshtml_paste(HTMLDocument *This, OLECMD *cmd)
static
HRESULT
exec_mshtml_paste
(
HTMLDocument
*
This
,
DWORD
cmdexecopt
,
VARIANT
*
in
,
VARIANT
*
out
)
{
nsIClipboardCommands
*
clipboard_commands
;
nsresult
nsres
;
TRACE
(
"(%p)->(%08x %p %p)
\n
"
,
This
,
cmdexecopt
,
in
,
out
);
if
(
This
->
doc_obj
->
usermode
==
EDITMODE
)
return
editor_exec_paste
(
This
,
cmdexecopt
,
in
,
out
);
FIXME
(
"Unimplemented in browse mode
\n
"
);
return
E_NOTIMPL
;
clipboard_commands
=
get_clipboard_commands
(
This
);
if
(
!
clipboard_commands
)
return
E_UNEXPECTED
;
nsres
=
nsIClipboardCommands_Paste
(
clipboard_commands
);
nsIClipboardCommands_Release
(
clipboard_commands
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Paste failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
exec_browsemode
(
HTMLDocument
*
This
,
DWORD
cmdexecopt
,
VARIANT
*
in
,
VARIANT
*
out
)
...
...
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