[gnumeric] so-filled: don't save an empty set of attributes.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] so-filled: don't save an empty set of attributes.
- Date: Sun, 6 Feb 2022 17:10:11 +0000 (UTC)
commit ec55d85e164f98d75a12ecce793fd48692b617dc
Author: Morten Welinder <terra gnome org>
Date: Sun Feb 6 12:09:14 2022 -0500
so-filled: don't save an empty set of attributes.
They won't come back right, so don't.
src/gnm-so-filled.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/gnm-so-filled.c b/src/gnm-so-filled.c
index 0a940487c..80746c158 100644
--- a/src/gnm-so-filled.c
+++ b/src/gnm-so-filled.c
@@ -338,8 +338,11 @@ gnm_so_filled_write_xml_sax (SheetObject const *so, GsfXMLOut *output,
gsf_xml_out_add_cstr (output, "Label", sof->text);
if (sof->markup != NULL) {
GOFormat *fmt = go_format_new_markup (sof->markup, TRUE);
- gsf_xml_out_add_cstr (output, "LabelFormat",
- go_format_as_XL (fmt));
+ // Trouble: an empty markup comes back as "@" which
+ // will not parse as markup. Hack it for now.
+ if (go_format_is_markup (fmt))
+ gsf_xml_out_add_cstr (output, "LabelFormat",
+ go_format_as_XL (fmt));
go_format_unref (fmt);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]