[Libreoffice-commits] .: Branch 'feature/gsoc2011_wizards' - 2 commits - wizards/com

Xisco Fauli xfauli at kemper.freedesktop.org
Mon Jun 20 07:53:34 PDT 2011


 wizards/com/sun/star/wizards/common/Configuration.py     |   17 +++++-------
 wizards/com/sun/star/wizards/common/Desktop.py           |   11 +++----
 wizards/com/sun/star/wizards/common/FileAccess.py        |    9 ++----
 wizards/com/sun/star/wizards/common/Helper.py            |   15 +++++-----
 wizards/com/sun/star/wizards/common/SystemDialog.py      |   11 +++----
 wizards/com/sun/star/wizards/fax/FaxDocument.py          |   17 +++++-------
 wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py |    6 ++--
 wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py  |   21 ++++++---------
 wizards/com/sun/star/wizards/ui/PathSelection.py         |    5 +--
 wizards/com/sun/star/wizards/ui/UnoDialog.py             |   10 +++----
 wizards/com/sun/star/wizards/ui/WizardDialog.py          |   15 +++++-----
 11 files changed, 63 insertions(+), 74 deletions(-)

New commits:
commit 289e3167c9790aa1bdfffff19774cdda8b7c7409
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Mon Jun 20 14:54:18 2011 +0200

    Fix message, salutation and grettings textbox

diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py
index b87a3af..680a9e3 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py
@@ -12,16 +12,16 @@ CHKUSEDATE_ITEM_CHANGED = "chkUseDateItemChanged"
 CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED = "chkUseCommunicationItemChanged"
 LSTCOMMUNICATIONTYPE_ACTION_PERFORMED = None # "lstCommunicationActionPerformed"
 LSTCOMMUNICATIONTYPE_ITEM_CHANGED = "lstCommunicationItemChanged"
-LSTCOMMUNICATIONTYPE_TEXT_CHANGED = None #"lstCommunicationTextChanged"
+LSTCOMMUNICATIONTYPE_TEXT_CHANGED = "lstCommunicationItemChanged"
 CHKUSESUBJECT_ITEM_CHANGED = "chkUseSubjectItemChanged"
 CHKUSESALUTATION_ITEM_CHANGED = "chkUseSalutationItemChanged"
 LSTSALUTATION_ACTION_PERFORMED = None # "lstSalutationActionPerformed"
 LSTSALUTATION_ITEM_CHANGED = "lstSalutationItemChanged"
-LSTSALUTATION_TEXT_CHANGED = None #"lstSalutationTextChanged"
+LSTSALUTATION_TEXT_CHANGED = "lstSalutationItemChanged"
 CHKUSEGREETING_ITEM_CHANGED = "chkUseGreetingItemChanged"
 LSTGREETING_ACTION_PERFORMED = None # "lstGreetingActionPerformed"
 LSTGREETING_ITEM_CHANGED = "lstGreetingItemChanged"
-LSTGREETING_TEXT_CHANGED = None #"lstGreetingTextChanged"
+LSTGREETING_TEXT_CHANGED = "lstGreetingItemChanged"
 CHKUSEFOOTER_ITEM_CHANGED = "chkUseFooterItemChanged"
 OPTSENDERPLACEHOLDER_ITEM_CHANGED = "optSenderPlaceholderItemChanged"
 OPTSENDERDEFINE_ITEM_CHANGED = "optSenderDefineItemChanged"
commit 411c7344aaba2949f738cfe6e5cee318fe3d8be3
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Mon Jun 20 14:20:37 2011 +0200

    Footer checkbox works correctly now.
    
    Others:
    - Replace all UnoException by python Exception

diff --git a/wizards/com/sun/star/wizards/common/Configuration.py b/wizards/com/sun/star/wizards/common/Configuration.py
index 88f853b..96385bf 100644
--- a/wizards/com/sun/star/wizards/common/Configuration.py
+++ b/wizards/com/sun/star/wizards/common/Configuration.py
@@ -1,5 +1,4 @@
 from PropertyNames import PropertyNames
