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
0d8800d4
Commit
0d8800d4
authored
Nov 21, 2013
by
Huw Davies
Committed by
Alexandre Julliard
Nov 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Simplify the code by using an ME_Paragraph pointer.
parent
a81e58f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
wrap.c
dlls/riched20/wrap.c
+7
-8
No files found.
dlls/riched20/wrap.c
View file @
0d8800d4
...
...
@@ -168,13 +168,12 @@ static void ME_BeginRow(ME_WrapContext *wc)
static
void
ME_InsertRowStart
(
ME_WrapContext
*
wc
,
const
ME_DisplayItem
*
pEnd
)
{
ME_DisplayItem
*
p
,
*
row
,
*
para
;
ME_DisplayItem
*
p
,
*
row
;
ME_Paragraph
*
para
=
&
wc
->
pPara
->
member
.
para
;
BOOL
bSkippingSpaces
=
TRUE
;
int
ascent
=
0
,
descent
=
0
,
width
=
0
,
shift
=
0
,
align
=
0
;
PARAFORMAT2
*
pFmt
;
/* wrap text */
para
=
wc
->
pPara
;
pFmt
=
para
->
member
.
para
.
pFmt
;
for
(
p
=
pEnd
->
prev
;
p
!=
wc
->
pRowStart
->
prev
;
p
=
p
->
prev
)
{
...
...
@@ -208,10 +207,10 @@ static void ME_InsertRowStart(ME_WrapContext *wc, const ME_DisplayItem *pEnd)
}
}
para
->
member
.
para
.
nWidth
=
max
(
para
->
member
.
para
.
nWidth
,
width
);
para
->
nWidth
=
max
(
para
->
nWidth
,
width
);
row
=
ME_MakeRow
(
ascent
+
descent
,
ascent
,
width
);
if
(
wc
->
context
->
editor
->
bEmulateVersion10
&&
/* v1.0 - 3.0 */
pFmt
->
dwMask
&
PFM_TABLE
&&
pFmt
->
wEffects
&
PFE_TABLE
)
(
para
->
pFmt
->
dwMask
&
PFM_TABLE
)
&&
(
para
->
pFmt
->
wEffects
&
PFE_TABLE
)
)
{
/* The text was shifted down in ME_BeginRow so move the wrap context
* back to where it should be. */
...
...
@@ -222,8 +221,8 @@ static void ME_InsertRowStart(ME_WrapContext *wc, const ME_DisplayItem *pEnd)
row
->
member
.
row
.
pt
=
wc
->
pt
;
row
->
member
.
row
.
nLMargin
=
(
!
wc
->
nRow
?
wc
->
nFirstMargin
:
wc
->
nLeftMargin
);
row
->
member
.
row
.
nRMargin
=
wc
->
nRightMargin
;
assert
(
para
->
member
.
para
.
pFmt
->
dwMask
&
PFM_ALIGNMENT
);
align
=
para
->
member
.
para
.
pFmt
->
wAlignment
;
assert
(
para
->
pFmt
->
dwMask
&
PFM_ALIGNMENT
);
align
=
para
->
pFmt
->
wAlignment
;
if
(
align
==
PFA_CENTER
)
shift
=
max
((
wc
->
nAvailWidth
-
width
)
/
2
,
0
);
if
(
align
==
PFA_RIGHT
)
...
...
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