[POS-commit] r3931 - stoqlib/trunk/stoqlib/reporting/base
Henrique Romano
henrique at async.com.br
Fri Jul 14 15:12:43 BRT 2006
Author: henrique
Date: Fri Jul 14 15:12:42 2006
New Revision: 3931
Modified:
stoqlib/trunk/stoqlib/reporting/base/tables.py
Log:
Remove unneeded method on DataTableBuilder.
Improve AbstractTableBuilder's get_data to always use Paragraph.
Modified: stoqlib/trunk/stoqlib/reporting/base/tables.py
==============================================================================
--- stoqlib/trunk/stoqlib/reporting/base/tables.py (original)
+++ stoqlib/trunk/stoqlib/reporting/base/tables.py Fri Jul 14 15:12:42 2006
@@ -117,9 +117,11 @@
#
def get_data(self):
- """ Returns all the table lines plus the extra row, if any.
- """
- return self.data + self.extra_rows
+ """ Returns all the table lines plus the extra row, if any. """
+ data = self.data + self.extra_rows
+ return [[Paragraph(cell, style="TableCell")
+ for cell in row]
+ for row in data]
def update_style(self):
""" Implement this method on subclass to define your own table styles.
@@ -148,10 +150,6 @@
style.add('LEFTPADDING', (i,0), (i,-1), 10)
style.add('RIGHTPADDING', (i-1,0), (i-1,-1), 10)
- def get_data(self):
- """ Returns all the table rows. """
- return self.data
-
class ReportTableBuilder(AbstractTableBuilder):
""" Report table builder """
highlight = HIGHLIGHT_ODD
More information about the POS-commit
mailing list