Pre-incrementing bug fixed
authorandy_robinson
Mon, 10 Jul 2000 11:58:35 +0000
changeset 339 e6ccd2f83f6c
parent 338 f5eb86d4224f
child 340 f3f2af39e7d7
Pre-incrementing bug fixed
reportlab/lib/sequencer.py
reportlab/platypus/doctemplate.py
--- a/reportlab/lib/sequencer.py	Sat Jul 08 15:30:04 2000 +0000
+++ b/reportlab/lib/sequencer.py	Mon Jul 10 11:58:35 2000 +0000
@@ -31,9 +31,12 @@
 #
 ###############################################################################
 #	$Log: sequencer.py,v $
+#	Revision 1.8  2000/07/10 11:58:35  andy_robinson
+#	Pre-incrementing bug fixed
+#
 #	Revision 1.7  2000/07/08 07:11:21  andy_robinson
 #	Changed to pre-increment
-#
+#	
 #	Revision 1.6  2000/06/21 19:46:43  rgbecker
 #	Added Roman formatters
 #	
@@ -52,7 +55,7 @@
 #	Revision 1.1  2000/06/01 15:23:06  rgbecker
 #	Platypus re-organisation
 #
-__version__=''' $Id: sequencer.py,v 1.7 2000/07/08 07:11:21 andy_robinson Exp $ '''
+__version__=''' $Id: sequencer.py,v 1.8 2000/07/10 11:58:35 andy_robinson Exp $ '''
 """This module defines a single public class, Sequencer, which aids in
 numbering and formatting lists."""
 #
@@ -230,7 +233,7 @@
 		func = self._formatters[format]
 		self._getCounter(counter).setFormatter(func)
 
-	def reset(self, counter=None, base=1):
+	def reset(self, counter=None, base=0):
 		if not counter:
 			counter = self._defaultCounter
 		self._getCounter(counter)._value = base
--- a/reportlab/platypus/doctemplate.py	Sat Jul 08 15:30:04 2000 +0000
+++ b/reportlab/platypus/doctemplate.py	Mon Jul 10 11:58:35 2000 +0000
@@ -31,9 +31,12 @@
 #
 ###############################################################################
 #	$Log: doctemplate.py,v $
+#	Revision 1.27  2000/07/10 11:58:35  andy_robinson
+#	Pre-incrementing bug fixed
+#
 #	Revision 1.26  2000/07/07 16:21:12  rgbecker
 #	Cosmetics
-#
+#	
 #	Revision 1.25  2000/07/06 12:40:37  rgbecker
 #	Push canvas into flowables during wrap/split
 #	
@@ -111,7 +114,7 @@
 #	Revision 1.1  2000/05/12 12:53:33  rgbecker
 #	Initial try at a document template class
 #	
-__version__=''' $Id: doctemplate.py,v 1.26 2000/07/07 16:21:12 rgbecker Exp $ '''
+__version__=''' $Id: doctemplate.py,v 1.27 2000/07/10 11:58:35 andy_robinson Exp $ '''
 __doc__="""
 This module contains the core structure of platypus.
 
@@ -494,6 +497,10 @@
 			self.handle_pageBreak()
 
 		self.canv.save()
+		#AR - hack - for some reason a document did not
+		#have these:
+		#if hasattr(self, 'frame'): del self.frame
+		#if hasattr(self, 'pageTemplate'): del self.pageTemplate
 		del self.frame, self.pageTemplate
 
 	def build(self, flowables, filename=None, canvasmaker=canvas.Canvas):