[gnumeric] ods: fix rich text problem.



commit 0f5ad9ee2fec6f4c0370c75e9fb7e546f45e86e5
Author: Morten Welinder <terra gnome org>
Date:   Thu Sep 11 08:42:07 2014 -0400

    ods: fix rich text problem.

 NEWS                                 |    1 +
 plugins/openoffice/ChangeLog         |    6 ++++++
 plugins/openoffice/openoffice-read.c |    4 ++--
 3 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index 7ee4841..425fe6e 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ Morten:
        * Fix xlsx export problem for strings.  [#736202]
        * Improve xlsx import of rich text.
        * Text suite improvements.
+       * Fix minor ods rich text import problem.
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.17
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 92eaca3..65627ea 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,9 @@
+2014-09-11  Morten Welinder  <terra gnome org>
+
+       * openoffice-read.c (odf_text_p_apply_pango_attribute): Use
+       pango_attr_list_change, not pango_attr_list_insert_before.  The
+       latter does not merge ranges.
+
 2014-06-09  Morten Welinder <terra gnome org>
 
        * Release 1.12.17
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 1961f79..cc9f13c 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -678,7 +678,7 @@ oo_attr_font_weight (GsfXMLIn *xin, xmlChar const * const *attrs,
                return TRUE;
        }
        return oo_attr_int_range (xin, attrs, OO_NS_FO, "font-weight",
-                                   res, 0, 1000);
+                                 res, 0, 1000);
 }
 
 
@@ -1660,7 +1660,7 @@ odf_text_p_apply_pango_attribute (PangoAttribute *attribute, gpointer ptr)
        attr->start_index = data->start;
        attr->end_index = data->end;
 
-       pango_attr_list_insert_before (data->attrs, attr);
+       pango_attr_list_change (data->attrs, attr);
 
        return FALSE;
 }


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