[gnumeric] xlsx: fix criticals.



commit 2f34e0e2230552e00541434d995a80864de8fd41
Author: Morten Welinder <terra gnome org>
Date:   Sun Apr 26 12:09:45 2015 -0400

    xlsx: fix criticals.
    
    Not all string values with formats are rich text.

 plugins/excel/ChangeLog    |    2 ++
 plugins/excel/xlsx-write.c |    4 +++-
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 2c2ee96..975161f 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -2,6 +2,8 @@
 
        * xlsx-write.c (xlsx_shared_string): Retry hash lookup when we
        clear the format.
+       (xlsx_write_cells): Handle string values with formats other than
+       markup.  Fixes #748477.
 
 2015-04-24  Morten Welinder  <terra gnome org>
 
diff --git a/plugins/excel/xlsx-write.c b/plugins/excel/xlsx-write.c
index 62e2358..90ebfc4 100644
--- a/plugins/excel/xlsx-write.c
+++ b/plugins/excel/xlsx-write.c
@@ -1708,7 +1708,9 @@ xlsx_write_cells (XLSXWriteState *state, GsfXMLOut *xml,
                                }
 
                                if (inlineStr) {
-                                       PangoAttrList *attrs = VALUE_FMT (val)
+                                       GOFormat const *fmt = VALUE_FMT (val);
+                                       PangoAttrList *attrs =
+                                               fmt && go_format_is_markup (fmt)
                                                ? (PangoAttrList *)go_format_get_markup (VALUE_FMT (val))
                                                : NULL;
 


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