reportlab/platypus/tables.py
changeset 2730 b3fc23a74fd1
parent 2590 deaa612ecb4c
child 2754 c24a6a23f5f9
equal deleted inserted replaced
2729:33fcb3e15ef4 2730:b3fc23a74fd1
    69             parent.copy(self)
    69             parent.copy(self)
    70     def copy(self, result=None):
    70     def copy(self, result=None):
    71         if result is None:
    71         if result is None:
    72             result = CellStyle1()
    72             result = CellStyle1()
    73         for name in dir(self):
    73         for name in dir(self):
    74             setattr(result, name, gettattr(self, name))
    74             setattr(result, name, getattr(self, name))
    75         return result
    75         return result
    76 CellStyle = CellStyle1
    76 CellStyle = CellStyle1
    77 
    77 
    78 class TableStyle:
    78 class TableStyle:
    79     def __init__(self, cmds=None, parent=None, **kw):
    79     def __init__(self, cmds=None, parent=None, **kw):
   896             getattr(self,_LineOpMap.get(op, '_drawUnknown' ))( (sc, sr), (ec, er), weight, color, count, space)
   896             getattr(self,_LineOpMap.get(op, '_drawUnknown' ))( (sc, sr), (ec, er), weight, color, count, space)
   897         self.canv.restoreState()
   897         self.canv.restoreState()
   898         self._curcolor = None
   898         self._curcolor = None
   899 
   899 
   900     def _drawUnknown(self,  (sc, sr), (ec, er), weight, color, count, space):
   900     def _drawUnknown(self,  (sc, sr), (ec, er), weight, color, count, space):
   901         raise ValueError, "Unknown line command '%s'" % op
   901         #we are only called from _drawLines which is one level up
       
   902         import sys
       
   903         op = sys._getframe(1).f_locals['op']
       
   904         raise ValueError("Unknown line command '%s'" % op)
   902 
   905 
   903     def _drawGrid(self, (sc, sr), (ec, er), weight, color, count, space):
   906     def _drawGrid(self, (sc, sr), (ec, er), weight, color, count, space):
   904         self._drawBox( (sc, sr), (ec, er), weight, color, count, space)
   907         self._drawBox( (sc, sr), (ec, er), weight, color, count, space)
   905         self._drawInnerGrid( (sc, sr), (ec, er), weight, color, count, space)
   908         self._drawInnerGrid( (sc, sr), (ec, er), weight, color, count, space)
   906 
   909