forked from Mirrors/wine-wine
riched20: Add support for the \shppict destination.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>oldstable
parent
cfc8914200
commit
2d23a95c96
|
@ -1236,6 +1236,35 @@ static BOOL ME_RTFInsertOleObject(RTF_Info *info, HENHMETAFILE hemf, HBITMAP hbm
|
||||||
return ret;
|
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 )
|
static DWORD read_hex_data( RTF_Info *info, BYTE **out )
|
||||||
{
|
{
|
||||||
DWORD read = 0, size = 1024;
|
DWORD read = 0, size = 1024;
|
||||||
|
@ -1579,6 +1608,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
|
||||||
WriterInit(&parser);
|
WriterInit(&parser);
|
||||||
RTFInit(&parser);
|
RTFInit(&parser);
|
||||||
RTFSetReadHook(&parser, ME_RTFReadHook);
|
RTFSetReadHook(&parser, ME_RTFReadHook);
|
||||||
|
RTFSetDestinationCallback(&parser, rtfShpPict, ME_RTFReadShpPictGroup);
|
||||||
RTFSetDestinationCallback(&parser, rtfPict, ME_RTFReadPictGroup);
|
RTFSetDestinationCallback(&parser, rtfPict, ME_RTFReadPictGroup);
|
||||||
RTFSetDestinationCallback(&parser, rtfObject, ME_RTFReadObjectGroup);
|
RTFSetDestinationCallback(&parser, rtfObject, ME_RTFReadObjectGroup);
|
||||||
if (!parser.editor->bEmulateVersion10) /* v4.1 */
|
if (!parser.editor->bEmulateVersion10) /* v4.1 */
|
||||||
|
|
|
@ -1808,6 +1808,8 @@ static RTFKey rtfKey[] =
|
||||||
{ rtfDestination, rtfNeXTGraphic, "NeXTGraphic", 0 },
|
{ rtfDestination, rtfNeXTGraphic, "NeXTGraphic", 0 },
|
||||||
{ rtfDestination, rtfNestTableProps, "nesttableprops", 0 },
|
{ rtfDestination, rtfNestTableProps, "nesttableprops", 0 },
|
||||||
{ rtfDestination, rtfNoNestTables, "nonesttables", 0 },
|
{ rtfDestination, rtfNoNestTables, "nonesttables", 0 },
|
||||||
|
{ rtfDestination, rtfShpPict, "shppict", 0 },
|
||||||
|
{ rtfDestination, rtfNonShpPict, "nonshppict", 0 },
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Font families
|
* Font families
|
||||||
|
|
|
@ -184,7 +184,9 @@
|
||||||
# define rtfGenerator 74
|
# define rtfGenerator 74
|
||||||
# define rtfNestTableProps 75
|
# define rtfNestTableProps 75
|
||||||
# define rtfNoNestTables 76
|
# 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 rtfFontFamily 4
|
||||||
# define rtfFFNil 0
|
# define rtfFFNil 0
|
||||||
|
|
Loading…
Reference in New Issue