From 00af6ce0b53faa731bb89988c6c52c3d7637942c Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 5 Jan 2026 11:20:40 -0800 Subject: [PATCH] support backgrounds for category labesl --- rust/pspp/src/spv/read/legacy_xml.rs | 25 +++++++++++++++++++ rust/pspp/src/spv/testdata/legacy17.expected | 2 +- rust/pspp/src/spv/testdata/legacy17.spv | Bin 5047 -> 5182 bytes 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/rust/pspp/src/spv/read/legacy_xml.rs b/rust/pspp/src/spv/read/legacy_xml.rs index 0b79aeee6b..e015329e9d 100644 --- a/rust/pspp/src/spv/read/legacy_xml.rs +++ b/rust/pspp/src/spv/read/legacy_xml.rs @@ -1696,6 +1696,7 @@ impl TargetType { enum Set { SetFormat(SetFormat), SetStyle(SetStyle), + SetFrameStyle(SetFrameStyle), #[serde(other)] Other, } @@ -1707,6 +1708,9 @@ impl Set { change: match self { Set::SetFormat(set_format) => Change::Format(set_format), Set::SetStyle(set_style) => Change::Style(set_style.style.get(styles)?), + Set::SetFrameStyle(set_frame_style) => { + Change::FrameStyle(set_frame_style.style.get(styles)?) + } Set::Other => return None, }, }) @@ -1716,6 +1720,7 @@ impl Set { match self { Set::SetFormat(set_format) => Some(&set_format.target), Set::SetStyle(set_style) => Some(&set_style.target), + Set::SetFrameStyle(set_frame_style) => Some(&set_frame_style.target), Set::Other => None, } } @@ -1836,6 +1841,15 @@ impl<'a> DecodedSet<'a> { footnotes, has_cell_footnotes, ), + Change::FrameStyle(style) => Style::apply_to_value( + value, + None, + None, + Some(style), + base_style, + footnotes, + has_cell_footnotes, + ), Change::Style(style) => { let (fg, bg) = if self.target_type == TargetType::Interval { (None, Some(style)) @@ -1860,6 +1874,7 @@ impl<'a> DecodedSet<'a> { enum Change<'a> { Format(&'a SetFormat), Style(&'a Style), + FrameStyle(&'a Style), } #[derive(Deserialize, Debug)] @@ -1872,6 +1887,16 @@ struct SetStyle { style: Ref