mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
DOCX Input: Dont ignore images that are present as fallbacks for a word drawing object. Fixes #2013972 [Pictures disappearing](https://bugs.launchpad.net/calibre/+bug/2013972)
This commit is contained in:
parent
bc14bc245a
commit
f4f265e6ec
@ -279,6 +279,13 @@ class Convert:
|
||||
if fallbacks:
|
||||
for choice in choices:
|
||||
ac.remove(choice)
|
||||
if len(fallbacks) == 1 and ac.getparent().tag.endswith('}r') and len(fallbacks[0]) == 1:
|
||||
q = fallbacks[0][0]
|
||||
if q.tag and (q.tag.endswith('}drawing') or q.tag.endswith('}pict')):
|
||||
p = ac.getparent()
|
||||
idx = p.index(ac)
|
||||
p.insert(idx, q)
|
||||
p.remove(ac)
|
||||
|
||||
def read_styles(self, relationships_by_type):
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user