[gnumeric] xlsx: don't set object style for objects that don't have style.



commit 82f95ad0f74277110529c50152d583a11516afe6
Author: Morten Welinder <terra gnome org>
Date:   Fri Mar 13 21:42:57 2015 -0400

    xlsx: don't set object style for objects that don't have style.
    
    This fixes criticals for images.

 plugins/excel/ChangeLog           |    3 +++
 plugins/excel/xlsx-read-drawing.c |    3 ++-
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 21f9132..92a8edb 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,5 +1,8 @@
 2015-03-13  Morten Welinder  <terra gnome org>
 
+       * xlsx-read-drawing.c (xlsx_drawing_twoCellAnchor_end): Only set
+       style if the object has style.  SheetObjectImage does not.
+
        * xlsx-read.c (xlsx_ext_begin): Ignore unknown stuff inside.
 
 2015-03-09  Morten Welinder  <terra gnome org>
diff --git a/plugins/excel/xlsx-read-drawing.c b/plugins/excel/xlsx-read-drawing.c
index b91309c..0a591c7 100644
--- a/plugins/excel/xlsx-read-drawing.c
+++ b/plugins/excel/xlsx-read-drawing.c
@@ -3030,7 +3030,8 @@ xlsx_drawing_twoCellAnchor_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
                }
                sheet_object_anchor_init (&anchor, &r, coords, state->so_direction);
                sheet_object_set_anchor (state->so, &anchor);
-               if (state->cur_style)
+               if (state->cur_style &&
+                   g_object_class_find_property (G_OBJECT_GET_CLASS (state->so), "style"))
                        g_object_set (state->so, "style", state->cur_style, NULL);
 
                state->pending_objects = g_slist_prepend (state->pending_objects, state->so);


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