[gnumeric] xls: fix biff8 export of diagonal borders.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xls: fix biff8 export of diagonal borders.
- Date: Thu, 20 Feb 2014 16:17:39 +0000 (UTC)
commit 041a2b8cc9b5e79cdfbbb49eb567f7f1822410ad
Author: Morten Welinder <terra gnome org>
Date: Thu Feb 20 11:17:14 2014 -0500
xls: fix biff8 export of diagonal borders.
NEWS | 1 +
plugins/excel/ChangeLog | 5 +++++
plugins/excel/ms-excel-write.c | 6 +++---
3 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/NEWS b/NEWS
index 3a265bc..038814e 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,7 @@ Morten:
* Fix BIFF7 export of page headers and footers.
* Fix BIFF7 export of font rotation.
* Fix xlsx export of underlines.
+ * Fix BIFF8 export of diagonal borders.
--------------------------------------------------------------------------
Gnumeric 1.12.11
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index d75d5f6..44b5928 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2014-02-20 Morten Welinder <terra gnome org>
+
+ * ms-excel-write.c (excel_write_XF): Fix reversed diagonal border
+ bits.
+
2014-02-19 Morten Welinder <terra gnome org>
* ms-excel-write.c (rotation_to_excel_v7): Fix rotation at 270
diff --git a/plugins/excel/ms-excel-write.c b/plugins/excel/ms-excel-write.c
index 01169cb..5a0fba9 100644
--- a/plugins/excel/ms-excel-write.c
+++ b/plugins/excel/ms-excel-write.c
@@ -2948,10 +2948,10 @@ excel_write_XF (BiffPut *bp, ExcelWriteState *ewb, BiffXFData *xfd)
diag = 0;
btype = xfd->border_type[STYLE_DIAGONAL];
if (btype != GNM_STYLE_BORDER_NONE)
- diag |= 1;
+ diag |= 2;
btype = xfd->border_type[STYLE_REV_DIAGONAL];
if (btype != GNM_STYLE_BORDER_NONE)
- diag |= 2;
+ diag |= 1;
tmp16 |= diag << 14;
GSF_LE_SET_GUINT16 (data+12, tmp16);
@@ -2965,7 +2965,7 @@ excel_write_XF (BiffPut *bp, ExcelWriteState *ewb, BiffXFData *xfd)
if (btype != GNM_STYLE_BORDER_NONE)
tmp32 |= (xfd->border_color[STYLE_BOTTOM] & 0x7f) << 7;
- diag = (diag & 1) ? STYLE_DIAGONAL : ((diag & 2) ? STYLE_REV_DIAGONAL : 0);
+ diag = (diag & 2) ? STYLE_DIAGONAL : ((diag & 1) ? STYLE_REV_DIAGONAL : 0);
if (diag != 0) {
btype = xfd->border_type [diag];
if (btype != GNM_STYLE_BORDER_NONE) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]