Commit af769d68 authored by Michael Meeks's avatar Michael Meeks Committed by Michael Meeks

Handle oafinfo.in

2000-05-01  Michael Meeks  <michael@helixcode.com>

	* configure.in: Handle oafinfo.in

	* src/sheet-object.c (sheet_set_mode_type_full): oafize.

	* src/sheet-object-container.c (sheet_object_container_new_from_goadid):
	ditto.

	* src/sheet.c (sheet_insert_object): always launch via.
	bonobo_object_activate regardless of monikers.

	* idl/Gnumeric.idl: add a comment telling people to look elsewhere if
	they want to write bonobo components.

	* src/workbook.c (insert_object_cmd): update for oaf.

	* src/main.c (gnumeric_main): Check for NULL ctx, on corba failure.

	* src/corba-args.c (gnumeric_arg_parse): NULL ctx.

	* src/corba-workbook-factory.c (_WorkbookFactory_init): update to
	use od_server_register.
	(WorkbookFactory_create_object): use Bonobo_stringlist not GNOME_stringlist,
	when was this last compiled ...

	* src/corba-args.c (gnumeric_arg_parse): update for OAF.

	* acconfig.h: USING_OAF

	* configure.in: ditto.

2000-05-01  Michael Meeks  <michael@helixcode.com>

	* HACKING: make it more explicit.
