forked from openlp/openlp
Increase ooo verbosity to aid debugging
This commit is contained in:
parent
807b1f2be1
commit
cf0608cc45
@ -169,7 +169,7 @@ class ImpressController(PresentationController):
|
||||
try:
|
||||
return Dispatch(u'com.sun.star.ServiceManager')
|
||||
except pywintypes.com_error:
|
||||
log.warn(u'Failed to get COM service manager. '
|
||||
log.exception(u'Failed to get COM service manager. '
|
||||
u'Impress Controller has been disabled')
|
||||
return None
|
||||
|
||||
@ -257,7 +257,6 @@ class ImpressDocument(PresentationDocument):
|
||||
except:
|
||||
log.exception(u'Failed to load presentation %s' % url)
|
||||
return False
|
||||
|
||||
self.presentation = self.document.getPresentation()
|
||||
self.presentation.Display = \
|
||||
self.controller.plugin.renderManager.screens.current_display + 1
|
||||
@ -327,8 +326,7 @@ class ImpressDocument(PresentationDocument):
|
||||
self.presentation = None
|
||||
self.document.dispose()
|
||||
except:
|
||||
#We tried!
|
||||
pass
|
||||
log.exception("Closing presentation failed")
|
||||
self.document = None
|
||||
self.controller.remove_doc(self)
|
||||
|
||||
@ -339,13 +337,14 @@ class ImpressDocument(PresentationDocument):
|
||||
log.debug(u'is loaded OpenOffice')
|
||||
#print "is_loaded "
|
||||
if self.presentation is None or self.document is None:
|
||||
#print "no present or document"
|
||||
log.debug("is_loaded: no presentation or document")
|
||||
return False
|
||||
try:
|
||||
if self.document.getPresentation() is None:
|
||||
#print "no getPresentation"
|
||||
log.debug("getPresentation failed to find a presentation")
|
||||
return False
|
||||
except:
|
||||
log.exception("getPresentation failed to find a presentation")
|
||||
return False
|
||||
return True
|
||||
|
||||
|
@ -116,7 +116,7 @@ class OooImport(SongImport):
|
||||
+ u'socket,host=localhost,port=2002;' \
|
||||
+ u'urp;StarOffice.ComponentContext')
|
||||
except:
|
||||
pass
|
||||
log.exception("Failed to resolve uno connection")
|
||||
self.start_ooo_process()
|
||||
loop += 1
|
||||
manager = ctx.ServiceManager
|
||||
@ -143,7 +143,7 @@ class OooImport(SongImport):
|
||||
process.waitForStarted()
|
||||
self.process_started = True
|
||||
except:
|
||||
pass
|
||||
log.exception("start_ooo_process failed")
|
||||
|
||||
def open_ooo_file(self, filepath):
|
||||
"""
|
||||
@ -167,7 +167,7 @@ class OooImport(SongImport):
|
||||
self.import_wizard.incrementProgressBar(
|
||||
u'Processing file ' + filepath, 0)
|
||||
except:
|
||||
pass
|
||||
log.exception("open_ooo_file failed")
|
||||
return
|
||||
|
||||
def close_ooo_file(self):
|
||||
@ -232,4 +232,4 @@ class OooImport(SongImport):
|
||||
text += paratext + u'\n'
|
||||
songs = SongImport.process_songs_text(self.manager, text)
|
||||
for song in songs:
|
||||
song.finish()
|
||||
song.finish()
|
||||
|
Loading…
Reference in New Issue
Block a user