reportlab/platypus/paraparser.py
changeset 2694 dd0ea6474ea0
parent 2693 3c61a57aecd1
child 2742 8edd54153201
--- a/reportlab/platypus/paraparser.py	Fri Sep 29 19:37:07 2006 +0000
+++ b/reportlab/platypus/paraparser.py	Sun Oct 01 22:53:20 2006 +0000
@@ -612,7 +612,18 @@
             id = attr['id']
         else:
             id = None
-        output = self._seq.nextf(id)
+        increment = attr.get('inc', None)
+        if not increment:
+            output = self._seq.nextf(id)
+        else:
+            #accepts "no" for do not increment, or an integer.
+            #thus, 0 and 1 increment by the right amounts.
+            if increment.lower() == 'no':
+                output = self._seq.thisf(id)
+            else:
+                incr = int(increment)
+                output = self._seq.thisf(id)
+                self._seq.reset(id, self._seq._this() + incr)
         self.handle_data(output)
 
     def end_seq(self):