Commit c8a8aa46 authored by Morten Welinder's avatar Morten Welinder

.gnumeric: don't write font names for styles that have none.

In practice that means for conditional styles.
parent 0bcb9c06
2014-03-14 Morten Welinder <terra@gnome.org>
* src/xml-sax-write.c (xml_write_style): Don't write a font name
if we don't have any.
2014-03-14 Jean Brefort <jean.brefort@normalesup.org>
* src/gui-util.c (gnm_canvas_get_position): fix tooltip position. [#725941]
......
......@@ -527,8 +527,6 @@ xml_write_style (GnmOutputXML *state, GnmStyle const *style)
gnm_style_is_element_set (style, MSTYLE_FONT_UNDERLINE) ||
gnm_style_is_element_set (style, MSTYLE_FONT_STRIKETHROUGH) ||
gnm_style_is_element_set (style, MSTYLE_FONT_SCRIPT)) {
char const *fontname;
gsf_xml_out_start_element (state->output, GNM "Font");
if (gnm_style_is_element_set (style, MSTYLE_FONT_SIZE))
......@@ -544,12 +542,11 @@ xml_write_style (GnmOutputXML *state, GnmStyle const *style)
if (gnm_style_is_element_set (style, MSTYLE_FONT_SCRIPT))
gsf_xml_out_add_int (state->output, "Script", (int)gnm_style_get_font_script (style));
if (gnm_style_is_element_set (style, MSTYLE_FONT_NAME))
fontname = gnm_style_get_font_name (style);
else /* backwards compatibility */
fontname = "Helvetica";
if (gnm_style_is_element_set (style, MSTYLE_FONT_NAME)) {
const char *fontname = gnm_style_get_font_name (style);
gsf_xml_out_add_cstr (state->output, NULL, fontname);
}
gsf_xml_out_add_cstr (state->output, NULL, fontname);
gsf_xml_out_end_element (state->output);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment