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
4769950d
Commit
4769950d
authored
Nov 09, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 09, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added QueryStatus(IDM_JUSTIFY*) implementation.
parent
c64326e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
9 deletions
+38
-9
olecmd.c
dlls/mshtml/olecmd.c
+35
-9
htmldoc.c
dlls/mshtml/tests/htmldoc.c
+3
-0
No files found.
dlls/mshtml/olecmd.c
View file @
4769950d
...
...
@@ -49,6 +49,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#define NSSTATE_ATTRIBUTE "state_attribute"
#define NSSTATE_ALL "state_all"
#define NSALIGN_CENTER "center"
#define NSALIGN_LEFT "left"
#define NSALIGN_RIGHT "right"
/**********************************************************
* IOleCommandTarget implementation
*/
...
...
@@ -321,11 +325,33 @@ static DWORD query_edit_status(HTMLDocument *This, const char *nscmd)
get_ns_command_state
(
This
->
nscontainer
,
nscmd
,
nsparam
);
nsICommandParams_GetBooleanValue
(
nsparam
,
NSSTATE_ALL
,
&
b
);
nsICommandParams_Release
(
nsparam
);
}
return
OLECMDF_SUPPORTED
|
OLECMDF_ENABLED
|
(
b
?
OLECMDF_LATCHED
:
0
);
}
static
DWORD
query_align_status
(
HTMLDocument
*
This
,
const
char
*
align_str
)
{
nsICommandParams
*
nsparam
;
char
*
align
=
NULL
;
if
(
This
->
usermode
!=
EDITMODE
||
This
->
readystate
<
READYSTATE_INTERACTIVE
)
return
OLECMDF_SUPPORTED
;
if
(
This
->
nscontainer
)
{
nsparam
=
create_nscommand_params
();
get_ns_command_state
(
This
->
nscontainer
,
NSCMD_ALIGN
,
nsparam
);
nsICommandParams_GetCStringValue
(
nsparam
,
NSSTATE_ATTRIBUTE
,
&
align
);
nsICommandParams_Release
(
nsparam
);
}
return
OLECMDF_SUPPORTED
|
OLECMDF_ENABLED
|
(
align
&&
!
strcmp
(
align_str
,
align
)
?
OLECMDF_LATCHED
:
0
);
}
static
void
set_ns_align
(
HTMLDocument
*
This
,
const
char
*
align_str
)
{
nsICommandParams
*
nsparam
;
...
...
@@ -460,21 +486,21 @@ static HRESULT exec_italic(HTMLDocument *This)
static
HRESULT
exec_justifycenter
(
HTMLDocument
*
This
)
{
TRACE
(
"(%p)
\n
"
,
This
);
set_ns_align
(
This
,
"center"
);
set_ns_align
(
This
,
NSALIGN_CENTER
);
return
S_OK
;
}
static
HRESULT
exec_justifyleft
(
HTMLDocument
*
This
)
{
TRACE
(
"(%p)
\n
"
,
This
);
set_ns_align
(
This
,
"left"
);
set_ns_align
(
This
,
NSALIGN_LEFT
);
return
S_OK
;
}
static
HRESULT
exec_justifyright
(
HTMLDocument
*
This
)
{
TRACE
(
"(%p)
\n
"
,
This
);
set_ns_align
(
This
,
"right"
);
set_ns_align
(
This
,
NSALIGN_RIGHT
);
return
S_OK
;
}
...
...
@@ -737,16 +763,16 @@ static HRESULT WINAPI OleCommandTarget_QueryStatus(IOleCommandTarget *iface, con
prgCmds
[
i
].
cmdf
=
query_edit_status
(
This
,
NSCMD_ITALIC
);
break
;
case
IDM_JUSTIFYCENTER
:
FIXM
E
(
"CGID_MSHTML: IDM_JUSTIFYCENTER
\n
"
);
prgCmds
[
i
].
cmdf
=
OLECMDF_SUPPORTED
|
OLECMDF_ENABLED
;
TRAC
E
(
"CGID_MSHTML: IDM_JUSTIFYCENTER
\n
"
);
prgCmds
[
i
].
cmdf
=
query_align_status
(
This
,
NSALIGN_CENTER
)
;
break
;
case
IDM_JUSTIFYLEFT
:
FIXM
E
(
"CGID_MSHTML: IDM_JUSTIFYLEFT
\n
"
);
prgCmds
[
i
].
cmdf
=
OLECMDF_SUPPORTED
|
OLECMDF_ENABLED
;
TRAC
E
(
"CGID_MSHTML: IDM_JUSTIFYLEFT
\n
"
);
prgCmds
[
i
].
cmdf
=
query_align_status
(
This
,
NSALIGN_LEFT
)
;
break
;
case
IDM_JUSTIFYRIGHT
:
FIXM
E
(
"CGID_MSHTML: IDM_JUSTIFYRIGHT
\n
"
);
prgCmds
[
i
].
cmdf
=
OLECMDF_SUPPORTED
|
OLECMDF_ENABLED
;
TRAC
E
(
"CGID_MSHTML: IDM_JUSTIFYRIGHT
\n
"
);
prgCmds
[
i
].
cmdf
=
query_align_status
(
This
,
NSALIGN_RIGHT
)
;
break
;
case
IDM_UNDERLINE
:
TRACE
(
"CGID_MSHTML: IDM_UNDERLINE
\n
"
);
...
...
dlls/mshtml/tests/htmldoc.c
View file @
4769950d
...
...
@@ -2043,6 +2043,9 @@ static void test_MSHTML_QueryStatus(IUnknown *unk, DWORD cmdf)
test_QueryStatus
(
unk
,
&
CGID_MSHTML
,
IDM_FONTSIZE
,
cmdf
);
test_QueryStatus
(
unk
,
&
CGID_MSHTML
,
IDM_BOLD
,
cmdf
);
test_QueryStatus
(
unk
,
&
CGID_MSHTML
,
IDM_FORECOLOR
,
cmdf
);
test_QueryStatus
(
unk
,
&
CGID_MSHTML
,
IDM_JUSTIFYCENTER
,
cmdf
);
test_QueryStatus
(
unk
,
&
CGID_MSHTML
,
IDM_JUSTIFYLEFT
,
cmdf
);
test_QueryStatus
(
unk
,
&
CGID_MSHTML
,
IDM_JUSTIFYRIGHT
,
cmdf
);
test_QueryStatus
(
unk
,
&
CGID_MSHTML
,
IDM_ITALIC
,
cmdf
);
test_QueryStatus
(
unk
,
&
CGID_MSHTML
,
IDM_UNDERLINE
,
cmdf
);
}
...
...
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