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
b2c812e3
Commit
b2c812e3
authored
Oct 22, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Oct 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Use cell ptrs in the rtf writing code.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
431ee508
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
17 deletions
+12
-17
writer.c
dlls/riched20/writer.c
+12
-17
No files found.
dlls/riched20/writer.c
View file @
b2c812e3
...
...
@@ -316,7 +316,7 @@ static BOOL stream_out_font_and_colour_tbls( ME_OutStream *pStream, ME_Run *firs
ME_Run
*
run
=
first
;
ME_FontTableItem
*
table
=
pStream
->
fonttbl
;
unsigned
int
i
;
ME_
DisplayItem
*
pC
ell
=
NULL
;
ME_
Cell
*
c
ell
=
NULL
;
ME_Paragraph
*
prev_para
=
NULL
;
do
...
...
@@ -336,12 +336,10 @@ static BOOL stream_out_font_and_colour_tbls( ME_OutStream *pStream, ME_Run *firs
if
(
run
->
para
->
fmt
.
wNumbering
)
add_font_to_fonttbl
(
pStream
,
run
->
para
->
para_num
.
style
);
if
((
pCell
=
run
->
para
->
pCell
))
if
((
cell
=
para_cell
(
run
->
para
)
))
{
ME_Border
*
borders
[
4
]
=
{
&
pCell
->
member
.
cell
.
border
.
top
,
&
pCell
->
member
.
cell
.
border
.
left
,
&
pCell
->
member
.
cell
.
border
.
bottom
,
&
pCell
->
member
.
cell
.
border
.
right
};
ME_Border
*
borders
[
4
]
=
{
&
cell
->
border
.
top
,
&
cell
->
border
.
left
,
&
cell
->
border
.
bottom
,
&
cell
->
border
.
right
};
for
(
i
=
0
;
i
<
4
;
i
++
)
if
(
borders
[
i
]
->
width
>
0
)
add_color_to_colortbl
(
pStream
,
borders
[
i
]
->
colorRef
);
...
...
@@ -389,7 +387,7 @@ static BOOL stream_out_font_and_colour_tbls( ME_OutStream *pStream, ME_Run *firs
static
BOOL
stream_out_table_props
(
ME_TextEditor
*
editor
,
ME_OutStream
*
pStream
,
ME_Paragraph
*
para
)
{
ME_
DisplayItem
*
cell
;
ME_
Cell
*
cell
;
char
props
[
STREAMOUT_BUFFER_SIZE
]
=
""
;
int
i
;
const
char
sideChar
[
4
]
=
{
't'
,
'l'
,
'b'
,
'r'
};
...
...
@@ -399,19 +397,16 @@ static BOOL stream_out_table_props( ME_TextEditor *editor, ME_OutStream *pStream
if
(
!
editor
->
bEmulateVersion10
)
/* v4.1 */
{
PARAFORMAT2
*
pFmt
=
&
table_row_end
(
para
)
->
fmt
;
para
=
table_row_start
(
para
);
cell
=
para
->
next_para
->
member
.
para
.
pCell
;
assert
(
cell
);
cell
=
table_row_first_cell
(
para
);
assert
(
cell
);
if
(
pFmt
->
dxOffset
)
sprintf
(
props
+
strlen
(
props
),
"
\\
trgaph%d"
,
pFmt
->
dxOffset
);
if
(
pFmt
->
dxStartIndent
)
sprintf
(
props
+
strlen
(
props
),
"
\\
trleft%d"
,
pFmt
->
dxStartIndent
);
do
{
ME_Border
*
borders
[
4
]
=
{
&
cell
->
member
.
cell
.
border
.
top
,
&
cell
->
member
.
cell
.
border
.
left
,
&
cell
->
member
.
cell
.
border
.
bottom
,
&
cell
->
member
.
cell
.
border
.
right
};
ME_Border
*
borders
[
4
]
=
{
&
cell
->
border
.
top
,
&
cell
->
border
.
left
,
&
cell
->
border
.
bottom
,
&
cell
->
border
.
right
};
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
borders
[
i
]
->
width
)
...
...
@@ -425,9 +420,9 @@ static BOOL stream_out_table_props( ME_TextEditor *editor, ME_OutStream *pStream
sprintf
(
props
+
strlen
(
props
),
"
\\
brdrcf%u"
,
idx
);
}
}
sprintf
(
props
+
strlen
(
props
),
"
\\
cellx%d"
,
cell
->
member
.
cell
.
nRightBoundary
);
cell
=
cell
->
member
.
cell
.
next_cell
;
}
while
(
cell
->
member
.
cell
.
next_cell
);
sprintf
(
props
+
strlen
(
props
),
"
\\
cellx%d"
,
cell
->
nRightBoundary
);
cell
=
cell
_next
(
cell
)
;
}
while
(
cell
_next
(
cell
)
);
}
else
/* v1.0 - 3.0 */
{
...
...
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