mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-07 04:47:14 +00:00
oc-rtf: no color table definition
Be able to parse rtf files without color table defined \colortbl
This commit is contained in:
1 parent
b0ba6f4a22
commit
637ac1e98a
2 files changed
+10
-9
No files matched your search
@@ -824,19 +824,19 @@ const unsigned short ansicpg874[256] = {
|
||||
int color_index;
|
||||
char *v;
|
||||
|
||||
if (!formattingOptions) continue;
|
||||
|
||||
color_index = [[s substringFromIndex: 2] intValue];
|
||||
|
||||
if (!formattingOptions)
|
||||
continue;
|
||||
|
||||
if (formattingOptions->color_index >= 0) // && color_index != formattingOptions->color_index)
|
||||
colorDef = [colorTable colorDefAtIndex: color_index];
|
||||
if (!colorDef) continue;
|
||||
|
||||
if (formattingOptions->color_index >= 0)
|
||||
{
|
||||
[_html appendBytes: "</font>" length: 7];
|
||||
}
|
||||
|
||||
formattingOptions->color_index = color_index;
|
||||
colorDef = [colorTable colorDefAtIndex: color_index];
|
||||
|
||||
|
||||
formattingOptions->color_index = color_index;
|
||||
|
||||
v = malloc(23*sizeof(char));
|
||||
memset(v, 0, 23);
|
||||
sprintf(v, "<font color=\"#%02x%02x%02x\">", colorDef->red, colorDef->green, colorDef->blue);
|
||||
|
||||
Reference in new issue
Block a user