platypus: fix splitting for ListFlowables (maybe)
authorrgbecker
Tue, 25 Jan 2011 16:42:55 +0000
changeset 3484 9c12031155ba
parent 3483 c75bbc74e609
child 3485 ab265aeba858
platypus: fix splitting for ListFlowables (maybe)
src/reportlab/platypus/doctemplate.py
src/reportlab/platypus/flowables.py
--- a/src/reportlab/platypus/doctemplate.py	Tue Jan 25 12:26:10 2011 +0000
+++ b/src/reportlab/platypus/doctemplate.py	Tue Jan 25 16:42:55 2011 +0000
@@ -773,9 +773,9 @@
                 else:
                     n = 0
                 if n:
-                    if not isinstance(S[0],(PageBreak,SlowPageBreak,ActionFlowable)):
+                    if not isinstance(S[0],(PageBreak,SlowPageBreak,ActionFlowable,LIIndenter)):
                         if not frame.add(S[0], canv, trySplit=0):
-                            ident = "Splitting error(n==%d) on page %d in\n%s" % (n,self.page,self._fIdent(f,60,frame))
+                            ident = "Splitting error(n==%d) on page %d in\n%s\nS[0]=%s" % (n,self.page,self._fIdent(f,60,frame),self._fIdent(S[0],60,frame))
                             #leave to keep apart from the raise
                             raise LayoutError(ident)
                         self._curPageFlowableCount += 1
--- a/src/reportlab/platypus/flowables.py	Tue Jan 25 12:26:10 2011 +0000
+++ b/src/reportlab/platypus/flowables.py	Tue Jan 25 16:42:55 2011 +0000
@@ -37,6 +37,7 @@
 __all__=('TraceInfo','Flowable','XBox','Preformatted','Image','Spacer','PageBreak','SlowPageBreak',
         'CondPageBreak','KeepTogether','Macro','CallerMacro','ParagraphAndImage',
         'FailOnWrap','HRFlowable','PTOContainer','KeepInFrame','UseUpSpace',
+        'ListFlowable','ListItem','LIIndenter',
         'DocAssign', 'DocExec', 'DocAssert', 'DocPara', 'DocIf', 'DocWhile',
         )
 class TraceInfo: