[gnumeric] xlsx: fix row height export.



commit f93795ad39617380498034604c42624bbff79f99
Author: Morten Welinder <terra gnome org>
Date:   Mon Feb 24 09:33:17 2014 -0500

    xlsx: fix row height export.

 NEWS                       |    1 +
 plugins/excel/ChangeLog    |    5 +++++
 plugins/excel/xlsx-write.c |    6 +++++-
 3 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 42bc15a..1a67dae 100644
--- a/NEWS
+++ b/NEWS
@@ -32,6 +32,7 @@ Morten:
        * Improve style handling when expanding sheets. 
        * Fix xls export of headers and footers.  [Part of #724516]
        * Fix xls import of headers and footers.  [Part of #724516]
+       * Fix xlsx export of row heights.
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.11
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index f5dd2a7..0f299aa 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2014-02-24  Morten Welinder  <terra gnome org>
+
+       * xlsx-write.c (xlsx_write_cells): Export row height when it is
+       not default, even if it is not user-set.
+
 2014-02-23  Morten Welinder  <terra gnome org>
 
        * ms-excel-util.c (xls_header_footer_export): New function
diff --git a/plugins/excel/xlsx-write.c b/plugins/excel/xlsx-write.c
index 5c790cb..148846d 100644
--- a/plugins/excel/xlsx-write.c
+++ b/plugins/excel/xlsx-write.c
@@ -1204,6 +1204,7 @@ row_boring (Sheet *sheet, int r)
                return TRUE;
 
        return (!ri->hard_size &&
+               ri->size_pts == sheet->rows.default_style.size_pts &&
                !ri->is_collapsed &&
                ri->visible &&
                ri->outline_level == 0);
@@ -1251,9 +1252,12 @@ xlsx_write_cells (XLSXWriteState *state, GsfXMLOut *xml,
 
                        if (ri->hard_size) {
                                xlsx_write_init_row (&needs_row, xml, r, cheesy_span);
-                               gsf_xml_out_add_float (xml, "ht", ri->size_pts, 4);
                                gsf_xml_out_add_cstr_unchecked (xml, "customHeight", "1");
                        }
+                       if (ri->hard_size || ri->size_pts != sheet->cols.default_style.size_pts) {
+                               xlsx_write_init_row (&needs_row, xml, r, cheesy_span);
+                               gsf_xml_out_add_float (xml, "ht", ri->size_pts, 4);
+                       }
                        if (ri->is_collapsed) {
                                xlsx_write_init_row (&needs_row, xml, r, cheesy_span);
                                gsf_xml_out_add_cstr_unchecked (xml, "collapsed", "1");


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