From b0081a68b071b8f65beb2a20e7b979957b7c39f3 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Wed, 18 Jun 2014 14:11:52 +0200 Subject: [PATCH] yet another go at minimizing ppt 2013 --- .../presentations/lib/powerpointcontroller.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/openlp/plugins/presentations/lib/powerpointcontroller.py b/openlp/plugins/presentations/lib/powerpointcontroller.py index 41fb43811..0898fd074 100644 --- a/openlp/plugins/presentations/lib/powerpointcontroller.py +++ b/openlp/plugins/presentations/lib/powerpointcontroller.py @@ -139,8 +139,13 @@ class PowerpointDocument(PresentationDocument): self.presentation.Application.ActiveWindow.WindowState = 2 except: log.error(u'this failed: "self.presentation.Application.ActiveWindow.WindowState = 2", trying option 2...') - log.error(sys.exc_info()[0]) - self.presentation.Application.WindowState = 2 + log.error(sys.exc_info()) + try: + self.presentation.Application.WindowState = 2 + except: + log.error(u'option 2 failed as well') + log.error(sys.exc_info()) + return True except pywintypes.com_error as e: log.error(u'PPT open failed') @@ -306,8 +311,12 @@ class PowerpointDocument(PresentationDocument): self.presentation.Application.ActiveWindow.WindowState = 2 except: log.error(u'this failed: "self.presentation.Application.ActiveWindow.WindowState = 2", trying option 2...') - log.error(sys.exc_info()[0]) - self.presentation.Application.WindowState = 2 + log.error(sys.exc_info()) + try: + self.presentation.Application.WindowState = 2 + except: + log.error(u'option 2 failed as well') + log.error(sys.exc_info()) def get_slide_number(self): """