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
1ed84f0d
Commit
1ed84f0d
authored
Oct 10, 2008
by
Dylan Smith
Committed by
Alexandre Julliard
Oct 13, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Fixed centering and right align with word wrap disabled.
parent
a32f1f2c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
editstr.h
dlls/riched20/editstr.h
+1
-1
wrap.c
dlls/riched20/wrap.c
+8
-6
No files found.
dlls/riched20/editstr.h
View file @
1ed84f0d
...
...
@@ -401,7 +401,7 @@ typedef struct tagME_WrapContext
int
nAvailWidth
;
int
nRow
;
POINT
pt
;
BOOL
bOverflown
;
BOOL
bOverflown
,
bWordWrap
;
ME_DisplayItem
*
pRowStart
;
ME_DisplayItem
*
pLastSplittableRun
;
...
...
dlls/riched20/wrap.c
View file @
1ed84f0d
...
...
@@ -50,8 +50,10 @@ static void ME_BeginRow(ME_WrapContext *wc, ME_DisplayItem *para)
wc
->
pRowStart
=
NULL
;
wc
->
bOverflown
=
FALSE
;
wc
->
pLastSplittableRun
=
NULL
;
wc
->
bWordWrap
=
wc
->
context
->
editor
->
bWordWrap
;
if
(
para
->
member
.
para
.
nFlags
&
(
MEPF_ROWSTART
|
MEPF_ROWEND
))
{
wc
->
nAvailWidth
=
0
;
wc
->
bWordWrap
=
FALSE
;
if
(
para
->
member
.
para
.
nFlags
&
MEPF_ROWEND
)
{
ME_Cell
*
cell
=
&
ME_FindItemBack
(
para
,
diCell
)
->
member
.
cell
;
...
...
@@ -73,12 +75,11 @@ static void ME_BeginRow(ME_WrapContext *wc, ME_DisplayItem *para)
wc
->
nAvailWidth
=
cell
->
nWidth
-
(
wc
->
nRow
?
wc
->
nLeftMargin
:
wc
->
nFirstMargin
)
-
wc
->
nRightMargin
;
}
else
if
(
wc
->
context
->
editor
->
bWordWrap
)
{
wc
->
bWordWrap
=
TRUE
;
}
else
{
wc
->
nAvailWidth
=
wc
->
context
->
rcView
.
right
-
wc
->
context
->
rcView
.
left
-
(
wc
->
nRow
?
wc
->
nLeftMargin
:
wc
->
nFirstMargin
)
-
wc
->
nRightMargin
-
wc
->
context
->
editor
->
selofs
;
}
else
{
wc
->
nAvailWidth
=
~
0u
>>
1
;
}
wc
->
pt
.
x
=
wc
->
context
->
pt
.
x
;
if
(
wc
->
context
->
editor
->
bEmulateVersion10
&&
/* v1.0 - 3.0 */
...
...
@@ -149,9 +150,9 @@ static void ME_InsertRowStart(ME_WrapContext *wc, const ME_DisplayItem *pEnd)
assert
(
para
->
member
.
para
.
pFmt
->
dwMask
&
PFM_ALIGNMENT
);
align
=
para
->
member
.
para
.
pFmt
->
wAlignment
;
if
(
align
==
PFA_CENTER
)
shift
=
(
wc
->
nAvailWidth
-
width
)
/
2
;
shift
=
max
((
wc
->
nAvailWidth
-
width
)
/
2
,
0
)
;
if
(
align
==
PFA_RIGHT
)
shift
=
wc
->
nAvailWidth
-
width
;
shift
=
max
(
wc
->
nAvailWidth
-
width
,
0
)
;
for
(
p
=
wc
->
pRowStart
;
p
!=
pEnd
;
p
=
p
->
next
)
{
if
(
p
->
type
==
diRun
)
{
/* FIXME add more run types */
...
...
@@ -378,7 +379,8 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p)
}
/* will current run fit? */
if
(
wc
->
pt
.
x
+
run
->
nWidth
-
wc
->
context
->
pt
.
x
>
wc
->
nAvailWidth
)
if
(
wc
->
bWordWrap
&&
wc
->
pt
.
x
+
run
->
nWidth
-
wc
->
context
->
pt
.
x
>
wc
->
nAvailWidth
)
{
int
loc
=
wc
->
context
->
pt
.
x
+
wc
->
nAvailWidth
-
wc
->
pt
.
x
;
/* total white run ? */
...
...
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