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
bb50c5a8
Commit
bb50c5a8
authored
Oct 12, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Oct 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Use the table_row_start/end() helpers.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
88cfc04b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
wrap.c
dlls/riched20/wrap.c
+8
-12
No files found.
dlls/riched20/wrap.c
View file @
bb50c5a8
...
...
@@ -919,7 +919,7 @@ static void adjust_para_y( ME_Paragraph *para, ME_Context *c, struct repaint_ran
if
(
para
->
nFlags
&
MEPF_ROWSTART
)
{
ME_DisplayItem
*
cell
=
ME_FindItemFwd
(
para_get_di
(
para
),
diCell
);
ME_
DisplayItem
*
endRowPara
;
ME_
Paragraph
*
end_row_para
=
table_row_end
(
para
)
;
int
borderWidth
=
0
;
cell
->
member
.
cell
.
pt
=
c
->
pt
;
/* Offset the text by the largest top border width. */
...
...
@@ -928,8 +928,6 @@ static void adjust_para_y( ME_Paragraph *para, ME_Context *c, struct repaint_ran
borderWidth
=
max
(
borderWidth
,
cell
->
member
.
cell
.
border
.
top
.
width
);
cell
=
cell
->
member
.
cell
.
next_cell
;
}
endRowPara
=
ME_FindItemFwd
(
cell
,
diParagraph
);
assert
(
endRowPara
->
member
.
para
.
nFlags
&
MEPF_ROWEND
);
if
(
borderWidth
>
0
)
{
borderWidth
=
max
(
ME_twips2pointsY
(
c
,
borderWidth
),
1
);
...
...
@@ -940,22 +938,21 @@ static void adjust_para_y( ME_Paragraph *para, ME_Context *c, struct repaint_ran
}
c
->
pt
.
y
+=
borderWidth
;
}
if
(
end
RowPara
->
member
.
para
.
fmt
.
dxStartIndent
>
0
)
if
(
end
_row_para
->
fmt
.
dxStartIndent
>
0
)
{
int
dxStartIndent
=
endRowPara
->
member
.
para
.
fmt
.
dxStartIndent
;
cell
=
ME_FindItemFwd
(
para_get_di
(
para
),
diCell
);
cell
->
member
.
cell
.
pt
.
x
+=
ME_twips2pointsX
(
c
,
dxStartIndent
);
cell
->
member
.
cell
.
pt
.
x
+=
ME_twips2pointsX
(
c
,
end_row_para
->
fmt
.
dxStartIndent
);
c
->
pt
.
x
=
cell
->
member
.
cell
.
pt
.
x
;
}
}
else
if
(
para
->
nFlags
&
MEPF_ROWEND
)
{
/* Set all the cells to the height of the largest cell */
ME_
DisplayItem
*
startRowPara
;
ME_
Paragraph
*
start_row_para
=
table_row_start
(
para
)
;
int
prevHeight
,
nHeight
,
bottomBorder
=
0
;
ME_DisplayItem
*
cell
=
ME_FindItemBack
(
para_get_di
(
para
),
diCell
);
para
->
nWidth
=
cell
->
member
.
cell
.
pt
.
x
+
cell
->
member
.
cell
.
nWidth
;
if
(
!
(
para
->
next_para
->
member
.
para
.
nFlags
&
MEPF_ROWSTART
))
if
(
!
(
para
_next
(
para
)
->
nFlags
&
MEPF_ROWSTART
))
{
/* Last row, the bottom border is added to the height. */
cell
=
cell
->
member
.
cell
.
prev_cell
;
...
...
@@ -979,9 +976,8 @@ static void adjust_para_y( ME_Paragraph *para, ME_Context *c, struct repaint_ran
cell
->
member
.
cell
.
nHeight
=
nHeight
;
}
/* Also set the height of the start row paragraph */
startRowPara
=
ME_FindItemBack
(
cell
,
diParagraph
);
startRowPara
->
member
.
para
.
nHeight
=
nHeight
;
c
->
pt
.
x
=
startRowPara
->
member
.
para
.
pt
.
x
;
start_row_para
->
nHeight
=
nHeight
;
c
->
pt
.
x
=
start_row_para
->
pt
.
x
;
c
->
pt
.
y
=
cell
->
member
.
cell
.
pt
.
y
+
nHeight
;
if
(
prevHeight
<
nHeight
)
{
...
...
@@ -996,7 +992,7 @@ static void adjust_para_y( ME_Paragraph *para, ME_Context *c, struct repaint_ran
}
}
}
else
if
(
para
->
pCell
&&
para
->
pCell
!=
para
->
next_para
->
member
.
para
.
pCell
)
else
if
(
para
->
pCell
&&
para
->
pCell
!=
para
_next
(
para
)
->
pCell
)
{
/* The next paragraph is in the next cell in the table row. */
ME_Cell
*
cell
=
&
para
->
pCell
->
member
.
cell
;
...
...
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