Seems like a better name to me.
#include "libpspp/u8-line.h"
#include "output/pivot-table.h"
#include "output/table.h"
-#include "output/page-eject-item.h"
+#include "output/page-break-item.h"
#include "output/text-item.h"
#include "gl/xalloc.h"
{
*eject = false;
if (trns->writer == NULL)
- page_eject_item_submit (page_eject_item_create ());
+ page_break_item_submit (page_break_item_create ());
else
leader = '1';
}
src/output/output-item-provider.h \
src/output/output-item.c \
src/output/output-item.h \
- src/output/page-eject-item.c \
- src/output/page-eject-item.h \
+ src/output/page-break-item.c \
+ src/output/page-break-item.h \
src/output/page-setup-item.c \
src/output/page-setup-item.h \
src/output/pivot-output.c \
#include "output/group-item.h"
#include "output/image-item.h"
#include "output/message-item.h"
-#include "output/page-eject-item.h"
+#include "output/page-break-item.h"
#include "output/page-setup-item.h"
#include "output/pivot-output.h"
#include "output/pivot-table.h"
if (is_table_item (item_)
|| is_chart_item (item_)
|| is_image_item (item_)
- || is_page_eject_item (item_))
+ || is_page_break_item (item_))
item = output_item_ref (item_);
else if (is_message_item (item_))
item = table_item_super (
assert (is_table_item (item)
|| is_chart_item (item)
|| is_image_item (item)
- || is_page_eject_item (item));
+ || is_page_break_item (item));
size_t *layer_indexes = NULL;
if (is_table_item (item))
draw_image (to_image_item (fsm->item)->image, cr);
else if (is_chart_item (fsm->item))
xr_draw_chart (to_chart_item (fsm->item), cr, CHART_WIDTH, CHART_HEIGHT);
- else if (is_page_eject_item (fsm->item))
+ else if (is_page_break_item (fsm->item))
{
/* Nothing to do. */
}
}
static int
-xr_fsm_draw_eject (struct xr_fsm *fsm, int space)
+xr_fsm_draw_page_break (struct xr_fsm *fsm, int space)
{
if (space >= fsm->rp.size[V])
fsm->done = true;
int used = (is_table_item (fsm->item) ? xr_fsm_draw_table (fsm, space)
: is_chart_item (fsm->item) ? xr_fsm_draw_chart (fsm, space)
: is_image_item (fsm->item) ? xr_fsm_draw_image (fsm, space)
- : is_page_eject_item (fsm->item) ? xr_fsm_draw_eject (fsm, space)
+ : is_page_break_item (fsm->item) ? xr_fsm_draw_page_break (fsm,
+ space)
: (abort (), 0));
fsm->cairo = NULL;
cairo_restore (cr);
#include "output/driver-provider.h"
#include "output/group-item.h"
#include "output/message-item.h"
-#include "output/page-eject-item.h"
#include "output/page-setup-item.h"
#include "output/table-item.h"
#include "output/text-item.h"
#include "output/driver-provider.h"
#include "output/options.h"
#include "output/message-item.h"
-#include "output/page-eject-item.h"
+#include "output/page-break-item.h"
#include "output/pivot-output.h"
#include "output/pivot-table.h"
#include "output/table-item.h"
else
csv_output_lines (csv, text);
}
- else if (is_page_eject_item (output_item))
+ else if (is_page_break_item (output_item))
{
csv_put_separator (csv);
csv_output_lines (csv, "");
--- /dev/null
+/* 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/>. */
+
+#include <config.h>
+
+#include "output/page-break-item.h"
+
+#include <stdlib.h>
+
+#include "output/driver-provider.h"
+#include "output/output-item-provider.h"
+
+#include "gl/xalloc.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+struct page_break_item *
+page_break_item_create (void)
+{
+ struct page_break_item *item = xmalloc (sizeof *item);
+ *item = (struct page_break_item) {
+ .output_item = OUTPUT_ITEM_INITIALIZER (&page_break_item_class),
+ };
+ return item;
+}
+
+/* Submits ITEM to the configured output drivers, and transfers ownership to
+ the output subsystem. */
+void
+page_break_item_submit (struct page_break_item *item)
+{
+ output_submit (&item->output_item);
+}
+
+static const char *
+page_break_item_get_label (const struct output_item *output_item UNUSED)
+{
+ return _("Page Break");
+}
+
+static void
+page_break_item_destroy (struct output_item *output_item)
+{
+ free (to_page_break_item (output_item));
+}
+
+const struct output_item_class page_break_item_class =
+ {
+ page_break_item_get_label,
+ page_break_item_destroy,
+ };
--- /dev/null
+/* 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_PAGE_BREAK_ITEM_H
+#define OUTPUT_PAGE_BREAK_ITEM_H 1
+
+/* Page break items.
+
+ This ejects the page (for output devices that have pages). */
+
+#include <stdbool.h>
+#include "output/output-item.h"
+
+/* A page break item. */
+struct page_break_item
+ {
+ struct output_item output_item;
+ };
+
+struct page_break_item *page_break_item_create (void);
+\f
+/* This boilerplate for page_break_item, a subclass of output_item, was
+ autogenerated by mk-class-boilerplate. */
+
+#include <assert.h>
+#include "libpspp/cast.h"
+
+extern const struct output_item_class page_break_item_class;
+
+/* Returns true if SUPER is a page_break_item, otherwise false. */
+static inline bool
+is_page_break_item (const struct output_item *super)
+{
+ return super->class == &page_break_item_class;
+}
+
+/* Returns SUPER converted to page_break_item. SUPER must be a page_break_item, as
+ reported by is_page_break_item. */
+static inline struct page_break_item *
+to_page_break_item (const struct output_item *super)
+{
+ assert (is_page_break_item (super));
+ return UP_CAST (super, struct page_break_item, output_item);
+}
+
+/* Returns INSTANCE converted to output_item. */
+static inline struct output_item *
+page_break_item_super (const struct page_break_item *instance)
+{
+ return CONST_CAST (struct output_item *, &instance->output_item);
+}
+
+/* Increments INSTANCE's reference count and returns INSTANCE. */
+static inline struct page_break_item *
+page_break_item_ref (const struct page_break_item *instance)
+{
+ return to_page_break_item (output_item_ref (&instance->output_item));
+}
+
+/* Decrements INSTANCE's reference count, then destroys INSTANCE if
+ the reference count is now zero. */
+static inline void
+page_break_item_unref (struct page_break_item *instance)
+{
+ output_item_unref (&instance->output_item);
+}
+
+/* Returns true if INSTANCE's reference count is greater than 1,
+ false otherwise. */
+static inline bool
+page_break_item_is_shared (const struct page_break_item *instance)
+{
+ return output_item_is_shared (&instance->output_item);
+}
+
+void page_break_item_submit (struct page_break_item *);
+\f
+#endif /* output/page-break-item.h */
+++ /dev/null
-/* 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/>. */
-
-#include <config.h>
-
-#include "output/page-eject-item.h"
-
-#include <stdlib.h>
-
-#include "output/driver-provider.h"
-#include "output/output-item-provider.h"
-
-#include "gl/xalloc.h"
-
-#include "gettext.h"
-#define _(msgid) gettext (msgid)
-
-struct page_eject_item *
-page_eject_item_create (void)
-{
- struct page_eject_item *item = xmalloc (sizeof *item);
- *item = (struct page_eject_item) {
- .output_item = OUTPUT_ITEM_INITIALIZER (&page_eject_item_class),
- };
- return item;
-}
-
-/* Submits ITEM to the configured output drivers, and transfers ownership to
- the output subsystem. */
-void
-page_eject_item_submit (struct page_eject_item *item)
-{
- output_submit (&item->output_item);
-}
-
-static const char *
-page_eject_item_get_label (const struct output_item *output_item UNUSED)
-{
- return _("Page Break");
-}
-
-static void
-page_eject_item_destroy (struct output_item *output_item)
-{
- free (to_page_eject_item (output_item));
-}
-
-const struct output_item_class page_eject_item_class =
- {
- page_eject_item_get_label,
- page_eject_item_destroy,
- };
+++ /dev/null
-/* 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_PAGE_EJECT_ITEM_H
-#define OUTPUT_PAGE_EJECT_ITEM_H 1
-
-/* Page eject items.
-
- This ejects the page (for output devices that have pages). */
-
-#include <stdbool.h>
-#include "output/output-item.h"
-
-/* A page eject item. */
-struct page_eject_item
- {
- struct output_item output_item;
- };
-
-struct page_eject_item *page_eject_item_create (void);
-\f
-/* This boilerplate for page_eject_item, a subclass of output_item, was
- autogenerated by mk-class-boilerplate. */
-
-#include <assert.h>
-#include "libpspp/cast.h"
-
-extern const struct output_item_class page_eject_item_class;
-
-/* Returns true if SUPER is a page_eject_item, otherwise false. */
-static inline bool
-is_page_eject_item (const struct output_item *super)
-{
- return super->class == &page_eject_item_class;
-}
-
-/* Returns SUPER converted to page_eject_item. SUPER must be a page_eject_item, as
- reported by is_page_eject_item. */
-static inline struct page_eject_item *
-to_page_eject_item (const struct output_item *super)
-{
- assert (is_page_eject_item (super));
- return UP_CAST (super, struct page_eject_item, output_item);
-}
-
-/* Returns INSTANCE converted to output_item. */
-static inline struct output_item *
-page_eject_item_super (const struct page_eject_item *instance)
-{
- return CONST_CAST (struct output_item *, &instance->output_item);
-}
-
-/* Increments INSTANCE's reference count and returns INSTANCE. */
-static inline struct page_eject_item *
-page_eject_item_ref (const struct page_eject_item *instance)
-{
- return to_page_eject_item (output_item_ref (&instance->output_item));
-}
-
-/* Decrements INSTANCE's reference count, then destroys INSTANCE if
- the reference count is now zero. */
-static inline void
-page_eject_item_unref (struct page_eject_item *instance)
-{
- output_item_unref (&instance->output_item);
-}
-
-/* Returns true if INSTANCE's reference count is greater than 1,
- false otherwise. */
-static inline bool
-page_eject_item_is_shared (const struct page_eject_item *instance)
-{
- return output_item_is_shared (&instance->output_item);
-}
-
-void page_eject_item_submit (struct page_eject_item *);
-\f
-#endif /* output/page-eject-item.h */
#include "data/settings.h"
#include "libpspp/assertion.h"
#include "libpspp/pool.h"
-#include "output/page-eject-item.h"
#include "output/pivot-table.h"
#include "output/table-item.h"
#include "output/table-provider.h"
#include "output/chart-item.h"
#include "output/group-item.h"
#include "output/image-item.h"
-#include "output/page-eject-item.h"
#include "output/page-setup-item.h"
#include "output/table-item.h"
#include "output/text-item.h"
#include "output/driver.h"
#include "output/group-item.h"
#include "output/image-item.h"
-#include "output/page-eject-item.h"
+#include "output/page-break-item.h"
#include "output/page-setup-item.h"
#include "output/pivot-table.h"
#include "output/table-item.h"
command_id);
free (command_id);
}
- else if (is_page_eject_item (item))
+ else if (is_page_break_item (item))
w->need_page_break = true;
else if (is_page_setup_item (item))
{