Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
6b591ef2
Commit
6b591ef2
authored
Jan 01, 2008
by
Eric Pouech
Committed by
Alexandre Julliard
Jan 02, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Extend the usage of underlinetype from charformat2 in richedit.
parent
13f86afe
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
10 deletions
+61
-10
editor.c
dlls/riched20/editor.c
+18
-6
para.c
dlls/riched20/para.c
+2
-2
run.c
dlls/riched20/run.c
+4
-2
style.c
dlls/riched20/style.c
+37
-0
No files found.
dlls/riched20/editor.c
View file @
6b591ef2
...
...
@@ -332,10 +332,11 @@ static void ME_RTFCharAttrHook(RTF_Info *info)
{
case
rtfPlain
:
/* FIXME add more flags once they're implemented */
fmt
.
dwMask
=
CFM_BOLD
|
CFM_ITALIC
|
CFM_UNDERLINE
|
CFM_STRIKEOUT
|
CFM_COLOR
|
CFM_BACKCOLOR
|
CFM_SIZE
|
CFM_WEIGHT
;
fmt
.
dwMask
=
CFM_BOLD
|
CFM_ITALIC
|
CFM_UNDERLINE
TYPE
|
CFM_STRIKEOUT
|
CFM_COLOR
|
CFM_BACKCOLOR
|
CFM_SIZE
|
CFM_WEIGHT
;
fmt
.
dwEffects
=
CFE_AUTOCOLOR
|
CFE_AUTOBACKCOLOR
;
fmt
.
yHeight
=
12
*
20
;
/* 12pt */
fmt
.
wWeight
=
400
;
fmt
.
bUnderlineType
=
CFU_UNDERLINENONE
;
break
;
case
rtfBold
:
fmt
.
dwMask
=
CFM_BOLD
;
...
...
@@ -346,13 +347,24 @@ static void ME_RTFCharAttrHook(RTF_Info *info)
fmt
.
dwEffects
=
info
->
rtfParam
?
fmt
.
dwMask
:
0
;
break
;
case
rtfUnderline
:
fmt
.
dwMask
=
CFM_UNDERLINE
;
fmt
.
dwEffects
=
info
->
rtfParam
?
fmt
.
dwMask
:
0
;
fmt
.
bUnderlineType
=
CFU_CF1UNDERLINE
;
fmt
.
dwMask
=
CFM_UNDERLINETYPE
;
fmt
.
bUnderlineType
=
info
->
rtfParam
?
CFU_CF1UNDERLINE
:
CFU_UNDERLINENONE
;
break
;
case
rtfDotUnderline
:
fmt
.
dwMask
=
CFM_UNDERLINETYPE
;
fmt
.
bUnderlineType
=
info
->
rtfParam
?
CFU_UNDERLINEDOTTED
:
CFU_UNDERLINENONE
;
break
;
case
rtfDbUnderline
:
fmt
.
dwMask
=
CFM_UNDERLINETYPE
;
fmt
.
bUnderlineType
=
info
->
rtfParam
?
CFU_UNDERLINEDOUBLE
:
CFU_UNDERLINENONE
;
break
;
case
rtfWordUnderline
:
fmt
.
dwMask
=
CFM_UNDERLINETYPE
;
fmt
.
bUnderlineType
=
info
->
rtfParam
?
CFU_UNDERLINEWORD
:
CFU_UNDERLINENONE
;
break
;
case
rtfNoUnderline
:
fmt
.
dwMask
=
CFM_UNDERLINE
;
fmt
.
dwEffects
=
0
;
fmt
.
dwMask
=
CFM_UNDERLINE
TYPE
;
fmt
.
bUnderlineType
=
CFU_UNDERLINENONE
;
break
;
case
rtfStrikeThru
:
fmt
.
dwMask
=
CFM_STRIKEOUT
;
...
...
dlls/riched20/para.c
View file @
6b591ef2
...
...
@@ -44,7 +44,7 @@ void ME_MakeFirstParagraph(HDC hDC, ME_TextBuffer *text)
cf
.
dwMask
|=
CFM_ALLCAPS
|
CFM_BOLD
|
CFM_DISABLED
|
CFM_EMBOSS
|
CFM_HIDDEN
;
cf
.
dwMask
|=
CFM_IMPRINT
|
CFM_ITALIC
|
CFM_LINK
|
CFM_OUTLINE
|
CFM_PROTECTED
;
cf
.
dwMask
|=
CFM_REVISED
|
CFM_SHADOW
|
CFM_SMALLCAPS
|
CFM_STRIKEOUT
;
cf
.
dwMask
|=
CFM_SUBSCRIPT
|
CFM_UNDERLINE
|
CFM_WEIGHT
;
cf
.
dwMask
|=
CFM_SUBSCRIPT
|
CFM_UNDERLINE
TYPE
|
CFM_WEIGHT
;
cf
.
dwEffects
=
CFE_AUTOCOLOR
|
CFE_AUTOBACKCOLOR
;
lstrcpyW
(
cf
.
szFaceName
,
lf
.
lfFaceName
);
...
...
@@ -53,7 +53,7 @@ void ME_MakeFirstParagraph(HDC hDC, ME_TextBuffer *text)
cf
.
dwEffects
|=
CFE_BOLD
;
cf
.
wWeight
=
lf
.
lfWeight
;
if
(
lf
.
lfItalic
)
cf
.
dwEffects
|=
CFE_ITALIC
;
if
(
lf
.
lfUnderline
)
cf
.
dwEffects
|=
CFE_UNDERLI
NE
;
cf
.
bUnderlineType
=
(
lf
.
lfUnderline
)
?
CFU_CF1UNDERLINE
:
CFU_UNDERLINENO
NE
;
if
(
lf
.
lfStrikeOut
)
cf
.
dwEffects
|=
CFE_STRIKEOUT
;
cf
.
bPitchAndFamily
=
lf
.
lfPitchAndFamily
;
cf
.
bCharSet
=
lf
.
lfCharSet
;
...
...
dlls/riched20/run.c
View file @
6b591ef2
...
...
@@ -938,8 +938,8 @@ void ME_GetCharFormat(ME_TextEditor *editor, int nFrom, int nTo, CHARFORMAT2W *p
do
{
/* FIXME add more style feature comparisons */
int
nAttribs
=
CFM_SIZE
|
CFM_FACE
|
CFM_COLOR
;
int
nEffects
=
CFM_BOLD
|
CFM_ITALIC
|
CFM_UNDERLINE
;
int
nAttribs
=
CFM_SIZE
|
CFM_FACE
|
CFM_COLOR
|
CFM_UNDERLINETYPE
;
int
nEffects
=
CFM_BOLD
|
CFM_ITALIC
;
run
=
ME_FindItemFwd
(
run
,
diRun
);
...
...
@@ -962,6 +962,8 @@ void ME_GetCharFormat(ME_TextEditor *editor, int nFrom, int nTo, CHARFORMAT2W *p
}
if
(
pFmt
->
yHeight
!=
tmp
.
yHeight
)
pFmt
->
dwMask
&=
~
CFM_SIZE
;
if
(
pFmt
->
bUnderlineType
!=
tmp
.
bUnderlineType
)
pFmt
->
dwMask
&=
~
CFM_UNDERLINETYPE
;
if
(
pFmt
->
dwMask
&
CFM_COLOR
)
{
if
(
!
((
pFmt
->
dwEffects
&
CFE_AUTOCOLOR
)
&
(
tmp
.
dwEffects
&
CFE_AUTOCOLOR
)))
...
...
dlls/riched20/style.c
View file @
6b591ef2
...
...
@@ -85,6 +85,20 @@ CHARFORMAT2W *ME_ToCFAny(CHARFORMAT2W *to, CHARFORMAT2W *from)
CHARFORMATA
*
t
=
(
CHARFORMATA
*
)
to
;
CopyMemory
(
t
,
from
,
FIELD_OFFSET
(
CHARFORMATA
,
szFaceName
));
WideCharToMultiByte
(
0
,
0
,
from
->
szFaceName
,
-
1
,
t
->
szFaceName
,
sizeof
(
t
->
szFaceName
),
0
,
0
);
if
(
from
->
dwMask
&
CFM_UNDERLINETYPE
)
{
switch
(
from
->
bUnderlineType
)
{
case
CFU_CF1UNDERLINE
:
to
->
dwMask
|=
CFM_UNDERLINE
;
to
->
dwEffects
|=
CFE_UNDERLINE
;
break
;
case
CFU_UNDERLINENONE
:
to
->
dwMask
|=
CFM_UNDERLINE
;
to
->
dwEffects
&=
~
CFE_UNDERLINE
;
break
;
}
}
t
->
cbSize
=
sizeof
(
*
t
);
/* it was overwritten by CopyMemory */
return
to
;
}
...
...
@@ -92,6 +106,20 @@ CHARFORMAT2W *ME_ToCFAny(CHARFORMAT2W *to, CHARFORMAT2W *from)
{
CHARFORMATW
*
t
=
(
CHARFORMATW
*
)
to
;
CopyMemory
(
t
,
from
,
sizeof
(
*
t
));
if
(
from
->
dwMask
&
CFM_UNDERLINETYPE
)
{
switch
(
from
->
bUnderlineType
)
{
case
CFU_CF1UNDERLINE
:
to
->
dwMask
|=
CFM_UNDERLINE
;
to
->
dwEffects
|=
CFE_UNDERLINE
;
break
;
case
CFU_UNDERLINENONE
:
to
->
dwMask
|=
CFM_UNDERLINE
;
to
->
dwEffects
&=
~
CFE_UNDERLINE
;
break
;
}
}
t
->
cbSize
=
sizeof
(
*
t
);
/* it was overwritten by CopyMemory */
return
to
;
}
...
...
@@ -187,6 +215,13 @@ ME_Style *ME_ApplyStyle(ME_Style *sSrc, CHARFORMAT2W *style)
else
s
->
fmt
.
dwEffects
&=
~
CFE_AUTOCOLOR
;
}
if
(
style
->
dwMask
&
CFM_UNDERLINE
)
{
s
->
fmt
.
dwMask
|=
CFM_UNDERLINETYPE
;
s
->
fmt
.
dwMask
&=
~
CFM_UNDERLINE
;
s
->
fmt
.
bUnderlineType
=
(
style
->
dwEffects
&
CFM_UNDERLINE
)
?
CFU_CF1UNDERLINE
:
CFU_UNDERLINENONE
;
}
return
s
;
}
...
...
@@ -286,6 +321,8 @@ ME_LogFontFromStyle(HDC hDC, LOGFONTW *lf, const ME_Style *s, int nZoomNumerator
lf
->
lfItalic
=
1
;
if
(
s
->
fmt
.
dwEffects
&
s
->
fmt
.
dwMask
&
(
CFM_UNDERLINE
|
CFE_LINK
))
lf
->
lfUnderline
=
1
;
if
(
s
->
fmt
.
dwMask
&
CFM_UNDERLINETYPE
&&
s
->
fmt
.
bUnderlineType
==
CFU_CF1UNDERLINE
)
lf
->
lfUnderline
=
1
;
if
(
s
->
fmt
.
dwEffects
&
s
->
fmt
.
dwMask
&
CFM_STRIKEOUT
)
lf
->
lfStrikeOut
=
1
;
if
(
s
->
fmt
.
dwEffects
&
s
->
fmt
.
dwMask
&
(
CFM_SUBSCRIPT
|
CFM_SUPERSCRIPT
))
...
...
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