[gnumeric] xls: don't write hyperlinks to biff7
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xls: don't write hyperlinks to biff7
- Date: Sat, 18 Feb 2017 23:38:32 +0000 (UTC)
commit 98b56f5397520ea49a95202d8bf07ebd5ed0e364
Author: Morten Welinder <terra gnome org>
Date: Sat Feb 18 18:36:42 2017 -0500
xls: don't write hyperlinks to biff7
The records are meant for biff8 only and need to be written with unicode
which we end up doing wrong.
NEWS | 1 +
plugins/excel/ChangeLog | 3 +++
plugins/excel/ms-excel-write.c | 5 ++++-
test/t6522-hlink.pl | 1 +
4 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 9910db4..9a4304f 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ Morten:
* Fix xlsx import with missing header/footer. [#778292]
* Minor xlsx import improvements with alias colors.
* Test suite improvements.
+ * Improve Excel handling of hyperlinks.
--------------------------------------------------------------------------
Gnumeric 1.12.33
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 01ba9cc..07fe1f2 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,5 +1,8 @@
2017-02-18 Morten Welinder <terra gnome org>
+ * ms-excel-write.c (excel_write_sheet): Don't write hyperlinks to
+ biff7 and before. The strings come out wrong.
+
* xlsx-write.c (xlsx_write_hlinks): Impose an ordering on links.
2017-02-16 Jean Brefort <jean brefort normalesup org>
diff --git a/plugins/excel/ms-excel-write.c b/plugins/excel/ms-excel-write.c
index cca996c..ce4832d 100644
--- a/plugins/excel/ms-excel-write.c
+++ b/plugins/excel/ms-excel-write.c
@@ -5712,7 +5712,10 @@ excel_write_sheet (ExcelWriteState *ewb, ExcelWriteSheet *esheet)
* things will just ignore them */
excel_write_MERGECELLs (ewb->bp, esheet);
excel_write_conditions (ewb->bp, esheet);
- excel_write_HLINKs (ewb->bp, esheet);
+ if (ewb->bp->version >= MS_BIFF_V8) {
+ // We won't write these right pre-v8
+ excel_write_HLINKs (ewb->bp, esheet);
+ }
excel_write_DVALs (ewb->bp, esheet);
excel_write_SHEETPROTECTION (ewb->bp, esheet->gnum_sheet);
diff --git a/test/t6522-hlink.pl b/test/t6522-hlink.pl
index e0c3c20..2d8a6d2 100755
--- a/test/t6522-hlink.pl
+++ b/test/t6522-hlink.pl
@@ -4,6 +4,7 @@
use strict;
use lib ($0 =~ m|^(.*/)| ? $1 : ".");
use GnumericTest;
+$GnumericTest::default_subtests = '*,-biff7';
my $file = "$samples/hlink-tests.gnumeric";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]