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
00332537
Commit
00332537
authored
Oct 20, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Oct 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Pass run ptrs to the font and colour table writer function.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3e7f8aa2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
17 deletions
+15
-17
writer.c
dlls/riched20/writer.c
+15
-17
No files found.
dlls/riched20/writer.c
View file @
00332537
...
...
@@ -311,33 +311,32 @@ static BOOL find_color_in_colortbl( ME_OutStream *stream, COLORREF color, unsign
return
i
<
stream
->
nFontTblLen
;
}
static
BOOL
ME_StreamOutRTFFontAndColorTbl
(
ME_OutStream
*
pStream
,
ME_DisplayItem
*
pFirstRun
,
ME_DisplayItem
*
pLastRun
)
static
BOOL
stream_out_font_and_colour_tbls
(
ME_OutStream
*
pStream
,
ME_Run
*
first
,
ME_Run
*
last
)
{
ME_
DisplayItem
*
item
=
pFirstRun
;
ME_
Run
*
run
=
first
;
ME_FontTableItem
*
table
=
pStream
->
fonttbl
;
unsigned
int
i
;
ME_DisplayItem
*
pCell
=
NULL
;
ME_Paragraph
*
prev_para
=
NULL
;
do
{
CHARFORMAT2W
*
fmt
=
&
item
->
member
.
run
.
style
->
fmt
;
do
{
CHARFORMAT2W
*
fmt
=
&
run
->
style
->
fmt
;
add_font_to_fonttbl
(
pStream
,
item
->
member
.
run
.
style
);
add_font_to_fonttbl
(
pStream
,
run
->
style
);
if
(
fmt
->
dwMask
&
CFM_COLOR
&&
!
(
fmt
->
dwEffects
&
CFE_AUTOCOLOR
))
add_color_to_colortbl
(
pStream
,
fmt
->
crTextColor
);
if
(
fmt
->
dwMask
&
CFM_BACKCOLOR
&&
!
(
fmt
->
dwEffects
&
CFE_AUTOBACKCOLOR
))
add_color_to_colortbl
(
pStream
,
fmt
->
crBackColor
);
if
(
item
->
member
.
run
.
para
!=
prev_para
)
if
(
run
->
para
!=
prev_para
)
{
/* check for any para numbering text */
if
(
item
->
member
.
run
.
para
->
fmt
.
wNumbering
)
add_font_to_fonttbl
(
pStream
,
item
->
member
.
run
.
para
->
para_num
.
style
);
if
(
run
->
para
->
fmt
.
wNumbering
)
add_font_to_fonttbl
(
pStream
,
run
->
para
->
para_num
.
style
);
if
((
pCell
=
item
->
member
.
run
.
para
->
pCell
))
if
((
pCell
=
run
->
para
->
pCell
))
{
ME_Border
*
borders
[
4
]
=
{
&
pCell
->
member
.
cell
.
border
.
top
,
&
pCell
->
member
.
cell
.
border
.
left
,
...
...
@@ -348,13 +347,12 @@ ME_StreamOutRTFFontAndColorTbl(ME_OutStream *pStream, ME_DisplayItem *pFirstRun,
add_color_to_colortbl
(
pStream
,
borders
[
i
]
->
colorRef
);
}
prev_para
=
item
->
member
.
run
.
para
;
prev_para
=
run
->
para
;
}
if
(
item
==
pLastRun
)
break
;
item
=
ME_FindItemFwd
(
item
,
diRun
);
}
while
(
item
);
if
(
run
==
last
)
break
;
run
=
run_next_all_paras
(
run
);
}
while
(
run
);
if
(
!
ME_StreamOutPrint
(
pStream
,
"{
\\
fonttbl"
))
return
FALSE
;
...
...
@@ -1007,7 +1005,7 @@ static BOOL ME_StreamOutRTF(ME_TextEditor *editor, ME_OutStream *pStream,
if
(
!
ME_StreamOutRTFHeader
(
pStream
,
dwFormat
))
return
FALSE
;
if
(
!
ME_StreamOutRTFFontAndColorTbl
(
pStream
,
cursor
.
pRun
,
endCur
.
pRun
))
if
(
!
stream_out_font_and_colour_tbls
(
pStream
,
&
cursor
.
pRun
->
member
.
run
,
&
endCur
.
pRun
->
member
.
run
))
return
FALSE
;
/* TODO: stylesheet table */
...
...
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