[goffice] GOFormat: improve ods output for "General".
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] GOFormat: improve ods output for "General".
- Date: Thu, 27 Mar 2014 11:57:33 +0000 (UTC)
commit 93f5ffd4e77debd602c5f5760da112a46c8bc036
Author: Morten Welinder <terra gnome org>
Date: Thu Mar 27 07:57:11 2014 -0400
GOFormat: improve ods output for "General".
ChangeLog | 5 +++++
goffice/utils/go-format.c | 17 +++++++----------
2 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f2688b6..b3c364a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-27 Morten Welinder <terra gnome org>
+
+ * goffice/utils/go-format.c (go_format_output_general_to_odf):
+ Match what LO does for "General".
+
2014-03-26 Morten Welinder <terra gnome org>
* goffice/utils/go-format.c (go_format_output_conditional_to_odf):
diff --git a/goffice/utils/go-format.c b/goffice/utils/go-format.c
index 0caf745..f40d680 100644
--- a/goffice/utils/go-format.c
+++ b/goffice/utils/go-format.c
@@ -8169,7 +8169,7 @@ go_format_output_number_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
ODF_WRITE_NUMBER;
if (family == GO_FORMAT_CURRENCY) {
ODF_CLOSE_STRING;
- gsf_xml_out_simple_element(xout, NUMBER "currency-symbol", "$");
+ gsf_xml_out_simple_element (xout, NUMBER "currency-symbol", "$");
}
break;
@@ -8241,7 +8241,7 @@ go_format_output_number_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
char *str;
ODF_CLOSE_STRING;
str = g_strndup (token, len);
- gsf_xml_out_simple_element(xout, NUMBER "currency-symbol", str);
+ gsf_xml_out_simple_element (xout, NUMBER "currency-symbol", str);
g_free (str);
} else {
ODF_OPEN_STRING;
@@ -8264,7 +8264,7 @@ go_format_output_number_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
char *str;
ODF_CLOSE_STRING;
str = g_strndup (token, len);
- gsf_xml_out_simple_element(xout, NUMBER "currency-symbol", str);
+ gsf_xml_out_simple_element (xout, NUMBER "currency-symbol", str);
g_free (str);
}
}
@@ -8603,18 +8603,15 @@ go_format_output_scientific_number_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
static void
go_format_output_general_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
- char const *name, int cond_part)
+ char const *name)
{
gsf_xml_out_start_element (xout, NUMBER "number-style");
gsf_xml_out_add_cstr (xout, STYLE "name", name);
odf_output_color (xout, fmt);
- if (cond_part == 1)
- gsf_xml_out_simple_element(xout, NUMBER "text", "\xe2\x88\x92");
gsf_xml_out_start_element (xout, NUMBER "number");
- gsf_xml_out_add_int (xout, NUMBER "decimal-places", 2);
- if (cond_part == 1)
- gsf_xml_out_add_int (xout, NUMBER "display-factor", -1);
+ gsf_xml_out_add_int (xout, NUMBER "min-integer-digits", 1);
gsf_xml_out_end_element (xout); /* </number:number> */
+ gsf_xml_out_simple_element (xout, NUMBER "text", NULL);
/* keep element open */
}
@@ -8639,7 +8636,7 @@ go_format_output_simple_to_odf (GsfXMLOut *xout, gboolean with_extension,
switch (family) {
case GO_FORMAT_GENERAL:
- go_format_output_general_to_odf (xout, fmt, name, cond_part);
+ go_format_output_general_to_odf (xout, fmt, name);
result = FALSE;
break;
case GO_FORMAT_DATE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]