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
ecc607c6
Commit
ecc607c6
authored
Apr 01, 2022
by
Jinoh Kang
Committed by
Alexandre Julliard
Jun 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Draw OLE objects with IViewObject implementation.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52752
Signed-off-by:
Jinoh Kang
<
jinoh.kang.kr@gmail.com
>
parent
164897e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
richole.c
dlls/riched20/richole.c
+29
-0
richole.c
dlls/riched20/tests/richole.c
+0
-2
No files found.
dlls/riched20/richole.c
View file @
ecc607c6
...
...
@@ -5733,6 +5733,7 @@ void ME_GetOLEObjectSize(const ME_Context *c, ME_Run *run, SIZE *pSize)
void
draw_ole
(
ME_Context
*
c
,
int
x
,
int
y
,
ME_Run
*
run
,
BOOL
selected
)
{
IDataObject
*
ido
;
IViewObject
*
ivo
;
FORMATETC
fmt
;
STGMEDIUM
stgm
;
DIBSECTION
dibsect
;
...
...
@@ -5745,6 +5746,34 @@ void draw_ole( ME_Context *c, int x, int y, ME_Run *run, BOOL selected )
assert
(
run
->
nFlags
&
MERF_GRAPHICS
);
assert
(
run
->
reobj
);
if
(
SUCCEEDED
(
IOleObject_QueryInterface
(
run
->
reobj
->
obj
.
poleobj
,
&
IID_IViewObject
,
(
void
**
)
&
ivo
)))
{
HRESULT
hr
;
RECTL
bounds
;
convert_sizel
(
c
,
&
run
->
reobj
->
obj
.
sizel
,
&
sz
);
if
(
c
->
editor
->
nZoomNumerator
!=
0
)
{
sz
.
cx
=
MulDiv
(
sz
.
cx
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
sz
.
cy
=
MulDiv
(
sz
.
cy
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
}
bounds
.
left
=
x
;
bounds
.
top
=
y
-
sz
.
cy
;
bounds
.
right
=
x
+
sz
.
cx
;
bounds
.
bottom
=
y
;
hr
=
IViewObject_Draw
(
ivo
,
DVASPECT_CONTENT
,
-
1
,
0
,
0
,
0
,
c
->
hDC
,
&
bounds
,
NULL
,
NULL
,
0
);
if
(
FAILED
(
hr
))
{
WARN
(
"failed to draw object: %#08lx
\n
"
,
hr
);
}
IViewObject_Release
(
ivo
);
return
;
}
if
(
IOleObject_QueryInterface
(
run
->
reobj
->
obj
.
poleobj
,
&
IID_IDataObject
,
(
void
**
)
&
ido
)
!=
S_OK
)
{
FIXME
(
"Couldn't get interface
\n
"
);
...
...
dlls/riched20/tests/richole.c
View file @
ecc607c6
...
...
@@ -4193,7 +4193,6 @@ static void subtest_InsertObject(struct reolecb_obj *callback)
UpdateWindow
(
hwnd
);
testobj
->
line
=
__LINE__
;
flush_dispatch_messages
();
todo_wine
ok
(
testobj
->
draw_count
!=
0
,
"expected draw_count to be nonzero, got %d
\n
"
,
testobj
->
draw_count
);
SendMessageA
(
hwnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
""
);
...
...
@@ -4225,7 +4224,6 @@ static void subtest_InsertObject(struct reolecb_obj *callback)
UpdateWindow
(
hwnd
);
testobj
->
line
=
__LINE__
;
flush_dispatch_messages
();
todo_wine
ok
(
testobj
->
draw_count
!=
0
,
"expected draw_count to be nonzero, got %d
\n
"
,
testobj
->
draw_count
);
SendMessageA
(
hwnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
""
);
...
...
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