[gnumeric] .gnumeric: fix reading of anchor mode.



commit f67f33234907cd92aa4441c651704057049f795f
Author: Morten Welinder <terra gnome org>
Date:   Sat Apr 4 21:55:33 2015 -0400

    .gnumeric: fix reading of anchor mode.
    
    Attribute parsing follows a different template here.  That tripped
    me up and we never saw the anchor mode.

 ChangeLog          |    3 +++
 src/xml-sax-read.c |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 778179c..4758e00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-04-04  Morten Welinder  <terra gnome org>
 
+       * src/xml-sax-read.c (xml_sax_read_obj): Fix reading anchor mode.
+       Fixes #747356.
+
        * src/xml-sax-write.c (xml_write_objects): Save only relevant
        parts of the cell bound.
 
diff --git a/src/xml-sax-read.c b/src/xml-sax-read.c
index 4525969..d2c7003 100644
--- a/src/xml-sax-read.c
+++ b/src/xml-sax-read.c
@@ -2398,7 +2398,7 @@ xml_sax_read_obj (GsfXMLIn *xin, gboolean needs_cleanup,
        for (i = 0; attrs != NULL && attrs[i] && attrs[i + 1] ; i += 2) {
                if (attr_eq (attrs[i], "Name"))
                        sheet_object_set_name (so, CXML2C (attrs[i + 1]));
-               else if (xml_sax_attr_enum (attrs, "AnchorMode", GNM_SHEET_OBJECT_ANCHOR_MODE_TYPE, &tmp_int))
+               else if (xml_sax_attr_enum (attrs + i, "AnchorMode", GNM_SHEET_OBJECT_ANCHOR_MODE_TYPE, 
&tmp_int))
                        anchor_mode = tmp_int;
                else if (attr_eq (attrs[i], "ObjectBound"))
                        range_parse (&anchor_r, CXML2C (attrs[i + 1]), gnm_sheet_get_size (state->sheet));


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