From b87820ca0991e9bcca87bc7c553757b1d32e4d68 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Fri, 29 Jul 2011 17:19:32 +0200 Subject: Don't break the wizard if there's an exception --- .../star/wizards/agenda/AgendaWizardDialogImpl.py | 27 ++++++++-------------- 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'wizards') diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py index bd6d176fd7ce..d27bd5b3cc9c 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py @@ -413,24 +413,16 @@ class AgendaWizardDialogImpl(AgendaWizardDialog): endWizard = False return False - self.agendaTemplate.xTextDocument.lockControllers() xTextDocument = self.agendaTemplate.document bSaveSuccess = OfficeDocument.store( self.xMSF, AgendaTemplate.xTextDocument, self.sPath, "writer8_template") - except Exception, e: - traceback.print_exc() - SystemDialog.showMessageBox( - self.xMSF, "ErrBox", OK, - self.resources.resErrSaveTemplate, self.xUnoDialog.Peer) - if bSaveSuccess: - try: + if bSaveSuccess: self.saveConfiguration() self.agendaTemplate.finish(self.topicsControl.scrollfields) - AgendaTemplate.xTextDocument.unlockControllers() loadValues = range(2) loadValues[0] = uno.createUnoStruct( \ 'com.sun.star.beans.PropertyValue') @@ -453,16 +445,15 @@ class AgendaWizardDialogImpl(AgendaWizardDialog): self.sPath, "_default", loadValues) myViewHandler = ViewHandler(self.xMSF, oDoc) myViewHandler.setViewSetting("ZoomType", OPTIMAL) - except Exception: - traceback.print_exc() + else: + pass - else: - AgendaTemplate.xTextDocument.unlockControllers() - return False - - if endWizard: - self.xUnoDialog.endExecute() - self.running = False + except Exception, e: + traceback.print_exc() + finally: + if endWizard: + self.xUnoDialog.endExecute() + self.running = False return True def closeDocument(self): -- cgit