Commit d4b73077 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

init valid to false in case value_coerce_to_number fails and does not set


2006-03-18  Jody Goldberg <jody@gnome.org>

	* src/graph.c (gnm_go_data_vector_get_value) : init valid to false
	  in case value_coerce_to_number fails and does not set it.

	* src/gnumeric-pane.c (cb_sheet_object_view_destroyed) : handle life
	  cycle change.

2005-12-28  Jody Goldberg <jody@gnome.org>

	* src/workbook.c : Move to GsfDocMetaData

	* src/commands.c (cmd_change_meta_data*) : re-work for new metadata
	  structure.

	* src/Makefile.am : remove the defunct summary.[ch]

	* src/GNOME_Gnumeric-gtk.xml.in : enable the new dialog in place of
	  the old one.
	* src/wbcg-actions.c : ditto.
parent 9781157f
2006-03-18 Jody Goldberg <jody@gnome.org>
* src/graph.c (gnm_go_data_vector_get_value) : init valid to false
in case value_coerce_to_number fails and does not set it.
* src/gnumeric-pane.c (cb_sheet_object_view_destroyed) : handle life
cycle change.
2006-03-18 Morten Welinder <terra@gnome.org>
* src/gnumeric-pane.c (cb_sheet_object_view_destroyed): Fix crash
......@@ -535,6 +543,19 @@
* schemas/gnumeric-dialogs.schemas.in (unfocused): Fix a typo
in the description.
2005-12-28 Jody Goldberg <jody@gnome.org>
* src/workbook.c : Move to GsfDocMetaData
* src/commands.c (cmd_change_meta_data*) : re-work for new metadata
structure.
* src/Makefile.am : remove the defunct summary.[ch]
* src/GNOME_Gnumeric-gtk.xml.in : enable the new dialog in place of
the old one.
* src/wbcg-actions.c : ditto.
2005-12-22 Morten Welinder <terra@gnome.org>
* src/workbook.c (workbook_cells): Remove the variables orphaned by
......
......@@ -18,6 +18,7 @@ Jody:
* Make sheet name quoting modular.
* AREAS handles error conditions better.
* Make Array formulas use less memory
* Move Workbook::uri and ::dirty into GODoc
Klokan Pridal:
* Implement xml saving/loading of "protected" attribute. [#334257]
......
2006-03-18 Jody Goldberg <jody@gnome.org>
* src/graph.c (gnm_go_data_vector_get_value) : init valid to false
in case value_coerce_to_number fails and does not set it.
* src/gnumeric-pane.c (cb_sheet_object_view_destroyed) : handle life
cycle change.
2006-03-18 Morten Welinder <terra@gnome.org>
* src/gnumeric-pane.c (cb_sheet_object_view_destroyed): Fix crash
......@@ -535,6 +543,19 @@
* schemas/gnumeric-dialogs.schemas.in (unfocused): Fix a typo
in the description.
2005-12-28 Jody Goldberg <jody@gnome.org>
* src/workbook.c : Move to GsfDocMetaData
* src/commands.c (cmd_change_meta_data*) : re-work for new metadata
structure.
* src/Makefile.am : remove the defunct summary.[ch]
* src/GNOME_Gnumeric-gtk.xml.in : enable the new dialog in place of
the old one.
* src/wbcg-actions.c : ditto.
2005-12-22 Morten Welinder <terra@gnome.org>
* src/workbook.c (workbook_cells): Remove the variables orphaned by
......
......@@ -1532,7 +1532,7 @@ applix_read (IOContext *io_context, WorkbookView *wb_view, GsfInput *src)
state.input = (GsfInputTextline *)gsf_input_textline_new (src);
state.parse_error = NULL;
state.wb_view = wb_view;
state.wb = wb_view_workbook (wb_view);
state.wb = wb_view_get_workbook (wb_view);
state.exprs = g_hash_table_new (&g_str_hash, &g_str_equal);
state.styles = g_hash_table_new (&g_str_hash, &g_str_equal);
state.colors = g_ptr_array_new ();
......
......@@ -75,7 +75,7 @@ applix_write_header (ApplixWriteState const *state)
#warning "FIXME: filename is fs encoded; that's not right, but neither is UTF-8."
gsf_output_printf (state->sink,
"Current Doc Real Name: %s",
workbook_get_uri (state->wb));
go_doc_get_uri (GO_DOC (state->wb)));
}
static void
......@@ -92,7 +92,7 @@ applix_write (IOContext *io_context, WorkbookView const *wb_view, GsfOutput *sin
state.sink = sink;
state.parse_error = NULL;
state.wb_view = wb_view;
state.wb = wb_view_workbook (wb_view);
state.wb = wb_view_get_workbook (wb_view);
d (1, fprintf (stderr, "------------Start writing"););
applix_write_header (&state);
......
......@@ -4,7 +4,7 @@
* corba-workbook.c: A WorkbookControl for use by CORBA that implements the
* Gnumeric::Workbook interface.
*
* Copyright (C) 2002 Jody Goldberg (jody@gnome.org)
* Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
......@@ -32,8 +32,9 @@
#include <ranges.h>
#include <sheet.h>
#include <command-context.h>
#include <goffice/app/go-cmd-context-impl.h>
#include <goffice/app/go-doc.h>
#include <goffice/app/go-cmd-context-impl.h>
#include <gsf/gsf-impl-utils.h>
#include <bonobo/bonobo-main.h>
#include <bonobo/bonobo-exception.h>
......@@ -55,43 +56,45 @@ typedef struct {
static WorkbookControlCORBA *
wbcc_from_servant (PortableServer_Servant serv)
{
WorkbookControlCORBA *wbcc = (WorkbookControlCORBA *)(((char *)serv) - G_STRUCT_OFFSET (WorkbookControlCORBA, servant));
WorkbookControlCORBA *wbcc =
(WorkbookControlCORBA *)(((char *)serv) - G_STRUCT_OFFSET (WorkbookControlCORBA, servant));
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbcc), NULL);
return wbcc;
}
static Workbook *
wb_from_servant (PortableServer_Servant serv)
{
WorkbookControlCORBA *wbcc = wbcc_from_servant (serv);
return wb_control_get_workbook (WORKBOOK_CONTROL (wbcc));
}
static CORBA_string
cworkbook_get_name (PortableServer_Servant servant,
CORBA_Environment *ev)
{
WorkbookControlCORBA *wbcc = wbcc_from_servant (servant);
Workbook *wb = wb_control_workbook (WORKBOOK_CONTROL (wbcc));
return CORBA_string_dup (workbook_get_uri (wb));
Workbook *wb = wb_from_servant (servant);
return CORBA_string_dup (go_doc_get_uri (GO_DOC (wb)));
}
static void
cworkbook_set_name (PortableServer_Servant servant, CORBA_char const *name,
CORBA_Environment *ev)
{
WorkbookControlCORBA *wbcc = wbcc_from_servant (servant);
Workbook *wb = wb_control_workbook (WORKBOOK_CONTROL (wbcc));
Workbook *wb = wb_from_servant (servant);
g_return_if_fail (wbcc != NULL);
workbook_set_uri (wb, name);
g_return_if_fail (wb != NULL);
go_doc_set_uri (GO_DOC (wb), name);
}
static GNOME_Gnumeric_Sheet
cworkbook_sheet_by_index (PortableServer_Servant servant, CORBA_short i,
CORBA_Environment *ev)
{
WorkbookControlCORBA *wbcc = wbcc_from_servant (servant);
Sheet *sheet;
g_return_val_if_fail (wbcc != NULL, CORBA_OBJECT_NIL);
sheet = workbook_sheet_by_index (wb_control_workbook (WORKBOOK_CONTROL (wbcc)), i);
Sheet *sheet = workbook_sheet_by_index (wb_from_servant (servant), i);
if (sheet != NULL) {
/* CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_GNOME_Gnumeric_Workbook_NameExists, NULL); */
}
......@@ -103,12 +106,7 @@ static GNOME_Gnumeric_Sheet
cworkbook_sheet_by_name (PortableServer_Servant servant, CORBA_char const *name,
CORBA_Environment *ev)
{
WorkbookControlCORBA *wbcc = wbcc_from_servant (servant);
Sheet *sheet;
g_return_val_if_fail (wbcc != NULL, CORBA_OBJECT_NIL);
sheet = workbook_sheet_by_name (wb_control_workbook (WORKBOOK_CONTROL (wbcc)), name);
Sheet *sheet = workbook_sheet_by_name (wb_from_servant (servant), name);
if (sheet != NULL) {
}
......@@ -120,7 +118,7 @@ cworkbook_sheet_add (PortableServer_Servant servant, CORBA_char const *name, COR
CORBA_Environment *ev)
{
WorkbookControl *wbcc = (WorkbookControl *)wbcc_from_servant (servant);
Workbook *wb = wb_control_workbook (wbcc);
Workbook *wb = wb_control_get_workbook (wbcc);
Sheet *sheet = workbook_sheet_add (wb, -1);
SHEET_FOREACH_CONTROL(sheet, sv, sc, {
......@@ -136,7 +134,7 @@ cworkbook_sheets (PortableServer_Servant servant,
{
WorkbookControlCORBA *wbcc = wbcc_from_servant (servant);
GList *sheets =
workbook_sheets (wb_control_workbook (WORKBOOK_CONTROL (wbcc)));
workbook_sheets (wb_control_get_workbook (WORKBOOK_CONTROL (wbcc)));
int i, len = g_list_length (sheets);
GNOME_Gnumeric_Workbooks *res = GNOME_Gnumeric_Sheets__alloc ();
......
......@@ -254,7 +254,7 @@ void
dif_file_open (GOFileOpener const *fo, IOContext *io_context,
WorkbookView *wbv, GsfInput *input)
{
Workbook *wb = wb_view_workbook (wbv);
Workbook *wb = wb_view_get_workbook (wbv);
DifInputContext *ctxt = dif_input_context_new (io_context, wb, input);
workbook_set_saveinfo (wb, FILE_FL_MANUAL_REMEMBER,
......
2005-12-28 Jody Goldberg <jody@gnome.org>
* boot.c (excel_file_open) : use the new workbook_set_meta_data rather
than kludging GObject data.
2006-03-16 Morten Welinder <terra@gnome.org>
* ms-excel-read.c (excel_get_style_from_xf): Even though the third
......
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/**
* boot.c: MS Excel support for Gnumeric
/*
* boot.c: the external interface to the MS Excel import/export
*
* Author:
* Jody Goldberg (jody@gnome.org)
* Michael Meeks (michael@ximian.com)
* Copyright (C) 2000-2006 Jody Goldberg (jody@gnome.org)
* Copyright (C) 1998-2001 Michael Meeks (miguel@kernel.org)
*
* (C) 1998-2001 Michael Meeks
* (C) 2002-2005 Jody Goldberg
**/
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
#include <gnumeric-config.h>
#include <gnumeric.h>
......@@ -25,6 +36,7 @@
#include "ms-excel-read.h"
#include "excel-xml-read.h"
#include <goffice/app/go-doc.h>
#include <goffice/app/file.h>
#include <goffice/app/io-context.h>
#include <gsf/gsf-input.h>
......@@ -127,7 +139,7 @@ excel_read_metadata (GsfDocMetaData *meta_data, GsfInfile *ole, char const *name
}
}
/*
/**
* excel_file_open
* @fo: File opener
* @context: IO context
......@@ -135,7 +147,7 @@ excel_read_metadata (GsfDocMetaData *meta_data, GsfInfile *ole, char const *name
* @input: Input stream
*
* Load en excel workbook.
*/
**/
void
excel_file_open (GOFileOpener const *fo, IOContext *context,
WorkbookView *wbv, GsfInput *input)
......@@ -143,7 +155,7 @@ excel_file_open (GOFileOpener const *fo, IOContext *context,
GsfInput *stream = NULL;
GError *err = NULL;
GsfInfile *ole = gsf_infile_msole_new (input, &err);
Workbook *wb = wb_view_workbook (wbv);
Workbook *wb = wb_view_get_workbook (wbv);
gboolean is_double_stream_file, is_97;
GsfDocMetaData *meta_data;
......@@ -181,10 +193,9 @@ excel_file_open (GOFileOpener const *fo, IOContext *context,
g_object_unref (G_OBJECT (stream));
meta_data = gsf_doc_meta_data_new ();
excel_read_metadata (meta_data, ole, "\05DocumentSummaryInformation", context);
excel_read_metadata (meta_data, ole, "\05SummaryInformation", context);
g_object_set_data_full (G_OBJECT (wb), "GsfDocMetaData",
meta_data, g_object_unref);
excel_read_metadata (meta_data, ole, "\05DocumentSummaryInformation", context);
go_doc_set_meta_data (GO_DOC (wb), meta_data);
/* See if there are any macros to keep around */
stream = gsf_infile_child_by_name (ole, "\01CompObj");
......@@ -232,7 +243,7 @@ excel_save (IOContext *context, WorkbookView const *wbv, GsfOutput *output,
if (ewb == NULL)
return;
wb = wb_view_workbook (wbv);
wb = wb_view_get_workbook (wbv);
outfile = gsf_outfile_msole_new (output);
ewb->export_macros = (biff8 &&
NULL != g_object_get_data (G_OBJECT (wb), "MS_EXCEL_MACROS"));
......@@ -246,7 +257,7 @@ excel_save (IOContext *context, WorkbookView const *wbv, GsfOutput *output,
excel_write_state_free (ewb);
io_progress_range_pop (context);
meta_data = g_object_get_data (G_OBJECT (wb), "GsfDocMetaData");
meta_data = go_doc_get_meta_data (GO_DOC (wb));
if (meta_data != NULL) {
content = gsf_outfile_new_child (outfile,
"\05DocumentSummaryInformation", FALSE);
......
......@@ -980,7 +980,7 @@ excel_xml_file_open (GOFileOpener const *fo, IOContext *io_context,
state.context = io_context;
state.wb_view = wb_view;
state.wb = wb_view_workbook (wb_view);
state.wb = wb_view_get_workbook (wb_view);
state.sheet = NULL;
state.style = NULL;
state.def_style = NULL;
......
......@@ -58,7 +58,6 @@
#include <value.h>
#include <hlink.h>
#include <application.h>
#include <goffice/app/io-context.h>
#include <command-context.h>
#include <sheet-object-cell-comment.h>
#include <sheet-object-widget.h>
......@@ -67,6 +66,8 @@
#include <gnm-so-polygon.h>
#include <sheet-object-graph.h>
#include <sheet-object-image.h>
#include <goffice/app/io-context.h>
#include <goffice/app/go-doc.h>
#include <goffice/utils/go-font.h>
#include <goffice/utils/go-units.h>
#include <goffice/utils/go-glib-extras.h>
......@@ -2795,7 +2796,7 @@ gnm_xl_importer_new (IOContext *context, WorkbookView *wb_view)
importer->ver = MS_BIFF_V_UNKNOWN;
importer->context = context;
importer->wbv = wb_view;
importer->wb = wb_view_workbook (wb_view);
importer->wb = wb_view_get_workbook (wb_view);
importer->str_iconv = (GIConv)(-1);
gnm_xl_importer_set_codepage (importer, 1252); /* set a default */
......@@ -5378,7 +5379,7 @@ excel_read_FILEPASS (BiffQuery *q, GnmXLImporter *importer)
while (TRUE) {
guint8 *passwd = go_cmd_context_get_password (
GO_CMD_CONTEXT (importer->context),
workbook_get_uri (importer->wb));
go_doc_get_uri (GO_DOC (importer->wb)));
gboolean ok;
if (passwd == NULL)
......
......@@ -5491,7 +5491,7 @@ excel_write_state_new (IOContext *context, WorkbookView const *gwb_view,
ewb->bp = NULL;
ewb->io_context = context;
ewb->gnum_wb = wb_view_workbook (gwb_view);
ewb->gnum_wb = wb_view_get_workbook (gwb_view);
ewb->gnum_wb_view = gwb_view;
ewb->sheets = g_ptr_array_new ();
ewb->names = g_hash_table_new (g_direct_hash, g_direct_equal);
......
......@@ -26,6 +26,7 @@
#include <parse-util.h>
#include <sheet.h>
#include <workbook.h>
#include <goffice/app/go-doc.h>
#include <gsf/gsf-utils.h>
#undef G_LOG_DOMAIN
......@@ -723,8 +724,8 @@ ms_excel_dump_cellname (GnmXLImporter const *importer, ExcelReadSheet const *esh
{
if (esheet && esheet->sheet && esheet->sheet->name_unquoted)
fprintf (stderr, "%s!", esheet->sheet->name_unquoted);
else if (importer && importer->wb && workbook_get_uri (importer->wb)) {
fprintf (stderr, "[%s]", workbook_get_uri (importer->wb));
else if (importer && importer->wb && go_doc_get_uri (GO_DOC (importer->wb))) {
fprintf (stderr, "[%s]", go_doc_get_uri (GO_DOC (importer->wb)));
return;
}
fprintf (stderr, "%s%d : ", col_name(fn_col), fn_row+1);
......
......@@ -48,6 +48,7 @@
#include <number-match.h>
#include <gnm-i18n.h>
#include <goffice/app/go-doc.h>
#include <goffice/app/go-plugin.h>
#include <gnm-plugin.h>
......@@ -247,7 +248,7 @@ gnumeric_cell (FunctionEvalInfo *ei, GnmValue const * const *argv)
* the worksheet name, but they can't make any other changes to CELL?!
*/
} else if (!g_ascii_strcasecmp (info_type, "filename")) {
char const *name = workbook_get_uri (sheet->workbook);
char const *name = go_doc_get_uri (GO_DOC (sheet->workbook));
if (name == NULL)
return value_new_string ("");
......
......@@ -474,7 +474,7 @@ html_file_save (GOFileSaver const *fs, IOContext *io_context,
WorkbookView const *wb_view, GsfOutput *output, html_version_t version)
{
GList *sheets, *ptr;
Workbook *wb = wb_view_workbook (wb_view);
Workbook *wb = wb_view_get_workbook (wb_view);
FileSaveScope save_scope;
g_return_if_fail (fs != NULL);
......
......@@ -303,7 +303,7 @@ html_read_table (htmlNodePtr cur, htmlDocPtr doc, WorkbookView *wb_view,
g_return_if_fail (cur != NULL);
g_return_if_fail (wb_view != NULL);
wb = wb_view_workbook (wb_view);
wb = wb_view_get_workbook (wb_view);
for (ptr = cur->children; ptr != NULL ; ptr = ptr->next) {
if (ptr->type != XML_ELEMENT_NODE)
continue;
......
......@@ -90,7 +90,7 @@ roff_file_save (GOFileSaver const *fs, IOContext *io_context,
GList *sheets, *ptr;
GnmCell *cell;
int row, col, fontsize, v_size;
Workbook *wb = wb_view_workbook (wb_view);
Workbook *wb = wb_view_get_workbook (wb_view);
g_return_if_fail (wb != NULL);
......
......@@ -77,7 +77,7 @@ lotus_file_open (GOFileOpener const *fo, IOContext *io_context,
state.input = input;
state.io_context = io_context;
state.wbv = wb_view;
state.wb = wb_view_workbook (wb_view);
state.wb = wb_view_get_workbook (wb_view);
state.sheet = NULL;
if (!lotus_read (&state))
......
......@@ -630,7 +630,7 @@ mps_file_open (GOFileOpener const *fo, IOContext *io_context,
{
MpsInputContext *ctxt;
ctxt = mps_input_context_new (io_context, wb_view_workbook (wbv),
ctxt = mps_input_context_new (io_context, wb_view_get_workbook (wbv),
input);
if (ctxt != NULL) {
mps_parse_file (ctxt);
......
......@@ -23,7 +23,7 @@ void
oleo_file_open (GOFileOpener const *fo, IOContext *io_context,
WorkbookView *wb_view, GsfInput *input)
{
Workbook *wb = wb_view_workbook (wb_view);
Workbook *wb = wb_view_get_workbook (wb_view);
oleo_read (io_context, wb, input);
}
......@@ -2359,7 +2359,7 @@ openoffice_file_open (GOFileOpener const *fo, IOContext *io_context,
/* init */
state.context = io_context;
state.wb_view = wb_view;
state.pos.wb = wb_view_workbook (wb_view);
state.pos.wb = wb_view_get_workbook (wb_view);
state.zip = zip;
state.pos.sheet = NULL;
state.col_styles[0] = NULL;
......
......@@ -34,7 +34,6 @@
#include <sheet.h>
#include <sheet-view.h>
#include <sheet-style.h>
#include <summary.h>
#include <style-color.h>
#include <expr.h>
#include <expr-impl.h>
......@@ -303,7 +302,7 @@ openoffice_file_save (GOFileSaver const *fs, IOContext *ioc,
state.ioc = ioc;
state.wbv = wbv;
state.wb = wb_view_workbook (wbv);
state.wb = wb_view_get_workbook (wbv);
for (i = 0 ; i < G_N_ELEMENTS (streams); i++) {
child = gsf_outfile_new_child (outfile, streams[i].name, FALSE);
streams[i].func (&state, child);
......
......@@ -80,7 +80,7 @@ paradox_file_open (GOFileOpener const *fo, IOContext *io_context,
PX_set_targetencoding(pxdoc, "UTF-8");
wb = wb_view_workbook (wb_view);
wb = wb_view_get_workbook (wb_view);
name = workbook_sheet_get_free_name (wb, pxh->px_tablename, FALSE, TRUE);
sheet = sheet_new (wb, name);
g_free (name);
......
......@@ -661,7 +661,7 @@ pln_file_open (GOFileOpener const *fo, IOContext *io_context,
ErrorInfo *error;
PlanPerfectImport state;
wb = wb_view_workbook (wb_view);
wb = wb_view_get_workbook (wb_view);
name = workbook_sheet_get_free_name (wb, "PlanPerfect", FALSE, TRUE);
sheet = sheet_new (wb, name);
g_free (name);
......
......@@ -53,5 +53,5 @@ void
psiconv_file_open (GOFileOpener const *fo, IOContext *io_context,
WorkbookView *wb_view, GsfInput *input)
{
psiconv_read (io_context, wb_view_workbook(wb_view), input);
psiconv_read (io_context, wb_view_get_workbook(wb_view), input);
}
......@@ -1802,7 +1802,7 @@ py_Gui_get_workbook (py_Gui_object *self, PyObject *args)
return NULL;
}
workbook = wb_control_workbook (WORKBOOK_CONTROL (self->wbcg));
workbook = wb_control_get_workbook (WORKBOOK_CONTROL (self->wbcg));
return py_new_Workbook_object (workbook);
}
......
......@@ -267,7 +267,7 @@ gplp_func_file_open (GOFileOpener const *fo,
loader_data = g_object_get_data (G_OBJECT (service), "loader_data");
SWITCH_TO_PLUGIN (plugin_service_get_plugin (service));
sheet = sheet_new (wb_view_workbook (wb_view), _("Some name"));
sheet = sheet_new (wb_view_get_workbook (wb_view), _("Some name"));
input_wrapper = pygobject_new (G_OBJECT (input));
if (input_wrapper != NULL) {
/* wrapping adds a reference */
......@@ -280,7 +280,7 @@ gplp_func_file_open (GOFileOpener const *fo,
}
if (open_result != NULL) {
Py_DECREF (open_result);
workbook_sheet_attach (wb_view_workbook (wb_view), sheet);
workbook_sheet_attach (wb_view_get_workbook (wb_view), sheet);
} else {
gnumeric_io_error_string (io_context, py_exc_to_string ());
gnm_python_clear_error_if_needed (SERVICE_GET_LOADER (service)->py_object);
......@@ -371,7 +371,7 @@ gplp_func_file_save (GOFileSaver const *fs, GOPluginService *service,
saver_data = g_object_get_data (G_OBJECT (service), "loader_data");
SWITCH_TO_PLUGIN (plugin_service_get_plugin (service));
py_workbook = py_new_Workbook_object (wb_view_workbook (wb_view));
py_workbook = py_new_Workbook_object (wb_view_get_workbook (wb_view));
output_wrapper = pygobject_new (G_OBJECT (output));
if (output_wrapper != NULL) {
/* wrapping adds a reference */
......
......@@ -838,7 +838,7 @@ qpro_file_open (GOFileOpener const *fo, IOContext *context,
state.io_context = context;
state.wbv = new_wb_view;
state.wb = wb_view_workbook (new_wb_view);
state.wb = wb_view_get_workbook (new_wb_view);
state.cur_sheet = NULL;
state.converter = g_iconv_open ("UTF-8", "ISO-8859-1");
......
......@@ -532,7 +532,7 @@ sc_file_open (GOFileOpener const *fo, IOContext *io_context,
ErrorInfo *error;
ScParseState state;
wb = wb_view_workbook (wb_view);
wb = wb_view_get_workbook (wb_view);
name = workbook_sheet_get_free_name (wb, "SC", FALSE, TRUE);
state.sheet = sheet_new (wb, name);
g_free (name);
......
......@@ -489,7 +489,7 @@ sylk_file_open (GOFileOpener const *fo,
char const *input_name;
char *base;
int i;
Workbook *book = wb_view_workbook (wb_view);
Workbook *book = wb_view_get_workbook (wb_view);
ErrorInfo *sheet_error;
char *old_num_locale, *old_monetary_locale;
......
......@@ -182,7 +182,7 @@ xbase_file_open (GOFileOpener const *fo, IOContext *io_context,
return;
}
wb = wb_view_workbook (wb_view);
wb = wb_view_get_workbook (wb_view);
name = workbook_sheet_get_free_name (wb, _("Sheet"), FALSE, TRUE);
sheet = sheet_new (wb, name);
g_free (name);
......
......@@ -13,7 +13,7 @@
<menuitem action="FilePrint"/>
<separator name="file-sep3"/>
<menuitem action="FileSend"/>
<menuitem action="FileSummary"/>
<menuitem action="FileMetaData"/>
<menuitem action="FilePreferences"/>
<separator name="file-sep4"/>
<placeholder name="FileHistory" />
......
......@@ -234,8 +234,6 @@ GNUMERIC_BASE = \
style-conditions.c \
style-conditions.h \
style-font.h \
summary.c \
summary.h \
symbol.c \
symbol.h \
validation.c \
......
......@@ -27,14 +27,14 @@
#include "commands.h"
#include <gnumeric-gconf.h>
#include <goffice/app/go-doc.h>
#include <goffice/utils/go-glib-extras.h>
#include <gsf/gsf-impl-utils.h>
#include <gtk/gtkmain.h>
#include <gtk/gtkiconfactory.h>
#include <gtk/gtkselection.h>
#include <gtk/gtkicontheme.h>
#include <glib/gi18n.h>
#include <goffice/utils/go-glib-extras.h>
#include <goffice/utils/go-file.h>
#define GNM_APP(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GNM_APP_TYPE, GnmApp))
#define GNM_APP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GNM_APP_TYPE, GnmAppClass))
......@@ -413,7 +413,7 @@ static gboolean
cb_workbook_uri (Workbook * wb, gpointer closure)
{
struct wb_uri_closure *dat = closure;
const char *wb_uri = workbook_get_uri (wb);
char const *wb_uri = go_doc_get_uri (GO_DOC (wb));
if (wb_uri && strcmp (wb_uri, dat->uri) == 0) {
dat->wb = wb;
......
......@@ -73,7 +73,7 @@ gnm_persist_stream_load (PortableServer_Servant servant,
return;
}
old_wb = wb_control_workbook (wbc);
old_wb = wb_control_get_workbook (wbc);
if (workbook_is_dirty (old_wb)) {
/* No way to interact properly with user */
g_warning ("Old workbook has unsaved changes.");
......
......@@ -28,23 +28,6 @@
#define USE_CELL_POOL 1
/**
* cell_dirty : Mark the sheet containing the cell as being dirty.
* @cell : the dirty cell.
*
* INTERNAL.
*/
#warning this is just plain silly handle this at a higher level
static inline void
cell_dirty (GnmCell *cell)
{
Sheet *sheet = cell->base.sheet;
/* Cells from the clipboard do not have a sheet attached */
if (sheet)
sheet_mark_dirty (sheet);
}
/**
* cell_cleanout :
* Empty a cell's
......@@ -172,10 +155,6 @@ cell_relocate (GnmCell *cell, GnmExprRewriteInfo const *rwinfo)
g_return_if_fail (cell != NULL);
g_return_if_fail (rwinfo != NULL);
/* 1. Tag the cell as dirty */
cell_dirty (cell);
/* 2. If the cell contains a expr, relocate it */
if (cell_has_expr (cell)) {
GnmExprTop const *texpr =
gnm_expr_top_rewrite (cell->base.texpr, rwinfo);
......@@ -228,7 +207,6 @@ cell_set_text (GnmCell *cell, char const *text)
if (val != NULL) { /* String was a value */
cell_cleanout (cell);
cell->value = val;
cell_dirty (cell);
} else { /* String was an expression */
cell_set_expr (cell, texpr);
gnm_expr_top_unref (texpr);
......@@ -282,7 +260,6 @@ cell_set_value (GnmCell *cell, GnmValue *v)
cell_cleanout (cell);
cell->value = v;
cell_dirty (cell);