-from com.sun.star.uno import Exception as UnoException
 from Helper import *
 import traceback
 import uno
@@ -73,7 +72,7 @@ class Configuration(object):
                 "org.openoffice.Setup/Product", False)
             ProductName = Helper.getUnoObjectbyName(oProdNameAccess, "ooName")
             return ProductName
-        except UnoException:
+        except Exception:
             traceback.print_exc()
             return None
 
@@ -86,7 +85,7 @@ class Configuration(object):
                 "org.openoffice.Setup/L10N/", False)
             sLocale = (String)
             Helper.getUnoObjectbyName(oMasterKey, "ooLocale")
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
 
         return sLocale
@@ -109,7 +108,7 @@ class Configuration(object):
                 "org.openoffice.Setup/L10N/", False)
             sLinguistic = Helper.getUnoObjectbyName(oMasterKey, "ooLocale")
             return sLinguistic
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
             return None
 
@@ -188,7 +187,7 @@ class Configuration(object):
 
                 i += 1
             return sdisplaynames
-        except UnoException, e:
+        except Exception, e:
             traceback.print_exc()
             return snames
 
@@ -198,7 +197,7 @@ class Configuration(object):
             snames = _xNameAccess.getElementNames()
             oNode = _xNameAccess.getByName(snames[_index])
             return oNode
-        except UnoException, e:
+        except Exception, e:
             traceback.print_exc()
             return None
 
@@ -208,7 +207,7 @@ class Configuration(object):
             if _xNameAccessNode.hasByName(_SubNodeName):
                 return _xNameAccessNode.getByName(_SubNodeName)
 
-        except UnoException, e:
+        except Exception, e:
             traceback.print_exc()
 
         return None
@@ -235,7 +234,7 @@ class Configuration(object):
                     return _xNameAccessNode.getByName(snames[i])
 
                 i += 1
-        except UnoException, e:
+        except Exception, e:
             traceback.print_exc()
 
         return None
@@ -263,7 +262,7 @@ class Configuration(object):
                     return _xNameAccessNode.getByName(snames[i])
 
                 i += 1
-        except UnoException, e:
+        except Exception, e:
             traceback.print_exc()
 
         return None
diff --git a/wizards/com/sun/star/wizards/common/Desktop.py b/wizards/com/sun/star/wizards/common/Desktop.py
index 81dab16..0bdf961 100644
--- a/wizards/com/sun/star/wizards/common/Desktop.py
+++ b/wizards/com/sun/star/wizards/common/Desktop.py
@@ -4,7 +4,6 @@ from com.sun.star.frame.FrameSearchFlag import ALL, PARENT
 from com.sun.star.util import URL
 from com.sun.star.i18n.KParseTokens import ANY_LETTER_OR_NUMBER, ASC_UNDERSCORE
 from NoValidPathException import *
-from com.sun.star.uno import Exception as UnoException
 
 
 class Desktop(object):
@@ -15,7 +14,7 @@ class Desktop(object):
         if xMSF is not None:
             try:
                 xDesktop = xMSF.createInstance( "com.sun.star.frame.Desktop")
-            except UnoException, exception:
+            except Exception, exception:
                 traceback.print_exc()
         else:
             print "Can't create a desktop. null pointer !"
@@ -49,7 +48,7 @@ class Desktop(object):
             oURLArray[0] = oURL
             xDispatch = xFrame.queryDispatch(oURLArray[0], _stargetframe, ALL)
             return xDispatch
-        except UnoException, e:
+        except Exception, e:
             e.printStackTrace(System.out)
 
         return None
@@ -64,7 +63,7 @@ class Desktop(object):
             oURL[0].Complete = _sURL
             xTransformer.parseStrict(oURL)
             return oURL[0]
-        except UnoException, e:
+        except Exception, e:
             e.printStackTrace(System.out)
 
         return None