parent e13b1192
2000-05-01 Michael Meeks <michael@helixcode.com>
* configure.in: Handle oafinfo.in
* src/sheet-object.c (sheet_set_mode_type_full): oafize.
* src/sheet-object-container.c (sheet_object_container_new_from_goadid):
ditto.
* src/sheet.c (sheet_insert_object): always launch via.
bonobo_object_activate regardless of monikers.
* idl/Gnumeric.idl: add a comment telling people to look elsewhere if
they want to write bonobo components.
* src/workbook.c (insert_object_cmd): update for oaf.
* src/main.c (gnumeric_main): Check for NULL ctx, on corba failure.
* src/corba-args.c (gnumeric_arg_parse): NULL ctx.
* src/corba-workbook-factory.c (_WorkbookFactory_init): update to
use od_server_register.
(WorkbookFactory_create_object): use Bonobo_stringlist not GNOME_stringlist,
when was this last compiled ...
* src/corba-args.c (gnumeric_arg_parse): update for OAF.
* acconfig.h: USING_OAF
* configure.in: ditto.
2000-05-01 Michael Meeks <michael@helixcode.com>
* HACKING: make it more explicit.
2000-05-01 Morten Welinder <terra@diku.dk>
* src/main.c (has_gnumeric_been_compiled_with_guile_support): Fix
......
2000-05-01 Michael Meeks <michael@helixcode.com>
* configure.in: Handle oafinfo.in
* src/sheet-object.c (sheet_set_mode_type_full): oafize.
* src/sheet-object-container.c (sheet_object_container_new_from_goadid):
ditto.
* src/sheet.c (sheet_insert_object): always launch via.
bonobo_object_activate regardless of monikers.
* idl/Gnumeric.idl: add a comment telling people to look elsewhere if
they want to write bonobo components.
* src/workbook.c (insert_object_cmd): update for oaf.
* src/main.c (gnumeric_main): Check for NULL ctx, on corba failure.
* src/corba-args.c (gnumeric_arg_parse): NULL ctx.
* src/corba-workbook-factory.c (_WorkbookFactory_init): update to
use od_server_register.
(WorkbookFactory_create_object): use Bonobo_stringlist not GNOME_stringlist,
when was this last compiled ...
* src/corba-args.c (gnumeric_arg_parse): update for OAF.
* acconfig.h: USING_OAF
* configure.in: ditto.
2000-05-01 Michael Meeks <michael@helixcode.com>
* HACKING: make it more explicit.
2000-05-01 Morten Welinder <terra@diku.dk>
* src/main.c (has_gnumeric_been_compiled_with_guile_support): Fix
......
......@@ -87,7 +87,22 @@ modular chunks (as detailed by Linus).
- Fast code that is difficult to maintain has no place in
Gnumeric and will be dropped.
- Follow the Gnumeric commenting style.
- Follow the Gnumeric commenting style, which is not the Gtk
style;
/*
* ie. use this for
* multi-line comments
*/
- Do not overuse const; there is a great danger that const
will be overused and whilst this makes the code more robust
against idiot hackers, idiot hackers should not be committing.
Furthermore const TypeName is strongly preferred to the synonym
TypeName const.
ie. TypeName const * const non_array; should be:
const TypeName *non_array; good.
- Your code should compile without warnings.
......
2000-05-01 Michael Meeks <michael@helixcode.com>
* configure.in: Handle oafinfo.in
* src/sheet-object.c (sheet_set_mode_type_full): oafize.
* src/sheet-object-container.c (sheet_object_container_new_from_goadid):
ditto.
* src/sheet.c (sheet_insert_object): always launch via.
bonobo_object_activate regardless of monikers.
* idl/Gnumeric.idl: add a comment telling people to look elsewhere if
they want to write bonobo components.
* src/workbook.c (insert_object_cmd): update for oaf.
* src/main.c (gnumeric_main): Check for NULL ctx, on corba failure.
* src/corba-args.c (gnumeric_arg_parse): NULL ctx.
* src/corba-workbook-factory.c (_WorkbookFactory_init): update to
use od_server_register.
(WorkbookFactory_create_object): use Bonobo_stringlist not GNOME_stringlist,
when was this last compiled ...
* src/corba-args.c (gnumeric_arg_parse): update for OAF.
* acconfig.h: USING_OAF
* configure.in: ditto.
2000-05-01 Michael Meeks <michael@helixcode.com>
* HACKING: make it more explicit.
2000-05-01 Morten Welinder <terra@diku.dk>
* src/main.c (has_gnumeric_been_compiled_with_guile_support): Fix
......
2000-05-01 Michael Meeks <michael@helixcode.com>
* configure.in: Handle oafinfo.in
* src/sheet-object.c (sheet_set_mode_type_full): oafize.
* src/sheet-object-container.c (sheet_object_container_new_from_goadid):
ditto.
* src/sheet.c (sheet_insert_object): always launch via.
bonobo_object_activate regardless of monikers.
* idl/Gnumeric.idl: add a comment telling people to look elsewhere if
they want to write bonobo components.
* src/workbook.c (insert_object_cmd): update for oaf.
* src/main.c (gnumeric_main): Check for NULL ctx, on corba failure.
* src/corba-args.c (gnumeric_arg_parse): NULL ctx.
* src/corba-workbook-factory.c (_WorkbookFactory_init): update to
use od_server_register.
(WorkbookFactory_create_object): use Bonobo_stringlist not GNOME_stringlist,
when was this last compiled ...
* src/corba-args.c (gnumeric_arg_parse): update for OAF.
* acconfig.h: USING_OAF
* configure.in: ditto.
2000-05-01 Michael Meeks <michael@helixcode.com>
* HACKING: make it more explicit.
2000-05-01 Morten Welinder <terra@diku.dk>
* src/main.c (has_gnumeric_been_compiled_with_guile_support): Fix
......
2000-05-01 Michael Meeks <michael@helixcode.com>
* configure.in: Handle oafinfo.in
* src/sheet-object.c (sheet_set_mode_type_full): oafize.
* src/sheet-object-container.c (sheet_object_container_new_from_goadid):
ditto.
* src/sheet.c (sheet_insert_object): always launch via.
bonobo_object_activate regardless of monikers.
* idl/Gnumeric.idl: add a comment telling people to look elsewhere if
they want to write bonobo components.
* src/workbook.c (insert_object_cmd): update for oaf.
* src/main.c (gnumeric_main): Check for NULL ctx, on corba failure.
* src/corba-args.c (gnumeric_arg_parse): NULL ctx.
* src/corba-workbook-factory.c (_WorkbookFactory_init): update to
use od_server_register.
(WorkbookFactory_create_object): use Bonobo_stringlist not GNOME_stringlist,
when was this last compiled ...
* src/corba-args.c (gnumeric_arg_parse): update for OAF.
* acconfig.h: USING_OAF
* configure.in: ditto.
2000-05-01 Michael Meeks <michael@helixcode.com>
* HACKING: make it more explicit.
2000-05-01 Morten Welinder <terra@diku.dk>
* src/main.c (has_gnumeric_been_compiled_with_guile_support): Fix
......
2000-05-01 Michael Meeks <michael@helixcode.com>
* configure.in: Handle oafinfo.in
* src/sheet-object.c (sheet_set_mode_type_full): oafize.
* src/sheet-object-container.c (sheet_object_container_new_from_goadid):
ditto.
* src/sheet.c (sheet_insert_object): always launch via.
bonobo_object_activate regardless of monikers.
* idl/Gnumeric.idl: add a comment telling people to look elsewhere if
they want to write bonobo components.
* src/workbook.c (insert_object_cmd): update for oaf.
* src/main.c (gnumeric_main): Check for NULL ctx, on corba failure.
* src/corba-args.c (gnumeric_arg_parse): NULL ctx.
* src/corba-workbook-factory.c (_WorkbookFactory_init): update to
use od_server_register.
(WorkbookFactory_create_object): use Bonobo_stringlist not GNOME_stringlist,
when was this last compiled ...
* src/corba-args.c (gnumeric_arg_parse): update for OAF.
* acconfig.h: USING_OAF
* configure.in: ditto.
2000-05-01 Michael Meeks <michael@helixcode.com>
* HACKING: make it more explicit.
2000-05-01 Morten Welinder <terra@diku.dk>
* src/main.c (has_gnumeric_been_compiled_with_guile_support): Fix
......
2000-05-01 Michael Meeks <michael@helixcode.com>
* configure.in: Handle oafinfo.in
* src/sheet-object.c (sheet_set_mode_type_full): oafize.
* src/sheet-object-container.c (sheet_object_container_new_from_goadid):
ditto.
* src/sheet.c (sheet_insert_object): always launch via.
bonobo_object_activate regardless of monikers.
* idl/Gnumeric.idl: add a comment telling people to look elsewhere if
they want to write bonobo components.
* src/workbook.c (insert_object_cmd): update for oaf.
* src/main.c (gnumeric_main): Check for NULL ctx, on corba failure.
* src/corba-args.c (gnumeric_arg_parse): NULL ctx.
* src/corba-workbook-factory.c (_WorkbookFactory_init): update to
use od_server_register.
(WorkbookFactory_create_object): use Bonobo_stringlist not GNOME_stringlist,
when was this last compiled ...
* src/corba-args.c (gnumeric_arg_parse): update for OAF.
* acconfig.h: USING_OAF
* configure.in: ditto.
2000-05-01 Michael Meeks <michael@helixcode.com>
* HACKING: make it more explicit.
2000-05-01 Morten Welinder <terra@diku.dk>
* src/main.c (has_gnumeric_been_compiled_with_guile_support): Fix
......
......@@ -10,6 +10,7 @@
#undef HAVE_GTK_SELECTION_ADD_TARGET
#undef HAVE_GUILE
#undef ENABLE_BONOBO
#undef USING_OAF
#undef ENABLE_GB
#undef HAVE_IEEEFP_H
#undef ENABLE_GNOME
......
......@@ -190,6 +190,21 @@ if $try_bonobo; then
bonobo_msg=yes
bonobo_suffix=-bonobo
gnumeric_executable=gnumeric-bonobo
dnl Check if Bonobo is OAFized
AC_MSG_CHECKING(if Bonobo uses OAF)
if ( gnome-config --libs bonobo | grep oaf ) > /dev/null 2>&1 ; then
using_oaf="yes"
AC_DEFINE(USING_OAF)
else
using_oaf="no"
fi
AC_MSG_RESULT("$using_oaf")
AM_CONDITIONAL(USING_OAF, test x"using_oaf" = "xyes")
else
AC_MSG_RESULT(not found)
fi
......@@ -354,6 +369,7 @@ src/widgets/Makefile
src/functions/Makefile
src/portability.h
graph/Makefile
graph/graph.oafinfo
wizards/Makefile
wizards/graphics/Makefile
doc/Makefile
......@@ -398,6 +414,7 @@ Configuration:
GB Support: ${gb_msg}
Bonobo Support: ${bonobo_msg}
Oaf Support: ${using_oaf}
"
if $have_bonobo; then
echo "
......
......@@ -28,13 +28,15 @@ member.
The DependencyRange structure defines a range reference. This essential
lists the Cells ( not neccessarily in this sheet ), that depend on the range
specified. Hence to find the cells that depend on a cell you have just altered
you must search all the range structures in the range_hash for that sheet.
you must search all the range structures in the range_hash for that sheet. This
is very important; to re-phrase dependancies are stored in an Area -> list of
depending cells fashion.
The DependencySingle structure mapping stores the degenerate case of
a DependencyRange. Essentialy it stores the cells that depend on a unit range.
This allows for extremely fast linear time hashed lookup. This contrasts with
the Range hash, all of which has to be traversed per dependency calculation.
NB. the DependencySingle has has to use CellPos' since there is no garentee that
NB. the DependencySingle has to use CellPos' since there is no garentee that
a cell will exist at a given position in the sheet that is depended on.
1.2 The generation gap
......@@ -71,7 +73,9 @@ the dependencies of this cell are queued on the workbook's eval_queue.
Value (value.h) we can prune a huge chunk off the dependency tree by not
bothering notifying dependencies of a change ( since there hasn't been one ).
Hence cell_eval_content returns a gboolean indicating whether the cell's
value has changed. (11/Apr/2000 JEG ?? It does not seem to. )
value has changed. (Ok, so this feature was dropped before the code went
live, since a few other changes were needed to support it, but there is room
for performance improvement here ).
3. Dependencies the bottleneck
......@@ -80,7 +84,7 @@ value has changed. (11/Apr/2000 JEG ?? It does not seem to. )
needs to be recomputed, it is clearly advantagous to spend time culling the
dependency tree as intelligently as possible. Furthermore since for each cell
that changes it is neccessary to determine its dependencies the lookup of
a cells dependencies needs to be fast.
a cell's dependencies needs to be fast.
3.1 Why two methods
......@@ -98,6 +102,11 @@ add an entry in the range_hash, we simply add an entry in the simple_hash.
Hence for the cell_get_dependencies we have one less entry in the range hash to
iterate over, which saves N iterations of search_cell_deps.
Another common case is having a lot of formulae sharing the same range
in the sheet as a dependency ( eg. cutting and pasting = SUM($A$1:$A$100) ). In
this case there is a single depedency range entry with many cells listed as its
dependancies.
3.2 Inter-sheet dependencies
Inter sheet dependencies are managed simply by inserting the dependency
......
......@@ -28,13 +28,15 @@ member.
The DependencyRange structure defines a range reference. This essential
lists the Cells ( not neccessarily in this sheet ), that depend on the range
specified. Hence to find the cells that depend on a cell you have just altered
you must search all the range structures in the range_hash for that sheet.
you must search all the range structures in the range_hash for that sheet. This
is very important; to re-phrase dependancies are stored in an Area -> list of
depending cells fashion.
The DependencySingle structure mapping stores the degenerate case of
a DependencyRange. Essentialy it stores the cells that depend on a unit range.
This allows for extremely fast linear time hashed lookup. This contrasts with
the Range hash, all of which has to be traversed per dependency calculation.
NB. the DependencySingle has has to use CellPos' since there is no garentee that
NB. the DependencySingle has to use CellPos' since there is no garentee that
a cell will exist at a given position in the sheet that is depended on.
1.2 The generation gap
......@@ -71,7 +73,9 @@ the dependencies of this cell are queued on the workbook's eval_queue.
Value (value.h) we can prune a huge chunk off the dependency tree by not
bothering notifying dependencies of a change ( since there hasn't been one ).
Hence cell_eval_content returns a gboolean indicating whether the cell's
value has changed. (11/Apr/2000 JEG ?? It does not seem to. )
value has changed. (Ok, so this feature was dropped before the code went
live, since a few other changes were needed to support it, but there is room
for performance improvement here ).
3. Dependencies the bottleneck
......@@ -80,7 +84,7 @@ value has changed. (11/Apr/2000 JEG ?? It does not seem to. )
needs to be recomputed, it is clearly advantagous to spend time culling the
dependency tree as intelligently as possible. Furthermore since for each cell
that changes it is neccessary to determine its dependencies the lookup of
a cells dependencies needs to be fast.
a cell's dependencies needs to be fast.
3.1 Why two methods
......@@ -98,6 +102,11 @@ add an entry in the range_hash, we simply add an entry in the simple_hash.
Hence for the cell_get_dependencies we have one less entry in the range hash to
iterate over, which saves N iterations of search_cell_deps.
Another common case is having a lot of formulae sharing the same range
in the sheet as a dependency ( eg. cutting and pasting = SUM($A$1:$A$100) ). In
this case there is a single depedency range entry with many cells listed as its
dependancies.
3.2 Inter-sheet dependencies
Inter sheet dependencies are managed simply by inserting the dependency
......
2000-05-01 Michael Meeks <michael@helixcode.com>
* sample.c (create_test): Update object_activate.
* Makefile.am: handle the oaf.
* graph.oafinfo.in: add.
* sample.c (main): oafize.
* Makefile.am (-DGNUMERIC_GLADEDIR): kill.
* main.c (init_server_factory): update for oaf.
2000-04-06 Jody Goldberg <jgoldberg@home.com>
* graph.c (graph_compute_scatter_dimensions) : Minor patch to avoid
......
INCLUDES = \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DGNUMERIC_VERSION=\""$(VERSION)"\" \
-DGNUMERIC_GLADEDIR=\""$(gladedir)"\" \
-DGNUMERIC_ICONDIR=\""$(iconsdir)"\" \
-I$(includedir) \
......@@ -57,6 +56,8 @@ sample_LDADD = \
gnorbadir = $(sysconfdir)/CORBA/servers
oafdir = $(datadir)/oaf
gnorba_DATA = graph.gnorba
oaf_DATA = graph.oafinfo
EXTRA_DIST = graph.gnorba
EXTRA_DIST = graph.gnorba graph.oafinfo.in
......@@ -8,7 +8,12 @@
*/
#include <config.h>
#include <bonobo.h>
#include <libgnorba/gnorba.h>
#if USING_OAF
# include <liboaf/liboaf.h>
#else
# include <libgnorba/gnorba.h>
#endif
#include <gnome.h>
#include "idl/Graph.h"
#include "layout.h"
......@@ -22,11 +27,21 @@ static int active_layouts;
static void
init_server_factory (int argc, char **argv)
{
CORBA_ORB orb;
#if USING_OAF
gnome_init_with_popt_table ("graph", VERSION,
argc, argv,
oaf_popt_options, 0, NULL);
orb = oaf_init (argc, argv);
#else
gnome_CORBA_init_with_popt_table (
"graph", VERSION,
&argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
orb = gnome_CORBA_ORB ();
#endif
if (bonobo_init (orb, NULL, NULL) == FALSE)
g_error (_("I could not initialize Bonobo"));
......
......@@ -5,8 +5,13 @@
*
* (C) 1999, 2000 Helix Code, Inc.
*/
#include "config.h"
#include <gnome.h>
#include <libgnorba/gnorba.h>
#if USING_OAF
# include <liboaf/liboaf.h>
#else
# include <libgnorba/gnorba.h>
#endif
#include <bonobo.h>
#include "idl/Graph.h"
#include "vector.h"
......@@ -245,17 +250,37 @@ create_test (BonoboUIHandler *uih)
BonoboViewFrame *view_frame;
BonoboContainer *container;
int i;
#if USING_OAF
CORBA_Environment ev;
#endif
container = bonobo_container_new ();
client_site = bonobo_client_site_new (container);
#if USING_OAF
{
CORBA_Object o;
CORBA_exception_init (&ev);
/* FIXME: what a mighty hack */
o = oaf_activate ("description == 'Graph component'",
NULL, 0, NULL, &ev);
CORBA_exception_free (&ev);
if (!o)
object = NULL;
else
object = bonobo_object_client_from_corba ((Bonobo_Unknown)o);
}
#else
object = bonobo_object_activate ("GOADID:embeddable:Graph:Layout", 0);
if (!object){
#endif
if (!object) {
printf ("Can not activate object\n");
exit (1);
}
layout = bonobo_object_query_interface (BONOBO_OBJECT (object), "IDL:GNOME/Graph/Layout:1.0");
layout = bonobo_object_query_interface (
BONOBO_OBJECT (object), "IDL:GNOME/Graph/Layout:1.0");
if (layout == CORBA_OBJECT_NIL)
g_error ("interface Layout not supported");
......@@ -289,15 +314,26 @@ int
main (int argc, char *argv [])
{
BonoboUIHandler *uih;
GtkWidget *graph_widget, *toplevel;
GtkWidget *graph_widget;
GtkWidget *toplevel;
CORBA_ORB orb;
CORBA_exception_init (&ev);
#if USING_OAF
gnome_init_with_popt_table ("container", VERSION,
argc, argv,
oaf_popt_options, 0, NULL);
orb = oaf_init (argc, argv);
#else
gnome_CORBA_init ("Sample tester", "1.0", &argc, argv, 0, &ev);
orb = gnome_CORBA_ORB ();
#endif
/*
* Initialize Bonobo
*/
bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL);
bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL);
/*
* Start accepting CORBA requests
......@@ -313,7 +349,6 @@ main (int argc, char *argv [])
gnome_app_set_contents (GNOME_APP (toplevel), graph_widget);
gtk_widget_show (graph_widget);
/*
* Process user requests
*/
......
#ifndef __GNUMERIC_IDL__
#define __GNUMERIC_IDL__
/*
* If you are looking for a good example of Bonobo use, this is not it.
* please see bonobo/samples/ for a better starting point.
*/
#include <Bonobo.idl>
module GNOME {
......
#ifndef __GNUMERIC_IDL__
#define __GNUMERIC_IDL__
/*
* If you are looking for a good example of Bonobo use, this is not it.
* please see bonobo/samples/ for a better starting point.
*/
#include <Bonobo.idl>
module GNOME {
......
......@@ -8,7 +8,11 @@
*/
#include <config.h>
#include <gnome.h>
#include <libgnorba/gnorba.h>
#if USING_OAF
# include <liboaf/liboaf.h>
#else
# include <libgnorba/gnorba.h>
#endif
#include <bonobo.h>
#include "sheet.h"
#include "main.h"
......@@ -18,21 +22,36 @@
void
gnumeric_arg_parse (int argc, char *argv [])
{
#if !USING_OAF
CORBA_Environment ev;
#endif
CORBA_ORB orb;
CORBA_exception_init (&ev);
ctx = NULL;
#if USING_OAF
gnome_init_with_popt_table ("container", VERSION,
argc, argv,
oaf_popt_options, 0, NULL);
orb = oaf_init (argc, argv);
#else
CORBA_exception_init (&ev);
gnome_CORBA_init_with_popt_table (
"gnumeric", VERSION, &argc, argv,
gnumeric_popt_options, 0, &ctx, GNORBA_INIT_SERVER_FUNC, &ev);
if (bonobo_init (gnome_CORBA_ORB (), NULL, NULL) == FALSE){
CORBA_exception_free (&ev);
orb = gnome_CORBA_ORB ();
#endif
if (bonobo_init (orb, NULL, NULL) == FALSE)
g_error ("Failure starting up Bonobo");
}
if (!WorkbookFactory_init ()){
if (!WorkbookFactory_init ())
g_warning (_("Could not initialize the Gnumeric Workbook factory"));
}
EmbeddableGridFactory_init ();
}
/*
* corba-workbook-factory.c: CORBA Workbook factory.
*
* If you are looking for a good example of Bonobo use, this is not it.
* please see bonobo/samples/ for a better starting point.
*
* Author:
* Miguel de Icaza (miguel@gnu.org)
*/
#include <config.h>
#include <libgnorba/gnome-factory.h>
#include <libgnorba/gnorba.h>
#include <gnome.h>
#if USING_OAF
# include <liboaf/liboaf.h>
#else
# include <libgnorba/gnorba.h>
#endif
#include <bonobo.h>
#include <bonobo/bonobo-object-directory.h>
#include "sheet.h"
#include "gnumeric.h"
#include "workbook.h"
......@@ -70,10 +79,10 @@ WorkbookFactory_manufactures (PortableServer_Servant servant,
}
static CORBA_Object
WorkbookFactory_create_object (PortableServer_Servant servant,
const CORBA_char *goad_id,
const GNOME_stringlist *params,
CORBA_Environment *ev)
WorkbookFactory_create_object (PortableServer_Servant servant,
const CORBA_char *goad_id,
const Bonobo_stringlist *params,
CORBA_Environment *ev)
{
Workbook *workbook;
......@@ -129,14 +138,21 @@ static gboolean
_WorkbookFactory_init (CORBA_Environment *ev)
{
PortableServer_POAManager poa_manager;
int v;
CORBA_ORB orb;
int v;
#if USING_OAF
orb = oaf_orb_get ();
#else
orb = gnome_CORBA_ORB ();
#endif
/*
* Get the POA and create the server
*/
gnumeric_poa = (PortableServer_POA)
CORBA_ORB_resolve_initial_references (
gnome_CORBA_ORB (), "RootPOA", ev);
orb, "RootPOA", ev);
if (ev->_major != CORBA_NO_EXCEPTION)
return FALSE;
......@@ -163,11 +179,11 @@ _WorkbookFactory_init (CORBA_Environment *ev)
* that is floating around.
*/
v = goad_server_register (CORBA_OBJECT_NIL, gnumeric_workbook_factory,
"IDL:GNOME:Gnumeric:WorkbookFactory:1.0", "object", ev);
v = od_server_register (gnumeric_workbook_factory,
"IDL:GNOME:Gnumeric:WorkbookFactory:1.0");
v = goad_server_register (CORBA_OBJECT_NIL, gnumeric_workbook_factory,
"GOADID:GNOME:Gnumeric:WorkbookFactory:1.0", "object", ev);
v = od_server_register (gnumeric_workbook_factory,
"GOADID:GNOME:Gnumeric:WorkbookFactory:1.0");
if (v == 0)
return TRUE;
......