Remove error trace if no impress

This commit is contained in:
Jonathan Corwin 2010-06-26 21:34:26 +01:00
parent 94f7190d50
commit 7cf31532b8
1 changed files with 12 additions and 7 deletions

View File

@ -42,9 +42,13 @@ from openlp.core.lib import resize_image
if os.name == u'nt':
from win32com.client import Dispatch
else:
import uno
from com.sun.star.beans import PropertyValue
try:
import uno
from com.sun.star.beans import PropertyValue
uno_available = True
except ImportError:
uno_available = False
from PyQt4 import QtCore
from presentationcontroller import PresentationController, PresentationDocument
@ -78,9 +82,7 @@ class ImpressController(PresentationController):
if os.name == u'nt':
return self.get_com_servicemanager() is not None
else:
# If not windows, and we've got this far then probably
# installed else the import uno would likely have failed
return True
return uno_available
def start_process(self):
"""
@ -322,7 +324,10 @@ class ImpressDocument(PresentationDocument):
Returns true if screen is blank
"""
log.debug(u'is blank OpenOffice')
return self.control.isPaused()
if self.control:
return self.control.isPaused()
else:
return False
def stop_presentation(self):
log.debug(u'stop presentation OpenOffice')