Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
507f5170
Commit
507f5170
authored
Nov 04, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Nov 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Return a row ptr from the row creation function.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3c10a3ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
wrap.c
dlls/riched20/wrap.c
+13
-13
No files found.
dlls/riched20/wrap.c
View file @
507f5170
...
...
@@ -173,14 +173,14 @@ static int find_split_point( ME_Context *c, int cx, ME_Run *run )
return
ME_CharFromPointContext
(
c
,
cx
,
run
,
FALSE
,
FALSE
);
}
static
ME_
DisplayItem
*
ME_MakeRow
(
int
height
,
int
baseline
,
int
width
)
static
ME_
Row
*
row_create
(
int
height
,
int
baseline
,
int
width
)
{
ME_DisplayItem
*
item
=
ME_MakeDI
(
diStartRow
);
item
->
member
.
row
.
nHeight
=
height
;
item
->
member
.
row
.
nBaseline
=
baseline
;
item
->
member
.
row
.
nWidth
=
width
;
return
item
;
return
&
item
->
member
.
row
;
}
static
void
ME_BeginRow
(
ME_WrapContext
*
wc
)
...
...
@@ -284,7 +284,7 @@ static void layout_row( ME_Run *start, ME_Run *last )
static
void
ME_InsertRowStart
(
ME_WrapContext
*
wc
,
ME_Run
*
last
)
{
ME_Run
*
run
;
ME_
DisplayItem
*
row
;
ME_
Row
*
row
;
BOOL
bSkippingSpaces
=
TRUE
;
int
ascent
=
0
,
descent
=
0
,
width
=
0
,
shift
=
0
,
align
=
0
;
...
...
@@ -328,7 +328,7 @@ static void ME_InsertRowStart( ME_WrapContext *wc, ME_Run *last )
}
wc
->
para
->
nWidth
=
max
(
wc
->
para
->
nWidth
,
width
);
row
=
ME_MakeRow
(
ascent
+
descent
,
ascent
,
width
);
row
=
row_create
(
ascent
+
descent
,
ascent
,
width
);
if
(
wc
->
context
->
editor
->
bEmulateVersion10
&&
/* v1.0 - 3.0 */
(
wc
->
para
->
fmt
.
dwMask
&
PFM_TABLE
)
&&
(
wc
->
para
->
fmt
.
wEffects
&
PFE_TABLE
))
{
...
...
@@ -336,11 +336,11 @@ static void ME_InsertRowStart( ME_WrapContext *wc, ME_Run *last )
* back to where it should be. */
wc
->
pt
.
y
--
;
/* The height of the row is increased by the borders. */
row
->
member
.
row
.
nHeight
+=
2
;
row
->
nHeight
+=
2
;
}
row
->
member
.
row
.
pt
=
wc
->
pt
;
row
->
member
.
row
.
nLMargin
=
(
!
wc
->
nRow
?
wc
->
nFirstMargin
:
wc
->
nLeftMargin
);
row
->
member
.
row
.
nRMargin
=
wc
->
nRightMargin
;
row
->
pt
=
wc
->
pt
;
row
->
nLMargin
=
(
!
wc
->
nRow
?
wc
->
nFirstMargin
:
wc
->
nLeftMargin
);
row
->
nRMargin
=
wc
->
nRightMargin
;
assert
(
wc
->
para
->
fmt
.
dwMask
&
PFM_ALIGNMENT
);
align
=
wc
->
para
->
fmt
.
wAlignment
;
if
(
align
==
PFA_CENTER
)
shift
=
max
((
wc
->
nAvailWidth
-
width
)
/
2
,
0
);
...
...
@@ -348,23 +348,23 @@ static void ME_InsertRowStart( ME_WrapContext *wc, ME_Run *last )
if
(
wc
->
para
->
nFlags
&
MEPF_COMPLEX
)
layout_row
(
wc
->
pRowStart
,
last
);
row
->
member
.
row
.
pt
.
x
=
row
->
member
.
row
.
nLMargin
+
shift
;
row
->
pt
.
x
=
row
->
nLMargin
+
shift
;
for
(
run
=
wc
->
pRowStart
;
run
;
run
=
run_next
(
run
))
{
run
->
pt
.
x
+=
row
->
member
.
row
.
nLMargin
+
shift
;
run
->
pt
.
x
+=
row
->
nLMargin
+
shift
;
if
(
run
==
last
)
break
;
}
if
(
wc
->
nRow
==
0
&&
wc
->
para
->
fmt
.
wNumbering
)
{
wc
->
para
->
para_num
.
pt
.
x
=
wc
->
nParaNumOffset
+
shift
;
wc
->
para
->
para_num
.
pt
.
y
=
wc
->
pt
.
y
+
row
->
member
.
row
.
nBaseline
;
wc
->
para
->
para_num
.
pt
.
y
=
wc
->
pt
.
y
+
row
->
nBaseline
;
}
ME_InsertBefore
(
run_get_di
(
wc
->
pRowStart
),
row
);
ME_InsertBefore
(
run_get_di
(
wc
->
pRowStart
),
row
_get_di
(
row
)
);
wc
->
nRow
++
;
wc
->
pt
.
y
+=
row
->
member
.
row
.
nHeight
;
wc
->
pt
.
y
+=
row
->
nHeight
;
ME_BeginRow
(
wc
);
}
...
...
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