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
417c80d6
Commit
417c80d6
authored
Aug 21, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Aug 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Don't create a special richedit ole instance for the RTF parser.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1bc48be4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
14 deletions
+12
-14
editor.c
dlls/riched20/editor.c
+12
-13
rtf.h
dlls/riched20/rtf.h
+0
-1
No files found.
dlls/riched20/editor.c
View file @
417c80d6
...
...
@@ -1122,7 +1122,7 @@ void ME_RTFSpecialCharHook(RTF_Info *info)
}
}
static
BOOL
ME_RTFInsertOleObject
(
RTF_Info
*
info
,
HENHMETAFILE
hemf
,
HBITMAP
hbmp
,
static
HRESULT
insert_static_object
(
ME_TextEditor
*
editor
,
HENHMETAFILE
hemf
,
HBITMAP
hbmp
,
const
SIZEL
*
sz
)
{
LPOLEOBJECT
lpObject
=
NULL
;
...
...
@@ -1133,7 +1133,7 @@ static BOOL ME_RTFInsertOleObject(RTF_Info *info, HENHMETAFILE hemf, HBITMAP hbm
STGMEDIUM
stgm
;
FORMATETC
fm
;
CLSID
clsid
;
BOOL
ret
=
FALSE
;
HRESULT
hr
=
E_FAIL
;
DWORD
conn
;
if
(
hemf
)
...
...
@@ -1155,13 +1155,14 @@ static BOOL ME_RTFInsertOleObject(RTF_Info *info, HENHMETAFILE hemf, HBITMAP hbm
fm
.
lindex
=
-
1
;
fm
.
tymed
=
stgm
.
tymed
;
if
(
!
info
->
lpRichEdit
Ole
)
if
(
!
editor
->
re
Ole
)
{
CreateIRichEditOle
(
NULL
,
info
->
editor
,
(
VOID
**
)
&
info
->
lpRichEditOle
);
if
(
!
CreateIRichEditOle
(
NULL
,
editor
,
(
LPVOID
*
)
&
editor
->
reOle
))
return
hr
;
}
if
(
OleCreateDefaultHandler
(
&
CLSID_NULL
,
NULL
,
&
IID_IOleObject
,
(
void
**
)
&
lpObject
)
==
S_OK
&&
IRichEditOle_GetClientSite
(
info
->
lpRichEdit
Ole
,
&
lpClientSite
)
==
S_OK
&&
IRichEditOle_GetClientSite
(
editor
->
re
Ole
,
&
lpClientSite
)
==
S_OK
&&
IOleObject_SetClientSite
(
lpObject
,
lpClientSite
)
==
S_OK
&&
IOleObject_GetUserClassID
(
lpObject
,
&
clsid
)
==
S_OK
&&
IOleObject_QueryInterface
(
lpObject
,
&
IID_IOleCache
,
(
void
**
)
&
lpOleCache
)
==
S_OK
&&
...
...
@@ -1184,8 +1185,8 @@ static BOOL ME_RTFInsertOleObject(RTF_Info *info, HENHMETAFILE hemf, HBITMAP hbm
reobject
.
dwFlags
=
0
;
/* FIXME */
reobject
.
dwUser
=
0
;
ME_InsertOLEFromCursor
(
info
->
editor
,
&
reobject
,
0
);
ret
=
TRUE
;
ME_InsertOLEFromCursor
(
editor
,
&
reobject
,
0
);
hr
=
S_OK
;
}
if
(
lpObject
)
IOleObject_Release
(
lpObject
);
...
...
@@ -1194,7 +1195,7 @@ static BOOL ME_RTFInsertOleObject(RTF_Info *info, HENHMETAFILE hemf, HBITMAP hbm
if
(
lpDataObject
)
IDataObject_Release
(
lpDataObject
);
if
(
lpOleCache
)
IOleCache_Release
(
lpOleCache
);
return
ret
;
return
hr
;
}
static
void
ME_RTFReadShpPictGroup
(
RTF_Info
*
info
)
...
...
@@ -1353,11 +1354,11 @@ static void ME_RTFReadPictGroup(RTF_Info *info)
{
case
gfx_enhmetafile
:
if
((
hemf
=
SetEnhMetaFileBits
(
size
,
buffer
)))
ME_RTFInsertOleObject
(
info
,
hemf
,
NULL
,
&
sz
);
insert_static_object
(
info
->
editor
,
hemf
,
NULL
,
&
sz
);
break
;
case
gfx_metafile
:
if
((
hemf
=
SetWinMetaFileBits
(
size
,
buffer
,
NULL
,
&
mfp
)))
ME_RTFInsertOleObject
(
info
,
hemf
,
NULL
,
&
sz
);
insert_static_object
(
info
->
editor
,
hemf
,
NULL
,
&
sz
);
break
;
case
gfx_dib
:
{
...
...
@@ -1371,7 +1372,7 @@ static void ME_RTFReadPictGroup(RTF_Info *info)
if
((
hbmp
=
CreateDIBitmap
(
hdc
,
&
bi
->
bmiHeader
,
CBM_INIT
,
(
char
*
)(
bi
+
1
)
+
nc
*
sizeof
(
RGBQUAD
),
bi
,
DIB_RGB_COLORS
))
)
ME_RTFInsertOleObject
(
info
,
NULL
,
hbmp
,
&
sz
);
insert_static_object
(
info
->
editor
,
NULL
,
hbmp
,
&
sz
);
ReleaseDC
(
0
,
hdc
);
break
;
}
...
...
@@ -1727,8 +1728,6 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
}
ME_CheckTablesForCorruption
(
editor
);
RTFDestroy
(
&
parser
);
if
(
parser
.
lpRichEditOle
)
IRichEditOle_Release
(
parser
.
lpRichEditOle
);
if
(
parser
.
stackTop
>
0
)
{
...
...
dlls/riched20/rtf.h
View file @
417c80d6
...
...
@@ -1175,7 +1175,6 @@ struct _RTF_Info {
RTFState
stack
[
maxStack
];
int
stackTop
;
BOOL
styleChanged
;
LPRICHEDITOLE
lpRichEditOle
;
RTFTable
*
tableDef
;
int
nestingLevel
;
...
...
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