diff options
author | Xisco Fauli <anistenis@gmail.com> | 2012-10-15 20:10:45 +0200 |
---|---|---|
committer | Xisco Fauli <anistenis@gmail.com> | 2012-10-15 23:58:15 +0200 |
commit | 201788d30508b7b9e04bdbd82ac10998fa8bd570 (patch) | |
tree | 77795853b8a6e415e02d18de56229d5d4b6200e0 /wizards | |
parent | pywizards: Add README explaining how to call a wizard remotely (diff) | |
download | core-201788d30508b7b9e04bdbd82ac10998fa8bd570.tar.gz core-201788d30508b7b9e04bdbd82ac10998fa8bd570.zip |
pyletter: Make call the wizard remotely possible
Change-Id: I6cf58bb25cc44118b086fbe1339aae2c4069416b
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py index ba72ea876bf1..a6f063636e8b 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py @@ -66,19 +66,20 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.NormPaths = [] @classmethod - def main(self, args): - ConnectStr = \ - "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" - xLocMSF = None + def main(self): + #Call the wizard remotely(see README) try: + ConnectStr = \ + "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" xLocMSF = Desktop.connect(ConnectStr) - except Exception, e: - traceback.print_exc() - - lw = LetterWizardDialogImpl(xLocMSF) - lw.startWizard(xLocMSF, None) - - def startWizard(self, xMSF, CurPropertyValue): + lw = LetterWizardDialogImpl(xLocMSF) + lw.startWizard(xLocMSF) + except Exception as e: + print ("Wizard failure exception " + str(type(e)) + + " message " + str(e) + " args " + str(e.args) + + traceback.format_exc()) + + def startWizard(self, xMSF): self.running = True try: #Number of steps on WizardDialog |