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
7875a77b
Commit
7875a77b
authored
Oct 19, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Oct 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Pass a paragraph ptr to a couple of the drawing helpers.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
00824a03
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
paint.c
dlls/riched20/paint.c
+7
-9
No files found.
dlls/riched20/paint.c
View file @
7875a77b
...
...
@@ -696,9 +696,8 @@ static void ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y, RECT
}
}
static
void
ME_DrawTableBorders
(
ME_Context
*
c
,
ME_DisplayItem
*
paragraph
)
static
void
ME_DrawTableBorders
(
ME_Context
*
c
,
ME_Paragraph
*
para
)
{
ME_Paragraph
*
para
=
&
paragraph
->
member
.
para
;
if
(
!
c
->
editor
->
bEmulateVersion10
)
/* v4.1 */
{
if
(
para
->
pCell
)
...
...
@@ -778,7 +777,7 @@ static void ME_DrawTableBorders(ME_Context *c, ME_DisplayItem *paragraph)
if
(
atBottom
)
{
int
oldLeft
=
rc
.
left
;
width
=
max
(
ME_twips2pointsY
(
c
,
cell
->
border
.
bottom
.
width
),
1
);
paraAfterRow
=
table_row_end
(
&
paragraph
->
member
.
para
)
->
next_para
;
paraAfterRow
=
table_row_end
(
para
)
->
next_para
;
if
(
paraAfterRow
->
member
.
para
.
nFlags
&
MEPF_ROWSTART
)
{
ME_DisplayItem
*
nextEndCell
;
nextEndCell
=
ME_FindItemBack
(
para_get_di
(
table_row_end
(
&
paraAfterRow
->
member
.
para
)
),
diCell
);
...
...
@@ -845,7 +844,7 @@ static void ME_DrawTableBorders(ME_Context *c, ME_DisplayItem *paragraph)
oldpen
=
SelectObject
(
c
->
hDC
,
pen
);
/* Find the start relative to the text */
firstX
=
c
->
pt
.
x
+
ME_FindItemFwd
(
paragraph
,
diRun
)
->
member
.
run
.
pt
.
x
;
firstX
=
c
->
pt
.
x
+
para_first_run
(
para
)
->
pt
.
x
;
/* Go back by the horizontal gap, which is stored in dxOffset */
firstX
-=
ME_twips2pointsX
(
c
,
para
->
fmt
.
dxOffset
);
/* The left edge, stored in dxStartIndent affected just the first edge */
...
...
@@ -853,7 +852,7 @@ static void ME_DrawTableBorders(ME_Context *c, ME_DisplayItem *paragraph)
rowY
=
c
->
pt
.
y
+
para
->
pt
.
y
;
if
(
para
->
fmt
.
dwMask
&
PFM_SPACEBEFORE
)
rowY
+=
ME_twips2pointsY
(
c
,
para
->
fmt
.
dySpaceBefore
);
nHeight
=
ME_FindItemFwd
(
paragraph
,
diStartRow
)
->
member
.
row
.
nHeight
;
nHeight
=
ME_FindItemFwd
(
para_get_di
(
para
),
diStartRow
)
->
member
.
row
.
nHeight
;
rowBottom
=
rowY
+
nHeight
;
/* Draw horizontal lines */
...
...
@@ -892,9 +891,8 @@ static void ME_DrawTableBorders(ME_Context *c, ME_DisplayItem *paragraph)
}
}
static
void
draw_para_number
(
ME_Context
*
c
,
ME_
DisplayItem
*
p
)
static
void
draw_para_number
(
ME_Context
*
c
,
ME_
Paragraph
*
para
)
{
ME_Paragraph
*
para
=
&
p
->
member
.
para
;
int
x
,
y
;
COLORREF
old_text
;
...
...
@@ -1034,8 +1032,8 @@ static void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph)
no
++
;
}
ME_DrawTableBorders
(
c
,
paragraph
);
draw_para_number
(
c
,
paragraph
);
ME_DrawTableBorders
(
c
,
para
);
draw_para_number
(
c
,
para
);
SetTextAlign
(
c
->
hDC
,
align
);
}
...
...
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