Ben Pfaff [Tue, 12 Jan 2021 04:38:21 +0000 (20:38 -0800)]
configure: Require @clicksequence to be present.
Occasionally someone tries to build with a really old Texinfo. It doesn't
work now, although it once did, but before this commit it would
successfully configure. By preventing configure from finishing, I think
that this will produce a clearer error message earlier in the build
process, ultimately making life easier for users.
Ben Pfaff [Mon, 11 Jan 2021 06:19:35 +0000 (22:19 -0800)]
output-item: Collapse the inheritance hierarchy into a single struct.
When I designed this inheritance hierarchy, what was really needed was a
bit of a mystery. Now, it's pretty clear what is really going to be here,
and it simplifies and clarifies code a lot to just have a struct with an
embedded union. It also removes, net, about 1000 lines of code.
Ben Pfaff [Mon, 11 Jan 2021 02:20:11 +0000 (18:20 -0800)]
output-item: Make command name part of every output_item.
Until now, group_items and text_items have had a command name, but SPV
files make the command name part of every output_item. This change
make output_item better aligned.
Ben Pfaff [Sun, 10 Jan 2021 04:01:12 +0000 (20:01 -0800)]
pivot-table: Test round-tripping to an .spv file.
Displaying a pivot table directly should produce the same results as
writing it to an .spv file and then re-reading the .spv file. This wasn't
consistently the case before the last few patches. This set of test
updates guards against regression.
Ben Pfaff [Sun, 10 Jan 2021 02:02:50 +0000 (18:02 -0800)]
pivot-table: Allow footnote marker style to change after creation.
Footnote markers can be set as numeric or alphabetic. Until now, the code
for this has only honored this setting at the time the footnote was added.
With this commit, changes in this setting are also honored after adding it.
Ben Pfaff [Sat, 9 Jan 2021 07:02:23 +0000 (23:02 -0800)]
spv-light-decoder: Add back character set encoding support.
Originally, SPV light member decoding would obtain the member's declared
character set encoding and recode all strings from that encoding into
UTF-8.
The SPV file submitted along with bug #59837, however, showed that SPV
files actually contain UTF-8 strings despite their declared character
encoding. This SPV file declared windows-1253 encoding. It contained 221
unique strings, 52 of which contained non-ASCII characters, and all of
which were valid UTF-8. Therefore, commit db9a44802bb9
("spv-light-decoder: Text strings are all UTF-8 encoded.") changed the
SPV light member decoder to treat all strings as UTF-8 encoded.
Unfortunately, further examination of the SPV corpus showed that there is
no consistency. Some files do contain all UTF-8 despite declaring another
character set. For example:
Ben Pfaff [Thu, 7 Jan 2021 01:03:43 +0000 (17:03 -0800)]
pivot-table: Incorporate format settings.
This allows pivot tables to save the decimal point and custom
currency settings that were in effect when they were created,
and to honor the ones read from an .spv file.
Ben Pfaff [Wed, 6 Jan 2021 23:07:19 +0000 (15:07 -0800)]
format: Make format settings structure smaller and cheaper.
Until now, there has only been one copy of the fmt_settings structure in a
given PSPP process, so it hardly mattered what size it was. In an upcoming
commit, there will be one copy per pivot table, so it becomes more
important. This commit shrinks it.
Ben Pfaff [Fri, 1 Jan 2021 06:44:23 +0000 (22:44 -0800)]
output: Make table_item a pivot_table, table_cell a pivot_value.
This greatly simplifies a lot of glue code and it brings the
internal representation of tables in output closer to the .spv
format representation, which will make better compatibility
possible in the future.
This commit gets rid of render-test, which was very specific
to the lower-level "table" representation, and replaces it
by pivot-table-test, which works in terms of the higher-level
pivot table representation.
Ben Pfaff [Tue, 29 Dec 2020 07:33:30 +0000 (23:33 -0800)]
table-provider: Remove "const" from struct table_cell members.
Until now, this struct has been used only in one particular place, where
the "const" is easy to handle. In an upcoming commit, it will be used more
widely, making the const-ness impractical to maintain, so this commit
removes it.
Ben Pfaff [Sun, 27 Dec 2020 20:12:13 +0000 (12:12 -0800)]
output-item: Make label a part of every output_item.
I didn't understand before that every output_item had a label of its own
that users could separately edit. The spv file format makes that clear,
though, so this commit acknowledges it.
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.