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
2d23a95c
Commit
2d23a95c
authored
Oct 28, 2015
by
Huw Davies
Committed by
Alexandre Julliard
Oct 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Add support for the \shppict destination.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cfc89142
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
1 deletion
+35
-1
editor.c
dlls/riched20/editor.c
+30
-0
reader.c
dlls/riched20/reader.c
+2
-0
rtf.h
dlls/riched20/rtf.h
+3
-1
No files found.
dlls/riched20/editor.c
View file @
2d23a95c
...
...
@@ -1236,6 +1236,35 @@ static BOOL ME_RTFInsertOleObject(RTF_Info *info, HENHMETAFILE hemf, HBITMAP hbm
return
ret
;
}
static
void
ME_RTFReadShpPictGroup
(
RTF_Info
*
info
)
{
int
level
=
1
;
for
(;;)
{
RTFGetToken
(
info
);
if
(
info
->
rtfClass
==
rtfEOF
)
return
;
if
(
RTFCheckCM
(
info
,
rtfGroup
,
rtfEndGroup
))
{
if
(
--
level
==
0
)
break
;
}
else
if
(
RTFCheckCM
(
info
,
rtfGroup
,
rtfBeginGroup
))
{
level
++
;
}
else
{
RTFRouteToken
(
info
);
if
(
RTFCheckCM
(
info
,
rtfGroup
,
rtfEndGroup
))
level
--
;
}
}
RTFRouteToken
(
info
);
/* feed "}" back to router */
return
;
}
static
DWORD
read_hex_data
(
RTF_Info
*
info
,
BYTE
**
out
)
{
DWORD
read
=
0
,
size
=
1024
;
...
...
@@ -1579,6 +1608,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
WriterInit
(
&
parser
);
RTFInit
(
&
parser
);
RTFSetReadHook
(
&
parser
,
ME_RTFReadHook
);
RTFSetDestinationCallback
(
&
parser
,
rtfShpPict
,
ME_RTFReadShpPictGroup
);
RTFSetDestinationCallback
(
&
parser
,
rtfPict
,
ME_RTFReadPictGroup
);
RTFSetDestinationCallback
(
&
parser
,
rtfObject
,
ME_RTFReadObjectGroup
);
if
(
!
parser
.
editor
->
bEmulateVersion10
)
/* v4.1 */
...
...
dlls/riched20/reader.c
View file @
2d23a95c
...
...
@@ -1808,6 +1808,8 @@ static RTFKey rtfKey[] =
{
rtfDestination
,
rtfNeXTGraphic
,
"NeXTGraphic"
,
0
},
{
rtfDestination
,
rtfNestTableProps
,
"nesttableprops"
,
0
},
{
rtfDestination
,
rtfNoNestTables
,
"nonesttables"
,
0
},
{
rtfDestination
,
rtfShpPict
,
"shppict"
,
0
},
{
rtfDestination
,
rtfNonShpPict
,
"nonshppict"
,
0
},
/*
* Font families
...
...
dlls/riched20/rtf.h
View file @
2d23a95c
...
...
@@ -184,7 +184,9 @@
# define rtfGenerator 74
# define rtfNestTableProps 75
# define rtfNoNestTables 76
# define rtfMaxDestination 77
/* highest dest + 1 */
# define rtfShpPict 77
# define rtfNonShpPict 78
# define rtfMaxDestination 79
/* highest dest + 1 */
# define rtfFontFamily 4
# define rtfFFNil 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