}
+ bool
+ Table::has_id(Id id) const
+ {
+ for (size_t i = 0; i < ids.size(); ++i)
+ if (ids[i] == id)
+ return true;
+
+ return false;
+ }
+
+
size_t
Table::id_to_index(Id id) const
{
const vector<Row> get_rows() const { return rows; }
+ bool has_id(Id id) const;
+
void set_show_header(bool show_header) { Table::show_header = show_header; }
void set_show_grid(bool show_grid) { Table::show_grid = show_grid; }
void set_style(Style style) { Table::style = style; }
table.set_style(table_formatter.style);
for (Id id : table_formatter._abbrev)
- table.set_abbreviate(id, true);
+ if (table.has_id(id))
+ table.set_abbreviate(id, true);
for (const vector<string>& row : table_formatter._rows)
{