[gnumeric] xlsx: we're done with rich text, it seems.



commit f85ce2355a0bf273a4c5491b593d79fd39718357
Author: Morten Welinder <terra gnome org>
Date:   Tue Jun 3 20:06:06 2014 -0400

    xlsx: we're done with rich text, it seems.

 NEWS                       |    2 +-
 plugins/excel/xlsx-write.c |    6 +++---
 test/t6514-rich-text.pl    |    8 +++-----
 3 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/NEWS b/NEWS
index a9a8e2e..06e6af3 100644
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,7 @@ Morten:
        * Fix UMR.  [#730727]
        * Fix crashes on exit.  [#730857]  [#730884]
        * Handle value formats for xlsx export.  [#724517]
-       * Improve xlsx import/export of rich text.
+       * Improve xlsx import/export of rich text.  [#726189]
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.16
diff --git a/plugins/excel/xlsx-write.c b/plugins/excel/xlsx-write.c
index fc9f4f7..4ca0a1f 100644
--- a/plugins/excel/xlsx-write.c
+++ b/plugins/excel/xlsx-write.c
@@ -355,12 +355,12 @@ xlsx_write_rich_text (GsfXMLOut *xml, char const *text, PangoAttrList *attrs)
                        gsf_xml_out_end_element (xml); /* </u> */
                }
 
-               attr = pango_attr_iterator_get (iter, go_pango_attr_subscript_get_attr_type ());
-               if (attr && ((PangoAttrInt *) attr)->value)
-                       fs = GO_FONT_SCRIPT_SUB;
                attr = pango_attr_iterator_get (iter, go_pango_attr_superscript_get_attr_type ());
                if (attr && ((PangoAttrInt *) attr)->value)
                        fs = GO_FONT_SCRIPT_SUPER;
+               attr = pango_attr_iterator_get (iter, go_pango_attr_subscript_get_attr_type ());
+               if (attr && ((PangoAttrInt *) attr)->value)
+                       fs = GO_FONT_SCRIPT_SUB;
                if (fs != GO_FONT_SCRIPT_STANDARD) {
                        const char *va = (fs == GO_FONT_SCRIPT_SUB)
                                ? "subscript"
diff --git a/test/t6514-rich-text.pl b/test/t6514-rich-text.pl
index 8e1a649..66840d5 100755
--- a/test/t6514-rich-text.pl
+++ b/test/t6514-rich-text.pl
@@ -32,20 +32,18 @@ my $xls_supersub_filter = "$PERL -p -e 's{\\[superscript=1:3:5\\]\\[subscript=1:
                 'ext' => "xls",
                 'resize' => '16384x256',
                 'filter1' => $xls_supersub_filter,
-                'filter2' => $xls_codepage_filter,
-                'ignore_failure' => 1);
+                'filter2' => $xls_codepage_filter);
 
 &message ("Check rich text xls/BIFF8 roundtrip.");
 &test_roundtrip ($file,
                 'format' => 'Gnumeric_Excel:excel_biff8',
                 'ext' => "xls",
                 'filter1' => $xls_supersub_filter,
-                'filter2' => $xls_codepage_filter,
-                'ignore_failure' => 1);
+                'filter2' => $xls_codepage_filter);
 
 &message ("Check rich text xlsx roundtrip.");
 &test_roundtrip ($file,
                 'format' => 'Gnumeric_Excel:xlsx',
                 'ext' => "xlsx",
                 'resize' => '1048576x16384',
-                'ignore_failure' => 1);
+                'filter1' => $xls_supersub_filter);


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