gnumeric r17233 - trunk/plugins/excel
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r17233 - trunk/plugins/excel
- Date: Fri, 20 Mar 2009 20:56:46 +0000 (UTC)
Author: mortenw
Date: Fri Mar 20 20:56:45 2009
New Revision: 17233
URL: http://svn.gnome.org/viewvc/gnumeric?rev=17233&view=rev
Log:
Handle file errors a tiny bit better.
Modified:
trunk/plugins/excel/ms-container.c
trunk/plugins/excel/ms-excel-read.c
Modified: trunk/plugins/excel/ms-container.c
==============================================================================
--- trunk/plugins/excel/ms-container.c (original)
+++ trunk/plugins/excel/ms-container.c Fri Mar 20 20:56:45 2009
@@ -271,14 +271,15 @@
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);
- XL_CHECK_CONDITION_VAL (o + l <= str_len,
- (pango_attr_list_unref (txo_run.accum),
- NULL));
+#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);
txo_run.first = g_utf8_offset_to_pointer (str, o) - str;
- XL_CHECK_CONDITION_VAL (txo_run.first < txo_run.last,
- (pango_attr_list_unref (txo_run.accum), NULL));
-
+ XL_CHECK_CONDITION_VAL (txo_run.first < txo_run.last, txo_run.accum);
+
pango_attr_list_filter (ms_container_get_markup (c, l),
(PangoAttrFilterFunc) append_txorun,
&txo_run);
Modified: trunk/plugins/excel/ms-excel-read.c
==============================================================================
--- trunk/plugins/excel/ms-excel-read.c (original)
+++ trunk/plugins/excel/ms-excel-read.c Fri Mar 20 20:56:45 2009
@@ -1091,13 +1091,11 @@
o = GSF_LE_GET_GUINT16 (ptr + n);
l = GSF_LE_GET_GUINT16 (ptr + n + 2);
XL_CHECK_CONDITION_VAL (o + l <= str_len,
- (pango_attr_list_unref (txo_run.accum),
- NULL));
+ go_format_new_markup (txo_run.accum, FALSE));
txo_run.first = g_utf8_offset_to_pointer (str, o) - str;
XL_CHECK_CONDITION_VAL (txo_run.first < txo_run.last,
- (pango_attr_list_unref (txo_run.accum),
- NULL));
+ go_format_new_markup (txo_run.accum, FALSE));
pango_attr_list_filter (ms_container_get_markup (c, l),
(PangoAttrFilterFunc) append_markup,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]