--- a/reportlab/platypus/tables.py Thu Mar 31 15:35:20 2005 +0000
+++ b/reportlab/platypus/tables.py Fri Apr 01 09:38:18 2005 +0000
@@ -667,12 +667,16 @@
W = list(self._argW)
width = 0
elementWidth = self._elementWidth
- for colNo, w in enumerate(W):
+ rowNos = xrange(self._nrows)
+ values = self._cellvalues
+ styles = self._cellStyles
+ for colNo in xrange(len(W)):
+ w = W[colNo]
if w is None or w=='*' or _endswith(w,'%'):
final = 0
- for rowNo in range(self._nrows):
- value = self._cellvalues[rowNo][colNo]
- style = self._cellStyles[rowNo][colNo]
+ for rowNo in rowNos:
+ value = values[rowNo][colNo]
+ style = styles[rowNo][colNo]
new = (elementWidth(value,style)+
style.leftPadding+style.rightPadding)
final = max(final, new)