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
eb8b3417
Commit
eb8b3417
authored
Jun 10, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 11, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Move remaining commands to tables.
parent
d42c2528
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
130 deletions
+97
-130
editor.c
dlls/mshtml/editor.c
+88
-0
olecmd.c
dlls/mshtml/olecmd.c
+9
-130
No files found.
dlls/mshtml/editor.c
View file @
eb8b3417
...
...
@@ -41,7 +41,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#define NSCMD_BOLD "cmd_bold"
#define NSCMD_FONTCOLOR "cmd_fontColor"
#define NSCMD_FONTFACE "cmd_fontFace"
#define NSCMD_INDENT "cmd_indent"
#define NSCMD_INSERTHR "cmd_insertHR"
#define NSCMD_ITALIC "cmd_italic"
#define NSCMD_OL "cmd_ol"
#define NSCMD_OUTDENT "cmd_outdent"
#define NSCMD_UL "cmd_ul"
#define NSCMD_UNDERLINE "cmd_underline"
#define NSSTATE_ATTRIBUTE "state_attribute"
...
...
@@ -722,6 +727,83 @@ static HRESULT exec_underline(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
return
S_OK
;
}
static
HRESULT
exec_horizontalline
(
HTMLDocument
*
This
,
DWORD
cmdexecopt
,
VARIANT
*
in
,
VARIANT
*
out
)
{
TRACE
(
"(%p)
\n
"
,
This
);
if
(
in
||
out
)
FIXME
(
"unsupported args
\n
"
);
if
(
This
->
nscontainer
)
do_ns_command
(
This
->
nscontainer
,
NSCMD_INSERTHR
,
NULL
);
return
S_OK
;
}
static
HRESULT
exec_orderlist
(
HTMLDocument
*
This
,
DWORD
cmdexecopt
,
VARIANT
*
in
,
VARIANT
*
out
)
{
TRACE
(
"(%p)
\n
"
,
This
);
if
(
in
||
out
)
FIXME
(
"unsupported args
\n
"
);
if
(
This
->
nscontainer
)
do_ns_command
(
This
->
nscontainer
,
NSCMD_OL
,
NULL
);
return
S_OK
;
}
static
HRESULT
exec_unorderlist
(
HTMLDocument
*
This
,
DWORD
cmdexecopt
,
VARIANT
*
in
,
VARIANT
*
out
)
{
TRACE
(
"(%p)
\n
"
,
This
);
if
(
in
||
out
)
FIXME
(
"unsupported args
\n
"
);
if
(
This
->
nscontainer
)
do_ns_command
(
This
->
nscontainer
,
NSCMD_UL
,
NULL
);
return
S_OK
;
}
static
HRESULT
exec_indent
(
HTMLDocument
*
This
,
DWORD
cmdexecopt
,
VARIANT
*
in
,
VARIANT
*
out
)
{
TRACE
(
"(%p)
\n
"
,
This
);
if
(
in
||
out
)
FIXME
(
"unsupported args
\n
"
);
if
(
This
->
nscontainer
)
do_ns_command
(
This
->
nscontainer
,
NSCMD_INDENT
,
NULL
);
return
S_OK
;
}
static
HRESULT
exec_outdent
(
HTMLDocument
*
This
,
DWORD
cmdexecopt
,
VARIANT
*
in
,
VARIANT
*
out
)
{
TRACE
(
"(%p)
\n
"
,
This
);
if
(
in
||
out
)
FIXME
(
"unsupported args
\n
"
);
if
(
This
->
nscontainer
)
do_ns_command
(
This
->
nscontainer
,
NSCMD_OUTDENT
,
NULL
);
return
S_OK
;
}
static
HRESULT
exec_composesettings
(
HTMLDocument
*
This
,
DWORD
cmdexecopt
,
VARIANT
*
in
,
VARIANT
*
out
)
{
if
(
out
||
!
in
||
V_VT
(
in
)
!=
VT_BSTR
)
{
WARN
(
"invalid arg
\n
"
);
return
E_INVALIDARG
;
}
FIXME
(
"%s
\n
"
,
debugstr_w
(
V_BSTR
(
in
)));
return
S_OK
;
}
const
cmdtable_t
editmode_cmds
[]
=
{
{
IDM_FONTNAME
,
NULL
,
exec_fontname
},
{
IDM_FONTSIZE
,
NULL
,
exec_fontsize
},
...
...
@@ -732,5 +814,11 @@ const cmdtable_t editmode_cmds[] = {
{
IDM_JUSTIFYRIGHT
,
NULL
,
exec_justifyright
},
{
IDM_JUSTIFYLEFT
,
NULL
,
exec_justifyleft
},
{
IDM_UNDERLINE
,
NULL
,
exec_underline
},
{
IDM_HORIZONTALLINE
,
NULL
,
exec_horizontalline
},
{
IDM_ORDERLIST
,
NULL
,
exec_orderlist
},
{
IDM_UNORDERLIST
,
NULL
,
exec_unorderlist
},
{
IDM_INDENT
,
NULL
,
exec_indent
},
{
IDM_OUTDENT
,
NULL
,
exec_outdent
},
{
IDM_COMPOSESETTINGS
,
NULL
,
exec_composesettings
},
{
0
,
NULL
,
NULL
}
};
dlls/mshtml/olecmd.c
View file @
eb8b3417
...
...
@@ -461,36 +461,6 @@ static HRESULT exec_get_print_template(HTMLDocument *This, DWORD nCmdexecopt, VA
return
E_NOTIMPL
;
}
static
void
do_ns_command
(
NSContainer
*
This
,
const
char
*
cmd
,
nsICommandParams
*
nsparam
)
{
nsICommandManager
*
cmdmgr
;
nsIInterfaceRequestor
*
iface_req
;
nsresult
nsres
;
TRACE
(
"(%p)
\n
"
,
This
);
nsres
=
nsIWebBrowser_QueryInterface
(
This
->
webbrowser
,
&
IID_nsIInterfaceRequestor
,
(
void
**
)
&
iface_req
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIInterfaceRequestor: %08x
\n
"
,
nsres
);
return
;
}
nsres
=
nsIInterfaceRequestor_GetInterface
(
iface_req
,
&
IID_nsICommandManager
,
(
void
**
)
&
cmdmgr
);
nsIInterfaceRequestor_Release
(
iface_req
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsICommandManager: %08x
\n
"
,
nsres
);
return
;
}
nsres
=
nsICommandManager_DoCommand
(
cmdmgr
,
cmd
,
nsparam
,
NULL
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"DoCommand(%s) failed: %08x
\n
"
,
debugstr_a
(
cmd
),
nsres
);
nsICommandManager_Release
(
cmdmgr
);
}
static
nsresult
get_ns_command_state
(
NSContainer
*
This
,
const
char
*
cmd
,
nsICommandParams
*
nsparam
)
{
nsICommandManager
*
cmdmgr
;
...
...
@@ -681,84 +651,22 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
return
IPersistMoniker_Load
(
PERSISTMON
(
This
),
TRUE
,
mon
,
NULL
,
0
);
}
static
HRESULT
exec_baselinefont3
(
HTMLDocument
*
This
)
{
FIXME
(
"(%p)
\n
"
,
This
);
return
S_OK
;
}
static
HRESULT
exec_horizontalline
(
HTMLDocument
*
This
)
{
TRACE
(
"(%p)
\n
"
,
This
);
if
(
This
->
nscontainer
)
do_ns_command
(
This
->
nscontainer
,
NSCMD_INSERTHR
,
NULL
);
return
S_OK
;
}
static
HRESULT
exec_orderlist
(
HTMLDocument
*
This
)
{
TRACE
(
"(%p)
\n
"
,
This
);
if
(
This
->
nscontainer
)
do_ns_command
(
This
->
nscontainer
,
NSCMD_OL
,
NULL
);
return
S_OK
;
}
static
HRESULT
exec_unorderlist
(
HTMLDocument
*
This
)
{
TRACE
(
"(%p)
\n
"
,
This
);
if
(
This
->
nscontainer
)
do_ns_command
(
This
->
nscontainer
,
NSCMD_UL
,
NULL
);
return
S_OK
;
}
static
HRESULT
exec_indent
(
HTMLDocument
*
This
)
{
TRACE
(
"(%p)
\n
"
,
This
);
if
(
This
->
nscontainer
)
do_ns_command
(
This
->
nscontainer
,
NSCMD_INDENT
,
NULL
);
return
S_OK
;
}
static
HRESULT
exec_outdent
(
HTMLDocument
*
This
)
{
TRACE
(
"(%p)
\n
"
,
This
);
if
(
This
->
nscontainer
)
do_ns_command
(
This
->
nscontainer
,
NSCMD_OUTDENT
,
NULL
);
return
S_OK
;
}
static
HRESULT
exec_htmleditmode
(
HTMLDocument
*
This
,
DWORD
cmdexecopt
,
VARIANT
*
in
,
VARIANT
*
out
)
{
FIXME
(
"(%p)->(%08x %p %p)
\n
"
,
This
,
cmdexecopt
,
in
,
out
);
return
S_OK
;
}
static
HRESULT
exec_
composesettings
(
HTMLDocument
*
This
,
VARIANT
*
in
)
static
HRESULT
exec_
setdirty
(
HTMLDocument
*
This
,
DWORD
cmdexecopt
,
VARIANT
*
in
,
VARIANT
*
out
)
{
if
(
!
in
||
V_VT
(
in
)
!=
VT_BSTR
)
{
WARN
(
"invalid arg
\n
"
);
return
E_INVALIDARG
;
}
FIXME
(
"%s
\n
"
,
debugstr_w
(
V_BSTR
(
in
)));
return
S_OK
;
FIXME
(
"(%p)->(%08x %p %p)
\n
"
,
This
,
cmdexecopt
,
in
,
out
);
return
E_NOTIMPL
;
}
static
HRESULT
exec_
setdirty
(
HTMLDocument
*
This
,
DWORD
cmdexecopt
,
VARIANT
*
in
,
VARIANT
*
out
)
static
HRESULT
exec_
baselinefont3
(
HTMLDocument
*
This
,
DWORD
cmdexecopt
,
VARIANT
*
in
,
VARIANT
*
out
)
{
FIXME
(
"(%p)->(%08x %p %p)
\n
"
,
This
,
cmdexecopt
,
in
,
out
);
return
E_NOTIMPL
;
return
S_OK
;
}
static
const
struct
{
...
...
@@ -815,6 +723,7 @@ static const cmdtable_t base_cmds[] = {
{
IDM_PRINT
,
NULL
,
exec_print
},
{
IDM_SETDIRTY
,
NULL
,
exec_setdirty
},
{
IDM_HTMLEDITMODE
,
NULL
,
exec_htmleditmode
},
{
IDM_BASELINEFONT3
,
NULL
,
exec_baselinefont3
},
{
0
,
NULL
,
NULL
}
};
...
...
@@ -1023,40 +932,10 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
if
(
hres
==
OLECMDERR_E_NOTSUPPORTED
)
hres
=
exec_from_table
(
This
,
editmode_cmds
,
nCmdID
,
nCmdexecopt
,
pvaIn
,
pvaOut
);
if
(
hres
!=
OLECMDERR_E_NOTSUPPORTED
)
return
hres
;
switch
(
nCmdID
)
{
case
IDM_BASELINEFONT3
:
return
exec_baselinefont3
(
This
);
case
IDM_HORIZONTALLINE
:
if
(
pvaIn
||
pvaOut
)
FIXME
(
"unsupported arguments
\n
"
);
return
exec_horizontalline
(
This
);
case
IDM_ORDERLIST
:
if
(
pvaIn
||
pvaOut
)
FIXME
(
"unsupported arguments
\n
"
);
return
exec_orderlist
(
This
);
case
IDM_UNORDERLIST
:
if
(
pvaIn
||
pvaOut
)
FIXME
(
"unsupported arguments
\n
"
);
return
exec_unorderlist
(
This
);
case
IDM_INDENT
:
if
(
pvaIn
||
pvaOut
)
FIXME
(
"unsupported arguments
\n
"
);
return
exec_indent
(
This
);
case
IDM_OUTDENT
:
if
(
pvaIn
||
pvaOut
)
FIXME
(
"unsupported arguments
\n
"
);
return
exec_outdent
(
This
);
case
IDM_COMPOSESETTINGS
:
if
(
pvaOut
)
FIXME
(
"unsupported arguments
\n
"
);
return
exec_composesettings
(
This
,
pvaIn
);
default:
if
(
hres
==
OLECMDERR_E_NOTSUPPORTED
)
FIXME
(
"unsupported nCmdID %d of CGID_MSHTML group
\n
"
,
nCmdID
);
return
OLECMDERR_E_NOTSUPPORTED
;
}
return
hres
;
}
FIXME
(
"Unsupported pguidCmdGroup %s
\n
"
,
debugstr_guid
(
pguidCmdGroup
));
...
...
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