~ubuntu-branches/debian/sid/calibre/sid

« back to all changes in this revision

Viewing changes to src/calibre/ebooks/docx/to_html.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2014-05-14 18:17:50 UTC
  • mfrom: (1.5.10)
  • Revision ID: package-import@ubuntu.com-20140514181750-xyrxqa47dbw0qfhu
Tags: 1.36.0+dfsg-1
* New upstream release:
  - Fixes editing of metadata (Closes: #741638)

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
        paras = []
98
98
 
99
99
        self.log.debug('Converting Word markup to HTML')
 
100
 
100
101
        self.read_page_properties(doc)
101
102
        self.current_rels = relationships_by_id
102
103
        for wp, page_properties in self.page_map.iteritems():
105
106
                p = self.convert_p(wp)
106
107
                self.body.append(p)
107
108
                paras.append(wp)
 
109
 
108
110
        self.read_block_anchors(doc)
109
111
        self.styles.apply_contextual_spacing(paras)
110
112
        # Apply page breaks at the start of every section, except the first
207
209
                    notes_header.set('class', '%s notes-header' % cls)
208
210
                break
209
211
 
 
212
        self.fields.polish_markup(self.object_map)
 
213
 
210
214
        self.log.debug('Cleaning up redundant markup generated by Word')
211
215
        self.cover_image = cleanup_markup(self.log, self.html, self.styles, self.dest_dir, self.detect_cover)
212
216
 
507
511
            spans = [rmap[r] for r in runs if r in rmap]
508
512
            if not spans:
509
513
                continue
 
514
            span = spans[0]
510
515
            if len(spans) > 1:
511
516
                span = self.wrap_elems(spans, SPAN())
512
517
            span.tag = 'a'
624
629
            if last_run[-1][1] == style:
625
630
                last_run.append((html_obj, style))
626
631
            else:
627
 
                self.framed.append((html_obj, style))
 
632
                self.framed[-1].append((html_obj, style))
628
633
        else:
629
634
            last_run.append((html_obj, style))
630
635