* zlib (http://www.zlib.net/).
+ * libxml2 (http://xmlsoft.org/).
+
The following packages are required to enable PSPP's graphing
features. If you cannot arrange to install them, you must run
`configure' with --without-cairo (in which case you will get no graphing
The following packages are optional:
-Installing the following packages will allow your PSPP program to read
-Gnumeric files.
-
- * libxml2 (http://xmlsoft.org/).
-
-Installing the following packages will allow your PSPP program to write
-OpenDocument text (ODT) files:
-
- * libxml2 (http://xmlsoft.org/).
-
Other optional packages:
* libreadline and libhistory
Changes from 1.0.1 to 1.1.0:
- ** The code implementing the sheet rendering has been removed. Instead we
- use a third party library: spread-sheet-widget.
+ * Build changes:
+
+ - zlib is now a required dependency. (Previously it was optional.)
+
+ * The code implementing the sheet rendering has been removed. Instead we
+ use a third party library: spread-sheet-widget.
- ** The "NOMISSING" keyword when generating syntax for piecharts in the frequencies
- command was omitted. This has been corrected.
+ * The "NOMISSING" keyword when generating syntax for piecharts in the
+ frequencies command was omitted. This has been corrected.
Changes from 1.0.0 to 1.0.1:
dnl Check for libxml2
PKG_CHECK_MODULES(
- [LIBXML2], [libxml-2.0],
- [HAVE_LIBXML2=yes],
- [HAVE_LIBXML2=no
- PSPP_OPTIONAL_PREREQ([libxml2])])
+ [LIBXML2], [libxml-2.0], [], [PSPP_REQUIRED_PREREQ([libxml2])])
dnl Check for zlib.
AC_SEARCH_LIBS([gzopen], [z], [], [PSPP_REQUIRED_PREREQ([zlib])])
[crc32], [gl_crc32],
[Avoid making zlib call gnulib's crc32() instead of its own.])
-dnl Gnumeric and OpenDocument (read) support requires libxml2 and zlib.
-if test $HAVE_LIBXML2 = yes; then
- GNM_READ_SUPPORT=yes
- ODF_READ_SUPPORT=yes
- AC_DEFINE(
- [GNM_READ_SUPPORT], [1],
- [Define to 1 if building in support for reading Gnumeric files.])
- AC_DEFINE(
- [ODF_READ_SUPPORT], [1],
- [Define to 1 if building in support for reading OpenDocument files.])
-else
- GNM_READ_SUPPORT=no
- ODF_READ_SUPPORT=no
-fi
-AC_SUBST([GNM_READ_SUPPORT])
-AC_SUBST([ODF_READ_SUPPORT])
-
-dnl ODF support requires libxml2 (zlib is optional).
-if test $HAVE_LIBXML2 = yes; then
- AC_DEFINE(
- [ODF_WRITE_SUPPORT], [1],
- [Define to 1 if building in support for writing OpenDocument files.])
-fi
-AM_CONDITIONAL([ODF_WRITE_SUPPORT], [test $HAVE_LIBXML2 = yes])
-
AC_ARG_WITH(
gui_tools,
[AS_HELP_STRING([--with-gui-tools], [build the gui developer tools. For DEVELOPERS only! There is no reason why users will need this flag.])])
#include <config.h>
-#include "libpspp/message.h"
-#include "libpspp/misc.h"
-
-#include "gl/minmax.h"
-#include "gl/c-strtod.h"
-
-#include "gettext.h"
-#define _(msgid) gettext (msgid)
-#define N_(msgid) (msgid)
-
-#include "spreadsheet-reader.h"
-
-#if !GNM_READ_SUPPORT
-
-struct spreadsheet *
-gnumeric_probe (const char *filename, bool report_errors)
-{
- if (report_errors)
- msg (ME, _("Support for %s files was not compiled into this installation of PSPP"), "Gnumeric");
-
- return NULL;
-}
-
-const char *
-gnumeric_get_sheet_name (struct spreadsheet *s, int n)
-{
- return NULL;
-}
-
-char *
-gnumeric_get_sheet_range (struct spreadsheet *s, int n)
-{
- return NULL;
-}
-
-struct casereader *
-gnumeric_make_reader (struct spreadsheet *spreadsheet,
- const struct spreadsheet_read_options *opts)
-{
- return NULL;
-}
-
-void
-gnumeric_unref (struct spreadsheet *r)
-{
-}
-
-
-#else
-
#include "data/gnumeric-reader.h"
+#include "spreadsheet-reader.h"
#include <assert.h>
#include <stdbool.h>
#include <libxml/xmlreader.h>
#include <zlib.h>
-#include "data/format.h"
-#include "data/data-in.h"
#include "data/case.h"
#include "data/casereader-provider.h"
+#include "data/data-in.h"
#include "data/dictionary.h"
+#include "data/format.h"
#include "data/identifier.h"
#include "data/value.h"
#include "data/variable.h"
#include "libpspp/i18n.h"
+#include "libpspp/message.h"
+#include "libpspp/misc.h"
#include "libpspp/str.h"
+#include "gl/c-strtod.h"
+#include "gl/minmax.h"
#include "gl/xalloc.h"
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+#define N_(msgid) (msgid)
/* Shamelessly lifted from the Gnumeric sources:
https://git.gnome.org/browse/gnumeric/tree/src/value.h
return NULL;
}
}
-
-
-#endif /* GNM_READ_SUPPORT */
#include <config.h>
-#include "libpspp/message.h"
-#include "libpspp/misc.h"
-#include "libpspp/assertion.h"
-
-#include "data/data-in.h"
-
-#include "gl/c-strtod.h"
-#include "gl/minmax.h"
-
-#include "gettext.h"
-#define _(msgid) gettext (msgid)
-#define N_(msgid) (msgid)
-
#include "ods-reader.h"
#include "spreadsheet-reader.h"
-#if !ODF_READ_SUPPORT
-
-struct spreadsheet *
-ods_probe (const char *filename, bool report_errors)
-{
- if (report_errors)
- msg (ME, _("Support for %s files was not compiled into this installation of PSPP"), "OpenDocument");
-
- return NULL;
-}
-
-const char *
-ods_get_sheet_name (struct spreadsheet *s, int n)
-{
- return NULL;
-}
-
-char *
-ods_get_sheet_range (struct spreadsheet *s, int n)
-{
- return NULL;
-}
-
-struct casereader *
-ods_make_reader (struct spreadsheet *spreadsheet,
- const struct spreadsheet_read_options *opts)
-{
- return NULL;
-}
-
-
-void
-ods_unref (struct spreadsheet *r)
-{
-}
-
-#else
-
-#include "libpspp/zip-reader.h"
-
-
#include <assert.h>
#include <stdbool.h>
#include <errno.h>
#include <libxml/xmlreader.h>
#include <zlib.h>
-#include "data/format.h"
#include "data/case.h"
#include "data/casereader-provider.h"
+#include "data/data-in.h"
#include "data/dictionary.h"
+#include "data/format.h"
#include "data/identifier.h"
#include "data/value.h"
#include "data/variable.h"
+#include "libpspp/assertion.h"
#include "libpspp/i18n.h"
+#include "libpspp/message.h"
+#include "libpspp/misc.h"
#include "libpspp/str.h"
+#include "libpspp/zip-reader.h"
+#include "gl/c-strtod.h"
+#include "gl/minmax.h"
#include "gl/xalloc.h"
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+#define N_(msgid) (msgid)
+
static void ods_file_casereader_destroy (struct casereader *, void *);
static struct ccase *ods_file_casereader_read (struct casereader *, void *);
return c;
}
-#endif
#ifndef ODS_READ_H
#define ODS_READ_H 1
+#include <stdbool.h>
+
struct casereader;
struct dictionary;
#include <gl/c-xvasprintf.h>
#include <stdlib.h>
-#ifdef ODF_READ_SUPPORT
-static const bool ODF_READING_SUPPORTED = true;
-#else
-static const bool ODF_READING_SUPPORTED = false;
-#endif
-
-#ifdef GNM_READ_SUPPORT
-static const bool GNM_READING_SUPPORTED = true;
-#else
-static const bool GNM_READING_SUPPORTED = false;
-#endif
-
void
spreadsheet_ref (struct spreadsheet *s)
{
switch (s->type)
{
case SPREADSHEET_ODS:
- assert (ODF_READING_SUPPORTED);
ods_unref (s);
break;
case SPREADSHEET_GNUMERIC:
- assert (GNM_READING_SUPPORTED);
gnumeric_unref (s);
break;
default:
spreadsheet_make_reader (struct spreadsheet *s,
const struct spreadsheet_read_options *opts)
{
- if (ODF_READING_SUPPORTED)
- if ( s->type == SPREADSHEET_ODS)
- return ods_make_reader (s, opts);
+ if ( s->type == SPREADSHEET_ODS)
+ return ods_make_reader (s, opts);
- if (GNM_READING_SUPPORTED)
- if ( s->type == SPREADSHEET_GNUMERIC)
- return gnumeric_make_reader (s, opts);
+ if ( s->type == SPREADSHEET_GNUMERIC)
+ return gnumeric_make_reader (s, opts);
return NULL;
}
const char *
spreadsheet_get_sheet_name (struct spreadsheet *s, int n)
{
- if (ODF_READING_SUPPORTED)
- if ( s->type == SPREADSHEET_ODS)
- return ods_get_sheet_name (s, n);
+ if ( s->type == SPREADSHEET_ODS)
+ return ods_get_sheet_name (s, n);
- if (GNM_READING_SUPPORTED)
- if ( s->type == SPREADSHEET_GNUMERIC)
- return gnumeric_get_sheet_name (s, n);
+ if ( s->type == SPREADSHEET_GNUMERIC)
+ return gnumeric_get_sheet_name (s, n);
return NULL;
}
char *
spreadsheet_get_sheet_range (struct spreadsheet *s, int n)
{
- if (ODF_READING_SUPPORTED)
- if ( s->type == SPREADSHEET_ODS)
- return ods_get_sheet_range (s, n);
+ if ( s->type == SPREADSHEET_ODS)
+ return ods_get_sheet_range (s, n);
- if (GNM_READING_SUPPORTED)
- if ( s->type == SPREADSHEET_GNUMERIC)
- return gnumeric_get_sheet_range (s, n);
+ if ( s->type == SPREADSHEET_GNUMERIC)
+ return gnumeric_get_sheet_range (s, n);
return NULL;
}
src/output/message-item.h \
src/output/msglog.c \
src/output/msglog.h \
+ src/output/odt.c \
src/output/options.c \
src/output/options.h \
src/output/output-item-provider.h \
src/output/charts/spreadlevel-cairo.c \
src/output/charts/scatterplot-cairo.c
endif
-if ODF_WRITE_SUPPORT
-src_output_liboutput_la_SOURCES += src/output/odt.c
-endif
EXTRA_DIST += \
src/output/README \
extern const struct output_driver_factory list_driver_factory;
extern const struct output_driver_factory html_driver_factory;
extern const struct output_driver_factory csv_driver_factory;
-#ifdef ODF_WRITE_SUPPORT
extern const struct output_driver_factory odt_driver_factory;
-#endif
#ifdef HAVE_CAIRO
extern const struct output_driver_factory pdf_driver_factory;
extern const struct output_driver_factory ps_driver_factory;
&list_driver_factory,
&html_driver_factory,
&csv_driver_factory,
-#ifdef ODF_WRITE_SUPPORT
&odt_driver_factory,
-#endif
#ifdef HAVE_CAIRO
&pdf_driver_factory,
&ps_driver_factory,
# Variables used internally by the testsuite.
EXEEXT='@EXEEXT@'
-GNM_READ_SUPPORT='@GNM_READ_SUPPORT@'
-ODF_READ_SUPPORT='@ODF_READ_SUPPORT@'
PERL='@PERL@'
WITH_PERL_MODULE='@WITH_PERL_MODULE@'
host='@host@'
m4_if($1,[GNM],[dnl
AT_CHECK([gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric])dnl
m4_define([testsheet],[Book1.gnumeric])dnl
- AT_SKIP_IF([test n$GNM_READ_SUPPORT != nyes])dnl
]) dnl
m4_if($1,[ODS],[dnl
AT_CHECK([cp $top_srcdir/tests/language/data-io/test.ods test.ods])dnl
m4_define([testsheet],[test.ods])dnl
- AT_SKIP_IF([test n$ODF_READ_SUPPORT != nyes])dnl
])dnl
])
dnl Check for a bug where gnumeric files were interpreted incorrectly
AT_SETUP([GET DATA /TYPE=GNM sheet index bug])
-AT_SKIP_IF([test n$GNM_READ_SUPPORT != nyes])
AT_DATA([minimal3.gnumeric],[dnl
<?xml version="1.0" encoding="UTF-8"?>
<gnm:Workbook xmlns:gnm="http://www.gnumeric.org/v10.dtd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.gnumeric.org/v9.xsd">
dnl Check for a bug where certain gnumeric files failed an assertion
AT_SETUP([GET DATA /TYPE=GNM assert-fail])
-AT_SKIP_IF([test n$GNM_READ_SUPPORT != nyes])
AT_DATA([read.sps],[dnl
GET DATA
/TYPE=GNM
AT_SETUP([GET DATA /TYPE=ODS crash])
-AT_SKIP_IF([test n$ODF_READ_SUPPORT != nyes])
AT_CHECK([cp $top_srcdir/tests/language/data-io/newone.ods this.ods])dnl