diff options
author | Xisco Fauli <anistenis@gmail.com> | 2012-09-23 15:58:45 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-09-24 13:50:38 +0000 |
commit | 90c128e090da5ed0047a3d43bafc33f32d8b27b7 (patch) | |
tree | 990de04cb361617a3aeb29ab180d371c670c9f04 /wizards | |
parent | dbdca385fcdb53d14677e2db40debeb26420da63 (diff) |
pyfax: get rid of import * (2)
Change-Id: Ibd988812d96f7f539c1e888be9ee25c0c895f358
Reviewed-on: https://gerrit.libreoffice.org/686
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/common/ConfigGroup.py | 3 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/common/Desktop.py | 12 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/CGFax.py | 3 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/CGFaxWizard.py | 3 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/CallWizard.py | 1 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/FaxDocument.py | 4 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/FaxWizardDialog.py | 17 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py | 12 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/ui/UnoDialog.py | 1 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/ui/UnoDialog2.py | 8 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/ui/WizardDialog.py | 9 |
11 files changed, 40 insertions, 33 deletions
diff --git a/wizards/com/sun/star/wizards/common/ConfigGroup.py b/wizards/com/sun/star/wizards/common/ConfigGroup.py index 0491c81159ca..44fc675bc2a9 100644 --- a/wizards/com/sun/star/wizards/common/ConfigGroup.py +++ b/wizards/com/sun/star/wizards/common/ConfigGroup.py @@ -15,9 +15,8 @@ # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . # -import traceback import inspect -from .ConfigNode import * +from .ConfigNode import ConfigNode from .Configuration import Configuration class ConfigGroup(ConfigNode): diff --git a/wizards/com/sun/star/wizards/common/Desktop.py b/wizards/com/sun/star/wizards/common/Desktop.py index 86f76e9f43a0..8f38f992b9d8 100644 --- a/wizards/com/sun/star/wizards/common/Desktop.py +++ b/wizards/com/sun/star/wizards/common/Desktop.py @@ -17,7 +17,7 @@ # import uno import traceback -from .NoValidPathException import * +from .NoValidPathException import NoValidPathException from com.sun.star.frame.FrameSearchFlag import ALL, PARENT from com.sun.star.util import URL @@ -67,7 +67,7 @@ class Desktop(object): xDispatch = xFrame.queryDispatch(oURLArray[0], _stargetframe, ALL) return xDispatch except Exception, e: - e.printStackTrace(System.out) + traceback.print_exc() return None @@ -75,7 +75,7 @@ class Desktop(object): def connect(self, connectStr): localContext = uno.getComponentContext() resolver = localContext.ServiceManager.createInstanceWithContext( - "com.sun.star.bridge.UnoUrlResolver", localContext) + "com.sun.star.bridge.UnoUrlResolver", localContext) ctx = resolver.resolve( connectStr ) orb = ctx.ServiceManager return orb @@ -111,7 +111,7 @@ class Desktop(object): _sString, 0, _aLocale, nStartFlags, "", nStartFlags, " ") return aResult.EndPos except Exception, e: - e.printStackTrace(System.out) + traceback.print_exc() return -1 @classmethod @@ -204,8 +204,8 @@ class OfficePathRetriever: try: xPathSubst = xMSF.createInstance( "com.sun.star.util.PathSubstitution") - except com.sun.star.uno.Exception, e: - e.printStackTrace() + except Exception, e: + traceback.print_exc() if xPathSubst != None: return xPathSubst diff --git a/wizards/com/sun/star/wizards/fax/CGFax.py b/wizards/com/sun/star/wizards/fax/CGFax.py index 868aa8b7ddc8..ff69cf134a42 100644 --- a/wizards/com/sun/star/wizards/fax/CGFax.py +++ b/wizards/com/sun/star/wizards/fax/CGFax.py @@ -15,8 +15,7 @@ # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . # -from ..common.ConfigGroup import * -from ..common.ConfigGroup import * +from ..common.ConfigGroup import ConfigGroup class CGFax(ConfigGroup): diff --git a/wizards/com/sun/star/wizards/fax/CGFaxWizard.py b/wizards/com/sun/star/wizards/fax/CGFaxWizard.py index 0cfbeb33a05d..30f211a84dc9 100644 --- a/wizards/com/sun/star/wizards/fax/CGFaxWizard.py +++ b/wizards/com/sun/star/wizards/fax/CGFaxWizard.py @@ -16,8 +16,7 @@ # the License at http://www.apache.org/licenses/LICENSE-2.0 . # from .CGFax import CGFax -from ..common.ConfigGroup import * -from ..common.ConfigGroup import * +from ..common.ConfigGroup import ConfigGroup class CGFaxWizard(ConfigGroup): diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.py b/wizards/com/sun/star/wizards/fax/CallWizard.py index 3fbbac173bf9..427a7036bdd0 100644 --- a/wizards/com/sun/star/wizards/fax/CallWizard.py +++ b/wizards/com/sun/star/wizards/fax/CallWizard.py @@ -15,7 +15,6 @@ # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . # -import uno import unohelper import traceback diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py index 18543d6ff3ec..95072de8266f 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.py +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py @@ -15,7 +15,9 @@ # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . # -from ..text.TextDocument import * + +from ..text.TextDocument import TextDocument, traceback, Helper,\ + TextFieldHandler, Configuration from ..text.TextSectionHandler import TextSectionHandler from ..common.PropertyNames import PropertyNames diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py index c28d1e876326..36396d3709bd 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py @@ -15,13 +15,10 @@ # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . # -import uno from .FaxWizardDialogResources import FaxWizardDialogResources from .FaxWizardDialogConst import FaxWizardDialogConst, HIDMAIN -from ..ui.WizardDialog import WizardDialog -from ..ui.UIConsts import UIConsts -from ..common.Helper import Helper -from ..common.PropertyNames import PropertyNames +from ..ui.WizardDialog import WizardDialog, uno, Helper, UIConsts, \ + PropertyNames from com.sun.star.awt.FontUnderline import SINGLE @@ -72,11 +69,11 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, FaxWizardDialogConst.OPTBUSINESSFAX_HID, + (8, FaxWizardDialogConst.OPTBUSINESSFAX_HID, self.resources.resoptBusinessFax_value, 97, 28, 1, 1, 184), self) self.lstBusinessStyle = self.insertListBox("lstBusinessStyle", - FaxWizardDialogConst.LSTBUSINESSSTYLE_ACTION_PERFORMED, + FaxWizardDialogConst.LSTBUSINESSSTYLE_ACTION_PERFORMED, FaxWizardDialogConst.LSTBUSINESSSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, @@ -97,7 +94,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, FaxWizardDialogConst.OPTPRIVATEFAX_HID, + (8, FaxWizardDialogConst.OPTPRIVATEFAX_HID, self.resources.resoptPrivateFax_value,97, 81, 1, 2, 184), self) self.lstPrivateStyle = self.insertListBox("lstPrivateStyle", FaxWizardDialogConst.LSTPRIVATESTYLE_ACTION_PERFORMED, @@ -151,10 +148,10 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (39, self.resources.reslblIntroduction_value, + (39, self.resources.reslblIntroduction_value, True, 104, 145, 1, 55, 199)) self.ImageControl3 = self.insertInfoImage(92, 145, 1) - + def buildStep2(self): self.chkUseLogo = self.insertCheckBox("chkUseLogo", FaxWizardDialogConst.CHKUSELOGO_ITEM_CHANGED, diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 59b8bf279e42..e55f01a70cd9 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -15,18 +15,24 @@ # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . # -from .FaxWizardDialog import * -from .CGFaxWizard import * -from .FaxDocument import * +import traceback +from .FaxWizardDialog import FaxWizardDialog, Helper, PropertyNames, uno +from .CGFaxWizard import CGFaxWizard +from .FaxDocument import FaxDocument from .FaxWizardDialogConst import HID from ..ui.PathSelection import PathSelection from ..ui.event.UnoDataAware import UnoDataAware from ..ui.event.RadioDataAware import RadioDataAware from ..text.TextFieldHandler import TextFieldHandler +from ..text.TextDocument import TextDocument +from ..text.ViewHandler import ViewHandler +from ..common.Configuration import Configuration from ..common.SystemDialog import SystemDialog from ..common.NoValidPathException import NoValidPathException from ..common.HelpIds import HelpIds from ..common.FileAccess import FileAccess +from ..common.Desktop import Desktop +from ..document.OfficeDocument import OfficeDocument from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO from com.sun.star.uno import RuntimeException diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py index 98657326dc0b..18f563c52d78 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -15,7 +15,6 @@ # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . # -import uno import traceback from .PeerConfig import PeerConfig from ..common.PropertyNames import PropertyNames diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.py b/wizards/com/sun/star/wizards/ui/UnoDialog2.py index 943fdffddb19..f13a24058b2a 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.py @@ -15,10 +15,12 @@ # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . # -from .UIConsts import * -from .UnoDialog import * -from .event.CommonListener import * +from .UnoDialog import UnoDialog +from .UIConsts import UIConsts from ..common.Desktop import Desktop +from ..common.PropertyNames import PropertyNames +from .event.CommonListener import ItemListenerProcAdapter, \ + ActionListenerProcAdapter, TextListenerProcAdapter ''' This class contains convenience methods for inserting components to a dialog. diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index ab7104c558c9..ebc401e17ec5 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -15,11 +15,16 @@ # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . # +import uno +import traceback from abc import ABCMeta, abstractmethod -from .UnoDialog2 import * +from .UnoDialog2 import UnoDialog2, Desktop, PropertyNames, UIConsts, \ + ItemListenerProcAdapter from .XPathSelectionListener import XPathSelectionListener +from .event.CommonListener import TerminateListenerProcAdapter +from ..common.Helper import Helper from ..common.Resource import Resource -from ..common.HelpIds import * +from ..common.HelpIds import HelpIds from ..document.OfficeDocument import OfficeDocument from ..text.TextDocument import TextDocument |