struct odf_driver_options
{
+ struct outp_driver *driver;
+
char *file_name; /* Output file name. */
bool debug;
};
handle_option (void *options_, const char *key, const struct string *val)
{
struct odf_driver_options *options = options_;
+ struct outp_driver *this = options->driver;
int subcat;
char *value = ds_cstr (val);
{
case -1:
error (0, 0,
- _("unknown configuration parameter `%s' for ODF device "
- "driver"), key);
+ _("unknown configuration parameter `%s' for %s device "
+ "driver"), key, this->class->name);
break;
case output_file_arg:
free (options->file_name);
this->ext = x = xmalloc (sizeof *x);
+ x->opts.driver = this;
x->opts.file_name = xstrdup ("pspp.pdt");
x->opts.debug = false;
}
static void
-odt_open_page (struct outp_driver *this)
+odt_open_page (struct outp_driver *this UNUSED)
{
}
static void
-odt_close_page (struct outp_driver *this)
+odt_close_page (struct outp_driver *this UNUSED)
{
}
static void
-odt_output_chart (struct outp_driver *this, const struct chart *chart)
+odt_output_chart (struct outp_driver *this UNUSED, const struct chart *chart UNUSED)
{
printf ("%s\n", __FUNCTION__);
}
/* Start column definitions */
xmlTextWriterStartElement (x->content_wtr, _xml("table:table-column"));
- xmlTextWriterWriteFormatAttribute (x->content_wtr, _xml("table:number-columns-repeated"), "%d", tab->nc);
+ xmlTextWriterWriteFormatAttribute (x->content_wtr, _xml("table:number-columns-repeated"), "%d", tab_nc (tab));
xmlTextWriterEndElement (x->content_wtr);
/* Deal with row headers */
- if ( tab->t > 0)
+ if ( tab_t (tab) > 0)
xmlTextWriterStartElement (x->content_wtr, _xml("table:table-header-rows"));
/* Write all the rows */
- for (r = 0 ; r < tab->nr; ++r)
+ for (r = 0 ; r < tab_nr (tab); ++r)
{
int spanned_columns = 0;
/* Start row definition */
xmlTextWriterStartElement (x->content_wtr, _xml("table:table-row"));
/* Write all the columns */
- for (c = 0 ; c < tab->nc ; ++c)
+ for (c = 0 ; c < tab_nc (tab) ; ++c)
{
char *s = NULL;
- unsigned int opts = tab->ct[tab->nc * r + c];
- struct substring ss = tab->cc[tab->nc * r + c];
+ unsigned int opts = tab->ct[tab_nc (tab) * r + c];
+ struct substring ss = tab->cc[tab_nc (tab) * r + c];
if (opts & TAB_EMPTY)
{
xmlTextWriterStartElement (x->content_wtr, _xml("text:p"));
- if ( r < tab->t || c < tab->l )
+ if ( r < tab_t (tab) || c < tab_l (tab) )
xmlTextWriterWriteAttribute (x->content_wtr, _xml("text:style-name"), _xml("Table_20_Heading"));
else
xmlTextWriterWriteAttribute (x->content_wtr, _xml("text:style-name"), _xml("Table_20_Contents"));
xmlTextWriterEndElement (x->content_wtr); /* row */
- if ( tab->t > 0 && r == tab->t - 1)
+ if ( tab_t (tab) > 0 && r == tab_t (tab) - 1)
xmlTextWriterEndElement (x->content_wtr); /* table-header-rows */
}