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
2a2446ab
Commit
2a2446ab
authored
Jun 02, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Return 0x0 size for NULL objects.
parent
25d9fc3e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
0 deletions
+47
-0
richole.c
dlls/riched20/richole.c
+10
-0
richole.c
dlls/riched20/tests/richole.c
+37
-0
No files found.
dlls/riched20/richole.c
View file @
2a2446ab
...
...
@@ -1420,8 +1420,12 @@ static HRESULT WINAPI
IRichEditOle_fnInsertObject
(
IRichEditOle
*
me
,
REOBJECT
*
reo
)
{
IRichEditOleImpl
*
This
=
impl_from_IRichEditOle
(
me
);
TRACE
(
"(%p,%p)
\n
"
,
This
,
reo
);
if
(
!
reo
)
return
E_INVALIDARG
;
if
(
reo
->
cbStruct
<
sizeof
(
*
reo
))
return
STG_E_INVALIDPARAMETER
;
ME_InsertOLEFromCursor
(
This
->
editor
,
reo
,
0
);
...
...
@@ -5037,6 +5041,12 @@ void ME_GetOLEObjectSize(const ME_Context *c, ME_Run *run, SIZE *pSize)
return
;
}
if
(
!
run
->
ole_obj
->
poleobj
)
{
pSize
->
cx
=
pSize
->
cy
=
0
;
return
;
}
if
(
IOleObject_QueryInterface
(
run
->
ole_obj
->
poleobj
,
&
IID_IDataObject
,
(
void
**
)
&
ido
)
!=
S_OK
)
{
FIXME
(
"Query Interface IID_IDataObject failed!
\n
"
);
...
...
dlls/riched20/tests/richole.c
View file @
2a2446ab
...
...
@@ -3072,6 +3072,42 @@ static void test_SetFont(void)
ITextSelection_Release
(
selection
);
}
static
void
test_InsertObject
(
void
)
{
IRichEditOle
*
reole
=
NULL
;
ITextDocument
*
doc
=
NULL
;
IOleClientSite
*
clientsite
;
REOBJECT
reo
;
HRESULT
hr
;
HWND
hwnd
;
create_interfaces
(
&
hwnd
,
&
reole
,
&
doc
,
NULL
);
hr
=
IRichEditOle_InsertObject
(
reole
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IRichEditOle_GetClientSite
(
reole
,
&
clientsite
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
reo
.
cbStruct
=
sizeof
(
reo
);
reo
.
cp
=
0
;
memset
(
&
reo
.
clsid
,
0
,
sizeof
(
reo
.
clsid
));
reo
.
poleobj
=
NULL
;
reo
.
pstg
=
NULL
;
reo
.
polesite
=
clientsite
;
reo
.
sizel
.
cx
=
10
;
reo
.
sizel
.
cy
=
10
;
reo
.
dvaspect
=
DVASPECT_CONTENT
;
reo
.
dwFlags
=
0
;
reo
.
dwUser
=
0
;
hr
=
IRichEditOle_InsertObject
(
reole
,
&
reo
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IOleClientSite_Release
(
clientsite
);
release_interfaces
(
&
hwnd
,
&
reole
,
&
doc
,
NULL
);
}
START_TEST
(
richole
)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
...
...
@@ -3104,4 +3140,5 @@ START_TEST(richole)
test_Select
();
test_GetStoryType
();
test_SetFont
();
test_InsertObject
();
}
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