[gnumeric] GnmSOFilled: drop writing style twice for the benefit of pre-1.2



commit 3dd77bd3db0013e20afe94f08c40bc8257576975
Author: Morten Welinder <terra gnome org>
Date:   Wed Feb 11 19:58:08 2015 -0500

    GnmSOFilled: drop writing style twice for the benefit of pre-1.2
    
    We can still read files from that era, but we no longer need to support
    pre-1.2 reading our files.

 ChangeLog                     |    5 +++++
 samples/object-tests.gnumeric |  Bin 2469 -> 2436 bytes
 src/gnm-so-filled.c           |   13 +++----------
 3 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 71c1757..f587c67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-11  Morten Welinder  <terra gnome org>
+
+       * src/gnm-so-filled.c (gnm_so_filled_write_xml_sax): Don't bother
+       writing duplicate style so version 1.2 and earlier can read it.
+
 2015-02-11  Jean Brefort  <jean brefort normalesup org>
 
        * src/graph.c (cb_assign_val): use go_nan instead of infinite for strings
diff --git a/samples/object-tests.gnumeric b/samples/object-tests.gnumeric
index dde0c05..8439280 100644
Binary files a/samples/object-tests.gnumeric and b/samples/object-tests.gnumeric differ
diff --git a/src/gnm-so-filled.c b/src/gnm-so-filled.c
index c1c09eb..e133852 100644
--- a/src/gnm-so-filled.c
+++ b/src/gnm-so-filled.c
@@ -170,7 +170,6 @@ sof_default_style (void)
 static void
 gnm_so_filled_user_config (SheetObject *so, SheetControl *sc)
 {
-       GnmSOFilled *sof = GNM_SO_FILLED (so);
        dialog_so_styled (scg_wbcg (SHEET_CONTROL_GUI (sc)), G_OBJECT (so),
                          sof_default_style (),
                          _("Filled Object Properties"),
@@ -332,15 +331,9 @@ gnm_so_filled_write_xml_sax (SheetObject const *so, GsfXMLOut *output,
 {
        GnmSOFilled const *sof = GNM_SO_FILLED (so);
        GOStyle const *style = sof->style;
-       gsf_xml_out_add_int     (output, "Type", sof->is_oval ? 102 : 101);
-
-       /* Old 1.0 and 1.2 */
-       gsf_xml_out_add_float   (output, "Width", style->line.width, 2);
-       if (!style->line.auto_color)
-               gnm_xml_out_add_gocolor (output, "OutlineColor", style->line.color);
-       if (!style->fill.auto_back)
-               gnm_xml_out_add_gocolor (output, "FillColor", style->fill.pattern.back);
-       if (sof->text != NULL && *(sof->text) != '\0') {
+       gsf_xml_out_add_int (output, "Type", sof->is_oval ? 102 : 101);
+
+       if (sof->text != NULL && sof->text[0] != '\0') {
                gsf_xml_out_add_cstr (output, "Label", sof->text);
                if (sof->markup != NULL) {
                        GOFormat *fmt = go_format_new_markup (sof->markup, TRUE);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]