[gnumeric] Make ODF import handling of strike-through match LO. [#686789]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Make ODF import handling of strike-through match LO. [#686789]
- Date: Sat, 27 Oct 2012 01:02:13 +0000 (UTC)
commit 14bdca0482ea5d47b890cf081e88b2eef64a7b90
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Fri Oct 26 19:01:46 2012 -0600
Make ODF import handling of strike-through match LO. [#686789]
2012-10-26 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-read.c (oo_style_prop_cell): make strike-through handling
match LO behaviour.
NEWS | 1 +
plugins/openoffice/ChangeLog | 5 +++++
plugins/openoffice/openoffice-read.c | 9 +++++----
3 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/NEWS b/NEWS
index b24e420..9dbb854 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ Gnumeric 1.11.7
Andreas:
* Fix ODF export of conditional styles including data styles. [#683739]
* Fix encounter with macro sheets on xls import. [#684646]
+ * Make ODF import handling of strike-through match LO. [#686789]
Jean:
* Fixed indentation in cell format dialog. [#683576]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 2f468a4..a63a1af 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-26 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * openoffice-read.c (oo_style_prop_cell): make strike-through handling
+ match LO behaviour.
+
2012-10-15 Morten Welinder <terra gnome org>
* openoffice-write.c (odf_write_content_rows): Merge boring rows
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 641f8b6..af33684 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -6043,7 +6043,7 @@ oo_style_prop_cell (GsfXMLIn *xin, xmlChar const **attrs)
int tmp;
gnm_float tmp_f;
gboolean v_alignment_is_fixed = FALSE;
- int strike_through_type = 0, strike_through_style = 0;
+ int strike_through_type = -1, strike_through_style = -1;
g_return_if_fail (style != NULL);
@@ -6150,9 +6150,9 @@ oo_style_prop_cell (GsfXMLIn *xin, xmlChar const **attrs)
else if (oo_attr_font_weight (xin, attrs, &tmp))
gnm_style_set_font_bold (style, tmp >= PANGO_WEIGHT_SEMIBOLD);
else if (oo_attr_enum (xin, attrs, OO_NS_STYLE, "text-line-through-style",
- text_line_through_styles, &strike_through_type));
+ text_line_through_styles, &strike_through_style));
else if (oo_attr_enum (xin, attrs, OO_NS_STYLE, "text-line-through-type",
- text_line_through_types, &strike_through_style));
+ text_line_through_types, &strike_through_type));
#if 0
else if (!strcmp (attrs[0], OO_NS_FO, "font-weight")) {
@@ -6165,7 +6165,8 @@ oo_style_prop_cell (GsfXMLIn *xin, xmlChar const **attrs)
}
#endif
- gnm_style_set_font_strike (style, strike_through_type == 1 && strike_through_style == 1);
+ gnm_style_set_font_strike (style, strike_through_style > 0 ||
+ (strike_through_type > 0 && strike_through_style == -1));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]