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
164897e6
Commit
164897e6
authored
Jun 11, 2022
by
Jinoh Kang
Committed by
Alexandre Julliard
Jun 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Fetch extent from object if REOBJECT::sizel is unset.
Signed-off-by:
Jinoh Kang
<
jinoh.kang.kr@gmail.com
>
parent
a7d29d16
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
caret.c
dlls/riched20/caret.c
+13
-0
richole.c
dlls/riched20/tests/richole.c
+0
-2
No files found.
dlls/riched20/caret.c
View file @
164897e6
...
...
@@ -464,6 +464,7 @@ HRESULT editor_insert_oleobj(ME_TextEditor *editor, const REOBJECT *reo)
ME_Cursor
*
cursor
,
cursor_from_ofs
;
ME_Style
*
style
;
HRESULT
hr
;
SIZEL
extent
;
if
(
editor
->
lpOleCallback
)
{
...
...
@@ -472,6 +473,17 @@ HRESULT editor_insert_oleobj(ME_TextEditor *editor, const REOBJECT *reo)
return
hr
;
}
extent
=
reo
->
sizel
;
if
(
!
extent
.
cx
&&
!
extent
.
cy
&&
reo
->
poleobj
)
{
hr
=
IOleObject_GetExtent
(
reo
->
poleobj
,
DVASPECT_CONTENT
,
&
extent
);
if
(
FAILED
(
hr
))
{
extent
.
cx
=
0
;
extent
.
cy
=
0
;
}
}
if
(
reo
->
cp
==
REO_CP_SELECTION
)
cursor
=
editor
->
pCursors
;
else
...
...
@@ -487,6 +499,7 @@ HRESULT editor_insert_oleobj(ME_TextEditor *editor, const REOBJECT *reo)
run
=
run_insert
(
editor
,
cursor
,
style
,
&
space
,
1
,
MERF_GRAPHICS
);
run
->
reobj
=
create_re_object
(
reo
,
run
);
run
->
reobj
->
obj
.
sizel
=
extent
;
prev
=
run
;
while
((
prev
=
run_prev_all_paras
(
prev
)))
...
...
dlls/riched20/tests/richole.c
View file @
164897e6
...
...
@@ -4217,9 +4217,7 @@ static void subtest_InsertObject(struct reolecb_obj *callback)
reobj
.
cbStruct
=
sizeof
(
reobj
);
hr
=
IRichEditOle_GetObject
(
reole
,
0
,
&
reobj
,
REO_GETOBJ_NO_INTERFACES
);
ok
(
hr
==
S_OK
,
"IRichEditOle_GetObject got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
reobj
.
sizel
.
cx
==
800
,
"expected reobj.sizel.cx to be %ld, got %ld
\n
"
,
800L
,
reobj
.
sizel
.
cx
);
todo_wine
ok
(
reobj
.
sizel
.
cy
==
400
,
"expected reobj.sizel.cy to be %ld, got %ld
\n
"
,
400L
,
reobj
.
sizel
.
cy
);
IOleClientSite_Release
(
clientsite
);
...
...
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