@@ -102,7 +101,7 @@ class Desktop(object):
             aResult = ocharservice.parsePredefinedToken(KParseType.IDENTNAME,
                 _sString, 0, _aLocale, nStartFlags, "", nStartFlags, " ")
             return aResult.EndPos
-        except UnoException, e:
+        except Exception, e:
             e.printStackTrace(System.out)
             return -1
 
@@ -203,7 +202,7 @@ class Desktop(object):
                     "com.sun.star.configuration.ConfigurationAccess",
                     aNodePath)
 
-        except UnoException, exception:
+        except Exception, exception:
             exception.printStackTrace(System.out)
             return None
 
diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py
index 8c58091..8ac514a 100644
--- a/wizards/com/sun/star/wizards/common/FileAccess.py
+++ b/wizards/com/sun/star/wizards/common/FileAccess.py
@@ -1,7 +1,6 @@
 import traceback
 from NoValidPathException import *
 from com.sun.star.ucb import CommandAbortedException
-from com.sun.star.uno import Exception as UnoException
 from com.sun.star.awt.VclWindowPeerAttribute import OK, YES_NO
 import types
 from os import path as osPath
@@ -74,7 +73,7 @@ class FileAccess(object):
             ResultPath = str(Helper.getUnoPropertyValue(xInterface, sPath))
             ResultPath = self.deleteLastSlashfromUrl(ResultPath)
             return ResultPath
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
             return ""
 
@@ -126,7 +125,7 @@ class FileAccess(object):
                         break
 
             ResultPath = self.deleteLastSlashfromUrl(ResultPath)
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
             ResultPath = ""
 
@@ -167,7 +166,7 @@ class FileAccess(object):
                 i += 1
             aPathList.add(Template_writable)
 
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
         return aPathList
 
@@ -293,7 +292,7 @@ class FileAccess(object):
             sMsgNoDir = JavaTools.replaceSubString(sNoDirCreation, Path, "%1")
             SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, sMsgNoDir)
             return False
-        except com.sun.star.uno.Exception, unoexception:
+        except com.sun.star.uno.Exception, Exception:
             sMsgNoDir = JavaTools.replaceSubString(sNoDirCreation, Path, "%1")
             SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, sMsgNoDir)
             return False
diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py
index f2c6d69..727f3f0 100644
--- a/wizards/com/sun/star/wizards/common/Helper.py
+++ b/wizards/com/sun/star/wizards/common/Helper.py
@@ -1,7 +1,6 @@
 import uno
 import traceback
 from datetime import date as DateTime
-from com.sun.star.uno import Exception as UnoException
 from com.sun.star.uno import RuntimeException
 from NumberFormatter import NumberFormatter
 
@@ -25,7 +24,7 @@ class Helper(object):
                 selementnames = xPSet.getPropertySetInfo().getProperties()
                 raise ValueError("No Such Property: '" + PropertyName + "'")
 
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
 
     @classmethod
@@ -36,7 +35,7 @@ class Helper(object):
             else:
                 raise RuntimeException();
 
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
             return None
 
@@ -63,7 +62,7 @@ class Helper(object):
 
                     i += 1
             return None
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
             return None
 
@@ -76,7 +75,7 @@ class Helper(object):
                     return oObject
             return None
 
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
             return None
 
@@ -88,7 +87,7 @@ class Helper(object):
                 if isinstance(oObject,list):
                     return getArrayValue(oObject)
 
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
 
         return None
@@ -102,7 +101,7 @@ class Helper(object):
                     return oObject
 
             return None
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
             return None
 
@@ -140,7 +139,7 @@ class Helper(object):
             else:
                 return oPropList
 
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
             return None
 
diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.py b/wizards/com/sun/star/wizards/common/SystemDialog.py
index 2da851d..3242426 100644
--- a/wizards/com/sun/star/wizards/common/SystemDialog.py
+++ b/wizards/com/sun/star/wizards/common/SystemDialog.py
@@ -9,7 +9,6 @@ from com.sun.star.ui.dialogs.TemplateDescription import FILESAVE_AUTOEXTENSION,
 from com.sun.star.ui.dialogs.ExtendedFilePickerElementIds import CHECKBOX_AUTOEXTENSION
 from com.sun.star.awt import WindowDescriptor
 from com.sun.star.awt.WindowClass import MODALTOP
-from com.sun.star.uno import Exception as UnoException
 from com.sun.star.lang import IllegalArgumentException
 from com.sun.star.awt.VclWindowPeerAttribute import OK
 
@@ -30,7 +29,7 @@ class SystemDialog(object):
                 prova = uno.Any("[]short",(Type,))
                 #uno.invoke(prova, "initialize", (uno.Any("short",(Type,)),))
 
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
 
     @classmethod
@@ -81,7 +80,7 @@ class SystemDialog(object):
                 sPathList = self.systemDialog.getFiles()
                 self.sStorePath = sPathList[0]
 
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
 
         return self.sStorePath
@@ -111,7 +110,7 @@ class SystemDialog(object):
             if self.execute(self.systemDialog):
                 return self.systemDialog.getFiles()
 
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
 
         return None
@@ -169,7 +168,7 @@ class SystemDialog(object):
                 i += 1
             raise NullPointerException(
                 "UIName property not found for Filter " + filterName);
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
             return None
 
@@ -233,6 +232,6 @@ class SystemDialog(object):
             xPathSubst = xMSF.createInstance(
                 "com.sun.star.util.PathSubstitution")
             return xPathSubst
-        except UnoException, e:
+        except Exception, e:
             traceback.print_exc()
             return None
diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py
index 8ff2e64..581b8e7 100644
--- a/wizards/com/sun/star/wizards/fax/FaxDocument.py
+++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py
@@ -1,6 +1,5 @@
 import uno
 from text.TextDocument import *
-from com.sun.star.uno import Exception as UnoException
 from text.TextSectionHandler import TextSectionHandler
 from text.TextFieldHandler import TextFieldHandler
 from common.Configuration import Configuration
@@ -26,7 +25,7 @@ class FaxDocument(TextDocument):
             oSection = \
                 mySectionHandler.xTextDocument.TextSections.getByName(sElement)
             Helper.setUnoPropertyValue(oSection, "IsVisible", bState)
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
 
     def updateDateFields(self):
@@ -44,7 +43,7 @@ class FaxDocument(TextDocument):
 
                 if bState:
                     xPageStyle.setPropertyValue("FooterIsOn", True)
-                    xFooterText = propertySet.getPropertyValue("FooterText")
+                    xFooterText = Helper.getUnoPropertyValue(xPageStyle, "FooterText")
                     xFooterText.String = sText
 
                     if bPageNumber:
@@ -55,11 +54,11 @@ class FaxDocument(TextDocument):
                             PARAGRAPH_BREAK, False)
                         myCursor.setPropertyValue("ParaAdjust", CENTER )
 
-                        xPageNumberField = xMSFDoc.createInstance(
+                        xPageNumberField = self.xTextDocument.createInstance(
                             "com.sun.star.text.TextField.PageNumber")
-                        xPageNumberField.setPropertyValue(
-                            "NumberingType", uno.Any("short",ARABIC))
                         xPageNumberField.setPropertyValue("SubType", CURRENT)
+                        uno.invoke(xPageNumberField, "setPropertyValue",
+                            ("NumberingType", uno.Any("short",ARABIC)))
                         xFooterText.insertTextContent(xFooterText.End,
                             xPageNumberField, False)
                 else:
@@ -67,7 +66,7 @@ class FaxDocument(TextDocument):
                         False)
 
                 self.xTextDocument.unlockControllers()
-            except UnoException, exception:
+            except Exception, exception:
                 traceback.print_exc()
 
     def hasElement(self, sElement):
