Fix traceback on Mac tests

This commit is contained in:
Tomas Groth 2019-05-29 21:18:25 +02:00
parent 38a310a1aa
commit 949231a35f
2 changed files with 5 additions and 3 deletions

View File

@ -42,7 +42,7 @@ from openlp.core.display.screens import ScreenList
from openlp.plugins.presentations.lib.presentationcontroller import PresentationController, PresentationDocument, \ from openlp.plugins.presentations.lib.presentationcontroller import PresentationController, PresentationDocument, \
TextType TextType
# Load the XSlideShowListener class so we can inherit from it
if is_win(): if is_win():
from win32com.client import Dispatch from win32com.client import Dispatch
import pywintypes import pywintypes
@ -75,6 +75,8 @@ else:
uno_available = True uno_available = True
except ImportError: except ImportError:
uno_available = False uno_available = False
class SlideShowListenerImport():
pass
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -145,8 +145,8 @@ class PowerpointDocument(PresentationDocument):
try: try:
if not self.controller.process: if not self.controller.process:
self.controller.start_process() self.controller.start_process()
self.controller.process.Presentations.Open(str(self.file_path), False, False, False) self.presentation = self.controller.process.Presentations.Open(str(self.file_path), False, False, False)
self.presentation = self.controller.process.Presentations(self.controller.process.Presentations.Count) log.debug('Loaded presentation %s' % self.presentation.FullName)
self.create_thumbnails() self.create_thumbnails()
self.create_titles_and_notes() self.create_titles_and_notes()
# Make sure powerpoint doesn't steal focus, unless we're on a single screen setup # Make sure powerpoint doesn't steal focus, unless we're on a single screen setup