Ben Pfaff [Fri, 1 Jan 2021 06:43:57 +0000 (22:43 -0800)]
tests: Break off --draw-mode from render-test into ascii-test.
My plan is for render-test to go away in favor of a comprehensive test for
pivot tables, which are the only kinds of tables that actually matter.
The --draw-mode tests are a different kind of beast, so it makes sense to
keep them and put them in a different place.
Ben Pfaff [Thu, 31 Dec 2020 22:19:11 +0000 (14:19 -0800)]
pivot-output: Fix vertical line presence and style.
This code failed to draw dividers between groups and it didn't
follow the same pattern as SPSS for choosing between
"dimension" and "category" style for vertical dividers. This
commit fixes both problems.
Ben Pfaff [Thu, 31 Dec 2020 03:27:10 +0000 (19:27 -0800)]
output: Remove superscript support.
The previous commit df5005061c03 ("pivot-output: Implement superscript.")
finished this support, but on further inspection, there's nothing in the
non-legacy .spv format that can set a superscript. The legacy .spv format
appears to be able to do it; I'll worry about that if it gets implemented
later.
Ben Pfaff [Mon, 28 Dec 2020 22:13:43 +0000 (14:13 -0800)]
html: Make <th> cells be font-weight: normal by default.
This overrides typical web browser defaults. That seems reasonable, since
the driver styles all the cells according to the user specifications. We
could just use <td> for all cells, but there might be semantic value in
having properly marked header cells.
This code had the wrong notion of which headers to rotate. It also didn't
implement the observed behavior of rotated headers always being centered
both horizontally and vertically.
John Darrington [Sun, 27 Dec 2020 07:47:51 +0000 (08:47 +0100)]
Remove dummy-prerequisite rule
As Ben pointed out, this probably did more harm than good. So instead,
this change adds some explicit dependencies where prerequisites are
known to be necessary.
Ben Pfaff [Sun, 27 Dec 2020 01:54:07 +0000 (17:54 -0800)]
cairo: Label pages in PDFs with page numbers.
These normally wouldn't do much, but PSPP does support an "initial page
number" setting, and if that is set to anything but 1 then it will make
a difference.
Ben Pfaff [Sat, 26 Dec 2020 05:54:48 +0000 (21:54 -0800)]
cairo: Avoid using cairo_t for a destroyed cairo_surface_t.
xr_pager_destroy() would destroy the latest cairo_t, if there was one.
Generally there wasn't, since in the common case it got destroyed by
xr_pager_run() when the fsm emptied out, but in the case of the last page
in a produced output file, xr_destroy() would call xr_pager_destroy()
after first destroying the surface_t it was drawing on. I don't think this
is an actual bug, because everything is properly reference-counted inside
Cairo (the cairo_t holds a reference on its cairo_surface_t) but I found it
confusing.
Ben Pfaff [Mon, 21 Dec 2020 04:30:18 +0000 (20:30 -0800)]
pivot-table: Change the default format to omit empty rows and columns.
By making this the default, it doesn't become necessary to make a lot of
procedures that yield output change the format to produce reasonable
output. This means that the user's settings for the format won't get
overridden.
This changes a lot of output that had empty columns, in particular
anything that used DISPLAY DICTIONARY with a dictionary that had no
variable labels or missing values. This commit also updates the expected
output to match.
An unexpected side effect was that some tables became empty entirely, for
example LIST with no rows. This seemed undesirable, so I changed
pivot_table_enumerate_axis() so if an axis was entirely empty due to
omit_empty, then omit_empty was suppressed for that axis.
Ben Pfaff [Sun, 6 Dec 2020 01:07:12 +0000 (17:07 -0800)]
psppire-output-view: Consistently apply "transparent" and "systemcolors".
Commit 81dece3642da ("output view: make items selectable and use system
colours") add transparency and system colors to the driver in the GUI,
but it did so somewhat after the driver was created. I don't know why.
It makes more sense to me to set these options when creating the driver.
This commit makes that change. It also deletes the function to change
the options; it had no other user.
Ben Pfaff [Sat, 19 Dec 2020 05:10:28 +0000 (21:10 -0800)]
sys-file-reader: Omit @(#) from file strings in sfm_get_strings().
This function returns strings so that the user can figure out the file's
correct encoding. @(#) has different interpretations in a few encodings
(sometimes 0x23 is not #) and there's no value in displaying different
versions of it, so skip it.
Ben Pfaff [Thu, 17 Dec 2020 06:41:06 +0000 (22:41 -0800)]
tests: Restore tests that were commented out by buggy commit.
These were commented out by commit 691a034d7f21 ("Add copyright and
licence notices to files which lack them."). Subsequent commit 691a034d7f21 ("Add copyright and licence notices to files which lack
them.") fixed some but not all of the bugs. I think that this
commit fixes the rest.
Also, fix the one test that was broken in the meantime.