Commit bc51c314 authored by Emmanuel Pacaud's avatar Emmanuel Pacaud Committed by Emmanuel Pacaud

Remove GOFFICE_WITH_CAIRO ifdefs.

2007-09-28  Emmanuel Pacaud <emmanuel.pacaud@lapp.in2p3.fr>

	Remove GOFFICE_WITH_CAIRO ifdefs.

	* component/gnumeric.c: here.
	* src/gnm-so-filled.c: here.
	* src/gnm-so-line.c: here.
	* src/gnm-so-polygon.c: here.
	* src/sheet-object-graph.c: here.
	* src/sheet-object.c: here.

svn path=/trunk/; revision=15941
parent 18c05fdf
2007-09-28 Emmanuel Pacaud <emmanuel.pacaud@lapp.in2p3.fr>
Remove GOFFICE_WITH_CAIRO ifdefs.
* component/gnumeric.c: here.
* src/gnm-so-filled.c: here.
* src/gnm-so-line.c: here.
* src/gnm-so-polygon.c: here.
* src/sheet-object-graph.c: here.
* src/sheet-object.c: here.
2007-09-28 Emmanuel Pacaud <emmanuel.pacaud@lapp.in2p3.fr>
* src/sheet-object-graph.c (gnm_sog_draw_cairo): use
......
......@@ -22,7 +22,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
#include <gnumeric-config.h>
#include <gnumeric.h>
#include <libgnumeric.h>
......@@ -61,10 +61,8 @@
#include <gtk/gtkstock.h>
#include <glib/gi18n-lib.h>
#ifdef GOFFICE_WITH_CAIRO
# include <cairo.h>
# include <pango/pangocairo.h>
#endif
#include <cairo.h>
#include <pango/pangocairo.h>
GOPluginModuleDepend const go_plugin_depends [] = {
{ "goffice", GOFFICE_API_VERSION }
......@@ -131,7 +129,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);
g_object_unref (gognm->wv);
gognm->wv = wb_view_new_from_input (input, NULL, io_context, NULL);
g_object_unref (io_context);
gognm->sheet = wb_view_cur_sheet (gognm->wv);
......@@ -150,7 +148,6 @@ go_gnm_component_set_data (GOComponent *component)
component->ascent = gognm->height / 72.;
}
#ifdef GOFFICE_WITH_CAIRO
static void
cell_render_cairo (cairo_t *cairo, GnmCell *cell,
ColRowInfo const *ci, ColRowInfo const *ri)
......@@ -211,12 +208,10 @@ cell_render_cairo (cairo_t *cairo, GnmCell *cell,
}
}
}
#endif
static void
go_gnm_component_draw (GOComponent *component, int width_pixels, int height_pixels)
{
#ifdef GOFFICE_WITH_CAIRO
GOGnmComponent *gognm = GO_GNM_COMPONENT (component);
int col, row;
cairo_t *cairo;
......@@ -285,7 +280,6 @@ go_gnm_component_draw (GOComponent *component, int width_pixels, int height_pixe
cairo_destroy (cairo);
go_image_get_pixbuf (image);
g_object_unref (image);
#endif
}
#if 0
......@@ -399,7 +393,7 @@ go_gnm_component_edit (GOComponent *component)
GOCmdContext *cc = go_component_get_command_context ();
IOContext *io_context = gnumeric_io_context_new (cc);
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);
g_object_unref (io_context);
......
......@@ -250,7 +250,6 @@ static void
gnm_so_filled_draw_cairo (SheetObject const *so, gpointer data,
double width, double height)
{
#ifdef GOFFICE_WITH_CAIRO
GnmSOFilled *sof = GNM_SO_FILLED (so);
cairo_t *cairo = (cairo_t*) data;
GogStyle const *style = sof->style;
......@@ -288,7 +287,6 @@ gnm_so_filled_draw_cairo (SheetObject const *so, gpointer data,
UINT_RGBA_G(style->outline.color),
UINT_RGBA_A(style->outline.color));
cairo_stroke (cairo);
#endif
}
static gboolean
......
......@@ -206,9 +206,8 @@ gnm_so_line_new_view (SheetObject *so, SheetObjectViewContainer *container)
static void
gnm_so_line_draw_cairo (SheetObject const *so, gpointer data,
double width, double height)
double width, double height)
{
#ifdef GOFFICE_WITH_CAIRO
GnmSOLine *sol = GNM_SO_LINE (so);
cairo_t *cairo = (cairo_t*) data;
GogStyleLine const *style = &sol->style->line;
......@@ -285,7 +284,6 @@ gnm_so_line_draw_cairo (SheetObject const *so, gpointer data,
cairo_move_to (cairo, x1, y1);
cairo_line_to (cairo, x2, y2);
cairo_stroke (cairo);
#endif
}
static gboolean
......
......@@ -197,8 +197,6 @@ static void
gnm_so_polygon_draw_cairo (SheetObject const *so, gpointer data,
double width, double height)
{
#ifdef GOFFICE_WITH_CAIRO
#endif
}
static gboolean
......
......@@ -388,10 +388,8 @@ static void
gnm_sog_draw_cairo (SheetObject const *so, gpointer data,
double width, double height)
{
#ifdef GOFFICE_WITH_CAIRO
gog_graph_render_to_cairo
(SHEET_OBJECT_GRAPH (so)->graph, data, width, height);
#endif
gog_graph_render_to_cairo (SHEET_OBJECT_GRAPH (so)->graph,
data, width, height);
}
typedef struct {
......
......@@ -525,7 +525,6 @@ sheet_object_can_print (SheetObject const *so)
void
sheet_object_draw_cairo (SheetObject const *so, gpointer *data, gboolean rtl)
{
#ifdef GOFFICE_WITH_CAIRO
if (SO_CLASS (so)->draw_cairo) {
cairo_t *cairo = (cairo_t*) data;
SheetObjectAnchor const *anchor;
......@@ -565,7 +564,6 @@ sheet_object_draw_cairo (SheetObject const *so, gpointer *data, gboolean rtl)
cairo_translate (cairo, x, y);
SO_CLASS (so)->draw_cairo (so, cairo, width, height);
}
#endif
}
GnmRange const *
......
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