[gnumeric] Print warning on ODF file invalid master page style
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Print warning on ODF file invalid master page style
- Date: Tue, 26 Jul 2011 19:37:02 +0000 (UTC)
commit 7d523c2eda73ddd70b71c3fbaa589a3491566e4b
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Tue Jul 26 13:36:00 2011 -0600
Print warning on ODF file invalid master page style
2011-07-26 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-read.c (odf_master_page): show warning on missing style names
plugins/openoffice/ChangeLog | 6 +++++-
plugins/openoffice/openoffice-read.c | 10 ++++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 81b6694..dc88bdf 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,6 +1,10 @@
2011-07-26 Andreas J. Guelzow <aguelzow pyrshep ca>
- * openoffice-read.c (odf_master_page): initialize pi;
+ * openoffice-read.c (odf_master_page): show warning on missing style names
+
+2011-07-26 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * openoffice-read.c (odf_master_page): initialize pi
2011-07-18 Andreas J. Guelzow <aguelzow pyrshep ca>
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 2849fa8..4963182 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -4622,14 +4622,20 @@ odf_master_page (GsfXMLIn *xin, xmlChar const **attrs)
if (name != NULL) {
if (pl_name != NULL)
pi = g_hash_table_lookup (state->styles.page_layouts, pl_name);
- state->print.cur_pi = (pi == NULL) ? print_info_new (TRUE) : print_info_dup (pi);
+ if (pi == NULL) {
+ oo_warning (xin, _("Master page style without page layout encountered!"));
+ state->print.cur_pi = print_info_new (TRUE);
+ } else
+ state->print.cur_pi = print_info_dup (pi);
print_hf_free (state->print.cur_pi->header);
print_hf_free (state->print.cur_pi->footer);
state->print.cur_pi->header = print_hf_new (NULL, NULL, NULL);
state->print.cur_pi->footer = print_hf_new (NULL, NULL, NULL);
g_hash_table_insert (state->styles.master_pages, g_strdup (name), state->print.cur_pi);
- }
+ } else
+ oo_warning (xin, _("Master page style without name encountered!"));
+
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]