summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2011-07-29 17:19:32 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-18 02:57:44 +0200
commitb87820ca0991e9bcca87bc7c553757b1d32e4d68 (patch)
treef2ba606941a77a3ebc7aac1cb57df081e9d57038 /wizards
parenta1fd3a904f4daaeec7598891e77ac66949df4207 (diff)
Don't break the wizard if there's an exception
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py27
1 files changed, 9 insertions, 18 deletions
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):