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
30ad0b93
Commit
30ad0b93
authored
Oct 27, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Oct 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Use a row ptr in the run drawing function.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0d50e018
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
22 deletions
+23
-22
editor.h
dlls/riched20/editor.h
+1
-1
paint.c
dlls/riched20/paint.c
+21
-20
richole.c
dlls/riched20/richole.c
+1
-1
No files found.
dlls/riched20/editor.h
View file @
30ad0b93
...
...
@@ -264,7 +264,7 @@ int ME_GetParaBorderWidth(const ME_Context *c, int flags) DECLSPEC_HIDDEN;
/* richole.c */
LRESULT
CreateIRichEditOle
(
IUnknown
*
outer_unk
,
ME_TextEditor
*
editor
,
LPVOID
*
ppvObj
)
DECLSPEC_HIDDEN
;
void
ME_DrawOLE
(
ME_Context
*
c
,
int
x
,
int
y
,
ME_Run
*
run
,
BOOL
selected
)
DECLSPEC_HIDDEN
;
void
draw_ole
(
ME_Context
*
c
,
int
x
,
int
y
,
ME_Run
*
run
,
BOOL
selected
)
DECLSPEC_HIDDEN
;
void
ME_GetOLEObjectSize
(
const
ME_Context
*
c
,
ME_Run
*
run
,
SIZE
*
pSize
)
DECLSPEC_HIDDEN
;
void
ME_CopyReObject
(
REOBJECT
*
dst
,
const
REOBJECT
*
src
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
void
ME_DeleteReObject
(
struct
re_object
*
re_object
)
DECLSPEC_HIDDEN
;
...
...
dlls/riched20/paint.c
View file @
30ad0b93
...
...
@@ -359,8 +359,8 @@ static void draw_text( ME_Context *c, ME_Run *run, int x, int y, BOOL selected,
}
static
void
ME_DrawTextWithStyle
(
ME_Context
*
c
,
ME_Run
*
run
,
int
x
,
int
y
,
int
nSelFrom
,
int
nSelTo
,
int
ymin
,
int
cy
)
static
void
draw_text_with_style
(
ME_Context
*
c
,
ME_Run
*
run
,
int
x
,
int
y
,
int
nSelFrom
,
int
nSelTo
,
int
ymin
,
int
cy
)
{
HDC
hDC
=
c
->
hDC
;
int
yOffset
=
0
;
...
...
@@ -434,16 +434,16 @@ static void ME_DebugWrite(HDC hDC, const POINT *pt, LPCWSTR szText) {
SetTextColor
(
hDC
,
color
);
}
static
void
ME_DrawRun
(
ME_Context
*
c
,
int
x
,
int
y
,
ME_Run
*
run
,
ME_Paragraph
*
para
)
static
void
draw_run
(
ME_Context
*
c
,
int
x
,
int
y
,
ME_Cursor
*
cursor
)
{
ME_DisplayItem
*
start
;
int
runofs
=
run
->
nCharOfs
+
para
->
nCharOfs
;
ME_Row
*
row
;
ME_Run
*
run
=
&
cursor
->
pRun
->
member
.
run
;
int
runofs
=
run_char_ofs
(
run
,
cursor
->
nOffset
);
int
nSelFrom
,
nSelTo
;
if
(
run
->
nFlags
&
MERF_HIDDEN
)
return
;
if
(
run
->
nFlags
&
MERF_HIDDEN
)
return
;
start
=
ME_FindItemBack
(
run_get_di
(
run
),
diStartRow
);
row
=
row_from_cursor
(
cursor
);
ME_GetSelectionOfs
(
c
->
editor
,
&
nSelFrom
,
&
nSelTo
);
/* Draw selected end-of-paragraph mark */
...
...
@@ -452,8 +452,7 @@ static void ME_DrawRun( ME_Context *c, int x, int y, ME_Run *run, ME_Paragraph *
if
(
runofs
>=
nSelFrom
&&
runofs
<
nSelTo
)
{
draw_space
(
c
,
run
,
x
,
y
,
TRUE
,
FALSE
,
c
->
pt
.
y
+
para
->
pt
.
y
+
start
->
member
.
row
.
pt
.
y
,
start
->
member
.
row
.
nHeight
);
c
->
pt
.
y
+
run
->
para
->
pt
.
y
+
row
->
pt
.
y
,
row
->
nHeight
);
}
return
;
}
...
...
@@ -463,19 +462,15 @@ static void ME_DrawRun( ME_Context *c, int x, int y, ME_Run *run, ME_Paragraph *
BOOL
selected
=
runofs
>=
nSelFrom
&&
runofs
<
nSelTo
;
draw_space
(
c
,
run
,
x
,
y
,
selected
,
TRUE
,
c
->
pt
.
y
+
para
->
pt
.
y
+
start
->
member
.
row
.
pt
.
y
,
start
->
member
.
row
.
nHeight
);
c
->
pt
.
y
+
run
->
para
->
pt
.
y
+
row
->
pt
.
y
,
row
->
nHeight
);
return
;
}
if
(
run
->
nFlags
&
MERF_GRAPHICS
)
ME_DrawOLE
(
c
,
x
,
y
,
run
,
(
runofs
>=
nSelFrom
)
&&
(
runofs
<
nSelTo
)
);
draw_ole
(
c
,
x
,
y
,
run
,
(
runofs
>=
nSelFrom
)
&&
(
runofs
<
nSelTo
)
);
else
{
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
);
}
draw_text_with_style
(
c
,
run
,
x
,
y
,
nSelFrom
-
runofs
,
nSelTo
-
runofs
,
c
->
pt
.
y
+
run
->
para
->
pt
.
y
+
row
->
pt
.
y
,
row
->
nHeight
);
}
/* The documented widths are in points (72 dpi), but converting them to
...
...
@@ -1001,8 +996,14 @@ static void draw_paragraph( ME_Context *c, ME_Paragraph *para )
FrameRect
(
c
->
hDC
,
&
rc
,
GetSysColorBrush
(
COLOR_GRAYTEXT
));
}
if
(
visible
)
ME_DrawRun
(
c
,
c
->
pt
.
x
+
run
->
pt
.
x
,
c
->
pt
.
y
+
para
->
pt
.
y
+
run
->
pt
.
y
+
baseline
,
run
,
para
);
{
ME_Cursor
cursor
;
cursor
.
pRun
=
run_get_di
(
run
);
cursor
.
pPara
=
para_get_di
(
para
);
cursor
.
nOffset
=
0
;
draw_run
(
c
,
c
->
pt
.
x
+
run
->
pt
.
x
,
c
->
pt
.
y
+
para
->
pt
.
y
+
run
->
pt
.
y
+
baseline
,
&
cursor
);
}
if
(
me_debug
)
{
static
const
WCHAR
wszRunDebug
[]
=
{
'['
,
'%'
,
'd'
,
':'
,
'%'
,
'x'
,
']'
,
' '
,
'%'
,
'l'
,
's'
,
0
};
...
...
dlls/riched20/richole.c
View file @
30ad0b93
...
...
@@ -5846,7 +5846,7 @@ void ME_GetOLEObjectSize(const ME_Context *c, ME_Run *run, SIZE *pSize)
}
}
void
ME_DrawOLE
(
ME_Context
*
c
,
int
x
,
int
y
,
ME_Run
*
run
,
BOOL
selected
)
void
draw_ole
(
ME_Context
*
c
,
int
x
,
int
y
,
ME_Run
*
run
,
BOOL
selected
)
{
IDataObject
*
ido
;
FORMATETC
fmt
;
...
...
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