- struct table_area_style *style = pool_alloc (tab->container, sizeof *style);
- *style = (struct table_area_style) {
- .cell_style = CELL_STYLE_INITIALIZER,
- .cell_style.halign = TABLE_HALIGN_LEFT,
- };
- font_style_copy (tab->container, &style->font_style, &text_item->style);
- tab->styles[0] = style;
-
- int opts = 0;
- if (text_item->style.markup)
- opts |= TAB_MARKUP;
- if (text_item->type == TEXT_ITEM_SYNTAX || text_item->type == TEXT_ITEM_LOG)
- opts |= TAB_FIX;
- table_text (tab, 0, 0, opts, text_item_get_text (text_item));
- struct table_item *table_item = table_item_create (tab);
- text_item_unref (text_item);
- return table_item;
+ struct pivot_dimension *d = pivot_dimension_create (
+ table, PIVOT_AXIS_ROW, N_("Text"));
+ d->hide_all_labels = true;
+ pivot_category_create_leaf (d->root, pivot_value_new_text ("null"));
+
+ struct pivot_value *content = pivot_value_new_user_text (
+ text_item->text, SIZE_MAX);
+ pivot_value_set_font_style (content, &text_item->style);
+ pivot_table_put1 (table, 0, content);
+
+ return table;