riched20: Accept RTF group tokens inside colortbl destination.
This commit is contained in:
parent
387c982d5c
commit
d360f1db51
|
@ -1057,6 +1057,7 @@ static void ReadColorTbl(RTF_Info *info)
|
||||||
RTFColor *cp;
|
RTFColor *cp;
|
||||||
int cnum = 0;
|
int cnum = 0;
|
||||||
const char *fn = "ReadColorTbl";
|
const char *fn = "ReadColorTbl";
|
||||||
|
int group_level = 1;
|
||||||
|
|
||||||
TRACE("\n");
|
TRACE("\n");
|
||||||
|
|
||||||
|
@ -1066,7 +1067,18 @@ static void ReadColorTbl(RTF_Info *info)
|
||||||
if (info->rtfClass == rtfEOF)
|
if (info->rtfClass == rtfEOF)
|
||||||
break;
|
break;
|
||||||
if (RTFCheckCM (info, rtfGroup, rtfEndGroup))
|
if (RTFCheckCM (info, rtfGroup, rtfEndGroup))
|
||||||
break;
|
{
|
||||||
|
group_level--;
|
||||||
|
if (!group_level)
|
||||||
|
break;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if (RTFCheckCM(info, rtfGroup, rtfBeginGroup))
|
||||||
|
{
|
||||||
|
group_level++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
cp = New (RTFColor);
|
cp = New (RTFColor);
|
||||||
if (cp == NULL)
|
if (cp == NULL)
|
||||||
ERR ( "%s: cannot allocate color entry\n", fn);
|
ERR ( "%s: cannot allocate color entry\n", fn);
|
||||||
|
|
Loading…
Reference in New Issue