From 7fceea6249f2a570ecc44b5cb35f94711da957c1 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 26 Dec 2020 15:52:16 -0800 Subject: [PATCH] cairo-fsm: Remove code that was #if'd out. This was missed during an earlier refactoring. --- src/output/cairo-fsm.c | 100 ----------------------------------------- 1 file changed, 100 deletions(-) diff --git a/src/output/cairo-fsm.c b/src/output/cairo-fsm.c index f95ccd4c3f..c485eb7225 100644 --- a/src/output/cairo-fsm.c +++ b/src/output/cairo-fsm.c @@ -942,106 +942,6 @@ xr_layout_cell (struct xr_fsm *xr, const struct table_cell *cell, *brk = bb[V][0]; *height = xr_layout_cell_text (xr, cell, bb, clip, width, brk); } - -#if 0 -static bool -xr_table_render (struct xr_render_fsm *fsm, struct xr_fsm *xr) -{ - struct xr_table_state *ts = UP_CAST (fsm, struct xr_table_state, fsm); - - while (render_pager_has_next (ts->p)) - { - int used; - - used = render_pager_draw_next (ts->p, xr->length); - if (!used) - { - assert (xr->y > 0); - return true; - } - else - xr->y += used; - } - return false; -} - -static void -xr_table_destroy (struct xr_render_fsm *fsm) -{ - struct xr_table_state *ts = UP_CAST (fsm, struct xr_table_state, fsm); - - render_pager_destroy (ts->p); - free (ts); -} - -static struct xr_render_fsm * -xr_render_table (struct xr_fsm *xr, struct table_item *table_item) -{ - struct xr_table_state *ts; - - ts = xmalloc (sizeof *ts); - ts->fsm.render = xr_table_render; - ts->fsm.destroy = xr_table_destroy; - - if (xr->y > 0) - xr->y += xr->char_height; - - ts->p = render_pager_create (xr->params, table_item); - table_item_unref (table_item); - - return &ts->fsm; -} - -static bool -xr_eject_render (struct xr_render_fsm *fsm UNUSED, struct xr_fsm *xr) -{ - return xr->y > 0; -} - -static void -xr_eject_destroy (struct xr_render_fsm *fsm UNUSED) -{ - /* Nothing to do. */ -} - -static struct xr_render_fsm * -xr_render_eject (void) -{ - static struct xr_render_fsm eject_renderer = - { - xr_eject_render, - xr_eject_destroy - }; - - return &eject_renderer; -} - -#define CHART_WIDTH 500 -#define CHART_HEIGHT 375 - -static struct xr_render_fsm * -xr_render_text (struct xr_fsm *xr, const struct text_item *text_item) -{ - enum text_item_type type = text_item_get_type (text_item); - - switch (type) - { - case TEXT_ITEM_PAGE_TITLE: - break; - - case TEXT_ITEM_EJECT_PAGE: - if (xr->y > 0) - return xr_render_eject (); - break; - - default: - return xr_render_table ( - xr, text_item_to_table_item (text_item_ref (text_item))); - } - - return NULL; -} -#endif #define CHART_WIDTH 500 #define CHART_HEIGHT 375 -- 2.30.2