html.c (gnumeric-1.12.49.tar.xz) | : | html.c (gnumeric-1.12.50.tar.xz) | ||
---|---|---|---|---|
skipping to change at line 283 | skipping to change at line 283 | |||
static void | static void | |||
html_write_cell_content (GsfOutput *output, GnmCell *cell, GnmStyle const *style , html_version_t version) | html_write_cell_content (GsfOutput *output, GnmCell *cell, GnmStyle const *style , html_version_t version) | |||
{ | { | |||
guint r = 0; | guint r = 0; | |||
guint g = 0; | guint g = 0; | |||
guint b = 0; | guint b = 0; | |||
char *rendered_string; | char *rendered_string; | |||
gboolean hidden = gnm_style_get_contents_hidden (style); | gboolean hidden = gnm_style_get_contents_hidden (style); | |||
GnmHLink* hlink = gnm_style_get_hlink (style); | GnmHLink* hlink = gnm_style_get_hlink (style); | |||
const guchar* hlink_target = NULL; | char* hlink_target = NULL; | |||
if (hlink && GNM_IS_HLINK_URL (hlink)) { | if (hlink) { | |||
hlink_target = gnm_hlink_get_target (hlink); | const char *target = gnm_hlink_get_target (hlink); | |||
if (GNM_IS_HLINK_URL (hlink)) { | ||||
hlink_target = go_url_encode (target, 1); | ||||
} else if (GNM_IS_HLINK_EXTERNAL (hlink)) { | ||||
char *et = go_url_encode (target, 1); | ||||
hlink_target = g_strconcat ("file://", et, NULL); | ||||
g_free (et); | ||||
} | ||||
} | } | |||
if (version == HTML32 && hidden) | if (version == HTML32 && hidden) | |||
gsf_output_puts (output, "<!-- 'HIDDEN DATA' -->"); | gsf_output_puts (output, "<!-- 'HIDDEN DATA' -->"); | |||
else { | else { | |||
if (style != NULL) { | if (style != NULL) { | |||
if (gnm_style_get_font_italic (style)) | if (gnm_style_get_font_italic (style)) | |||
gsf_output_puts (output, "<i>"); | gsf_output_puts (output, "<i>"); | |||
if (gnm_style_get_font_bold (style)) | if (gnm_style_get_font_bold (style)) | |||
gsf_output_puts (output, "<b>"); | gsf_output_puts (output, "<b>"); | |||
skipping to change at line 320 | skipping to change at line 327 | |||
gsf_output_puts (output, "<sub>"); | gsf_output_puts (output, "<sub>"); | |||
break; | break; | |||
case GO_FONT_SCRIPT_SUPER: | case GO_FONT_SCRIPT_SUPER: | |||
gsf_output_puts (output, "<sup>"); | gsf_output_puts (output, "<sup>"); | |||
break; | break; | |||
default: | default: | |||
break; | break; | |||
} | } | |||
} | } | |||
if (hlink_target) | if (hlink_target) { | |||
gsf_output_printf (output, "<a href=\"%s\">", hlink_targe t); | gsf_output_printf (output, "<a href=\"%s\">", hlink_targe t); | |||
g_free (hlink_target); | ||||
} | ||||
if (cell != NULL) { | if (cell != NULL) { | |||
const PangoAttrList * markup = NULL; | const PangoAttrList * markup = NULL; | |||
if (style != NULL && version != HTML40) { | if (style != NULL && version != HTML40) { | |||
html_get_text_color (cell, style, &r, &g, &b); | html_get_text_color (cell, style, &r, &g, &b); | |||
if (r > 0 || g > 0 || b > 0) | if (r > 0 || g > 0 || b > 0) | |||
gsf_output_printf (output, "<font color=\ "#%02X%02X%02X\">", r, g, b); | gsf_output_printf (output, "<font color=\ "#%02X%02X%02X\">", r, g, b); | |||
} | } | |||
End of changes. 4 change blocks. | ||||
4 lines changed or deleted | 13 lines changed or added |