work toward getting rid of struct table in table_item
authorBen Pfaff <blp@cs.stanford.edu>
Mon, 28 Dec 2020 17:58:15 +0000 (09:58 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Thu, 31 Dec 2020 03:58:11 +0000 (19:58 -0800)
12 files changed:
src/output/automake.mk
src/output/cairo-fsm.c
src/output/cairo-fsm.h
src/output/cairo-pager.c
src/output/pivot-output.c
src/output/pivot-output.h [new file with mode: 0644]
src/output/pivot-table.c
src/output/pivot-table.h
src/output/spv/spv.h
src/output/table-item.c
src/output/table-item.h
src/ui/gui/psppire-output-view.c

index e267089c7def10714a5fb3b769899d9acc92ab02..fb476f4649d6a0785e700e810423a66420811138 100644 (file)
@@ -76,6 +76,7 @@ src_output_liboutput_la_SOURCES = \
        src/output/page-setup-item.c \
        src/output/page-setup-item.h \
        src/output/pivot-output.c \
+       src/output/pivot-output.h \
        src/output/pivot-table.c \
        src/output/pivot-table.h \
        src/output/render.c \
index 708bedec03756fc379a193151066c31e2197104e..58bbf230d5aada148969733bd73eefe4ebdb66e5 100644 (file)
@@ -115,12 +115,27 @@ xr_fsm_style_equals (const struct xr_fsm_style *a,
   return true;
 }
 \f
+/* Renders a single output_item to an output device in one of two ways:
+
+   - 'print == true': Broken across multiple pages if necessary.
+
+   - 'print == false': In a single region that the user may scroll around if
+     needed.
+
+   Normally 'output_item' corresponds to a single rendering.  There is a
+   special case when 'print == true' and 'output_item' is a table_item with
+   multiple layers and 'item->pt->table_look->print_all_layers == true'.  In
+   that case, each layer is rendered separately from the FSM's internal point
+   of view; from the client's point of view, it is all one operation.
+*/
 struct xr_fsm
   {
     struct xr_fsm_style *style;
     struct output_item *item;
+    bool print;
 
     /* Table items only. */
+    size_t *layer_indexes;
     struct render_params rp;
     struct render_pager *p;
     cairo_t *cairo;             /* XXX should this be here?! */
@@ -957,9 +972,10 @@ xr_layout_cell (struct xr_fsm *xr, const struct table_cell *cell,
 #define CHART_WIDTH 500
 #define CHART_HEIGHT 375
 
-struct xr_fsm *
+static struct xr_fsm *
 xr_fsm_create (const struct output_item *item_,
-               const struct xr_fsm_style *style, cairo_t *cr)
+               const struct xr_fsm_style *style, cairo_t *cr,
+               bool print)
 {
   if (is_page_setup_item (item_)
       || is_group_open_item (item_)
@@ -1001,6 +1017,14 @@ xr_fsm_create (const struct output_item *item_,
           || is_chart_item (item)
           || is_page_eject_item (item));
 
+  size_t *layer_indexes = NULL;
+  if (is_table_item (item))
+    {
+      layer_indexes = pivot_table_next_layer (table_item->pt, NULL, print);
+      if (!layer_indexes)
+        return NULL;
+    }
+
   static const struct render_ops xrr_render_ops = {
     .measure_cell_width = xrr_measure_cell_width,
     .measure_cell_height = xrr_measure_cell_height,
@@ -1021,10 +1045,16 @@ xr_fsm_create (const struct output_item *item_,
       [RENDER_LINE_DOUBLE] = 2 * LW + LS,
     };
 
+  size_t *layer_indexes = NULL;
+  if (is_table_item (item)
+  pivot_table_next_display_layer (
+
   struct xr_fsm *fsm = xmalloc (sizeof *fsm);
   *fsm = (struct xr_fsm) {
     .style = xr_fsm_style_ref (style),
     .item = item,
+    .print = print,
+    .layer_indexes = layer_indexes,
     .rp = {
       .ops = &xrr_render_ops,
       .aux = fsm,
@@ -1036,13 +1066,6 @@ xr_fsm_create (const struct output_item *item_,
     }
   };
 
-  if (is_table_item (item))
-    {
-      fsm->cairo = cr;
-      fsm->p = render_pager_create (&fsm->rp, to_table_item (item));
-      fsm->cairo = NULL;
-    }
-
   for (int i = 0; i < XR_N_FONTS; i++)
     {
       PangoContext *context = pango_cairo_create_context (cr);
@@ -1065,6 +1088,15 @@ xr_fsm_create (const struct output_item *item_,
       g_object_unref (G_OBJECT (layout));
     }
 
+  if (is_table_item (item))
+    {
+      struct table_item *table_item = to_table_item (item);
+
+      fsm->cairo = cr;
+      fsm->p = render_pager_create (&fsm->rp, table_item);
+      fsm->cairo = NULL;
+    }
+
   return fsm;
 }
 
index bf937835418b6b130d48c7b3edf5995223b59ab1..906ce12be3dc3a8deb3a03c63ed767ef28596747 100644 (file)
@@ -62,16 +62,20 @@ void xr_fsm_style_unref (struct xr_fsm_style *);
 bool xr_fsm_style_equals (const struct xr_fsm_style *,
                           const struct xr_fsm_style *);
 
-struct xr_fsm *xr_fsm_create (const struct output_item *,
-                              const struct xr_fsm_style *,
-                              cairo_t *);
-void xr_fsm_destroy (struct xr_fsm *);
-
+/* Interface used for rendering output items in a single on-screen region. */
+struct xr_fsm *xr_fsm_create_for_scrolling (const struct output_item *,
+                                            const struct xr_fsm_style *,
+                                            cairo_t *);
 void xr_fsm_measure (struct xr_fsm *, cairo_t *, int *w, int *h);
 void xr_fsm_draw_all (struct xr_fsm *, cairo_t *);
 void xr_fsm_draw_region (struct xr_fsm *, cairo_t *,
                          int x, int y, int w, int h);
 
+/* Interface used for rendering output items to a series of printed pages. */
+struct xr_fsm *xr_fsm_create_for_printing (const struct output_item *,
+                                           const struct xr_fsm_style *,
+                                           cairo_t *);
+void xr_fsm_destroy (struct xr_fsm *);
 int xr_fsm_draw_slice (struct xr_fsm *, cairo_t *, int space);
 bool xr_fsm_is_empty (const struct xr_fsm *);
 
index e87ec325248f2cff94d2fbdd2c57d7d1febc6a07..d096b0caceec08a783cdaf9f0d951ea51823681a 100644 (file)
@@ -396,7 +396,7 @@ xr_pager_run (struct xr_pager *p)
                 }
             }
 
-          p->fsm = xr_fsm_create (p->item, p->fsm_style, p->cr);
+          p->fsm = xr_fsm_create_for_printing (p->item, p->fsm_style, p->cr);
           if (!p->fsm)
             {
               output_item_unref (p->item);
index e8cacabad72107c1a4d08faf04ce568488129927..4c0ac48a86b385e50599f1d23c9cfbe5df26636a 100644 (file)
 
 #include <stdlib.h>
 
-#include "output/pivot-table.h"
+#include "output/pivot-output.h"
 
 #include "data/settings.h"
 #include "libpspp/assertion.h"
 #include "libpspp/pool.h"
-#include "output/table.h"
 #include "output/page-eject-item.h"
+#include "output/pivot-table.h"
 #include "output/table-item.h"
-#include "output/text-item.h"
 #include "output/table-provider.h"
+#include "output/table.h"
+#include "output/text-item.h"
 
 #include "gl/minmax.h"
 #include "gl/xalloc.h"
@@ -330,9 +331,9 @@ compose_headings (struct table *t,
     }
 }
 
-static void
-pivot_table_submit_layer (const struct pivot_table *pt,
-                          const size_t *layer_indexes)
+struct table *
+pivot_table_to_table (const struct pivot_table *pt,
+                      const size_t *layer_indexes)
 {
   const size_t *pindexes[PIVOT_N_AXES]
     = { [PIVOT_AXIS_LAYER] = layer_indexes };
@@ -479,99 +480,13 @@ pivot_table_submit_layer (const struct pivot_table *pt,
   free (column_enumeration);
   free (row_enumeration);
 
-  struct table_item *ti = table_item_create (table);
-
-  if (pt->notes)
-    table_item_set_notes (ti, pt->notes);
-
-  if (pt->title)
-    {
-      struct table_cell *title = pivot_value_to_table_cell (
-        pt->title, &pt->look->areas[PIVOT_AREA_TITLE], PIVOT_AREA_TITLE,
-        footnotes, pt->show_values, pt->show_variables);
-      table_item_set_title (ti, title);
-      table_cell_destroy (title);
-    }
-
-  const struct pivot_axis *layer_axis = &pt->axes[PIVOT_AXIS_LAYER];
-  struct table_item_layers *layers = NULL;
-  for (size_t i = 0; i < layer_axis->n_dimensions; i++)
-    {
-      const struct pivot_dimension *d = layer_axis->dimensions[i];
-      if (d->n_leaves)
-        {
-          if (!layers)
-            {
-              layers = xzalloc (sizeof *layers);
-              layers->style = table_area_style_override (
-                NULL, &pt->look->areas[PIVOT_AREA_LAYERS], NULL, NULL, false);
-              layers->layers = xnmalloc (layer_axis->n_dimensions,
-                                         sizeof *layers->layers);
-            }
-
-          const struct pivot_value *name
-            = d->data_leaves[layer_indexes[i]]->name;
-          struct table_item_layer *layer = &layers->layers[layers->n_layers++];
-          struct string s = DS_EMPTY_INITIALIZER;
-          pivot_value_format_body (name, pt->show_values, pt->show_variables,
-                                   &s);
-          layer->content = ds_steal_cstr (&s);
-          layer->n_footnotes = 0;
-          layer->footnotes = xnmalloc (name->n_footnotes,
-                                       sizeof *layer->footnotes);
-          for (size_t i = 0; i < name->n_footnotes; i++)
-            {
-              struct footnote *f = footnotes[name->footnotes[i]->idx];
-              if (f)
-                layer->footnotes[layer->n_footnotes++] = f;
-            }
-        }
-    }
-  if (layers)
-    {
-      table_item_set_layers (ti, layers);
-      table_item_layers_destroy (layers);
-    }
-
-  if (pt->caption && pt->show_caption)
-    {
-      struct table_cell *caption = pivot_value_to_table_cell (
-        pt->caption, &pt->look->areas[PIVOT_AREA_CAPTION], PIVOT_AREA_CAPTION,
-        footnotes, pt->show_values, pt->show_variables);
-      table_item_set_caption (ti, caption);
-      table_cell_destroy (caption);
-    }
-
   free (footnotes);
-  ti->pt = pivot_table_ref (pt);
 
-  table_item_submit (ti);
+  return table;
 }
 
 void
 pivot_table_submit (struct pivot_table *pt)
 {
-  pivot_table_assign_label_depth (CONST_CAST (struct pivot_table *, pt));
-
-  int old_decimal = settings_get_decimal_char (FMT_COMMA);
-  if (pt->decimal == '.' || pt->decimal == ',')
-    settings_set_decimal_char (pt->decimal);
-
-  if (pt->look->print_all_layers)
-    {
-      size_t *layer_indexes;
-
-      PIVOT_AXIS_FOR_EACH (layer_indexes, &pt->axes[PIVOT_AXIS_LAYER])
-        {
-          if (pt->look->paginate_layers)
-            page_eject_item_submit (page_eject_item_create ());
-          pivot_table_submit_layer (pt, layer_indexes);
-        }
-    }
-  else
-    pivot_table_submit_layer (pt, pt->current_layer);
-
-  settings_set_decimal_char (old_decimal);
-
-  pivot_table_unref (pt);
+  table_item_submit (table_item_create (pt));
 }
diff --git a/src/output/pivot-output.h b/src/output/pivot-output.h
new file mode 100644 (file)
index 0000000..495a0a7
--- /dev/null
@@ -0,0 +1,27 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2020 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef OUTPUT_PIVOT_OUTPUT_H
+#define OUTPUT_PIVOT_OUTPUT_H 1
+
+#include <stddef.h>
+
+struct pivot_table;
+
+struct table *pivot_table_to_table (const struct pivot_table *,
+                                    const size_t *layer_indexes);
+
+#endif /* output/pivot-output.h */
index afa306e30ff9607ffca429ade31a88c29a353b73..96dd9d2413abaac75fd58a251a2aa41ef46c8a96 100644 (file)
@@ -370,7 +370,8 @@ pivot_axis_iterator_next (size_t *indexes, const struct pivot_axis *axis)
           if (axis->dimensions[i]->n_leaves == 0)
             return NULL;
 
-      return xcalloc (axis->n_dimensions, sizeof *indexes);
+      size_t size = axis->n_dimensions * sizeof *indexes;
+      return xzalloc (MAX (size, 1));
     }
 
   for (size_t i = 0; i < axis->n_dimensions; i++)
@@ -993,6 +994,25 @@ pivot_table_is_empty (const struct pivot_table *table)
   return hmap_is_empty (&table->cells);
 }
 
+size_t *
+pivot_table_next_display_layer (const struct pivot_table *pt, size_t *indexes,
+                                bool print)
+{
+  const struct pivot_axis *layer_axis = &pt->axes[PIVOT_AXIS_LAYER];
+  if (print && pt->look->print_all_layers)
+    return pivot_axis_iterator_next (indexes, layer_axis);
+  else if (!indexes)
+    {
+      size_t size = layer_axis->n_dimensions * sizeof *pt->current_layer;
+      return xmemdup (pt->current_layer, MAX (size, 1));
+    }
+  else
+    {
+      free (indexes);
+      return NULL;
+    }
+}
+
 static unsigned int
 pivot_cell_hash_indexes (const size_t *indexes, size_t n_idx)
 {
index 091984a0daecd896bc585ad7cdc5938e99e88fcc..a62c5b7bae34f0c2e9ba6080c77fe59168771bb7 100644 (file)
@@ -432,7 +432,7 @@ struct pivot_table
     bool show_grid_lines;
     bool show_title;
     bool show_caption;
-    size_t *current_layer; /* axis[PIVOT_AXIS_LAYER].n_dimensions elements. */
+    size_t *current_layer; /* axes[PIVOT_AXIS_LAYER].n_dimensions elements. */
     enum settings_value_show show_values;
     enum settings_value_show show_variables;
     struct fmt_spec weight_format;
@@ -509,6 +509,13 @@ bool pivot_table_is_empty (const struct pivot_table *);
 /* Output. */
 void pivot_table_submit (struct pivot_table *);
 
+/* Layers. */
+#define PIVOT_TABLE_FOR_EACH_DISPLAY_LAYER(INDEXES, PT, PRINT)          \
+  for ((INDEXES) = NULL;                                                \
+       ((INDEXES) = pivot_table_next_display_layer (PT, INDEXES, PRINT)); )
+size_t *pivot_table_next_display_layer (const struct pivot_table *,
+                                        size_t *indexes, bool print);
+
 /* Data cells. */
 void pivot_table_put (struct pivot_table *, const size_t *dindexes, size_t n,
                       struct pivot_value *);
index 6857d9b3b67f7e0d01dd699a2c6de6893b0c1798..d1706f4e7ecc4334c2e4d49e6f45b3fdc6335161 100644 (file)
@@ -116,8 +116,8 @@ struct spv_item
     char *structure_member;
 
     enum spv_item_type type;
-    char *label;
-    char *command_id;           /* Unique command identifier. */
+    char *label;                /* Localized label. */
+    char *command_id;           /* Non-localized unique command identifier. */
 
     /* Whether the item is visible.
        For SPV_ITEM_HEADING, false indicates that the item is collapsed.
index 7e8542c176b8ec778ad55a5f1ea75a00803cd66e..54519d082eb261a268e5b9d9a4cd25ac20627f1b 100644 (file)
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-void
-table_item_layer_copy (struct table_item_layer *dst,
-                       const struct table_item_layer *src)
-{
-  dst->content = xstrdup (src->content);
-  dst->footnotes = xmemdup (src->footnotes,
-                            src->n_footnotes * sizeof *src->footnotes);
-  dst->n_footnotes = src->n_footnotes;
-}
-void
-table_item_layer_uninit (struct table_item_layer *layer)
-{
-  if (layer)
-    {
-      free (layer->content);
-      free (layer->footnotes);
-    }
-}
-
-struct table_item_layers *
-table_item_layers_clone (const struct table_item_layers *old)
-{
-  if (!old)
-    return NULL;
-
-  struct table_item_layers *new = xmalloc (sizeof *new);
-  *new = (struct table_item_layers) {
-    .layers = xnmalloc (old->n_layers, sizeof *new->layers),
-    .n_layers = old->n_layers,
-    .style = table_area_style_clone (NULL, old->style),
-  };
-  for (size_t i = 0; i < new->n_layers; i++)
-    table_item_layer_copy (&new->layers[i], &old->layers[i]);
-  return new;
-}
-
-void
-table_item_layers_destroy (struct table_item_layers *layers)
-{
-  if (layers)
-    {
-      for (size_t i = 0; i < layers->n_layers; i++)
-        table_item_layer_uninit (&layers->layers[i]);
-      free (layers->layers);
-      table_area_style_free (layers->style);
-      free (layers);
-    }
-}
-
-/* Initializes ITEM as a table item for rendering TABLE.  Takes ownership of
-   TABLE. */
+/* Initializes ITEM as a table item for rendering PT.  Takes ownership of
+   PT. */
 struct table_item *
-table_item_create (struct table *table)
+table_item_create (struct pivot_table *pt)
 {
+  pivot_table_assign_label_depth (pt);
+
   struct table_item *item = xmalloc (sizeof *item);
   *item = (struct table_item) {
     .output_item = OUTPUT_ITEM_INITIALIZER (&table_item_class),
-    .table = table,
+    .pt = pt,
   };
   return item;
 }
 
-/* Returns the table contained by TABLE_ITEM.  The caller must not modify or
-   unref the returned table. */
-const struct table *
-table_item_get_table (const struct table_item *table_item)
-{
-  return table_item->table;
-}
-
-/* Returns ITEM's title, which is a null pointer if no title has been
-   set. */
-const struct table_cell *
-table_item_get_title (const struct table_item *item)
-{
-  return item->title;
-}
-
-/* Sets ITEM's title to TITLE, replacing any previous title.  Specify NULL for
-   TITLE to clear any title from ITEM.  The caller retains ownership of TITLE.
-
-   This function may only be used on a table_item that is unshared. */
-void
-table_item_set_title (struct table_item *item, const struct table_cell *title)
-{
-  assert (!table_item_is_shared (item));
-  table_cell_destroy (item->title);
-  item->title = table_cell_clone (title);
-}
-
-/* Returns ITEM's layers, which will be a null pointer if no layers have been
-   set. */
-const struct table_item_layers *
-table_item_get_layers (const struct table_item *item)
-{
-  return item->layers;
-}
-
-/* Sets ITEM's layers to LAYERS, replacing any previous layers.  Specify NULL
-   for LAYERS to clear any layers from ITEM.  The caller retains ownership of
-   LAYERS.
-
-   This function may only be used on a table_item that is unshared. */
-void
-table_item_set_layers (struct table_item *item,
-                       const struct table_item_layers *layers)
-{
-  assert (!table_item_is_shared (item));
-  table_item_layers_destroy (item->layers);
-  item->layers = table_item_layers_clone (layers);
-}
-
-/* Returns ITEM's caption, which is a null pointer if no caption has been
-   set. */
-const struct table_cell *
-table_item_get_caption (const struct table_item *item)
-{
-  return item->caption;
-}
-
-/* Sets ITEM's caption to CAPTION, replacing any previous caption.  Specify
-   NULL for CAPTION to clear any caption from ITEM.  The caller retains
-   ownership of CAPTION.
-
-   This function may only be used on a table_item that is unshared. */
-void
-table_item_set_caption (struct table_item *item,
-                        const struct table_cell *caption)
-{
-  assert (!table_item_is_shared (item));
-  table_cell_destroy (item->caption);
-  item->caption = table_cell_clone (caption);
-}
-
-/* Returns ITEM's notes, which is a null pointer if ITEM has no notes. */
-const char *
-table_item_get_notes (const struct table_item *item)
-{
-  return item->notes;
-}
-
-/* Sets ITEM's notes to NOTES, replacing any previous notes.  Specify NULL for
-   NOTES to clear any notes from ITEM.  The caller retains ownership of
-   NOTES.
-
-   This function may only be used on a table_item that is unshared.*/
-void
-table_item_set_notes (struct table_item *item, const char *notes)
-{
-  assert (!table_item_is_shared (item));
-  free (item->notes);
-  item->notes = notes ? xstrdup (notes) : NULL;
-}
-
 /* Submits TABLE_ITEM to the configured output drivers, and transfers ownership
    to the output subsystem. */
 void
@@ -199,22 +59,26 @@ table_item_submit (struct table_item *table_item)
 static const char *
 table_item_get_label (const struct output_item *output_item)
 {
-  const struct table_item *item = to_table_item (output_item);
-  return (item->title && item->title->text
-          ? item->title->text
-          : _("Table"));
+  struct table_item *item = to_table_item (output_item);
+
+  if (!item->cached_label)
+    {
+      if (!item->pt->title)
+        return _("Table");
+
+      item->cached_label = pivot_value_to_string (item->pt->title,
+                                                  SETTINGS_VALUE_SHOW_DEFAULT,
+                                                  SETTINGS_VALUE_SHOW_DEFAULT);
+    }
+  return item->cached_label;
 }
 
 static void
 table_item_destroy (struct output_item *output_item)
 {
   struct table_item *item = to_table_item (output_item);
-  table_cell_destroy (item->title);
-  table_cell_destroy (item->caption);
-  table_item_layers_destroy (item->layers);
-  free (item->notes);
   pivot_table_unref (item->pt);
-  table_unref (item->table);
+  free (item->cached_label);
   free (item);
 }
 
index aa41edaa3afbbd948835a88122baa7a867ef9717..96394c4182eb7addf4ab21ed1e0ed30864d433e1 100644 (file)
 #include "output/output-item.h"
 #include "output/table.h"
 
-struct table_item_layer
-  {
-    char *content;
-    struct footnote **footnotes;
-    size_t n_footnotes;
-  };
-
-void table_item_layer_copy (struct table_item_layer *,
-                            const struct table_item_layer *);
-void table_item_layer_uninit (struct table_item_layer *);
-
-struct table_item_layers
-  {
-    struct table_item_layer *layers;
-    size_t n_layers;
-    struct table_area_style *style;
-  };
-
-struct table_item_layers *table_item_layers_clone (
-  const struct table_item_layers *);
-void table_item_layers_destroy (struct table_item_layers *);
-
 /* A table item.
 
    The members of struct table_item should not be accessed directly.  Use one
@@ -58,31 +36,12 @@ void table_item_layers_destroy (struct table_item_layers *);
 struct table_item
   {
     struct output_item output_item;   /* Superclass. */
-    struct table *table;              /* The table to be rendered. */
-    struct table_cell *title;         /* Null if there is no title. */
-    struct table_cell *caption;       /* Null if there is no caption. */
-    struct table_item_layers *layers; /* Null if there is no layer info. */
-    char *notes;                      /* Shown as tooltip. */
-    struct pivot_table *pt;
-  };
-
-struct table_item *table_item_create (struct table *);
-
-const struct table *table_item_get_table (const struct table_item *);
+    struct pivot_table *pt;           /* The table to be rendered. */
 
-const struct table_cell *table_item_get_title (const struct table_item *);
-void table_item_set_title (struct table_item *, const struct table_cell *);
-
-const struct table_item_layers *table_item_get_layers (
-  const struct table_item *);
-void table_item_set_layers (struct table_item *,
-                           const struct table_item_layers *);
-
-const struct table_cell *table_item_get_caption (const struct table_item *);
-void table_item_set_caption (struct table_item *, const struct table_cell *);
+    char *cached_label;
+  };
 
-const char *table_item_get_notes (const struct table_item *);
-void table_item_set_notes (struct table_item *, const char *notes);
+struct table_item *table_item_create (struct pivot_table *);
 \f
 /* This boilerplate for table_item, a subclass of output_item, was
    autogenerated by mk-class-boilerplate. */
index cc00a05bdaa327f8188f43bdeb826bc311daa00c..70b62b1c5a4af42efddf81526a836693daea5c0c 100644 (file)
@@ -337,7 +337,7 @@ rerender (struct psppire_output_view *view)
       if (is_group_open_item (item->item))
         continue;
 
-      r = xr_fsm_create (item->item, view->style, cr);
+      r = xr_fsm_create_for_scrolling (item->item, view->style, cr);
       if (r == NULL)
         {
           g_warn_if_reached ();
@@ -451,7 +451,7 @@ psppire_output_view_put (struct psppire_output_view *view,
       if (view->y > 0)
         view->y += view->object_spacing;
 
-      struct xr_fsm *r = xr_fsm_create (item, view->style, cr);
+      struct xr_fsm *r = xr_fsm_create_for_scrolling (item, view->style, cr);
       if (r == NULL)
        {
          gdk_window_end_draw_frame (win, ctx);