Commit 45cdc815 authored by Morten Welinder's avatar Morten Welinder

core: fix problem with remote uris.

parent 4435fa9f
2009-11-09 Morten Welinder <terra@gnome.org>
* src/workbook-view.c (wb_view_new_from_input): Add extra uri
argument. All callers changes. Fixes #601274.
2009-11-08 Morten Welinder <terra@gnome.org>
* src/xml-sax-write.c (xml_write_solver): Write target cell as
......
......@@ -11,6 +11,7 @@ Morten:
* Resurrect long-double support.
* More solver fixes.
* Plug another mps leak.
* Fix problem with remote uris. [#601274]
--------------------------------------------------------------------------
Gnumeric 1.9.15
......
......@@ -119,7 +119,7 @@ go_gnm_component_set_data (GOComponent *component)
g_object_set (G_OBJECT (io_context), "exec-main-loop", FALSE, NULL);
if (gognm->wv != NULL)
g_object_unref (gognm->wv);
gognm->wv = wb_view_new_from_input (input, NULL, io_context, NULL);
gognm->wv = wb_view_new_from_input (input, NULL, NULL, io_context, NULL);
g_object_unref (io_context);
gognm->sheet = wb_view_cur_sheet (gognm->wv);
sv = sheet_get_view (gognm->sheet, gognm->wv);
......@@ -199,7 +199,7 @@ go_gnm_component_edit (GOComponent *component)
GsfInput *input = gsf_input_memory_new (component->data, component->length, FALSE);
g_object_set (G_OBJECT (io_context), "exec-main-loop", FALSE, NULL);
wv = wb_view_new_from_input (input, NULL, io_context, NULL);
wv = wb_view_new_from_input (input, NULL, NULL, io_context, NULL);
g_object_unref (io_context);
}
set_uifilename ("Gnumeric-embed.xml", actions, G_N_ELEMENTS (actions));
......
......@@ -277,7 +277,7 @@ table_cellregion_read (WorkbookControl *wbc, char const *reader_id,
ioc = go_io_context_new (GO_CMD_CONTEXT (wbc));
input = gsf_input_memory_new (buffer, length, FALSE);
wb_view = wb_view_new_from_input (input, reader, ioc, NULL);
wb_view = wb_view_new_from_input (input, NULL, reader, ioc, NULL);
if (go_io_error_occurred (ioc) || wb_view == NULL) {
go_io_error_display (ioc);
goto out;
......
......@@ -3258,7 +3258,7 @@ scg_drag_receive_spreadsheet (SheetControlGUI *scg, const gchar *uri)
if (input != NULL) {
WorkbookView *wbv;
wbv = wb_view_new_from_input (input, NULL, ioc, NULL);
wbv = wb_view_new_from_input (input, uri, NULL, ioc, NULL);
if (wbv != NULL)
gui_wb_view_show (scg->wbcg,
wbv);
......
......@@ -1113,10 +1113,11 @@ wb_view_save (WorkbookView *wbv, GOCmdContext *context)
}
WorkbookView *
wb_view_new_from_input (GsfInput *input,
GOFileOpener const *optional_fmt,
GOIOContext *io_context,
char const *optional_enc)
wb_view_new_from_input (GsfInput *input,
const char *optional_uri,
GOFileOpener const *optional_fmt,
GOIOContext *io_context,
char const *optional_enc)
{
WorkbookView *new_wbv = NULL;
......@@ -1168,11 +1169,8 @@ wb_view_new_from_input (GsfInput *input,
new_wbv = workbook_view_new (NULL);
new_wb = wb_view_get_workbook (new_wbv);
if (NULL != (input_name = gsf_input_name (input))) {
char *uri = go_shell_arg_to_uri (input_name);
go_doc_set_uri (GO_DOC (new_wb), uri);
g_free (uri);
}
if (optional_uri)
go_doc_set_uri (GO_DOC (new_wb), optional_uri);
/* disable recursive dirtying while loading */
old = workbook_enable_recursive_dirty (new_wb, FALSE);
......@@ -1231,7 +1229,7 @@ wb_view_new_from_uri (char const *uri,
#if 0
g_printerr ("Reading %s\n", uri);
#endif
res = wb_view_new_from_input (input,
res = wb_view_new_from_input (input, uri,
optional_fmt, io_context,
optional_enc);
g_object_unref (G_OBJECT (input));
......
......@@ -90,10 +90,11 @@ void wbv_save_to_output (WorkbookView *wbv, GOFileSaver const *fs,
void wb_view_save_to_uri (WorkbookView *wbv, GOFileSaver const *fs,
char const *uri, GOIOContext *io_context);
WorkbookView *wb_view_new_from_input (GsfInput *input,
GOFileOpener const *optional_format,
GOIOContext *io_context,
gchar const *optional_encoding);
WorkbookView *wb_view_new_from_input (GsfInput *input,
const char *optional_uri,
GOFileOpener const *optional_format,
GOIOContext *io_context,
gchar const *optional_encoding);
WorkbookView *wb_view_new_from_uri (char const *uri,
GOFileOpener const *optional_format,
GOIOContext *io_context,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment