[gnumeric] Fix format selection on export. [#681316]



commit a804084c6ab2215c654c0cfba9cd62411d8bfef2
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Mon Aug 6 12:12:49 2012 -0600

    Fix format selection on export. [#681316]
    
    2012-08-06  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* src/gui-file.c (gui_file_save_as): use the default format whenever
    	specified

 ChangeLog      |    5 +++++
 NEWS           |    1 +
 src/gui-file.c |    8 +++++---
 3 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8630708..2c62849 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-06  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* src/gui-file.c (gui_file_save_as): use the default format whenever
+	specified
+
 2012-08-06  Jean Brefort  <jean brefort normalesup org>
 
 	* src/sheet-object-widget.c (sheet_widget_frame_set_label): fix label
diff --git a/NEWS b/NEWS
index 4904a08..57630ad 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,7 @@ Andreas:
 	* Add new autofilter op. [#647401]
 	* Provide new saver for uncompressed Gnumeric xml. [#672622]
 	* Do not change workbook save info when exporting. [#672323]
+	* Fix format selection on export. [#681316]
 
 Jean:
 	* Fix component references issues. [#680190]
diff --git a/src/gui-file.c b/src/gui-file.c
index aecbdad..4c5958b 100644
--- a/src/gui-file.c
+++ b/src/gui-file.c
@@ -581,10 +581,12 @@ gui_file_save_as (WBCGtk *wbcg, WorkbookView *wb_view, file_save_as_t type,
 		if (!fs || g_list_find (savers, fs) == NULL)
 			fs = go_file_saver_get_default ();
 	} else {
-		fs = workbook_get_file_exporter (wb);
+		if (default_format)
+			fs = go_file_saver_for_id (default_format);
+		else
+			fs = workbook_get_file_exporter (wb);
 		if (!fs || g_list_find (savers, fs) == NULL)
-			fs = go_file_saver_for_id (default_format ? default_format
-						   : "Gnumeric_html:latex_table");
+			fs = go_file_saver_for_id ("Gnumeric_html:latex_table");
 	}
 
 	gtk_combo_box_set_active (format_combo, g_list_index (savers, fs));



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