Commit f57fd7ad authored by Jody Goldberg's avatar Jody Goldberg

merge first step in the goffice split


merge first step in the goffice split
parent b74cb089
2005-02-08 Jody Goldberg <jody@gnome.org>
* configure.in : Post release bump
2005-02-08 Jody Goldberg <jody@gnome.org>
* Release 1.5.0
......
Gnumeric 1.5.0
Emmanuel Pacaud:
* Snap to grid mode when moving sheet objects with shift.
Jean Brefort:
......@@ -19,6 +18,7 @@ J.H.M. Dassen (Ray):
Jody:
* RTL support.
* Another step towards the libgoffice split
Kasal:
* Some configure.in cleanup.
......
2005-02-08 Jody Goldberg <jody@gnome.org>
* configure.in : Post release bump
2005-02-08 Jody Goldberg <jody@gnome.org>
* Release 1.5.0
......
......@@ -3,7 +3,7 @@ AC_PREREQ(2.52)
m4_define([gnumeric_version_epoch], [1])
m4_define([gnumeric_version_major], [5])
m4_define([gnumeric_version_minor], [0])
m4_define([gnumeric_version_minor], [1])
m4_define([gnumeric_version_extra], [])
m4_define([gnumeric_full_version],
[gnumeric_version_epoch.gnumeric_version_major.gnumeric_version_minor()gnumeric_version_extra])
......
......@@ -52,7 +52,7 @@
#include <command-context.h>
#include <workbook-view.h>
#include <workbook.h>
#include <error-info.h>
#include <goffice/app/error-info.h>
#include <parse-util.h>
#include <gsf/gsf-input-textline.h>
......@@ -1556,7 +1556,7 @@ applix_read (IOContext *io_context, WorkbookView *wb_view, GsfInput *src)
renamed_sheets = g_slist_reverse (renamed_sheets);
workbook_sheet_rename (state.wb, renamed_sheets,
state.real_names,
GNM_CMD_CONTEXT (io_context));
GO_CMD_CONTEXT (io_context));
g_slist_free (renamed_sheets);
g_slist_foreach (state.std_names, (GFunc)g_free, NULL);
g_slist_free (state.std_names);
......
......@@ -43,7 +43,7 @@
#include "io-context.h"
#include "workbook-view.h"
#include "workbook.h"
#include "error-info.h"
#include <goffice/app/error-info.h>
#include <string.h>
#include <gsf/gsf-output.h>
......
......@@ -25,9 +25,8 @@
#include <gnumeric.h>
#include "applix.h"
#include <plugin.h>
#include <plugin-util.h>
#include <module-plugin-defs.h>
#include <goffice/app/go-plugin.h>
#include <goffice/app/module-plugin-defs.h>
#include <workbook-view.h>
#include <workbook.h>
#include <io-context.h>
......
......@@ -29,8 +29,7 @@
#include <application.h>
#include <workbook-priv.h>
#include <workbook-view.h>
#include <plugin-util.h>
#include <module-plugin-defs.h>
#include <goffice/app/module-plugin-defs.h>
#include <io-context.h>
#include <command-context.h>
#include <command-context-stderr.h>
......@@ -66,7 +65,7 @@ capp_workbook_open (PortableServer_Servant ignore,
else
wbv = NULL;
} else {
GnmCmdContext *cc = cmd_context_stderr_new ();
GOCmdContext *cc = cmd_context_stderr_new ();
IOContext *io_context = gnumeric_io_context_new (cc);
wbv = wb_view_new_from_uri (file_name, NULL, io_context, NULL);
g_object_unref (G_OBJECT (io_context));
......@@ -113,8 +112,8 @@ static BONOBO_TYPE_FUNC_FULL (CorbaApplication,
/***************************************************************/
static CorbaApplication *capp = NULL;
void
plugin_init_general (ErrorInfo **ret_error)
G_MODULE_EXPORT void
go_plugin_init (GOPlugin *p, GOCmdContext *cc)
{
if (capp)
return;
......@@ -138,8 +137,8 @@ plugin_init_general (ErrorInfo **ret_error)
}
}
void
plugin_cleanup_general (ErrorInfo **ret_error)
G_MODULE_EXPORT void
go_plugin_shutdown (GOPlugin *p, GOCmdContext *cc)
{
if (capp) {
bonobo_activation_unregister_active_server (
......
......@@ -31,7 +31,8 @@
#include <sheet-control-priv.h>
#include <ranges.h>
#include <sheet.h>
#include <command-context-priv.h>
#include <command-context.h>
#include <goffice/app/go-cmd-context-impl.h>
#include <gsf/gsf-impl-utils.h>
#include <bonobo.h>
......@@ -152,46 +153,46 @@ cworkbook_sheets (PortableServer_Servant servant,
}
static void
wbcc_error (GnmCmdContext *ctxt, GError *gerr)
wbcc_error (GOCmdContext *ctxt, GError *gerr)
{
WorkbookControlCORBA *wbcc = WORKBOOK_CONTROL_CORBA (ctxt);
if (gerr->domain == gnm_error_system ()) {
if (gerr->domain == go_error_system ()) {
GNOME_Gnumeric_ErrorSystem *err = GNOME_Gnumeric_ErrorSystem__alloc();
err->msg = CORBA_string_dup (gerr->message);
CORBA_exception_set (wbcc->ev, CORBA_USER_EXCEPTION,
ex_GNOME_Gnumeric_ErrorSystem, err);
} else if (gerr->domain == gnm_error_import ()) {
} else if (gerr->domain == go_error_import ()) {
GNOME_Gnumeric_ErrorRead *err = GNOME_Gnumeric_ErrorRead__alloc();
err->msg = CORBA_string_dup (gerr->message);
CORBA_exception_set (wbcc->ev, CORBA_USER_EXCEPTION,
ex_GNOME_Gnumeric_ErrorRead, err);
} else if (gerr->domain == gnm_error_export ()) {
} else if (gerr->domain == go_error_export ()) {
GNOME_Gnumeric_ErrorSave *err = GNOME_Gnumeric_ErrorSave__alloc();
err->msg = CORBA_string_dup (gerr->message);
CORBA_exception_set (wbcc->ev, CORBA_USER_EXCEPTION,
ex_GNOME_Gnumeric_ErrorSave, err);
} else if (gerr->domain == go_error_invalid ()) {
GNOME_Gnumeric_ErrorInvalid *err = GNOME_Gnumeric_ErrorInvalid__alloc();
err->msg = CORBA_string_dup (gerr->message);
CORBA_exception_set (wbcc->ev, CORBA_USER_EXCEPTION,
ex_GNOME_Gnumeric_ErrorInvalid, err);
} else if (gerr->domain == gnm_error_array ()) {
GNOME_Gnumeric_ErrorSplitsArray *err = GNOME_Gnumeric_ErrorSplitsArray__alloc();
err->msg = CORBA_string_dup (gerr->message);
CORBA_exception_set (wbcc->ev, CORBA_USER_EXCEPTION,
ex_GNOME_Gnumeric_ErrorSplitsArray, err);
} else if (gerr->domain == gnm_error_invalid ()) {
GNOME_Gnumeric_ErrorInvalid *err = GNOME_Gnumeric_ErrorInvalid__alloc();
err->msg = CORBA_string_dup (gerr->message);
CORBA_exception_set (wbcc->ev, CORBA_USER_EXCEPTION,
ex_GNOME_Gnumeric_ErrorInvalid, err);
}
}
static char *
wbcc_get_password (GnmCmdContext *cc, char const* msg)
wbcc_get_password (GOCmdContext *cc, char const* msg)
{
return NULL;
}
static void
wbcc_set_sensitive (GnmCmdContext *cc, gboolean sensitive)
wbcc_set_sensitive (GOCmdContext *cc, gboolean sensitive)
{
}
......@@ -252,7 +253,7 @@ wbcc_finalize (GObject *obj)
}
static void
wbcc_gnm_cmd_context_init (GnmCmdContextClass *iface)
wbcc_gnm_cmd_context_init (GOCmdContextClass *iface)
{
iface->get_password = wbcc_get_password;
iface->set_sensitive = wbcc_set_sensitive;
......@@ -316,7 +317,7 @@ GSF_CLASS_FULL (WorkbookControlCORBA, workbook_control_corba,
wbcc_class_init, wbcc_init,
WORKBOOK_CONTROL_TYPE, 0,
GSF_INTERFACE (wbcc_gnm_cmd_context_init,
GNM_CMD_CONTEXT_TYPE))
GO_CMD_CONTEXT_TYPE))
WorkbookControl *
workbook_control_corba_new (WorkbookView *optional_view,
......
......@@ -8,7 +8,4 @@
<loader type="Gnumeric_Builtin:module">
<attribute name="module_file" value="corba"/>
</loader>
<services>
<service type="general"></service>
</services>
</plugin>
This diff is collapsed.
......@@ -17,8 +17,8 @@
#include <io-context.h>
#include <workbook-view.h>
#include <workbook.h>
#include <plugin-util.h>
#include <module-plugin-defs.h>
#include <goffice/app/module-plugin-defs.h>
#include <goffice/app/error-info.h>
#include <gsf/gsf-input-textline.h>
#include <gsf/gsf-output.h>
......
2005-02-07 Jody Goldberg <jody@gnome.org>
* ms-excel-write.c (excel_write_SETUP) : store the fit to pages width
and height.
(excel_write_WSBOOL) : set the fit to page flag.
* ms-excel-read.c (excel_read_WSBOOL) : read the fit to page flag.
(excel_read_SETUP) : read the fit to pages width and height.
2005-02-08 Jody Goldberg <jody@gnome.org>
* Release 1.5.0
......
......@@ -12,14 +12,13 @@
#include <glib/gi18n.h>
#include <gnumeric.h>
#include "file.h"
#include <goffice/app/file.h>
#include "libgnumeric.h"
#include "io-context.h"
#include "command-context.h"
#include "workbook-view.h"
#include "workbook.h"
#include "plugin-util.h"
#include "module-plugin-defs.h"
#include <goffice/app/module-plugin-defs.h>
#include "excel.h"
#include "ms-excel-write.h"
......@@ -65,7 +64,6 @@ void excel_file_open (GnmFileOpener const *fo, IOContext *context, WorkbookView
void excel_biff7_file_save (GnmFileSaver const *fs, IOContext *context, WorkbookView const *wbv, GsfOutput *output);
void excel_biff8_file_save (GnmFileSaver const *fs, IOContext *context, WorkbookView const *wbv, GsfOutput *output);
void excel_dsf_file_save (GnmFileSaver const *fs, IOContext *context, WorkbookView const *wbv, GsfOutput *output);
void plugin_cleanup (void);
static GsfInput *
find_content_stream (GsfInfile *ole, gboolean *is_97)
......@@ -171,7 +169,7 @@ excel_file_open (GnmFileOpener const *fo, IOContext *context,
/* OK, it really isn't an Excel file */
g_return_if_fail (err != NULL);
gnm_cmd_context_error_import (GNM_CMD_CONTEXT (context),
go_cmd_context_error_import (GO_CMD_CONTEXT (context),
err->message);
g_error_free (err);
return;
......@@ -179,7 +177,7 @@ excel_file_open (GnmFileOpener const *fo, IOContext *context,
stream = find_content_stream (ole, &is_97);
if (stream == NULL) {
gnm_cmd_context_error_import (GNM_CMD_CONTEXT (context),
go_cmd_context_error_import (GO_CMD_CONTEXT (context),
_("No Workbook or Book streams found."));
g_object_unref (G_OBJECT (ole));
return;
......@@ -304,8 +302,8 @@ excel_biff7_file_save (GnmFileSaver const *fs, IOContext *context,
#include <formula-types.h>
void
plugin_init (void)
G_MODULE_EXPORT void
go_plugin_init (GOPlugin *plugin, GOCmdContext *cc)
{
excel_read_init ();
excel_xml_read_init ();
......@@ -354,8 +352,8 @@ plugin_init (void)
* Cleanup allocations made by this plugin.
* (Called right before we are unloaded.)
*/
void
plugin_cleanup (void)
G_MODULE_EXPORT void
go_plugin_shutdown (GOPlugin *plugin, GOCmdContext *cc)
{
destroy_xl_font_widths ();
excel_read_cleanup ();
......
......@@ -25,9 +25,8 @@
#include "excel-xml-read.h"
#include "xml-io-version.h"
#include "io-context.h"
#include "plugin.h"
#include "plugin-util.h"
#include "module-plugin-defs.h"
#include <goffice/app/go-plugin.h>
#include <goffice/app/module-plugin-defs.h>
#include "sheet-view.h"
#include "sheet-style.h"
#include "sheet-merge.h"
......@@ -36,7 +35,7 @@
#include "style.h"
#include "style-border.h"
#include "style-color.h"
#include "format.h"
#include "gnm-format.h"
#include "cell.h"
#include "position.h"
#include "expr.h"
......@@ -48,7 +47,7 @@
#include "command-context.h"
#include "workbook-view.h"
#include "workbook.h"
#include "error-info.h"
#include <goffice/app/error-info.h>
#include <gsf/gsf-libxml.h>
#include <gsf/gsf-input.h>
......@@ -80,7 +79,7 @@ unknown_attr (ExcelXMLReadState *state,
{
g_return_if_fail (attrs != NULL);
if (state->version == GNUM_XML_LATEST)
if (state->version == GNM_XML_LATEST)
gnm_io_warning (state->context,
_("Unexpected attribute %s::%s == '%s'."),
name, attrs[0], attrs[1]);
......
......@@ -20,7 +20,7 @@
#include "ms-formula-write.h"
#include <parse-util.h>
#include <format.h>
#include <src/gnm-format.h>
#include <expr.h>
#include <value.h>
#include <gutils.h>
......@@ -250,7 +250,7 @@ BC_R(ai)(XLChartHandler const *handle,
/* Rest are 0 */
if (flags&0x01) {
GnmFormat *fmt = ms_container_get_fmt (&s->container,
GOFormat *fmt = ms_container_get_fmt (&s->container,
GSF_LE_GET_GUINT16 (q->data + 4));
d (2, fputs ("Has Custom number format;\n", stderr););
if (fmt != NULL) {
......@@ -882,7 +882,7 @@ ms_chart_map_color (XLChartReadState const *s, guint32 raw, guint32 alpha)
if ((~0x7ffffff) & raw) {
GnmColor *c= excel_palette_get (s->container.ewb->palette,
(0x7ffffff & raw));
res = GDK_TO_UINT (c->color);
res = GDK_TO_UINT (c->gdk_color);
style_color_unref (c);
} else {
guint8 r, g, b;
......@@ -1006,7 +1006,7 @@ static gboolean
BC_R(ifmt)(XLChartHandler const *handle,
XLChartReadState *s, BiffQuery *q)
{
GnmFormat *fmt = ms_container_get_fmt (&s->container,
GOFormat *fmt = ms_container_get_fmt (&s->container,
GSF_LE_GET_GUINT16 (q->data));
if (fmt != NULL) {
......@@ -2816,12 +2816,12 @@ store_dim (GogSeries const *series, GogMSDimType t,
} else if (IS_GO_DATA_SCALAR (dat)) {
/* cheesy test to see if the content is strings or numbers */
double tmp = go_data_scalar_get_value (GO_DATA_SCALAR (dat));
type = finitegnum (tmp) ? 1 : 3;
type = gnm_finite (tmp) ? 1 : 3;
count = 1;
} else if (IS_GO_DATA_VECTOR (dat)) {
/* cheesy test to see if the content is strings or numbers */
double tmp = go_data_vector_get_value (GO_DATA_VECTOR (dat), 0);
type = finitegnum (tmp) ? 1 : 3;
type = gnm_finite (tmp) ? 1 : 3;
count = go_data_vector_get_len (GO_DATA_VECTOR (dat));
if (count > 30000) /* XL limit */
count = 30000;
......
......@@ -219,7 +219,7 @@ ms_container_sheet (MSContainer const *c)
return (*c->vtbl->sheet) (c);
}
GnmFormat *
GOFormat *
ms_container_get_fmt (MSContainer const *c, unsigned indx)
{
for ( ; TRUE ; c = c->parent) {
......
......@@ -17,7 +17,7 @@ typedef struct {
GnmExpr const * (*parse_expr) (MSContainer *c,
guint8 const *expr, int length);
Sheet * (*sheet) (MSContainer const *c);
GnmFormat * (*get_fmt) (MSContainer const *c, unsigned indx);
GOFormat * (*get_fmt) (MSContainer const *c, unsigned indx);
PangoAttrList * (*get_markup) (MSContainer const *c, unsigned indx);
} MSContainerClass;
......@@ -55,7 +55,7 @@ GnmExpr const *ms_container_parse_expr (MSContainer *c,
guint8 const *data, int length);
Sheet *ms_container_sheet (MSContainer const *c);
GnmFormat *ms_container_get_fmt (MSContainer const *c, unsigned indx);
GOFormat *ms_container_get_fmt (MSContainer const *c, unsigned indx);
PangoAttrList *ms_container_get_markup (MSContainer const *c, unsigned indx);
PangoAttrList *ms_container_read_markup (MSContainer const *c,
guint8 const *data, int txo_len,
......
......@@ -41,7 +41,7 @@
#include <sheet-filter.h>
#include <cell.h>
#include <style.h>
#include <format.h>
#include <src/gnm-format.h>
#include <print-info.h>
#include <selection.h>
#include <validation.h>
......@@ -52,7 +52,6 @@
#include <expr-name.h>
#include <value.h>
#include <hlink.h>
#include <gutils.h>
#include <application.h>
#include <io-context.h>
#include <command-context.h>
......@@ -63,6 +62,7 @@
#include <sheet-object-graph.h>
#include <sheet-object-image.h>
#include <goffice/utils/go-units.h>
#include <goffice/utils/go-glib-extras.h>
#include <goffice/graph/gog-style.h>
#include <gsf/gsf-input.h>
......@@ -155,7 +155,7 @@ excel_iconv_open_for_import (guint codepage)
return gsf_msole_iconv_open_for_import (codepage);
}
static GnmFormat *
static GOFormat *
excel_wb_get_fmt (ExcelWorkbook *ewb, unsigned idx)
{
char const *ans = NULL;
......@@ -213,7 +213,7 @@ ms_sheet_get_sheet (MSContainer const *container)
return ((ExcelReadSheet const *)container)->sheet;
}
static GnmFormat *
static GOFormat *
ms_sheet_get_fmt (MSContainer const *container, unsigned indx)
{
return excel_wb_get_fmt (container->ewb, indx);
......@@ -232,9 +232,9 @@ ms_sheet_map_color (ExcelReadSheet const *esheet, MSObj const *obj, MSObjAttrID
GnmColor *c = excel_palette_get (esheet->container.ewb->palette,
(0x7ffffff & attr->v.v_uint));
r = c->color.red >> 8;
g = c->color.green >> 8;
b = c->color.blue >> 8;
r = c->gdk_color.red >> 8;
g = c->gdk_color.green >> 8;
b = c->gdk_color.blue >> 8;
style_color_unref (c);
} else {
r = (attr->v.v_uint) & 0xff;
......@@ -848,7 +848,7 @@ append_markup (PangoAttribute *src, TXORun *run)
return FALSE;
}
static GnmFormat *
static GOFormat *
excel_read_LABEL_markup (BiffQuery *q, ExcelReadSheet *esheet,
char const *str, unsigned str_len)
{
......@@ -1466,7 +1466,7 @@ excel_palette_get (ExcelPalette const *pal, gint idx)
d (1, {
GnmColor *c = pal->gnm_colors[idx];
fprintf (stderr,"New color in slot %d: RGB= %x,%x,%x\n",
idx, c->color.red, c->color.green, c->color.blue);
idx, c->gdk_color.red, c->gdk_color.green, c->gdk_color.blue);
});
}
......@@ -1694,9 +1694,9 @@ excel_get_style_from_xf (ExcelReadSheet *esheet, BiffXFData const *xf)
g_return_val_if_fail (back_color && pattern_color && font_color, NULL);
d (4, fprintf (stderr,"back = #%02x%02x%02x, pat = #%02x%02x%02x, font = #%02x%02x%02x, pat_style = %d\n",
back_color->color.red>>8, back_color->color.green>>8, back_color->color.blue>>8,
pattern_color->color.red>>8, pattern_color->color.green>>8, pattern_color->color.blue>>8,
font_color->color.red>>8, font_color->color.green>>8, font_color->color.blue>>8,
back_color->gdk_color.red>>8, back_color->gdk_color.green>>8, back_color->gdk_color.blue>>8,
pattern_color->gdk_color.red>>8, pattern_color->gdk_color.green>>8, pattern_color->gdk_color.blue>>8,
font_color->gdk_color.red>>8, font_color->gdk_color.green>>8, font_color->gdk_color.blue>>8,
xf->fill_pattern_idx););
mstyle_set_color (mstyle, MSTYLE_COLOR_FORE, font_color);
......@@ -2624,7 +2624,7 @@ ms_wb_parse_expr (MSContainer *container, guint8 const *data, int length)
return ms_sheet_parse_expr_internal (&dummy_sheet, data, length);
}
static GnmFormat *
static GOFormat *
ms_wb_get_fmt (MSContainer const *container, unsigned indx)
{
return excel_wb_get_fmt (((ExcelWorkbook *)container), indx);
......@@ -2682,7 +2682,7 @@ ms_wb_get_font_markup (MSContainer const *c, unsigned indx)
color = (fd->color_idx == 127) ? style_color_black ()
: excel_palette_get (ewb->palette, fd->color_idx);
add_attr (attrs, pango_attr_foreground_new (
color->color.red, color->color.green, color->color.blue));
color->gdk_color.red, color->gdk_color.green, color->gdk_color.blue));
style_color_unref (color);
((BiffFontData *)fd)->attrs = attrs;
......@@ -3447,7 +3447,7 @@ excel_read_TAB_COLOR (BiffQuery *q, ExcelReadSheet *esheet)
*/
color_index = GSF_LE_GET_GUINT8 (q->data + 16);
color = excel_palette_get (esheet->container.ewb->palette, color_index);
contrast = color->color.red + color->color.green + color->color.blue;
contrast = color->gdk_color.red + color->gdk_color.green + color->gdk_color.blue;
if (contrast >= 0x18000)
text_color = style_color_black ();
else
......@@ -3456,7 +3456,7 @@ excel_read_TAB_COLOR (BiffQuery *q, ExcelReadSheet *esheet)
if (color != NULL) {