ODFPY  1.2.0
 All Classes Namespaces Files Functions Variables
odf2xhtml.py
Go to the documentation of this file.
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3 # Copyright (C) 2006-2010 Søren Roug, European Environment Agency
4 #
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
9 #
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 #
19 # Contributor(s):
20 #
21 #import pdb
22 #pdb.set_trace()
23 
24 import sys, os.path
25 sys.path.append(os.path.dirname(__file__))
26 from xml.sax import handler
27 from xml.sax.saxutils import escape, quoteattr
28 from xml.dom import Node
29 
30 from opendocument import load
31 
32 from namespaces import ANIMNS, CHARTNS, CONFIGNS, DCNS, DR3DNS, DRAWNS, FONS, \
33  FORMNS, MATHNS, METANS, NUMBERNS, OFFICENS, PRESENTATIONNS, SCRIPTNS, \
34  SMILNS, STYLENS, SVGNS, TABLENS, TEXTNS, XLINKNS
35 
36 # Handling of styles
37 #
38 # First there are font face declarations. These set up a font style that will be
39 # referenced from a text-property. The declaration describes the font making
40 # it possible for the application to find a similar font should the system not
41 # have that particular one. The StyleToCSS stores these attributes to be used
42 # for the CSS2 font declaration.
43 #
44 # Then there are default-styles. These set defaults for various style types:
45 # "text", "paragraph", "section", "ruby", "table", "table-column", "table-row",
46 # "table-cell", "graphic", "presentation", "drawing-page", "chart".
47 # Since CSS2 can't refer to another style, ODF2XHTML add these to all
48 # styles unless overridden.
49 #
50 # The real styles are declared in the <style:style> element. They have a
51 # family referring to the default-styles, and may have a parent style.
52 #
53 # Styles have scope. The same name can be used for both paragraph and
54 # character etc. styles Since CSS2 has no scope we use a prefix. (Not elegant)
55 # In ODF a style can have a parent, these parents can be chained.
56 
57 ##
58 # The purpose of the StyleToCSS class is to contain the rules to convert
59 # ODF styles to CSS2. Since it needs the generic fonts, it would probably
60 # make sense to also contain the Styles in a dict as well..
61 #
62 class StyleToCSS:
63 
64  def __init__(self):
65  # Font declarations
66  self.fontdict = {}
67 
68  # Fill-images from presentations for backgrounds
69  self.fillimages = {}
70 
71  self.ruleconversions = {
72  (DRAWNS,u'fill-image-name'): self.c_drawfillimage,
73  (FONS,u"background-color"): self.c_fo,
74  (FONS,u"border"): self.c_fo,
75  (FONS,u"border-bottom"): self.c_fo,
76  (FONS,u"border-left"): self.c_fo,
77  (FONS,u"border-right"): self.c_fo,
78  (FONS,u"border-top"): self.c_fo,
79  (FONS,u"color"): self.c_fo,
80  (FONS,u"font-family"): self.c_fo,
81  (FONS,u"font-size"): self.c_fo,
82  (FONS,u"font-style"): self.c_fo,
83  (FONS,u"font-variant"): self.c_fo,
84  (FONS,u"font-weight"): self.c_fo,
85  (FONS,u"line-height"): self.c_fo,
86  (FONS,u"margin"): self.c_fo,
87  (FONS,u"margin-bottom"): self.c_fo,
88  (FONS,u"margin-left"): self.c_fo,
89  (FONS,u"margin-right"): self.c_fo,
90  (FONS,u"margin-top"): self.c_fo,
91  (FONS,u"min-height"): self.c_fo,
92  (FONS,u"padding"): self.c_fo,
93  (FONS,u"padding-bottom"): self.c_fo,
94  (FONS,u"padding-left"): self.c_fo,
95  (FONS,u"padding-right"): self.c_fo,
96  (FONS,u"padding-top"): self.c_fo,
97  (FONS,u"page-width"): self.c_page_width,
98  (FONS,u"page-height"): self.c_page_height,
99  (FONS,u"text-align"): self.c_text_align,
100  (FONS,u"text-indent") :self.c_fo,
101  (TABLENS,u'border-model') :self.c_border_model,
102  (STYLENS,u'column-width') : self.c_width,
103  (STYLENS,u"font-name"): self.c_fn,
104  (STYLENS,u'horizontal-pos'): self.c_hp,
105  (STYLENS,u'text-position'): self.c_text_position,
106  (STYLENS,u'text-line-through-style'): self.c_text_line_through_style,
107  (STYLENS,u'text-underline-style'): self.c_text_underline_style,
108  (STYLENS,u'width') : self.c_width,
109  # FIXME Should do style:vertical-pos here
110  }
111 
112  ##
113  # It is possible that the HTML browser doesn't know how to
114  # show a particular font. Fortunately ODF provides generic fallbacks.
115  # Unfortunately they are not the same as CSS2.
116  # CSS2: serif, sans-serif, cursive, fantasy, monospace
117  # ODF: roman, swiss, modern, decorative, script, system
118  # This method put the font and fallback into a dictionary
119  #
120  def save_font(self, name, family, generic):
121  htmlgeneric = "sans-serif"
122  if generic == "roman": htmlgeneric = "serif"
123  elif generic == "swiss": htmlgeneric = "sans-serif"
124  elif generic == "modern": htmlgeneric = "monospace"
125  elif generic == "decorative": htmlgeneric = "sans-serif"
126  elif generic == "script": htmlgeneric = "monospace"
127  elif generic == "system": htmlgeneric = "serif"
128  self.fontdict[name] = (family, htmlgeneric)
129 
130  ##
131  # Fill a figure with an image. Since CSS doesn't let you resize images
132  # this should really be implemented as an absolutely position <img>
133  # with a width and a height
134  #
135  def c_drawfillimage(self, ruleset, sdict, rule, val):
136  sdict['background-image'] = "url('%s')" % self.fillimages[val]
137 
138  ##
139  # XSL formatting attributes
140  def c_fo(self, ruleset, sdict, rule, val):
141  selector = rule[1]
142  sdict[selector] = val
143 
144  ##
145  # Convert to CSS2 border model
146  def c_border_model(self, ruleset, sdict, rule, val):
147  if val == 'collapsing':
148  sdict['border-collapse'] ='collapse'
149  else:
150  sdict['border-collapse'] ='separate'
151 
152  ##
153  # Set width of box
154  def c_width(self, ruleset, sdict, rule, val):
155  sdict['width'] = val
156 
157  ##
158  # Text align
159  def c_text_align(self, ruleset, sdict, rule, align):
160  if align == "start": align = "left"
161  if align == "end": align = "right"
162  sdict['text-align'] = align
163 
164  ##
165  # Generate the CSS font family
166  # A generic font can be found in two ways. In a <style:font-face>
167  # element or as a font-family-generic attribute in text-properties.
168  #
169  def c_fn(self, ruleset, sdict, rule, fontstyle):
170  generic = ruleset.get((STYLENS,'font-family-generic') )
171  if generic is not None:
172  self.save_font(fontstyle, fontstyle, generic)
173  family, htmlgeneric = self.fontdict.get(fontstyle, (fontstyle, 'serif'))
174  sdict['font-family'] = '%s, %s' % (family, htmlgeneric)
175 
176  ##
177  # Text position. This is used e.g. to make superscript and subscript
178  # This attribute can have one or two values.
179  #
180  # The first value must be present and specifies the vertical
181  # text position as a percentage that relates to the current font
182  # height or it takes one of the values sub or super. Negative
183  # percentages or the sub value place the text below the
184  # baseline. Positive percentages or the super value place
185  # the text above the baseline. If sub or super is specified,
186  # the application can choose an appropriate text position.
187  #
188  # The second value is optional and specifies the font height
189  # as a percentage that relates to the current font-height. If
190  # this value is not specified, an appropriate font height is
191  # used. Although this value may change the font height that
192  # is displayed, it never changes the current font height that
193  # is used for additional calculations.
194  #
195  def c_text_position(self, ruleset, sdict, rule, tp):
196  textpos = tp.split(' ')
197  if len(textpos) == 2 and textpos[0] != "0%":
198  # Bug in OpenOffice. If vertical-align is 0% - ignore the text size.
199  sdict['font-size'] = textpos[1]
200  if textpos[0] == "super":
201  sdict['vertical-align'] = "33%"
202  elif textpos[0] == "sub":
203  sdict['vertical-align'] = "-33%"
204  else:
205  sdict['vertical-align'] = textpos[0]
206 
207  def c_hp(self, ruleset, sdict, rule, hpos):
208  #FIXME: Frames wrap-style defaults to 'parallel', graphics to 'none'.
209  # It is properly set in the parent-styles, but the program doesn't
210  # collect the information.
211  wrap = ruleset.get((STYLENS,'wrap'),'parallel')
212  # Can have: from-left, left, center, right, from-inside, inside, outside
213  if hpos == "center":
214  sdict['margin-left'] = "auto"
215  sdict['margin-right'] = "auto"
216 # else:
217 # # force it to be *something* then delete it
218 # sdict['margin-left'] = sdict['margin-right'] = ''
219 # del sdict['margin-left'], sdict['margin-right']
220 
221  if hpos in ("right","outside"):
222  if wrap in ( "left", "parallel","dynamic"):
223  sdict['float'] = "right"
224  elif wrap == "run-through":
225  sdict['position'] = "absolute" # Simulate run-through
226  sdict['top'] = "0"
227  sdict['right'] = "0";
228  else: # No wrapping
229  sdict['margin-left'] = "auto"
230  sdict['margin-right'] = "0cm"
231  elif hpos in ("left", "inside"):
232  if wrap in ( "right", "parallel","dynamic"):
233  sdict['float'] = "left"
234  elif wrap == "run-through":
235  sdict['position'] = "absolute" # Simulate run-through
236  sdict['top'] = "0"
237  sdict['left'] = "0"
238  else: # No wrapping
239  sdict['margin-left'] = "0cm"
240  sdict['margin-right'] = "auto"
241  elif hpos in ("from-left", "from-inside"):
242  if wrap in ( "right", "parallel"):
243  sdict['float'] = "left"
244  else:
245  sdict['position'] = "relative" # No wrapping
246  if (SVGNS,'x') in ruleset:
247  sdict['left'] = ruleset[(SVGNS,'x')]
248 
249  ##
250  # Set width of box
251  # HTML doesn't really have a page-width. It is always 100% of the browser width
252  #
253  def c_page_width(self, ruleset, sdict, rule, val):
254  sdict['width'] = val
255 
256  ##
257  # Set underline decoration
258  # HTML doesn't really have a page-width. It is always 100% of the browser width
259  #
260  def c_text_underline_style(self, ruleset, sdict, rule, val):
261  if val and val != "none":
262  sdict['text-decoration'] = "underline"
263 
264  ##
265  # Set underline decoration
266  # HTML doesn't really have a page-width. It is always 100% of the browser width
267  #
268  def c_text_line_through_style(self, ruleset, sdict, rule, val):
269  if val and val != "none":
270  sdict['text-decoration'] = "line-through"
271 
272  ##
273  # Set height of box
274  def c_page_height(self, ruleset, sdict, rule, val):
275  sdict['height'] = val
276 
277  ##
278  # Rule is a tuple of (namespace, name). If the namespace is '' then
279  # it is already CSS2
280  #
281  def convert_styles(self, ruleset):
282  sdict = {}
283  procedures=[]
284  for rule,val in ruleset.items():
285  if rule[0] == '':
286  sdict[rule[1]] = val
287  continue
288  method = self.ruleconversions.get(rule, None )
289  if method:
290  procedures.append([method, ruleset, sdict, rule, val])
291  # this ensures that the procedures for horizontal position
292  # are run last! It is important since Python3 makes the order
293  # of dictionaries unpredictable
294  for p in filter(lambda x: x[0] != self.c_hp, procedures):
295  method, ruleset, sdict, rule, val = p
296  method(ruleset, sdict, rule, val)
297  for p in filter(lambda x: x[0] == self.c_hp, procedures):
298  method, ruleset, sdict, rule, val = p
299  method(ruleset, sdict, rule, val)
300 
301  return sdict
302 
303 
304 class TagStack:
305  def __init__(self):
306  self.stack = []
307 
308  def push(self, tag, attrs):
309  self.stack.append( (tag, attrs) )
310 
311  def pop(self):
312  item = self.stack.pop()
313  return item
314 
315  def stackparent(self):
316  item = self.stack[-1]
317  return item[1]
318 
319  ##
320  # Find a tag with the given attribute
321  def rfindattr(self, attr):
322  for tag, attrs in self.stack:
323  if attr in attrs:
324  return attrs[attr]
325  return None
326  def count_tags(self, tag):
327  c = 0
328  for ttag, tattrs in self.stack:
329  if ttag == tag: c = c + 1
330  return c
331 
332 special_styles = {
333  'S-Emphasis':'em',
334  'S-Citation':'cite',
335  'S-Strong_20_Emphasis':'strong',
336  'S-Variable':'var',
337  'S-Definition':'dfn',
338  'S-Teletype':'tt',
339  'P-Heading_20_1':'h1',
340  'P-Heading_20_2':'h2',
341  'P-Heading_20_3':'h3',
342  'P-Heading_20_4':'h4',
343  'P-Heading_20_5':'h5',
344  'P-Heading_20_6':'h6',
345 # 'P-Caption':'caption',
346  'P-Addressee':'address',
347 # 'P-List_20_Heading':'dt',
348 # 'P-List_20_Contents':'dd',
349  'P-Preformatted_20_Text':'pre',
350 # 'P-Table_20_Heading':'th',
351 # 'P-Table_20_Contents':'td',
352 # 'P-Text_20_body':'p'
353 }
354 
355 #-----------------------------------------------------------------------------
356 #
357 # ODFCONTENTHANDLER
358 #
359 #-----------------------------------------------------------------------------
360 ##
361 # The ODF2XHTML parses an ODF file and produces XHTML
362 class ODF2XHTML(handler.ContentHandler):
363 
364  def __init__(self, generate_css=True, embedable=False):
365  # Tags
366  self.generate_css = generate_css
367  self.elements = {
368  (DCNS, 'title'): (self.s_processcont, self.e_dc_title),
369  (DCNS, 'language'): (self.s_processcont, self.e_dc_contentlanguage),
370  (DCNS, 'creator'): (self.s_processcont, self.e_dc_creator),
371  (DCNS, 'description'): (self.s_processcont, self.e_dc_metatag),
372  (DCNS, 'date'): (self.s_processcont, self.e_dc_metatag),
373  (DRAWNS, 'custom-shape'): (self.s_custom_shape, self.e_custom_shape),
374  (DRAWNS, 'frame'): (self.s_draw_frame, self.e_draw_frame),
375  (DRAWNS, 'image'): (self.s_draw_image, None),
376  (DRAWNS, 'fill-image'): (self.s_draw_fill_image, None),
377  (DRAWNS, "layer-set"):(self.s_ignorexml, None),
378  (DRAWNS, 'object'): (self.s_draw_object, None),
379  (DRAWNS, 'object-ole'): (self.s_draw_object_ole, None),
380  (DRAWNS, 'page'): (self.s_draw_page, self.e_draw_page),
381  (DRAWNS, 'text-box'): (self.s_draw_textbox, self.e_draw_textbox),
382  (METANS, 'creation-date'):(self.s_processcont, self.e_dc_metatag),
383  (METANS, 'generator'):(self.s_processcont, self.e_dc_metatag),
384  (METANS, 'initial-creator'): (self.s_processcont, self.e_dc_metatag),
385  (METANS, 'keyword'): (self.s_processcont, self.e_dc_metatag),
386  (NUMBERNS, "boolean-style"):(self.s_ignorexml, None),
387  (NUMBERNS, "currency-style"):(self.s_ignorexml, None),
388  (NUMBERNS, "date-style"):(self.s_ignorexml, None),
389  (NUMBERNS, "number-style"):(self.s_ignorexml, None),
390  (NUMBERNS, "text-style"):(self.s_ignorexml, None),
391  (OFFICENS, "annotation"):(self.s_ignorexml, None),
392  (OFFICENS, "automatic-styles"):(self.s_office_automatic_styles, None),
393  (OFFICENS, "document"):(self.s_office_document_content, self.e_office_document_content),
394  (OFFICENS, "document-content"):(self.s_office_document_content, self.e_office_document_content),
395  (OFFICENS, "forms"):(self.s_ignorexml, None),
396  (OFFICENS, "master-styles"):(self.s_office_master_styles, None),
397  (OFFICENS, "meta"):(self.s_ignorecont, None),
398  (OFFICENS, "presentation"):(self.s_office_presentation, self.e_office_presentation),
399  (OFFICENS, "spreadsheet"):(self.s_office_spreadsheet, self.e_office_spreadsheet),
400  (OFFICENS, "styles"):(self.s_office_styles, None),
401  (OFFICENS, "text"):(self.s_office_text, self.e_office_text),
402  (OFFICENS, "scripts"):(self.s_ignorexml, None),
403  (OFFICENS, "settings"):(self.s_ignorexml, None),
404  (PRESENTATIONNS, "notes"):(self.s_ignorexml, None),
405 # (STYLENS, "default-page-layout"):(self.s_style_default_page_layout, self.e_style_page_layout),
406  (STYLENS, "default-page-layout"):(self.s_ignorexml, None),
407  (STYLENS, "default-style"):(self.s_style_default_style, self.e_style_default_style),
408  (STYLENS, "drawing-page-properties"):(self.s_style_handle_properties, None),
409  (STYLENS, "font-face"):(self.s_style_font_face, None),
410 # (STYLENS, "footer"):(self.s_style_footer, self.e_style_footer),
411 # (STYLENS, "footer-style"):(self.s_style_footer_style, None),
412  (STYLENS, "graphic-properties"):(self.s_style_handle_properties, None),
413  (STYLENS, "handout-master"):(self.s_ignorexml, None),
414 # (STYLENS, "header"):(self.s_style_header, self.e_style_header),
415 # (STYLENS, "header-footer-properties"):(self.s_style_handle_properties, None),
416 # (STYLENS, "header-style"):(self.s_style_header_style, None),
417  (STYLENS, "master-page"):(self.s_style_master_page, None),
418  (STYLENS, "page-layout-properties"):(self.s_style_handle_properties, None),
419  (STYLENS, "page-layout"):(self.s_style_page_layout, self.e_style_page_layout),
420 # (STYLENS, "page-layout"):(self.s_ignorexml, None),
421  (STYLENS, "paragraph-properties"):(self.s_style_handle_properties, None),
422  (STYLENS, "style"):(self.s_style_style, self.e_style_style),
423  (STYLENS, "table-cell-properties"):(self.s_style_handle_properties, None),
424  (STYLENS, "table-column-properties"):(self.s_style_handle_properties, None),
425  (STYLENS, "table-properties"):(self.s_style_handle_properties, None),
426  (STYLENS, "text-properties"):(self.s_style_handle_properties, None),
427  (SVGNS, 'desc'): (self.s_ignorexml, None),
428  (TABLENS, 'covered-table-cell'): (self.s_ignorexml, None),
429  (TABLENS, 'table-cell'): (self.s_table_table_cell, self.e_table_table_cell),
430  (TABLENS, 'table-column'): (self.s_table_table_column, None),
431  (TABLENS, 'table-row'): (self.s_table_table_row, self.e_table_table_row),
432  (TABLENS, 'table'): (self.s_table_table, self.e_table_table),
433  (TEXTNS, 'a'): (self.s_text_a, self.e_text_a),
434  (TEXTNS, "alphabetical-index-source"):(self.s_text_x_source, self.e_text_x_source),
435  (TEXTNS, "bibliography-configuration"):(self.s_ignorexml, None),
436  (TEXTNS, "bibliography-source"):(self.s_text_x_source, self.e_text_x_source),
437  (TEXTNS, 'bookmark'): (self.s_text_bookmark, None),
438  (TEXTNS, 'bookmark-start'): (self.s_text_bookmark, None),
439  (TEXTNS, 'bookmark-ref'): (self.s_text_bookmark_ref, self.e_text_a),
440  (TEXTNS, 'bookmark-ref-start'): (self.s_text_bookmark_ref, None),
441  (TEXTNS, 'h'): (self.s_text_h, self.e_text_h),
442  (TEXTNS, "illustration-index-source"):(self.s_text_x_source, self.e_text_x_source),
443  (TEXTNS, 'line-break'):(self.s_text_line_break, None),
444  (TEXTNS, "linenumbering-configuration"):(self.s_ignorexml, None),
445  (TEXTNS, "list"):(self.s_text_list, self.e_text_list),
446  (TEXTNS, "list-item"):(self.s_text_list_item, self.e_text_list_item),
447  (TEXTNS, "list-level-style-bullet"):(self.s_text_list_level_style_bullet, self.e_text_list_level_style_bullet),
448  (TEXTNS, "list-level-style-number"):(self.s_text_list_level_style_number, self.e_text_list_level_style_number),
449  (TEXTNS, "list-style"):(None, None),
450  (TEXTNS, "note"):(self.s_text_note, None),
451  (TEXTNS, "note-body"):(self.s_text_note_body, self.e_text_note_body),
452  (TEXTNS, "note-citation"):(None, self.e_text_note_citation),
453  (TEXTNS, "notes-configuration"):(self.s_ignorexml, None),
454  (TEXTNS, "object-index-source"):(self.s_text_x_source, self.e_text_x_source),
455  (TEXTNS, 'p'): (self.s_text_p, self.e_text_p),
456  (TEXTNS, 's'): (self.s_text_s, None),
457  (TEXTNS, 'span'): (self.s_text_span, self.e_text_span),
458  (TEXTNS, 'tab'): (self.s_text_tab, None),
459  (TEXTNS, "table-index-source"):(self.s_text_x_source, self.e_text_x_source),
460  (TEXTNS, "table-of-content-source"):(self.s_text_x_source, self.e_text_x_source),
461  (TEXTNS, "user-index-source"):(self.s_text_x_source, self.e_text_x_source),
462  }
463  if embedable:
464  self.make_embedable()
465  self._resetobject()
466 
467  ##
468  # Tell the parser to not generate CSS
469  def set_plain(self):
470  self.generate_css = False
471 
472  ##
473  # Tells the converter to only output the parts inside the <body>
474  def set_embedable(self):
475  self.elements[(OFFICENS, u"text")] = (None,None)
476  self.elements[(OFFICENS, u"spreadsheet")] = (None,None)
477  self.elements[(OFFICENS, u"presentation")] = (None,None)
478  self.elements[(OFFICENS, u"document-content")] = (None,None)
479 
480 
481  ##
482  # Add a link to an external style file.
483  # Also turns of the embedding of styles in the HTML
484  #
485  def add_style_file(self, stylefilename, media=None):
486  self.use_internal_css = False
487  self.stylefilename = stylefilename
488  if media:
489  self.metatags.append('<link rel="stylesheet" type="text/css" href="%s" media="%s"/>\n' % (stylefilename,media))
490  else:
491  self.metatags.append('<link rel="stylesheet" type="text/css" href="%s"/>\n' % (stylefilename))
492 
493  def _resetfootnotes(self):
494  # Footnotes and endnotes
495  self.notedict = {}
496  self.currentnote = 0
497  self.notebody = ''
498 
499  def _resetobject(self):
500  self.lines = []
501  self._wfunc = self._wlines
502  self.xmlfile = ''
503  self.title = ''
504  self.language = ''
505  self.creator = ''
506  self.data = []
508  self.htmlstack = []
509  self.pstack = []
510  self.processelem = True
511  self.processcont = True
512  self.listtypes = {}
513  self.headinglevels = [0, 0,0,0,0,0, 0,0,0,0,0] # level 0 to 10
514  self.use_internal_css = True
515  self.cs = StyleToCSS()
516  self.anchors = {}
517 
518  # Style declarations
519  self.stylestack = []
520  self.styledict = {}
521  self.currentstyle = None
522 
523  self._resetfootnotes()
524 
525  # Tags from meta.xml
526  self.metatags = []
527 
528 
529  def writeout(self, s):
530  if s != '':
531  self._wfunc(s)
532 
533  def writedata(self):
534  d = ''.join(self.data)
535  if d != '':
536  self.writeout(escape(d))
537 
538  ##
539  # Create an open HTML tag
540  def opentag(self, tag, attrs={}, block=False):
541  self.htmlstack.append((tag,attrs,block))
542  a = []
543  for key,val in attrs.items():
544  a.append('''%s=%s''' % (key, quoteattr(val)))
545  if len(a) == 0:
546  self.writeout("<%s>" % tag)
547  else:
548  self.writeout("<%s %s>" % (tag, " ".join(a)))
549  if block == True:
550  self.writeout("\n")
551 
552  ##
553  # Close an open HTML tag
554  def closetag(self, tag, block=True):
555  self.htmlstack.pop()
556  self.writeout("</%s>" % tag)
557  if block == True:
558  self.writeout("\n")
559 
560  def emptytag(self, tag, attrs={}):
561  a = []
562  for key,val in attrs.items():
563  a.append('''%s=%s''' % (key, quoteattr(val)))
564  self.writeout("<%s %s/>\n" % (tag, " ".join(a)))
565 
566 #--------------------------------------------------
567 # Interface to parser
568 #--------------------------------------------------
569  def characters(self, data):
570  if self.processelem and self.processcont:
571  self.data.append(data)
572 
573  def startElementNS(self, tag, qname, attrs):
574  self.pstack.append( (self.processelem, self.processcont) )
575  if self.processelem:
576  method = self.elements.get(tag, (None, None) )[0]
577  if method:
578  self.handle_starttag(tag, method, attrs)
579  else:
580  self.unknown_starttag(tag,attrs)
581  self.tagstack.push( tag, attrs )
582 
583  def endElementNS(self, tag, qname):
584  stag, attrs = self.tagstack.pop()
585  if self.processelem:
586  method = self.elements.get(tag, (None, None) )[1]
587  if method:
588  self.handle_endtag(tag, attrs, method)
589  else:
590  self.unknown_endtag(tag, attrs)
591  self.processelem, self.processcont = self.pstack.pop()
592 
593 #--------------------------------------------------
594  def handle_starttag(self, tag, method, attrs):
595  method(tag,attrs)
596 
597  def handle_endtag(self, tag, attrs, method):
598  method(tag, attrs)
599 
600  def unknown_starttag(self, tag, attrs):
601  pass
602 
603  def unknown_endtag(self, tag, attrs):
604  pass
605 
606  ##
607  # Ignore this xml element and all children of it
608  # It will automatically stop ignoring
609  #
610  def s_ignorexml(self, tag, attrs):
611  self.processelem = False
612 
613  ##
614  # Stop processing the text nodes
615  def s_ignorecont(self, tag, attrs):
616  self.processcont = False
617 
618  ##
619  # Start processing the text nodes
620  def s_processcont(self, tag, attrs):
621  self.processcont = True
622 
623  ##
624  # Generate a class name from a style name
625  def classname(self, attrs):
626  c = attrs.get((TEXTNS,'style-name'),'')
627  c = c.replace(".","_")
628  return c
629 
630  ##
631  # Create a unique anchor id for a href name
632  def get_anchor(self, name):
633  if name not in self.anchors:
634  self.anchors[name] = "anchor%03d" % (len(self.anchors) + 1)
635  return self.anchors.get(name)
636 
637 
638 #--------------------------------------------------
639 
640  def purgedata(self):
641  self.data = []
642 
643 #-----------------------------------------------------------------------------
644 #
645 # Handle meta data
646 #
647 #-----------------------------------------------------------------------------
648  ##
649  # Get the title from the meta data and create a HTML <title>
650  #
651  def e_dc_title(self, tag, attrs):
652  self.title = ''.join(self.data)
653  #self.metatags.append('<title>%s</title>\n' % escape(self.title))
654  self.data = []
655 
656  ##
657  # Any other meta data is added as a <meta> element
658  #
659  def e_dc_metatag(self, tag, attrs):
660  self.metatags.append('<meta name="%s" content=%s/>\n' % (tag[1], quoteattr(''.join(self.data))))
661  self.data = []
662 
663  ##
664  # Set the content language. Identifies the targeted audience
665  #
666  def e_dc_contentlanguage(self, tag, attrs):
667  self.language = ''.join(self.data)
668  self.metatags.append('<meta http-equiv="content-language" content="%s"/>\n' % escape(self.language))
669  self.data = []
670 
671  ##
672  # Set the content creator. Identifies the targeted audience
673  #
674  def e_dc_creator(self, tag, attrs):
675  self.creator = ''.join(self.data)
676  self.metatags.append('<meta http-equiv="creator" content="%s"/>\n' % escape(self.creator))
677  self.data = []
678 
679  ##
680  # A <draw:custom-shape> is made into a <div> in HTML which is then styled
681  #
682  def s_custom_shape(self, tag, attrs):
683  anchor_type = attrs.get((TEXTNS,'anchor-type'),'notfound')
684  htmltag = 'div'
685  name = "G-" + attrs.get( (DRAWNS,'style-name'), "")
686  if name == 'G-':
687  name = "PR-" + attrs.get( (PRESENTATIONNS,'style-name'), "")
688  name = name.replace(".","_")
689  if anchor_type == "paragraph":
690  style = 'position:absolute;'
691  elif anchor_type == 'char':
692  style = "position:absolute;"
693  elif anchor_type == 'as-char':
694  htmltag = 'div'
695  style = ''
696  else:
697  style = "position: absolute;"
698  if (SVGNS,"width")in attrs:
699  style = style + "width:" + attrs[(SVGNS,"width")] + ";"
700  if (SVGNS,"height") in attrs:
701  style = style + "height:" + attrs[(SVGNS,"height")] + ";"
702  if (SVGNS,"x") in attrs:
703  style = style + "left:" + attrs[(SVGNS,"x")] + ";"
704  if (SVGNS,"y") in attrs:
705  style = style + "top:" + attrs[(SVGNS,"y")] + ";"
706  if self.generate_css:
707  self.opentag(htmltag, {'class': name, 'style': style})
708  else:
709  self.opentag(htmltag)
710 
711  ##
712  # End the <draw:frame>
713  #
714  def e_custom_shape(self, tag, attrs):
715  self.closetag('div')
716 
717  ##
718  # A <draw:frame> is made into a <div> in HTML which is then styled
719  #
720  def s_draw_frame(self, tag, attrs):
721  anchor_type = attrs.get((TEXTNS,'anchor-type'),'notfound')
722  htmltag = 'div'
723  name = "G-" + attrs.get( (DRAWNS,'style-name'), "")
724  if name == 'G-':
725  name = "PR-" + attrs.get( (PRESENTATIONNS,'style-name'), "")
726  name = name.replace(".","_")
727  if anchor_type == "paragraph":
728  style = 'position:relative;'
729  elif anchor_type == 'char':
730  style = "position:relative;"
731  elif anchor_type == 'as-char':
732  htmltag = 'div'
733  style = ''
734  else:
735  style = "position:absolute;"
736  if (SVGNS,"width") in attrs:
737  style = style + "width:" + attrs[(SVGNS,"width")] + ";"
738  if (SVGNS,"height") in attrs:
739  style = style + "height:" + attrs[(SVGNS,"height")] + ";"
740  if (SVGNS,"x") in attrs:
741  style = style + "left:" + attrs[(SVGNS,"x")] + ";"
742  if (SVGNS,"y") in attrs:
743  style = style + "top:" + attrs[(SVGNS,"y")] + ";"
744  if self.generate_css:
745  self.opentag(htmltag, {'class': name, 'style': style})
746  else:
747  self.opentag(htmltag)
748 
749  ##
750  # End the <draw:frame>
751  #
752  def e_draw_frame(self, tag, attrs):
753  self.closetag('div')
754 
755  def s_draw_fill_image(self, tag, attrs):
756  name = attrs.get( (DRAWNS,'name'), "NoName")
757  imghref = attrs[(XLINKNS,"href")]
758  imghref = self.rewritelink(imghref)
759  self.cs.fillimages[name] = imghref
760 
761  ##
762  # Intended to be overloaded if you don't store your pictures
763  # in a Pictures subfolder
764  #
765  def rewritelink(self, imghref):
766  return imghref
767 
768  ##
769  # A <draw:image> becomes an <img/> element
770  #
771  def s_draw_image(self, tag, attrs):
772  parent = self.tagstack.stackparent()
773  anchor_type = parent.get((TEXTNS,'anchor-type'))
774  imghref = attrs[(XLINKNS,"href")]
775  imghref = self.rewritelink(imghref)
776  htmlattrs = {'alt':"", 'src':imghref }
777  if self.generate_css:
778  if anchor_type != "char":
779  htmlattrs['style'] = "display: block;"
780  self.emptytag('img', htmlattrs)
781 
782  ##
783  # A <draw:object> is embedded object in the document (e.g. spreadsheet in presentation).
784  #
785  def s_draw_object(self, tag, attrs):
786  objhref = attrs[(XLINKNS,"href")]
787  # Remove leading "./": from "./Object 1" to "Object 1"
788 # objhref = objhref [2:]
789 
790  # Not using os.path.join since it fails to find the file on Windows.
791 # objcontentpath = '/'.join([objhref, 'content.xml'])
792 
793  for c in self.document.childnodes:
794  if c.folder == objhref:
795  self._walknode(c.topnode)
796 
797  ##
798  # A <draw:object-ole> is embedded OLE object in the document (e.g. MS Graph).
799  #
800  def s_draw_object_ole(self, tag, attrs):
801  class_id = attrs[(DRAWNS,"class-id")]
802  if class_id and class_id.lower() == "00020803-0000-0000-c000-000000000046": ## Microsoft Graph 97 Chart
803  tagattrs = { 'name':'object_ole_graph', 'class':'ole-graph' }
804  self.opentag('a', tagattrs)
805  self.closetag('a', tagattrs)
806 
807  ##
808  # A <draw:page> is a slide in a presentation. We use a <fieldset> element in HTML.
809  # Therefore if you convert a ODP file, you get a series of <fieldset>s.
810  # Override this for your own purpose.
811  #
812  def s_draw_page(self, tag, attrs):
813  name = attrs.get( (DRAWNS,'name'), "NoName")
814  stylename = attrs.get( (DRAWNS,'style-name'), "")
815  stylename = stylename.replace(".","_")
816  masterpage = attrs.get( (DRAWNS,'master-page-name'),"")
817  masterpage = masterpage.replace(".","_")
818  if self.generate_css:
819  self.opentag('fieldset', {'class':"DP-%s MP-%s" % (stylename, masterpage) })
820  else:
821  self.opentag('fieldset')
822  self.opentag('legend')
823  self.writeout(escape(name))
824  self.closetag('legend')
825 
826  def e_draw_page(self, tag, attrs):
827  self.closetag('fieldset')
828 
829  def s_draw_textbox(self, tag, attrs):
830  style = ''
831  if (FONS,"min-height") in attrs:
832  style = style + "min-height:" + attrs[(FONS,"min-height")] + ";"
833  self.opentag('div')
834 # self.opentag('div', {'style': style})
835 
836  ##
837  # End the <draw:text-box>
838  #
839  def e_draw_textbox(self, tag, attrs):
840  self.closetag('div')
841 
842  def html_body(self, tag, attrs):
843  self.writedata()
844  if self.generate_css and self.use_internal_css:
845  self.opentag('style', {'type':"text/css"}, True)
846  self.writeout('/*<![CDATA[*/\n')
847  self.generate_stylesheet()
848  self.writeout('/*]]>*/\n')
849  self.closetag('style')
850  self.purgedata()
851  self.closetag('head')
852  self.opentag('body', block=True)
853 
854  default_styles = """
855 img { width: 100%; height: 100%; }
856 * { padding: 0; margin: 0; background-color:white; }
857 body { margin: 0 1em; }
858 ol, ul { padding-left: 2em; }
859 """
860 
862  for name in self.stylestack:
863  styles = self.styledict.get(name)
864  # Preload with the family's default style
865  if '__style-family'in styles and styles['__style-family'] in self.styledict:
866  familystyle = self.styledict[styles['__style-family']].copy()
867  del styles['__style-family']
868  for style, val in styles.items():
869  familystyle[style] = val
870  styles = familystyle
871  # Resolve the remaining parent styles
872  while '__parent-style-name' in styles and styles['__parent-style-name'] in self.styledict:
873  parentstyle = self.styledict[styles['__parent-style-name']].copy()
874  del styles['__parent-style-name']
875  for style, val in styles.items():
876  parentstyle[style] = val
877  styles = parentstyle
878  self.styledict[name] = styles
879  # Write the styles to HTML
880  self.writeout(self.default_styles)
881  for name in self.stylestack:
882  styles = self.styledict.get(name)
883  css2 = self.cs.convert_styles(styles)
884  self.writeout("%s {\n" % name)
885  for style, val in css2.items():
886  self.writeout("\t%s: %s;\n" % (style, val) )
887  self.writeout("}\n")
888 
890  if self.currentnote == 0:
891  return
892  if self.generate_css:
893  self.opentag('ol', {'style':'border-top: 1px solid black'}, True)
894  else:
895  self.opentag('ol')
896  for key in range(1,self.currentnote+1):
897  note = self.notedict[key]
898 # for key,note in self.notedict.items():
899  self.opentag('li', { 'id':"footnote-%d" % key })
900 # self.opentag('sup')
901 # self.writeout(escape(note['citation']))
902 # self.closetag('sup', False)
903  self.writeout(note['body'])
904  self.closetag('li')
905  self.closetag('ol')
906 
907  def s_office_automatic_styles(self, tag, attrs):
908  if self.xmlfile == 'styles.xml':
909  self.autoprefix = "A"
910  else:
911  self.autoprefix = ""
912 
913  ##
914  # First tag in the content.xml file
915  def s_office_document_content(self, tag, attrs):
916  self.writeout('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" ')
917  self.writeout('"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n')
918  self.opentag('html', {'xmlns':"http://www.w3.org/1999/xhtml"}, True)
919  self.opentag('head', block=True)
920  self.emptytag('meta', { 'http-equiv':"Content-Type", 'content':"text/html;charset=UTF-8"})
921  for metaline in self.metatags:
922  self.writeout(metaline)
923  self.writeout('<title>%s</title>\n' % escape(self.title))
924 
925  ##
926  # Last tag
927  def e_office_document_content(self, tag, attrs):
928  self.closetag('html')
929 
930  ##
931  #
932  def s_office_master_styles(self, tag, attrs):
933 
934  ##
935  # For some odd reason, OpenOffice Impress doesn't define a default-style
936  # for the 'paragraph'. We therefore force a standard when we see
937  # it is a presentation
938  #
939  def s_office_presentation(self, tag, attrs):
940  self.styledict['p'] = {(FONS,u'font-size'): u"24pt" }
941  self.styledict['presentation'] = {(FONS,u'font-size'): u"24pt" }
942  self.html_body(tag, attrs)
943 
944  def e_office_presentation(self, tag, attrs):
945  self.generate_footnotes()
946  self.closetag('body')
947 
948  def s_office_spreadsheet(self, tag, attrs):
949  self.html_body(tag, attrs)
950 
951  def e_office_spreadsheet(self, tag, attrs):
952  self.generate_footnotes()
953  self.closetag('body')
954 
955  def s_office_styles(self, tag, attrs):
956  self.autoprefix = ""
957 
958  ##
959  # OpenDocument text
960  def s_office_text(self, tag, attrs):
961  self.styledict['frame'] = { (STYLENS,'wrap'): u'parallel'}
962  self.html_body(tag, attrs)
963 
964  def e_office_text(self, tag, attrs):
965  self.generate_footnotes()
966  self.closetag('body')
967 
968  ##
969  # Copy all attributes to a struct.
970  # We will later convert them to CSS2
971  #
972  def s_style_handle_properties(self, tag, attrs):
973  for key,attr in attrs.items():
974  self.styledict[self.currentstyle][key] = attr
975 
976 
977  familymap = {'frame':'frame', 'paragraph':'p', 'presentation':'presentation',
978  'text':'span','section':'div',
979  'table':'table','table-cell':'td','table-column':'col',
980  'table-row':'tr','graphic':'graphic' }
981 
982  ##
983  # A default style is like a style on an HTML tag
984  #
985  def s_style_default_style(self, tag, attrs):
986  family = attrs[(STYLENS,'family')]
987  htmlfamily = self.familymap.get(family,'unknown')
988  self.currentstyle = htmlfamily
989 # self.stylestack.append(self.currentstyle)
990  self.styledict[self.currentstyle] = {}
991 
992  def e_style_default_style(self, tag, attrs):
993  self.currentstyle = None
994 
995  ##
996  # It is possible that the HTML browser doesn't know how to
997  # show a particular font. Luckily ODF provides generic fallbacks
998  # Unfortunately they are not the same as CSS2.
999  # CSS2: serif, sans-serif, cursive, fantasy, monospace
1000  # ODF: roman, swiss, modern, decorative, script, system
1001  #
1002  def s_style_font_face(self, tag, attrs):
1003  name = attrs[(STYLENS,"name")]
1004  family = attrs[(SVGNS,"font-family")]
1005  generic = attrs.get( (STYLENS,'font-family-generic'),"" )
1006  self.cs.save_font(name, family, generic)
1007 
1008  def s_style_footer(self, tag, attrs):
1009  self.opentag('div', { 'id':"footer" })
1010  self.purgedata()
1011 
1012  def e_style_footer(self, tag, attrs):
1013  self.writedata()
1014  self.closetag('div')
1015  self.purgedata()
1016 
1017  def s_style_footer_style(self, tag, attrs):
1018  self.currentstyle = "@print #footer"
1019  self.stylestack.append(self.currentstyle)
1020  self.styledict[self.currentstyle] = {}
1021 
1022  def s_style_header(self, tag, attrs):
1023  self.opentag('div', { 'id':"header" })
1024  self.purgedata()
1025 
1026  def e_style_header(self, tag, attrs):
1027  self.writedata()
1028  self.closetag('div')
1029  self.purgedata()
1030 
1031  def s_style_header_style(self, tag, attrs):
1032  self.currentstyle = "@print #header"
1033  self.stylestack.append(self.currentstyle)
1034  self.styledict[self.currentstyle] = {}
1035 
1036  ##
1037  # Collect the formatting for the default page layout style.
1038  #
1039  def s_style_default_page_layout(self, tag, attrs):
1040  self.currentstyle = "@page"
1041  self.stylestack.append(self.currentstyle)
1042  self.styledict[self.currentstyle] = {}
1043 
1044  ##
1045  # Collect the formatting for the page layout style.
1046  # This won't work in CSS 2.1, as page identifiers are not allowed.
1047  # It is legal in CSS3, but the rest of the application doesn't specify when to use what page layout
1048  #
1049  def s_style_page_layout(self, tag, attrs):
1050  name = attrs[(STYLENS,'name')]
1051  name = name.replace(".","_")
1052  self.currentstyle = ".PL-" + name
1053  self.stylestack.append(self.currentstyle)
1054  self.styledict[self.currentstyle] = {}
1055 
1056  ##
1057  # End this style
1058  #
1059  def e_style_page_layout(self, tag, attrs):
1060  self.currentstyle = None
1061 
1062  ##
1063  # Collect the formatting for the page layout style.
1064  #
1065  def s_style_master_page(self, tag, attrs):
1066  name = attrs[(STYLENS,'name')]
1067  name = name.replace(".","_")
1068 
1069  self.currentstyle = ".MP-" + name
1070  self.stylestack.append(self.currentstyle)
1071  self.styledict[self.currentstyle] = {('','position'):'relative'}
1072  # Then load the pagelayout style if we find it
1073  pagelayout = attrs.get( (STYLENS,'page-layout-name'), None)
1074  if pagelayout:
1075  pagelayout = ".PL-" + pagelayout
1076  if pagelayout in self.styledict:
1077  styles = self.styledict[pagelayout]
1078  for style, val in styles.items():
1079  self.styledict[self.currentstyle][style] = val
1080  else:
1081  self.styledict[self.currentstyle]['__parent-style-name'] = pagelayout
1082  self.s_ignorexml(tag, attrs)
1083 
1084  # Short prefixes for class selectors
1085  _familyshort = {'drawing-page':'DP', 'paragraph':'P', 'presentation':'PR',
1086  'text':'S', 'section':'D',
1087  'table':'T', 'table-cell':'TD', 'table-column':'TC',
1088  'table-row':'TR', 'graphic':'G' }
1089 
1090  ##
1091  # Collect the formatting for the style.
1092  # Styles have scope. The same name can be used for both paragraph and
1093  # character styles Since CSS has no scope we use a prefix. (Not elegant)
1094  # In ODF a style can have a parent, these parents can be chained.
1095  # We may not have encountered the parent yet, but if we have, we resolve it.
1096  #
1097  def s_style_style(self, tag, attrs):
1098  name = attrs[(STYLENS,'name')]
1099  name = name.replace(".","_")
1100  family = attrs[(STYLENS,'family')]
1101  htmlfamily = self.familymap.get(family,'unknown')
1102  sfamily = self._familyshort.get(family,'X')
1103  name = "%s%s-%s" % (self.autoprefix, sfamily, name)
1104  parent = attrs.get( (STYLENS,'parent-style-name') )
1105  self.currentstyle = special_styles.get(name,"."+name)
1106  self.stylestack.append(self.currentstyle)
1107  if self.currentstyle not in self.styledict:
1108  self.styledict[self.currentstyle] = {}
1109 
1110  self.styledict[self.currentstyle]['__style-family'] = htmlfamily
1111 
1112  # Then load the parent style if we find it
1113  if parent:
1114  parent = "%s-%s" % (sfamily, parent)
1115  parent = special_styles.get(parent, "."+parent)
1116  if parent in self.styledict:
1117  styles = self.styledict[parent]
1118  for style, val in styles.items():
1119  self.styledict[self.currentstyle][style] = val
1120  else:
1121  self.styledict[self.currentstyle]['__parent-style-name'] = parent
1122 
1123  ##
1124  # End this style
1125  #
1126  def e_style_style(self, tag, attrs):
1127  self.currentstyle = None
1128 
1129  ##
1130  # Start a table
1131  #
1132  def s_table_table(self, tag, attrs):
1133  c = attrs.get( (TABLENS,'style-name'), None)
1134  if c and self.generate_css:
1135  c = c.replace(".","_")
1136  self.opentag('table',{ 'class': "T-%s" % c })
1137  else:
1138  self.opentag('table')
1139  self.purgedata()
1140 
1141  ##
1142  # End a table
1143  #
1144  def e_table_table(self, tag, attrs):
1145  self.writedata()
1146  self.closetag('table')
1147  self.purgedata()
1148 
1149  ##
1150  # Start a table cell
1151  def s_table_table_cell(self, tag, attrs):
1152  #FIXME: number-columns-repeated § 8.1.3
1153  #repeated = int(attrs.get( (TABLENS,'number-columns-repeated'), 1))
1154  htmlattrs = {}
1155  rowspan = attrs.get( (TABLENS,'number-rows-spanned') )
1156  if rowspan:
1157  htmlattrs['rowspan'] = rowspan
1158  colspan = attrs.get( (TABLENS,'number-columns-spanned') )
1159  if colspan:
1160  htmlattrs['colspan'] = colspan
1161 
1162  c = attrs.get( (TABLENS,'style-name') )
1163  if c:
1164  htmlattrs['class'] = 'TD-%s' % c.replace(".","_")
1165  self.opentag('td', htmlattrs)
1166  self.purgedata()
1167 
1168  ##
1169  # End a table cell
1170  def e_table_table_cell(self, tag, attrs):
1171  self.writedata()
1172  self.closetag('td')
1173  self.purgedata()
1174 
1175  ##
1176  # Start a table column
1177  def s_table_table_column(self, tag, attrs):
1178  c = attrs.get( (TABLENS,'style-name'), None)
1179  repeated = int(attrs.get( (TABLENS,'number-columns-repeated'), 1))
1180  htmlattrs = {}
1181  if c:
1182  htmlattrs['class'] = "TC-%s" % c.replace(".","_")
1183  for x in range(repeated):
1184  self.emptytag('col', htmlattrs)
1185  self.purgedata()
1186 
1187  ##
1188  # Start a table row
1189  def s_table_table_row(self, tag, attrs):
1190  #FIXME: table:number-rows-repeated
1191  c = attrs.get( (TABLENS,'style-name'), None)
1192  htmlattrs = {}
1193  if c:
1194  htmlattrs['class'] = "TR-%s" % c.replace(".","_")
1195  self.opentag('tr', htmlattrs)
1196  self.purgedata()
1197 
1198  ##
1199  # End a table row
1200  def e_table_table_row(self, tag, attrs):
1201  self.writedata()
1202  self.closetag('tr')
1203  self.purgedata()
1204 
1205  ##
1206  # Anchors start
1207  def s_text_a(self, tag, attrs):
1208  self.writedata()
1209  href = attrs[(XLINKNS,"href")].split("|")[0]
1210  if href[0] == "#":
1211  href = "#" + self.get_anchor(href[1:])
1212  self.opentag('a', {'href':href})
1213  self.purgedata()
1214 
1215  ##
1216  # End an anchor or bookmark reference
1217  def e_text_a(self, tag, attrs):
1218  self.writedata()
1219  self.closetag('a', False)
1220  self.purgedata()
1221 
1222  ##
1223  # Bookmark definition
1224  def s_text_bookmark(self, tag, attrs):
1225  name = attrs[(TEXTNS,'name')]
1226  html_id = self.get_anchor(name)
1227  self.writedata()
1228  self.opentag('span', {'id':html_id})
1229  self.closetag('span', False)
1230  self.purgedata()
1231 
1232  ##
1233  # Bookmark reference
1234  def s_text_bookmark_ref(self, tag, attrs):
1235  name = attrs[(TEXTNS,'ref-name')]
1236  html_id = "#" + self.get_anchor(name)
1237  self.writedata()
1238  self.opentag('a', {'href':html_id})
1239  self.purgedata()
1240 
1241  ##
1242  # Headings start
1243  def s_text_h(self, tag, attrs):
1244  level = int(attrs[(TEXTNS,'outline-level')])
1245  if level > 6: level = 6 # Heading levels go only to 6 in XHTML
1246  if level < 1: level = 1
1247  self.headinglevels[level] = self.headinglevels[level] + 1
1248  name = self.classname(attrs)
1249  for x in range(level + 1,10):
1250  self.headinglevels[x] = 0
1251  special = special_styles.get("P-"+name)
1252  if special or not self.generate_css:
1253  self.opentag('h%s' % level)
1254  else:
1255  self.opentag('h%s' % level, {'class':"P-%s" % name })
1256  self.purgedata()
1257 
1258  ##
1259  # Headings end
1260  # Side-effect: If there is no title in the metadata, then it is taken
1261  # from the first heading of any level.
1262  #
1263  def e_text_h(self, tag, attrs):
1264  self.writedata()
1265  level = int(attrs[(TEXTNS,'outline-level')])
1266  if level > 6: level = 6 # Heading levels go only to 6 in XHTML
1267  if level < 1: level = 1
1268  lev = self.headinglevels[1:level+1]
1269  outline = '.'.join(map(str,lev) )
1270  heading = ''.join(self.data)
1271  if self.title == '': self.title = heading
1272  anchor = self.get_anchor("%s.%s" % ( outline, heading))
1273  self.opentag('a', {'id': anchor} )
1274  self.closetag('a', False)
1275  self.closetag('h%s' % level)
1276  self.purgedata()
1277 
1278  ##
1279  # Force a line break (<br/>)
1280  def s_text_line_break(self, tag, attrs):
1281  self.writedata()
1282  self.emptytag('br')
1283  self.purgedata()
1284 
1285  ##
1286  # Start a list (<ul> or <ol>)
1287  # To know which level we're at, we have to count the number
1288  # of <text:list> elements on the tagstack.
1289  #
1290  def s_text_list(self, tag, attrs):
1291  name = attrs.get( (TEXTNS,'style-name') )
1292  level = self.tagstack.count_tags(tag) + 1
1293  if name:
1294  name = name.replace(".","_")
1295  else:
1296  # FIXME: If a list is contained in a table cell or text box,
1297  # the list level must return to 1, even though the table or
1298  # textbox itself may be nested within another list.
1299  name = self.tagstack.rfindattr( (TEXTNS,'style-name') )
1300  list_class = "%s_%d" % (name, level)
1301  if self.generate_css:
1302  self.opentag('%s' % self.listtypes.get(list_class,'ul'), {'class': list_class })
1303  else:
1304  self.opentag('%s' % self.listtypes.get(list_class,'ul'))
1305  self.purgedata()
1306 
1307  ##
1308  # End a list
1309  def e_text_list(self, tag, attrs):
1310  self.writedata()
1311  name = attrs.get( (TEXTNS,'style-name') )
1312  level = self.tagstack.count_tags(tag) + 1
1313  if name:
1314  name = name.replace(".","_")
1315  else:
1316  # FIXME: If a list is contained in a table cell or text box,
1317  # the list level must return to 1, even though the table or
1318  # textbox itself may be nested within another list.
1319  name = self.tagstack.rfindattr( (TEXTNS,'style-name') )
1320  list_class = "%s_%d" % (name, level)
1321  self.closetag(self.listtypes.get(list_class,'ul'))
1322  self.purgedata()
1323 
1324  ##
1325  # Start list item
1326  def s_text_list_item(self, tag, attrs):
1327  self.opentag('li')
1328  self.purgedata()
1329 
1330  ##
1331  # End list item
1332  def e_text_list_item(self, tag, attrs):
1333  self.writedata()
1334  self.closetag('li')
1335  self.purgedata()
1336 
1337  ##
1338  # CSS doesn't have the ability to set the glyph
1339  # to a particular character, so we just go through
1340  # the available glyphs
1341  #
1342  def s_text_list_level_style_bullet(self, tag, attrs):
1343  name = self.tagstack.rfindattr( (STYLENS,'name') )
1344  level = attrs[(TEXTNS,'level')]
1346  list_class = "%s_%s" % (name, level)
1347  self.listtypes[list_class] = 'ul'
1348  self.currentstyle = ".%s_%s" % ( name.replace(".","_"), level)
1349  self.stylestack.append(self.currentstyle)
1350  self.styledict[self.currentstyle] = {}
1351 
1352  level = int(level)
1353  listtype = ("square", "disc", "circle")[level % 3]
1354  self.styledict[self.currentstyle][('','list-style-type')] = listtype
1355 
1356  def e_text_list_level_style_bullet(self, tag, attrs):
1357  self.currentstyle = self.prevstyle
1358  del self.prevstyle
1359 
1360  def s_text_list_level_style_number(self, tag, attrs):
1361  name = self.tagstack.stackparent()[(STYLENS,'name')]
1362  level = attrs[(TEXTNS,'level')]
1363  num_format = attrs.get( (STYLENS,'name'),"1")
1364  list_class = "%s_%s" % (name, level)
1365  self.prevstyle = self.currentstyle
1366  self.currentstyle = ".%s_%s" % ( name.replace(".","_"), level)
1367  self.listtypes[list_class] = 'ol'
1368  self.stylestack.append(self.currentstyle)
1369  self.styledict[self.currentstyle] = {}
1370  if num_format == "1": listtype = "decimal"
1371  elif num_format == "I": listtype = "upper-roman"
1372  elif num_format == "i": listtype = "lower-roman"
1373  elif num_format == "A": listtype = "upper-alpha"
1374  elif num_format == "a": listtype = "lower-alpha"
1375  else: listtype = "decimal"
1376  self.styledict[self.currentstyle][('','list-style-type')] = listtype
1377 
1378  def e_text_list_level_style_number(self, tag, attrs):
1379  self.currentstyle = self.prevstyle
1380  del self.prevstyle
1381 
1382  def s_text_note(self, tag, attrs):
1383  self.writedata()
1384  self.purgedata()
1385  self.currentnote = self.currentnote + 1
1386  self.notedict[self.currentnote] = {}
1387  self.notebody = []
1388 
1389  def e_text_note(self, tag, attrs):
1390  pass
1391 
1392  def collectnote(self,s):
1393  if s != '':
1394  self.notebody.append(s)
1395 
1396  def s_text_note_body(self, tag, attrs):
1397  self._orgwfunc = self._wfunc
1398  self._wfunc = self.collectnote
1399 
1400  def e_text_note_body(self, tag, attrs):
1401  self._wfunc = self._orgwfunc
1402  self.notedict[self.currentnote]['body'] = ''.join(self.notebody)
1403  self.notebody = ''
1404  del self._orgwfunc
1405 
1406  def e_text_note_citation(self, tag, attrs):
1407  mark = ''.join(self.data)
1408  self.notedict[self.currentnote]['citation'] = mark
1409  self.opentag('a',{ 'href': "#footnote-%s" % self.currentnote })
1410  self.opentag('sup')
1411 # self.writeout( escape(mark) )
1412  # Since HTML only knows about endnotes, there is too much risk that the
1413  # marker is reused in the source. Therefore we force numeric markers
1414  if sys.version_info.major==3:
1415  self.writeout(self.currentnote)
1416  else:
1417  self.writeout(unicode(self.currentnote))
1418  self.closetag('sup')
1419  self.closetag('a')
1420 
1421  ##
1422  # Paragraph
1423  #
1424  def s_text_p(self, tag, attrs):
1425  htmlattrs = {}
1426  specialtag = "p"
1427  c = attrs.get( (TEXTNS,'style-name'), None)
1428  if c:
1429  c = c.replace(".","_")
1430  specialtag = special_styles.get("P-"+c)
1431  if specialtag is None:
1432  specialtag = 'p'
1433  if self.generate_css:
1434  htmlattrs['class'] = "P-%s" % c
1435  self.opentag(specialtag, htmlattrs)
1436  self.purgedata()
1437 
1438  ##
1439  # End Paragraph
1440  #
1441  def e_text_p(self, tag, attrs):
1442  specialtag = "p"
1443  c = attrs.get( (TEXTNS,'style-name'), None)
1444  if c:
1445  c = c.replace(".","_")
1446  specialtag = special_styles.get("P-"+c)
1447  if specialtag is None:
1448  specialtag = 'p'
1449  self.writedata()
1450  self.closetag(specialtag)
1451  self.purgedata()
1452 
1453  ##
1454  # Generate a number of spaces. ODF has an element; HTML uses &nbsp;
1455  # We use &#160; so we can send the output through an XML parser if we desire to
1456  #
1457  def s_text_s(self, tag, attrs):
1458  c = attrs.get( (TEXTNS,'c'),"1")
1459  for x in range(int(c)):
1460  self.writeout('&#160;')
1461 
1462  ##
1463  # The <text:span> element matches the <span> element in HTML. It is
1464  # typically used to properties of the text.
1465  #
1466  def s_text_span(self, tag, attrs):
1467  self.writedata()
1468  c = attrs.get( (TEXTNS,'style-name'), None)
1469  htmlattrs = {}
1470  if c:
1471  c = c.replace(".","_")
1472  special = special_styles.get("S-"+c)
1473  if special is None and self.generate_css:
1474  htmlattrs['class'] = "S-%s" % c
1475  self.opentag('span', htmlattrs)
1476  self.purgedata()
1477 
1478  ##
1479  # End the <text:span>
1480  def e_text_span(self, tag, attrs):
1481  self.writedata()
1482  self.closetag('span', False)
1483  self.purgedata()
1484 
1485  ##
1486  # Move to the next tabstop. We ignore this in HTML
1487  #
1488  def s_text_tab(self, tag, attrs):
1489  self.writedata()
1490  self.writeout(' ')
1491  self.purgedata()
1492 
1493  ##
1494  # Various indexes and tables of contents. We ignore those.
1495  #
1496  def s_text_x_source(self, tag, attrs):
1497  self.writedata()
1498  self.purgedata()
1499  self.s_ignorexml(tag, attrs)
1500 
1501  ##
1502  # Various indexes and tables of contents. We ignore those.
1503  #
1504  def e_text_x_source(self, tag, attrs):
1505  self.writedata()
1506  self.purgedata()
1507 
1508 
1509 #-----------------------------------------------------------------------------
1510 #
1511 # Reading the file
1512 #
1513 #-----------------------------------------------------------------------------
1514 
1515  ##
1516  #
1517  # Loads a document into the parser and parses it.
1518  # The argument can either be a filename or a document in memory.
1519  # @param odffile if the type is unicode string: name of a file; else
1520  # it must be an open file type
1521  #
1522  def load(self, odffile):
1523  assert(type(odffile)==type(u"") or 'rb' in repr(odffile) or 'BufferedReader' in repr(odffile) or 'BytesIO' in repr(odffile))
1524 
1525  self.lines = []
1526  self._wfunc = self._wlines
1527  if type(odffile)==type(u""):
1528  self.document = load(odffile)
1529  else:
1530  self.document = odffile
1531  self._walknode(self.document.topnode)
1532 
1533  def _walknode(self, node):
1534  if node.nodeType == Node.ELEMENT_NODE:
1535  self.startElementNS(node.qname, node.tagName, node.attributes)
1536  for c in node.childNodes:
1537  self._walknode(c)
1538  self.endElementNS(node.qname, node.tagName)
1539  if node.nodeType == Node.TEXT_NODE or node.nodeType == Node.CDATA_SECTION_NODE:
1540  if sys.version_info.major==3:
1541  self.characters(str(node))
1542  else:
1543  self.characters(unicode(node))
1544 
1545 
1546  ##
1547  #
1548  # Load a file and return the XHTML
1549  # @param odffile if the type is unicode string: name of a file; else
1550  # it must be an open file type
1551  # @return XHTML code as a a unicode string
1552  #
1553  def odf2xhtml(self, odffile):
1554  assert(type(odffile)==type(u"") or 'rb' in repr(odffile) or 'BufferedReader' in repr(odffile) or 'BytesIO' in repr(odffile))
1555 
1556 
1557  self.load(odffile)
1558 
1559  result=self.xhtml()
1560  assert(type(result)==type(u""))
1561  return result
1562 
1563  def _wlines(self,s):
1564  if s != '': self.lines.append(s)
1565 
1566  ##
1567  # Returns the xhtml
1568  #
1569  def xhtml(self):
1570  return ''.join(self.lines)
1571 
1572  def _writecss(self, s):
1573  if s != '': self._csslines.append(s)
1574 
1575  def _writenothing(self, s):
1576  pass
1577 
1578  ##
1579  # Returns the CSS content
1580  def css(self):
1581  self._csslines = []
1582  self._wfunc = self._writecss
1583  self.generate_stylesheet()
1584  res = ''.join(self._csslines)
1585  self._wfunc = self._wlines
1586  del self._csslines
1587  return res
1588 
1589  ##
1590  # Save the HTML under the filename.
1591  # If the filename is '-' then save to stdout
1592  # We have the last style filename in self.stylefilename
1593  #
1594  def save(self, outputfile, addsuffix=False):
1595  if outputfile == '-':
1596  outputfp = sys.stdout
1597  else:
1598  if addsuffix:
1599  outputfile = outputfile + ".html"
1600  outputfp = file(outputfile, "w")
1601  outputfp.write(self.xhtml().encode('us-ascii','xmlcharrefreplace'))
1602  outputfp.close()
1603 
1604 
1605 ##
1606 # The ODF2XHTML parses an ODF file and produces XHTML
1608 
1609  def __init__(self, lines, generate_css=True, embedable=False):
1610  self._resetobject()
1611  self.lines = lines
1612 
1613  # Tags
1614  self.generate_css = generate_css
1615  self.elements = {
1616 # (DCNS, 'title'): (self.s_processcont, self.e_dc_title),
1617 # (DCNS, 'language'): (self.s_processcont, self.e_dc_contentlanguage),
1618 # (DCNS, 'creator'): (self.s_processcont, self.e_dc_metatag),
1619 # (DCNS, 'description'): (self.s_processcont, self.e_dc_metatag),
1620 # (DCNS, 'date'): (self.s_processcont, self.e_dc_metatag),
1621  (DRAWNS, 'frame'): (self.s_draw_frame, self.e_draw_frame),
1622  (DRAWNS, 'image'): (self.s_draw_image, None),
1623  (DRAWNS, 'fill-image'): (self.s_draw_fill_image, None),
1624  (DRAWNS, "layer-set"):(self.s_ignorexml, None),
1625  (DRAWNS, 'page'): (self.s_draw_page, self.e_draw_page),
1626  (DRAWNS, 'object'): (self.s_draw_object, None),
1627  (DRAWNS, 'object-ole'): (self.s_draw_object_ole, None),
1628  (DRAWNS, 'text-box'): (self.s_draw_textbox, self.e_draw_textbox),
1629 # (METANS, 'creation-date'):(self.s_processcont, self.e_dc_metatag),
1630 # (METANS, 'generator'):(self.s_processcont, self.e_dc_metatag),
1631 # (METANS, 'initial-creator'): (self.s_processcont, self.e_dc_metatag),
1632 # (METANS, 'keyword'): (self.s_processcont, self.e_dc_metatag),
1633  (NUMBERNS, "boolean-style"):(self.s_ignorexml, None),
1634  (NUMBERNS, "currency-style"):(self.s_ignorexml, None),
1635  (NUMBERNS, "date-style"):(self.s_ignorexml, None),
1636  (NUMBERNS, "number-style"):(self.s_ignorexml, None),
1637  (NUMBERNS, "text-style"):(self.s_ignorexml, None),
1638 # (OFFICENS, "automatic-styles"):(self.s_office_automatic_styles, None),
1639 # (OFFICENS, "document-content"):(self.s_office_document_content, self.e_office_document_content),
1640  (OFFICENS, "forms"):(self.s_ignorexml, None),
1641 # (OFFICENS, "master-styles"):(self.s_office_master_styles, None),
1642  (OFFICENS, "meta"):(self.s_ignorecont, None),
1643 # (OFFICENS, "presentation"):(self.s_office_presentation, self.e_office_presentation),
1644 # (OFFICENS, "spreadsheet"):(self.s_office_spreadsheet, self.e_office_spreadsheet),
1645 # (OFFICENS, "styles"):(self.s_office_styles, None),
1646 # (OFFICENS, "text"):(self.s_office_text, self.e_office_text),
1647  (OFFICENS, "scripts"):(self.s_ignorexml, None),
1648  (PRESENTATIONNS, "notes"):(self.s_ignorexml, None),
1649 ## (STYLENS, "default-page-layout"):(self.s_style_default_page_layout, self.e_style_page_layout),
1650 # (STYLENS, "default-page-layout"):(self.s_ignorexml, None),
1651 # (STYLENS, "default-style"):(self.s_style_default_style, self.e_style_default_style),
1652 # (STYLENS, "drawing-page-properties"):(self.s_style_handle_properties, None),
1653 # (STYLENS, "font-face"):(self.s_style_font_face, None),
1654 ## (STYLENS, "footer"):(self.s_style_footer, self.e_style_footer),
1655 ## (STYLENS, "footer-style"):(self.s_style_footer_style, None),
1656 # (STYLENS, "graphic-properties"):(self.s_style_handle_properties, None),
1657 # (STYLENS, "handout-master"):(self.s_ignorexml, None),
1658 ## (STYLENS, "header"):(self.s_style_header, self.e_style_header),
1659 ## (STYLENS, "header-footer-properties"):(self.s_style_handle_properties, None),
1660 ## (STYLENS, "header-style"):(self.s_style_header_style, None),
1661 # (STYLENS, "master-page"):(self.s_style_master_page, None),
1662 # (STYLENS, "page-layout-properties"):(self.s_style_handle_properties, None),
1663 ## (STYLENS, "page-layout"):(self.s_style_page_layout, self.e_style_page_layout),
1664 # (STYLENS, "page-layout"):(self.s_ignorexml, None),
1665 # (STYLENS, "paragraph-properties"):(self.s_style_handle_properties, None),
1666 # (STYLENS, "style"):(self.s_style_style, self.e_style_style),
1667 # (STYLENS, "table-cell-properties"):(self.s_style_handle_properties, None),
1668 # (STYLENS, "table-column-properties"):(self.s_style_handle_properties, None),
1669 # (STYLENS, "table-properties"):(self.s_style_handle_properties, None),
1670 # (STYLENS, "text-properties"):(self.s_style_handle_properties, None),
1671  (SVGNS, 'desc'): (self.s_ignorexml, None),
1672  (TABLENS, 'covered-table-cell'): (self.s_ignorexml, None),
1673  (TABLENS, 'table-cell'): (self.s_table_table_cell, self.e_table_table_cell),
1674  (TABLENS, 'table-column'): (self.s_table_table_column, None),
1675  (TABLENS, 'table-row'): (self.s_table_table_row, self.e_table_table_row),
1676  (TABLENS, 'table'): (self.s_table_table, self.e_table_table),
1677  (TEXTNS, 'a'): (self.s_text_a, self.e_text_a),
1678  (TEXTNS, "alphabetical-index-source"):(self.s_text_x_source, self.e_text_x_source),
1679  (TEXTNS, "bibliography-configuration"):(self.s_ignorexml, None),
1680  (TEXTNS, "bibliography-source"):(self.s_text_x_source, self.e_text_x_source),
1681  (TEXTNS, 'h'): (self.s_text_h, self.e_text_h),
1682  (TEXTNS, "illustration-index-source"):(self.s_text_x_source, self.e_text_x_source),
1683  (TEXTNS, 'line-break'):(self.s_text_line_break, None),
1684  (TEXTNS, "linenumbering-configuration"):(self.s_ignorexml, None),
1685  (TEXTNS, "list"):(self.s_text_list, self.e_text_list),
1686  (TEXTNS, "list-item"):(self.s_text_list_item, self.e_text_list_item),
1687  (TEXTNS, "list-level-style-bullet"):(self.s_text_list_level_style_bullet, self.e_text_list_level_style_bullet),
1688  (TEXTNS, "list-level-style-number"):(self.s_text_list_level_style_number, self.e_text_list_level_style_number),
1689  (TEXTNS, "list-style"):(None, None),
1690  (TEXTNS, "note"):(self.s_text_note, None),
1691  (TEXTNS, "note-body"):(self.s_text_note_body, self.e_text_note_body),
1692  (TEXTNS, "note-citation"):(None, self.e_text_note_citation),
1693  (TEXTNS, "notes-configuration"):(self.s_ignorexml, None),
1694  (TEXTNS, "object-index-source"):(self.s_text_x_source, self.e_text_x_source),
1695  (TEXTNS, 'p'): (self.s_text_p, self.e_text_p),
1696  (TEXTNS, 's'): (self.s_text_s, None),
1697  (TEXTNS, 'span'): (self.s_text_span, self.e_text_span),
1698  (TEXTNS, 'tab'): (self.s_text_tab, None),
1699  (TEXTNS, "table-index-source"):(self.s_text_x_source, self.e_text_x_source),
1700  (TEXTNS, "table-of-content-source"):(self.s_text_x_source, self.e_text_x_source),
1701  (TEXTNS, "user-index-source"):(self.s_text_x_source, self.e_text_x_source),
1702  (TEXTNS, "page-number"):(None, None),
1703  }
1704 
def xhtml
Returns the xhtml.
Definition: odf2xhtml.py:1569
def e_draw_textbox
End the
Definition: odf2xhtml.py:839
def opentag
Create an open HTML tag.
Definition: odf2xhtml.py:540
def e_text_x_source
Various indexes and tables of contents.
Definition: odf2xhtml.py:1504
def set_embedable
Tells the converter to only output the parts inside the
Definition: odf2xhtml.py:474
def c_page_width
Set width of box HTML doesn't really have a page-width.
Definition: odf2xhtml.py:253
def e_dc_creator
Set the content creator.
Definition: odf2xhtml.py:674
def c_text_underline_style
Set underline decoration HTML doesn't really have a page-width.
Definition: odf2xhtml.py:260
def e_dc_metatag
Any other meta data is added as a element.
Definition: odf2xhtml.py:659
def s_ignorecont
Stop processing the text nodes.
Definition: odf2xhtml.py:615
def c_border_model
Convert to CSS2 border model.
Definition: odf2xhtml.py:146
def convert_styles
Rule is a tuple of (namespace, name).
Definition: odf2xhtml.py:281
def s_draw_object
A is embedded object in the document (e.g.
Definition: odf2xhtml.py:785
def s_draw_object_ole
A is embedded OLE object in the document (e.g.
Definition: odf2xhtml.py:800
def e_text_p
End Paragraph.
Definition: odf2xhtml.py:1441
def s_text_tab
Move to the next tabstop.
Definition: odf2xhtml.py:1488
def s_style_font_face
It is possible that the HTML browser doesn't know how to show a particular font.
Definition: odf2xhtml.py:1002
def s_draw_frame
A is made into a in HTML which is then styled.
Definition: odf2xhtml.py:720
def s_style_master_page
Collect the formatting for the page layout style.
Definition: odf2xhtml.py:1065
def e_text_list
End a list.
Definition: odf2xhtml.py:1309
def s_style_default_page_layout
Collect the formatting for the default page layout style.
Definition: odf2xhtml.py:1039
def e_dc_title
Get the title from the meta data and create a HTML </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00651">odf2xhtml.py:651</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_abfce093d8d52eb934920ac81406e6245"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#abfce093d8d52eb934920ac81406e6245">odf.odf2xhtml.ODF2XHTML.s_style_page_layout</a></div><div class="ttdeci">def s_style_page_layout</div><div class="ttdoc">Collect the formatting for the page layout style. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01049">odf2xhtml.py:1049</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a6f209dc272b2df70f9556178c8d8db97"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a6f209dc272b2df70f9556178c8d8db97">odf.odf2xhtml.ODF2XHTML.generate_footnotes</a></div><div class="ttdeci">def generate_footnotes</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00889">odf2xhtml.py:889</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1StyleToCSS_html_a59dfb75146e43ea1cf6ba7c9e8ba3573"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1StyleToCSS.html#a59dfb75146e43ea1cf6ba7c9e8ba3573">odf.odf2xhtml.StyleToCSS.c_page_height</a></div><div class="ttdeci">def c_page_height</div><div class="ttdoc">Set height of box. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00274">odf2xhtml.py:274</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a096fd2025dd1ea4c614970070880826c"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a096fd2025dd1ea4c614970070880826c">odf.odf2xhtml.ODF2XHTML.e_text_list_item</a></div><div class="ttdeci">def e_text_list_item</div><div class="ttdoc">End list item. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01332">odf2xhtml.py:1332</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ad4f07d1de9d0b6d4f0802692271d7e54"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ad4f07d1de9d0b6d4f0802692271d7e54">odf.odf2xhtml.ODF2XHTML.s_custom_shape</a></div><div class="ttdeci">def s_custom_shape</div><div class="ttdoc">A <draw:custom-shape> is made into a in HTML which is then styled. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00682">odf2xhtml.py:682</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a58f1e2d5aa79075196d12ded2da6f94d"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a58f1e2d5aa79075196d12ded2da6f94d">odf.odf2xhtml.ODF2XHTML.metatags</a></div><div class="ttdeci">metatags</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00526">odf2xhtml.py:526</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a9d856aad6a3d0aca6eeaaff9eca1834a"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a9d856aad6a3d0aca6eeaaff9eca1834a">odf.odf2xhtml.ODF2XHTML.e_text_span</a></div><div class="ttdeci">def e_text_span</div><div class="ttdoc">End the <text:span> </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01480">odf2xhtml.py:1480</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a476bdcd2f9760b8446cc0291c96bebc3"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a476bdcd2f9760b8446cc0291c96bebc3">odf.odf2xhtml.ODF2XHTML.s_text_note</a></div><div class="ttdeci">def s_text_note</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01382">odf2xhtml.py:1382</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a788f24df6fbe5fef46f54eb2e6825747"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a788f24df6fbe5fef46f54eb2e6825747">odf.odf2xhtml.ODF2XHTML.e_office_text</a></div><div class="ttdeci">def e_office_text</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00964">odf2xhtml.py:964</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a65429f20547b22c904ecfac74e016c0b"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a65429f20547b22c904ecfac74e016c0b">odf.odf2xhtml.ODF2XHTML.listtypes</a></div><div class="ttdeci">listtypes</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00512">odf2xhtml.py:512</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a9ee26dcf1feb3df0f12c4d8002d4e32c"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a9ee26dcf1feb3df0f12c4d8002d4e32c">odf.odf2xhtml.ODF2XHTML.emptytag</a></div><div class="ttdeci">def emptytag</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00560">odf2xhtml.py:560</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ab28c3de247ce491898490f01ea677a97"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ab28c3de247ce491898490f01ea677a97">odf.odf2xhtml.ODF2XHTML.s_text_x_source</a></div><div class="ttdeci">def s_text_x_source</div><div class="ttdoc">Various indexes and tables of contents. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01496">odf2xhtml.py:1496</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1TagStack_html_aaae1a628e6193972fde0bce41d237cfb"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1TagStack.html#aaae1a628e6193972fde0bce41d237cfb">odf.odf2xhtml.TagStack.count_tags</a></div><div class="ttdeci">def count_tags</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00326">odf2xhtml.py:326</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a594ecf8ef3da1464e5b6d37a7f3875fb"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a594ecf8ef3da1464e5b6d37a7f3875fb">odf.odf2xhtml.ODF2XHTML.e_text_h</a></div><div class="ttdeci">def e_text_h</div><div class="ttdoc">Headings end Side-effect: If there is no title in the metadata, then it is taken from the first headi...</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01263">odf2xhtml.py:1263</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1StyleToCSS_html_ac802a5289202cbcbc757a31058a64cba"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1StyleToCSS.html#ac802a5289202cbcbc757a31058a64cba">odf.odf2xhtml.StyleToCSS.c_fo</a></div><div class="ttdeci">def c_fo</div><div class="ttdoc">XSL formatting attributes. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00140">odf2xhtml.py:140</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_acccf7cc6c32933e21b51bdecc90cfad5"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#acccf7cc6c32933e21b51bdecc90cfad5">odf.odf2xhtml.ODF2XHTML.s_office_master_styles</a></div><div class="ttdeci">def s_office_master_styles</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00932">odf2xhtml.py:932</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a2c0009aefeaa32a4aebf651241ec6457"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a2c0009aefeaa32a4aebf651241ec6457">odf.odf2xhtml.ODF2XHTML.e_table_table_row</a></div><div class="ttdeci">def e_table_table_row</div><div class="ttdoc">End a table row. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01200">odf2xhtml.py:1200</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1StyleToCSS_html_a8b624e6ed4d31d0e947239db1036e92c"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1StyleToCSS.html#a8b624e6ed4d31d0e947239db1036e92c">odf.odf2xhtml.StyleToCSS.fillimages</a></div><div class="ttdeci">fillimages</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00069">odf2xhtml.py:69</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ae0d89428e18dc8851d750d041829b200"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ae0d89428e18dc8851d750d041829b200">odf.odf2xhtml.ODF2XHTML.pstack</a></div><div class="ttdeci">pstack</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00509">odf2xhtml.py:509</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a890c41a8565eca9b70fe2c350048f04b"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a890c41a8565eca9b70fe2c350048f04b">odf.odf2xhtml.ODF2XHTML.s_text_list_item</a></div><div class="ttdeci">def s_text_list_item</div><div class="ttdoc">Start list item. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01326">odf2xhtml.py:1326</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1StyleToCSS_html_aa278feb4f768a5252db842a634e6aa40"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1StyleToCSS.html#aa278feb4f768a5252db842a634e6aa40">odf.odf2xhtml.StyleToCSS.c_drawfillimage</a></div><div class="ttdeci">def c_drawfillimage</div><div class="ttdoc">Fill a figure with an image. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00135">odf2xhtml.py:135</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1StyleToCSS_html_ade04405816e9c1910d3c838da3268e8f"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1StyleToCSS.html#ade04405816e9c1910d3c838da3268e8f">odf.odf2xhtml.StyleToCSS.save_font</a></div><div class="ttdeci">def save_font</div><div class="ttdoc">It is possible that the HTML browser doesn't know how to show a particular font. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00120">odf2xhtml.py:120</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a302ff4588ab242e144727d76160985d5"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a302ff4588ab242e144727d76160985d5">odf.odf2xhtml.ODF2XHTML.autoprefix</a></div><div class="ttdeci">autoprefix</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00909">odf2xhtml.py:909</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a3e284651f634c7b7dcae4b1e50ef7c40"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a3e284651f634c7b7dcae4b1e50ef7c40">odf.odf2xhtml.ODF2XHTML.s_text_span</a></div><div class="ttdeci">def s_text_span</div><div class="ttdoc">The <text:span> element matches the element in HTML. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01466">odf2xhtml.py:1466</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a4107eb14ee53672b15f8cc11e9ac0276"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a4107eb14ee53672b15f8cc11e9ac0276">odf.odf2xhtml.ODF2XHTML.notebody</a></div><div class="ttdeci">notebody</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00497">odf2xhtml.py:497</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_af625ed9b5834db2c29c991757b601952"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#af625ed9b5834db2c29c991757b601952">odf.odf2xhtml.ODF2XHTML.writedata</a></div><div class="ttdeci">def writedata</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00533">odf2xhtml.py:533</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1TagStack_html"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1TagStack.html">odf.odf2xhtml.TagStack</a></div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00304">odf2xhtml.py:304</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1TagStack_html_a12761df2041ffb3004ab1d7b97193db5"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1TagStack.html#a12761df2041ffb3004ab1d7b97193db5">odf.odf2xhtml.TagStack.pop</a></div><div class="ttdeci">def pop</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00311">odf2xhtml.py:311</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a33674047bdb1e09e4a63c82ec6f91573"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a33674047bdb1e09e4a63c82ec6f91573">odf.odf2xhtml.ODF2XHTML.load</a></div><div class="ttdeci">def load</div><div class="ttdoc">Loads a document into the parser and parses it. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01522">odf2xhtml.py:1522</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_afab81358931922b2cf7a9cfd5554968d"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#afab81358931922b2cf7a9cfd5554968d">odf.odf2xhtml.ODF2XHTML.s_draw_image</a></div><div class="ttdeci">def s_draw_image</div><div class="ttdoc">A <draw:image> becomes an element. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00771">odf2xhtml.py:771</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a351b7e1b5b75f469f52a9bc054b4c0b7"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a351b7e1b5b75f469f52a9bc054b4c0b7">odf.odf2xhtml.ODF2XHTML.purgedata</a></div><div class="ttdeci">def purgedata</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00640">odf2xhtml.py:640</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a4b3b1cb31b1314eb5f311f9743f7402e"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a4b3b1cb31b1314eb5f311f9743f7402e">odf.odf2xhtml.ODF2XHTML.rewritelink</a></div><div class="ttdeci">def rewritelink</div><div class="ttdoc">Intended to be overloaded if you don't store your pictures in a Pictures subfolder. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00765">odf2xhtml.py:765</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ac17dd4b6c57cb1157445d4fcc3aee9e1"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ac17dd4b6c57cb1157445d4fcc3aee9e1">odf.odf2xhtml.ODF2XHTML.s_text_p</a></div><div class="ttdeci">def s_text_p</div><div class="ttdoc">Paragraph. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01424">odf2xhtml.py:1424</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a41cf2a9afe50a7b44a3ba228c3146bc3"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a41cf2a9afe50a7b44a3ba228c3146bc3">odf.odf2xhtml.ODF2XHTML.handle_endtag</a></div><div class="ttdeci">def handle_endtag</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00597">odf2xhtml.py:597</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_aaacf1ec312513c60f704e9f9d774915c"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#aaacf1ec312513c60f704e9f9d774915c">odf.odf2xhtml.ODF2XHTML.htmlstack</a></div><div class="ttdeci">htmlstack</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00508">odf2xhtml.py:508</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a79246cebb059ae5bdadabaafcdf78b63"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a79246cebb059ae5bdadabaafcdf78b63">odf.odf2xhtml.ODF2XHTML.e_style_default_style</a></div><div class="ttdeci">def e_style_default_style</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00992">odf2xhtml.py:992</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_aa6e54ac722aed4b5fea0645fdd7e80c0"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#aa6e54ac722aed4b5fea0645fdd7e80c0">odf.odf2xhtml.ODF2XHTML.generate_css</a></div><div class="ttdeci">generate_css</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00366">odf2xhtml.py:366</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ac0b77e6c1bab706b2ec96c5b27597ca5"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ac0b77e6c1bab706b2ec96c5b27597ca5">odf.odf2xhtml.ODF2XHTML.cs</a></div><div class="ttdeci">cs</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00515">odf2xhtml.py:515</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ac7e3278561ca691900a4efe6ded8269b"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ac7e3278561ca691900a4efe6ded8269b">odf.odf2xhtml.ODF2XHTML.s_style_style</a></div><div class="ttdeci">def s_style_style</div><div class="ttdoc">Collect the formatting for the style. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01097">odf2xhtml.py:1097</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_aad5f96d0cca9639d3dc8166553557427"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#aad5f96d0cca9639d3dc8166553557427">odf.odf2xhtml.ODF2XHTML.odf2xhtml</a></div><div class="ttdeci">def odf2xhtml</div><div class="ttdoc">Load a file and return the XHTML. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01553">odf2xhtml.py:1553</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_aeb37ac2c1802fa9811626ff65d456e31"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#aeb37ac2c1802fa9811626ff65d456e31">odf.odf2xhtml.ODF2XHTML.endElementNS</a></div><div class="ttdeci">def endElementNS</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00583">odf2xhtml.py:583</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a0f1d6dc0b0e9cd9b30a20e2c6e8f3e52"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a0f1d6dc0b0e9cd9b30a20e2c6e8f3e52">odf.odf2xhtml.ODF2XHTML.e_text_note</a></div><div class="ttdeci">def e_text_note</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01389">odf2xhtml.py:1389</a></div></div> <div class="ttc" id="namespaceodf_1_1element_html_a9474456bb442e238b32a7bdf6a22dcba"><div class="ttname"><a href="namespaceodf_1_1element.html#a9474456bb442e238b32a7bdf6a22dcba">odf.element.unicode</a></div><div class="ttdeci">unicode</div><div class="ttdef"><b>Definition:</b> <a href="element_8py_source.html#l00034">element.py:34</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a4b62c330ad474bfc40c4c926fc9cd0c3"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a4b62c330ad474bfc40c4c926fc9cd0c3">odf.odf2xhtml.ODF2XHTML.styledict</a></div><div class="ttdeci">styledict</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00520">odf2xhtml.py:520</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a8a83f5c682bdbeb1d804ebfe7afbd90f"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a8a83f5c682bdbeb1d804ebfe7afbd90f">odf.odf2xhtml.ODF2XHTML.save</a></div><div class="ttdeci">def save</div><div class="ttdoc">Save the HTML under the filename. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01594">odf2xhtml.py:1594</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1TagStack_html_a3ea03cd9a6ce9dc7a1624ae7ada9e4cf"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1TagStack.html#a3ea03cd9a6ce9dc7a1624ae7ada9e4cf">odf.odf2xhtml.TagStack.rfindattr</a></div><div class="ttdeci">def rfindattr</div><div class="ttdoc">Find a tag with the given attribute. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00321">odf2xhtml.py:321</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ac5a2860e5b34c6ef9e92c6c4a3123810"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ac5a2860e5b34c6ef9e92c6c4a3123810">odf.odf2xhtml.ODF2XHTML.s_text_h</a></div><div class="ttdeci">def s_text_h</div><div class="ttdoc">Headings start. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01243">odf2xhtml.py:1243</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1TagStack_html_a445684cfc8bfc9e2a6dd6800119d33fc"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1TagStack.html#a445684cfc8bfc9e2a6dd6800119d33fc">odf.odf2xhtml.TagStack.stack</a></div><div class="ttdeci">stack</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00306">odf2xhtml.py:306</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_acf4575c8d15a8191a0f208af3edae66d"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#acf4575c8d15a8191a0f208af3edae66d">odf.odf2xhtml.ODF2XHTML.stylefilename</a></div><div class="ttdeci">stylefilename</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00487">odf2xhtml.py:487</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1StyleToCSS_html_aa3c6d04e9324bfedb7776d11f76e5142"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1StyleToCSS.html#aa3c6d04e9324bfedb7776d11f76e5142">odf.odf2xhtml.StyleToCSS.c_text_line_through_style</a></div><div class="ttdeci">def c_text_line_through_style</div><div class="ttdoc">Set underline decoration HTML doesn't really have a page-width. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00268">odf2xhtml.py:268</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ab7bd4bc42e4f4416b2fe93926d62b7ea"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ab7bd4bc42e4f4416b2fe93926d62b7ea">odf.odf2xhtml.ODF2XHTML.e_dc_contentlanguage</a></div><div class="ttdeci">def e_dc_contentlanguage</div><div class="ttdoc">Set the content language. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00666">odf2xhtml.py:666</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a75bf881493ea564e61098142a2d78f84"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a75bf881493ea564e61098142a2d78f84">odf.odf2xhtml.ODF2XHTML.s_text_list</a></div><div class="ttdeci">def s_text_list</div><div class="ttdoc">Start a list (. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01290">odf2xhtml.py:1290</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a35fa261d7ce57bba131d88104caa784a"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a35fa261d7ce57bba131d88104caa784a">odf.odf2xhtml.ODF2XHTML.css</a></div><div class="ttdeci">def css</div><div class="ttdoc">Returns the CSS content. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01580">odf2xhtml.py:1580</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1StyleToCSS_html_abbf3b4ba96b5c3192a4fe55b768a0445"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1StyleToCSS.html#abbf3b4ba96b5c3192a4fe55b768a0445">odf.odf2xhtml.StyleToCSS.fontdict</a></div><div class="ttdeci">fontdict</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00066">odf2xhtml.py:66</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a8417c235f667d915381905089debb1d1"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a8417c235f667d915381905089debb1d1">odf.odf2xhtml.ODF2XHTML.e_style_header</a></div><div class="ttdeci">def e_style_header</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01026">odf2xhtml.py:1026</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ac4bc0122912414ccea98cad09710686e"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ac4bc0122912414ccea98cad09710686e">odf.odf2xhtml.ODF2XHTML.s_text_line_break</a></div><div class="ttdeci">def s_text_line_break</div><div class="ttdoc">Force a line break ( ) </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01280">odf2xhtml.py:1280</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a946d65dea966349f82c6452a8ad06ca2"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a946d65dea966349f82c6452a8ad06ca2">odf.odf2xhtml.ODF2XHTML.headinglevels</a></div><div class="ttdeci">headinglevels</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00513">odf2xhtml.py:513</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTMLembedded_html_a1f4a9e1ecdb1204f5b750c2fc5917e06"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTMLembedded.html#a1f4a9e1ecdb1204f5b750c2fc5917e06">odf.odf2xhtml.ODF2XHTMLembedded.__init__</a></div><div class="ttdeci">def __init__</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01609">odf2xhtml.py:1609</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_aefec37ee1d0b9023ae8e5a22d6c289e1"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#aefec37ee1d0b9023ae8e5a22d6c289e1">odf.odf2xhtml.ODF2XHTML.e_office_presentation</a></div><div class="ttdeci">def e_office_presentation</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00944">odf2xhtml.py:944</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a21d717ff541974323a57d08f1ea7bf52"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a21d717ff541974323a57d08f1ea7bf52">odf.odf2xhtml.ODF2XHTML.s_draw_page</a></div><div class="ttdeci">def s_draw_page</div><div class="ttdoc">A <draw:page> is a slide in a presentation. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00812">odf2xhtml.py:812</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a95d3b118762f26e208304f3ed49063b1"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a95d3b118762f26e208304f3ed49063b1">odf.odf2xhtml.ODF2XHTML.s_style_default_style</a></div><div class="ttdeci">def s_style_default_style</div><div class="ttdoc">A default style is like a style on an HTML tag. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00985">odf2xhtml.py:985</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a803832f31cfdfeea1c4adf7a64c685cb"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a803832f31cfdfeea1c4adf7a64c685cb">odf.odf2xhtml.ODF2XHTML.html_body</a></div><div class="ttdeci">def html_body</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00842">odf2xhtml.py:842</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a49f1c77f30fb4f13ba9fbd834c68c5fb"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a49f1c77f30fb4f13ba9fbd834c68c5fb">odf.odf2xhtml.ODF2XHTML.s_text_a</a></div><div class="ttdeci">def s_text_a</div><div class="ttdoc">Anchors start. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01207">odf2xhtml.py:1207</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1StyleToCSS_html_aaa5fe16ebf02d9ad413bcf7f350d9f50"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1StyleToCSS.html#aaa5fe16ebf02d9ad413bcf7f350d9f50">odf.odf2xhtml.StyleToCSS.c_text_position</a></div><div class="ttdeci">def c_text_position</div><div class="ttdoc">Text position. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00195">odf2xhtml.py:195</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ae03e45d2c53ae14c46f7cbb3ebf3137f"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ae03e45d2c53ae14c46f7cbb3ebf3137f">odf.odf2xhtml.ODF2XHTML.s_text_list_level_style_bullet</a></div><div class="ttdeci">def s_text_list_level_style_bullet</div><div class="ttdoc">CSS doesn't have the ability to set the glyph to a particular character, so we just go through the av...</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01342">odf2xhtml.py:1342</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a70570542694dd8d18132eb5bf0d6314f"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a70570542694dd8d18132eb5bf0d6314f">odf.odf2xhtml.ODF2XHTML.s_table_table_cell</a></div><div class="ttdeci">def s_table_table_cell</div><div class="ttdoc">Start a table cell. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01151">odf2xhtml.py:1151</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_abe26e525a81964e1ca9851ec5dd4ff47"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#abe26e525a81964e1ca9851ec5dd4ff47">odf.odf2xhtml.ODF2XHTML.e_table_table_cell</a></div><div class="ttdeci">def e_table_table_cell</div><div class="ttdoc">End a table cell. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01170">odf2xhtml.py:1170</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_aac439ed467736770cb5d39587b02c370"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#aac439ed467736770cb5d39587b02c370">odf.odf2xhtml.ODF2XHTML.s_text_s</a></div><div class="ttdeci">def s_text_s</div><div class="ttdoc">Generate a number of spaces. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01457">odf2xhtml.py:1457</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ab92bb61c9d74eced51c5169942866c66"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ab92bb61c9d74eced51c5169942866c66">odf.odf2xhtml.ODF2XHTML.e_text_list_level_style_number</a></div><div class="ttdeci">def e_text_list_level_style_number</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01378">odf2xhtml.py:1378</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_af15fc249e395d62b54187f7d0295b140"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#af15fc249e395d62b54187f7d0295b140">odf.odf2xhtml.ODF2XHTML.e_custom_shape</a></div><div class="ttdeci">def e_custom_shape</div><div class="ttdoc">End the <draw:frame> </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00714">odf2xhtml.py:714</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a4a1ec5042410a956f416d2843a220b3a"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a4a1ec5042410a956f416d2843a220b3a">odf.odf2xhtml.ODF2XHTML.generate_stylesheet</a></div><div class="ttdeci">def generate_stylesheet</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00861">odf2xhtml.py:861</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1TagStack_html_a287c7a627bb09539c8ef89118d74c614"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1TagStack.html#a287c7a627bb09539c8ef89118d74c614">odf.odf2xhtml.TagStack.stackparent</a></div><div class="ttdeci">def stackparent</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00315">odf2xhtml.py:315</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a01c9fc7b546a51d34138689bc08ad423"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a01c9fc7b546a51d34138689bc08ad423">odf.odf2xhtml.ODF2XHTML.e_text_note_body</a></div><div class="ttdeci">def e_text_note_body</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01400">odf2xhtml.py:1400</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1StyleToCSS_html_a703a8b9ecab741226ba8ff32758e8b6d"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1StyleToCSS.html#a703a8b9ecab741226ba8ff32758e8b6d">odf.odf2xhtml.StyleToCSS.c_fn</a></div><div class="ttdeci">def c_fn</div><div class="ttdoc">Generate the CSS font family A generic font can be found in two ways. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00169">odf2xhtml.py:169</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a478a6884118151771e6c92f691d70685"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a478a6884118151771e6c92f691d70685">odf.odf2xhtml.ODF2XHTML.s_processcont</a></div><div class="ttdeci">def s_processcont</div><div class="ttdoc">Start processing the text nodes. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00620">odf2xhtml.py:620</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a9d3a13f16064ec5f8ed95b7a5391a990"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a9d3a13f16064ec5f8ed95b7a5391a990">odf.odf2xhtml.ODF2XHTML.s_text_bookmark_ref</a></div><div class="ttdeci">def s_text_bookmark_ref</div><div class="ttdoc">Bookmark reference. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01234">odf2xhtml.py:1234</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a197a08b0c02aeafe12761554a91500bb"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a197a08b0c02aeafe12761554a91500bb">odf.odf2xhtml.ODF2XHTML.s_draw_fill_image</a></div><div class="ttdeci">def s_draw_fill_image</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00755">odf2xhtml.py:755</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a43856079ee04e091b6b3f5d4bd8ade34"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a43856079ee04e091b6b3f5d4bd8ade34">odf.odf2xhtml.ODF2XHTML.e_draw_frame</a></div><div class="ttdeci">def e_draw_frame</div><div class="ttdoc">End the <draw:frame> </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00752">odf2xhtml.py:752</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a0c95380c2d3df7c17d1388280c3043ff"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a0c95380c2d3df7c17d1388280c3043ff">odf.odf2xhtml.ODF2XHTML.currentstyle</a></div><div class="ttdeci">currentstyle</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00521">odf2xhtml.py:521</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a669ce62f5eb6a5ed23b026e0f2c4e015"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a669ce62f5eb6a5ed23b026e0f2c4e015">odf.odf2xhtml.ODF2XHTML._writecss</a></div><div class="ttdeci">def _writecss</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01572">odf2xhtml.py:1572</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a9a816bc717f72330823785e2b6839200"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a9a816bc717f72330823785e2b6839200">odf.odf2xhtml.ODF2XHTML.e_draw_page</a></div><div class="ttdeci">def e_draw_page</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00826">odf2xhtml.py:826</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ab0c5043a9e27351390a5f96b7e4ee56f"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ab0c5043a9e27351390a5f96b7e4ee56f">odf.odf2xhtml.ODF2XHTML._csslines</a></div><div class="ttdeci">_csslines</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01581">odf2xhtml.py:1581</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_af3577d531508337a572dbf8ed0aa8815"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#af3577d531508337a572dbf8ed0aa8815">odf.odf2xhtml.ODF2XHTML.document</a></div><div class="ttdeci">document</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01528">odf2xhtml.py:1528</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a81094645caa9e4af42180c1cbff16295"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a81094645caa9e4af42180c1cbff16295">odf.odf2xhtml.ODF2XHTML.s_text_bookmark</a></div><div class="ttdeci">def s_text_bookmark</div><div class="ttdoc">Bookmark definition. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01224">odf2xhtml.py:1224</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html">odf.odf2xhtml.ODF2XHTML</a></div><div class="ttdoc">The ODF2XHTML parses an ODF file and produces XHTML. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00362">odf2xhtml.py:362</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a5e5bf87a3ece09dc2d6859b538c9b9c0"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a5e5bf87a3ece09dc2d6859b538c9b9c0">odf.odf2xhtml.ODF2XHTML.e_style_style</a></div><div class="ttdeci">def e_style_style</div><div class="ttdoc">End this style. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01126">odf2xhtml.py:1126</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a2c69d8e25a9d351f604594713fd89bd5"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a2c69d8e25a9d351f604594713fd89bd5">odf.odf2xhtml.ODF2XHTML.notedict</a></div><div class="ttdeci">notedict</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00495">odf2xhtml.py:495</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a1d97b9516606d6095871964ebb7d0be8"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a1d97b9516606d6095871964ebb7d0be8">odf.odf2xhtml.ODF2XHTML.unknown_starttag</a></div><div class="ttdeci">def unknown_starttag</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00600">odf2xhtml.py:600</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a463de3b9a7575f414be75a0c570f1620"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a463de3b9a7575f414be75a0c570f1620">odf.odf2xhtml.ODF2XHTML.get_anchor</a></div><div class="ttdeci">def get_anchor</div><div class="ttdoc">Create a unique anchor id for a href name. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00632">odf2xhtml.py:632</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a3470f2f7b7c9fec62de64e7573d4e2d4"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a3470f2f7b7c9fec62de64e7573d4e2d4">odf.odf2xhtml.ODF2XHTML.__init__</a></div><div class="ttdeci">def __init__</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00364">odf2xhtml.py:364</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a15f7208b86e2a914835c58900195053d"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a15f7208b86e2a914835c58900195053d">odf.odf2xhtml.ODF2XHTML.e_table_table</a></div><div class="ttdeci">def e_table_table</div><div class="ttdoc">End a table. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01144">odf2xhtml.py:1144</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_af65e51ca4c0dff1364d8afbb41fe0baf"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#af65e51ca4c0dff1364d8afbb41fe0baf">odf.odf2xhtml.ODF2XHTML.classname</a></div><div class="ttdeci">def classname</div><div class="ttdoc">Generate a class name from a style name. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00625">odf2xhtml.py:625</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_abee7006ba5a3ac42f272b2fe6a6bac44"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#abee7006ba5a3ac42f272b2fe6a6bac44">odf.odf2xhtml.ODF2XHTML.e_style_page_layout</a></div><div class="ttdeci">def e_style_page_layout</div><div class="ttdoc">End this style. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01059">odf2xhtml.py:1059</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_aa4517811274efe365e06423e6481f6f0"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#aa4517811274efe365e06423e6481f6f0">odf.odf2xhtml.ODF2XHTML.stylestack</a></div><div class="ttdeci">stylestack</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00519">odf2xhtml.py:519</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ab9f15ff72cc5a06c605b554ea208cde0"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ab9f15ff72cc5a06c605b554ea208cde0">odf.odf2xhtml.ODF2XHTML.data</a></div><div class="ttdeci">data</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00506">odf2xhtml.py:506</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1StyleToCSS_html_a7ae83ac40aab56410adf7f13279de6b9"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1StyleToCSS.html#a7ae83ac40aab56410adf7f13279de6b9">odf.odf2xhtml.StyleToCSS.c_hp</a></div><div class="ttdeci">def c_hp</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00207">odf2xhtml.py:207</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_aeb0c7130ee5ac5610e92dbcc49605c23"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#aeb0c7130ee5ac5610e92dbcc49605c23">odf.odf2xhtml.ODF2XHTML.default_styles</a></div><div class="ttdeci">string default_styles</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00854">odf2xhtml.py:854</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ae65220f931ff0152ee0a082a529a2ad7"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ae65220f931ff0152ee0a082a529a2ad7">odf.odf2xhtml.ODF2XHTML._resetfootnotes</a></div><div class="ttdeci">def _resetfootnotes</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00493">odf2xhtml.py:493</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTMLembedded_html"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTMLembedded.html">odf.odf2xhtml.ODF2XHTMLembedded</a></div><div class="ttdoc">The ODF2XHTML parses an ODF file and produces XHTML. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01607">odf2xhtml.py:1607</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a6563a63a5fa1849ba1936ca22b88dcad"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a6563a63a5fa1849ba1936ca22b88dcad">odf.odf2xhtml.ODF2XHTML.e_office_document_content</a></div><div class="ttdeci">def e_office_document_content</div><div class="ttdoc">Last tag. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00927">odf2xhtml.py:927</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ad060892881280fe7ac64a3deec144e7b"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ad060892881280fe7ac64a3deec144e7b">odf.odf2xhtml.ODF2XHTML.set_plain</a></div><div class="ttdeci">def set_plain</div><div class="ttdoc">Tell the parser to not generate CSS. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00469">odf2xhtml.py:469</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ab06ecdbc49f7f31d3c5274cb612af4e6"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ab06ecdbc49f7f31d3c5274cb612af4e6">odf.odf2xhtml.ODF2XHTML.elements</a></div><div class="ttdeci">elements</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00367">odf2xhtml.py:367</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ae998099d573b26bb4e129bce3cde4748"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ae998099d573b26bb4e129bce3cde4748">odf.odf2xhtml.ODF2XHTML.anchors</a></div><div class="ttdeci">anchors</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00516">odf2xhtml.py:516</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1StyleToCSS_html"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1StyleToCSS.html">odf.odf2xhtml.StyleToCSS</a></div><div class="ttdoc">The purpose of the StyleToCSS class is to contain the rules to convert ODF styles to CSS2...</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00062">odf2xhtml.py:62</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_af4aae69d4d252e3b2f42a6e6eb28ba69"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#af4aae69d4d252e3b2f42a6e6eb28ba69">odf.odf2xhtml.ODF2XHTML.closetag</a></div><div class="ttdeci">def closetag</div><div class="ttdoc">Close an open HTML tag. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00554">odf2xhtml.py:554</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a2a3f183ccb5d2c46020aa39d2950e973"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a2a3f183ccb5d2c46020aa39d2950e973">odf.odf2xhtml.ODF2XHTML.s_office_spreadsheet</a></div><div class="ttdeci">def s_office_spreadsheet</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00948">odf2xhtml.py:948</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ab4e4c31b772b8e9d99e1a3119aaa3156"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ab4e4c31b772b8e9d99e1a3119aaa3156">odf.odf2xhtml.ODF2XHTML.currentnote</a></div><div class="ttdeci">currentnote</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00496">odf2xhtml.py:496</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a611aac2522c193741f85f6c9150ed5ed"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a611aac2522c193741f85f6c9150ed5ed">odf.odf2xhtml.ODF2XHTML.s_office_text</a></div><div class="ttdeci">def s_office_text</div><div class="ttdoc">OpenDocument text. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00960">odf2xhtml.py:960</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a1e48d9dbb25393afd87f020a1c748e2e"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a1e48d9dbb25393afd87f020a1c748e2e">odf.odf2xhtml.ODF2XHTML.s_office_presentation</a></div><div class="ttdeci">def s_office_presentation</div><div class="ttdoc">For some odd reason, OpenOffice Impress doesn't define a default-style for the 'paragraph'. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00939">odf2xhtml.py:939</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_aa107d184668b5cd1173e177be166130e"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#aa107d184668b5cd1173e177be166130e">odf.odf2xhtml.ODF2XHTML._wfunc</a></div><div class="ttdeci">_wfunc</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00501">odf2xhtml.py:501</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a4a494589ec58282c53aa90771ef79675"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a4a494589ec58282c53aa90771ef79675">odf.odf2xhtml.ODF2XHTML.s_table_table</a></div><div class="ttdeci">def s_table_table</div><div class="ttdoc">Start a table. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01132">odf2xhtml.py:1132</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a003410d40c42ebe8b839c7ce44040784"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a003410d40c42ebe8b839c7ce44040784">odf.odf2xhtml.ODF2XHTML.s_table_table_row</a></div><div class="ttdeci">def s_table_table_row</div><div class="ttdoc">Start a table row. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01189">odf2xhtml.py:1189</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a17102782db8830ec98ba31c997f3bfa3"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a17102782db8830ec98ba31c997f3bfa3">odf.odf2xhtml.ODF2XHTML.s_style_handle_properties</a></div><div class="ttdeci">def s_style_handle_properties</div><div class="ttdoc">Copy all attributes to a struct. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00972">odf2xhtml.py:972</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_aa2eca5913f7c3d8be5a4adc50f5644ec"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#aa2eca5913f7c3d8be5a4adc50f5644ec">odf.odf2xhtml.ODF2XHTML.s_style_footer</a></div><div class="ttdeci">def s_style_footer</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01008">odf2xhtml.py:1008</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a69ab87f32fbf50f8ce6ec3b586948562"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a69ab87f32fbf50f8ce6ec3b586948562">odf.odf2xhtml.ODF2XHTML._resetobject</a></div><div class="ttdeci">def _resetobject</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00499">odf2xhtml.py:499</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a3cffe38f14e08fd6dd0605caee6b20a2"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a3cffe38f14e08fd6dd0605caee6b20a2">odf.odf2xhtml.ODF2XHTML.use_internal_css</a></div><div class="ttdeci">use_internal_css</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00486">odf2xhtml.py:486</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_aa4e2c84b2e60ef07ad9880bda747a861"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#aa4e2c84b2e60ef07ad9880bda747a861">odf.odf2xhtml.ODF2XHTML.e_office_spreadsheet</a></div><div class="ttdeci">def e_office_spreadsheet</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00951">odf2xhtml.py:951</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_abd8c7e8bef472dec466581f6cd37b6bc"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#abd8c7e8bef472dec466581f6cd37b6bc">odf.odf2xhtml.ODF2XHTML._walknode</a></div><div class="ttdeci">def _walknode</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01533">odf2xhtml.py:1533</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1TagStack_html_a91e555f66d1de8c871787d49ffe4956a"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1TagStack.html#a91e555f66d1de8c871787d49ffe4956a">odf.odf2xhtml.TagStack.__init__</a></div><div class="ttdeci">def __init__</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00305">odf2xhtml.py:305</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1StyleToCSS_html_a0b2d3701c891d53a1a8a17bee7b03ac4"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1StyleToCSS.html#a0b2d3701c891d53a1a8a17bee7b03ac4">odf.odf2xhtml.StyleToCSS.c_text_align</a></div><div class="ttdeci">def c_text_align</div><div class="ttdoc">Text align. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00159">odf2xhtml.py:159</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1StyleToCSS_html_a214c6b09e186940c35d887f21d8c973e"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1StyleToCSS.html#a214c6b09e186940c35d887f21d8c973e">odf.odf2xhtml.StyleToCSS.__init__</a></div><div class="ttdeci">def __init__</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00064">odf2xhtml.py:64</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a8bca7bd2ede86ab89e3d60b436180a4c"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a8bca7bd2ede86ab89e3d60b436180a4c">odf.odf2xhtml.ODF2XHTML.s_ignorexml</a></div><div class="ttdeci">def s_ignorexml</div><div class="ttdoc">Ignore this xml element and all children of it It will automatically stop ignoring. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00610">odf2xhtml.py:610</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_aacc6d73e15788899020cdb1b36fe6f9a"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#aacc6d73e15788899020cdb1b36fe6f9a">odf.odf2xhtml.ODF2XHTML.s_office_document_content</a></div><div class="ttdeci">def s_office_document_content</div><div class="ttdoc">First tag in the content.xml file. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00915">odf2xhtml.py:915</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a45fc529be927acd7bf87d5516d063256"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a45fc529be927acd7bf87d5516d063256">odf.odf2xhtml.ODF2XHTML.s_office_automatic_styles</a></div><div class="ttdeci">def s_office_automatic_styles</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00907">odf2xhtml.py:907</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a14a820640a82139efd06c6f5380bb53b"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a14a820640a82139efd06c6f5380bb53b">odf.odf2xhtml.ODF2XHTML.e_text_a</a></div><div class="ttdeci">def e_text_a</div><div class="ttdoc">End an anchor or bookmark reference. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01217">odf2xhtml.py:1217</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ab2998621813e4ad0f72e9ea8236a8174"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ab2998621813e4ad0f72e9ea8236a8174">odf.odf2xhtml.ODF2XHTML.s_table_table_column</a></div><div class="ttdeci">def s_table_table_column</div><div class="ttdoc">Start a table column. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01177">odf2xhtml.py:1177</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_abd32bff3904f69c2e065c6184e66c558"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#abd32bff3904f69c2e065c6184e66c558">odf.odf2xhtml.ODF2XHTML.s_style_header</a></div><div class="ttdeci">def s_style_header</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01022">odf2xhtml.py:1022</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1StyleToCSS_html_a3b736d004a014f44f9b4b0a785f6c521"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1StyleToCSS.html#a3b736d004a014f44f9b4b0a785f6c521">odf.odf2xhtml.StyleToCSS.c_width</a></div><div class="ttdeci">def c_width</div><div class="ttdoc">Set width of box. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00154">odf2xhtml.py:154</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ad7c0d41a99db32946e9dc48c323ff544"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ad7c0d41a99db32946e9dc48c323ff544">odf.odf2xhtml.ODF2XHTML.add_style_file</a></div><div class="ttdeci">def add_style_file</div><div class="ttdoc">Add a link to an external style file. </div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00485">odf2xhtml.py:485</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a982a04827cdc62e08e0eef40b5436cc9"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a982a04827cdc62e08e0eef40b5436cc9">odf.odf2xhtml.ODF2XHTML.tagstack</a></div><div class="ttdeci">tagstack</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00507">odf2xhtml.py:507</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ac25991fe248e114031e00ec0118b1fe2"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ac25991fe248e114031e00ec0118b1fe2">odf.odf2xhtml.ODF2XHTML.collectnote</a></div><div class="ttdeci">def collectnote</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01392">odf2xhtml.py:1392</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a30bd9cb7516fe224132e332c941cdf79"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a30bd9cb7516fe224132e332c941cdf79">odf.odf2xhtml.ODF2XHTML.s_style_header_style</a></div><div class="ttdeci">def s_style_header_style</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01031">odf2xhtml.py:1031</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_a2c49e30dd5748171bcb695393989191f"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#a2c49e30dd5748171bcb695393989191f">odf.odf2xhtml.ODF2XHTML.processelem</a></div><div class="ttdeci">processelem</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l00510">odf2xhtml.py:510</a></div></div> <div class="ttc" id="classodf_1_1odf2xhtml_1_1ODF2XHTML_html_ae9568b8626799b560059d7960e7df42b"><div class="ttname"><a href="classodf_1_1odf2xhtml_1_1ODF2XHTML.html#ae9568b8626799b560059d7960e7df42b">odf.odf2xhtml.ODF2XHTML.e_text_note_citation</a></div><div class="ttdeci">def e_text_note_citation</div><div class="ttdef"><b>Definition:</b> <a href="odf2xhtml_8py_source.html#l01406">odf2xhtml.py:1406</a></div></div> </div><!-- fragment --></div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="dir_d3e4a566b869afb68c42af9b8e3a2d5a.html">odf</a></li><li class="navelem"><a class="el" href="odf2xhtml_8py.html">odf2xhtml.py</a></li> <li class="footer">Generated on Tue Oct 28 2014 13:47:23 for ODFPY by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.7 </li> </ul> </div> </body> </html>