[gnumeric] Fix reading richtext in xls objects.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnumeric] Fix reading richtext in xls objects.
- Date: Wed, 22 Apr 2009 15:15:20 -0400 (EDT)
commit 2feb5a210205bb450ae65336a8e7e588842606d0
Author: Morten Welinder <terra gnome org>
Date: Wed Apr 22 15:14:54 2009 -0400
Fix reading richtext in xls objects.
---
plugins/excel/ChangeLog | 5 +++++
plugins/excel/ms-container.c | 9 ++-------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 894eba9..f7d0c10 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-22 Morten Welinder <terra gnome org>
+
+ * ms-container.c (ms_container_read_markup): Fix badly
+ misunderstood field. Fixes #579835.
+
2009-04-16 Jean Brefort <jean brefort normalesup org>
* ms-chart.c: (get_style): create a GogStyle object, not a GOStyle.
diff --git a/plugins/excel/ms-container.c b/plugins/excel/ms-container.c
index 32b7421..ed94e91 100644
--- a/plugins/excel/ms-container.c
+++ b/plugins/excel/ms-container.c
@@ -271,17 +271,12 @@ ms_container_read_markup (MSContainer const *c,
txo_run.accum = pango_attr_list_new ();
for (txo_len -= 16 ; (gssize)txo_len >= 0 ; txo_len -= 8) {
guint16 o = GSF_LE_GET_GUINT16 (data + txo_len);
- guint16 l = GSF_LE_GET_GUINT16 (data + txo_len + 2);
-#if 0
- if (o + l > str_len)
- g_printerr ("%d %d %d [%s]\n",o, l, str_len, str);
-#endif
- XL_CHECK_CONDITION_VAL (o + l <= str_len, txo_run.accum);
+ guint16 idx = GSF_LE_GET_GUINT16 (data + txo_len + 2);
txo_run.first = g_utf8_offset_to_pointer (str, o) - str;
XL_CHECK_CONDITION_VAL (txo_run.first < txo_run.last, txo_run.accum);
- pango_attr_list_filter (ms_container_get_markup (c, l),
+ pango_attr_list_filter (ms_container_get_markup (c, idx),
(PangoAttrFilterFunc) append_txorun,
&txo_run);
txo_run.last = txo_run.first;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]