@@ -105,7 +104,7 @@ class FaxDocument(TextDocument):
             myFieldHandler.changeUserFieldContent("Fax",
                 Helper.getUnoObjectbyName(oUserDataAccess,
                 "facsimiletelephonenumber"))
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
 
     def killEmptyUserFields(self):
@@ -126,5 +125,5 @@ class FaxDocument(TextDocument):
                 if xTF is not None:
                     xTF.dispose()
 
-        except UnoException, e:
+        except Exception, e:
             traceback.print_exc()
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
index 32ce4b8..5abc8c0 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
@@ -55,9 +55,6 @@ class FaxWizardDialogImpl(FaxWizardDialog):
         except RuntimeException, e:
             # TODO Auto-generated catch block
             traceback.print_exc()
-        except UnoException, e:
-            # TODO Auto-generated catch blocksetMaxStep
-            traceback.print_exc()
         except Exception, e:
             # TODO Auto-generated catch blocksetMaxStep
             traceback.print_exc()
@@ -123,7 +120,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
             self.removeTerminateListener()
             self.closeDocument()
             self.running = False
-        except UnoException, exception:
+        except Exception, exception:
             self.removeTerminateListener()
             traceback.print_exc()
             self.running = False
@@ -207,7 +204,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
                 pass
                 #TODO: Error Handling
 
-        except UnoException, e:
+        except Exception, e:
             traceback.print_exc()
         finally:
             if endWizard:
@@ -413,7 +410,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
             self.faxDA.append(UnoDataAware.attachEditControl(cgl,
                 "cp_TemplatePath", self.myPathSelection.xSaveTextBox,
                 None, True))
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
 
     def saveConfiguration(self):
@@ -422,7 +419,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
                 "/org.openoffice.Office.Writer/Wizards/Fax", True)
             self.myConfig.writeConfiguration(root, "cp_")
             Configuration.commit(root)
-        except UnoException, e:
+        except Exception, e:
             traceback.print_exc()
 
     def setConfiguration(self):
@@ -620,7 +617,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
     def chkUseFooterItemChanged(self):
         try:
             bFooterPossible = (self.chkUseFooter.State is not 0) \
