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
635614b5
Commit
635614b5
authored
Feb 15, 2013
by
Huw Davies
Committed by
Alexandre Julliard
Feb 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Move the password string hack to just before it's used.
parent
a4378f44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
18 deletions
+16
-18
paint.c
dlls/riched20/paint.c
+16
-18
No files found.
dlls/riched20/paint.c
View file @
635614b5
...
...
@@ -314,11 +314,19 @@ static void get_selection_rect( ME_Context *c, ME_Run *run, int from, int to, in
}
static
void
draw_text
(
ME_Context
*
c
,
ME_Run
*
run
,
int
x
,
int
y
,
const
WCHAR
*
text
,
BOOL
selected
,
RECT
*
sel_rect
)
static
void
draw_text
(
ME_Context
*
c
,
ME_Run
*
run
,
int
x
,
int
y
,
BOOL
selected
,
RECT
*
sel_rect
)
{
COLORREF
text_color
=
get_text_color
(
c
,
run
->
style
,
selected
);
COLORREF
back_color
=
selected
?
ITextHost_TxGetSysColor
(
c
->
editor
->
texthost
,
COLOR_HIGHLIGHT
)
:
0
;
COLORREF
old_text
,
old_back
;
const
WCHAR
*
text
=
get_text
(
run
,
0
);
ME_String
*
masked
=
NULL
;
if
(
c
->
editor
->
cPasswordMask
)
{
masked
=
ME_MakeStringR
(
c
->
editor
->
cPasswordMask
,
run
->
len
);
text
=
masked
->
szData
;
}
old_text
=
SetTextColor
(
c
->
hDC
,
text_color
);
if
(
selected
)
old_back
=
SetBkColor
(
c
->
hDC
,
back_color
);
...
...
@@ -330,11 +338,12 @@ static void draw_text( ME_Context *c, ME_Run *run, int x, int y, const WCHAR *te
draw_underline
(
c
,
run
,
x
,
y
,
text_color
);
ME_DestroyString
(
masked
);
return
;
}
static
void
ME_DrawTextWithStyle
(
ME_Context
*
c
,
ME_Run
*
run
,
int
x
,
int
y
,
LPCWSTR
szText
,
static
void
ME_DrawTextWithStyle
(
ME_Context
*
c
,
ME_Run
*
run
,
int
x
,
int
y
,
int
nSelFrom
,
int
nSelTo
,
int
ymin
,
int
cy
)
{
HDC
hDC
=
c
->
hDC
;
...
...
@@ -373,12 +382,12 @@ static void ME_DrawTextWithStyle(ME_Context *c, ME_Run *run, int x, int y, LPCWS
hOldFont
=
ME_SelectStyleFont
(
c
,
run
->
style
);
if
(
sel_rgn
)
ExtSelectClipRgn
(
hDC
,
sel_rgn
,
RGN_DIFF
);
draw_text
(
c
,
run
,
x
,
y
-
yOffset
,
szText
,
FALSE
,
NULL
);
draw_text
(
c
,
run
,
x
,
y
-
yOffset
,
FALSE
,
NULL
);
if
(
sel_rgn
)
{
ExtSelectClipRgn
(
hDC
,
clip
,
RGN_COPY
);
ExtSelectClipRgn
(
hDC
,
sel_rgn
,
RGN_AND
);
draw_text
(
c
,
run
,
x
,
y
-
yOffset
,
szText
,
TRUE
,
&
sel_rect
);
draw_text
(
c
,
run
,
x
,
y
-
yOffset
,
TRUE
,
&
sel_rect
);
ExtSelectClipRgn
(
hDC
,
clip
,
RGN_COPY
);
if
(
clip
)
DeleteObject
(
clip
);
DeleteObject
(
sel_rgn
);
...
...
@@ -439,20 +448,9 @@ static void ME_DrawRun(ME_Context *c, int x, int y, ME_DisplayItem *rundi, ME_Pa
ME_DrawOLE
(
c
,
x
,
y
,
run
,
para
,
(
runofs
>=
nSelFrom
)
&&
(
runofs
<
nSelTo
));
else
{
if
(
c
->
editor
->
cPasswordMask
)
{
ME_String
*
szMasked
=
ME_MakeStringR
(
c
->
editor
->
cPasswordMask
,
run
->
len
);
ME_DrawTextWithStyle
(
c
,
run
,
x
,
y
,
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
),
nSelFrom
-
runofs
,
nSelTo
-
runofs
,
c
->
pt
.
y
+
para
->
pt
.
y
+
start
->
member
.
row
.
pt
.
y
,
start
->
member
.
row
.
nHeight
);
ME_DrawTextWithStyle
(
c
,
run
,
x
,
y
,
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