[Libreoffice-commits] .: Branch 'feature/gsoc2011_wizards' - wizards/com
Xisco Fauli
xfauli at kemper.freedesktop.org
Fri Jul 29 08:19:54 PDT 2011
wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py | 27 +++-------
1 file changed, 9 insertions(+), 18 deletions(-)
New commits:
commit 5974d287077a9a23fd57422ba461d7bde3733fe2
Author: Xisco Fauli <anistenis at gmail.com>
Date: Fri Jul 29 17:19:32 2011 +0200
Don't break the wizard if there's an exception
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
index bd6d176..d27bd5b 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):
More information about the Libreoffice-commits
mailing list