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
52accda0
Commit
52accda0
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: Set default fontname to 'Times New Roman'.
parent
80b65d3e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
5 deletions
+28
-5
editor.c
dlls/mshtml/editor.c
+24
-5
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
task.c
dlls/mshtml/task.c
+3
-0
No files found.
dlls/mshtml/editor.c
View file @
52accda0
...
...
@@ -572,6 +572,15 @@ void handle_edit_event(HTMLDocument *This, nsIDOMEvent *event)
nsIDOMKeyEvent_Release
(
key_event
);
}
static
void
set_ns_fontname
(
NSContainer
*
This
,
const
char
*
fontname
)
{
nsICommandParams
*
nsparam
=
create_nscommand_params
();
nsICommandParams_SetCStringValue
(
nsparam
,
NSSTATE_ATTRIBUTE
,
fontname
);
do_ns_command
(
This
,
NSCMD_FONTFACE
,
nsparam
);
nsICommandParams_Release
(
nsparam
);
}
static
HRESULT
exec_fontname
(
HTMLDocument
*
This
,
DWORD
cmdexecopt
,
VARIANT
*
in
,
VARIANT
*
out
)
{
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
in
,
out
);
...
...
@@ -580,7 +589,6 @@ static HRESULT exec_fontname(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
return
E_FAIL
;
if
(
in
)
{
nsICommandParams
*
nsparam
=
create_nscommand_params
();
char
*
stra
;
DWORD
len
;
...
...
@@ -589,15 +597,17 @@ static HRESULT exec_fontname(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
return
E_INVALIDARG
;
}
TRACE
(
"%s
\n
"
,
debugstr_w
(
V_BSTR
(
in
)));
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
V_BSTR
(
in
),
-
1
,
NULL
,
0
,
NULL
,
NULL
);
stra
=
mshtml_alloc
(
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
V_BSTR
(
in
),
-
1
,
stra
,
-
1
,
NULL
,
NULL
);
nsICommandParams_SetCStringValue
(
nsparam
,
NSSTATE_ATTRIBUTE
,
stra
);
mshtml_free
(
stra
);
do_ns_command
(
This
->
nscontainer
,
NSCMD_FONTFACE
,
nsparam
);
set_ns_fontname
(
This
->
nscontainer
,
stra
);
nsICommandParams_Release
(
nsparam
);
mshtml_free
(
stra
);
update_doc
(
This
,
UPDATE_UI
);
}
if
(
out
)
{
...
...
@@ -621,6 +631,7 @@ static HRESULT exec_fontname(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
MultiByteToWideChar
(
CP_ACP
,
0
,
stra
,
-
1
,
strw
,
-
1
);
nsfree
(
stra
);
V_VT
(
out
)
=
VT_BSTR
;
V_BSTR
(
out
)
=
SysAllocString
(
strw
);
mshtml_free
(
strw
);
}
...
...
@@ -937,3 +948,11 @@ const cmdtable_t editmode_cmds[] = {
{
IDM_COMPOSESETTINGS
,
NULL
,
exec_composesettings
},
{
0
,
NULL
,
NULL
}
};
void
init_editor
(
HTMLDocument
*
This
)
{
if
(
!
This
->
nscontainer
)
return
;
set_ns_fontname
(
This
->
nscontainer
,
"Times New Roman"
);
}
dlls/mshtml/mshtml_private.h
View file @
52accda0
...
...
@@ -391,6 +391,7 @@ void update_doc(HTMLDocument *This, DWORD flags);
void
update_title
(
HTMLDocument
*
);
/* editor */
void
init_editor
(
HTMLDocument
*
);
void
set_ns_editmode
(
NSContainer
*
);
void
handle_edit_event
(
HTMLDocument
*
,
nsIDOMEvent
*
);
...
...
dlls/mshtml/task.c
View file @
52accda0
...
...
@@ -132,6 +132,9 @@ static void set_parsecomplete(HTMLDocument *doc)
TRACE
(
"(%p)
\n
"
,
doc
);
if
(
doc
->
usermode
==
EDITMODE
)
init_editor
(
doc
);
call_property_onchanged
(
doc
->
cp_propnotif
,
1005
);
doc
->
readystate
=
READYSTATE_INTERACTIVE
;
...
...
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