[gnumeric] Fix html export [#586028]



commit 991be540c527a89df5c38676591bc6131e320fac
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Tue Jun 16 19:20:58 2009 -0600

    Fix html export [#586028]
    
    2009-06-16  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* html.c (html_new_markup): The range corresponding to a PANGO
    	  iterator can be rally strange.

 NEWS                   |    1 +
 plugins/html/ChangeLog |    5 +++++
 plugins/html/html.c    |    3 ++-
 3 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index abbfcae..46e72a2 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,7 @@ Andreas:
 	* Some minor menu rearrangement
 	* Let the sort dialog guess whether there is a header
 	* Fix xls import of sheet labels [#586066]
+	* Fix html export [#586028]
 
 Jody:
 	* GOString start of richtext and phonetic support.
diff --git a/plugins/html/ChangeLog b/plugins/html/ChangeLog
index 1f76f5e..ef5940d 100644
--- a/plugins/html/ChangeLog
+++ b/plugins/html/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-16  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* html.c (html_new_markup): The range corresponding to a PANGO
+	  iterator can be rally strange.
+
 2009-05-23  Morten Welinder <terra gnome org>
 
 	* Release 1.9.8
diff --git a/plugins/html/html.c b/plugins/html/html.c
index b36339b..1252ebc 100644
--- a/plugins/html/html.c
+++ b/plugins/html/html.c
@@ -218,7 +218,8 @@ html_new_markup (GsfOutput *output, const PangoAttrList *markup, char const *tex
 		
 		g_string_erase (closure, 0, -1);
 		pango_attr_iterator_range (iter, &from, &to);
-		to = (to > len) ? len : to; /* Since "to" can be really big! */
+		from = (from > len) ? len : from; /* Since "from" can be really big! */
+		to = (to > len) ? len : to;       /* Since "to" can be really big!   */
 		if (from > handled)
 			cb_html_add_chars (output, text + handled, from - handled);
 		list = pango_attr_iterator_get_attrs (iter);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]