mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-26 20:14:47 +00:00
fix(pptx): check if picture shape has an image attached (#1316)
Check if picture shape has an image attached in pptx backend Signed-off-by: Maksym Lysak <mly@zurich.ibm.com> Co-authored-by: Maksym Lysak <mly@zurich.ibm.com> Signed-off-by: Benichou <fbenichou@deloitte.ca>
This commit is contained in:
parent
78dab32819
commit
46fa6e5eb0
@ -392,9 +392,10 @@ class MsPowerpointDocumentBackend(DeclarativeDocumentBackend, PaginatedDocumentB
|
|||||||
self.handle_tables(shape, parent_slide, slide_ind, doc, slide_size)
|
self.handle_tables(shape, parent_slide, slide_ind, doc, slide_size)
|
||||||
if shape.shape_type == MSO_SHAPE_TYPE.PICTURE:
|
if shape.shape_type == MSO_SHAPE_TYPE.PICTURE:
|
||||||
# Handle Pictures
|
# Handle Pictures
|
||||||
self.handle_pictures(
|
if hasattr(shape, "image"):
|
||||||
shape, parent_slide, slide_ind, doc, slide_size
|
self.handle_pictures(
|
||||||
)
|
shape, parent_slide, slide_ind, doc, slide_size
|
||||||
|
)
|
||||||
# If shape doesn't have any text, move on to the next shape
|
# If shape doesn't have any text, move on to the next shape
|
||||||
if not hasattr(shape, "text"):
|
if not hasattr(shape, "text"):
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user