author | robin <robin@reportlab.com> |
Tue, 07 Mar 2017 10:00:34 +0000 | |
changeset 4330 | 617ffa6bbdc8 |
parent 4323 | fa6de076ed0b |
child 4370 | 823a8c33ce43 |
permissions | -rw-r--r-- |
4330 | 1 |
#Copyright ReportLab Europe Ltd. 2000-2017 |
494 | 2 |
#see license.txt for license details |
2332 | 3 |
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/styles.py |
4252 | 4 |
__version__='3.3.0' |
3029 | 5 |
__doc__='''Classes for ParagraphStyle and similar things. |
125 | 6 |
|
3029 | 7 |
A style is a collection of attributes, but with some extra features |
8 |
to allow 'inheritance' from a parent, and to ensure nobody makes |
|
9 |
changes after construction. |
|
10 |
||
11 |
ParagraphStyle shows all the attributes available for formatting |
|
12 |
paragraphs. |
|
13 |
||
14 |
getSampleStyleSheet() returns a stylesheet you can use for initial |
|
15 |
development, with a few basic heading and text styles. |
|
16 |
''' |
|
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
17 |
__all__=( |
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
18 |
'PropertySet', |
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
19 |
'ParagraphStyle', |
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
20 |
'LineStyle', |
3479 | 21 |
'ListStyle', |
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
22 |
'StyleSheet1', |
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
23 |
'getSampleStyleSheet', |
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
24 |
) |
128 | 25 |
from reportlab.lib.colors import white, black |
530 | 26 |
from reportlab.lib.enums import TA_LEFT, TA_CENTER |
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
27 |
from reportlab.lib.fonts import tt2ps |
4277 | 28 |
from reportlab.rl_config import canvas_basefontname as _baseFontName, \ |
29 |
baseUnderlineProportion as _baseUnderlineProportion, \ |
|
30 |
spaceShrinkage |
|
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
31 |
_baseFontNameB = tt2ps(_baseFontName,1,0) |
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
32 |
_baseFontNameI = tt2ps(_baseFontName,0,1) |
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
33 |
_baseFontNameBI = tt2ps(_baseFontName,1,1) |
125 | 34 |
|
35 |
########################################################### |
|
36 |
# This class provides an 'instance inheritance' |
|
37 |
# mechanism for its descendants, simpler than acquisition |
|
38 |
# but not as far-reaching |
|
39 |
########################################################### |
|
40 |
class PropertySet: |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
41 |
defaults = {} |
125 | 42 |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
43 |
def __init__(self, name, parent=None, **kw): |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
44 |
"""When initialized, it copies the class defaults; |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
45 |
then takes a copy of the attributes of the parent |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
46 |
if any. All the work is done in init - styles |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
47 |
should cost little to use at runtime.""" |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
48 |
# step one - validate the hell out of it |
3326 | 49 |
assert 'name' not in self.defaults, "Class Defaults may not contain a 'name' attribute" |
50 |
assert 'parent' not in self.defaults, "Class Defaults may not contain a 'parent' attribute" |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
51 |
if parent: |
3506 | 52 |
assert parent.__class__ == self.__class__, "Parent style %s must have same class as new style %s" % (parent.__class__.__name__,self.__class__.__name__) |
125 | 53 |
|
1683 | 54 |
#step two |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
55 |
self.name = name |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
56 |
self.parent = parent |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
57 |
self.__dict__.update(self.defaults) |
125 | 58 |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
59 |
#step two - copy from parent if any. Try to be |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
60 |
# very strict that only keys in class defaults are |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
61 |
# allowed, so they cannot inherit |
224 | 62 |
self.refresh() |
3479 | 63 |
self._setKwds(**kw) |
1683 | 64 |
|
3479 | 65 |
def _setKwds(self,**kw): |
1683 | 66 |
#step three - copy keywords if any |
3723
99aa837b6703
second stage of port to Python 3.3; working hello world
rptlab
parents:
3721
diff
changeset
|
67 |
for key, value in kw.items(): |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
68 |
self.__dict__[key] = value |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
69 |
|
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
70 |
def __repr__(self): |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
71 |
return "<%s '%s'>" % (self.__class__.__name__, self.name) |
125 | 72 |
|
224 | 73 |
def refresh(self): |
74 |
"""re-fetches attributes from the parent on demand; |
|
75 |
use if you have been hacking the styles. This is |
|
76 |
used by __init__""" |
|
77 |
if self.parent: |
|
3723
99aa837b6703
second stage of port to Python 3.3; working hello world
rptlab
parents:
3721
diff
changeset
|
78 |
for key, value in self.parent.__dict__.items(): |
224 | 79 |
if (key not in ['name','parent']): |
80 |
self.__dict__[key] = value |
|
81 |
||
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
82 |
def listAttrs(self, indent=''): |
3721 | 83 |
print(indent + 'name =', self.name) |
84 |
print(indent + 'parent =', self.parent) |
|
85 |
keylist = list(self.__dict__.keys()) |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
86 |
keylist.sort() |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
87 |
keylist.remove('name') |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
88 |
keylist.remove('parent') |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
89 |
for key in keylist: |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
90 |
value = self.__dict__.get(key, None) |
3721 | 91 |
print(indent + '%s = %s' % (key, value)) |
1683 | 92 |
|
3479 | 93 |
def clone(self, name, parent=None, **kwds): |
94 |
r = self.__class__(name,parent) |
|
95 |
r.__dict__ = self.__dict__.copy() |
|
4155
107bf32f15d9
fix Propertyset.clone contributed by Greg Jones via bitbucket
robin
parents:
4136
diff
changeset
|
96 |
r.name = name |
3479 | 97 |
r.parent = parent is None and self or parent |
98 |
r._setKwds(**kwds) |
|
99 |
return r |
|
100 |
||
125 | 101 |
class ParagraphStyle(PropertySet): |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
102 |
defaults = { |
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
103 |
'fontName':_baseFontName, |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
104 |
'fontSize':10, |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
105 |
'leading':12, |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
106 |
'leftIndent':0, |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
107 |
'rightIndent':0, |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
108 |
'firstLineIndent':0, |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
109 |
'alignment':TA_LEFT, |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
110 |
'spaceBefore':0, |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
111 |
'spaceAfter':0, |
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
112 |
'bulletFontName':_baseFontName, |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
113 |
'bulletFontSize':10, |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
114 |
'bulletIndent':0, |
3540 | 115 |
#'bulletColor':black, |
532 | 116 |
'textColor': black, |
2575 | 117 |
'backColor':None, |
4098
7154a8213d29
paragraph.py, textobject.py: improved support for rtl, bump version to 3.1.14
robin
parents:
4067
diff
changeset
|
118 |
'wordWrap':None, #None means do nothing special |
7154a8213d29
paragraph.py, textobject.py: improved support for rtl, bump version to 3.1.14
robin
parents:
4067
diff
changeset
|
119 |
#CJK use Chinese Line breaking |
7154a8213d29
paragraph.py, textobject.py: improved support for rtl, bump version to 3.1.14
robin
parents:
4067
diff
changeset
|
120 |
#LTR RTL use left to right / right to left |
7154a8213d29
paragraph.py, textobject.py: improved support for rtl, bump version to 3.1.14
robin
parents:
4067
diff
changeset
|
121 |
#with support from pyfribi2 if available |
2921 | 122 |
'borderWidth': 0, |
123 |
'borderPadding': 0, |
|
124 |
'borderColor': None, |
|
125 |
'borderRadius': None, |
|
126 |
'allowWidows': 1, |
|
127 |
'allowOrphans': 0, |
|
2932
bcdff7b8f469
platypus: initial try at textTransform style attribute
rgbecker
parents:
2921
diff
changeset
|
128 |
'textTransform':None, #uppercase lowercase (captitalize not yet) or None or absent |
3575
6821eb805106
reportlab: added support for endDots in paragraphs styles
rgbecker
parents:
3567
diff
changeset
|
129 |
'endDots':None, #dots on the last line of left/right justified paras |
6821eb805106
reportlab: added support for endDots in paragraphs styles
rgbecker
parents:
3567
diff
changeset
|
130 |
#string or object with text and optional fontName, fontSize, textColor & backColor |
6821eb805106
reportlab: added support for endDots in paragraphs styles
rgbecker
parents:
3567
diff
changeset
|
131 |
#dy |
3738 | 132 |
'splitLongWords':1, #make best efforts to split long words |
4135
226667ad6b1f
Viktoras Agejevas' proportional underlining patch (slightly modified); version -->3.1.34
robin
parents:
4098
diff
changeset
|
133 |
'underlineProportion': _baseUnderlineProportion, #set to non-zero to get proportional |
4136
16f067cf3dae
added rl_settings.decimalSymbol & support for simple bullet anchoring, version-->3.1.35
robin
parents:
4135
diff
changeset
|
134 |
'bulletAnchor': 'start', #where the bullet is anchored ie start, middle, end or numeric |
4220
c0e82d246798
add justifyBreaks & justifyLastLine ParagraphStyle attributes; version-->3.2.7
robin
parents:
4155
diff
changeset
|
135 |
'justifyLastLine': 0, #n allow justification on the last line for more than n words 0 means don't bother |
c0e82d246798
add justifyBreaks & justifyLastLine ParagraphStyle attributes; version-->3.2.7
robin
parents:
4155
diff
changeset
|
136 |
'justifyBreaks': 0, #justify lines broken with <br/> |
4277 | 137 |
'spaceShrinkage': spaceShrinkage, #allow shrinkage of percentage of space to fit on line |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
138 |
} |
125 | 139 |
|
140 |
class LineStyle(PropertySet): |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
141 |
defaults = { |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
142 |
'width':1, |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
143 |
'color': black |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
144 |
} |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
145 |
def prepareCanvas(self, canvas): |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
146 |
"""You can ask a LineStyle to set up the canvas for drawing |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
147 |
the lines.""" |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
148 |
canvas.setLineWidth(1) |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
149 |
#etc. etc. |
125 | 150 |
|
3479 | 151 |
class ListStyle(PropertySet): |
152 |
defaults = dict( |
|
153 |
leftIndent=18, |
|
154 |
rightIndent=0, |
|
155 |
bulletAlign='left', |
|
156 |
bulletType='1', |
|
3502 | 157 |
bulletColor=black, |
3479 | 158 |
bulletFontName='Helvetica', |
159 |
bulletFontSize=12, |
|
160 |
bulletOffsetY=0, |
|
161 |
bulletDedent='auto', |
|
162 |
bulletDir='ltr', |
|
163 |
bulletFormat=None, |
|
4323
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
164 |
start=None, #starting value for a list; if a list then the start sequence |
3479 | 165 |
) |
166 |
||
3433
0562ca2f5155
styles.py: new Stylesheet1 methods suggested by Roberto Alsina <ralsina@netmanagers.com.ar>
rgbecker
parents:
3368
diff
changeset
|
167 |
_stylesheet1_undefined = object() |
0562ca2f5155
styles.py: new Stylesheet1 methods suggested by Roberto Alsina <ralsina@netmanagers.com.ar>
rgbecker
parents:
3368
diff
changeset
|
168 |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
169 |
class StyleSheet1: |
3028
082f5208644e
docstring modifications to adhere to restructuredtext
damian
parents:
2964
diff
changeset
|
170 |
""" |
082f5208644e
docstring modifications to adhere to restructuredtext
damian
parents:
2964
diff
changeset
|
171 |
This may or may not be used. The idea is to: |
082f5208644e
docstring modifications to adhere to restructuredtext
damian
parents:
2964
diff
changeset
|
172 |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
173 |
1. slightly simplify construction of stylesheets; |
3028
082f5208644e
docstring modifications to adhere to restructuredtext
damian
parents:
2964
diff
changeset
|
174 |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
175 |
2. enforce rules to validate styles when added |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
176 |
(e.g. we may choose to disallow having both |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
177 |
'heading1' and 'Heading1' - actual rules are |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
178 |
open to discussion); |
3028
082f5208644e
docstring modifications to adhere to restructuredtext
damian
parents:
2964
diff
changeset
|
179 |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
180 |
3. allow aliases and alternate style lookup |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
181 |
mechanisms |
3028
082f5208644e
docstring modifications to adhere to restructuredtext
damian
parents:
2964
diff
changeset
|
182 |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
183 |
4. Have a place to hang style-manipulation |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
184 |
methods (save, load, maybe support a GUI |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
185 |
editor) |
3028
082f5208644e
docstring modifications to adhere to restructuredtext
damian
parents:
2964
diff
changeset
|
186 |
|
082f5208644e
docstring modifications to adhere to restructuredtext
damian
parents:
2964
diff
changeset
|
187 |
Access is via getitem, so they can be |
082f5208644e
docstring modifications to adhere to restructuredtext
damian
parents:
2964
diff
changeset
|
188 |
compatible with plain old dictionaries. |
082f5208644e
docstring modifications to adhere to restructuredtext
damian
parents:
2964
diff
changeset
|
189 |
""" |
3433
0562ca2f5155
styles.py: new Stylesheet1 methods suggested by Roberto Alsina <ralsina@netmanagers.com.ar>
rgbecker
parents:
3368
diff
changeset
|
190 |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
191 |
def __init__(self): |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
192 |
self.byName = {} |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
193 |
self.byAlias = {} |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
194 |
|
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
195 |
def __getitem__(self, key): |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
196 |
try: |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
197 |
return self.byAlias[key] |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
198 |
except KeyError: |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
199 |
try: |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
200 |
return self.byName[key] |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
201 |
except KeyError: |
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
202 |
raise KeyError("Style '%s' not found in stylesheet" % key) |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
203 |
|
3433
0562ca2f5155
styles.py: new Stylesheet1 methods suggested by Roberto Alsina <ralsina@netmanagers.com.ar>
rgbecker
parents:
3368
diff
changeset
|
204 |
def get(self,key,default=_stylesheet1_undefined): |
0562ca2f5155
styles.py: new Stylesheet1 methods suggested by Roberto Alsina <ralsina@netmanagers.com.ar>
rgbecker
parents:
3368
diff
changeset
|
205 |
try: |
0562ca2f5155
styles.py: new Stylesheet1 methods suggested by Roberto Alsina <ralsina@netmanagers.com.ar>
rgbecker
parents:
3368
diff
changeset
|
206 |
return self[key] |
0562ca2f5155
styles.py: new Stylesheet1 methods suggested by Roberto Alsina <ralsina@netmanagers.com.ar>
rgbecker
parents:
3368
diff
changeset
|
207 |
except KeyError: |
0562ca2f5155
styles.py: new Stylesheet1 methods suggested by Roberto Alsina <ralsina@netmanagers.com.ar>
rgbecker
parents:
3368
diff
changeset
|
208 |
if default!=_stylesheet1_undefined: return default |
0562ca2f5155
styles.py: new Stylesheet1 methods suggested by Roberto Alsina <ralsina@netmanagers.com.ar>
rgbecker
parents:
3368
diff
changeset
|
209 |
raise |
0562ca2f5155
styles.py: new Stylesheet1 methods suggested by Roberto Alsina <ralsina@netmanagers.com.ar>
rgbecker
parents:
3368
diff
changeset
|
210 |
|
3326 | 211 |
def __contains__(self, key): |
212 |
return key in self.byAlias or key in self.byName |
|
460 | 213 |
|
3433
0562ca2f5155
styles.py: new Stylesheet1 methods suggested by Roberto Alsina <ralsina@netmanagers.com.ar>
rgbecker
parents:
3368
diff
changeset
|
214 |
def has_key(self,key): |
0562ca2f5155
styles.py: new Stylesheet1 methods suggested by Roberto Alsina <ralsina@netmanagers.com.ar>
rgbecker
parents:
3368
diff
changeset
|
215 |
return key in self |
0562ca2f5155
styles.py: new Stylesheet1 methods suggested by Roberto Alsina <ralsina@netmanagers.com.ar>
rgbecker
parents:
3368
diff
changeset
|
216 |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
217 |
def add(self, style, alias=None): |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
218 |
key = style.name |
3326 | 219 |
if key in self.byName: |
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
220 |
raise KeyError("Style '%s' already defined in stylesheet" % key) |
3326 | 221 |
if key in self.byAlias: |
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
222 |
raise KeyError("Style name '%s' is already an alias in stylesheet" % key) |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
223 |
|
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
224 |
if alias: |
3326 | 225 |
if alias in self.byName: |
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
226 |
raise KeyError("Style '%s' already defined in stylesheet" % alias) |
3326 | 227 |
if alias in self.byAlias: |
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
228 |
raise KeyError("Alias name '%s' is already an alias in stylesheet" % alias) |
1683 | 229 |
#passed all tests? OK, add it |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
230 |
self.byName[key] = style |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
231 |
if alias: |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
232 |
self.byAlias[alias] = style |
1683 | 233 |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
234 |
def list(self): |
3721 | 235 |
styles = list(self.byName.items()) |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
236 |
styles.sort() |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
237 |
alii = {} |
3721 | 238 |
for (alias, style) in list(self.byAlias.items()): |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
239 |
alii[style] = alias |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
240 |
for (name, style) in styles: |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
241 |
alias = alii.get(style, None) |
3721 | 242 |
print(name, alias) |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
243 |
style.listAttrs(' ') |
3721 | 244 |
print() |
1683 | 245 |
|
125 | 246 |
def testStyles(): |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
247 |
pNormal = ParagraphStyle('Normal',None) |
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
248 |
pNormal.fontName = _baseFontName |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
249 |
pNormal.fontSize = 12 |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
250 |
pNormal.leading = 14.4 |
125 | 251 |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
252 |
pNormal.listAttrs() |
3721 | 253 |
print() |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
254 |
pPre = ParagraphStyle('Literal', pNormal) |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
255 |
pPre.fontName = 'Courier' |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
256 |
pPre.listAttrs() |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
257 |
return pNormal, pPre |
125 | 258 |
|
259 |
def getSampleStyleSheet(): |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
260 |
"""Returns a stylesheet object""" |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
261 |
stylesheet = StyleSheet1() |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
262 |
|
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
263 |
stylesheet.add(ParagraphStyle(name='Normal', |
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
264 |
fontName=_baseFontName, |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
265 |
fontSize=10, |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
266 |
leading=12) |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
267 |
) |
125 | 268 |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
269 |
stylesheet.add(ParagraphStyle(name='BodyText', |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
270 |
parent=stylesheet['Normal'], |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
271 |
spaceBefore=6) |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
272 |
) |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
273 |
stylesheet.add(ParagraphStyle(name='Italic', |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
274 |
parent=stylesheet['BodyText'], |
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
275 |
fontName = _baseFontNameI) |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
276 |
) |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
277 |
|
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
278 |
stylesheet.add(ParagraphStyle(name='Heading1', |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
279 |
parent=stylesheet['Normal'], |
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
280 |
fontName = _baseFontNameB, |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
281 |
fontSize=18, |
512 | 282 |
leading=22, |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
283 |
spaceAfter=6), |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
284 |
alias='h1') |
125 | 285 |
|
530 | 286 |
stylesheet.add(ParagraphStyle(name='Title', |
287 |
parent=stylesheet['Normal'], |
|
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
288 |
fontName = _baseFontNameB, |
530 | 289 |
fontSize=18, |
290 |
leading=22, |
|
291 |
alignment=TA_CENTER, |
|
292 |
spaceAfter=6), |
|
293 |
alias='title') |
|
294 |
||
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
295 |
stylesheet.add(ParagraphStyle(name='Heading2', |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
296 |
parent=stylesheet['Normal'], |
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
297 |
fontName = _baseFontNameB, |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
298 |
fontSize=14, |
512 | 299 |
leading=18, |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
300 |
spaceBefore=12, |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
301 |
spaceAfter=6), |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
302 |
alias='h2') |
1683 | 303 |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
304 |
stylesheet.add(ParagraphStyle(name='Heading3', |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
305 |
parent=stylesheet['Normal'], |
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
306 |
fontName = _baseFontNameBI, |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
307 |
fontSize=12, |
512 | 308 |
leading=14, |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
309 |
spaceBefore=12, |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
310 |
spaceAfter=6), |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
311 |
alias='h3') |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
312 |
|
3139 | 313 |
stylesheet.add(ParagraphStyle(name='Heading4', |
314 |
parent=stylesheet['Normal'], |
|
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
315 |
fontName = _baseFontNameBI, |
3139 | 316 |
fontSize=10, |
317 |
leading=12, |
|
318 |
spaceBefore=10, |
|
319 |
spaceAfter=4), |
|
320 |
alias='h4') |
|
321 |
||
322 |
stylesheet.add(ParagraphStyle(name='Heading5', |
|
323 |
parent=stylesheet['Normal'], |
|
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
324 |
fontName = _baseFontNameB, |
3139 | 325 |
fontSize=9, |
326 |
leading=10.8, |
|
327 |
spaceBefore=8, |
|
328 |
spaceAfter=4), |
|
329 |
alias='h5') |
|
330 |
||
331 |
stylesheet.add(ParagraphStyle(name='Heading6', |
|
332 |
parent=stylesheet['Normal'], |
|
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
333 |
fontName = _baseFontNameB, |
3139 | 334 |
fontSize=7, |
335 |
leading=8.4, |
|
336 |
spaceBefore=6, |
|
337 |
spaceAfter=2), |
|
338 |
alias='h6') |
|
339 |
||
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
340 |
stylesheet.add(ParagraphStyle(name='Bullet', |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
341 |
parent=stylesheet['Normal'], |
546 | 342 |
firstLineIndent=0, |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
343 |
spaceBefore=3), |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
344 |
alias='bu') |
125 | 345 |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
346 |
stylesheet.add(ParagraphStyle(name='Definition', |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
347 |
parent=stylesheet['Normal'], |
546 | 348 |
firstLineIndent=0, |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
349 |
leftIndent=36, |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
350 |
bulletIndent=0, |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
351 |
spaceBefore=6, |
3368
afa025c34493
reportlab: new base font mechanism more fully applied
rgbecker
parents:
3326
diff
changeset
|
352 |
bulletFontName=_baseFontNameBI), |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
353 |
alias='df') |
125 | 354 |
|
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
355 |
stylesheet.add(ParagraphStyle(name='Code', |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
356 |
parent=stylesheet['Normal'], |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
357 |
fontName='Courier', |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
358 |
fontSize=8, |
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
359 |
leading=8.8, |
546 | 360 |
firstLineIndent=0, |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
361 |
leftIndent=36)) |
1683 | 362 |
|
4323
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
363 |
stylesheet.add(ListStyle(name='UnorderedList', |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
364 |
parent=None, |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
365 |
leftIndent=18, |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
366 |
rightIndent=0, |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
367 |
bulletAlign='left', |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
368 |
bulletType='1', |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
369 |
bulletColor=black, |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
370 |
bulletFontName='Helvetica', |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
371 |
bulletFontSize=12, |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
372 |
bulletOffsetY=0, |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
373 |
bulletDedent='auto', |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
374 |
bulletDir='ltr', |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
375 |
bulletFormat=None, |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
376 |
#start='circle square blackstar sparkle disc diamond'.split(), |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
377 |
start=None, |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
378 |
), |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
379 |
alias='ul') |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
380 |
|
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
381 |
stylesheet.add(ListStyle(name='OrderedList', |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
382 |
parent=None, |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
383 |
leftIndent=18, |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
384 |
rightIndent=0, |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
385 |
bulletAlign='left', |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
386 |
bulletType='1', |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
387 |
bulletColor=black, |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
388 |
bulletFontName='Helvetica', |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
389 |
bulletFontSize=12, |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
390 |
bulletOffsetY=0, |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
391 |
bulletDedent='auto', |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
392 |
bulletDir='ltr', |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
393 |
bulletFormat=None, |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
394 |
#start='1 a A i I'.split(), |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
395 |
start=None, |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
396 |
), |
fa6de076ed0b
add support for rotating bullets in ListFlowable; version-->3.3.33
robin <robin@reportlab.com>
parents:
4277
diff
changeset
|
397 |
alias='ol') |
187
1f22787ae36b
Stylesheets become classes; styles copy data on __init__
andy_robinson
parents:
142
diff
changeset
|
398 |
return stylesheet |