fix: Handle NoneType error in MsPowerpointDocumentBackend (#1747)
fix:nonetyperror in pptx backend Signed-off-by: Bruno Rigal <bruno.rigal@probayes.com> Co-authored-by: Bruno Rigal <bruno.rigal@probayes.com>
This commit is contained in:
parent
df140227c3
commit
7a275c7637
@ -423,11 +423,14 @@ class MsPowerpointDocumentBackend(DeclarativeDocumentBackend, PaginatedDocumentB
|
|||||||
# Handle notes slide
|
# Handle notes slide
|
||||||
if slide.has_notes_slide:
|
if slide.has_notes_slide:
|
||||||
notes_slide = slide.notes_slide
|
notes_slide = slide.notes_slide
|
||||||
|
if notes_slide.notes_text_frame is not None:
|
||||||
notes_text = notes_slide.notes_text_frame.text.strip()
|
notes_text = notes_slide.notes_text_frame.text.strip()
|
||||||
if notes_text:
|
if notes_text:
|
||||||
bbox = BoundingBox(l=0, t=0, r=0, b=0)
|
bbox = BoundingBox(l=0, t=0, r=0, b=0)
|
||||||
prov = ProvenanceItem(
|
prov = ProvenanceItem(
|
||||||
page_no=slide_ind + 1, charspan=[0, len(notes_text)], bbox=bbox
|
page_no=slide_ind + 1,
|
||||||
|
charspan=[0, len(notes_text)],
|
||||||
|
bbox=bbox,
|
||||||
)
|
)
|
||||||
doc.add_text(
|
doc.add_text(
|
||||||
label=DocItemLabel.TEXT,
|
label=DocItemLabel.TEXT,
|
||||||
|
Loading…
Reference in New Issue
Block a user