[gnumeric] some readability improvements



commit 54fc69707a97165ed59c2df29ea2298d4dbb34b3
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Wed Jun 17 21:56:15 2009 -0600

    some readability improvements
    
    2009-06-17 Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* openoffice-write.c (xl_find_format): use easier to follow style
    	  names
    	(odf_write_styles): write styles in a more natural order

 plugins/openoffice/ChangeLog          |    6 ++++++
 plugins/openoffice/openoffice-write.c |   13 +++++++------
 2 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index e561387..fe16f1e 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,11 @@
 2009-06-17 Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* openoffice-write.c (xl_find_format): use easier to follow style 
+	  names 
+	(odf_write_styles): write styles in a more natural order
+	
+2009-06-17 Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* openoffice-read.c (h_alignments): include right and left
 
 2009-06-17 Andreas J. Guelzow <aguelzow pyrshep ca>
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index b5466cc..5f96b27 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -448,15 +448,15 @@ xl_find_format (GnmOOExport *state, GOFormat const *format, int i)
 	switch (i) {
 	case 0: 
 		hash = state->xl_styles;
-		prefix = "ND-%i";
+		prefix = "ND+%i";
 		break;
 	case 1: 
 		hash = state->xl_styles_neg;
-		prefix = "ND--%i";
+		prefix = "ND-%i";
 		break;
 	default: 
 		hash = state->xl_styles_zero;
-		prefix = "ND0-%i";
+		prefix = "ND0%i";
 		break;
 	}
 
@@ -2686,7 +2686,8 @@ static void
 odf_write_xl_style (char const *xl, char const *name, GnmOOExport *state, int i)
 {
 	GOFormat *format;
-	if (xl == NULL) return;
+	if (xl == NULL)
+		xl = "General";
 	format = go_format_new_from_XL (xl);
 	go_format_output_to_odf (state->xml, format, i, name, state->with_extension);
 	go_format_unref (format);
@@ -2783,9 +2784,9 @@ odf_write_styles (GnmOOExport *state, GsfOutput *child)
 		gsf_xml_out_end_element (state->xml); /* </style:default-style */
 	}
 
-	g_hash_table_foreach (state->xl_styles_zero, (GHFunc) odf_write_this_xl_style_zero, state);
-	g_hash_table_foreach (state->xl_styles_neg, (GHFunc) odf_write_this_xl_style_neg, state);
 	g_hash_table_foreach (state->xl_styles, (GHFunc) odf_write_this_xl_style, state);
+	g_hash_table_foreach (state->xl_styles_neg, (GHFunc) odf_write_this_xl_style_neg, state);
+	g_hash_table_foreach (state->xl_styles_zero, (GHFunc) odf_write_this_xl_style_zero, state);
 	g_hash_table_foreach (state->xl_styles_conditional, (GHFunc) odf_write_this_conditional_xl_style, state);
 	
 	gsf_xml_out_end_element (state->xml); /* </office:styles> */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]