1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3  * This file is part of the libetonyek project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #ifndef IWORKTOKEN_H_INCLUDED
11 #define IWORKTOKEN_H_INCLUDED
12 
13 #include <boost/static_assert.hpp>
14 
15 #include "IWORKTokenInfo.h"
16 
17 namespace libetonyek
18 {
19 
20 class IWORKTokenizer;
21 
22 namespace IWORKToken
23 {
24 
25 enum
26 {
27   INVALID_TOKEN = 0,
28   FIRST_TOKEN = IWORKTokenInfo<IWORKParser>::first,
29 
30   // namespace prefixes
31   sf,
32   sfa,
33   xsi,
34 
35   // elements
36   Series_0,
37   Series_1,
38   Series_2,
39   Series_3,
40   Series_4,
41   Series_5,
42   Series_6,
43   Series_7,
44 
45   SFC2DAreaFillProperty,
46   SFC2DColumnFillProperty,
47   SFC2DMixedColumnFillProperty,
48   SFC2DPieFillProperty,
49   SFC3DAreaFillProperty,
50   SFC3DColumnFillProperty,
51   SFC3DPieFillProperty,
52   SFTableCellStylePropertyFill,
53   SFTableStylePropertyCellStyle,
54   SFTableStylePropertyHeaderColumnCellStyle,
55   SFTableStylePropertyHeaderRowCellStyle,
56   SFTCellStylePropertyDateTimeFormat,
57   SFTCellStylePropertyDurationFormat,
58   SFTCellStylePropertyNumberFormat,
59   SFTCellStylePropertyLayoutStyle,
60   SFTCellStylePropertyParagraphStyle,
61   SFTDefaultBodyCellStyleProperty,
62   SFTDefaultBodyVectorStyleProperty,
63   SFTDefaultBorderVectorStyleProperty,
64   SFTDefaultFooterBodyVectorStyleProperty,
65   SFTDefaultFooterRowCellStyleProperty,
66   SFTDefaultFooterSeparatorVectorStyleProperty,
67   SFTDefaultGroupingLevel0VectorStyleProperty,
68   SFTDefaultGroupingLevel1VectorStyleProperty,
69   SFTDefaultGroupingLevel2VectorStyleProperty,
70   SFTDefaultGroupingLevel3VectorStyleProperty,
71   SFTDefaultGroupingLevel4VectorStyleProperty,
72   SFTDefaultGroupingLevel5VectorStyleProperty,
73   SFTDefaultGroupingRowCell0StyleProperty,
74   SFTDefaultGroupingRowCell1StyleProperty,
75   SFTDefaultGroupingRowCell2StyleProperty,
76   SFTDefaultGroupingRowCell3StyleProperty,
77   SFTDefaultGroupingRowCell4StyleProperty,
78   SFTDefaultGroupingRowCell5StyleProperty,
79   SFTDefaultHeaderBodyVectorStyleProperty,
80   SFTDefaultHeaderColumnCellStyleProperty,
81   SFTDefaultHeaderRowCellStyleProperty,
82   SFTDefaultHeaderSeparatorVectorStyleProperty,
83   SFTHeaderColumnRepeatsProperty,
84   SFTHeaderRowRepeatsProperty,
85   SFTStrokeProperty,
86   SFTTableBandedRowsProperty,
87   SFTTableNameStylePropertyLayoutStyle,
88   SFTTableNameStylePropertyParagraphStyle,
89   alignment,
90   alpha_mask_path,
91   animationAuto,
92   animationAutoPlay,
93   animationDelay,
94   animationDuration,
95   angle_gradient,
96   angle_gradient_ref,
97   annotation,
98   annotation_field,
99   annotation_field_ref,
100   annotations,
101   anon_styles,
102   array,
103   array_ref,
104   attachment,
105   attachment_ref,
106   attachments,
107   audio_only_image,
108   audio_only_image_ref,
109   authors,
110   baselineShift,
111   baseSize,
112   bezier,
113   bezier_path,
114   bezier_ref,
115   binary,
116   binary_ref,
117   body_placeholder_ref,
118   bold,
119   br,
120   bubble_cellid,
121   bubble_offset,
122   cached_data,
123   calc_engine,
124   calc_engine_entities,
125   calligraphy_stroke,
126   callout2_path,
127   capitalization,
128   category_title,
129   cb,
130   cell_address,
131   cell_comment_mapping,
132   cell_comment_drawable_info,
133   cell_coordinates,
134   cell_date,
135   cell_storage,
136   cell_style,
137   cell_style_ref,
138   cell_text,
139   cf, // condition
140   cf_ref,
141   characterstyle,
142   characterstyle_ref,
143   chart_column_names,
144   chart_info,
145   chart_model_object,
146   chart_name,
147   chart_row_names,
148   chart_series_style,
149   chart_series_style_ref,
150   chart_style,
151   chart_style_ref,
152   chart_type,
153   chisel,
154   col,
155   color,
156   column,
157   column_label_formulas,
158   columns,
159   columns_ref,
160   comment,
161   connection_line,
162   connection_path,
163   connection_style,
164   connection_style_ref,
165   container_hint,
166   contbr,
167   content,
168   content_size,
169   core_image_filter_descriptor,
170   core_image_filter_descriptor_ref,
171   core_image_filter_info,
172   core_image_filter_info_ref,
173   crbr,
174   crop_geometry,
175   ct,
176   custom_space_color,
177   d,
178   data,
179   date_cell,
180   date_format,
181   date_format_ref,
182   data_formulas,
183   data_ref,
184   date_time,
185   datasource,
186   drawable_shape,
187   drawables,
188   du,
189   duration_format,
190   duration_format_ref,
191   editable_bezier_path,
192   element,
193   end,
194   end_point,
195   error_warning_mapping,
196   evenPageMaster,
197   extent,
198   external_text_wrap,
199   external_text_wrap_ref,
200   externalTextWrap,
201   f,
202   facing_pages,
203   filename,
204   fill,
205   fill_ref,
206   filtered,
207   filtered_image,
208   filtered_image_ref,
209   filter_properties,
210   filters,
211   filterset,
212   firstLineIndent,
213   firstPageMaster,
214   fm, // formula mutable dictionary
215   fmt,
216   fo,
217   followingLayoutStyle,
218   followingParagraphStyle,
219   fontColor,
220   fontName,
221   fontSize,
222   footer,
223   footers,
224   footnote,
225   footnote_mark,
226   footnotebr,
227   footnotes,
228   formula,
229   formula_cell,
230   formula_chart_model,
231   formula_string,
232   fraction,
233   frame,
234   fs,
235   g,
236   geometry,
237   generic_cell,
238   ghost_text,
239   ghost_text_ref,
240   gradient_stop,
241   gradient_stop_ref,
242   graphic_style,
243   graphic_style_ref,
244   grid,
245   grid_column,
246   grid_row,
247   gridline_index,
248   group,
249   group_value,
250   grouping,
251   grouping_display,
252   grouping_order,
253   grouping_state,
254   groupings_element,
255   head,
256   header,
257   headers,
258   headline_style,
259   headLineEnd,
260   host_cell_ID,
261   host_table_ID,
262   href,
263   id,
264   image,
265   image_media,
266   image_ref,
267   inflection,
268   inputAngle,
269   inputColor,
270   inputDistance,
271   inputGlossiness,
272   inputOpacity,
273   inputRadius,
274   insertion_point,
275   intratopicbr,
276   italic,
277   keepLinesTogether,
278   keepWithNext,
279   key,
280   keywords,
281   labelCharacterStyle1,
282   labelCharacterStyle2,
283   labelCharacterStyle3,
284   labelCharacterStyle4,
285   labelCharacterStyle5,
286   labelCharacterStyle6,
287   labelCharacterStyle7,
288   labelCharacterStyle8,
289   labelCharacterStyle9,
290   language,
291   layer,
292   layer_ref,
293   layers,
294   layout,
295   layoutMargins,
296   layoutParagraphStyle,
297   layoutParagraphStyle_ref,
298   layoutstyle,
299   layoutstyle_ref,
300   layoutStyle,
301   leftIndent,
302   leveled,
303   line,
304   line_end,
305   lineSpacing,
306   linespacing,
307   linespacing_ref,
308   link,
309   listLabelGeometries,
310   listLabelIndents,
311   listLabelTypes,
312   listStyle,
313   listTextIndents,
314   list_label_geometry,
315   list_label_geometry_ref,
316   list_label_typeinfo,
317   list_label_typeinfo_ref,
318   liststyle,
319   liststyle_ref,
320   lnbr,
321   localize,
322   main_movie,
323   main_movie_ref,
324   manipulated_stroke,
325   masking_shape_path_source,
326   media,
327   menu_choices,
328   metadata,
329   mf_ref,
330   movie_media,
331   mutable_array,
332   mutable_array_ref,
333   n,
334   naturalSize,
335   null,
336   number,
337   number_cell,
338   number_format,
339   number_format_ref,
340   o,
341   oddPageMaster,
342   of,
343   original_size,
344   other_datas,
345   outline,
346   overrides,
347   overrides_ref,
348   p,
349   padding,
350   padding_ref,
351   pageBreakBefore,
352   pagemaster,
353   page_count,
354   page_number,
355   page_margins,
356   page_start,
357   pair,
358   paragraphBorderType,
359   paragraphFill,
360   paragraphStroke,
361   paragraphstyle,
362   paragraphstyle_ref,
363   parameters,
364   parent_ref,
365   path,
366   pattern,
367   pattern_ref,
368   pgbr,
369   placeholder_size,
370   placeholder_style,
371   placeholder_style_ref,
372   pm,
373   point,
374   point_path,
375   position,
376   poster_image,
377   property_map,
378   proxied_cell_ref,
379   proxy_master_layer,
380   r,
381   rb,
382   rd,
383   result_bool_cell,
384   result_cell,
385   result_date_cell,
386   result_number_cell,
387   result_text_cell,
388   rightIndent,
389   rn,
390   row,
391   row_label_formulas,
392   rows,
393   rt,
394   s,
395   scalar_path,
396   section,
397   sectionstyle,
398   sectionstyle_ref,
399   selection_end,
400   self_contained_movie,
401   shape,
402   size,
403   sl,
404   slide_style,
405   so,
406   sort,
407   spaceAfter,
408   spaceBefore,
409   span,
410   span_cell,
411   st,
412   start,
413   start_index,
414   sticky_note,
415   stop_index,
416   stops,
417   strikethru,
418   string,
419   stroke,
420   stroke_ref,
421   style,
422   style_run,
423   styles,
424   stylesheet,
425   stylesheet_ref,
426   superscript,
427   t,
428   tab,
429   tabs,
430   tabs_ref,
431   tabstop,
432   table_cell,
433   table_cell_ref,
434   table_cell_style,
435   table_cell_style_ref,
436   table_info,
437   table_style,
438   table_style_ref,
439   table_vector,
440   table_vector_style,
441   table_vector_style_ref,
442   tableCellArrayCellsByColumn,
443   tableCellArrayCellsByRow,
444   tableCellContent,
445   tableCellFormula,
446   tableCellMinXSide_ref,
447   tableCellMaxXSide_ref,
448   tableCellMinYSide_ref,
449   tableCellMaxYSide_ref,
450   tableCellStyle_ref,
451   tableCellValue,
452   tableInfoTable,
453   tableModelCells,
454   tableModelPartitionSource,
455   tableModelStyle_ref,
456   tableModelTableID,
457   tableModelVectors,
458   tableVectorAlong,
459   tableVectorArrayRowVectors,
460   tableVectorArrayColumnVectors,
461   tableVectorAxis,
462   tableVectorBegin,
463   tableVectorEnd,
464   tableVectorStyle_ref,
465   tabular_info,
466   tabular_model,
467   tabular_model_ref,
468   tabular_style,
469   tabular_style_ref,
470   tail,
471   tailLineEnd,
472   text,
473   textBackground,
474   text_body,
475   text_cell,
476   text_label,
477   text_label_ref,
478   text_storage,
479   texture_fill,
480   texture_fill_ref,
481   textured_fill,
482   textured_fill_ref,
483   title,
484   title_placeholder_ref,
485   tocstyle,
486   tocstyle_ref,
487   tocStyle,
488   traced_path,
489   tracking,
490   transform_gradient,
491   transition,
492   transition_attributes,
493   type,
494   underline,
495   unfiltered,
496   unfiltered_ref,
497   vector_style,
498   vector_style_ref,
499   verticalAlignment,
500   vertical_gridline_styles,
501   widowControl,
502   workspace_style,
503   wrap,
504 
505   // attributes
506   ID,
507   IDREF,
508   a,
509   align,
510   attachment_wrap_type,
511   amt,
512   angle,
513   aspectRatioLocked,
514   b,
515   bottom,
516   c,
517   cap,
518   cell_style_default_line_height,
519   col_span,
520   cornerRadius,
521   copyright,
522   count,
523   custom,
524   decimal,
525   direction,
526   displayname,
527   equal_columns,
528   filled,
529   filterClassName,
530   filter_visibility,
531   first,
532   fitting_height,
533   fitting_width,
534   flags,
535   floating_wrap_enabled,
536   floating_wrap_type,
537   format,
538   format_base,
539   format_base_places,
540   format_base_use_minus_sign,
541   format_currency_code,
542   format_decimal_places,
543   format_fraction_accuracy,
544   format_name,
545   format_negative_style,
546   format_show_thousands_separator,
547   format_string,
548   format_type,
549   format_use_accounting_style,
550   frame_h,
551   frame_w,
552   frame_x,
553   frame_y,
554   group_formula_string,
555   group_formula_value,
556   group_formula_value_valid,
557   h,
558   height,
559   hc,
560   ht,
561   hfs_type,
562   ho,
563   horizontalFlip,
564   horizontal_gridline_styles,
565   horizontal_offset,
566   ident,
567   identifier,
568   implicit_format_type,
569   increment,
570   inline_wrap_enabled,
571   index,
572   join,
573   k,
574   kind,
575   left,
576   list_level,
577   locked,
578   m,
579   manually_sized,
580   margin,
581   mark,
582   max_value,
583   min_value,
584   mode,
585   name,
586   nc,
587   ncoc,
588   nsc,
589   num_footer_rows,
590   num_header_columns,
591   num_header_rows,
592   numcols,
593   numrows,
594   offset,
595   opacity,
596   parent_ident,
597   path_join,
598   phase,
599   pos,
600   preferred_height,
601   preferred_width,
602   projects,
603   restart_list,
604   right,
605   row_span,
606   scalar,
607   scale,
608   scale_with_text,
609   seriesIndex,
610   sfclass,
611   shearXAngle,
612   shearYAngle,
613   sizesLocked,
614   slider_orientation,
615   slider_position,
616   spacing,
617   tableCellPreferredHeight,
618   tableModelIsHeaderColumn,
619   tableModelIsHeaderRow,
620   tabular_style_name_internal,
621   tailAtCenter,
622   tailPositionX,
623   tailPositionY,
624   tailSize,
625   target,
626   technique,
627   top,
628   tscale,
629   v,
630   val,
631   value,
632   value_ref,
633   value_title,
634   version,
635   vertical_offset,
636   verticalFlip,
637   vo,
638   w,
639   width,
640   wrap_style,
641   x,
642   x_coordinate,
643   y,
644   y_coordinate,
645 
646   // attribute values
647   SFIUDropShadow,
648   _0,
649   _1,
650   _1246774599,
651   _1299148630,
652   _1346651680,
653   _1347307366,
654   _1414088262,
655   __multilingual,
656   aligned,
657   alpha_threshold,
658   both,
659   bullet,
660   butt,
661   center,
662   directional,
663   double_,
664   empty,
665   false_,
666   fit,
667   largest,
668   linear,
669   lower_alpha,
670   lower_roman,
671   miter,
672   natural,
673   neither,
674   none,
675   radial,
676   regular,
677   relative,
678   round,
679   solid,
680   star,
681   stretch,
682   tight,
683   tile,
684   true_,
685   unaligned,
686   upper_alpha,
687   upper_roman,
688 
689   LAST_TOKEN
690 };
691 
692 BOOST_STATIC_ASSERT(IWORKTokenInfo<IWORKParser>::last >= LAST_TOKEN);
693 
694 enum Namespace
695 {
696   NS_URI_SF = sf << 16,
697   NS_URI_SFA = sfa << 16,
698   NS_URI_XSI = xsi << 16,
699 };
700 
701 const IWORKTokenizer &getTokenizer();
702 
703 }
704 
705 }
706 
707 #endif // IWORKTOKEN_H_INCLUDED
708 
709 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
710