[gnumeric] xls: fix export of conditional formats with super/sub script.



commit 0a44f217497404e85b791584ccfec4b4073b8972
Author: Morten Welinder <terra gnome org>
Date:   Sat Mar 15 13:37:29 2014 -0400

    xls: fix export of conditional formats with super/sub script.

 plugins/excel/ChangeLog            |    3 +++
 plugins/excel/ms-excel-write.c     |    2 +-
 samples/cond-format-tests.gnumeric |  Bin 4303 -> 4385 bytes
 3 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 5838708..71414d5 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,5 +1,8 @@
 2014-03-15  Morten Welinder  <terra gnome org>
 
+       * ms-excel-write.c (cb_write_condition): Store superscript and
+       subscript in the right place.
+
        * ms-excel-read.c (excel_read_CF): Improve record length checks.
 
 2014-03-12  Morten Welinder  <terra gnome org>
diff --git a/plugins/excel/ms-excel-write.c b/plugins/excel/ms-excel-write.c
index f81ae1d..dcf64c6 100644
--- a/plugins/excel/ms-excel-write.c
+++ b/plugins/excel/ms-excel-write.c
@@ -1163,7 +1163,7 @@ cb_write_condition (GnmStyleConditions const *sc, CondDetails *cd,
 
                        if (gnm_style_is_element_set (s, MSTYLE_FONT_SCRIPT)) {
                                guint16 script = map_script_to_xl (s);
-                               GSF_LE_SET_GUINT16 (fbuf+72, script);
+                               GSF_LE_SET_GUINT16 (fbuf+74, script);
                        } else
                                GSF_LE_SET_GUINT32 (fbuf+92, 1); /* flag as unused */
 
diff --git a/samples/cond-format-tests.gnumeric b/samples/cond-format-tests.gnumeric
index c2ec363..2d7ae1e 100644
Binary files a/samples/cond-format-tests.gnumeric and b/samples/cond-format-tests.gnumeric differ


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