diff --git a/src/Simple/_SimpleDoc.py b/src/Simple/_SimpleDoc.py index 190baae2d..5a6f00bed 100644 --- a/src/Simple/_SimpleDoc.py +++ b/src/Simple/_SimpleDoc.py @@ -137,10 +137,10 @@ def make_basic_stylesheet(): sheet.add_cell_style("TableHead",cell) cell = TableCellStyle() - sheet.add_cell_style("TableNormalCell",cell) + sheet.add_cell_style("TableHeaderCell",cell) cell = TableCellStyle() cell.set_longlist(1) - sheet.add_cell_style("TableListCell",cell) + sheet.add_cell_style("TableDataCell",cell) return sheet diff --git a/src/Simple/_SimpleTable.py b/src/Simple/_SimpleTable.py index 038fb14f5..ffcc5d41b 100644 --- a/src/Simple/_SimpleTable.py +++ b/src/Simple/_SimpleTable.py @@ -284,15 +284,17 @@ class SimpleTable(object): else: self.__rows.sort(lambda a, b: cmp(a[idx],b[idx])) - def write(self, document): + def write(self, document, link=False): self.simpledoc = document # simpledoc; simpledoc.doc = docgen object if self.simpledoc.doc.type == "standard": doc = self.simpledoc.doc - doc.start_table('simple','Table') columns = len(self.__columns) + doc.start_table('simple', 'Table') + doc._tbl.set_column_widths([100/columns] * columns) + doc._tbl.set_columns(columns) if self.title: doc.start_row() - doc.start_cell('TableHead',columns) + doc.start_cell('TableHead', span=columns) doc.start_paragraph('TableTitle') doc.write_text(_(self.title)) doc.end_paragraph() @@ -302,15 +304,15 @@ class SimpleTable(object): self.__sort() doc.start_row() for col in self.__columns: - doc.start_cell('TableNormalCell',1) - doc.write_text(col,'TableTitle') + doc.start_cell('TableHeaderCell', span=1) + doc.write_text(col, 'TableTitle') doc.end_cell() doc.end_row() for row in self.__rows: doc.start_row() for col in row: - doc.start_cell('TableNormalCell',1) - doc.write_text(col,'Normal') + doc.start_cell('TableDataCell', span=1) + doc.write_text(col, 'Normal') doc.end_cell() doc.end_row() doc.end_table()