src/reportlab/platypus/paraparser.py
changeset 4136 16f067cf3dae
parent 4130 49161ce56cad
child 4181 0a8d6687fde6
--- a/src/reportlab/platypus/paraparser.py	Thu Sep 18 16:04:11 2014 +0100
+++ b/src/reportlab/platypus/paraparser.py	Mon Sep 22 14:33:32 2014 +0100
@@ -116,7 +116,13 @@
     elif s=='right': return TA_RIGHT
     elif s=='justify': return TA_JUSTIFY
     elif s in ('centre','center'): return TA_CENTER
-    else: raise ValueError
+    else: raise ValueError('illegal alignment %r' % s)
+
+def _bAnchor(s):
+    s = s.lower()
+    if not s in ('start','middle','end','numeric'):
+        raise ValueError('illegal bullet anchor %r' % s)
+    return s
 
 _paraAttrMap = {'font': ('fontName', None),
                 'face': ('fontName', None),
@@ -135,6 +141,7 @@
                 'boffsety': ('bulletOffsetY',_num),
                 'bindent': ('bulletIndent',_num),
                 'bcolor': ('bulletColor',toColor),
+                'banchor': ('bulletAnchor',_bAnchor),
                 'color':('textColor',toColor),
                 'backcolor':('backColor',toColor),
                 'bgcolor':('backColor',toColor),
@@ -151,6 +158,7 @@
                 'indent': ('bulletIndent',_num),
                 'color': ('bulletColor',toColor),
                 'fg': ('bulletColor',toColor),
+                'anchor': ('bulletAnchor',_bAnchor),
                 }
 
 #things which are valid font attributes