[gnumeric] xls: re-fix the styles test.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xls: re-fix the styles test.
- Date: Fri, 14 Mar 2014 20:50:01 +0000 (UTC)
commit 0bcb9c06b113d4a518c7daacd051c9ac05460558
Author: Morten Welinder <terra gnome org>
Date: Fri Mar 14 16:49:31 2014 -0400
xls: re-fix the styles test.
...and that is why we have regression suites.
plugins/excel/ms-excel-read.c | 2 +-
plugins/excel/ms-excel-write.c | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/plugins/excel/ms-excel-read.c b/plugins/excel/ms-excel-read.c
index 7081e4e..b125c5a 100644
--- a/plugins/excel/ms-excel-read.c
+++ b/plugins/excel/ms-excel-read.c
@@ -2624,7 +2624,7 @@ excel_read_XF (BiffQuery *q, GnmXLImporter *importer)
xf->valign = valign_from_excel ((data & 0x0070) >> 4);
xf->rotation = (importer->ver >= MS_BIFF_V8)
? rotation_from_excel_v8 (data >> 8)
- : rotation_from_excel_v7 (data >> 8);
+ : rotation_from_excel_v7 ((data >> 8) & 3);
if (importer->ver >= MS_BIFF_V8) {
guint16 const data = GSF_LE_GET_GUINT16 (q->data + 8);
diff --git a/plugins/excel/ms-excel-write.c b/plugins/excel/ms-excel-write.c
index 72b5902..f81ae1d 100644
--- a/plugins/excel/ms-excel-write.c
+++ b/plugins/excel/ms-excel-write.c
@@ -1119,6 +1119,7 @@ cb_write_condition (GnmStyleConditions const *sc, CondDetails *cd,
gnm_style_is_element_set (s, MSTYLE_FONT_ITALIC) ||
gnm_style_is_element_set (s, MSTYLE_FONT_UNDERLINE ) ||
gnm_style_is_element_set (s, MSTYLE_FONT_STRIKETHROUGH) ||
+ gnm_style_is_element_set (s, MSTYLE_FONT_SCRIPT) ||
gnm_style_is_element_set (s, MSTYLE_FONT_SIZE)) {
guint8 fbuf[118];
guint32 tmp, font_flags = 0x18;
@@ -1166,7 +1167,9 @@ cb_write_condition (GnmStyleConditions const *sc, CondDetails *cd,
} else
GSF_LE_SET_GUINT32 (fbuf+92, 1); /* flag as unused */
- GSF_LE_SET_GUINT16 (fbuf+116, 1); /* dunno ? */
+ GSF_LE_SET_GUINT32 (fbuf+100, 1); /*always 1 */
+ GSF_LE_SET_GUINT32 (fbuf+104, 1); /*always 1 */
+ GSF_LE_SET_GUINT16 (fbuf+116, 1); /*always 1 */
if (gnm_style_is_element_set (s, MSTYLE_FONT_COLOR))
tmp = map_color_to_palette (&esheet->ewb->base,
@@ -1456,7 +1459,7 @@ excel_write_DV (XLValInputPair const *vip, gpointer dummy, ExcelWriteSheet *eshe
}
if (vip->v->allow_blank)
options |= 0x100;
- /* XL suppesses the dropdown rather than vice versa */
+ /* XL suppresses the dropdown rather than vice versa */
if (!vip->v->use_dropdown)
options |= 0x200;
if (vip->v->style != GNM_VALIDATION_STYLE_NONE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]