DOCX Input: Fix error when converting DOCX file that contains only image based links and no text based links. Fixes #1263021 [Book failed to convert docx to ePub](https://bugs.launchpad.net/calibre/+bug/1263021)

This commit is contained in:
Kovid Goyal 2013-12-20 14:24:52 +05:30
parent ac3adb8a78
commit e586ce4f41
2 changed files with 2 additions and 2 deletions

View File

@ -184,7 +184,7 @@ class Images(object):
img = IMG(src='images/%s' % src) img = IMG(src='images/%s' % src)
img.set('alt', alt or 'Image') img.set('alt', alt or 'Image')
if link is not None: if link is not None:
self.links.append((img, link)) self.links.append((img, link, self.rid_map))
return img return img
def drawing_to_html(self, drawing, page): def drawing_to_html(self, drawing, page):

View File

@ -516,7 +516,7 @@ class Convert(object):
continue continue
span.set('href', url) span.set('href', url)
for img, link in self.images.links: for img, link, relationships_by_id in self.images.links:
parent = img.getparent() parent = img.getparent()
idx = parent.index(img) idx = parent.index(img)
a = A(img) a = A(img)