}
}
+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"));