-                and bool(getControlProperty("chkUseFooter",
+                and bool(self.getControlProperty("chkUseFooter",
                     PropertyNames.PROPERTY_ENABLED))
             if self.chkFooterNextPages.State is not 0:
                 self.myFaxDoc.switchFooter("First Page", False,
@@ -642,17 +639,17 @@ class FaxWizardDialogImpl(FaxWizardDialog):
                 FaxWizardDialogImpl.RM_FOOTER)
             Helper.setUnoPropertyValue(BPaperItem,
                 PropertyNames.PROPERTY_ENABLED, bFooterPossible)
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
 
     def chkFooterNextPagesItemChanged(self):
-        chkUseFooterItemChanged()
+        self.chkUseFooterItemChanged()
 
     def chkFooterPageNumbersItemChanged(self):
-        chkUseFooterItemChanged()
+        self.chkUseFooterItemChanged()
 
     def txtFooterTextChanged(self):
-        chkUseFooterItemChanged()
+        self.chkUseFooterItemChanged()
 
     def chkUseSalutationItemChanged(self):
         self.myFaxDoc.switchUserField("Salutation",
diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.py b/wizards/com/sun/star/wizards/ui/PathSelection.py
index b7ea23c..bc26854 100644
--- a/wizards/com/sun/star/wizards/ui/PathSelection.py
+++ b/wizards/com/sun/star/wizards/ui/PathSelection.py
@@ -2,7 +2,6 @@ import traceback
 import uno
 from common.PropertyNames import *
 from common.FileAccess import *
-from com.sun.star.uno import Exception as UnoException
 from common.SystemDialog import SystemDialog
 
 class PathSelection(object):
@@ -84,7 +83,7 @@ class PathSelection(object):
                 myFA.getPath(self.sDefaultDirectory + \
                     "/" + \
                     self.sDefaultName, None))
-        except UnoException, e:
+        except Exception, e:
             traceback.print_exc()
 
     def triggerPathPicker(self):
@@ -115,7 +114,7 @@ class PathSelection(object):
                 elif iDialogType == DialogTypes.FILE:
                     #TODO: write code for picking a file for loading
                     return
-        except UnoException, e:
+        except Exception, e:
             traceback.print_exc()
 
     def callXPathSelectionListener(self):
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py
index fc63ddb..6a79746 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog.py
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py
@@ -21,7 +21,7 @@ class UnoDialog(object):
             self.BisHighContrastModeActivated = None
             self.m_oPeerConfig = None
             self.xWindowPeer = None
-        except UnoException, e:
+        except Exception, e:
             traceback.print_exc()
 
     def getControlKey(self, EventObject, ControlList):
@@ -85,9 +85,9 @@ class UnoDialog(object):
 
     def getControlProperty(self, ControlName, PropertyName):
         try:
-            xPSet = self.xDialogModel().getByName(ControlName)
-            oPropValuezxPSet.getPropertyValue(PropertyName)
-        except com.sun.star.uno.Exception, exception:
+            xPSet = self.xDialogModel.getByName(ControlName)
+            return xPSet.getPropertyValue(PropertyName)
+        except Exception, exception:
             traceback.print_exc()
             return None
 
@@ -100,7 +100,7 @@ class UnoDialog(object):
             while i < allProps.length:
                 sName = allProps[i].Name
                 i += 1
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
 
     def getMAPConversionFactor(self, ControlName):
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py
index 377cffd..18e3dc9 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.py
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py
@@ -2,7 +2,6 @@ from UnoDialog2 import *
 from common.Resource import Resource
 from abc import ABCMeta, abstractmethod
 from com.sun.star.lang import NoSuchMethodException
-from com.sun.star.uno import Exception as UnoException
 from com.sun.star.lang import IllegalArgumentException
 from com.sun.star.frame import TerminationVetoException
 from common.HelpIds import *
@@ -53,7 +52,7 @@ class WizardDialog(UnoDialog2):
             if self.xUnoDialog is not None:
                 self.xUnoDialog.toFront()
 
-        except UnoException, ex:
+        except Exception, ex:
             pass
             # do nothing;
 
@@ -93,7 +92,7 @@ class WizardDialog(UnoDialog2):
         try:
             return int(Helper.getUnoPropertyValue(
                 self.oRoadmap, "CurrentItemID"))
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
             return -1
 
@@ -129,7 +128,7 @@ class WizardDialog(UnoDialog2):
                 self.__oWizardResource.getResText(UIConsts.RID_COMMON + 16))
         except NoSuchMethodException, ex:
             Resource.showCommonResourceError(xMSF)
-        except UnoException, jexception:
+        except Exception, jexception:
             traceback.print_exc()
 
     def setRMItemLabels(self, _oResource, StartResID):
@@ -152,7 +151,7 @@ class WizardDialog(UnoDialog2):
             self.oRoadmap.insertByIndex(Index, oRoadmapItem)
             NextIndex = Index + 1
             return NextIndex
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
             return -1
 
@@ -169,7 +168,7 @@ class WizardDialog(UnoDialog2):
                     return CurRoadmapItem
 
             return None
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
             return None
 
@@ -369,7 +368,7 @@ class WizardDialog(UnoDialog2):
             bIsEnabled = bool(Helper.getUnoPropertyValue(xRoadmapItem,
                 PropertyNames.PROPERTY_ENABLED))
             return bIsEnabled
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
             return False
 
@@ -440,7 +439,7 @@ class WizardDialog(UnoDialog2):
         try:
             return int(Helper.getUnoPropertyValue(self.xDialogModel,
                 PropertyNames.PROPERTY_STEP))
-        except UnoException, exception:
+        except Exception, exception:
             traceback.print_exc()
             return -1
 


More information about the Libreoffice-commits mailing list