it works again
[pspp] / src / output / text-item.c
index 167c4caadf53133b27c477b6ca12fe1a95360fe6..49c9f225c06a21a6b95557ddf7ce7bc2a0caff96 100644 (file)
@@ -159,11 +159,28 @@ text_item_append (struct text_item *dst, const struct text_item *src)
     }
 }
 
+static const struct pivot_table_look *
+text_item_table_look (void)
+{
+  static struct pivot_table_look *look;
+  if (!look)
+    {
+      look = pivot_table_look_new_builtin_default ();
+
+      for (int a = 0; a < PIVOT_N_AREAS; a++)
+        memset (look->areas[a].cell_style.margin, 0,
+                sizeof look->areas[a].cell_style.margin);
+      for (int b = 0; b < PIVOT_N_BORDERS; b++)
+        look->borders[b].stroke = TABLE_STROKE_NONE;
+    }
+  return look;
+}
+
 struct table_item *
 text_item_to_table_item (struct text_item *text_item)
 {
   struct pivot_table *table = pivot_table_create__ (NULL, "Text");
-  pivot_table_set_look (table, pivot_table_look_builtin_default ());
+  pivot_table_set_look (table, text_item_table_look ());
 
   struct pivot_dimension *d = pivot_dimension_create (
     table, PIVOT_AXIS_ROW, N_("Text"));