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
2a6f99ef
Commit
2a6f99ef
authored
Feb 14, 2013
by
Huw Davies
Committed by
Alexandre Julliard
Feb 14, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: The string len parameter is no longer necessary.
parent
42b0c6ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
paint.c
dlls/riched20/paint.c
+8
-10
No files found.
dlls/riched20/paint.c
View file @
2a6f99ef
...
...
@@ -297,7 +297,7 @@ static void draw_space( ME_Context *c, ME_Run *run, int x, int y,
static
void
ME_DrawTextWithStyle
(
ME_Context
*
c
,
ME_Run
*
run
,
int
x
,
int
y
,
LPCWSTR
szText
,
int
n
Chars
,
int
n
SelFrom
,
int
nSelTo
,
int
ymin
,
int
cy
)
int
nSelFrom
,
int
nSelTo
,
int
ymin
,
int
cy
)
{
HDC
hDC
=
c
->
hDC
;
HGDIOBJ
hOldFont
;
...
...
@@ -305,7 +305,7 @@ static void ME_DrawTextWithStyle(ME_Context *c, ME_Run *run, int x, int y, LPCWS
int
yOffset
=
0
;
COLORREF
rgb
;
HPEN
hPen
=
NULL
,
hOldPen
=
NULL
;
BOOL
bHighlightedText
=
(
nSelFrom
<
nChars
&&
nSelTo
>=
0
BOOL
bHighlightedText
=
(
nSelFrom
<
run
->
len
&&
nSelTo
>=
0
&&
nSelFrom
<
nSelTo
&&
!
c
->
editor
->
bHideSelection
);
int
xSelStart
=
x
,
xSelEnd
=
x
;
...
...
@@ -326,9 +326,9 @@ static void ME_DrawTextWithStyle(ME_Context *c, ME_Run *run, int x, int y, LPCWS
GetTextExtentPoint32W
(
hDC
,
szText
,
nSelFrom
,
&
sz
);
xSelStart
=
x
+
sz
.
cx
;
}
if
(
nSelTo
>=
nChars
)
if
(
nSelTo
>=
run
->
len
)
{
nSelTo
=
nChars
;
nSelTo
=
run
->
len
;
xSelEnd
=
x
+
run
->
nWidth
;
}
else
...
...
@@ -371,14 +371,14 @@ static void ME_DrawTextWithStyle(ME_Context *c, ME_Run *run, int x, int y, LPCWS
{
SetTextColor
(
hDC
,
rgb
);
ExtTextOutW
(
hDC
,
xSelEnd
,
y
-
yOffset
,
0
,
NULL
,
szText
+
nSelTo
,
nChars
-
nSelTo
,
NULL
);
run
->
len
-
nSelTo
,
NULL
);
if
(
hPen
)
LineTo
(
hDC
,
x
+
run
->
nWidth
,
y
-
yOffset
+
1
);
}
}
else
{
ExtTextOutW
(
hDC
,
x
,
y
-
yOffset
,
0
,
NULL
,
szText
,
nChars
,
NULL
);
ExtTextOutW
(
hDC
,
x
,
y
-
yOffset
,
0
,
NULL
,
szText
,
run
->
len
,
NULL
);
/* FIXME: should use textmetrics info for Descent info */
if
(
hPen
)
...
...
@@ -455,16 +455,14 @@ static void ME_DrawRun(ME_Context *c, int x, int y, ME_DisplayItem *rundi, ME_Pa
{
ME_String
*
szMasked
=
ME_MakeStringR
(
c
->
editor
->
cPasswordMask
,
run
->
len
);
ME_DrawTextWithStyle
(
c
,
run
,
x
,
y
,
szMasked
->
szData
,
szMasked
->
nLen
,
nSelFrom
-
runofs
,
nSelTo
-
runofs
,
szMasked
->
szData
,
nSelFrom
-
runofs
,
nSelTo
-
runofs
,
c
->
pt
.
y
+
para
->
pt
.
y
+
start
->
member
.
row
.
pt
.
y
,
start
->
member
.
row
.
nHeight
);
ME_DestroyString
(
szMasked
);
}
else
ME_DrawTextWithStyle
(
c
,
run
,
x
,
y
,
get_text
(
run
,
0
),
run
->
len
,
nSelFrom
-
runofs
,
nSelTo
-
runofs
,
get_text
(
run
,
0
),
nSelFrom
-
runofs
,
nSelTo
-
runofs
,
c
->
pt
.
y
+
para
->
pt
.
y
+
start
->
member
.
row
.
pt
.
y
,
start
->
member
.
row
.
nHeight
);
}
...
...
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