X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Ftext-item.c;h=49c9f225c06a21a6b95557ddf7ce7bc2a0caff96;hb=6bc102626c5d7546d34375dd42ef204a248264cc;hp=167c4caadf53133b27c477b6ca12fe1a95360fe6;hpb=166eb5966a9a6908cfa60830a79d85b074eec53d;p=pspp diff --git a/src/output/text-item.c b/src/output/text-item.c index 167c4caadf..49c9f225c0 100644 --- a/src/output/text-item.c +++ b/src/output/text-item.c @@ -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"));