[gnumeric] xls: fix biff7 export of headers and footers.



commit e5cbc9dd64acd78caf8056264a0215a8f7f7fdcb
Author: Morten Welinder <terra gnome org>
Date:   Wed Feb 19 19:43:03 2014 -0500

    xls: fix biff7 export of headers and footers.

 NEWS                           |    1 +
 plugins/excel/ChangeLog        |    6 ++++++
 plugins/excel/ms-excel-write.c |    6 +++++-
 3 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index e9993da..265ecf1 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,7 @@ Morten:
        * Fix XLSX number roundtrip issues.
        * Improve ssdiff's report of differences.
        * Improve LOG2's accuracy.
+       * Fix BIFF7 export of page headers and footers.
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.11
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 64c242e..7e76c78 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,9 @@
+2014-02-19  Morten Welinder  <terra gnome org>
+
+       * ms-excel-write.c (excel_write_HEADER_FOOTER): Use one-byte
+       strings for BIFF7 and earlier.  That matches the way we read
+       things.
+
 2014-02-17  Morten Welinder  <terra gnome org>
 
        * xlsx-utils.c (xlsx_conventions_new): use same
diff --git a/plugins/excel/ms-excel-write.c b/plugins/excel/ms-excel-write.c
index e029020..e5a3efd 100644
--- a/plugins/excel/ms-excel-write.c
+++ b/plugins/excel/ms-excel-write.c
@@ -4897,7 +4897,11 @@ excel_write_HEADER_FOOTER (BiffPut *bp, PrintHF const *hf, int id)
        }
 
        ms_biff_put_var_next (bp, id);
-       excel_write_string (bp, STR_TWO_BYTE_LENGTH, res->str);
+       excel_write_string (bp,
+                           (bp->version >= MS_BIFF_V8
+                            ? STR_TWO_BYTE_LENGTH
+                            : STR_ONE_BYTE_LENGTH),
+                           res->str);
        ms_biff_put_commit (bp);
 
        g_string_free (res, TRUE);


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