reportlab/platypus/doctemplate.py
changeset 1829 ce5ceec32eab
parent 1824 8435212a963d
child 1838 f7eeee67832c
--- a/reportlab/platypus/doctemplate.py	Mon Jan 06 11:33:34 2003 +0000
+++ b/reportlab/platypus/doctemplate.py	Mon Jan 06 11:36:18 2003 +0000
@@ -1,9 +1,9 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/platypus/doctemplate.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/reportlab/platypus/doctemplate.py,v 1.58 2003/01/02 11:30:05 rgbecker Exp $
+#$Header: /tmp/reportlab/reportlab/platypus/doctemplate.py,v 1.59 2003/01/06 11:36:18 rgbecker Exp $
 
-__version__=''' $Id: doctemplate.py,v 1.58 2003/01/02 11:30:05 rgbecker Exp $ '''
+__version__=''' $Id: doctemplate.py,v 1.59 2003/01/06 11:36:18 rgbecker Exp $ '''
 
 __doc__="""
 This module contains the core structure of platypus.
@@ -618,22 +618,10 @@
         #print 'scanned story, found these indexing flowables:\n'
         #print self._indexingFlowables
 
-        # attempt to fix the filename is a 'file' problem
-        isFile = getattr(filename,'write',None)
-        if isFile:
-            hasSeek = getattr(filename,'seek',None)
-            if hasSeek:
-                fLoc = filename.tell()
-            else:
-                class _DUMMYFILE:
-                    def __init__(self,filename):
-                        self._filename = filename
-                    def write(self,bytes): pass
-                    def close(self): pass
-                filename = _DUMMYFILE(filename)
+        #better fix for filename is a 'file' problem
+        self._doSave = 0
         passes = 0
         while 1:
-            if passes and isFile and hasSeek: filename.seek(fLoc)
             passes = passes + 1
             if self._onProgress:
                 self.onProgress('PASS', passes)
@@ -662,8 +650,8 @@
             happy = self._allSatisfied()
 
             if happy:
-                if isFile and not hasSeek:
-                    filename = filename._filename
+                self._doSave = 0
+                self.canv.save()
                 break
             if passes > maxPasses:
                 raise IndexError, "Index entries not resolved after %d passes" % maxPasses