From dceebb70e726f8d68dcf60880f66623e5a935570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=95=E5=8F=A3=E3=80=80=E8=89=AF=E4=B8=80?= Date: Tue, 19 Mar 2019 12:55:57 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9C=AA=E5=AE=9F=E8=A3=85=E3=81=AE?= =?UTF-8?q?=E3=82=AA=E3=83=BC=E3=83=88=E3=82=B7=E3=82=A7=E3=82=A4=E3=83=97?= =?UTF-8?q?=E3=81=8C=E3=83=86=E3=83=B3=E3=83=97=E3=83=AC=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=81=AB=E5=90=AB=E3=81=BE=E3=82=8C=E3=82=8B=E9=9A=9B=E3=81=AB?= =?UTF-8?q?=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=8C=E5=87=BA=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E5=AF=BE=E5=87=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pptx_template/text.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pptx_template/text.py b/pptx_template/text.py index da0f999..8548ec3 100644 --- a/pptx_template/text.py +++ b/pptx_template/text.py @@ -45,8 +45,16 @@ def search_first_el(text): def select_all_text_shapes(slide): - return [ s for s in slide.shapes if s.shape_type in [1,14,17] ] - + text_shapes = [] + for s in slide.shapes: + try: + shape_type = s.shape_type + if shape_type in [1, 14, 17]: + text_shapes.append(s) + except NotImplementedError: + # 未実装のオートシェイプなどの対応 + log.info("not implemented shape was detected.") + return text_shapes def select_all_tables(slide): return [ s.table for s in slide.shapes if isinstance(s, GraphicFrame) and s.shape_type == 19 ] From 795fdf2aa4ae573e6cb24e04c0d3013182077b23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=95=E5=8F=A3=E3=80=80=E8=89=AF=E4=B8=80?= Date: Tue, 19 Mar 2019 12:59:45 +0900 Subject: [PATCH 2/2] bump up version to 0.2.8 --- pptx_template/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pptx_template/__init__.py b/pptx_template/__init__.py index 0d6aff1..c0a052a 100644 --- a/pptx_template/__init__.py +++ b/pptx_template/__init__.py @@ -1,3 +1,3 @@ # # coding=utf-8 -__version__ = '0.2.7' +__version__ = '0.2.8'