/[gnue]/gnue-reports/src/adapters/filters/Universal/Base/styles/Parser.py
ViewVC logotype

Diff of /gnue-reports/src/adapters/filters/Universal/Base/styles/Parser.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by jcater, Tue May 13 18:58:25 2003 UTC revision 1.5 by jcater, Wed Nov 26 22:11:50 2003 UTC
# Line 34  from gnue.common.datasources import GDat Line 34  from gnue.common.datasources import GDat
34  from gnue.common.formatting import GTypecast  from gnue.common.formatting import GTypecast
35  from gnue.common.definitions import GParser  from gnue.common.definitions import GParser
36  from gnue.reports.adapters.filters.Universal.Base.ParserTypes import *  from gnue.reports.adapters.filters.Universal.Base.ParserTypes import *
37  from Objects import Styles, TextStyle  from Objects import Styles, TextStyle, StyleSet, Color
38  import copy, types  import copy, types
39    
40    
# Line 83  def getXMLelements(): Line 83  def getXMLelements():
83           'Attributes':  { },           'Attributes':  { },
84           'ParentTags':  None },           'ParentTags':  None },
85    
86          'styleset':       {
87             'BaseClass': StyleSet.StyleSet,
88             'Required': 1,
89             'SingleInstance': 1,
90             'Attributes': {
91                "name":   {
92                   'Required': 1,
93                   'Typecast': GTypecast.name  },
94             },
95             'ParentTags':  ('styles',) },
96    
97          'color':       {
98             'BaseClass': Color.Color,
99             'Required': 1,
100             'SingleInstance': 1,
101             'Attributes': {
102                "name":   {
103                   'Required': 1,
104                   'Typecast': GTypecast.name  },
105                "value":   {
106                   'Required': 1,
107                   'Typecast': color  },
108             },
109             'ParentTags':  ('styleset',) },
110    
111    
112        'textstyle':         {        'textstyle':         {
113           'BaseClass': TextStyle.TextStyle,           'BaseClass': TextStyle.TextStyle,
# Line 93  def getXMLelements(): Line 118  def getXMLelements():
118              "objects":   {              "objects":   {
119                 'Required': 1,                 'Required': 1,
120                 'Typecast': GTypecast.names },                 'Typecast': GTypecast.names },
121              "font_family":   {              "font-family":   {
122                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
123              "font_style":   {              "font-style":   {
124                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
125              "font_weight":   {              "font-weight":   {
126                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
127              "font_scale":   {              "font-horiz-scale":   {
128                   'Typecast': percentage },
129                "font-vert-scale":   {
130                 'Typecast': percentage },                 'Typecast': percentage },
131              "text_size":   {              "text-size":   {
132                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
133              "text_underline":   {              "text-underline":   {
134                 'ValueSet': _lineSet,                 'ValueSet': _lineSet(),
135                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
136              "text_underline_color":   {              "text-underline-color":   {
137                 'Typecast': color },                 'Typecast': color },
138              "text_underline_size":   {              "text-underline-size":   {
139                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
140              "text_overline":   {              "text-overline":   {
141                 'ValueSet': _lineSet,                 'ValueSet': _lineSet(),
142                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
143              "text_overline_color":   {              "text-overline-color":   {
144                 'Typecast': color },                 'Typecast': color },
145              "text_overline_size":   {              "text-overline-size":   {
146                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
147              "text_strikeout":   {              "text-strikeout":   {
148                 'ValueSet': _lineSet,                 'ValueSet': _lineSet(),
149                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
150              "text_strikeout_color":   {              "text-strikeout-color":   {
151                 'Typecast': color },                 'Typecast': color },
152              "text_strikeout_size":   {              "text-strikeout-size":   {
153                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
154              "text_case":   {              "text-case":   {
155                 'ValueSet':  {                 'ValueSet':  {
156                    'none': {},                    'none': {},
157                    'upper': {},                    'upper': {},
# Line 132  def getXMLelements(): Line 159  def getXMLelements():
159                    'capitalize': {},                    'capitalize': {},
160                    'smallcaps': {}  },                    'smallcaps': {}  },
161                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
162              "text_color":   {              "text-color":   {
163                 'Typecast': color },                 'Typecast': color },
164              "text_leading":   {              "text-leading":   {
165                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
166              "text_tracking":   {              "text-tracking":   {
167                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
168              "text_indent":   {              "text-indent":   {
169                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
170              "text_justification":   {              "text-justification":   {
171                 'ValueSet': {                 'ValueSet': {
172                    'left': {},                    'left': {},
173                    'right': {},                    'right': {},
174                    'center': {},                    'center': {},
175                    'justified': {}  },                    'justified': {}  },
176                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
177              "word_spacing":   {              "word-spacing":   {
178                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
179              "line_spacing":   {              "line-spacing":   {
180                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
181    
182              "background_color":   {              "background-color":   {
183                 'Typecast': color },                 'Typecast': color },
184              "background_fill":   {              "background-fill":   {
185                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
186    
187              "margin":    {              "margin":    {
188                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
189              "margin_left":  {              "margin-left":  {
190                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
191              "margin_right":  {              "margin-right":  {
192                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
193              "margin_top":  {              "margin-top":  {
194                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
195              "margin_bottom":  {              "margin-bottom":  {
196                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
197    
198              "padding":  {              "padding":  {
199                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
200              "padding_left":  {              "padding-left":  {
201                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
202              "padding_right": {              "padding-right": {
203                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
204              "padding_top":   {              "padding-top":   {
205                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
206              "padding_botton": {              "padding-botton": {
207                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
208    
209              "border":   {              "border":   {
210                 'ValueSet': _lineSet,                 'ValueSet': _lineSet(),
211                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
212              "border_left":   {              "border-left":   {
213                 'ValueSet': _lineSet,                 'ValueSet': _lineSet(),
214                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
215              "border_right":   {              "border-right":   {
216                 'ValueSet': _lineSet,                 'ValueSet': _lineSet(),
217                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
218              "border_top":   {              "border-top":   {
219                 'ValueSet': _lineSet,                 'ValueSet': _lineSet(),
220                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
221              "border_bottom":   {              "border-bottom":   {
222                 'ValueSet': _lineSet,                 'ValueSet': _lineSet(),
223                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
224              "border_horiz":   {              "border-horiz":   {
225                 'ValueSet': _lineSet,                 'ValueSet': _lineSet(),
226                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
227              "border_vert":   {              "border-vert":   {
228                 'ValueSet': _lineSet,                 'ValueSet': _lineSet(),
229                 'Typecast': GTypecast.text },                 'Typecast': GTypecast.text },
230    
231              "border_color":   {              "border-color":   {
232                 'Typecast': color },                 'Typecast': color },
233              "border_left_color":   {              "border-left-color":   {
234                 'Typecast': color },                 'Typecast': color },
235              "border_right_color":   {              "border-right-color":   {
236                 'Typecast': color },                 'Typecast': color },
237              "border_top_color":   {              "border-top-color":   {
238                 'Typecast': color },                 'Typecast': color },
239              "border_bottom_color":   {              "border-bottom-color":   {
240                 'Typecast': color },                 'Typecast': color },
241              "border_horiz_color":   {              "border-horiz-color":   {
242                 'Typecast': color },                 'Typecast': color },
243              "border_vert_color":   {              "border-vert-color":   {
244                 'Typecast': color },                 'Typecast': color },
245    
246              "border_size":   {              "border-size":   {
247                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
248              "border_left_size":   {              "border-left-size":   {
249                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
250              "border_right_size":   {              "border-right-size":   {
251                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
252              "border_top_size":   {              "border-top-size":   {
253                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
254              "border_bottom_size":   {              "border-bottom-size":   {
255                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
256              "border_horiz_size":   {              "border-horiz-size":   {
257                 'Typecast': textmeasurement },                 'Typecast': textmeasurement },
258              "border_vert_size":   {              "border-vert-size":   {
259                 'Typecast': textmeasurement }, },                 'Typecast': textmeasurement }, },
260    
261    
262           'ParentTags':  ('reportstyles',) },           'ParentTags':  ('styleset',) },
263    
264      }      }
265    
# Line 259  class xmlStyleHandler (GParser.xmlHandle Line 286  class xmlStyleHandler (GParser.xmlHandle
286    
287    
288    
289  _lineSet = {  def _lineSet():
290      return {
291     'none': {},     'none': {},
292     'dotted': {},     'dotted': {},
293     'dashed': {},     'dashed': {},
# Line 269  _lineSet = { Line 297  _lineSet = {
297     'ridge': {},     'ridge': {},
298     'inset': {},     'inset': {},
299     'outset': {},     'outset': {},
300  }    }
301    
302  _marginDef = {  _marginDef = {
303      'Typecast': textmeasurement },      'Typecast': textmeasurement },

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26