[gnumeric] xlsx: fix export of default-style columns



commit 1fe1a99fe7b1e5c7d70f32e040fc85f08c47514b
Author: Morten Welinder <terra gnome org>
Date:   Sat Jan 17 09:30:25 2015 -0500

    xlsx: fix export of default-style columns
    
    We evidently must include a width.  Otherwise XL will see zero width.

 NEWS                       |    1 +
 plugins/excel/ChangeLog    |    5 +++++
 plugins/excel/xlsx-write.c |    2 +-
 3 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 8967076..8e31cf2 100644
--- a/NEWS
+++ b/NEWS
@@ -27,6 +27,7 @@ Morten:
        * Improve error handling for .gnumeric a bit.
        * Improve xlsx graph import: line colour.
        * Improve xlsx graph export: line style; bar/col direction; marker shapes.
+       * Improve xlsx export: default col widths.
 
 Thomas Kluyver:
        * Fix import of extended floats from wk4 files.  [#739679]
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 54255cb..c3427b1 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-17  Morten Welinder  <terra gnome org>
+
+       * xlsx-write.c (xlsx_write_cols): Make sure we include a width for
+       default-style columns.  Otherwise XL will see zero width.
+
 2015-01-16  Morten Welinder  <terra gnome org>
 
        * xlsx-write-drawing.c (xlsx_write_go_style): Export line style.
diff --git a/plugins/excel/xlsx-write.c b/plugins/excel/xlsx-write.c
index 8ecb732..3186c81 100644
--- a/plugins/excel/xlsx-write.c
+++ b/plugins/excel/xlsx-write.c
@@ -2086,7 +2086,7 @@ xlsx_write_cols (XLSXWriteState *state, GsfXMLOut *xml, GnmStyle **styles)
        gsf_xml_out_start_element (xml, "cols");
 
        for (i = first_col + 1; i <= last_col; i++) {
-               ColRowInfo const *ci = sheet_col_get (state->sheet, i);
+               ColRowInfo const *ci = sheet_col_get_info (state->sheet, i);
                if (!colrow_equal (info, ci) || styles[i] != styles[i - 1]) {
                        xlsx_write_col (state, xml, info,
                                        first_col, i - 1,


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