[gnumeric] Fix ODF pagesetup roundtrip issue. [#724516]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix ODF pagesetup roundtrip issue. [#724516]
- Date: Fri, 21 Feb 2014 04:47:49 +0000 (UTC)
commit 26de3a946560c5654a1a79e68f95deef256b49bc
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Thu Feb 20 21:47:02 2014 -0700
Fix ODF pagesetup roundtrip issue. [#724516]
2014-02-20 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-write.c (odf_render_date*): don't create an unnecessary
format string
(odf_render_time*): ditto
NEWS | 1 +
plugins/openoffice/ChangeLog | 5 +++++
plugins/openoffice/openoffice-write.c | 24 ++++++++++--------------
3 files changed, 16 insertions(+), 14 deletions(-)
---
diff --git a/NEWS b/NEWS
index e34d736..e02b1fb 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ Andreas:
* Fix ODF error constant roundtrip issue. [part of #724568]
* Fix import of underlines from LO-generated ODF files. [part of #724763]
* Fix ODF viewport roundtrip issue. [#724761]
+ * Fix ODF pagesetup roundtrip issue. [#724516]
Jean:
* Fix persistence of hyperlinks tips. [see #724108]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 6628d39..ed20fcd 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,10 @@
2014-02-20 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * openoffice-write.c (odf_render_date*): don't create an unnecessary
+ format string
+ (odf_render_time*): ditto
+2014-02-20 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* openoffice-read.c (odf_apply_ooo_table_config): set viewport
(openoffice_file_open): use some ooo configs even if we have
foreign elements
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 166ec2b..55176ee 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -4985,11 +4985,10 @@ odf_render_pages (GnmOOExport *state, G_GNUC_UNUSED char const *args)
static void
odf_render_date (GnmOOExport *state, char const *args)
{
- const char *style_name;
+ const char *style_name = NULL;
- if (args == NULL)
- args = "dd-mmm-yyyy";
- style_name = xl_find_format_xl (state, args, 0);
+ if (args != NULL)
+ style_name = xl_find_format_xl (state, args, 0);
gsf_xml_out_start_element (state->xml, TEXT "date");
if (style_name)
@@ -5001,19 +5000,17 @@ odf_render_date (GnmOOExport *state, char const *args)
static void
odf_render_date_to_xl (GnmOOExport *state, char const *args)
{
- if (args == NULL)
- args = "dd-mmm-yyyy";
- (void)xl_find_format_xl (state, args, 0);
+ if (args != NULL)
+ xl_find_format_xl (state, args, 0);
}
static void
odf_render_time (GnmOOExport *state, char const *args)
{
- const char *style_name;
+ const char *style_name = NULL;
- if (args == NULL)
- args = "hh:mm";
- style_name = xl_find_format_xl (state, args, 0);
+ if (args != NULL)
+ style_name = xl_find_format_xl (state, args, 0);
gsf_xml_out_start_element (state->xml, TEXT "time");
if (style_name)
@@ -5024,9 +5021,8 @@ odf_render_time (GnmOOExport *state, char const *args)
static void
odf_render_time_to_xl (GnmOOExport *state, char const *args)
{
- if (args == NULL)
- args = "hh:mm";
- (void)xl_find_format_xl (state, args, 0);
+ if (args != NULL)
+ xl_find_format_xl (state, args, 0);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]