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
4a01ddca
Commit
4a01ddca
authored
Mar 16, 2008
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Allow reading an enhanced metafile from an RTF stream.
parent
984e4167
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
21 deletions
+31
-21
editor.c
dlls/riched20/editor.c
+12
-4
reader.c
dlls/riched20/reader.c
+1
-0
rtf.h
dlls/riched20/rtf.h
+18
-17
No files found.
dlls/riched20/editor.c
View file @
4a01ddca
...
...
@@ -786,7 +786,7 @@ static void ME_RTFReadPictGroup(RTF_Info *info)
METAFILEPICT
mfp
;
HENHMETAFILE
hemf
;
HBITMAP
hbmp
;
enum
gfxkind
{
gfx_unknown
=
0
,
gfx_enhmetafile
,
gfx_dib
}
gfx
=
gfx_unknown
;
enum
gfxkind
{
gfx_unknown
=
0
,
gfx_enhmetafile
,
gfx_
metafile
,
gfx_
dib
}
gfx
=
gfx_unknown
;
RTFGetToken
(
info
);
if
(
info
->
rtfClass
==
rtfEOF
)
...
...
@@ -796,13 +796,17 @@ static void ME_RTFReadPictGroup(RTF_Info *info)
if
(
RTFCheckMM
(
info
,
rtfPictAttr
,
rtfWinMetafile
))
{
mfp
.
mm
=
info
->
rtfParam
;
gfx
=
gfx_
enh
metafile
;
gfx
=
gfx_metafile
;
}
else
if
(
RTFCheckMM
(
info
,
rtfPictAttr
,
rtfDevIndBitmap
))
{
if
(
info
->
rtfParam
!=
0
)
FIXME
(
"dibitmap should be 0 (%d)
\n
"
,
info
->
rtfParam
);
gfx
=
gfx_dib
;
}
else
if
(
RTFCheckMM
(
info
,
rtfPictAttr
,
rtfEmfBlip
))
{
gfx
=
gfx_enhmetafile
;
}
else
{
FIXME
(
"%d %d
\n
"
,
info
->
rtfMajor
,
info
->
rtfMinor
);
...
...
@@ -825,11 +829,11 @@ static void ME_RTFReadPictGroup(RTF_Info *info)
}
else
if
(
RTFCheckMM
(
info
,
rtfPictAttr
,
rtfPicWid
))
{
if
(
gfx
==
gfx_
enh
metafile
)
mfp
.
xExt
=
info
->
rtfParam
;
if
(
gfx
==
gfx_metafile
)
mfp
.
xExt
=
info
->
rtfParam
;
}
else
if
(
RTFCheckMM
(
info
,
rtfPictAttr
,
rtfPicHt
))
{
if
(
gfx
==
gfx_
enh
metafile
)
mfp
.
yExt
=
info
->
rtfParam
;
if
(
gfx
==
gfx_metafile
)
mfp
.
yExt
=
info
->
rtfParam
;
}
else
if
(
RTFCheckMM
(
info
,
rtfPictAttr
,
rtfPicGoalWid
))
sz
.
cx
=
info
->
rtfParam
;
...
...
@@ -869,6 +873,10 @@ static void ME_RTFReadPictGroup(RTF_Info *info)
switch
(
gfx
)
{
case
gfx_enhmetafile
:
if
((
hemf
=
SetEnhMetaFileBits
(
bufidx
,
buffer
)))
ME_RTFInsertOleObject
(
info
,
hemf
,
NULL
,
&
sz
);
break
;
case
gfx_metafile
:
if
((
hemf
=
SetWinMetaFileBits
(
bufidx
,
buffer
,
NULL
,
&
mfp
)))
ME_RTFInsertOleObject
(
info
,
hemf
,
NULL
,
&
sz
);
break
;
...
...
dlls/riched20/reader.c
View file @
4a01ddca
...
...
@@ -1788,6 +1788,7 @@ static RTFKey rtfKey[] =
{
rtfPictAttr
,
rtfWinMetafile
,
"wmetafile"
,
0
},
{
rtfPictAttr
,
rtfDevIndBitmap
,
"dibitmap"
,
0
},
{
rtfPictAttr
,
rtfWinBitmap
,
"wbitmap"
,
0
},
{
rtfPictAttr
,
rtfEmfBlip
,
"emfblip"
,
0
},
{
rtfPictAttr
,
rtfPixelBits
,
"wbmbitspixel"
,
0
},
{
rtfPictAttr
,
rtfBitmapPlanes
,
"wbmplanes"
,
0
},
{
rtfPictAttr
,
rtfBitmapWid
,
"wbmwidthbytes"
,
0
},
...
...
dlls/riched20/rtf.h
View file @
4a01ddca
...
...
@@ -597,23 +597,24 @@
# define rtfWinMetafile 2
# define rtfDevIndBitmap 3
# define rtfWinBitmap 4
# define rtfPixelBits 5
# define rtfBitmapPlanes 6
# define rtfBitmapWid 7
# define rtfPicWid 8
# define rtfPicHt 9
# define rtfPicGoalWid 10
# define rtfPicGoalHt 11
# define rtfPicScaleX 12
# define rtfPicScaleY 13
# define rtfPicScaled 14
# define rtfPicCropTop 15
# define rtfPicCropBottom 16
# define rtfPicCropLeft 17
# define rtfPicCropRight 18
# define rtfPicMFHasBitmap 19
/* new in 1.10 */
# define rtfPicMFBitsPerPixel 20
/* new in 1.10 */
# define rtfPicBinary 21
# define rtfEmfBlip 5
# define rtfPixelBits 6
# define rtfBitmapPlanes 7
# define rtfBitmapWid 8
# define rtfPicWid 9
# define rtfPicHt 10
# define rtfPicGoalWid 11
# define rtfPicGoalHt 12
# define rtfPicScaleX 13
# define rtfPicScaleY 14
# define rtfPicScaled 15
# define rtfPicCropTop 16
# define rtfPicCropBottom 17
# define rtfPicCropLeft 18
# define rtfPicCropRight 19
# define rtfPicMFHasBitmap 20
/* new in 1.10 */
# define rtfPicMFBitsPerPixel 21
/* new in 1.10 */
# define rtfPicBinary 22
# define rtfBookmarkAttr 14
# define rtfBookmarkFirstCol 0
...
...
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