Re: Can't compile Gnumeric using libole



Andreas Buesching <crunchy tzi de> wrote:
> For the first time I thought it would be a good idea to compile libole2
> to have M$ file format support, but now I can't compile gnumeric
> anymore. Does anyone know this problem?
> 
> I'm using libole2 0.1.6 and gnumeric 0.56
> 
> this is the output of make:
> 
> make[3]: Entering directory `/local/install/gnome.all/install/gnumeric-0.56/src/dialogs'
> gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I./..                                              -DGNOMELOCALEDIR=\""/opt/gnome/share/locale"\"                 -DGNUMERIC_ICONDIR=\""/opt/gnome/share/pixmaps/gnumeric"\"                      -I/opt/gnome/include   -I/opt/gnome/include -DNEED_GNOMESUPPORT_H -I/opt/gnome/lib/gnome-libs/include -I/opt/gnome/lib/glib/include -I/usr/X11R6/include -I/opt/gnome/include/gnome-xml                                         -I/opt/gnome/lib/glib/include -I/opt/gnome/include -I/usr/X11R6/include  -g -O2 -Wall -Wunused  -c dialog-cell-format.c
> dialog-cell-format.c: In function `cb_font_changed':
> dialog-cell-format.c:1161: dereferencing pointer to incomplete type
> dialog-cell-format.c:1162: dereferencing pointer to incomplete type
> dialog-cell-format.c:1167: dereferencing pointer to incomplete type
> dialog-cell-format.c:1169: dereferencing pointer to incomplete type
> make[3]: *** [dialog-cell-format.o] Error 1
> make[3]: Leaving directory `/local/install/gnome.all/install/gnumeric-0.56/src/dialogs'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/local/install/gnome.all/install/gnumeric-0.56/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/local/install/gnome.all/install/gnumeric-0.56'
> make: *** [all-recursive-am] Error 2

Okay, the real problem is the new gnome-print library (0.22).

I have made a patch for that, maybe Miguel is interested in it.

diff -c -r gnumeric-0.56.orig/src/dialogs/dialog-cell-format.c gnumeric-0.56.patched/src/dialogs/dialog-cell-format.c
*** gnumeric-0.56.orig/src/dialogs/dialog-cell-format.c	Wed Jun 14 01:07:21 2000
--- gnumeric-0.56.patched/src/dialogs/dialog-cell-format.c	Fri Sep  8 15:39:44 2000
***************
*** 1158,1174 ****
  		return;
  
  	if (state->enable_edit && font_sel->size >= 1.) {
! 		GnomeFont const * const gnome_font = gnome_display_font->gnome_font;
! 		char const * const family_name = gnome_font->fontmap_entry->familyname;
  
! 		mstyle_set_font_name   (state->result, family_name);
! 		mstyle_set_font_size   (state->result, font_sel->size);
! 		mstyle_set_font_bold   (state->result,
! 					gnome_font->fontmap_entry->weight_code >=
! 					GNOME_FONT_BOLD);
! 		mstyle_set_font_italic (state->result, gnome_font->fontmap_entry->italic);
! 
! 		fmt_dialog_changed (state);
  	}
  }
  
--- 1158,1177 ----
  		return;
  
  	if (state->enable_edit && font_sel->size >= 1.) {
! 	  const GnomeFont *gnome_font = 
! 	    gnome_display_font_get_font(gnome_display_font);
! 	  char const * const family_name = 
! 	    gnome_font_get_family_name(gnome_font);
  
! 	  mstyle_set_font_name   (state->result, family_name);
! 	  mstyle_set_font_size   (state->result, font_sel->size);
! 	  mstyle_set_font_bold   (state->result,
! 				  gnome_font_get_weight_code(gnome_font) >=
! 				  GNOME_FONT_BOLD);
! 	  mstyle_set_font_italic (state->result, 
! 				  gnome_font_is_italic(gnome_font));
! 	  
! 	  fmt_dialog_changed (state);
  	}
  }
  
diff -c -r gnumeric-0.56.orig/src/global-gnome-font.c gnumeric-0.56.patched/src/global-gnome-font.c
*** gnumeric-0.56.orig/src/global-gnome-font.c	Sun Mar 26 17:14:29 2000
--- gnumeric-0.56.patched/src/global-gnome-font.c	Fri Sep  8 15:43:38 2000
***************
*** 27,33 ****
  	int i;
  	GList *l, *ll;
  
! 	l = gnome_font_family_list (gfc);
  
  	for (ll = l; ll; ll = ll->next){
  		gnumeric_font_family_list = g_list_insert_sorted (
--- 27,33 ----
  	int i;
  	GList *l, *ll;
  
! 	l = gnome_font_family_list ();
  
  	for (ll = l; ll; ll = ll->next){
  		gnumeric_font_family_list = g_list_insert_sorted (
diff -c -r gnumeric-0.56.orig/src/print.c gnumeric-0.56.patched/src/print.c
*** gnumeric-0.56.orig/src/print.c	Thu Jan  2 04:24:05 1997
--- gnumeric-0.56.patched/src/print.c	Fri Sep  8 15:48:54 2000
***************
*** 258,269 ****
  print_headers (PrintJobInfo *pj)
  {
  	PrintMargins *pm = &pj->pi->margins;
! 	double y;
  	
  	gnome_print_setfont (pj->print_context, pj->decoration_font);
  	gnome_print_setrgbcolor (pj->print_context, 0, 0, 0);
  	
- 	y = pj->height - pm->header.points - pj->decoration_font->size;
  	print_hf (pj, pj->pi->header->left_format,   LEFT_HEADER, y);
  	print_hf (pj, pj->pi->header->middle_format, MIDDLE_HEADER, y);
  	print_hf (pj, pj->pi->header->right_format,  RIGHT_HEADER, y);
--- 258,269 ----
  print_headers (PrintJobInfo *pj)
  {
  	PrintMargins *pm = &pj->pi->margins;
! 	double y = pj->height - pm->header.points - 
! 	  gnome_font_get_size(pj->decoration_font);
  	
  	gnome_print_setfont (pj->print_context, pj->decoration_font);
  	gnome_print_setrgbcolor (pj->print_context, 0, 0, 0);
  	
  	print_hf (pj, pj->pi->header->left_format,   LEFT_HEADER, y);
  	print_hf (pj, pj->pi->header->middle_format, MIDDLE_HEADER, y);
  	print_hf (pj, pj->pi->header->right_format,  RIGHT_HEADER, y);
diff -c -r gnumeric-0.56.orig/src/style.c gnumeric-0.56.patched/src/style.c
*** gnumeric-0.56.orig/src/style.c	Sun Jun 18 15:48:08 2000
--- gnumeric-0.56.patched/src/style.c	Fri Sep  8 16:08:23 2000
***************
*** 151,158 ****
  		/*
  		 * Worst case scenario
  		 */
! 		if (font->dfont->gdk_font == NULL)
! 			font->dfont->gdk_font = gdk_font_load ("fixed");
  		
  		font->font = gnome_font_new_closest (
  			font_name,
--- 151,160 ----
  		/*
  		 * Worst case scenario
  		 */
! 		/* I don't really know what to do here!!!!!!! 
! 		   other words: FIXED ME*/
! /*  		if (gnome_display_font_get_gdk_font(font->dfont) == NULL) */
! /*  		  font->dfont->gdk_font = gdk_font_load ("fixed"); */
  		
  		font->font = gnome_font_new_closest (
  			font_name,
***************
*** 223,229 ****
  {
  	g_return_val_if_fail (sf != NULL, NULL);
  
! 	return sf->dfont->gdk_font;
  }
  
  GnomeFont *
--- 225,231 ----
  {
  	g_return_val_if_fail (sf != NULL, NULL);
  
! 	return gnome_display_font_get_gdk_font(sf->dfont);
  }
  
  GnomeFont *
***************
*** 231,237 ****
  {
  	g_return_val_if_fail (sf != NULL, NULL);
  
! 	return sf->dfont->gnome_font;
  }
  
  int
--- 233,239 ----
  {
  	g_return_val_if_fail (sf != NULL, NULL);
  
! 	return gnome_display_font_get_font(sf->dfont);
  }
  
  int
diff -c -r gnumeric-0.56.orig/src/widgets/widget-font-selector.c gnumeric-0.56.patched/src/widgets/widget-font-selector.c
*** gnumeric-0.56.orig/src/widgets/widget-font-selector.c	Wed May 10 21:28:10 2000
--- gnumeric-0.56.patched/src/widgets/widget-font-selector.c	Fri Sep  8 15:41:38 2000
***************
*** 58,64 ****
  		 return;
  	 }
  
! 	 if (!display_font->gdk_font) {
  		 gtk_object_unref (GTK_OBJECT (gnome_font));
  		 return;
  	 }
--- 58,64 ----
  		 return;
  	 }
  
! 	 if (!gnome_display_font_get_gdk_font(display_font)) {
  		 gtk_object_unref (GTK_OBJECT (gnome_font));
  		 return;
  	 }
***************
*** 71,77 ****
  
  	 style = gtk_style_copy (fs->font_preview->style);
  	 gdk_font_unref (style->font);
! 	 style->font = fs->display_font->gdk_font;
  	 gdk_font_ref (style->font);
  
  	 gtk_widget_set_style (fs->font_preview, style);
--- 71,77 ----
  
  	 style = gtk_style_copy (fs->font_preview->style);
  	 gdk_font_unref (style->font);
! 	 style->font = gnome_display_font_get_gdk_font(fs->display_font);
  	 gdk_font_ref (style->font);
  
  	 gtk_widget_set_style (fs->font_preview, style);
PS: Beware of line 157 in file src/style.c

-- 
____________________________________________________________
\ Andreas Buesching > A Buesching web de
\\     (crunchy)     > crunchy tzi de
\\\ address           > Bremen, Germany               
\\\\ web site          > http://www.linuxfreak.com/~crunchy/ 


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