[gnumeric] xls: improve the rich text import situation for.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xls: improve the rich text import situation for.
- Date: Wed, 7 Mar 2012 22:01:01 +0000 (UTC)
commit 335c36ec22a0e000525ac63f55cd756c96d3a0d7
Author: Morten Welinder <terra gnome org>
Date: Wed Mar 7 17:00:02 2012 -0500
xls: improve the rich text import situation for.
We were using the wrong text length for RSTRING. Things are not
perfect yet.
ChangeLog | 5 +++++
NEWS | 1 +
plugins/excel/ms-excel-read.c | 7 ++++++-
plugins/excel/ms-excel-write.c | 2 +-
4 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c5c7d9f..ea56437 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-07 Morten Welinder <terra gnome org>
+
+ * plugins/excel/ms-excel-read.c (excel_read_LABEL): supply the
+ byte length to excel_read_LABEL_markup, not the character length.
+
2012-03-06 Morten Welinder <terra gnome org>
* src/application.c (install_icons): Move icon installation to
diff --git a/NEWS b/NEWS
index b60b053..2a82d90 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ Morten:
* Fix xls save crash. [#671267]
* Fix xls page break export. [Part of #671513]
* Fix xls export of conditional formats' font. [Part of #671513]
+ * Improve xls import of rich text. [Part of #671513]
--------------------------------------------------------------------------
Gnumeric 1.11.2
diff --git a/plugins/excel/ms-excel-read.c b/plugins/excel/ms-excel-read.c
index 2b1923b..2f656ce 100644
--- a/plugins/excel/ms-excel-read.c
+++ b/plugins/excel/ms-excel-read.c
@@ -1187,6 +1187,11 @@ excel_read_LABEL_markup (BiffQuery *q, ExcelReadSheet *esheet,
TXORun txo_run;
unsigned n;
+ d (0, {
+ g_printerr ("strlen=%d len=%d\n", str_len, (int)strlen (str));
+ ms_biff_query_dump (q);
+ });
+
txo_run.last = G_MAXINT;
if (esheet_ver (esheet) >= MS_BIFF_V8) {
@@ -6322,7 +6327,7 @@ excel_read_LABEL (BiffQuery *q, ExcelReadSheet *esheet, gboolean has_markup)
if (txt != NULL) {
GOFormat *fmt = NULL;
if (has_markup)
- fmt = excel_read_LABEL_markup (q, esheet, txt, strlen (txt));
+ fmt = excel_read_LABEL_markup (q, esheet, txt, str_len);
/* might free txt, do not do this until after parsing markup */
v = value_new_string_nocopy (txt);
diff --git a/plugins/excel/ms-excel-write.c b/plugins/excel/ms-excel-write.c
index ac27635..b931e2b 100644
--- a/plugins/excel/ms-excel-write.c
+++ b/plugins/excel/ms-excel-write.c
@@ -3444,7 +3444,7 @@ excel_write_RSTRING (ExcelWriteState *ewb, GnmCell const *cell, unsigned xf)
EX_SETXF (buf, xf);
ms_biff_put_var_write (ewb->bp, buf, 6);
excel_write_string (ewb->bp, STR_TWO_BYTE_LENGTH,
- cell->value->v_str.val->str);
+ value_peek_string (cell->value));
n = txo->len / 2;
if (ewb->bp->version < MS_BIFF_V8) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]