[gnumeric] Fix import & export of cell indent from/to ODF.
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix import & export of cell indent from/to ODF.
- Date: Mon, 17 Mar 2014 06:22:53 +0000 (UTC)
commit c17644ba8866c769b450c1b39d7a11f2526c2aa6
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Mon Mar 17 00:22:26 2014 -0600
Fix import & export of cell indent from/to ODF.
2014-03-17 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-write.c (odf_write_style_paragraph_properties): our indent
is fo:margin-left, not fo:indent
* openoffice-read.c (oo_style_prop_cell): read fo:margin-left
NEWS | 1 +
plugins/openoffice/ChangeLog | 6 ++++++
plugins/openoffice/openoffice-read.c | 4 ++++
plugins/openoffice/openoffice-write.c | 2 +-
4 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 43f3188..b1b593d 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ Andreas:
* Fix distributed-alignment export to ODF. [part of #726035]
* Fix ODF roundtrip of "center accross selection". [#726010]
* Fix ODF roundtrip of conditional formats. [#726201]
+ * Fix import & export of cell indent from/to ODF.
Jean:
* Fix tooltip position for scale or RTL sheets. [#725941]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 84a400d..d4d8864 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,9 @@
+2014-03-17 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * openoffice-write.c (odf_write_style_paragraph_properties): our indent
+ is fo:margin-left, not fo:indent
+ * openoffice-read.c (oo_style_prop_cell): read fo:margin-left
+
2014-03-15 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-write.c (odf_write_style_paragraph_properties): only
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index c08db2b..9229138 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -6338,6 +6338,10 @@ oo_style_prop_cell (GsfXMLIn *xin, xmlChar const **attrs)
gnm_style_set_font_script (style, GO_FONT_SCRIPT_SUPER);
else if (g_str_has_prefix (attrs[1], "sub"))
gnm_style_set_font_script (style, GO_FONT_SCRIPT_SUB);
+ } else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_FO, "margin-left")) {
+ tmp_f = 0.;
+ oo_parse_distance (xin, attrs[1], "margin-left", &tmp_f);
+ gnm_style_set_indent (style, tmp_f);
}
if (strike_through_style != -1 || strike_through_type != -1)
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index d3e8251..a0b587e 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -1400,7 +1400,7 @@ odf_write_style_paragraph_properties (GnmOOExport *state, GnmStyle const *style)
/* Text Indent */
if (gnm_style_is_element_set (style, MSTYLE_INDENT))
- odf_add_pt (state->xml, FOSTYLE "text-indent", gnm_style_get_indent (style));
+ odf_add_pt (state->xml, FOSTYLE "margin-left", gnm_style_get_indent (style));
gsf_xml_out_end_element (state->xml); /* </style:paragraph-properties */
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]