From b0df18dbd4c35e5a020320fcfe822c839b59fd7a Mon Sep 17 00:00:00 2001 From: Xisco FaulĂ­ Date: Tue, 7 Jun 2011 16:02:15 +0200 Subject: initial commit with migration of wizards to python --- wizards/com/sun/star/wizards/fax/FaxDocument.py | 109 ++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 wizards/com/sun/star/wizards/fax/FaxDocument.py (limited to 'wizards/com/sun/star/wizards/fax/FaxDocument.py') diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py new file mode 100644 index 000000000000..25db248c8b01 --- /dev/null +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py @@ -0,0 +1,109 @@ +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 +from common.PropertyNames import PropertyNames + +from com.sun.star.text.ControlCharacter import PARAGRAPH_BREAK +from com.sun.star.style.ParagraphAdjust import CENTER +from com.sun.star.text.PageNumberType import CURRENT +from com.sun.star.style.NumberingType import ARABIC + +class FaxDocument(TextDocument): + + def __init__(self, xMSF, listener): + super(FaxDocument,self).__init__(xMSF, listener, "WIZARD_LIVE_PREVIEW") + self.keepLogoFrame = True + self.keepTypeFrame = True + + def switchElement(self, sElement, bState): + try: + mySectionHandler = TextSectionHandler(self.xMSF, self.xTextDocument) + oSection = mySectionHandler.xTextDocument.getTextSections().getByName(sElement) + Helper.setUnoPropertyValue(oSection, "IsVisible", bState) + except UnoException, exception: + traceback.print_exc() + + def updateDateFields(self): + FH = TextFieldHandler(self.xTextDocument, self.xTextDocument) + FH.updateDateFields() + + def switchFooter(self, sPageStyle, bState, bPageNumber, sText): + if self.xTextDocument != None: + self.xTextDocument.lockControllers() + try: + + xPageStyleCollection = self.xTextDocument.getStyleFamilies().getByName("PageStyles") + xPageStyle = xPageStyleCollection.getByName(sPageStyle) + + if bState: + xPageStyle.setPropertyValue("FooterIsOn", True) + xFooterText = propertySet.getPropertyValue("FooterText") + xFooterText.setString(sText) + + if bPageNumber: + #Adding the Page Number + myCursor = xFooterText.Text.createTextCursor() + myCursor.gotoEnd(False) + xFooterText.insertControlCharacter(myCursor, PARAGRAPH_BREAK, False) + myCursor.setPropertyValue("ParaAdjust", CENTER ) + + xPageNumberField = xMSFDoc.createInstance("com.sun.star.text.TextField.PageNumber") + xPageNumberField.setPropertyValue("NumberingType", uno.Any("short",ARABIC)) + xPageNumberField.setPropertyValue("SubType", CURRENT) + xFooterText.insertTextContent(xFooterText.getEnd(), xPageNumberField, False) + + else: + Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", False) + + self.xTextDocument.unlockControllers() + except UnoException, exception: + traceback.print_exc() + + def hasElement(self, sElement): + if self.xTextDocument != None: + mySectionHandler = TextSectionHandler(self.xMSF, self.xTextDocument) + return mySectionHandler.hasTextSectionByName(sElement) + else: + return False + + def switchUserField(self, sFieldName, sNewContent, bState): + myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) + if bState: + myFieldHandler.changeUserFieldContent(sFieldName, sNewContent) + else: + myFieldHandler.changeUserFieldContent(sFieldName, "") + + def fillSenderWithUserData(self): + try: + myFieldHandler = TextFieldHandler(self.xTextDocument, self.xTextDocument) + oUserDataAccess = Configuration.getConfigurationRoot(self.xMSF, "org.openoffice.UserProfile/Data", False) + myFieldHandler.changeUserFieldContent("Company", Helper.getUnoObjectbyName(oUserDataAccess, "o")) + myFieldHandler.changeUserFieldContent("Street", Helper.getUnoObjectbyName(oUserDataAccess, "street")) + myFieldHandler.changeUserFieldContent("PostCode", Helper.getUnoObjectbyName(oUserDataAccess, "postalcode")) + myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, Helper.getUnoObjectbyName(oUserDataAccess, "st")) + myFieldHandler.changeUserFieldContent("City", Helper.getUnoObjectbyName(oUserDataAccess, "l")) + myFieldHandler.changeUserFieldContent("Fax", Helper.getUnoObjectbyName(oUserDataAccess, "facsimiletelephonenumber")) + except UnoException, exception: + traceback.print_exc() + + def killEmptyUserFields(self): + myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) + myFieldHandler.removeUserFieldByContent("") + + def killEmptyFrames(self): + try: + if not self.keepLogoFrame: + xTF = TextFrameHandler.getFrameByName("Company Logo", self.xTextDocument) + if xTF != None: + xTF.dispose() + + if not self.keepTypeFrame: + xTF = TextFrameHandler.getFrameByName("Communication Type", self.xTextDocument) + if xTF != None: + xTF.dispose() + + except UnoException, e: + traceback.print_exc() -- cgit v1.2.3 From 59f5ea643c908fb9f2defdd987a50d46e63fb9ec Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Fri, 10 Jun 2011 01:58:54 +0200 Subject: some changes here and there. - Add listboxes - Create the document preview in a diferent frame - Fix some any.uno errors - Add a listener to some buttons --- wizards/com/sun/star/wizards/common/FileAccess.py | 16 +- wizards/com/sun/star/wizards/common/Helper.py | 17 +- .../com/sun/star/wizards/common/SystemDialog.py | 50 +++--- .../sun/star/wizards/document/OfficeDocument.py | 42 +++-- wizards/com/sun/star/wizards/fax/FaxDocument.py | 2 +- .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 19 +-- wizards/com/sun/star/wizards/text/TextDocument.py | 32 ++-- wizards/com/sun/star/wizards/ui/PathSelection.py | 26 +-- wizards/com/sun/star/wizards/ui/UnoDialog.py | 17 +- wizards/com/sun/star/wizards/ui/UnoDialog2.py | 31 ++-- wizards/com/sun/star/wizards/ui/WizardDialog.py | 151 +++++++++-------- .../sun/star/wizards/ui/event/CommonListener.py | 186 +++++++++++++-------- wizards/com/sun/star/wizards/ui/event/DataAware.py | 3 - .../sun/star/wizards/ui/event/DataAwareFields.py | 2 + .../com/sun/star/wizards/ui/event/UnoDataAware.py | 2 +- 15 files changed, 315 insertions(+), 281 deletions(-) (limited to 'wizards/com/sun/star/wizards/fax/FaxDocument.py') diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 95f8646b1927..641746adfdac 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -361,7 +361,7 @@ class FileAccess(object): xInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") nameList = xInterface.getFolderContents(FolderName, False) TitleVector = [] - NameVector = [len(nameList)] + NameVector = [] if FilterName == None or FilterName == "": FilterName = None else: @@ -376,6 +376,7 @@ class FileAccess(object): LocLayoutFiles[1] = NameVector LocLayoutFiles[0] = TitleVector + #COMMENTED #JavaTools.bubblesortList(LocLayoutFiles) except Exception, exception: @@ -501,14 +502,13 @@ class FileAccess(object): #get the file identifier converter self.filenameConverter = xmsf.createInstance("com.sun.star.ucb.FileContentProvider") - def getURL(self, parentPath, childPath): - parent = self.filenameConverter.getSystemPathFromFileURL(parentPath) - f = File.File_unknown(parent, childPath) - r = self.filenameConverter.getFileURLFromSystemPath(parentPath, f.getAbsolutePath()) - return r + def getURL(self, path, childPath=None): + if childPath is not None: + path = self.filenameConverter.getSystemPathFromFileURL(path) + f = open(path,childPath) + else: + f = open(path) - def getURL(self, path): - f = File.File_unknown(path) r = self.filenameConverter.getFileURLFromSystemPath(path, f.getAbsolutePath()) return r diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py index 908aa78a1b2b..3514c4ead88c 100644 --- a/wizards/com/sun/star/wizards/common/Helper.py +++ b/wizards/com/sun/star/wizards/common/Helper.py @@ -4,9 +4,6 @@ import traceback from com.sun.star.uno import Exception as UnoException from com.sun.star.uno import RuntimeException -#TEMPORAL -import inspect - class Helper(object): DAY_IN_MILLIS = (24 * 60 * 60 * 1000) @@ -23,14 +20,13 @@ class Helper(object): def setUnoPropertyValue(self, xPSet, PropertyName, PropertyValue): try: if xPSet.getPropertySetInfo().hasPropertyByName(PropertyName): - #xPSet.setPropertyValue(PropertyName, PropertyValue) uno.invoke(xPSet,"setPropertyValue", (PropertyName,PropertyValue)) else: selementnames = xPSet.getPropertySetInfo().getProperties() raise ValueError("No Such Property: '" + PropertyName + "'"); except UnoException, exception: - print type(PropertyValue) + print PropertyName traceback.print_exc() @classmethod @@ -126,9 +122,6 @@ class Helper(object): i += 1 except Exception, e: - curframe = inspect.currentframe() - calframe = inspect.getouterframes(curframe, 2) - #print "caller name:", calframe[1][3] traceback.print_exc() ''' @@ -166,13 +159,7 @@ class Helper(object): class DateUtils(object): - @classmethod - def DateUtils_XMultiServiceFactory_Object(self, xmsf, document): - tmp = DateUtils() - tmp.DateUtils_body_XMultiServiceFactory_Object(xmsf, document) - return tmp - - def DateUtils_body_XMultiServiceFactory_Object(self, xmsf, docMSF): + def __init__(self, xmsf, docMSF): defaults = docMSF.createInstance("com.sun.star.text.Defaults") l = Helper.getUnoStructValue(defaults, "CharLocale") jl = locale.setlocale(l.Language, l.Country, l.Variant) diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.py b/wizards/com/sun/star/wizards/common/SystemDialog.py index b88aadfafaa6..c81e9ddaa344 100644 --- a/wizards/com/sun/star/wizards/common/SystemDialog.py +++ b/wizards/com/sun/star/wizards/common/SystemDialog.py @@ -3,6 +3,7 @@ import traceback from Configuration import Configuration from Resource import Resource from Desktop import Desktop +from Helper import Helper from com.sun.star.ui.dialogs.TemplateDescription import FILESAVE_AUTOEXTENSION, FILEOPEN_SIMPLE from com.sun.star.ui.dialogs.ExtendedFilePickerElementIds import CHECKBOX_AUTOEXTENSION @@ -26,22 +27,26 @@ class SystemDialog(object): self.xMSF = xMSF self.systemDialog = xMSF.createInstance(ServiceName) self.xStringSubstitution = self.createStringSubstitution(xMSF) - listAny = [uno.Any("short",Type)] if self.systemDialog != None: - self.systemDialog.initialize(listAny) + prova = uno.Any("[]short",(Type,)) + #uno.invoke(prova, "initialize", (uno.Any("short",(Type,)),)) except UnoException, exception: traceback.print_exc() + @classmethod def createStoreDialog(self, xmsf): return SystemDialog(xmsf, "com.sun.star.ui.dialogs.FilePicker", FILESAVE_AUTOEXTENSION) + @classmethod def createOpenDialog(self, xmsf): return SystemDialog(xmsf, "com.sun.star.ui.dialogs.FilePicker", FILEOPEN_SIMPLE) + @classmethod def createFolderDialog(self, xmsf): return SystemDialog(xmsf, "com.sun.star.ui.dialogs.FolderPicker", 0) + @classmethod def createOfficeFolderDialog(self, xmsf): return SystemDialog(xmsf, "com.sun.star.ui.dialogs.OfficeFolderPicker", 0) @@ -53,21 +58,6 @@ class SystemDialog(object): traceback.print_exc() return path - ''' - ATTENTION a BUG : TFILESAVE_AUTOEXTENSIONhe extension calculated - here gives the last 3 chars of the filename - what - if the extension is of 4 or more chars? - @param DisplayDirectory - @param DefaultName - @param sDocuType - @return - ''' - - def callStoreDialog(self, DisplayDirectory, DefaultName, sDocuType): - sExtension = DefaultName.substring(DefaultName.length() - 3, DefaultName.length()) - addFilterToDialog(sExtension, sDocuType, True) - return callStoreDialog(DisplayDirectory, DefaultName) - ''' @param displayDir @param defaultName @@ -75,13 +65,16 @@ class SystemDialog(object): @return ''' - def callStoreDialog(self, displayDir, defaultName): + def callStoreDialog(self, displayDir, defaultName, sDocuType=None): + if sDocuType is not None: + self.addFilterToDialog(defaultName[-3:], sDocuType, True) + self.sStorePath = None try: self.systemDialog.setValue(CHECKBOX_AUTOEXTENSION, 0, True) self.systemDialog.setDefaultName(defaultName) - self.systemDialog.setDisplayDirectory(subst(displayDir)) - if execute(self.systemDialog): + self.systemDialog.setDisplayDirectory(self.subst(displayDir)) + if self.execute(self.systemDialog): sPathList = self.systemDialog.getFiles() self.sStorePath = sPathList[0] @@ -99,7 +92,7 @@ class SystemDialog(object): self.systemDialog.setTitle(title) self.systemDialog.setDescription(description) - if execute(self.systemDialog): + if self.execute(self.systemDialog): return self.systemDialog.getDirectory() else: return None @@ -111,7 +104,7 @@ class SystemDialog(object): try: self.systemDialog.setMultiSelectionMode(multiSelect) self.systemDialog.setDisplayDirectory(subst(displayDirectory)) - if execute(self.systemDialog): + if self.execute(self.systemDialog): return self.systemDialog.getFiles() except UnoException, exception: @@ -122,10 +115,10 @@ class SystemDialog(object): def addFilterToDialog(self, sExtension, filterName, setToDefault): try: #get the localized filtername - uiName = getFilterUIName(filterName) + uiName = self.getFilterUIName(filterName) pattern = "*." + sExtension #add the filter - addFilter(uiName, pattern, setToDefault) + self.addFilter(uiName, pattern, setToDefault) except Exception, exception: traceback.print_exc() @@ -147,8 +140,8 @@ class SystemDialog(object): def getFilterUIName(self, filterName): prodName = Configuration.getProductName(self.xMSF) - s = [[getFilterUIName_(filterName)]] - s[0][0] = JavaTools.replaceSubString(s[0][0], prodName, "%productname%") + s = [[self.getFilterUIName_(filterName)]] + s[0][0] = s[0][0].replace("%productname%", prodName) return s[0][0] ''' @@ -162,11 +155,10 @@ class SystemDialog(object): oFactory = self.xMSF.createInstance("com.sun.star.document.FilterFactory") oObject = Helper.getUnoObjectbyName(oFactory, filterName) xPropertyValue = list(oObject) - MaxCount = xPropertyValue.length i = 0 - while i < MaxCount: + while i < len(xPropertyValue): aValue = xPropertyValue[i] - if aValue != None and aValue.Name.equals("UIName"): + if aValue != None and aValue.Name == "UIName": return str(aValue.Value) i += 1 diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py index 5692d90f47c6..9d3faeb35776 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.py +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py @@ -1,6 +1,19 @@ from com.sun.star.awt.WindowClass import TOP import traceback import uno +from common.Desktop import Desktop +from com.sun.star.awt import WindowDescriptor +from com.sun.star.awt import Rectangle + +#Window Constants +com_sun_star_awt_WindowAttribute_BORDER \ + = uno.getConstantByName( "com.sun.star.awt.WindowAttribute.BORDER" ) +com_sun_star_awt_WindowAttribute_SIZEABLE \ + = uno.getConstantByName( "com.sun.star.awt.WindowAttribute.SIZEABLE" ) +com_sun_star_awt_WindowAttribute_MOVEABLE \ + = uno.getConstantByName( "com.sun.star.awt.WindowAttribute.MOVEABLE" ) +com_sun_star_awt_VclWindowPeerAttribute_CLIPCHILDREN \ + = uno.getConstantByName( "com.sun.star.awt.VclWindowPeerAttribute.CLIPCHILDREN" ) class OfficeDocument(object): '''Creates a new instance of OfficeDocument ''' @@ -70,13 +83,11 @@ class OfficeDocument(object): return xComponent - def createNewFrame(self, xMSF, listener): - return createNewFrame(xMSF, listener, "_blank") - - def createNewFrame(self, xMSF, listener, FrameName): + @classmethod + def createNewFrame(self, xMSF, listener, FrameName="_blank"): xFrame = None - if FrameName.equalsIgnoreCase("WIZARD_LIVE_PREVIEW"): - xFrame = createNewPreviewFrame(xMSF, listener) + if FrameName.lower() == "WIZARD_LIVE_PREVIEW".lower(): + xFrame = self.createNewPreviewFrame(xMSF, listener) else: xF = Desktop.getDesktop(xMSF) xFrame = xF.findFrame(FrameName, 0) @@ -87,6 +98,7 @@ class OfficeDocument(object): return xFrame + @classmethod def createNewPreviewFrame(self, xMSF, listener): xToolkit = None try: @@ -96,13 +108,21 @@ class OfficeDocument(object): traceback.print_exc() #describe the window and its properties - aDescriptor = WindowDescriptor.WindowDescriptor() + aDescriptor = WindowDescriptor() aDescriptor.Type = TOP aDescriptor.WindowServiceName = "window" aDescriptor.ParentIndex = -1 aDescriptor.Parent = None - aDescriptor.Bounds = Rectangle.Rectangle_unknown(10, 10, 640, 480) - aDescriptor.WindowAttributes = WindowAttribute.BORDER | WindowAttribute.MOVEABLE | WindowAttribute.SIZEABLE | VclWindowPeerAttribute.CLIPCHILDREN + aDescriptor.Bounds = Rectangle(10, 10, 640, 480) + + #Set Window Attributes + gnDefaultWindowAttributes = \ + com_sun_star_awt_WindowAttribute_BORDER + \ + com_sun_star_awt_WindowAttribute_MOVEABLE + \ + com_sun_star_awt_WindowAttribute_SIZEABLE + \ + com_sun_star_awt_VclWindowPeerAttribute_CLIPCHILDREN + + aDescriptor.WindowAttributes = gnDefaultWindowAttributes #create a new blank container window xPeer = None try: @@ -127,7 +147,9 @@ class OfficeDocument(object): #and not part of the desktop tree. #You are alone with him .-) if listener != None: - Desktop.getDesktop(xMSF).addTerminateListener(listener) + pass + #COMMENTED + #Desktop.getDesktop(xMSF).addTerminateListener(listener) return xFrame diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py index 25db248c8b01..691c5effd506 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.py +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py @@ -14,7 +14,7 @@ from com.sun.star.style.NumberingType import ARABIC class FaxDocument(TextDocument): def __init__(self, xMSF, listener): - super(FaxDocument,self).__init__(xMSF, listener, "WIZARD_LIVE_PREVIEW") + super(FaxDocument,self).__init__(xMSF, listener, None, "WIZARD_LIVE_PREVIEW") self.keepLogoFrame = True self.keepTypeFrame = True diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index b1500b02200c..62fae01fda56 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -49,9 +49,6 @@ class FaxWizardDialogImpl(FaxWizardDialog): ConnectStr = "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" xLocMSF = Desktop.connect(ConnectStr) lw = FaxWizardDialogImpl(xLocMSF) - print - print "lw.startWizard" - print lw.startWizard(xLocMSF, None) except RuntimeException, e: # TODO Auto-generated catch block @@ -128,18 +125,19 @@ class FaxWizardDialogImpl(FaxWizardDialog): return def cancelWizard(self): - xDialog.endExecute() + self.xUnoDialog.endExecute() self.running = False def finishWizard(self): - switchToStep(getCurrentStep(), getMaxStep()) + self.switchToStep(self.getCurrentStep(), self.getMaxStep()) self.myFaxDoc.setWizardTemplateDocInfo(self.resources.resFaxWizardDialog_title, self.resources.resTemplateDescription) try: - fileAccess = FileAccess(xMSF) + fileAccess = FileAccess(self.xMSF) self.sPath = self.myPathSelection.getSelectedPath() - if self.sPath.equals(""): + if self.sPath == "": self.myPathSelection.triggerPathPicker() self.sPath = self.myPathSelection.getSelectedPath() + print self.sPath self.sPath = fileAccess.getURL(self.sPath) #first, if the filename was not changed, thus @@ -189,7 +187,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): except UnoException, e: traceback.print_exc() finally: - xDialog.endExecute() + self.xUnoDialog.endExecute() self.running = False return True @@ -246,9 +244,8 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.sWorkPath = FileAccess.getOfficePath2(xMSF, "Work", "", "") self.BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", self.sFaxPath) self.PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", self.sFaxPath) - - self.setControlProperty("lstBusinessStyle", "StringItemList", self.BusinessFiles[0]) - self.setControlProperty("lstPrivateStyle", "StringItemList", self.PrivateFiles[0]) + self.setControlProperty("lstBusinessStyle", "StringItemList", tuple(self.BusinessFiles[0])) + self.setControlProperty("lstPrivateStyle", "StringItemList", tuple(self.PrivateFiles[0])) self.setControlProperty("lstBusinessStyle", "SelectedItems", [0]) self.setControlProperty("lstPrivateStyle", "SelectedItems" , [0]) return True diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index 1da169d49ea9..93351c6c02f3 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -7,6 +7,11 @@ from document.OfficeDocument import OfficeDocument import traceback from text.ViewHandler import ViewHandler from text.TextFieldHandler import TextFieldHandler +from com.sun.star.container import NoSuchElementException +from com.sun.star.lang import WrappedTargetException +from common.Configuration import Configuration +import time +from com.sun.star.util import DateTime class TextDocument(object): @@ -17,19 +22,19 @@ class TextDocument(object): self.xMSF = xMSF self.xTextDocument = None - if listener: - if FrameName: + if listener is not None: + if FrameName is not None: '''creates an instance of TextDocument and creates a named frame. No document is actually loaded into this frame.''' self.xFrame = OfficeDocument.createNewFrame(xMSF, listener, FrameName); return - elif _sPreviewURL: + elif _sPreviewURL is not None: '''creates an instance of TextDocument by loading a given URL as preview''' self.xFrame = OfficeDocument.createNewFrame(xMSF, listener) self.xTextDocument = self.loadAsPreview(_sPreviewURL, True) - elif xArgs: + elif xArgs is not None: '''creates an instance of TextDocument and creates a frame and loads a document''' self.xDesktop = Desktop.getDesktop(xMSF); self.xFrame = OfficeDocument.createNewFrame(xMSF, listener); @@ -45,7 +50,7 @@ class TextDocument(object): self.xFrame = self.xDesktop.getActiveFrame() self.xTextDocument = self.xFrame.getController().getModel() - elif _moduleIdentifier: + elif _moduleIdentifier is not None: try: '''create the empty document, and set its module identifier''' self.xTextDocument = xMSF.createInstance("com.sun.star.text.TextDocument") @@ -64,7 +69,7 @@ class TextDocument(object): except Exception, e: traceback.print_exc() - elif _textDocument: + elif _textDocument is not None: '''creates an instance of TextDocument from a given XTextDocument''' self.xFrame = _textDocument.getCurrentController().getFrame() self.xTextDocument = _textDocument @@ -180,15 +185,12 @@ class TextDocument(object): gn = xNA.getByName("givenname") sn = xNA.getByName("sn") fullname = str(gn) + " " + str(sn) - cal = GregorianCalendar.GregorianCalendar() - year = cal.get(Calendar.YEAR) - month = cal.get(Calendar.MONTH) - day = cal.get(Calendar.DAY_OF_MONTH) - currentDate = DateTime.DateTime() - currentDate.Day = day - currentDate.Month = month - currentDate.Year = year - du = DateUtils(self.xMSF, self.xTextDocument) + currentDate = DateTime() + now = time.localtime(time.time()) + currentDate.Day = time.strftime("%d", now) + currentDate.Year = time.strftime("%Y", now) + currentDate.Month = time.strftime("%m", now) + du = Helper.DateUtils(self.xMSF, self.xTextDocument) ff = du.getFormat(NumberFormatIndex.DATE_SYS_DDMMYY) myDate = du.format(ff, currentDate) xDocProps2 = self.xTextDocument.getDocumentProperties() diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.py b/wizards/com/sun/star/wizards/ui/PathSelection.py index a1bdc9511e51..6c897d20e738 100644 --- a/wizards/com/sun/star/wizards/ui/PathSelection.py +++ b/wizards/com/sun/star/wizards/ui/PathSelection.py @@ -3,6 +3,7 @@ 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): @@ -27,11 +28,11 @@ class PathSelection(object): self.TXTSAVEPATH = 1 def insert(self, DialogStep, XPos, YPos, Width, CurTabIndex, LabelText, Enabled, TxtHelpURL, BtnHelpURL): - self.CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblSaveAs", [PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH], [Enabled, 8, LabelText, XPos, YPos, DialogStep, uno.Any("short",CurTabIndex), Width]) - self.xSaveTextBox = self.CurUnoDialog.insertTextField("txtSavePath", "callXPathSelectionListener", [PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH], [Enabled, 12, TxtHelpURL, XPos, YPos + 10, DialogStep, uno.Any("short",(CurTabIndex + 1)), Width - 26], self) + self.CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblSaveAs", (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 8, LabelText, XPos, YPos, DialogStep, uno.Any("short",CurTabIndex), Width)) + self.xSaveTextBox = self.CurUnoDialog.insertTextField("txtSavePath", "callXPathSelectionListener", (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 12, TxtHelpURL, XPos, YPos + 10, DialogStep, uno.Any("short",(CurTabIndex + 1)), Width - 26), self) self.CurUnoDialog.setControlProperty("txtSavePath", PropertyNames.PROPERTY_ENABLED, False ) - self.CurUnoDialog.insertButton("cmdSelectPath", "triggerPathPicker", [PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH], [Enabled, 14, BtnHelpURL, "...",XPos + Width - 16, YPos + 9, DialogStep, uno.Any("short",(CurTabIndex + 2)), 16], self) + self.CurUnoDialog.insertButton("cmdSelectPath", "triggerPathPicker", (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 14, BtnHelpURL, "...",XPos + Width - 16, YPos + 9, DialogStep, uno.Any("short",(CurTabIndex + 2)), 16), self) def addSelectionListener(self, xAction): self.xAction = xAction @@ -48,20 +49,21 @@ class PathSelection(object): def triggerPathPicker(self): try: - if iTransferMode == TransferMode.SAVE: - if iDialogType == DialogTypes.FOLDER: + if self.iTransferMode == self.TransferMode.SAVE: + if self.iDialogType == self.DialogTypes.FOLDER: #TODO: write code for picking a folder for saving return - elif iDialogType == DialogTypes.FILE: - usedPathPicker = True - myFilePickerDialog = SystemDialog.createStoreDialog(xMSF) - myFilePickerDialog.callStoreDialog(sDefaultDirectory, sDefaultName, sDefaultFilter); + elif self.iDialogType == self.DialogTypes.FILE: + self.usedPathPicker = True + myFilePickerDialog = SystemDialog.createStoreDialog(self.xMSF) + myFilePickerDialog.callStoreDialog(self.sDefaultDirectory, self.sDefaultName, self.sDefaultFilter); sStorePath = myFilePickerDialog.sStorePath; - if sStorePath: + if sStorePath is not None: + print "hello" myFA = FileAccess(xMSF); xSaveTextBox.setText(myFA.getPath(sStorePath, None)); - sDefaultDirectory = FileAccess.getParentDir(sStorePath); - sDefaultName = myFA.getFilename(sStorePath); + self.sDefaultDirectory = FileAccess.getParentDir(sStorePath); + self.sDefaultName = myFA.getFilename(sStorePath); return elif iTransferMode == TransferMode.LOAD: if iDialogType == DialogTypes.FOLDER: diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py index 87a1a5d24c71..cfc1c043786b 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -4,7 +4,6 @@ from common.PropertyNames import PropertyNames from com.sun.star.awt import Rectangle from common.Helper import Helper from PeerConfig import PeerConfig -from common.Listener import * from com.sun.star.awt import Rectangle from com.sun.star.awt.PosSize import POS @@ -52,14 +51,14 @@ class UnoDialog(object): if isinstance(PropertyValue,bool): xPSet.setPropertyValue(PropertyName, PropertyValue) else: - if isinstance(PropertyValue,list): - methodname = "[]short" - PropertyValue = tuple(PropertyValue) - elif isinstance(PropertyValue,tuple): - methodname = "[]string" - else: - PropertyValue = (PropertyValue,) - methodname = "[]string" + methodname = "[]string" + if not isinstance(PropertyValue,tuple): + if isinstance(PropertyValue,list): + methodname = "[]short" + PropertyValue = tuple(PropertyValue) + else: + PropertyValue = (PropertyValue,) + uno.invoke(xPSet, "setPropertyValue", (PropertyName, uno.Any( \ methodname, PropertyValue))) diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.py b/wizards/com/sun/star/wizards/ui/UnoDialog2.py index 8c2d805a3ab6..1bf696c2183e 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.py @@ -21,13 +21,11 @@ class UnoDialog2(UnoDialog): def __init__(self, xmsf): super(UnoDialog2,self).__init__(xmsf,(), ()) - self.guiEventListener = CommonListener() def insertButton(self, sName, actionPerformed, sPropNames, oPropValues, eventTarget=None): xButton = self.insertControlModel2("com.sun.star.awt.UnoControlButtonModel", sName, sPropNames, oPropValues) - if actionPerformed != None: - xButton.addActionListener(ActionListenerProcAdapter(self.guiEventListener)) - self.guiEventListener.add(sName, EVENT_ACTION_PERFORMED, actionPerformed, eventTarget) + if actionPerformed is not None: + xButton.addActionListener(ActionListenerProcAdapter(actionPerformed)) return xButton @@ -43,8 +41,7 @@ class UnoDialog2(UnoDialog): if itemChanged != None: if eventTarget is None: eventTarget = self - xCheckBox.addItemListener(ItemListenerProcAdapter(self.guiEventListener)) - self.guiEventListener.add(sName, EVENT_ITEM_CHANGED, itemChanged, eventTarget) + xCheckBox.addItemListener(ItemListenerProcAdapter(None)) return xCheckBox @@ -53,16 +50,13 @@ class UnoDialog2(UnoDialog): if eventTarget is None: eventTarget = self if actionPerformed != None: - xComboBox.addActionListener(self.guiEventListener) - self.guiEventListener.add(sName, EVENT_ACTION_PERFORMED, actionPerformed, eventTarget) + xComboBox.addActionListener(None) if itemChanged != None: - xComboBox.addItemListener(ItemListenerProcAdapter(self.guiEventListener)) - self.guiEventListener.add(sName, EVENT_ITEM_CHANGED, itemChanged, eventTarget) + xComboBox.addItemListener(ItemListenerProcAdapter(None)) if textChanged != None: - xComboBox.addTextListener(TextListenerProcAdapter(self.guiEventListener)) - self.guiEventListener.add(sName, EVENT_TEXT_CHANGED, textChanged, eventTarget) + xComboBox.addTextListener(TextListenerProcAdapter(None)) return xComboBox @@ -74,12 +68,10 @@ class UnoDialog2(UnoDialog): eventTarget = self if actionPerformed != None: - xListBox.addActionListener(self.guiEventListener) - self.guiEventListener.add(sName, EVENT_ACTION_PERFORMED, actionPerformed, eventTarget) + xListBox.addActionListener(None) if itemChanged != None: - xListBox.addItemListener(ItemListenerProcAdapter(self.guiEventListener)) - self.guiEventListener.add(sName, EVENT_ITEM_CHANGED, itemChanged, eventTarget) + xListBox.addItemListener(ItemListenerProcAdapter(None)) return xListBox @@ -89,8 +81,8 @@ class UnoDialog2(UnoDialog): if itemChanged != None: if eventTarget is None: eventTarget = self - xRadioButton.addItemListener(ItemListenerProcAdapter(self.guiEventListener)) - self.guiEventListener.add(sName, EVENT_ITEM_CHANGED, itemChanged, eventTarget) + xRadioButton.addItemListener(ItemListenerProcAdapter(None)) + return xRadioButton @@ -120,8 +112,7 @@ class UnoDialog2(UnoDialog): if sTextChanged != None: if eventTarget is None: eventTarget = self - xField.addTextListener(TextListenerProcAdapter(self.guiEventListener)) - self.guiEventListener.add(sName, EVENT_TEXT_CHANGED, sTextChanged, eventTarget) + xField.addTextListener(TextListenerProcAdapter(None)) return xField diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index 6dbdf53cea5e..e22f2d662d75 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -13,11 +13,7 @@ from event.EventNames import EVENT_ITEM_CHANGED class WizardDialog(UnoDialog2): __metaclass__ = ABCMeta - __NEXT_ACTION_PERFORMED = "gotoNextAvailableStep" - __BACK_ACTION_PERFORMED = "gotoPreviousAvailableStep" - __FINISH_ACTION_PERFORMED = "finishWizard_1" - __CANCEL_ACTION_PERFORMED = "cancelWizard_1" - __HELP_ACTION_PERFORMED = "callHelp" + ''' Creates a new instance of WizardDialog the hid is used as following : @@ -41,6 +37,7 @@ class WizardDialog(UnoDialog2): self.__bTerminateListenermustberemoved = True self.__oWizardResource = Resource(xMSF, "dbw") self.sMsgEndAutopilot = self.__oWizardResource.getResText(UIConsts.RID_DB_COMMON + 33) + self.oRoadmap = None #self.vetos = VetoableChangeSupport.VetoableChangeSupport_unknown(this) def getResource(self): @@ -121,13 +118,12 @@ class WizardDialog(UnoDialog2): # the roadmap control has got no real TabIndex ever # that is not correct, but changing this would need time, so it is used # without TabIndex as before - self.oRoadmap = self.insertControlModel("com.sun.star.awt.UnoControlRoadmapModel", "rdmNavi", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tabstop", PropertyNames.PROPERTY_WIDTH),((iDialogHeight - 26), 0, 0, 0, 0, True, uno.Any("short",85))) + self.oRoadmap = self.insertControlModel("com.sun.star.awt.UnoControlRoadmapModel", "rdmNavi", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tabstop", PropertyNames.PROPERTY_WIDTH),((iDialogHeight - 26), 0, 0, 0, uno.Any("short",0), True, uno.Any("short",85))) self.oRoadmap.setPropertyValue(PropertyNames.PROPERTY_NAME, "rdmNavi") mi = MethodInvocation("itemStateChanged", self) - self.guiEventListener.add("rdmNavi", EVENT_ITEM_CHANGED, mi) self.xRoadmapControl = self.xUnoDialog.getControl("rdmNavi") - self.xRoadmapControl.addItemListener(ItemListenerProcAdapter(self.guiEventListener)) + self.xRoadmapControl.addItemListener(ItemListenerProcAdapter(None)) Helper.setUnoPropertyValue(self.oRoadmap, "Text", self.__oWizardResource.getResText(UIConsts.RID_COMMON + 16)) except NoSuchMethodException, ex: @@ -176,21 +172,21 @@ class WizardDialog(UnoDialog2): return None def switchToStep(self,_nOldStep=None, _nNewStep=None): - if _nOldStep and _nNewStep: + if _nOldStep is not None and _nNewStep is not None: self.__nOldStep = _nOldStep self.__nNewStep = _nNewStep - leaveStep(self.__nOldStep, self.__nNewStep) + self.leaveStep(self.__nOldStep, self.__nNewStep) if self.__nNewStep != self.__nOldStep: if self.__nNewStep == self.__nMaxStep: - setControlProperty("btnWizardNext", "DefaultButton", False) - setControlProperty("btnWizardFinish", "DefaultButton", True) + self.setControlProperty("btnWizardNext", "DefaultButton", False) + self.setControlProperty("btnWizardFinish", "DefaultButton", True) else: - setControlProperty("btnWizardNext", "DefaultButton", True) - setControlProperty("btnWizardFinish", "DefaultButton", False) + self.setControlProperty("btnWizardNext", "DefaultButton", True) + self.setControlProperty("btnWizardFinish", "DefaultButton", False) - changeToStep(self.__nNewStep) - enterStep(self.__nOldStep, self.__nNewStep) + self.changeToStep(self.__nNewStep) + self.enterStep(self.__nOldStep, self.__nNewStep) return True return False @@ -205,15 +201,13 @@ class WizardDialog(UnoDialog2): def changeToStep(self, nNewStep): Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP, nNewStep) - setCurrentRoadmapItemID((short)(nNewStep)) - enableNextButton(getNextAvailableStep() > 0) - enableBackButton(nNewStep != 1) - + self.setCurrentRoadmapItemID(nNewStep) + self.enableNextButton(self.getNextAvailableStep() > 0) + self.enableBackButton(nNewStep != 1) def iscompleted(self, _ndialogpage): return False - def ismodified(self, _ndialogpage): return False @@ -235,19 +229,18 @@ class WizardDialog(UnoDialog2): self.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lnRoadSep",(PropertyNames.PROPERTY_HEIGHT, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH),(iBtnPosY - 6, 1, 85, 0, iCurStep, 1)) propNames = (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH) Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_HELPURL, HelpIds.getHelpIdString(self.__hid)) - self.insertButton("btnWizardHelp", WizardDialog.__HELP_ACTION_PERFORMED,(PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH),(True, iButtonHeight, self.__oWizardResource.getResText(UIConsts.RID_COMMON + 15), iHelpPosX, iBtnPosY, uno.Any("short",HELP), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) - self.insertButton("btnWizardBack", WizardDialog.__BACK_ACTION_PERFORMED, propNames,(False, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 2), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 13), iBackPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) - self.insertButton("btnWizardNext", WizardDialog.__NEXT_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 3), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 14), iNextPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) - self.insertButton("btnWizardFinish", WizardDialog.__FINISH_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 4), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 12), iFinishPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) - self.insertButton("btnWizardCancel", WizardDialog.__CANCEL_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 5), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 11), iCancelPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) + self.insertButton("btnWizardHelp", "",(PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH),(True, iButtonHeight, self.__oWizardResource.getResText(UIConsts.RID_COMMON + 15), iHelpPosX, iBtnPosY, uno.Any("short",HELP), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) + self.insertButton("btnWizardBack", self.gotoPreviousAvailableStep, propNames,(False, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 2), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 13), iBackPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) + self.insertButton("btnWizardNext", self.gotoNextAvailableStep, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 3), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 14), iNextPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) + self.insertButton("btnWizardFinish", self.finishWizard_1, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 4), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 12), iFinishPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) + self.insertButton("btnWizardCancel", self.cancelWizard_1, propNames,(True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 5), self.__oWizardResource.getResText(UIConsts.RID_COMMON + 11), iCancelPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth)) self.setControlProperty("btnWizardNext", "DefaultButton", True) # add a window listener, to know # if the user used "escape" key to # close the dialog. windowHidden = MethodInvocation("windowHidden", self) - self.xUnoDialog.addWindowListener(WindowListenerProcAdapter(self.guiEventListener)) + self.xUnoDialog.addWindowListener(WindowListenerProcAdapter(None)) dialogName = Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_NAME) - self.guiEventListener.add(dialogName, EVENT_ACTION_PERFORMED, windowHidden) except Exception, exception: traceback.print_exc() @@ -259,22 +252,22 @@ class WizardDialog(UnoDialog2): def setStepEnabled(self, _nStep, bEnabled, enableNextButton): setStepEnabled(_nStep, bEnabled) - if getNextAvailableStep() > 0: - enableNextButton(bEnabled) + if self.getNextAvailableStep() > 0: + self.enableNextButton(bEnabled) def enableNavigationButtons(self, _bEnableBack, _bEnableNext, _bEnableFinish): - enableBackButton(_bEnableBack) - enableNextButton(_bEnableNext) - enableFinishButton(_bEnableFinish) + self.enableBackButton(_bEnableBack) + self.enableNextButton(_bEnableNext) + self.enableFinishButton(_bEnableFinish) def enableBackButton(self, enabled): - setControlProperty("btnWizardBack", PropertyNames.PROPERTY_ENABLED, enabled) + self.setControlProperty("btnWizardBack", PropertyNames.PROPERTY_ENABLED, enabled) def enableNextButton(self, enabled): - setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, enabled) + self.setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, enabled) def enableFinishButton(self, enabled): - setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, enabled) + self.setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, enabled) def setStepEnabled(self, _nStep, bEnabled): xRoadmapItem = getRoadmapItemByID(_nStep) @@ -295,75 +288,81 @@ class WizardDialog(UnoDialog2): def isStepEnabled(self, _nStep): try: - xRoadmapItem = getRoadmapItemByID(_nStep) + xRoadmapItem = self.getRoadmapItemByID(_nStep) # Todo: In this case an exception should be thrown if (xRoadmapItem == None): return False - bIsEnabled = bool(Helper.getUnoPropertyValue(xRoadmapItem, PropertyNames.PROPERTY_ENABLED)) return bIsEnabled except UnoException, exception: traceback.print_exc() return False - def gotoPreviousAvailableStep(self): - if self.__nNewStep > 1: - self.__nOldStep = self.__nNewStep - self.__nNewStep -= 1 - while self.__nNewStep > 0: - bIsEnabled = isStepEnabled(self.__nNewStep) - if bIsEnabled: - break; - + def gotoPreviousAvailableStep(self, oActionEvent): + try: + if self.__nNewStep > 1: + self.__nOldStep = self.__nNewStep self.__nNewStep -= 1 - # Exception??? - if (self.__nNewStep == 0): - self.__nNewStep = self.__nOldStep - switchToStep() + while self.__nNewStep > 0: + bIsEnabled = self.isStepEnabled(self.__nNewStep) + if bIsEnabled: + break; + + self.__nNewStep -= 1 + if (self.__nNewStep == 0): + self.__nNewStep = self.__nOldStep + self.switchToStep() + except Exception, e: + traceback.print_exc() #TODO discuss with rp def getNextAvailableStep(self): - if isRoadmapComplete(): + if self.isRoadmapComplete(): i = self.__nNewStep + 1 while i <= self.__nMaxStep: - if isStepEnabled(i): + if self.isStepEnabled(i): return i i += 1 return -1 - def gotoNextAvailableStep(self): - self.__nOldStep = self.__nNewStep - self.__nNewStep = getNextAvailableStep() - if self.__nNewStep > -1: - switchToStep() + def gotoNextAvailableStep(self, oActionEvent): + try: + self.__nOldStep = self.__nNewStep + self.__nNewStep = self.getNextAvailableStep() + if self.__nNewStep > -1: + self.switchToStep() + except Exception, e: + traceback.print_exc() @abstractmethod def finishWizard(self): pass - #This function will call if the finish button is pressed on the UI. - - def finishWizard_1(self): - enableFinishButton(False) - success = False + def finishWizard_1(self, oActionEvent): + '''This function will call if the finish button is pressed on the UI''' try: - success = finishWizard() - finally: - if not success: - enableFinishButton(True) - - if success: - removeTerminateListener() + self.enableFinishButton(False) + success = False + try: + success = self.finishWizard() + finally: + if not success: + self.enableFinishButton(True) + + if success: + removeTerminateListener() + except Exception, e: + traceback.print_exc() def getMaximalStep(self): return self.__nMaxStep def getCurrentStep(self): try: - return int(Helper.getUnoPropertyValue(self.MSFDialogModel, PropertyNames.PROPERTY_STEP)) + return int(Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP)) except UnoException, exception: traceback.print_exc() return -1 @@ -404,9 +403,13 @@ class WizardDialog(UnoDialog2): perform a cancel. ''' - def cancelWizard_1(self): - cancelWizard() - removeTerminateListener() + def cancelWizard_1(self, oActionEvent): + try: + self.cancelWizard() + self.removeTerminateListener() + except Exception,e: + traceback.print_exc() + def windowHidden(self): cancelWizard_1() diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py b/wizards/com/sun/star/wizards/ui/event/CommonListener.py index 570be2557c75..1ab91eb51323 100644 --- a/wizards/com/sun/star/wizards/ui/event/CommonListener.py +++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.py @@ -1,73 +1,113 @@ -''' -import com.sun.star.awt.*; - -import com.sun.star.lang.EventObject; -''' -from AbstractListener import AbstractListener -from EventNames import * - -class CommonListener(AbstractListener): - - def __init__(self): - pass - - '''Implementation of com.sun.star.awt.XActionListener''' - def actionPerformed(self, actionEvent): - self.invoke(self.getEventSourceName(actionEvent), EVENT_ACTION_PERFORMED, actionEvent) - - '''Implementation of com.sun.star.awt.XItemListener''' - def itemStateChanged(self, itemEvent): - self.invoke(self.getEventSourceName(itemEvent), EVENT_ITEM_CHANGED, itemEvent) - - '''Implementation of com.sun.star.awt.XTextListener''' - def textChanged(self, textEvent): - self.invoke(self.getEventSourceName(textEvent), EVENT_TEXT_CHANGED, textEvent) - - '''@see com.sun.star.awt.XWindowListener#windowResized(com.sun.star.awt.WindowEvent)''' - def windowResized(self, event): - self.invoke(self.getEventSourceName(event), EVENT_WINDOW_RESIZED, event) - - '''@see com.sun.star.awt.XWindowListener#windowMoved(com.sun.star.awt.WindowEvent)''' - def windowMoved(self, event): - self.invoke(self.getEventSourceName(event), EVENT_WINDOW_MOVED, event) - - '''@see com.sun.star.awt.XWindowListener#windowShown(com.sun.star.lang.EventObject)''' - def windowShown(self, event): - self.invoke(self.getEventSourceName(event), EVENT_WINDOW_SHOWN, event) - - '''@see com.sun.star.awt.XWindowListener#windowHidden(com.sun.star.lang.EventObject)''' - def windowHidden(self, event): - self.invoke(self.getEventSourceName(event), EVENT_WINDOW_HIDDEN, event) - - '''@see com.sun.star.awt.XMouseListener#mousePressed(com.sun.star.awt.MouseEvent)''' - def mousePressed(self, event): - self.invoke(self.getEventSourceName(event), EVENT_MOUSE_PRESSED, event) - - '''@see com.sun.star.awt.XMouseListener#mouseReleased(com.sun.star.awt.MouseEvent)''' - def mouseReleased(self, event): - self.invoke(self.getEventSourceName(event), EVENT_KEY_RELEASED, event) - - '''@see com.sun.star.awt.XMouseListener#mouseEntered(com.sun.star.awt.MouseEvent)''' - def mouseEntered(self, event): - self.invoke(self.getEventSourceName(event), EVENT_MOUSE_ENTERED, event) - - '''@see com.sun.star.awt.XMouseListener#mouseExited(com.sun.star.awt.MouseEvent)''' - def mouseExited(self, event): - self.invoke(self.getEventSourceName(event), EVENT_MOUSE_EXITED, event) - - '''@see com.sun.star.awt.XFocusListener#focusGained(com.sun.star.awt.FocusEvent)''' - def focusGained(self, event): - self.invoke(self.getEventSourceName(event), EVENT_FOCUS_GAINED, event) - - '''@see com.sun.star.awt.XFocusListener#focusLost(com.sun.star.awt.FocusEvent)''' - def focusLost(self, event): - self.invoke(self.getEventSourceName(event), EVENT_FOCUS_LOST, event) - - '''@see com.sun.star.awt.XKeyListener#keyPressed(com.sun.star.awt.KeyEvent)''' - def keyPressed(self, event): - self.invoke(c(event), EVENT_KEY_PRESSED, event) - - '''@see com.sun.star.awt.XKeyListener#keyReleased(com.sun.star.awt.KeyEvent)''' - def keyReleased(self, event): - self.invoke(self.getEventSourceName(event), EVENT_KEY_RELEASED, event) - +#********************************************************************** +# +# Danny.OOo.Listeners.ListenerProcAdapters.py +# +# A module to easily work with OpenOffice.org. +# +#********************************************************************** +# Copyright (c) 2003-2004 Danny Brewer +# d29583@groovegarden.com +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See: http://www.gnu.org/licenses/lgpl.html +# +#********************************************************************** +# If you make changes, please append to the change log below. +# +# Change Log +# Danny Brewer Revised 2004-06-05-01 +# +#********************************************************************** + +# OOo's libraries +import uno +import unohelper +import inspect + +#-------------------------------------------------- +# An ActionListener adapter. +# This object implements com.sun.star.awt.XActionListener. +# When actionPerformed is called, this will call an arbitrary +# python procedure, passing it... +# 1. the oActionEvent +# 2. any other parameters you specified to this object's constructor (as a tuple). +from com.sun.star.awt import XActionListener +class ActionListenerProcAdapter( unohelper.Base, XActionListener ): + def __init__( self, oProcToCall, tParams=() ): + self.oProcToCall = oProcToCall # a python procedure + self.tParams = tParams # a tuple + + + # oActionEvent is a com.sun.star.awt.ActionEvent struct. + def actionPerformed( self, oActionEvent ): + if callable( self.oProcToCall ): + apply( self.oProcToCall, (oActionEvent,) + self.tParams ) + + +#-------------------------------------------------- +# An ItemListener adapter. +# This object implements com.sun.star.awt.XItemListener. +# When itemStateChanged is called, this will call an arbitrary +# python procedure, passing it... +# 1. the oItemEvent +# 2. any other parameters you specified to this object's constructor (as a tuple). +from com.sun.star.awt import XItemListener +class ItemListenerProcAdapter( unohelper.Base, XItemListener ): + def __init__( self, oProcToCall, tParams=() ): + self.oProcToCall = oProcToCall # a python procedure + self.tParams = tParams # a tuple + + # oItemEvent is a com.sun.star.awt.ItemEvent struct. + def itemStateChanged( self, oItemEvent ): + if callable( self.oProcToCall ): + apply( self.oProcToCall, (oActionEvent,) + self.tParams ) + + +#-------------------------------------------------- +# An TextListener adapter. +# This object implements com.sun.star.awt.XTextistener. +# When textChanged is called, this will call an arbitrary +# python procedure, passing it... +# 1. the oTextEvent +# 2. any other parameters you specified to this object's constructor (as a tuple). +from com.sun.star.awt import XTextListener +class TextListenerProcAdapter( unohelper.Base, XTextListener ): + def __init__( self, oProcToCall, tParams=() ): + self.oProcToCall = oProcToCall # a python procedure + self.tParams = tParams # a tuple + + # oTextEvent is a com.sun.star.awt.TextEvent struct. + def textChanged( self, oTextEvent ): + if callable( self.oProcToCall ): + apply( self.oProcToCall, (oTextEvent,) + self.tParams ) + +#-------------------------------------------------- +# An Window adapter. +# This object implements com.sun.star.awt.XWindowListener. +# When textChanged is called, this will call an arbitrary +# python procedure, passing it... +# 1. the oTextEvent +# 2. any other parameters you specified to this object's constructor (as a tuple). +from com.sun.star.awt import XWindowListener +class WindowListenerProcAdapter( unohelper.Base, XWindowListener ): + def __init__( self, oProcToCall, tParams=() ): + self.oProcToCall = oProcToCall # a python procedure + self.tParams = tParams # a tuple + + # oTextEvent is a com.sun.star.awt.TextEvent struct. + def windowResized(self, actionEvent): + if callable( self.oProcToCall ): + apply( self.oProcToCall, (actionEvent,) + self.tParams ) diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.py b/wizards/com/sun/star/wizards/ui/event/DataAware.py index dfd62438b5ac..36f421ecad7d 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.py @@ -2,9 +2,6 @@ from common.PropertyNames import * from abc import ABCMeta, abstractmethod import traceback -#TEMPORAL -import inspect - ''' @author rpiterman DataAware objects are used to live-synchronize UI and DataModel/DataObject. diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py index efa017f55755..b23cce2eef01 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py +++ b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py @@ -106,6 +106,8 @@ class DataAwareFields(object): return int(i) elif isinstance(self.convertTo,str): return str(i) + elif self.convertTo.type == uno.Any("short",0).type: + return uno.Any("[]short",(i,)) else: raise AttributeError("Cannot convert int value to given type (" + str(type(self.convertTo)) + ")."); diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py index 65d22bf6181e..5654eb7d54f7 100644 --- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py @@ -167,7 +167,7 @@ class UnoDataAware(DataAware): @classmethod def attachListBox(self, data, prop, listBox, listener, field): if field: - aux = DataAwareFields.getFieldValueFor(data, prop, 0) + aux = DataAwareFields.getFieldValueFor(data, prop, uno.Any("short",0)) else: aux = DataAware.PropertyValue (prop, data) uda = UnoDataAware(data, aux, listBox, "SelectedItems") -- cgit v1.2.3 From 5d651370c4df69edd4377454effec2f8f2a0486f Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Wed, 15 Jun 2011 19:09:17 +0200 Subject: Line length <= 80 --- wizards/com/sun/star/wizards/__init__.py | 0 wizards/com/sun/star/wizards/common/ConfigGroup.py | 3 +- .../com/sun/star/wizards/common/Configuration.py | 74 +- wizards/com/sun/star/wizards/common/Desktop.py | 66 +- wizards/com/sun/star/wizards/common/FileAccess.py | 154 +- wizards/com/sun/star/wizards/common/HelpIds.py | 2014 ++++++++++---------- wizards/com/sun/star/wizards/common/Helper.py | 50 +- .../star/wizards/common/NoValidPathException.py | 3 +- .../sun/star/wizards/common/PropertySetHelper.py | 26 +- wizards/com/sun/star/wizards/common/Resource.py | 18 +- .../com/sun/star/wizards/common/SystemDialog.py | 33 +- .../sun/star/wizards/document/OfficeDocument.py | 60 +- wizards/com/sun/star/wizards/document/__init__.py | 0 wizards/com/sun/star/wizards/fax/CallWizard.py | 72 +- wizards/com/sun/star/wizards/fax/FaxDocument.py | 62 +- .../com/sun/star/wizards/fax/FaxWizardDialog.py | 672 ++++++- .../sun/star/wizards/fax/FaxWizardDialogConst.py | 75 +- .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 509 +++-- .../star/wizards/fax/FaxWizardDialogResources.py | 161 +- wizards/com/sun/star/wizards/text/TextDocument.py | 90 +- .../com/sun/star/wizards/text/TextFieldHandler.py | 72 +- .../sun/star/wizards/text/TextSectionHandler.py | 51 +- wizards/com/sun/star/wizards/text/ViewHandler.py | 17 +- wizards/com/sun/star/wizards/text/__init__.py | 0 wizards/com/sun/star/wizards/ui/PathSelection.py | 70 +- wizards/com/sun/star/wizards/ui/PeerConfig.py | 50 +- wizards/com/sun/star/wizards/ui/UnoDialog.py | 285 ++- wizards/com/sun/star/wizards/ui/UnoDialog2.py | 201 +- wizards/com/sun/star/wizards/ui/WizardDialog.py | 204 +- .../sun/star/wizards/ui/event/CommonListener.py | 12 +- wizards/com/sun/star/wizards/ui/event/DataAware.py | 37 +- .../sun/star/wizards/ui/event/DataAwareFields.py | 13 +- .../sun/star/wizards/ui/event/MethodInvocation.py | 3 +- .../sun/star/wizards/ui/event/RadioDataAware.py | 2 +- .../com/sun/star/wizards/ui/event/UnoDataAware.py | 24 +- wizards/com/sun/star/wizards/ui/event/__init__.py | 0 36 files changed, 3296 insertions(+), 1887 deletions(-) create mode 100644 wizards/com/sun/star/wizards/__init__.py create mode 100644 wizards/com/sun/star/wizards/document/__init__.py create mode 100644 wizards/com/sun/star/wizards/text/__init__.py create mode 100644 wizards/com/sun/star/wizards/ui/event/__init__.py (limited to 'wizards/com/sun/star/wizards/fax/FaxDocument.py') diff --git a/wizards/com/sun/star/wizards/__init__.py b/wizards/com/sun/star/wizards/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/wizards/com/sun/star/wizards/common/ConfigGroup.py b/wizards/com/sun/star/wizards/common/ConfigGroup.py index 02ba16cb63c2..d8675f4aa556 100644 --- a/wizards/com/sun/star/wizards/common/ConfigGroup.py +++ b/wizards/com/sun/star/wizards/common/ConfigGroup.py @@ -66,7 +66,8 @@ class ConfigGroup(ConfigNode): fieldType = type(child) if type(ConfigNode) == fieldType: child.setRoot(self.root) - child.readConfiguration(Configuration.getNode(propertyName, configView), prefix) + child.readConfiguration(Configuration.getNode(propertyName, configView), + prefix) field.set(this, Configuration.getString(propertyName, configView)) def setRoot(self, newRoot): diff --git a/wizards/com/sun/star/wizards/common/Configuration.py b/wizards/com/sun/star/wizards/common/Configuration.py index adf7e8a7f6e4..c73dec9d8348 100644 --- a/wizards/com/sun/star/wizards/common/Configuration.py +++ b/wizards/com/sun/star/wizards/common/Configuration.py @@ -5,14 +5,16 @@ import traceback import uno ''' This class gives access to the OO configuration api. -It contains 4 get and 4 set convenience methods for getting and settings properties -in the configuration.
-For the get methods, two parameters must be given: name and parent, where name is the -name of the property, parent is a HierarchyElement (::com::sun::star::configuration::HierarchyElement)
-The get and set methods support hieryrchical property names like "options/gridX".
+It contains 4 get and 4 set convenience methods for getting and settings +properties in the configuration.
+For the get methods, two parameters must be given: name and parent, where +name is the name of the property, parent is a HierarchyElement +(::com::sun::star::configuration::HierarchyElement)
+The get and set methods support hieryrchical property names like +"options/gridX".
NOTE: not yet supported, but sometime later, -If you will ommit the "parent" parameter, then the "name" parameter must be in hierarchy form from -the root of the registry. +If you will ommit the "parent" parameter, then the "name" parameter must be +in hierarchy form from the root of the registry. ''' class Configuration(object): @@ -86,22 +88,26 @@ class Configuration(object): @classmethod def getConfigurationRoot(self, xmsf, sPath, updateable): - oConfigProvider = xmsf.createInstance("com.sun.star.configuration.ConfigurationProvider") + oConfigProvider = xmsf.createInstance( + "com.sun.star.configuration.ConfigurationProvider") if updateable: sView = "com.sun.star.configuration.ConfigurationUpdateAccess" else: sView = "com.sun.star.configuration.ConfigurationAccess" - aPathArgument = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + aPathArgument = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') aPathArgument.Name = "nodepath" aPathArgument.Value = sPath - aModeArgument = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + aModeArgument = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') if updateable: aModeArgument.Name = "lazywrite" aModeArgument.Value = False - return oConfigProvider.createInstanceWithArguments(sView,(aPathArgument,aModeArgument,)) + return oConfigProvider.createInstanceWithArguments(sView, + (aPathArgument,aModeArgument,)) @classmethod def getChildrenNames(self, configView): @@ -110,7 +116,8 @@ class Configuration(object): @classmethod def getProductName(self, xMSF): try: - oProdNameAccess = self.getConfigurationRoot(xMSF, "org.openoffice.Setup/Product", False) + oProdNameAccess = self.getConfigurationRoot(xMSF, + "org.openoffice.Setup/Product", False) ProductName = Helper.getUnoObjectbyName(oProdNameAccess, "ooName") return ProductName except UnoException: @@ -122,7 +129,8 @@ class Configuration(object): sLocale = "" try: aLocLocale = Locale.Locale() - oMasterKey = self.getConfigurationRoot(xMSF, "org.openoffice.Setup/L10N/", False) + oMasterKey = self.getConfigurationRoot(xMSF, + "org.openoffice.Setup/L10N/", False) sLocale = (String) Helper.getUnoObjectbyName(oMasterKey, "ooLocale") except UnoException, exception: @@ -144,7 +152,8 @@ class Configuration(object): @classmethod def getOfficeLinguistic(self, xMSF): try: - oMasterKey = self.getConfigurationRoot(xMSF, "org.openoffice.Setup/L10N/", False) + oMasterKey = self.getConfigurationRoot(xMSF, + "org.openoffice.Setup/L10N/", False) sLinguistic = Helper.getUnoObjectbyName(oMasterKey, "ooLocale") return sLinguistic except UnoException, exception: @@ -202,7 +211,8 @@ class Configuration(object): @classmethod def getNodeDisplayNames(self, _xNameAccessNode): snames = None - return getNodeChildNames(_xNameAccessNode, PropertyNames.PROPERTY_NAME) + return getNodeChildNames(_xNameAccessNode, + PropertyNames.PROPERTY_NAME) @classmethod def getNodeChildNames(self, xNameAccessNode, _schildname): @@ -212,10 +222,12 @@ class Configuration(object): sdisplaynames = range(snames.length) i = 0 while i < snames.length: - oContent = Helper.getUnoPropertyValue(xNameAccessNode.getByName(snames[i]), _schildname) + oContent = Helper.getUnoPropertyValue( + xNameAccessNode.getByName(snames[i]), _schildname) if not AnyConverter.isVoid(oContent): sdisplaynames[i] = (String) - Helper.getUnoPropertyValue(xNameAccessNode.getByName(snames[i]), _schildname) + Helper.getUnoPropertyValue(xNameAccessNode.getByName( + snames[i]), _schildname) else: sdisplaynames[i] = snames[i] @@ -249,17 +261,21 @@ class Configuration(object): @classmethod def getChildNodebyDisplayName(self, _xNameAccessNode, _displayname): snames = None - return getChildNodebyDisplayName(_xNameAccessNode, _displayname, PropertyNames.PROPERTY_NAME) + return getChildNodebyDisplayName(_xNameAccessNode, _displayname, + PropertyNames.PROPERTY_NAME) @classmethod - def getChildNodebyDisplayName(self, _xNameAccessNode, _displayname, _nodename): + def getChildNodebyDisplayName(self, _xNameAccessNode, _displayname, + _nodename): + snames = None try: snames = _xNameAccessNode.getElementNames() sdisplaynames = range(snames.length) i = 0 while i < snames.length: - curdisplayname = Helper.getUnoPropertyValue(_xNameAccessNode.getByName(snames[i]), _nodename) + curdisplayname = Helper.getUnoPropertyValue( + _xNameAccessNode.getByName(snames[i]), _nodename) if curdisplayname.equals(_displayname): return _xNameAccessNode.getByName(snames[i]) @@ -270,18 +286,24 @@ class Configuration(object): return None @classmethod - def getChildNodebyDisplayName(self, _xMSF, _aLocale, _xNameAccessNode, _displayname, _nodename, _nmaxcharcount): + def getChildNodebyDisplayName(self, _xMSF, _aLocale, _xNameAccessNode, + _displayname, _nodename, _nmaxcharcount): + snames = None try: snames = _xNameAccessNode.getElementNames() sdisplaynames = range(snames.length) i = 0 while i < snames.length: - curdisplayname = Helper.getUnoPropertyValue(_xNameAccessNode.getByName(snames[i]), _nodename) - if (_nmaxcharcount > 0) and (_nmaxcharcount < curdisplayname.length()): - curdisplayname = curdisplayname.substring(0, _nmaxcharcount) - - curdisplayname = Desktop.removeSpecialCharacters(_xMSF, _aLocale, curdisplayname) + curdisplayname = Helper.getUnoPropertyValue( + _xNameAccessNode.getByName(snames[i]), _nodename) + if (_nmaxcharcount > 0) and (_nmaxcharcount < \ + curdisplayname.length()): + curdisplayname = curdisplayname.substring(0, + _nmaxcharcount) + + curdisplayname = Desktop.removeSpecialCharacters(_xMSF, + _aLocale, curdisplayname) if curdisplayname.equals(_displayname): return _xNameAccessNode.getByName(snames[i]) diff --git a/wizards/com/sun/star/wizards/common/Desktop.py b/wizards/com/sun/star/wizards/common/Desktop.py index a08f12c4f947..81dab16877ec 100644 --- a/wizards/com/sun/star/wizards/common/Desktop.py +++ b/wizards/com/sun/star/wizards/common/Desktop.py @@ -57,7 +57,8 @@ class Desktop(object): @classmethod def getDispatchURL(self, xMSF, _sURL): try: - oTransformer = xMSF.createInstance("com.sun.star.util.URLTransformer") + oTransformer = xMSF.createInstance( + "com.sun.star.util.URLTransformer") oURL = range(1) oURL[0] = com.sun.star.util.URL.URL() oURL[0].Complete = _sURL @@ -87,7 +88,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 @@ -96,8 +97,10 @@ class Desktop(object): def checkforfirstSpecialCharacter(self, _xMSF, _sString, _aLocale): try: nStartFlags = ANY_LETTER_OR_NUMBER + ASC_UNDERSCORE - ocharservice = _xMSF.createInstance("com.sun.star.i18n.CharacterClassification") - aResult = ocharservice.parsePredefinedToken(KParseType.IDENTNAME, _sString, 0, _aLocale, nStartFlags, "", nStartFlags, " ") + ocharservice = _xMSF.createInstance( + "com.sun.star.i18n.CharacterClassification") + aResult = ocharservice.parsePredefinedToken(KParseType.IDENTNAME, + _sString, 0, _aLocale, nStartFlags, "", nStartFlags, " ") return aResult.EndPos except UnoException, e: e.printStackTrace(System.out) @@ -108,16 +111,18 @@ class Desktop(object): snewname = _sname i = 0 while i < snewname.length(): - i = Desktop.checkforfirstSpecialCharacter(_xMSF, snewname, _aLocale) + i = Desktop.checkforfirstSpecialCharacter(_xMSF, snewname, + _aLocale) if i < snewname.length(): sspecialchar = snewname.substring(i, i + 1) - snewname = JavaTools.replaceSubString(snewname, "", sspecialchar) + snewname = JavaTools.replaceSubString(snewname, "", + sspecialchar) return snewname ''' - Checks if the passed Element Name already exists in the ElementContainer. If yes it appends a - suffix to make it unique + Checks if the passed Element Name already exists in the ElementContainer. + If yes it appends a suffix to make it unique @param xElementContainer @param sElementName @return a unique Name ready to be added to the container. @@ -141,8 +146,8 @@ class Desktop(object): return sElementName + sIncSuffix ''' - Checks if the passed Element Name already exists in the list If yes it appends a - suffix to make it unique + Checks if the passed Element Name already exists in the list If yes it + ppends a suffix to make it unique @param _slist @param _sElementName @param _sSuffixSeparator @@ -171,7 +176,8 @@ class Desktop(object): return "" ''' - @deprecated use Configuration.getConfigurationRoot() with the same parameters instead + @deprecated use Configuration.getConfigurationRoot() with the same + arameters instead @param xMSF @param KeyName @param bForUpdate @@ -182,14 +188,20 @@ class Desktop(object): def getRegistryKeyContent(self, xMSF, KeyName, bForUpdate): try: aNodePath = range(1) - oConfigProvider = xMSF.createInstance("com.sun.star.configuration.ConfigurationProvider") - aNodePath[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + oConfigProvider = xMSF.createInstance( + "com.sun.star.configuration.ConfigurationProvider") + aNodePath[0] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') aNodePath[0].Name = "nodepath" aNodePath[0].Value = KeyName if bForUpdate: - return oConfigProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess", aNodePath) + return oConfigProvider.createInstanceWithArguments( + "com.sun.star.configuration.ConfigurationUpdateAccess", + aNodePath) else: - return oConfigProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", aNodePath) + return oConfigProvider.createInstanceWithArguments( + "com.sun.star.configuration.ConfigurationAccess", + aNodePath) except UnoException, exception: exception.printStackTrace(System.out) @@ -199,10 +211,14 @@ class OfficePathRetriever: def OfficePathRetriever(self, xMSF): try: - TemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard") - UserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", "") - BitmapPath = FileAccess.combinePaths(xMSF, TemplatePath, "/../wizard/bitmap") - WorkPath = FileAccess.getOfficePath(xMSF, "Work", "", "") + TemplatePath = FileAccess.getOfficePath(xMSF, + "Template", "share", "/wizard") + UserTemplatePath = FileAccess.getOfficePath(xMSF, + "Template", "user", "") + BitmapPath = FileAccess.combinePaths(xMSF, TemplatePath, + "/../wizard/bitmap") + WorkPath = FileAccess.getOfficePath(xMSF, + "Work", "", "") except NoValidPathException, nopathexception: pass @@ -210,7 +226,8 @@ class OfficePathRetriever: def getTemplatePath(self, _xMSF): sTemplatePath = "" try: - sTemplatePath = FileAccess.getOfficePath(_xMSF, "Template", "share", "/wizard") + sTemplatePath = FileAccess.getOfficePath(_xMSF, + "Template", "share", "/wizard") except NoValidPathException, nopathexception: pass return sTemplatePath @@ -219,7 +236,8 @@ class OfficePathRetriever: def getUserTemplatePath(self, _xMSF): sUserTemplatePath = "" try: - sUserTemplatePath = FileAccess.getOfficePath(_xMSF, "Template", "user", "") + sUserTemplatePath = FileAccess.getOfficePath(_xMSF, + "Template", "user", "") except NoValidPathException, nopathexception: pass return sUserTemplatePath @@ -228,7 +246,8 @@ class OfficePathRetriever: def getBitmapPath(self, _xMSF): sBitmapPath = "" try: - sBitmapPath = FileAccess.combinePaths(_xMSF, getTemplatePath(_xMSF), "/../wizard/bitmap") + sBitmapPath = FileAccess.combinePaths(_xMSF, + getTemplatePath(_xMSF), "/../wizard/bitmap") except NoValidPathException, nopathexception: pass @@ -249,7 +268,8 @@ class OfficePathRetriever: def createStringSubstitution(self, xMSF): xPathSubst = None try: - xPathSubst = xMSF.createInstance("com.sun.star.util.PathSubstitution") + xPathSubst = xMSF.createInstance( + "com.sun.star.util.PathSubstitution") except com.sun.star.uno.Exception, e: e.printStackTrace() diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 641746adfdac..c129b6b842a5 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -2,6 +2,7 @@ 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 ''' @@ -27,8 +28,12 @@ class FileAccess(object): def addOfficePath(self, xMSF, sPath, sAddPath): xSimpleFileAccess = None ResultPath = getOfficePath(xMSF, sPath, xSimpleFileAccess) - # As there are several conventions about the look of Url (e.g. with " " or with "%20") you cannot make a - # simple String comparison to find out, if a path is already in "ResultPath" + ''' + As there are several conventions about the look of Url + (e.g. with " " or with "%20") you cannot make a + simple String comparison to find out, if a path + is already in "ResultPath + ''' PathList = JavaTools.ArrayoutofString(ResultPath, ";") MaxIndex = PathList.length - 1 CompAddPath = JavaTools.replaceSubString(sAddPath, "", "/") @@ -56,7 +61,8 @@ class FileAccess(object): @param xMSF @param sPath @param xSimpleFileAccess - @return the respective path of the office application. A probable following "/" at the end is trimmed. + @return the respective path of the office application. + A probable following "/" at the end is trimmed. ''' @classmethod @@ -76,7 +82,8 @@ class FileAccess(object): chapter 6.2.7 @param xMSF @param sPath - @param sType use "share" or "user". Set to "" if not needed eg for the WorkPath; + @param sType use "share" or "user". Set to "" + f not needed eg for the WorkPath; In the return Officepath a possible slash at the end is cut off @param sSearchDir @return @@ -88,13 +95,18 @@ class FileAccess(object): #This method currently only works with sPath="Template" bexists = False try: - xPathInterface = xMSF.createInstance("com.sun.star.util.PathSettings") + xPathInterface = xMSF.createInstance( + "com.sun.star.util.PathSettings") ResultPath = "" ReadPaths = () - xUcbInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") - Template_writable = xPathInterface.getPropertyValue(sPath + "_writable") - Template_internal = xPathInterface.getPropertyValue(sPath + "_internal") - Template_user = xPathInterface.getPropertyValue(sPath + "_user") + xUcbInterface = xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") + Template_writable = xPathInterface.getPropertyValue( + sPath + "_writable") + Template_internal = xPathInterface.getPropertyValue( + sPath + "_internal") + Template_user = xPathInterface.getPropertyValue( + sPath + "_user") if type(Template_internal) is not types.InstanceType: if isinstance(Template_internal,tuple): ReadPaths = ReadPaths + Template_internal @@ -134,16 +146,20 @@ class FileAccess(object): aPathList = [] Template_writable = "" try: - xPathInterface = xMSF.createInstance("com.sun.star.util.PathSettings") - Template_writable = xPathInterface.getPropertyValue(_sPath + "_writable") - Template_internal = xPathInterface.getPropertyValue(_sPath + "_internal") + xPathInterface = xMSF.createInstance( + "com.sun.star.util.PathSettings") + Template_writable = xPathInterface.getPropertyValue( + _sPath + "_writable") + Template_internal = xPathInterface.getPropertyValue( + _sPath + "_internal") Template_user = xPathInterface.getPropertyValue(_sPath + "_user") i = 0 while i < len(Template_internal): sPath = Template_internal[i] if sPath.startsWith("vnd."): - # if there exists a language in the directory, we try to add the right language - sPathToExpand = sPath.substring("vnd.sun.star.Expand:".length()) + # if there exists a language in the directory, + # we try to add the right language + sPathToExpand = sPath.substring(len("vnd.sun.star.Expand:")) xExpander = Helper.getMacroExpander(xMSF) sPath = xExpander.expandMacros(sPathToExpand) @@ -179,7 +195,8 @@ class FileAccess(object): aLocaleAll = StringBuffer.StringBuffer() aLocaleAll.append(sLanguage).append('-').append(sCountry).append('-').append(sVariant) sPath = _sPath + "/" + aLocaleAll.toString() - xInterface = _xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + xInterface = _xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") if xInterface.exists(sPath): # de-DE return sPath @@ -230,7 +247,8 @@ class FileAccess(object): def isPathValid(self, xMSF, _sPath): bExists = False try: - xUcbInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + xUcbInterface = xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") bExists = xUcbInterface.exists(_sPath) except Exception, exception: traceback.print_exc() @@ -242,7 +260,8 @@ class FileAccess(object): bexists = False ReturnPath = "" try: - xUcbInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + xUcbInterface = xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") ReturnPath = _sFirstPath + _sSecondPath bexists = xUcbInterface.exists(ReturnPath) except Exception, exception: @@ -264,10 +283,12 @@ class FileAccess(object): sMsgDirNotThere = oResource.getResText(1051) sQueryForNewCreation = oResource.getResText(1052) OSPath = JavaTools.convertfromURLNotation(Path) - sQueryMessage = JavaTools.replaceSubString(sMsgDirNotThere, OSPath, "%1") + sQueryMessage = JavaTools.replaceSubString(sMsgDirNotThere, + OSPath, "%1") sQueryMessage = sQueryMessage + (char) 13 + sQueryForNewCreation - icreate = SystemDialog.showMessageBox(xMSF, "QueryBox", VclWindowPeerAttribute.YES_NO, sQueryMessage) + icreate = SystemDialog.showMessageBox(xMSF, "QueryBox", + YES_NO, sQueryMessage) if icreate == 2: xSimpleFileAccess.createFolder(Path) return True @@ -275,31 +296,40 @@ class FileAccess(object): return False except CommandAbortedException, exception: sMsgNoDir = JavaTools.replaceSubString(sNoDirCreation, Path, "%1") - SystemDialog.showMessageBox(xMSF, "ErrorBox", VclWindowPeerAttribute.OK, sMsgNoDir) + SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, sMsgNoDir) return False except com.sun.star.uno.Exception, unoexception: sMsgNoDir = JavaTools.replaceSubString(sNoDirCreation, Path, "%1") - SystemDialog.showMessageBox(xMSF, "ErrorBox", VclWindowPeerAttribute.OK, sMsgNoDir) + SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, sMsgNoDir) return False - # checks if the root of a path exists. if the parameter xWindowPeer is not null then also the directory is - # created when it does not exists and the user + ''' + checks if the root of a path exists. if the parameter + xWindowPeer is not null then also the directory is + created when it does not exists and the user + ''' @classmethod - def PathisValid(self, xMSF, Path, sMsgFilePathInvalid, baskbeforeOverwrite): + def PathisValid(self, xMSF, Path, sMsgFilePathInvalid, + baskbeforeOverwrite): try: SubDirPath = "" bSubDirexists = True NewPath = Path - xInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + xInterface = xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") if baskbeforeOverwrite: if xInterface.exists(Path): - oResource = Resource.Resource_unknown(xMSF, "ImportWizard", "imp") + oResource = Resource.Resource_unknown(xMSF, + "ImportWizard", "imp") sFileexists = oResource.getResText(1053) NewString = JavaTools.convertfromURLNotation(Path) - sFileexists = JavaTools.replaceSubString(sFileexists, NewString, "<1>") - sFileexists = JavaTools.replaceSubString(sFileexists, String.valueOf(13), "") - iLeave = SystemDialog.showMessageBox(xMSF, "QueryBox", VclWindowPeerAttribute.YES_NO, sFileexists) + sFileexists = JavaTools.replaceSubString(sFileexists, + NewString, "<1>") + sFileexists = JavaTools.replaceSubString(sFileexists, + str(13), "") + iLeave = SystemDialog.showMessageBox(xMSF, "QueryBox", + YES_NO, sFileexists) if iLeave == 3: return False @@ -320,11 +350,15 @@ class FileAccess(object): bexists = xSimpleFileAccess.exists(NewPath) if bexists: LowerCasePath = NewPath.toLowerCase() - bexists = (((LowerCasePath.equals("file:#/")) or (LowerCasePath.equals("file:#")) or (LowerCasePath.equals("file:/")) or (LowerCasePath.equals("file:"))) == False) + bexists = (((LowerCasePath.equals("file:#/")) or + (LowerCasePath.equals("file:#")) or + (LowerCasePath.equals("file:/")) or + (LowerCasePath.equals("file:"))) == False) if bexists: if bSubDirexists == False: - bSubDiriscreated = createSubDirectory(xMSF, xSimpleFileAccess, SubDirPath) + bSubDiriscreated = createSubDirectory(xMSF, + xSimpleFileAccess, SubDirPath) return bSubDiriscreated return True @@ -333,21 +367,23 @@ class FileAccess(object): i -= 1 - SystemDialog.showMessageBox(xMSF, "ErrorBox", VclWindowPeerAttribute.OK, sMsgFilePathInvalid) + SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, + sMsgFilePathInvalid) return False except com.sun.star.uno.Exception, exception: traceback.print_exc() - SystemDialog.showMessageBox(xMSF, "ErrorBox", VclWindowPeerAttribute.OK, sMsgFilePathInvalid) + SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, + sMsgFilePathInvalid) return False ''' searches a directory for files which start with a certain prefix, and returns their URLs and document-titles. @param xMSF - @param FilterName the prefix of the filename. a "-" is added to the prefix ! + @param FilterName the prefix of the filename. a "-" is added to the prefix @param FolderName the folder (URL) to look for files... - @return an array with two array members. The first one, with document titles, - the second with the corresponding URLs. + @return an array with two array members. The first one, with document + titles, the second with the corresponding URLs. @deprecated please use the getFolderTitles() with ArrayList ''' @@ -357,8 +393,10 @@ class FileAccess(object): try: TitleVector = None NameVector = None - xDocInterface = xMSF.createInstance("com.sun.star.document.DocumentProperties") - xInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + xDocInterface = xMSF.createInstance( + "com.sun.star.document.DocumentProperties") + xInterface = xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") nameList = xInterface.getFolderContents(FolderName, False) TitleVector = [] NameVector = [] @@ -406,7 +444,8 @@ class FileAccess(object): def getPathFromList(self, xMSF, _aList, _sFile): sFoundFile = "" try: - xInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + xInterface = xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") i = 0 while i < _aList.size(): sPath = _aList.get(i) @@ -424,7 +463,8 @@ class FileAccess(object): def getTitle(self, xMSF, _sFile): sTitle = "" try: - xDocInterface = xMSF.createInstance("com.sun.star.document.DocumentProperties") + xDocInterface = xMSF.createInstance( + "com.sun.star.document.DocumentProperties") noArgs = [] xDocInterface.loadFromMedium(_sFile, noArgs) sTitle = xDocInterface.getTitle() @@ -434,7 +474,9 @@ class FileAccess(object): return sTitle @classmethod - def getFolderTitles2(self, xMSF, _sStartFilterName, FolderName, _sEndFilterName=""): + def getFolderTitles2(self, xMSF, _sStartFilterName, FolderName, + _sEndFilterName=""): + LocLayoutFiles = [[2],[]] if FolderName.size() == 0: raise NoValidPathException (None, "Path not given."); @@ -443,7 +485,8 @@ class FileAccess(object): URLVector = [] xInterface = None try: - xInterface = xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + xInterface = xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") except com.sun.star.uno.Exception, e: traceback.print_exc() raise NoValidPathException (None, "Internal error."); @@ -462,11 +505,13 @@ class FileAccess(object): i = 0 while i < nameList.length: fileName = self.getFilename(i) - if _sStartFilterName == None or fileName.startsWith(_sStartFilterName): + if _sStartFilterName == None or \ + fileName.startsWith(_sStartFilterName): if _sEndFilterName.equals(""): sTitle = getTitle(xMSF, nameList[i]) elif fileName.endsWith(_sEndFilterName): - fileName = fileName.replaceAll(_sEndFilterName + "$", "") + fileName = fileName.replaceAll( + _sEndFilterName + "$", "") sTitle = fileName else: # no or wrong (start|end) filter @@ -498,9 +543,11 @@ class FileAccess(object): def __init__(self, xmsf): #get a simple file access... - self.fileAccess = xmsf.createInstance("com.sun.star.ucb.SimpleFileAccess") + self.fileAccess = xmsf.createInstance( + "com.sun.star.ucb.SimpleFileAccess") #get the file identifier converter - self.filenameConverter = xmsf.createInstance("com.sun.star.ucb.FileContentProvider") + self.filenameConverter = xmsf.createInstance( + "com.sun.star.ucb.FileContentProvider") def getURL(self, path, childPath=None): if childPath is not None: @@ -509,14 +556,16 @@ class FileAccess(object): else: f = open(path) - r = self.filenameConverter.getFileURLFromSystemPath(path, f.getAbsolutePath()) + r = self.filenameConverter.getFileURLFromSystemPath(path, + f.getAbsolutePath()) return r def getPath(self, parentURL, childURL): string = "" if childURL is not None and childURL is not "": string = "/" + childURL - return self.filenameConverter.getSystemPathFromFileURL(parentURL + string) + return self.filenameConverter.getSystemPathFromFileURL( + parentURL + string) ''' @author rpiterman @@ -648,7 +697,8 @@ class FileAccess(object): def getBasename(self, path, pathSeparator): filename = self.getFilename(path, pathSeparator) sExtension = getExtension(filename) - basename = filename.substring(0, filename.length() - (sExtension.length() + 1)) + basename = filename.substring(0, filename.length() - \ + (sExtension.length() + 1)) return basename ''' @@ -746,10 +796,12 @@ class FileAccess(object): sFileData = None try: oDataVector = [] - oSimpleFileAccess = _xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess") + oSimpleFileAccess = _xMSF.createInstance( + "com.sun.star.ucb.SimpleFileAccess") if oSimpleFileAccess.exists(_filepath): xInputStream = oSimpleFileAccess.openFileRead(_filepath) - oTextInputStream = _xMSF.createInstance("com.sun.star.io.TextInputStream") + oTextInputStream = _xMSF.createInstance( + "com.sun.star.io.TextInputStream") oTextInputStream.setInputStream(xInputStream) while not oTextInputStream.isEOF(): oDataVector.addElement(oTextInputStream.readLine()) diff --git a/wizards/com/sun/star/wizards/common/HelpIds.py b/wizards/com/sun/star/wizards/common/HelpIds.py index ba8f07566f47..c6bd1b78c2fd 100644 --- a/wizards/com/sun/star/wizards/common/HelpIds.py +++ b/wizards/com/sun/star/wizards/common/HelpIds.py @@ -1,1002 +1,1012 @@ -array1 = [ -"HID:WIZARDS_HID0_WEBWIZARD", # HID:34200 -"HID:WIZARDS_HID0_HELP", # HID:34201 -"HID:WIZARDS_HID0_NEXT", # HID:34202 -"HID:WIZARDS_HID0_PREV", # HID:34203 -"HID:WIZARDS_HID0_CREATE", # HID:34204 -"HID:WIZARDS_HID0_CANCEL", # HID:34205 -"HID:WIZARDS_HID0_STATUS_DIALOG", # HID:34206 -"HID:WIZARDS_HID1_LST_SESSIONS", # HID:34207 -"", -"HID:WIZARDS_HID1_BTN_DEL_SES", # HID:34209 -"HID:WIZARDS_HID2_LST_DOCS", # HID:34210 -"HID:WIZARDS_HID2_BTN_ADD_DOC", # HID:34211 -"HID:WIZARDS_HID2_BTN_REM_DOC", # HID:34212 -"HID:WIZARDS_HID2_BTN_DOC_UP", # HID:34213 -"HID:WIZARDS_HID2_BTN_DOC_DOWN", # HID:34214 -"HID:WIZARDS_HID2_TXT_DOC_TITLE", # HID:34215 -"HID:WIZARDS_HID2_TXT_DOC_DESC", # HID:34216 -"HID:WIZARDS_HID2_TXT_DOC_AUTHOR", # HID:34217 -"HID:WIZARDS_HID2_LST_DOC_EXPORT", # HID:34218 -"HID:WIZARDS_HID2_STATUS_ADD_DOCS", # HID:34219 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG1", # HID:34220 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG2", # HID:34221 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG3", # HID:34222 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG4", # HID:34223 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG5", # HID:34224 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG6", # HID:34225 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG7", # HID:34226 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG8", # HID:34227 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG9", # HID:34228 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG10", # HID:34229 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG11", # HID:34230 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG12", # HID:34231 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG13", # HID:34232 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG14", # HID:34233 -"HID:WIZARDS_HID3_IL_LAYOUTS_IMG15", # HID:34234 -"HID:WIZARDS_HID4_CHK_DISPLAY_FILENAME", # HID:34235 -"HID:WIZARDS_HID4_CHK_DISPLAY_DESCRIPTION", # HID:34236 -"HID:WIZARDS_HID4_CHK_DISPLAY_AUTHOR", # HID:34237 -"HID:WIZARDS_HID4_CHK_DISPLAY_CR_DATE", # HID:34238 -"HID:WIZARDS_HID4_CHK_DISPLAY_UP_DATE", # HID:34239 -"HID:WIZARDS_HID4_CHK_DISPLAY_FORMAT", # HID:34240 -"HID:WIZARDS_HID4_CHK_DISPLAY_F_ICON", # HID:34241 -"HID:WIZARDS_HID4_CHK_DISPLAY_PAGES", # HID:34242 -"HID:WIZARDS_HID4_CHK_DISPLAY_SIZE", # HID:34243 -"HID:WIZARDS_HID4_GRP_OPTIMAIZE_640", # HID:34244 -"HID:WIZARDS_HID4_GRP_OPTIMAIZE_800", # HID:34245 -"HID:WIZARDS_HID4_GRP_OPTIMAIZE_1024", # HID:34246 -"HID:WIZARDS_HID5_LST_STYLES", # HID:34247 -"HID:WIZARDS_HID5_BTN_BACKGND", # HID:34248 -"HID:WIZARDS_HID5_BTN_ICONS", # HID:34249 -"HID:WIZARDS_HID6_TXT_SITE_TITLE", # HID:34250 -"", -"", -"HID:WIZARDS_HID6_TXT_SITE_DESC", # HID:34253 -"", -"HID:WIZARDS_HID6_DATE_SITE_CREATED", # HID:34255 -"HID:WIZARDS_HID6_DATE_SITE_UPDATED", # HID:34256 -"", -"HID:WIZARDS_HID6_TXT_SITE_EMAIL", # HID:34258 -"HID:WIZARDS_HID6_TXT_SITE_COPYRIGHT", # HID:34259 -"HID:WIZARDS_HID7_BTN_PREVIEW", # HID:34260 -"HID:WIZARDS_HID7_CHK_PUBLISH_LOCAL", # HID:34261 -"HID:WIZARDS_HID7_TXT_LOCAL", # HID:34262 -"HID:WIZARDS_HID7_BTN_LOCAL", # HID:34263 -"HID:WIZARDS_HID7_CHK_PUBLISH_ZIP", # HID:34264 -"HID:WIZARDS_HID7_TXT_ZIP", # HID:34265 -"HID:WIZARDS_HID7_BTN_ZIP", # HID:34266 -"HID:WIZARDS_HID7_CHK_PUBLISH_FTP", # HID:34267 -"HID:WIZARDS_HID7_TXT_FTP", # HID:34268 -"HID:WIZARDS_HID7_BTN_FTP", # HID:34269 -"HID:WIZARDS_HID7_CHK_SAVE", # HID:34270 -"HID:WIZARDS_HID7_TXT_SAVE", # HID:34271 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_BG", # HID:34290 -"HID:WIZARDS_HID_BG_BTN_OTHER", # HID:34291 -"HID:WIZARDS_HID_BG_BTN_NONE", # HID:34292 -"HID:WIZARDS_HID_BG_BTN_OK", # HID:34293 -"HID:WIZARDS_HID_BG_BTN_CANCEL", # HID:34294 -"HID:WIZARDS_HID_BG_BTN_BACK", # HID:34295 -"HID:WIZARDS_HID_BG_BTN_FW", # HID:34296 -"HID:WIZARDS_HID_BG_BTN_IMG1", # HID:34297 -"HID:WIZARDS_HID_BG_BTN_IMG2", # HID:34298 -"HID:WIZARDS_HID_BG_BTN_IMG3", # HID:34299 -"HID:WIZARDS_HID_BG_BTN_IMG4", # HID:34300 -"HID:WIZARDS_HID_BG_BTN_IMG5", # HID:34301 -"HID:WIZARDS_HID_BG_BTN_IMG6", # HID:34302 -"HID:WIZARDS_HID_BG_BTN_IMG7", # HID:34303 -"HID:WIZARDS_HID_BG_BTN_IMG8", # HID:34304 -"HID:WIZARDS_HID_BG_BTN_IMG9", # HID:34305 -"HID:WIZARDS_HID_BG_BTN_IMG10", # HID:34306 -"HID:WIZARDS_HID_BG_BTN_IMG11", # HID:34307 -"HID:WIZARDS_HID_BG_BTN_IMG12", # HID:34308 -"HID:WIZARDS_HID_BG_BTN_IMG13", # HID:34309 -"HID:WIZARDS_HID_BG_BTN_IMG14", # HID:34300 -"HID:WIZARDS_HID_BG_BTN_IMG15", # HID:34311 -"HID:WIZARDS_HID_BG_BTN_IMG16", # HID:34312 -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGREPORT_DIALOG", # HID:34320 -"", -"HID:WIZARDS_HID_DLGREPORT_0_CMDPREV", # HID:34322 -"HID:WIZARDS_HID_DLGREPORT_0_CMDNEXT", # HID:34323 -"HID:WIZARDS_HID_DLGREPORT_0_CMDFINISH", # HID:34324 -"HID:WIZARDS_HID_DLGREPORT_0_CMDCANCEL", # HID:34325 -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGREPORT_1_LBTABLES", # HID:34330 -"HID:WIZARDS_HID_DLGREPORT_1_FIELDSAVAILABLE", # HID:34331 -"HID:WIZARDS_HID_DLGREPORT_1_CMDMOVESELECTED", # HID:34332 -"HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEALL", # HID:34333 -"HID:WIZARDS_HID_DLGREPORT_1_CMDREMOVESELECTED", # HID:34334 -"HID:WIZARDS_HID_DLGREPORT_1_CMDREMOVEALL", # HID:34335 -"HID:WIZARDS_HID_DLGREPORT_1_FIELDSSELECTED", # HID:34336 -"HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEUP", # HID:34337 -"HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEDOWN", # HID:34338 -"", -"HID:WIZARDS_HID_DLGREPORT_2_GROUPING", # HID:34340 -"HID:WIZARDS_HID_DLGREPORT_2_CMDGROUP", # HID:34341 -"HID:WIZARDS_HID_DLGREPORT_2_CMDUNGROUP", # HID:34342 -"HID:WIZARDS_HID_DLGREPORT_2_PREGROUPINGDEST", # HID:34343 -"HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEUPGROUP", # HID:34344 -"HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEDOWNGROUP", # HID:34345 -"HID:WIZARDS_HID_DLGREPORT_3_SORT1", # HID:34346 -"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND1", # HID:34347 -"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND1", # HID:34348 -"HID:WIZARDS_HID_DLGREPORT_3_SORT2", # HID:34349 -"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND2", # HID:34350 -"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND2", # HID:34351 -"HID:WIZARDS_HID_DLGREPORT_3_SORT3", # HID:34352 -"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND3", # HID:34353 -"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND3", # HID:34354 -"HID:WIZARDS_HID_DLGREPORT_3_SORT4", # HID:34355 -"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND4", # HID:34356 -"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND4", # HID:34357 -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGREPORT_4_TITLE", # HID:34362 -"HID:WIZARDS_HID_DLGREPORT_4_DATALAYOUT", # HID:34363 -"HID:WIZARDS_HID_DLGREPORT_4_PAGELAYOUT", # HID:34364 -"HID:WIZARDS_HID_DLGREPORT_4_LANDSCAPE", # HID:34365 -"HID:WIZARDS_HID_DLGREPORT_4_PORTRAIT", # HID:34366 -"", -"", -"", -"HID:WIZARDS_HID_DLGREPORT_5_OPTDYNTEMPLATE", # HID:34370 -"HID:WIZARDS_HID_DLGREPORT_5_OPTSTATDOCUMENT", # HID:34371 -"HID:WIZARDS_HID_DLGREPORT_5_TXTTEMPLATEPATH", # HID:34372 -"HID:WIZARDS_HID_DLGREPORT_5_CMDTEMPLATEPATH", # HID:34373 -"HID:WIZARDS_HID_DLGREPORT_5_OPTEDITTEMPLATE", # HID:34374 -"HID:WIZARDS_HID_DLGREPORT_5_OPTUSETEMPLATE", # HID:34375 -"HID:WIZARDS_HID_DLGREPORT_5_TXTDOCUMENTPATH", # HID:34376 -"HID:WIZARDS_HID_DLGREPORT_5_CMDDOCUMENTPATH", # HID:34377 -"HID:WIZARDS_HID_DLGREPORT_5_CHKLINKTODB", # HID:34378 -"", -"", -"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_1", # HID:34381 -"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_2", # HID:34382 -"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_3", # HID:34383 -"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_4", # HID:34384 -"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_5", # HID:34385 -"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_6", # HID:34386 -"HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_7", # HID:34387 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGFORM_DIALOG", # HID:34400 -"", -"HID:WIZARDS_HID_DLGFORM_CMDPREV", # HID:34402 -"HID:WIZARDS_HID_DLGFORM_CMDNEXT", # HID:34403 -"HID:WIZARDS_HID_DLGFORM_CMDFINISH", # HID:34404 -"HID:WIZARDS_HID_DLGFORM_CMDCANCEL", # HID:34405 -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGFORM_MASTER_LBTABLES", # HID:34411 -"HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSAVAILABLE", # HID:34412 -"HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVESELECTED", # HID:34413 -"HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEALL", # HID:34414 -"HID:WIZARDS_HID_DLGFORM_MASTER_CMDREMOVESELECTED", # HID:34415 -"HID:WIZARDS_HID_DLGFORM_MASTER_CMDREMOVEALL", # HID:34416 -"HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSSELECTED", # HID:34417 -"HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEUP", # HID:34418 -"HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEDOWN", # HID:34419 -"", -"HID:WIZARDS_HID_DLGFORM_CHKCREATESUBFORM", # HID:34421 -"HID:WIZARDS_HID_DLGFORM_OPTONEXISTINGRELATION", # HID:34422 -"HID:WIZARDS_HID_DLGFORM_OPTSELECTMANUALLY", # HID:34423 -"HID:WIZARDS_HID_DLGFORM_lstRELATIONS", # HID:34424 -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGFORM_SUB_LBTABLES", # HID:34431 -"HID:WIZARDS_HID_DLGFORM_SUB_FIELDSAVAILABLE", # HID:34432 -"HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVESELECTED", # HID:34433 -"HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEALL", # HID:34434 -"HID:WIZARDS_HID_DLGFORM_SUB_CMDREMOVESELECTED", # HID:34435 -"HID:WIZARDS_HID_DLGFORM_SUB_CMDREMOVEALL", # HID:34436 -"HID:WIZARDS_HID_DLGFORM_SUB_FIELDSSELECTED", # HID:34437 -"HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEUP", # HID:34438 -"HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEDOWN", # HID:34439 -"", -"HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK1", # HID:34441 -"HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK1", # HID:34442 -"HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK2", # HID:34443 -"HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK2", # HID:34444 -"HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK3", # HID:34445 -"HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK3", # HID:34446 -"HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK4", # HID:34447 -"HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK4", # HID:34448 -"", -"", -"HID:WIZARDS_HID_DLGFORM_CMDALIGNLEFT", # HID:34451 -"HID:WIZARDS_HID_DLGFORM_CMDALIGNRIGHT", # HID:34452 -"HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED", # HID:34453 -"HID:WIZARDS_HID_DLGFORM_CMDTOPLABELED", # HID:34454 -"HID:WIZARDS_HID_DLGFORM_CMDTABLESTYLE", # HID:34455 -"HID:WIZARDS_HID_DLGFORM_CMDTOPJUSTIFIED", # HID:34456 -"HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED2", # HID:34457 -"HID:WIZARDS_HID_DLGFORM_CMDTOPLABELED2", # HID:34458 -"HID:WIZARDS_HID_DLGFORM_CMDTABLESTYLE2", # HID:34459 -"HID:WIZARDS_HID_DLGFORM_CMDTOPJUSTIFIED2", # HID:34460 -"HID:WIZARDS_HID_DLGFORM_OPTNEWDATAONLY", # HID:34461 -"HID:WIZARDS_HID_DLGFORM_OPTDISPLAYALLDATA", # HID:34462 -"HID:WIZARDS_HID_DLGFORM_CHKNOMODIFICATION", # HID:34463 -"HID:WIZARDS_HID_DLGFORM_CHKNODELETION", # HID:34464 -"HID:WIZARDS_HID_DLGFORM_CHKNOADDITION", # HID:34465 -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGFORM_LSTSTYLES", # HID:34471 -"HID:WIZARDS_HID_DLGFORM_CMDNOBORDER", # HID:34472 -"HID:WIZARDS_HID_DLGFORM_CMD3DBORDER", # HID:34473 -"HID:WIZARDS_HID_DLGFORM_CMDSIMPLEBORDER", # HID:34474 -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGFORM_TXTPATH", # HID:34481 -"HID:WIZARDS_HID_DLGFORM_OPTWORKWITHFORM", # HID:34482 -"HID:WIZARDS_HID_DLGFORM_OPTMODIFYFORM", # HID:34483 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGNEWSLTR_DIALOG", # HID:34500 -"HID:WIZARDS_HID_DLGNEWSLTR_OPTSTANDARDLAYOUT", # HID:34501 -"HID:WIZARDS_HID_DLGNEWSLTR_OPTPARTYLAYOUT", # HID:34502 -"HID:WIZARDS_HID_DLGNEWSLTR_OPTBROCHURELAYOUT", # HID:34503 -"HID:WIZARDS_HID_DLGNEWSLTR_OPTSINGLESIDED", # HID:34504 -"HID:WIZARDS_HID_DLGNEWSLTR_OPTDOUBLESIDED", # HID:34505 -"HID:WIZARDS_HID_DLGNEWSLTR_CMDGOON", # HID:34506 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGDEPOT_DIALOG_SELLBUY", # HID:34520 -"HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SELLBUY", # HID:34521 -"HID:WIZARDS_HID_DLGDEPOT_0_TXTQUANTITY", # HID:34522 -"HID:WIZARDS_HID_DLGDEPOT_0_TXTRATE", # HID:34523 -"HID:WIZARDS_HID_DLGDEPOT_0_TXTDATE", # HID:34524 -"HID:WIZARDS_HID_DLGDEPOT_0_TXTCOMMISSION", # HID:34525 -"HID:WIZARDS_HID_DLGDEPOT_0_TXTFIX", # HID:34526 -"HID:WIZARDS_HID_DLGDEPOT_0_TXTMINIMUM", # HID:34527 -"HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SELLBUY", # HID:34528 -"HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SELLBUY", # HID:34529 -"HID:WIZARDS_HID_DLGDEPOT_1_LSTSELLSTOCKS", # HID:34530 -"HID:WIZARDS_HID_DLGDEPOT_2_LSTBUYSTOCKS", # HID:34531 -"HID:WIZARDS_HID_DLGDEPOT_DIALOG_SPLIT", # HID:34532 -"HID:WIZARDS_HID_DLGDEPOT_0_LSTSTOCKNAMES", # HID:34533 -"HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SPLIT", # HID:34534 -"HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SPLIT", # HID:34535 -"HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SPLIT", # HID:34536 -"HID:WIZARDS_HID_DLGDEPOT_1_OPTPERSHARE", # HID:34537 -"HID:WIZARDS_HID_DLGDEPOT_1_OPTTOTAL", # HID:34538 -"HID:WIZARDS_HID_DLGDEPOT_1_TXTDIVIDEND", # HID:34539 -"HID:WIZARDS_HID_DLGDEPOT_2_TXTOLDRATE", # HID:34540 -"HID:WIZARDS_HID_DLGDEPOT_2_TXTNEWRATE", # HID:34541 -"HID:WIZARDS_HID_DLGDEPOT_2_TXTDATE", # HID:34542 -"HID:WIZARDS_HID_DLGDEPOT_3_TXTSTARTDATE", # HID:34543 -"HID:WIZARDS_HID_DLGDEPOT_3_TXTENDDATE", # HID:34544 -"HID:WIZARDS_HID_DLGDEPOT_3_OPTDAILY", # HID:34545 -"HID:WIZARDS_HID_DLGDEPOT_3_OPTWEEKLY", # HID:34546 -"HID:WIZARDS_HID_DLGDEPOT_DIALOG_HISTORY", # HID:34547 -"HID:WIZARDS_HID_DLGDEPOT_LSTMARKETS", # HID:34548 -"HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_HISTORY", # HID:34549 -"HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_HISTORY", # HID:34550 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGIMPORT_DIALOG", # HID:34570 -"HID:WIZARDS_HID_DLGIMPORT_0_CMDHELP", # HID:34571 -"HID:WIZARDS_HID_DLGIMPORT_0_CMDCANCEL", # HID:34572 -"HID:WIZARDS_HID_DLGIMPORT_0_CMDPREV", # HID:34573 -"HID:WIZARDS_HID_DLGIMPORT_0_CMDNEXT", # HID:34574 -"HID:WIZARDS_HID_DLGIMPORT_0_OPTSODOCUMENTS", # HID:34575 -"HID:WIZARDS_HID_DLGIMPORT_0_OPTMSDOCUMENTS", # HID:34576 -"HID:WIZARDS_HID_DLGIMPORT_0_CHKLOGFILE", # HID:34577 -"HID:WIZARDS_HID_DLGIMPORT_2_CHKWORD", # HID:34578 -"HID:WIZARDS_HID_DLGIMPORT_2_CHKEXCEL", # HID:34579 -"HID:WIZARDS_HID_DLGIMPORT_2_CHKPOWERPOINT", # HID:34580 -"HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATE", # HID:34581 -"HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATERECURSE", # HID:34582 -"HID:WIZARDS_HID_DLGIMPORT_2_LBTEMPLATEPATH", # HID:34583 -"HID:WIZARDS_HID_DLGIMPORT_2_EDTEMPLATEPATH", # HID:34584 -"HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT", # HID:34585 -"HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENT", # HID:34586 -"HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENTRECURSE", # HID:34587 -"HID:WIZARDS_HID_DLGIMPORT_2_LBDOCUMENTPATH", # HID:34588 -"HID:WIZARDS_HID_DLGIMPORT_2_EDDOCUMENTPATH", # HID:34589 -"HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT", # HID:34590 -"HID:WIZARDS_HID_DLGIMPORT_2_LBEXPORTDOCUMENTPATH", # HID:34591 -"HID:WIZARDS_HID_DLGIMPORT_2_EDEXPORTDOCUMENTPATH", # HID:34592 -"HID:WIZARDS_HID_DLGIMPORT_2_CMDEXPORTPATHSELECT", # HID:34593 -"", -"HID:WIZARDS_HID_DLGIMPORT_3_TBSUMMARY", # HID:34595 -"HID:WIZARDS_HID_DLGIMPORT_0_CHKWRITER", # HID:34596 -"HID:WIZARDS_HID_DLGIMPORT_0_CHKCALC", # HID:34597 -"HID:WIZARDS_HID_DLGIMPORT_0_CHKIMPRESS", # HID:34598 -"HID:WIZARDS_HID_DLGIMPORT_0_CHKMATHGLOBAL", # HID:34599 -"HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT2", # HID:34600 -"HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT2", # HID:34601 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGCORRESPONDENCE_DIALOG", # HID:34630 -"HID:WIZARDS_HID_DLGCORRESPONDENCE_CANCEL", # HID:34631 -"HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA1", # HID:34632 -"HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA2", # HID:34633 -"HID:WIZARDS_HID_DLGCORRESPONDENCE_AGENDAOKAY", # HID:34634 -"HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER1", # HID:34635 -"HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER2", # HID:34636 -"HID:WIZARDS_HID_DLGCORRESPONDENCE_LETTEROKAY", # HID:34637 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGSTYLES_DIALOG", # HID:34650 -"HID:WIZARDS_HID_DLGSTYLES_LISTBOX", # HID:34651 -"HID:WIZARDS_HID_DLGSTYLES_CANCEL", # HID:34652 -"HID:WIZARDS_HID_DLGSTYLES_OKAY", # HID:34653 -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGCONVERT_DIALOG", # HID:34660 -"HID:WIZARDS_HID_DLGCONVERT_CHECKBOX1", # HID:34661 -"HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON1", # HID:34662 -"HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON2", # HID:34663 -"HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON3", # HID:34664 -"HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON4", # HID:34665 -"HID:WIZARDS_HID_DLGCONVERT_LISTBOX1", # HID:34666 -"HID:WIZARDS_HID_DLGCONVERT_OBFILE", # HID:34667 -"HID:WIZARDS_HID_DLGCONVERT_OBDIR", # HID:34668 -"HID:WIZARDS_HID_DLGCONVERT_COMBOBOX1", # HID:34669 -"HID:WIZARDS_HID_DLGCONVERT_TBSOURCE", # HID:34670 -"HID:WIZARDS_HID_DLGCONVERT_CHECKRECURSIVE", # HID:34671 -"HID:WIZARDS_HID_DLGCONVERT_TBTARGET", # HID:34672 -"HID:WIZARDS_HID_DLGCONVERT_CBCANCEL", # HID:34673 -"HID:WIZARDS_HID_DLGCONVERT_CBHELP", # HID:34674 -"HID:WIZARDS_HID_DLGCONVERT_CBBACK", # HID:34675 -"HID:WIZARDS_HID_DLGCONVERT_CBGOON", # HID:34676 -"HID:WIZARDS_HID_DLGCONVERT_CBSOURCEOPEN", # HID:34677 -"HID:WIZARDS_HID_DLGCONVERT_CBTARGETOPEN", # HID:34678 -"HID:WIZARDS_HID_DLGCONVERT_CHKPROTECT", # HID:34679 -"HID:WIZARDS_HID_DLGCONVERT_CHKTEXTDOCUMENTS", # HID:34680 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGPASSWORD_CMDGOON", # HID:34690 -"HID:WIZARDS_HID_DLGPASSWORD_CMDCANCEL", # HID:34691 -"HID:WIZARDS_HID_DLGPASSWORD_CMDHELP", # HID:34692 -"HID:WIZARDS_HID_DLGPASSWORD_TXTPASSWORD", # HID:34693 -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGHOLIDAYCAL_DIALOG", # HID:34700 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_PREVIEW", # HID:34701 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPYEAR", # HID:34702 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPMONTH", # HID:34703 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDYEAR", # HID:34704 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDMONTH", # HID:34705 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_SPINYEAR", # HID:34706 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_SPINMONTH", # HID:34707 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_1_CMBSTATE", # HID:34708 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_LBOWNDATA", # HID:34709 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDINSERT", # HID:34710 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDDELETE", # HID:34711 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENT", # HID:34712 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CHKEVENT", # HID:34713 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTDAY", # HID:34714 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTDAY", # HID:34715 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTMONTH", # HID:34716 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTMONTH", # HID:34717 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTYEAR", # HID:34718 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTYEAR", # HID:34719 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOWNDATA", # HID:34720 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDCANCEL", # HID:34721 -"HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOK" # HID:34722 -] -array2 = ["HID:WIZARDS_HID_LTRWIZ_OPTBUSINESSLETTER", # HID:40769 -"HID:WIZARDS_HID_LTRWIZ_OPTPRIVOFFICIALLETTER", # HID:40770 -"HID:WIZARDS_HID_LTRWIZ_OPTPRIVATELETTER", # HID:40771 -"HID:WIZARDS_HID_LTRWIZ_LSTBUSINESSSTYLE", # HID:40772 -"HID:WIZARDS_HID_LTRWIZ_CHKBUSINESSPAPER", # HID:40773 -"HID:WIZARDS_HID_LTRWIZ_LSTPRIVOFFICIALSTYLE", # HID:40774 -"HID:WIZARDS_HID_LTRWIZ_LSTPRIVATESTYLE", # HID:40775 -"HID:WIZARDS_HID_LTRWIZ_CHKPAPERCOMPANYLOGO", # HID:40776 -"HID:WIZARDS_HID_LTRWIZ_NUMLOGOHEIGHT", # HID:40777 -"HID:WIZARDS_HID_LTRWIZ_NUMLOGOX", # HID:40778 -"HID:WIZARDS_HID_LTRWIZ_NUMLOGOWIDTH", # HID:40779 -"HID:WIZARDS_HID_LTRWIZ_NUMLOGOY", # HID:40780 -"HID:WIZARDS_HID_LTRWIZ_CHKPAPERCOMPANYADDRESS", # HID:40781 -"HID:WIZARDS_HID_LTRWIZ_NUMADDRESSHEIGHT", # HID:40782 -"HID:WIZARDS_HID_LTRWIZ_NUMADDRESSX", # HID:40783 -"HID:WIZARDS_HID_LTRWIZ_NUMADDRESSWIDTH", # HID:40784 -"HID:WIZARDS_HID_LTRWIZ_NUMADDRESSY", # HID:40785 -"HID:WIZARDS_HID_LTRWIZ_CHKCOMPANYRECEIVER", # HID:40786 -"HID:WIZARDS_HID_LTRWIZ_CHKPAPERFOOTER", # HID:40787 -"HID:WIZARDS_HID_LTRWIZ_NUMFOOTERHEIGHT", # HID:40788 -"HID:WIZARDS_HID_LTRWIZ_LSTLETTERNORM", # HID:40789 -"HID:WIZARDS_HID_LTRWIZ_CHKUSELOGO", # HID:40790 -"HID:WIZARDS_HID_LTRWIZ_CHKUSEADDRESSRECEIVER", # HID:40791 -"HID:WIZARDS_HID_LTRWIZ_CHKUSESIGNS", # HID:40792 -"HID:WIZARDS_HID_LTRWIZ_CHKUSESUBJECT", # HID:40793 -"HID:WIZARDS_HID_LTRWIZ_CHKUSESALUTATION", # HID:40794 -"HID:WIZARDS_HID_LTRWIZ_LSTSALUTATION", # HID:40795 -"HID:WIZARDS_HID_LTRWIZ_CHKUSEBENDMARKS", # HID:40796 -"HID:WIZARDS_HID_LTRWIZ_CHKUSEGREETING", # HID:40797 -"HID:WIZARDS_HID_LTRWIZ_LSTGREETING", # HID:40798 -"HID:WIZARDS_HID_LTRWIZ_CHKUSEFOOTER", # HID:40799 -"HID:WIZARDS_HID_LTRWIZ_OPTSENDERPLACEHOLDER", # HID:40800 -"HID:WIZARDS_HID_LTRWIZ_OPTSENDERDEFINE", # HID:40801 -"HID:WIZARDS_HID_LTRWIZ_TXTSENDERNAME", # HID:40802 -"HID:WIZARDS_HID_LTRWIZ_TXTSENDERSTREET", # HID:40803 -"HID:WIZARDS_HID_LTRWIZ_TXTSENDERPOSTCODE", # HID:40804 -"HID:WIZARDS_HID_LTRWIZ_TXTSENDERSTATE_TEXT", # HID:40805 -"HID:WIZARDS_HID_LTRWIZ_TXTSENDERCITY", # HID:40806 -"HID:WIZARDS_HID_LTRWIZ_OPTRECEIVERPLACEHOLDER", # HID:40807 -"HID:WIZARDS_HID_LTRWIZ_OPTRECEIVERDATABASE", # HID:40808 -"HID:WIZARDS_HID_LTRWIZ_TXTFOOTER", # HID:40809 -"HID:WIZARDS_HID_LTRWIZ_CHKFOOTERNEXTPAGES", # HID:40810 -"HID:WIZARDS_HID_LTRWIZ_CHKFOOTERPAGENUMBERS", # HID:40811 -"HID:WIZARDS_HID_LTRWIZ_TXTTEMPLATENAME", # HID:40812 -"HID:WIZARDS_HID_LTRWIZ_OPTCREATELETTER", # HID:40813 -"HID:WIZARDS_HID_LTRWIZ_OPTMAKECHANGES", # HID:40814 -"HID:WIZARDS_HID_LTRWIZ_TXTPATH", # HID:40815 -"HID:WIZARDS_HID_LTRWIZ_CMDPATH", # HID:40816 -"", -"", -"", -"HID:WIZARDS_HID_LTRWIZARD", # HID:40820 -"HID:WIZARDS_HID_LTRWIZARD_HELP", # HID:40821 -"HID:WIZARDS_HID_LTRWIZARD_BACK", # HID:40822 -"HID:WIZARDS_HID_LTRWIZARD_NEXT", # HID:40823 -"HID:WIZARDS_HID_LTRWIZARD_CREATE", # HID:40824 -"HID:WIZARDS_HID_LTRWIZARD_CANCEL", # HID:40825 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_QUERYWIZARD_LSTTABLES", # HID:40850 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDS", # HID:40851 -"HID:WIZARDS_HID_QUERYWIZARD_CMDMOVESELECTED", # HID:40852 -"HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEALL", # HID:40853 -"HID:WIZARDS_HID_QUERYWIZARD_CMDREMOVESELECTED", # HID:40854 -"HID:WIZARDS_HID_QUERYWIZARD_CMDREMOVEALL", # HID:40855 -"HID:WIZARDS_HID_QUERYWIZARD_LSTSELFIELDS", # HID:40856 -"HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEUP", # HID:40857 -"HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEDOWN", # HID:40858 -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_QUERYWIZARD_SORT1", # HID:40865 -"HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND1", # HID:40866 -"HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND1", # HID:40867 -"HID:WIZARDS_HID_QUERYWIZARD_SORT2", # HID:40868 -"HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND2", # HID:40869 -"HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND2", # HID:40870 -"HID:WIZARDS_HID_QUERYWIZARD_SORT3", # HID:40871 -"HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND3", # HID:40872 -"HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND3", # HID:40873 -"HID:WIZARDS_HID_QUERYWIZARD_SORT4", # HID:40874 -"HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND4", # HID:40875 -"HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND4", # HID:40876 -"", -"HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHALL", # HID:40878 -"HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHANY", # HID:40879 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_1", # HID:40880 -"HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_1", # HID:40881 -"HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_1", # HID:40882 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_2", # HID:40883 -"HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_2", # HID:40884 -"HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_2", # HID:40885 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_3", # HID:40886 -"HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_3", # HID:40887 -"HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_3", # HID:40888 -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATEDETAILQUERY", # HID:40895 -"HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATESUMMARYQUERY", # HID:40896 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_1", # HID:40897 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_1", # HID:40898 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_2", # HID:40899 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_2", # HID:40900 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_3", # HID:40901 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_3", # HID:40902 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_4", # HID:40903 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_4", # HID:40904 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_5", # HID:40905 -"HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_5", # HID:40906 -"HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEPLUS", # HID:40907 -"HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEMINUS", # HID:40908 -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDS", # HID:40915 -"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVESELECTED", # HID:40916 -"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERREMOVESELECTED", # HID:40917 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERSELFIELDS", # HID:40918 -"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEUP", # HID:40919 -"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEDOWN", # HID:40920 -"", -"", -"HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHALL", # HID:40923 -"HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHANY", # HID:40924 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_1", # HID:40925 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_1", # HID:40926 -"HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_1", # HID:40927 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_2", # HID:40928 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_2", # HID:40929 -"HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_2", # HID:40930 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_3", # HID:40931 -"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_3", # HID:40932 -"HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_3", # HID:40933 -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_1", # HID:40940 -"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_2", # HID:40941 -"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_3", # HID:40942 -"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_4", # HID:40943 -"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_5", # HID:40944 -"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_6", # HID:40945 -"HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_7", # HID:40946 -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_QUERYWIZARD_TXTQUERYTITLE", # HID:40955 -"HID:WIZARDS_HID_QUERYWIZARD_OPTDISPLAYQUERY", # HID:40956 -"HID:WIZARDS_HID_QUERYWIZARD_OPTMODIFYQUERY", # HID:40957 -"HID:WIZARDS_HID_QUERYWIZARD_TXTSUMMARY", # HID:40958 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_QUERYWIZARD", # HID:40970 -"", -"HID:WIZARDS_HID_QUERYWIZARD_BACK", # HID:40972 -"HID:WIZARDS_HID_QUERYWIZARD_NEXT", # HID:40973 -"HID:WIZARDS_HID_QUERYWIZARD_CREATE", # HID:40974 -"HID:WIZARDS_HID_QUERYWIZARD_CANCEL", # HID:40975 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_IS", # HID:41000 -"", "HID:WIZARDS_HID_IS_BTN_NONE", # HID:41002 -"HID:WIZARDS_HID_IS_BTN_OK", # HID:41003 -"HID:WIZARDS_HID_IS_BTN_CANCEL", # HID:41004 -"HID:WIZARDS_HID_IS_BTN_IMG1", # HID:41005 -"HID:WIZARDS_HID_IS_BTN_IMG2", # HID:41006 -"HID:WIZARDS_HID_IS_BTN_IMG3", # HID:41007 -"HID:WIZARDS_HID_IS_BTN_IMG4", # HID:41008 -"HID:WIZARDS_HID_IS_BTN_IMG5", # HID:41009 -"HID:WIZARDS_HID_IS_BTN_IMG6", # HID:41010 -"HID:WIZARDS_HID_IS_BTN_IMG7", # HID:41011 -"HID:WIZARDS_HID_IS_BTN_IMG8", # HID:41012 -"HID:WIZARDS_HID_IS_BTN_IMG9", # HID:41013 -"HID:WIZARDS_HID_IS_BTN_IMG10", # HID:41014 -"HID:WIZARDS_HID_IS_BTN_IMG11", # HID:41015 -"HID:WIZARDS_HID_IS_BTN_IMG12", # HID:41016 -"HID:WIZARDS_HID_IS_BTN_IMG13", # HID:41017 -"HID:WIZARDS_HID_IS_BTN_IMG14", # HID:41018 -"HID:WIZARDS_HID_IS_BTN_IMG15", # HID:41019 -"HID:WIZARDS_HID_IS_BTN_IMG16", # HID:41020 -"HID:WIZARDS_HID_IS_BTN_IMG17", # HID:41021 -"HID:WIZARDS_HID_IS_BTN_IMG18", # HID:41022 -"HID:WIZARDS_HID_IS_BTN_IMG19", # HID:41023 -"HID:WIZARDS_HID_IS_BTN_IMG20", # HID:41024 -"HID:WIZARDS_HID_IS_BTN_IMG21", # HID:41025 -"HID:WIZARDS_HID_IS_BTN_IMG22", # HID:41026 -"HID:WIZARDS_HID_IS_BTN_IMG23", # HID:41027 -"HID:WIZARDS_HID_IS_BTN_IMG24", # HID:41028 -"HID:WIZARDS_HID_IS_BTN_IMG25", # HID:41029 -"HID:WIZARDS_HID_IS_BTN_IMG26", # HID:41030 -"HID:WIZARDS_HID_IS_BTN_IMG27", # HID:41031 -"HID:WIZARDS_HID_IS_BTN_IMG28", # HID:41032 -"HID:WIZARDS_HID_IS_BTN_IMG29", # HID:41033 -"HID:WIZARDS_HID_IS_BTN_IMG30", # HID:41034 -"HID:WIZARDS_HID_IS_BTN_IMG31", # HID:41035 -"HID:WIZARDS_HID_IS_BTN_IMG32", # HID:41036 -"", -"", -"", -"HID:WIZARDS_HID_FTP", # HID:41040 -"HID:WIZARDS_HID_FTP_SERVER", # HID:41041 -"HID:WIZARDS_HID_FTP_USERNAME", # HID:41042 -"HID:WIZARDS_HID_FTP_PASS", # HID:41043 -"HID:WIZARDS_HID_FTP_TEST", # HID:41044 -"HID:WIZARDS_HID_FTP_TXT_PATH", # HID:41045 -"HID:WIZARDS_HID_FTP_BTN_PATH", # HID:41046 -"HID:WIZARDS_HID_FTP_OK", # HID:41047 -"HID:WIZARDS_HID_FTP_CANCEL", # HID:41048 -"", -"", -"HID:WIZARDS_HID_AGWIZ", # HID:41051 -"HID:WIZARDS_HID_AGWIZ_HELP", # HID:41052 -"HID:WIZARDS_HID_AGWIZ_NEXT", # HID:41053 -"HID:WIZARDS_HID_AGWIZ_PREV", # HID:41054 -"HID:WIZARDS_HID_AGWIZ_CREATE", # HID:41055 -"HID:WIZARDS_HID_AGWIZ_CANCEL", # HID:41056 -"HID:WIZARDS_HID_AGWIZ_1_LIST_PAGEDESIGN", # HID:41057 -"HID:WIZARDS_HID_AGWIZ_1_CHK_MINUTES", # HID:41058 -"HID:WIZARDS_HID_AGWIZ_2_TXT_TIME", # HID:41059 -"HID:WIZARDS_HID_AGWIZ_2_TXT_DATE", # HID:41060 -"HID:WIZARDS_HID_AGWIZ_2_TXT_TITLE", # HID:41061 -"HID:WIZARDS_HID_AGWIZ_2_TXT_LOCATION", # HID:41062 -"HID:WIZARDS_HID_AGWIZ_3_CHK_MEETING_TYPE", # HID:41063 -"HID:WIZARDS_HID_AGWIZ_3_CHK_READ", # HID:41064 -"HID:WIZARDS_HID_AGWIZ_3_CHK_BRING", # HID:41065 -"HID:WIZARDS_HID_AGWIZ_3_CHK_NOTES", # HID:41066 -"HID:WIZARDS_HID_AGWIZ_4_CHK_CALLED_BY", # HID:41067 -"HID:WIZARDS_HID_AGWIZ_4_CHK_FACILITATOR", # HID:41068 -"HID:WIZARDS_HID_AGWIZ_4_CHK_NOTETAKER", # HID:41069 -"HID:WIZARDS_HID_AGWIZ_4_CHK_TIMEKEEPER", # HID:41070 -"HID:WIZARDS_HID_AGWIZ_4_CHK_ATTENDEES", # HID:41071 -"HID:WIZARDS_HID_AGWIZ_4_CHK_OBSERVERS", # HID:41072 -"HID:WIZARDS_HID_AGWIZ_4_CHK_RESOURCEPERSONS", # HID:41073 -"HID:WIZARDS_HID_AGWIZ_6_TXT_TEMPLATENAME", # HID:41074 -"HID:WIZARDS_HID_AGWIZ_6_TXT_TEMPLATEPATH", # HID:41075 -"HID:WIZARDS_HID_AGWIZ_6_BTN_TEMPLATEPATH", # HID:41076 -"HID:WIZARDS_HID_AGWIZ_6_OPT_CREATEAGENDA", # HID:41077 -"HID:WIZARDS_HID_AGWIZ_6_OPT_MAKECHANGES", # HID:41078 -"HID:WIZARDS_HID_AGWIZ_5_BTN_INSERT", # HID:41079 -"HID:WIZARDS_HID_AGWIZ_5_BTN_REMOVE", # HID:41080 -"HID:WIZARDS_HID_AGWIZ_5_BTN_UP", # HID:41081 -"HID:WIZARDS_HID_AGWIZ_5_BTN_DOWN", # HID:41082 -"HID:WIZARDS_HID_AGWIZ_5_SCROLL_BAR", # HID:41083 -"HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_1", # HID:41084 -"HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_1", # HID:41085 -"HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_1", # HID:41086 -"HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_2", # HID:41087 -"HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_2", # HID:41088 -"HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_2", # HID:41089 -"HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_3", # HID:41090 -"HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_3", # HID:41091 -"HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_3", # HID:41092 -"HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_4", # HID:41093 -"HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_4", # HID:41094 -"HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_4", # HID:41095 -"HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_5", # HID:41096 -"HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_5", # HID:41097 -"HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_5", # HID:41098 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_FAXWIZ_OPTBUSINESSFAX", # HID:41120 -"HID:WIZARDS_HID_FAXWIZ_LSTBUSINESSSTYLE", # HID:41121 -"HID:WIZARDS_HID_FAXWIZ_OPTPRIVATEFAX", # HID:41122 -"HID:WIZARDS_HID_LSTPRIVATESTYLE", # HID:41123 -"HID:WIZARDS_HID_IMAGECONTROL3", # HID:41124 -"HID:WIZARDS_HID_CHKUSELOGO", # HID:41125 -"HID:WIZARDS_HID_CHKUSEDATE", # HID:41126 -"HID:WIZARDS_HID_CHKUSECOMMUNICATIONTYPE", # HID:41127 -"HID:WIZARDS_HID_LSTCOMMUNICATIONTYPE", # HID:41128 -"HID:WIZARDS_HID_CHKUSESUBJECT", # HID:41129 -"HID:WIZARDS_HID_CHKUSESALUTATION", # HID:41130 -"HID:WIZARDS_HID_LSTSALUTATION", # HID:41131 -"HID:WIZARDS_HID_CHKUSEGREETING", # HID:41132 -"HID:WIZARDS_HID_LSTGREETING", # HID:41133 -"HID:WIZARDS_HID_CHKUSEFOOTER", # HID:41134 -"HID:WIZARDS_HID_OPTSENDERPLACEHOLDER", # HID:41135 -"HID:WIZARDS_HID_OPTSENDERDEFINE", # HID:41136 -"HID:WIZARDS_HID_TXTSENDERNAME", # HID:41137 -"HID:WIZARDS_HID_TXTSENDERSTREET", # HID:41138 -"HID:WIZARDS_HID_TXTSENDERPOSTCODE", # HID:41139 -"HID:WIZARDS_HID_TXTSENDERSTATE", # HID:41140 -"HID:WIZARDS_HID_TXTSENDERCITY", # HID:41141 -"HID:WIZARDS_HID_TXTSENDERFAX", # HID:41142 -"HID:WIZARDS_HID_OPTRECEIVERPLACEHOLDER", # HID:41143 -"HID:WIZARDS_HID_OPTRECEIVERDATABASE", # HID:41144 -"HID:WIZARDS_HID_TXTFOOTER", # HID:41145 -"HID:WIZARDS_HID_CHKFOOTERNEXTPAGES", # HID:41146 -"HID:WIZARDS_HID_CHKFOOTERPAGENUMBERS", # HID:41147 -"HID:WIZARDS_HID_TXTTEMPLATENAME", # HID:41148 -"HID:WIZARDS_HID_FILETEMPLATEPATH", # HID:41149 -"HID:WIZARDS_HID_OPTCREATEFAX", # HID:41150 -"HID:WIZARDS_HID_OPTMAKECHANGES", # HID:41151 -"HID:WIZARDS_HID_IMAGECONTROL2", # HID:41152 -"HID:WIZARDS_HID_FAXWIZ_TXTPATH", # HID:41153 -"HID:WIZARDS_HID_FAXWIZ_CMDPATH", # HID:41154 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_FAXWIZARD", # HID:41180 -"HID:WIZARDS_HID_FAXWIZARD_HELP", # HID:41181 -"HID:WIZARDS_HID_FAXWIZARD_BACK", # HID:41182 -"HID:WIZARDS_HID_FAXWIZARD_NEXT", # HID:41183 -"HID:WIZARDS_HID_FAXWIZARD_CREATE", # HID:41184 -"HID:WIZARDS_HID_FAXWIZARD_CANCEL", # HID:41185 -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"", -"HID:WIZARDS_HID_DLGTABLE_DIALOG", # HID:41200 -"", -"HID:WIZARDS_HID_DLGTABLE_CMDPREV", # HID:41202 -"HID:WIZARDS_HID_DLGTABLE_CMDNEXT", # HID:41203 -"HID:WIZARDS_HID_DLGTABLE_CMDFINISH", # HID:41204 -"HID:WIZARDS_HID_DLGTABLE_CMDCANCEL", # HID:41205 -"HID:WIZARDS_HID_DLGTABLE_OPTBUSINESS", # HID:41206 -"HID:WIZARDS_HID_DLGTABLE_OPTPRIVATE", # HID:41207 -"HID:WIZARDS_HID_DLGTABLE_LBTABLES", # HID:41208 -"HID:WIZARDS_HID_DLGTABLE_FIELDSAVAILABLE", # HID:41209 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVESELECTED", # HID:41210 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVEALL", # HID:41211 -"HID:WIZARDS_HID_DLGTABLE_CMDREMOVESELECTED", # HID:41212 -"HID:WIZARDS_HID_DLGTABLE_CMDREMOVEALL", # HID:41213 -"HID:WIZARDS_HID_DLGTABLE_FIELDSSELECTED", # HID:41214 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP", # HID:41215 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN", # HID:41216 -"", -"", -"", -"HID:WIZARDS_HID_DLGTABLE_LB_SELFIELDNAMES", # HID:41220 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDUP", # HID:41221 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDDOWN", # HID:41222 -"HID:WIZARDS_HID_DLGTABLE_CMDMINUS", # HID:41223 -"HID:WIZARDS_HID_DLGTABLE_CMDPLUS", # HID:41224 -"HID:WIZARDS_HID_DLGTABLE_COLNAME", # HID:41225 -"HID:WIZARDS_HID_DLGTABLE_COLMODIFIER", # HID:41226 -"HID:WIZARDS_HID_DLGTABLE_CHK_USEPRIMEKEY", # HID:41227 -"HID:WIZARDS_HID_DLGTABLE_OPT_PK_AUTOMATIC", # HID:41228 -"HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE_AUTOMATIC", # HID:41229 -"HID:WIZARDS_HID_DLGTABLE_OPT_PK_SINGLE", # HID:41230 -"HID:WIZARDS_HID_DLGTABLE_LB_PK_FIELDNAME", # HID:41231 -"HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE", # HID:41232 -"HID:WIZARDS_HID_DLGTABLE_OPT_PK_SEVERAL", # HID:41233 -"HID:WIZARDS_HID_DLGTABLE_FIELDS_PK_AVAILABLE", # HID:41234 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVE_PK_SELECTED", # HID:41235 -"HID:WIZARDS_HID_DLGTABLE_CMDREMOVE_PK_SELECTED", # HID:41236 -"HID:WIZARDS_HID_DLGTABLE_FIELDS_PK_SELECTED", # HID:41237 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP_PK_SELECTED", # HID:41238 -"HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN_PK_SELECTED", # HID:41239 -"HID:WIZARDS_HID_DLGTABLE_TXT_NAME", # HID:41240 -"HID:WIZARDS_HID_DLGTABLE_OPT_MODIFYTABLE", # HID:41241 -"HID:WIZARDS_HID_DLGTABLE_OPT_WORKWITHTABLE", # HID:41242 -"HID:WIZARDS_HID_DLGTABLE_OPT_STARTFORMWIZARD", # HID:41243 -"HID:WIZARDS_HID_DLGTABLE_LST_CATALOG", # HID:41244 -"HID:WIZARDS_HID_DLGTABLE_LST_SCHEMA" # HID:41245 -] +class HelpIds: + array1 = [ + "HID:WIZARDS_HID0_WEBWIZARD", # HID:34200 + "HID:WIZARDS_HID0_HELP", # HID:34201 + "HID:WIZARDS_HID0_NEXT", # HID:34202 + "HID:WIZARDS_HID0_PREV", # HID:34203 + "HID:WIZARDS_HID0_CREATE", # HID:34204 + "HID:WIZARDS_HID0_CANCEL", # HID:34205 + "HID:WIZARDS_HID0_STATUS_DIALOG", # HID:34206 + "HID:WIZARDS_HID1_LST_SESSIONS", # HID:34207 + "", + "HID:WIZARDS_HID1_BTN_DEL_SES", # HID:34209 + "HID:WIZARDS_HID2_LST_DOCS", # HID:34210 + "HID:WIZARDS_HID2_BTN_ADD_DOC", # HID:34211 + "HID:WIZARDS_HID2_BTN_REM_DOC", # HID:34212 + "HID:WIZARDS_HID2_BTN_DOC_UP", # HID:34213 + "HID:WIZARDS_HID2_BTN_DOC_DOWN", # HID:34214 + "HID:WIZARDS_HID2_TXT_DOC_TITLE", # HID:34215 + "HID:WIZARDS_HID2_TXT_DOC_DESC", # HID:34216 + "HID:WIZARDS_HID2_TXT_DOC_AUTHOR", # HID:34217 + "HID:WIZARDS_HID2_LST_DOC_EXPORT", # HID:34218 + "HID:WIZARDS_HID2_STATUS_ADD_DOCS", # HID:34219 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG1", # HID:34220 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG2", # HID:34221 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG3", # HID:34222 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG4", # HID:34223 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG5", # HID:34224 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG6", # HID:34225 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG7", # HID:34226 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG8", # HID:34227 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG9", # HID:34228 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG10", # HID:34229 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG11", # HID:34230 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG12", # HID:34231 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG13", # HID:34232 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG14", # HID:34233 + "HID:WIZARDS_HID3_IL_LAYOUTS_IMG15", # HID:34234 + "HID:WIZARDS_HID4_CHK_DISPLAY_FILENAME", # HID:34235 + "HID:WIZARDS_HID4_CHK_DISPLAY_DESCRIPTION", # HID:34236 + "HID:WIZARDS_HID4_CHK_DISPLAY_AUTHOR", # HID:34237 + "HID:WIZARDS_HID4_CHK_DISPLAY_CR_DATE", # HID:34238 + "HID:WIZARDS_HID4_CHK_DISPLAY_UP_DATE", # HID:34239 + "HID:WIZARDS_HID4_CHK_DISPLAY_FORMAT", # HID:34240 + "HID:WIZARDS_HID4_CHK_DISPLAY_F_ICON", # HID:34241 + "HID:WIZARDS_HID4_CHK_DISPLAY_PAGES", # HID:34242 + "HID:WIZARDS_HID4_CHK_DISPLAY_SIZE", # HID:34243 + "HID:WIZARDS_HID4_GRP_OPTIMAIZE_640", # HID:34244 + "HID:WIZARDS_HID4_GRP_OPTIMAIZE_800", # HID:34245 + "HID:WIZARDS_HID4_GRP_OPTIMAIZE_1024", # HID:34246 + "HID:WIZARDS_HID5_LST_STYLES", # HID:34247 + "HID:WIZARDS_HID5_BTN_BACKGND", # HID:34248 + "HID:WIZARDS_HID5_BTN_ICONS", # HID:34249 + "HID:WIZARDS_HID6_TXT_SITE_TITLE", # HID:34250 + "", + "", + "HID:WIZARDS_HID6_TXT_SITE_DESC", # HID:34253 + "", + "HID:WIZARDS_HID6_DATE_SITE_CREATED", # HID:34255 + "HID:WIZARDS_HID6_DATE_SITE_UPDATED", # HID:34256 + "", + "HID:WIZARDS_HID6_TXT_SITE_EMAIL", # HID:34258 + "HID:WIZARDS_HID6_TXT_SITE_COPYRIGHT", # HID:34259 + "HID:WIZARDS_HID7_BTN_PREVIEW", # HID:34260 + "HID:WIZARDS_HID7_CHK_PUBLISH_LOCAL", # HID:34261 + "HID:WIZARDS_HID7_TXT_LOCAL", # HID:34262 + "HID:WIZARDS_HID7_BTN_LOCAL", # HID:34263 + "HID:WIZARDS_HID7_CHK_PUBLISH_ZIP", # HID:34264 + "HID:WIZARDS_HID7_TXT_ZIP", # HID:34265 + "HID:WIZARDS_HID7_BTN_ZIP", # HID:34266 + "HID:WIZARDS_HID7_CHK_PUBLISH_FTP", # HID:34267 + "HID:WIZARDS_HID7_TXT_FTP", # HID:34268 + "HID:WIZARDS_HID7_BTN_FTP", # HID:34269 + "HID:WIZARDS_HID7_CHK_SAVE", # HID:34270 + "HID:WIZARDS_HID7_TXT_SAVE", # HID:34271 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_BG", # HID:34290 + "HID:WIZARDS_HID_BG_BTN_OTHER", # HID:34291 + "HID:WIZARDS_HID_BG_BTN_NONE", # HID:34292 + "HID:WIZARDS_HID_BG_BTN_OK", # HID:34293 + "HID:WIZARDS_HID_BG_BTN_CANCEL", # HID:34294 + "HID:WIZARDS_HID_BG_BTN_BACK", # HID:34295 + "HID:WIZARDS_HID_BG_BTN_FW", # HID:34296 + "HID:WIZARDS_HID_BG_BTN_IMG1", # HID:34297 + "HID:WIZARDS_HID_BG_BTN_IMG2", # HID:34298 + "HID:WIZARDS_HID_BG_BTN_IMG3", # HID:34299 + "HID:WIZARDS_HID_BG_BTN_IMG4", # HID:34300 + "HID:WIZARDS_HID_BG_BTN_IMG5", # HID:34301 + "HID:WIZARDS_HID_BG_BTN_IMG6", # HID:34302 + "HID:WIZARDS_HID_BG_BTN_IMG7", # HID:34303 + "HID:WIZARDS_HID_BG_BTN_IMG8", # HID:34304 + "HID:WIZARDS_HID_BG_BTN_IMG9", # HID:34305 + "HID:WIZARDS_HID_BG_BTN_IMG10", # HID:34306 + "HID:WIZARDS_HID_BG_BTN_IMG11", # HID:34307 + "HID:WIZARDS_HID_BG_BTN_IMG12", # HID:34308 + "HID:WIZARDS_HID_BG_BTN_IMG13", # HID:34309 + "HID:WIZARDS_HID_BG_BTN_IMG14", # HID:34300 + "HID:WIZARDS_HID_BG_BTN_IMG15", # HID:34311 + "HID:WIZARDS_HID_BG_BTN_IMG16", # HID:34312 + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGREPORT_DIALOG", # HID:34320 + "", + "HID:WIZARDS_HID_DLGREPORT_0_CMDPREV", # HID:34322 + "HID:WIZARDS_HID_DLGREPORT_0_CMDNEXT", # HID:34323 + "HID:WIZARDS_HID_DLGREPORT_0_CMDFINISH", # HID:34324 + "HID:WIZARDS_HID_DLGREPORT_0_CMDCANCEL", # HID:34325 + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGREPORT_1_LBTABLES", # HID:34330 + "HID:WIZARDS_HID_DLGREPORT_1_FIELDSAVAILABLE", # HID:34331 + "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVESELECTED", # HID:34332 + "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEALL", # HID:34333 + "HID:WIZARDS_HID_DLGREPORT_1_CMDREMOVESELECTED", # HID:34334 + "HID:WIZARDS_HID_DLGREPORT_1_CMDREMOVEALL", # HID:34335 + "HID:WIZARDS_HID_DLGREPORT_1_FIELDSSELECTED", # HID:34336 + "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEUP", # HID:34337 + "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEDOWN", # HID:34338 + "", + "HID:WIZARDS_HID_DLGREPORT_2_GROUPING", # HID:34340 + "HID:WIZARDS_HID_DLGREPORT_2_CMDGROUP", # HID:34341 + "HID:WIZARDS_HID_DLGREPORT_2_CMDUNGROUP", # HID:34342 + "HID:WIZARDS_HID_DLGREPORT_2_PREGROUPINGDEST", # HID:34343 + "HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEUPGROUP", # HID:34344 + "HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEDOWNGROUP", # HID:34345 + "HID:WIZARDS_HID_DLGREPORT_3_SORT1", # HID:34346 + "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND1", # HID:34347 + "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND1", # HID:34348 + "HID:WIZARDS_HID_DLGREPORT_3_SORT2", # HID:34349 + "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND2", # HID:34350 + "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND2", # HID:34351 + "HID:WIZARDS_HID_DLGREPORT_3_SORT3", # HID:34352 + "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND3", # HID:34353 + "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND3", # HID:34354 + "HID:WIZARDS_HID_DLGREPORT_3_SORT4", # HID:34355 + "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND4", # HID:34356 + "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND4", # HID:34357 + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGREPORT_4_TITLE", # HID:34362 + "HID:WIZARDS_HID_DLGREPORT_4_DATALAYOUT", # HID:34363 + "HID:WIZARDS_HID_DLGREPORT_4_PAGELAYOUT", # HID:34364 + "HID:WIZARDS_HID_DLGREPORT_4_LANDSCAPE", # HID:34365 + "HID:WIZARDS_HID_DLGREPORT_4_PORTRAIT", # HID:34366 + "", + "", + "", + "HID:WIZARDS_HID_DLGREPORT_5_OPTDYNTEMPLATE", # HID:34370 + "HID:WIZARDS_HID_DLGREPORT_5_OPTSTATDOCUMENT", # HID:34371 + "HID:WIZARDS_HID_DLGREPORT_5_TXTTEMPLATEPATH", # HID:34372 + "HID:WIZARDS_HID_DLGREPORT_5_CMDTEMPLATEPATH", # HID:34373 + "HID:WIZARDS_HID_DLGREPORT_5_OPTEDITTEMPLATE", # HID:34374 + "HID:WIZARDS_HID_DLGREPORT_5_OPTUSETEMPLATE", # HID:34375 + "HID:WIZARDS_HID_DLGREPORT_5_TXTDOCUMENTPATH", # HID:34376 + "HID:WIZARDS_HID_DLGREPORT_5_CMDDOCUMENTPATH", # HID:34377 + "HID:WIZARDS_HID_DLGREPORT_5_CHKLINKTODB", # HID:34378 + "", + "", + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_1", # HID:34381 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_2", # HID:34382 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_3", # HID:34383 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_4", # HID:34384 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_5", # HID:34385 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_6", # HID:34386 + "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_7", # HID:34387 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGFORM_DIALOG", # HID:34400 + "", + "HID:WIZARDS_HID_DLGFORM_CMDPREV", # HID:34402 + "HID:WIZARDS_HID_DLGFORM_CMDNEXT", # HID:34403 + "HID:WIZARDS_HID_DLGFORM_CMDFINISH", # HID:34404 + "HID:WIZARDS_HID_DLGFORM_CMDCANCEL", # HID:34405 + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGFORM_MASTER_LBTABLES", # HID:34411 + "HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSAVAILABLE", # HID:34412 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVESELECTED", # HID:34413 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEALL", # HID:34414 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDREMOVESELECTED", # HID:34415 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDREMOVEALL", # HID:34416 + "HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSSELECTED", # HID:34417 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEUP", # HID:34418 + "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEDOWN", # HID:34419 + "", + "HID:WIZARDS_HID_DLGFORM_CHKCREATESUBFORM", # HID:34421 + "HID:WIZARDS_HID_DLGFORM_OPTONEXISTINGRELATION", # HID:34422 + "HID:WIZARDS_HID_DLGFORM_OPTSELECTMANUALLY", # HID:34423 + "HID:WIZARDS_HID_DLGFORM_lstRELATIONS", # HID:34424 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGFORM_SUB_LBTABLES", # HID:34431 + "HID:WIZARDS_HID_DLGFORM_SUB_FIELDSAVAILABLE", # HID:34432 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVESELECTED", # HID:34433 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEALL", # HID:34434 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDREMOVESELECTED", # HID:34435 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDREMOVEALL", # HID:34436 + "HID:WIZARDS_HID_DLGFORM_SUB_FIELDSSELECTED", # HID:34437 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEUP", # HID:34438 + "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEDOWN", # HID:34439 + "", + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK1", # HID:34441 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK1", # HID:34442 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK2", # HID:34443 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK2", # HID:34444 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK3", # HID:34445 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK3", # HID:34446 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK4", # HID:34447 + "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK4", # HID:34448 + "", + "", + "HID:WIZARDS_HID_DLGFORM_CMDALIGNLEFT", # HID:34451 + "HID:WIZARDS_HID_DLGFORM_CMDALIGNRIGHT", # HID:34452 + "HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED", # HID:34453 + "HID:WIZARDS_HID_DLGFORM_CMDTOPLABELED", # HID:34454 + "HID:WIZARDS_HID_DLGFORM_CMDTABLESTYLE", # HID:34455 + "HID:WIZARDS_HID_DLGFORM_CMDTOPJUSTIFIED", # HID:34456 + "HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED2", # HID:34457 + "HID:WIZARDS_HID_DLGFORM_CMDTOPLABELED2", # HID:34458 + "HID:WIZARDS_HID_DLGFORM_CMDTABLESTYLE2", # HID:34459 + "HID:WIZARDS_HID_DLGFORM_CMDTOPJUSTIFIED2", # HID:34460 + "HID:WIZARDS_HID_DLGFORM_OPTNEWDATAONLY", # HID:34461 + "HID:WIZARDS_HID_DLGFORM_OPTDISPLAYALLDATA", # HID:34462 + "HID:WIZARDS_HID_DLGFORM_CHKNOMODIFICATION", # HID:34463 + "HID:WIZARDS_HID_DLGFORM_CHKNODELETION", # HID:34464 + "HID:WIZARDS_HID_DLGFORM_CHKNOADDITION", # HID:34465 + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGFORM_LSTSTYLES", # HID:34471 + "HID:WIZARDS_HID_DLGFORM_CMDNOBORDER", # HID:34472 + "HID:WIZARDS_HID_DLGFORM_CMD3DBORDER", # HID:34473 + "HID:WIZARDS_HID_DLGFORM_CMDSIMPLEBORDER", # HID:34474 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGFORM_TXTPATH", # HID:34481 + "HID:WIZARDS_HID_DLGFORM_OPTWORKWITHFORM", # HID:34482 + "HID:WIZARDS_HID_DLGFORM_OPTMODIFYFORM", # HID:34483 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGNEWSLTR_DIALOG", # HID:34500 + "HID:WIZARDS_HID_DLGNEWSLTR_OPTSTANDARDLAYOUT", # HID:34501 + "HID:WIZARDS_HID_DLGNEWSLTR_OPTPARTYLAYOUT", # HID:34502 + "HID:WIZARDS_HID_DLGNEWSLTR_OPTBROCHURELAYOUT", # HID:34503 + "HID:WIZARDS_HID_DLGNEWSLTR_OPTSINGLESIDED", # HID:34504 + "HID:WIZARDS_HID_DLGNEWSLTR_OPTDOUBLESIDED", # HID:34505 + "HID:WIZARDS_HID_DLGNEWSLTR_CMDGOON", # HID:34506 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGDEPOT_DIALOG_SELLBUY", # HID:34520 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SELLBUY", # HID:34521 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTQUANTITY", # HID:34522 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTRATE", # HID:34523 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTDATE", # HID:34524 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTCOMMISSION", # HID:34525 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTFIX", # HID:34526 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTMINIMUM", # HID:34527 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SELLBUY", # HID:34528 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SELLBUY", # HID:34529 + "HID:WIZARDS_HID_DLGDEPOT_1_LSTSELLSTOCKS", # HID:34530 + "HID:WIZARDS_HID_DLGDEPOT_2_LSTBUYSTOCKS", # HID:34531 + "HID:WIZARDS_HID_DLGDEPOT_DIALOG_SPLIT", # HID:34532 + "HID:WIZARDS_HID_DLGDEPOT_0_LSTSTOCKNAMES", # HID:34533 + "HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SPLIT", # HID:34534 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SPLIT", # HID:34535 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SPLIT", # HID:34536 + "HID:WIZARDS_HID_DLGDEPOT_1_OPTPERSHARE", # HID:34537 + "HID:WIZARDS_HID_DLGDEPOT_1_OPTTOTAL", # HID:34538 + "HID:WIZARDS_HID_DLGDEPOT_1_TXTDIVIDEND", # HID:34539 + "HID:WIZARDS_HID_DLGDEPOT_2_TXTOLDRATE", # HID:34540 + "HID:WIZARDS_HID_DLGDEPOT_2_TXTNEWRATE", # HID:34541 + "HID:WIZARDS_HID_DLGDEPOT_2_TXTDATE", # HID:34542 + "HID:WIZARDS_HID_DLGDEPOT_3_TXTSTARTDATE", # HID:34543 + "HID:WIZARDS_HID_DLGDEPOT_3_TXTENDDATE", # HID:34544 + "HID:WIZARDS_HID_DLGDEPOT_3_OPTDAILY", # HID:34545 + "HID:WIZARDS_HID_DLGDEPOT_3_OPTWEEKLY", # HID:34546 + "HID:WIZARDS_HID_DLGDEPOT_DIALOG_HISTORY", # HID:34547 + "HID:WIZARDS_HID_DLGDEPOT_LSTMARKETS", # HID:34548 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_HISTORY", # HID:34549 + "HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_HISTORY", # HID:34550 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGIMPORT_DIALOG", # HID:34570 + "HID:WIZARDS_HID_DLGIMPORT_0_CMDHELP", # HID:34571 + "HID:WIZARDS_HID_DLGIMPORT_0_CMDCANCEL", # HID:34572 + "HID:WIZARDS_HID_DLGIMPORT_0_CMDPREV", # HID:34573 + "HID:WIZARDS_HID_DLGIMPORT_0_CMDNEXT", # HID:34574 + "HID:WIZARDS_HID_DLGIMPORT_0_OPTSODOCUMENTS", # HID:34575 + "HID:WIZARDS_HID_DLGIMPORT_0_OPTMSDOCUMENTS", # HID:34576 + "HID:WIZARDS_HID_DLGIMPORT_0_CHKLOGFILE", # HID:34577 + "HID:WIZARDS_HID_DLGIMPORT_2_CHKWORD", # HID:34578 + "HID:WIZARDS_HID_DLGIMPORT_2_CHKEXCEL", # HID:34579 + "HID:WIZARDS_HID_DLGIMPORT_2_CHKPOWERPOINT", # HID:34580 + "HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATE", # HID:34581 + "HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATERECURSE", # HID:34582 + "HID:WIZARDS_HID_DLGIMPORT_2_LBTEMPLATEPATH", # HID:34583 + "HID:WIZARDS_HID_DLGIMPORT_2_EDTEMPLATEPATH", # HID:34584 + "HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT", # HID:34585 + "HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENT", # HID:34586 + "HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENTRECURSE", # HID:34587 + "HID:WIZARDS_HID_DLGIMPORT_2_LBDOCUMENTPATH", # HID:34588 + "HID:WIZARDS_HID_DLGIMPORT_2_EDDOCUMENTPATH", # HID:34589 + "HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT", # HID:34590 + "HID:WIZARDS_HID_DLGIMPORT_2_LBEXPORTDOCUMENTPATH", # HID:34591 + "HID:WIZARDS_HID_DLGIMPORT_2_EDEXPORTDOCUMENTPATH", # HID:34592 + "HID:WIZARDS_HID_DLGIMPORT_2_CMDEXPORTPATHSELECT", # HID:34593 + "", + "HID:WIZARDS_HID_DLGIMPORT_3_TBSUMMARY", # HID:34595 + "HID:WIZARDS_HID_DLGIMPORT_0_CHKWRITER", # HID:34596 + "HID:WIZARDS_HID_DLGIMPORT_0_CHKCALC", # HID:34597 + "HID:WIZARDS_HID_DLGIMPORT_0_CHKIMPRESS", # HID:34598 + "HID:WIZARDS_HID_DLGIMPORT_0_CHKMATHGLOBAL", # HID:34599 + "HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT2", # HID:34600 + "HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT2", # HID:34601 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGCORRESPONDENCE_DIALOG", # HID:34630 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_CANCEL", # HID:34631 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA1", # HID:34632 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA2", # HID:34633 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_AGENDAOKAY", # HID:34634 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER1", # HID:34635 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER2", # HID:34636 + "HID:WIZARDS_HID_DLGCORRESPONDENCE_LETTEROKAY", # HID:34637 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGSTYLES_DIALOG", # HID:34650 + "HID:WIZARDS_HID_DLGSTYLES_LISTBOX", # HID:34651 + "HID:WIZARDS_HID_DLGSTYLES_CANCEL", # HID:34652 + "HID:WIZARDS_HID_DLGSTYLES_OKAY", # HID:34653 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGCONVERT_DIALOG", # HID:34660 + "HID:WIZARDS_HID_DLGCONVERT_CHECKBOX1", # HID:34661 + "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON1", # HID:34662 + "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON2", # HID:34663 + "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON3", # HID:34664 + "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON4", # HID:34665 + "HID:WIZARDS_HID_DLGCONVERT_LISTBOX1", # HID:34666 + "HID:WIZARDS_HID_DLGCONVERT_OBFILE", # HID:34667 + "HID:WIZARDS_HID_DLGCONVERT_OBDIR", # HID:34668 + "HID:WIZARDS_HID_DLGCONVERT_COMBOBOX1", # HID:34669 + "HID:WIZARDS_HID_DLGCONVERT_TBSOURCE", # HID:34670 + "HID:WIZARDS_HID_DLGCONVERT_CHECKRECURSIVE", # HID:34671 + "HID:WIZARDS_HID_DLGCONVERT_TBTARGET", # HID:34672 + "HID:WIZARDS_HID_DLGCONVERT_CBCANCEL", # HID:34673 + "HID:WIZARDS_HID_DLGCONVERT_CBHELP", # HID:34674 + "HID:WIZARDS_HID_DLGCONVERT_CBBACK", # HID:34675 + "HID:WIZARDS_HID_DLGCONVERT_CBGOON", # HID:34676 + "HID:WIZARDS_HID_DLGCONVERT_CBSOURCEOPEN", # HID:34677 + "HID:WIZARDS_HID_DLGCONVERT_CBTARGETOPEN", # HID:34678 + "HID:WIZARDS_HID_DLGCONVERT_CHKPROTECT", # HID:34679 + "HID:WIZARDS_HID_DLGCONVERT_CHKTEXTDOCUMENTS", # HID:34680 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGPASSWORD_CMDGOON", # HID:34690 + "HID:WIZARDS_HID_DLGPASSWORD_CMDCANCEL", # HID:34691 + "HID:WIZARDS_HID_DLGPASSWORD_CMDHELP", # HID:34692 + "HID:WIZARDS_HID_DLGPASSWORD_TXTPASSWORD", # HID:34693 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGHOLIDAYCAL_DIALOG", # HID:34700 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_PREVIEW", # HID:34701 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPYEAR", # HID:34702 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPMONTH", # HID:34703 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDYEAR", # HID:34704 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDMONTH", # HID:34705 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_SPINYEAR", # HID:34706 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_SPINMONTH", # HID:34707 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_CMBSTATE", # HID:34708 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_LBOWNDATA", # HID:34709 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDINSERT", # HID:34710 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDDELETE", # HID:34711 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENT", # HID:34712 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CHKEVENT", # HID:34713 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTDAY", # HID:34714 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTDAY", # HID:34715 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTMONTH", # HID:34716 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTMONTH", # HID:34717 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTYEAR", # HID:34718 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTYEAR", # HID:34719 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOWNDATA", # HID:34720 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDCANCEL", # HID:34721 + "HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOK" # HID:34722 + ] + array2 = ["HID:WIZARDS_HID_LTRWIZ_OPTBUSINESSLETTER", # HID:40769 + "HID:WIZARDS_HID_LTRWIZ_OPTPRIVOFFICIALLETTER", # HID:40770 + "HID:WIZARDS_HID_LTRWIZ_OPTPRIVATELETTER", # HID:40771 + "HID:WIZARDS_HID_LTRWIZ_LSTBUSINESSSTYLE", # HID:40772 + "HID:WIZARDS_HID_LTRWIZ_CHKBUSINESSPAPER", # HID:40773 + "HID:WIZARDS_HID_LTRWIZ_LSTPRIVOFFICIALSTYLE", # HID:40774 + "HID:WIZARDS_HID_LTRWIZ_LSTPRIVATESTYLE", # HID:40775 + "HID:WIZARDS_HID_LTRWIZ_CHKPAPERCOMPANYLOGO", # HID:40776 + "HID:WIZARDS_HID_LTRWIZ_NUMLOGOHEIGHT", # HID:40777 + "HID:WIZARDS_HID_LTRWIZ_NUMLOGOX", # HID:40778 + "HID:WIZARDS_HID_LTRWIZ_NUMLOGOWIDTH", # HID:40779 + "HID:WIZARDS_HID_LTRWIZ_NUMLOGOY", # HID:40780 + "HID:WIZARDS_HID_LTRWIZ_CHKPAPERCOMPANYADDRESS", # HID:40781 + "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSHEIGHT", # HID:40782 + "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSX", # HID:40783 + "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSWIDTH", # HID:40784 + "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSY", # HID:40785 + "HID:WIZARDS_HID_LTRWIZ_CHKCOMPANYRECEIVER", # HID:40786 + "HID:WIZARDS_HID_LTRWIZ_CHKPAPERFOOTER", # HID:40787 + "HID:WIZARDS_HID_LTRWIZ_NUMFOOTERHEIGHT", # HID:40788 + "HID:WIZARDS_HID_LTRWIZ_LSTLETTERNORM", # HID:40789 + "HID:WIZARDS_HID_LTRWIZ_CHKUSELOGO", # HID:40790 + "HID:WIZARDS_HID_LTRWIZ_CHKUSEADDRESSRECEIVER", # HID:40791 + "HID:WIZARDS_HID_LTRWIZ_CHKUSESIGNS", # HID:40792 + "HID:WIZARDS_HID_LTRWIZ_CHKUSESUBJECT", # HID:40793 + "HID:WIZARDS_HID_LTRWIZ_CHKUSESALUTATION", # HID:40794 + "HID:WIZARDS_HID_LTRWIZ_LSTSALUTATION", # HID:40795 + "HID:WIZARDS_HID_LTRWIZ_CHKUSEBENDMARKS", # HID:40796 + "HID:WIZARDS_HID_LTRWIZ_CHKUSEGREETING", # HID:40797 + "HID:WIZARDS_HID_LTRWIZ_LSTGREETING", # HID:40798 + "HID:WIZARDS_HID_LTRWIZ_CHKUSEFOOTER", # HID:40799 + "HID:WIZARDS_HID_LTRWIZ_OPTSENDERPLACEHOLDER", # HID:40800 + "HID:WIZARDS_HID_LTRWIZ_OPTSENDERDEFINE", # HID:40801 + "HID:WIZARDS_HID_LTRWIZ_TXTSENDERNAME", # HID:40802 + "HID:WIZARDS_HID_LTRWIZ_TXTSENDERSTREET", # HID:40803 + "HID:WIZARDS_HID_LTRWIZ_TXTSENDERPOSTCODE", # HID:40804 + "HID:WIZARDS_HID_LTRWIZ_TXTSENDERSTATE_TEXT", # HID:40805 + "HID:WIZARDS_HID_LTRWIZ_TXTSENDERCITY", # HID:40806 + "HID:WIZARDS_HID_LTRWIZ_OPTRECEIVERPLACEHOLDER", # HID:40807 + "HID:WIZARDS_HID_LTRWIZ_OPTRECEIVERDATABASE", # HID:40808 + "HID:WIZARDS_HID_LTRWIZ_TXTFOOTER", # HID:40809 + "HID:WIZARDS_HID_LTRWIZ_CHKFOOTERNEXTPAGES", # HID:40810 + "HID:WIZARDS_HID_LTRWIZ_CHKFOOTERPAGENUMBERS", # HID:40811 + "HID:WIZARDS_HID_LTRWIZ_TXTTEMPLATENAME", # HID:40812 + "HID:WIZARDS_HID_LTRWIZ_OPTCREATELETTER", # HID:40813 + "HID:WIZARDS_HID_LTRWIZ_OPTMAKECHANGES", # HID:40814 + "HID:WIZARDS_HID_LTRWIZ_TXTPATH", # HID:40815 + "HID:WIZARDS_HID_LTRWIZ_CMDPATH", # HID:40816 + "", + "", + "", + "HID:WIZARDS_HID_LTRWIZARD", # HID:40820 + "HID:WIZARDS_HID_LTRWIZARD_HELP", # HID:40821 + "HID:WIZARDS_HID_LTRWIZARD_BACK", # HID:40822 + "HID:WIZARDS_HID_LTRWIZARD_NEXT", # HID:40823 + "HID:WIZARDS_HID_LTRWIZARD_CREATE", # HID:40824 + "HID:WIZARDS_HID_LTRWIZARD_CANCEL", # HID:40825 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_LSTTABLES", # HID:40850 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDS", # HID:40851 + "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVESELECTED", # HID:40852 + "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEALL", # HID:40853 + "HID:WIZARDS_HID_QUERYWIZARD_CMDREMOVESELECTED", # HID:40854 + "HID:WIZARDS_HID_QUERYWIZARD_CMDREMOVEALL", # HID:40855 + "HID:WIZARDS_HID_QUERYWIZARD_LSTSELFIELDS", # HID:40856 + "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEUP", # HID:40857 + "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEDOWN", # HID:40858 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_SORT1", # HID:40865 + "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND1", # HID:40866 + "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND1", # HID:40867 + "HID:WIZARDS_HID_QUERYWIZARD_SORT2", # HID:40868 + "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND2", # HID:40869 + "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND2", # HID:40870 + "HID:WIZARDS_HID_QUERYWIZARD_SORT3", # HID:40871 + "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND3", # HID:40872 + "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND3", # HID:40873 + "HID:WIZARDS_HID_QUERYWIZARD_SORT4", # HID:40874 + "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND4", # HID:40875 + "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND4", # HID:40876 + "", + "HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHALL", # HID:40878 + "HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHANY", # HID:40879 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_1", # HID:40880 + "HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_1", # HID:40881 + "HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_1", # HID:40882 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_2", # HID:40883 + "HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_2", # HID:40884 + "HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_2", # HID:40885 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_3", # HID:40886 + "HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_3", # HID:40887 + "HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_3", # HID:40888 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATEDETAILQUERY", # HID:40895 + "HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATESUMMARYQUERY", # HID:40896 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_1", # HID:40897 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_1", # HID:40898 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_2", # HID:40899 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_2", # HID:40900 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_3", # HID:40901 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_3", # HID:40902 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_4", # HID:40903 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_4", # HID:40904 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_5", # HID:40905 + "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_5", # HID:40906 + "HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEPLUS", # HID:40907 + "HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEMINUS", # HID:40908 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDS", # HID:40915 + "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVESELECTED", # HID:40916 + "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERREMOVESELECTED", # HID:40917 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERSELFIELDS", # HID:40918 + "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEUP", # HID:40919 + "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEDOWN", # HID:40920 + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHALL", # HID:40923 + "HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHANY", # HID:40924 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_1", # HID:40925 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_1", # HID:40926 + "HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_1", # HID:40927 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_2", # HID:40928 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_2", # HID:40929 + "HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_2", # HID:40930 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_3", # HID:40931 + "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_3", # HID:40932 + "HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_3", # HID:40933 + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_1", # HID:40940 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_2", # HID:40941 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_3", # HID:40942 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_4", # HID:40943 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_5", # HID:40944 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_6", # HID:40945 + "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_7", # HID:40946 + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD_TXTQUERYTITLE", # HID:40955 + "HID:WIZARDS_HID_QUERYWIZARD_OPTDISPLAYQUERY", # HID:40956 + "HID:WIZARDS_HID_QUERYWIZARD_OPTMODIFYQUERY", # HID:40957 + "HID:WIZARDS_HID_QUERYWIZARD_TXTSUMMARY", # HID:40958 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_QUERYWIZARD", # HID:40970 + "", + "HID:WIZARDS_HID_QUERYWIZARD_BACK", # HID:40972 + "HID:WIZARDS_HID_QUERYWIZARD_NEXT", # HID:40973 + "HID:WIZARDS_HID_QUERYWIZARD_CREATE", # HID:40974 + "HID:WIZARDS_HID_QUERYWIZARD_CANCEL", # HID:40975 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_IS", # HID:41000 + "", "HID:WIZARDS_HID_IS_BTN_NONE", # HID:41002 + "HID:WIZARDS_HID_IS_BTN_OK", # HID:41003 + "HID:WIZARDS_HID_IS_BTN_CANCEL", # HID:41004 + "HID:WIZARDS_HID_IS_BTN_IMG1", # HID:41005 + "HID:WIZARDS_HID_IS_BTN_IMG2", # HID:41006 + "HID:WIZARDS_HID_IS_BTN_IMG3", # HID:41007 + "HID:WIZARDS_HID_IS_BTN_IMG4", # HID:41008 + "HID:WIZARDS_HID_IS_BTN_IMG5", # HID:41009 + "HID:WIZARDS_HID_IS_BTN_IMG6", # HID:41010 + "HID:WIZARDS_HID_IS_BTN_IMG7", # HID:41011 + "HID:WIZARDS_HID_IS_BTN_IMG8", # HID:41012 + "HID:WIZARDS_HID_IS_BTN_IMG9", # HID:41013 + "HID:WIZARDS_HID_IS_BTN_IMG10", # HID:41014 + "HID:WIZARDS_HID_IS_BTN_IMG11", # HID:41015 + "HID:WIZARDS_HID_IS_BTN_IMG12", # HID:41016 + "HID:WIZARDS_HID_IS_BTN_IMG13", # HID:41017 + "HID:WIZARDS_HID_IS_BTN_IMG14", # HID:41018 + "HID:WIZARDS_HID_IS_BTN_IMG15", # HID:41019 + "HID:WIZARDS_HID_IS_BTN_IMG16", # HID:41020 + "HID:WIZARDS_HID_IS_BTN_IMG17", # HID:41021 + "HID:WIZARDS_HID_IS_BTN_IMG18", # HID:41022 + "HID:WIZARDS_HID_IS_BTN_IMG19", # HID:41023 + "HID:WIZARDS_HID_IS_BTN_IMG20", # HID:41024 + "HID:WIZARDS_HID_IS_BTN_IMG21", # HID:41025 + "HID:WIZARDS_HID_IS_BTN_IMG22", # HID:41026 + "HID:WIZARDS_HID_IS_BTN_IMG23", # HID:41027 + "HID:WIZARDS_HID_IS_BTN_IMG24", # HID:41028 + "HID:WIZARDS_HID_IS_BTN_IMG25", # HID:41029 + "HID:WIZARDS_HID_IS_BTN_IMG26", # HID:41030 + "HID:WIZARDS_HID_IS_BTN_IMG27", # HID:41031 + "HID:WIZARDS_HID_IS_BTN_IMG28", # HID:41032 + "HID:WIZARDS_HID_IS_BTN_IMG29", # HID:41033 + "HID:WIZARDS_HID_IS_BTN_IMG30", # HID:41034 + "HID:WIZARDS_HID_IS_BTN_IMG31", # HID:41035 + "HID:WIZARDS_HID_IS_BTN_IMG32", # HID:41036 + "", + "", + "", + "HID:WIZARDS_HID_FTP", # HID:41040 + "HID:WIZARDS_HID_FTP_SERVER", # HID:41041 + "HID:WIZARDS_HID_FTP_USERNAME", # HID:41042 + "HID:WIZARDS_HID_FTP_PASS", # HID:41043 + "HID:WIZARDS_HID_FTP_TEST", # HID:41044 + "HID:WIZARDS_HID_FTP_TXT_PATH", # HID:41045 + "HID:WIZARDS_HID_FTP_BTN_PATH", # HID:41046 + "HID:WIZARDS_HID_FTP_OK", # HID:41047 + "HID:WIZARDS_HID_FTP_CANCEL", # HID:41048 + "", + "", + "HID:WIZARDS_HID_AGWIZ", # HID:41051 + "HID:WIZARDS_HID_AGWIZ_HELP", # HID:41052 + "HID:WIZARDS_HID_AGWIZ_NEXT", # HID:41053 + "HID:WIZARDS_HID_AGWIZ_PREV", # HID:41054 + "HID:WIZARDS_HID_AGWIZ_CREATE", # HID:41055 + "HID:WIZARDS_HID_AGWIZ_CANCEL", # HID:41056 + "HID:WIZARDS_HID_AGWIZ_1_LIST_PAGEDESIGN", # HID:41057 + "HID:WIZARDS_HID_AGWIZ_1_CHK_MINUTES", # HID:41058 + "HID:WIZARDS_HID_AGWIZ_2_TXT_TIME", # HID:41059 + "HID:WIZARDS_HID_AGWIZ_2_TXT_DATE", # HID:41060 + "HID:WIZARDS_HID_AGWIZ_2_TXT_TITLE", # HID:41061 + "HID:WIZARDS_HID_AGWIZ_2_TXT_LOCATION", # HID:41062 + "HID:WIZARDS_HID_AGWIZ_3_CHK_MEETING_TYPE", # HID:41063 + "HID:WIZARDS_HID_AGWIZ_3_CHK_READ", # HID:41064 + "HID:WIZARDS_HID_AGWIZ_3_CHK_BRING", # HID:41065 + "HID:WIZARDS_HID_AGWIZ_3_CHK_NOTES", # HID:41066 + "HID:WIZARDS_HID_AGWIZ_4_CHK_CALLED_BY", # HID:41067 + "HID:WIZARDS_HID_AGWIZ_4_CHK_FACILITATOR", # HID:41068 + "HID:WIZARDS_HID_AGWIZ_4_CHK_NOTETAKER", # HID:41069 + "HID:WIZARDS_HID_AGWIZ_4_CHK_TIMEKEEPER", # HID:41070 + "HID:WIZARDS_HID_AGWIZ_4_CHK_ATTENDEES", # HID:41071 + "HID:WIZARDS_HID_AGWIZ_4_CHK_OBSERVERS", # HID:41072 + "HID:WIZARDS_HID_AGWIZ_4_CHK_RESOURCEPERSONS", # HID:41073 + "HID:WIZARDS_HID_AGWIZ_6_TXT_TEMPLATENAME", # HID:41074 + "HID:WIZARDS_HID_AGWIZ_6_TXT_TEMPLATEPATH", # HID:41075 + "HID:WIZARDS_HID_AGWIZ_6_BTN_TEMPLATEPATH", # HID:41076 + "HID:WIZARDS_HID_AGWIZ_6_OPT_CREATEAGENDA", # HID:41077 + "HID:WIZARDS_HID_AGWIZ_6_OPT_MAKECHANGES", # HID:41078 + "HID:WIZARDS_HID_AGWIZ_5_BTN_INSERT", # HID:41079 + "HID:WIZARDS_HID_AGWIZ_5_BTN_REMOVE", # HID:41080 + "HID:WIZARDS_HID_AGWIZ_5_BTN_UP", # HID:41081 + "HID:WIZARDS_HID_AGWIZ_5_BTN_DOWN", # HID:41082 + "HID:WIZARDS_HID_AGWIZ_5_SCROLL_BAR", # HID:41083 + "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_1", # HID:41084 + "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_1", # HID:41085 + "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_1", # HID:41086 + "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_2", # HID:41087 + "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_2", # HID:41088 + "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_2", # HID:41089 + "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_3", # HID:41090 + "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_3", # HID:41091 + "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_3", # HID:41092 + "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_4", # HID:41093 + "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_4", # HID:41094 + "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_4", # HID:41095 + "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_5", # HID:41096 + "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_5", # HID:41097 + "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_5", # HID:41098 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_FAXWIZ_OPTBUSINESSFAX", # HID:41120 + "HID:WIZARDS_HID_FAXWIZ_LSTBUSINESSSTYLE", # HID:41121 + "HID:WIZARDS_HID_FAXWIZ_OPTPRIVATEFAX", # HID:41122 + "HID:WIZARDS_HID_LSTPRIVATESTYLE", # HID:41123 + "HID:WIZARDS_HID_IMAGECONTROL3", # HID:41124 + "HID:WIZARDS_HID_CHKUSELOGO", # HID:41125 + "HID:WIZARDS_HID_CHKUSEDATE", # HID:41126 + "HID:WIZARDS_HID_CHKUSECOMMUNICATIONTYPE", # HID:41127 + "HID:WIZARDS_HID_LSTCOMMUNICATIONTYPE", # HID:41128 + "HID:WIZARDS_HID_CHKUSESUBJECT", # HID:41129 + "HID:WIZARDS_HID_CHKUSESALUTATION", # HID:41130 + "HID:WIZARDS_HID_LSTSALUTATION", # HID:41131 + "HID:WIZARDS_HID_CHKUSEGREETING", # HID:41132 + "HID:WIZARDS_HID_LSTGREETING", # HID:41133 + "HID:WIZARDS_HID_CHKUSEFOOTER", # HID:41134 + "HID:WIZARDS_HID_OPTSENDERPLACEHOLDER", # HID:41135 + "HID:WIZARDS_HID_OPTSENDERDEFINE", # HID:41136 + "HID:WIZARDS_HID_TXTSENDERNAME", # HID:41137 + "HID:WIZARDS_HID_TXTSENDERSTREET", # HID:41138 + "HID:WIZARDS_HID_TXTSENDERPOSTCODE", # HID:41139 + "HID:WIZARDS_HID_TXTSENDERSTATE", # HID:41140 + "HID:WIZARDS_HID_TXTSENDERCITY", # HID:41141 + "HID:WIZARDS_HID_TXTSENDERFAX", # HID:41142 + "HID:WIZARDS_HID_OPTRECEIVERPLACEHOLDER", # HID:41143 + "HID:WIZARDS_HID_OPTRECEIVERDATABASE", # HID:41144 + "HID:WIZARDS_HID_TXTFOOTER", # HID:41145 + "HID:WIZARDS_HID_CHKFOOTERNEXTPAGES", # HID:41146 + "HID:WIZARDS_HID_CHKFOOTERPAGENUMBERS", # HID:41147 + "HID:WIZARDS_HID_TXTTEMPLATENAME", # HID:41148 + "HID:WIZARDS_HID_FILETEMPLATEPATH", # HID:41149 + "HID:WIZARDS_HID_OPTCREATEFAX", # HID:41150 + "HID:WIZARDS_HID_OPTMAKECHANGES", # HID:41151 + "HID:WIZARDS_HID_IMAGECONTROL2", # HID:41152 + "HID:WIZARDS_HID_FAXWIZ_TXTPATH", # HID:41153 + "HID:WIZARDS_HID_FAXWIZ_CMDPATH", # HID:41154 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_FAXWIZARD", # HID:41180 + "HID:WIZARDS_HID_FAXWIZARD_HELP", # HID:41181 + "HID:WIZARDS_HID_FAXWIZARD_BACK", # HID:41182 + "HID:WIZARDS_HID_FAXWIZARD_NEXT", # HID:41183 + "HID:WIZARDS_HID_FAXWIZARD_CREATE", # HID:41184 + "HID:WIZARDS_HID_FAXWIZARD_CANCEL", # HID:41185 + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "HID:WIZARDS_HID_DLGTABLE_DIALOG", # HID:41200 + "", + "HID:WIZARDS_HID_DLGTABLE_CMDPREV", # HID:41202 + "HID:WIZARDS_HID_DLGTABLE_CMDNEXT", # HID:41203 + "HID:WIZARDS_HID_DLGTABLE_CMDFINISH", # HID:41204 + "HID:WIZARDS_HID_DLGTABLE_CMDCANCEL", # HID:41205 + "HID:WIZARDS_HID_DLGTABLE_OPTBUSINESS", # HID:41206 + "HID:WIZARDS_HID_DLGTABLE_OPTPRIVATE", # HID:41207 + "HID:WIZARDS_HID_DLGTABLE_LBTABLES", # HID:41208 + "HID:WIZARDS_HID_DLGTABLE_FIELDSAVAILABLE", # HID:41209 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVESELECTED", # HID:41210 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEALL", # HID:41211 + "HID:WIZARDS_HID_DLGTABLE_CMDREMOVESELECTED", # HID:41212 + "HID:WIZARDS_HID_DLGTABLE_CMDREMOVEALL", # HID:41213 + "HID:WIZARDS_HID_DLGTABLE_FIELDSSELECTED", # HID:41214 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP", # HID:41215 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN", # HID:41216 + "", + "", + "", + "HID:WIZARDS_HID_DLGTABLE_LB_SELFIELDNAMES", # HID:41220 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDUP", # HID:41221 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDDOWN", # HID:41222 + "HID:WIZARDS_HID_DLGTABLE_CMDMINUS", # HID:41223 + "HID:WIZARDS_HID_DLGTABLE_CMDPLUS", # HID:41224 + "HID:WIZARDS_HID_DLGTABLE_COLNAME", # HID:41225 + "HID:WIZARDS_HID_DLGTABLE_COLMODIFIER", # HID:41226 + "HID:WIZARDS_HID_DLGTABLE_CHK_USEPRIMEKEY", # HID:41227 + "HID:WIZARDS_HID_DLGTABLE_OPT_PK_AUTOMATIC", # HID:41228 + "HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE_AUTOMATIC", # HID:41229 + "HID:WIZARDS_HID_DLGTABLE_OPT_PK_SINGLE", # HID:41230 + "HID:WIZARDS_HID_DLGTABLE_LB_PK_FIELDNAME", # HID:41231 + "HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE", # HID:41232 + "HID:WIZARDS_HID_DLGTABLE_OPT_PK_SEVERAL", # HID:41233 + "HID:WIZARDS_HID_DLGTABLE_FIELDS_PK_AVAILABLE", # HID:41234 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVE_PK_SELECTED", # HID:41235 + "HID:WIZARDS_HID_DLGTABLE_CMDREMOVE_PK_SELECTED", # HID:41236 + "HID:WIZARDS_HID_DLGTABLE_FIELDS_PK_SELECTED", # HID:41237 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP_PK_SELECTED", # HID:41238 + "HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN_PK_SELECTED", # HID:41239 + "HID:WIZARDS_HID_DLGTABLE_TXT_NAME", # HID:41240 + "HID:WIZARDS_HID_DLGTABLE_OPT_MODIFYTABLE", # HID:41241 + "HID:WIZARDS_HID_DLGTABLE_OPT_WORKWITHTABLE", # HID:41242 + "HID:WIZARDS_HID_DLGTABLE_OPT_STARTFORMWIZARD", # HID:41243 + "HID:WIZARDS_HID_DLGTABLE_LST_CATALOG", # HID:41244 + "HID:WIZARDS_HID_DLGTABLE_LST_SCHEMA" # HID:41245 + ] + + @classmethod + def getHelpIdString(self, nHelpId): + if nHelpId >= 34200 and nHelpId <= 34722: + return HelpIds.array1[nHelpId - 34200] + elif nHelpId >= 40769 and nHelpId <= 41245: + return HelpIds.array2[nHelpId - 40769] + else: + return None diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py index 393c1b4c173e..5e52a0c2811a 100644 --- a/wizards/com/sun/star/wizards/common/Helper.py +++ b/wizards/com/sun/star/wizards/common/Helper.py @@ -20,10 +20,11 @@ class Helper(object): def setUnoPropertyValue(self, xPSet, PropertyName, PropertyValue): try: if xPSet.getPropertySetInfo().hasPropertyByName(PropertyName): - uno.invoke(xPSet,"setPropertyValue", (PropertyName,PropertyValue)) + uno.invoke(xPSet,"setPropertyValue", + (PropertyName,PropertyValue)) else: selementnames = xPSet.getPropertySetInfo().getProperties() - raise ValueError("No Such Property: '" + PropertyName + "'"); + raise ValueError("No Such Property: '" + PropertyName + "'") except UnoException, exception: traceback.print_exc() @@ -61,7 +62,7 @@ class Helper(object): while i < MaxCount: if CurPropertyValue[i] is not None: aValue = CurPropertyValue[i] - if aValue is not None and aValue.Name.equals(PropertyName): + if aValue is not None and aValue.Name == PropertyName: return aValue.Value i += 1 @@ -100,7 +101,7 @@ class Helper(object): def getUnoStructValue(self, xPSet, PropertyName): try: if xPSet is not None: - if xPSet.getPropertySetInfo().hasPropertyByName(PropertyName) == True: + if xPSet.getPropertySetInfo().hasPropertyByName(PropertyName): oObject = xPSet.getPropertyValue(PropertyName) return oObject @@ -110,14 +111,17 @@ class Helper(object): return None @classmethod - def setUnoPropertyValues(self, xMultiPSetLst, PropertyNames, PropertyValues): + def setUnoPropertyValues(self, xMultiPSetLst, PropertyNames, + PropertyValues): try: if xMultiPSetLst is not None: - uno.invoke(xMultiPSetLst, "setPropertyValues", (PropertyNames, PropertyValues)) + uno.invoke(xMultiPSetLst, "setPropertyValues", + (PropertyNames, PropertyValues)) else: i = 0 while i < len(PropertyNames): - self.setUnoPropertyValue(xMultiPSetLst, PropertyNames[i], PropertyValues[i]) + self.setUnoPropertyValue(xMultiPSetLst, PropertyNames[i], + PropertyValues[i]) i += 1 except Exception, e: @@ -125,7 +129,8 @@ class Helper(object): ''' checks if the value of an object that represents an array is null. - check beforehand if the Object is really an array with "AnyConverter.IsArray(oObject) + check beforehand if the Object is really an array with + "AnyConverter.IsArray(oObject) @param oValue the paramter that has to represent an object @return a null reference if the array is empty ''' @@ -146,14 +151,16 @@ class Helper(object): return None def getComponentContext(_xMSF): - # Get the path to the extension and try to add the path to the class loader + #Get the path to the extension and + #try to add the path to the class loader aHelper = PropertySetHelper(_xMSF); - aDefaultContext = aHelper.getPropertyValueAsObject("DefaultContext"); + aDefaultContext = aHelper.getPropertyValueAsObject("DefaultContext") return aDefaultContext; def getMacroExpander(_xMSF): xComponentContext = self.getComponentContext(_xMSF); - aSingleton = xComponentContext.getValueByName("/singletons/com.sun.star.util.theMacroExpander"); + aSingleton = xComponentContext.getValueByName( + "/singletons/com.sun.star.util.theMacroExpander") return aSingleton; class DateUtils(object): @@ -168,7 +175,8 @@ class Helper(object): date = Helper.getUnoPropertyValue(formatSettings, "NullDate") self.calendar.set(date.Year, date.Month - 1, date.Day) self.docNullTime = getTimeInMillis() - self.formatter = NumberFormatter.createNumberFormatter(xmsf, self.formatSupplier) + self.formatter = NumberFormatter.createNumberFormatter(xmsf, + self.formatSupplier) ''' @param format a constant of the enumeration NumberFormatIndex @@ -176,7 +184,8 @@ class Helper(object): ''' def getFormat(self, format): - return NumberFormatter.getNumberFormatterKey(self.formatSupplier, format) + return NumberFormatter.getNumberFormatterKey( + self.formatSupplier, format) def getFormatter(self): return self.formatter @@ -192,7 +201,8 @@ class Helper(object): def getDocumentDateAsDouble(self, date): self.calendar.clear() - self.calendar.set(date / 10000, (date % 10000) / 100 - 1, date % 100) + self.calendar.set( + date / 10000, (date % 10000) / 100 - 1, date % 100) date1 = getTimeInMillis() ''' docNullTime and date1 are in millis, but @@ -203,7 +213,8 @@ class Helper(object): return daysDiff def getDocumentDateAsDouble(self, date): - return getDocumentDateAsDouble(date.Year * 10000 + date.Month * 100 + date.Day) + return getDocumentDateAsDouble( + date.Year * 10000 + date.Month * 100 + date.Day) def getDocumentDateAsDouble(self, javaTimeInMillis): self.calendar.clear() @@ -219,10 +230,13 @@ class Helper(object): return daysDiff def format(self, formatIndex, date): - return self.formatter.convertNumberToString(formatIndex, getDocumentDateAsDouble(date)) + return self.formatter.convertNumberToString(formatIndex, + getDocumentDateAsDouble(date)) def format(self, formatIndex, date): - return self.formatter.convertNumberToString(formatIndex, getDocumentDateAsDouble(date)) + return self.formatter.convertNumberToString(formatIndex, + getDocumentDateAsDouble(date)) def format(self, formatIndex, javaTimeInMillis): - return self.formatter.convertNumberToString(formatIndex, getDocumentDateAsDouble(javaTimeInMillis)) + return self.formatter.convertNumberToString(formatIndex, + getDocumentDateAsDouble(javaTimeInMillis)) diff --git a/wizards/com/sun/star/wizards/common/NoValidPathException.py b/wizards/com/sun/star/wizards/common/NoValidPathException.py index 96902883e5af..53db155e2e6d 100644 --- a/wizards/com/sun/star/wizards/common/NoValidPathException.py +++ b/wizards/com/sun/star/wizards/common/NoValidPathException.py @@ -5,5 +5,6 @@ class NoValidPathException(Exception): # TODO: NEVER open a dialog in an exception from SystemDialog import SystemDialog if xMSF: - SystemDialog.showErrorBox(xMSF, "dbwizres", "dbw", 521) #OfficePathnotavailable + SystemDialog.showErrorBox(xMSF, + "dbwizres", "dbw", 521) #OfficePathnotavailable diff --git a/wizards/com/sun/star/wizards/common/PropertySetHelper.py b/wizards/com/sun/star/wizards/common/PropertySetHelper.py index 4960b5380e1c..2fce42abce53 100644 --- a/wizards/com/sun/star/wizards/common/PropertySetHelper.py +++ b/wizards/com/sun/star/wizards/common/PropertySetHelper.py @@ -16,7 +16,8 @@ class PropertySetHelper(object): return self.m_aHashMap ''' - set a property, don't throw any exceptions, they will only write down as a hint in the helper debug output + set a property, don't throw any exceptions, + they will only write down as a hint in the helper debug output @param _sName name of the property to set @param _aValue property value as object ''' @@ -25,7 +26,9 @@ class PropertySetHelper(object): try: setPropertyValue(_sName, _aValue) except Exception, e: - DebugHelper.writeInfo("Don't throw the exception with property name(" + _sName + " ) : " + e.getMessage()) + DebugHelper.writeInfo( + "Don't throw the exception with property name(" \ + + _sName + " ) : " + e.getMessage()) ''' set a property, @@ -52,7 +55,6 @@ class PropertySetHelper(object): DebugHelper.exception(e) else: - // DebugHelper.writeInfo("PropertySetHelper.setProperty() can't get XPropertySet"); getHashMap().put(_sName, _aValue) ''' @@ -77,7 +79,8 @@ class PropertySetHelper(object): try: nValue = NumericalHelper.toInt(aObject) except ValueError, e: - DebugHelper.writeInfo("can't convert a object to integer.") + DebugHelper.writeInfo( + "can't convert a object to integer.") return nValue @@ -152,7 +155,8 @@ class PropertySetHelper(object): aObject = self.m_xPropertySet.getPropertyValue(_sName) except com.sun.star.beans.UnknownPropertyException, e: DebugHelper.writeInfo(e.getMessage()) - DebugHelper.writeInfo("UnknownPropertyException caught: Name:=" + _sName) + DebugHelper.writeInfo( + "UnknownPropertyException caught: Name:=" + _sName) except com.sun.star.lang.WrappedTargetException, e: DebugHelper.writeInfo(e.getMessage()) @@ -209,7 +213,8 @@ class PropertySetHelper(object): return aObject ''' - Debug helper, to show all properties which are available in the given object. + Debug helper, to show all properties + which are available in the given object. @param _xObj the object of which the properties should shown ''' @@ -219,7 +224,8 @@ class PropertySetHelper(object): aHelper.showProperties() ''' - Debug helper, to show all properties which are available in the current object. + Debug helper, to show all properties which are available + in the current object. ''' def showProperties(self): @@ -232,11 +238,13 @@ class PropertySetHelper(object): xInfo = self.m_xPropertySet.getPropertySetInfo() aAllProperties = xInfo.getProperties() - DebugHelper.writeInfo("Show all properties of Implementation of :'" + sName + "'") + DebugHelper.writeInfo( + "Show all properties of Implementation of :'" + sName + "'") i = 0 while i < aAllProperties.length: DebugHelper.writeInfo(" - " + aAllProperties[i].Name) i += 1 else: - DebugHelper.writeInfo("The given object don't support XPropertySet interface.") + DebugHelper.writeInfo( + "The given object don't support XPropertySet interface.") diff --git a/wizards/com/sun/star/wizards/common/Resource.py b/wizards/com/sun/star/wizards/common/Resource.py index e6b37999255c..c6afce217d9e 100644 --- a/wizards/com/sun/star/wizards/common/Resource.py +++ b/wizards/com/sun/star/wizards/common/Resource.py @@ -1,4 +1,6 @@ from com.sun.star.awt.VclWindowPeerAttribute import OK +from Configuration import Configuration +from SystemDialog import SystemDialog import traceback class Resource(object): @@ -14,7 +16,8 @@ class Resource(object): self.xMSF = _xMSF self.Module = _Module try: - xResource = self.xMSF.createInstanceWithArguments("org.libreoffice.resource.ResourceIndexAccess", (self.Module,)) + xResource = self.xMSF.createInstanceWithArguments( + "org.libreoffice.resource.ResourceIndexAccess", (self.Module,)) if xResource is None: raise Exception ("could not initialize ResourceIndexAccess") @@ -36,14 +39,14 @@ class Resource(object): return self.xStringIndexAccess.getByIndex(nID) except Exception, exception: traceback.print_exc() - raise ValueError("Resource with ID not " + str(nID) + " not found"); + raise ValueError("Resource with ID not " + str(nID) + " not found") def getStringList(self, nID): try: return self.xStringListIndexAccess.getByIndex(nID) except Exception, exception: traceback.print_exc() - raise ValueError("Resource with ID not " + str(nID) + " not found"); + raise ValueError("Resource with ID not " + str(nID) + " not found") def getResArray(self, nID, iCount): try: @@ -55,12 +58,13 @@ class Resource(object): return ResArray except Exception, exception: traceback.print_exc() - raise ValueError("Resource with ID not" + str(nID) + " not found"); - + raise ValueError("Resource with ID not" + str(nID) + " not found") + @classmethod def showCommonResourceError(self, xMSF): ProductName = Configuration.getProductName(xMSF) - sError = "The files required could not be found.\nPlease start the %PRODUCTNAME Setup and choose 'Repair'." - sError = JavaTools.replaceSubString(sError, ProductName, "%PRODUCTNAME") + sError = "The files required could not be found.\n" + \ + "Please start the %PRODUCTNAME Setup and choose 'Repair'." + sError = sError.replace("%PRODUCTNAME", ProductName) SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, sError) diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.py b/wizards/com/sun/star/wizards/common/SystemDialog.py index c81e9ddaa344..2da851dd9d02 100644 --- a/wizards/com/sun/star/wizards/common/SystemDialog.py +++ b/wizards/com/sun/star/wizards/common/SystemDialog.py @@ -1,7 +1,7 @@ import uno import traceback from Configuration import Configuration -from Resource import Resource + from Desktop import Desktop from Helper import Helper @@ -13,7 +13,6 @@ from com.sun.star.uno import Exception as UnoException from com.sun.star.lang import IllegalArgumentException from com.sun.star.awt.VclWindowPeerAttribute import OK - class SystemDialog(object): ''' @@ -36,19 +35,23 @@ class SystemDialog(object): @classmethod def createStoreDialog(self, xmsf): - return SystemDialog(xmsf, "com.sun.star.ui.dialogs.FilePicker", FILESAVE_AUTOEXTENSION) + return SystemDialog( + xmsf, "com.sun.star.ui.dialogs.FilePicker",FILESAVE_AUTOEXTENSION) @classmethod def createOpenDialog(self, xmsf): - return SystemDialog(xmsf, "com.sun.star.ui.dialogs.FilePicker", FILEOPEN_SIMPLE) + return SystemDialog( + xmsf, "com.sun.star.ui.dialogs.FilePicker", FILEOPEN_SIMPLE) @classmethod def createFolderDialog(self, xmsf): - return SystemDialog(xmsf, "com.sun.star.ui.dialogs.FolderPicker", 0) + return SystemDialog( + xmsf, "com.sun.star.ui.dialogs.FolderPicker", 0) @classmethod def createOfficeFolderDialog(self, xmsf): - return SystemDialog(xmsf, "com.sun.star.ui.dialogs.OfficeFolderPicker", 0) + return SystemDialog( + xmsf, "com.sun.star.ui.dialogs.OfficeFolderPicker", 0) def subst(self, path): try: @@ -85,7 +88,8 @@ class SystemDialog(object): def callFolderDialog(self, title, description, displayDir): try: - self.systemDialog.setDisplayDirectoryxPropertyValue(subst(displayDir)) + self.systemDialog.setDisplayDirectoryxPropertyValue( + subst(displayDir)) except IllegalArgumentException, iae: traceback.print_exc() raise AttributeError(iae.getMessage()); @@ -152,7 +156,8 @@ class SystemDialog(object): def getFilterUIName_(self, filterName): try: - oFactory = self.xMSF.createInstance("com.sun.star.document.FilterFactory") + oFactory = self.xMSF.createInstance( + "com.sun.star.document.FilterFactory") oObject = Helper.getUnoObjectbyName(oFactory, filterName) xPropertyValue = list(oObject) i = 0 @@ -162,13 +167,15 @@ class SystemDialog(object): return str(aValue.Value) i += 1 - raise NullPointerException ("UIName property not found for Filter " + filterName); + raise NullPointerException( + "UIName property not found for Filter " + filterName); except UnoException, exception: traceback.print_exc() return None @classmethod - def showErrorBox(self, xMSF, ResName, ResPrefix, ResID,AddTag=None, AddString=None): + def showErrorBox(self, xMSF, ResName, ResPrefix, + ResID,AddTag=None, AddString=None): ProductName = Configuration.getProductName(xMSF) oResource = Resource(xMSF, ResPrefix) sErrorMessage = oResource.getResText(ResID) @@ -191,7 +198,8 @@ class SystemDialog(object): other values check for yourself ;-) ''' @classmethod - def showMessageBox(self, xMSF, windowServiceName, windowAttribute, MessageText, peer=None): + def showMessageBox(self, xMSF, windowServiceName, windowAttribute, + MessageText, peer=None): if MessageText is None: return 0 @@ -222,7 +230,8 @@ class SystemDialog(object): def createStringSubstitution(self, xMSF): xPathSubst = None try: - xPathSubst = xMSF.createInstance("com.sun.star.util.PathSubstitution") + xPathSubst = xMSF.createInstance( + "com.sun.star.util.PathSubstitution") return xPathSubst except UnoException, e: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py index 9d3faeb35776..69a537d3a952 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.py +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py @@ -13,7 +13,8 @@ com_sun_star_awt_WindowAttribute_SIZEABLE \ com_sun_star_awt_WindowAttribute_MOVEABLE \ = uno.getConstantByName( "com.sun.star.awt.WindowAttribute.MOVEABLE" ) com_sun_star_awt_VclWindowPeerAttribute_CLIPCHILDREN \ - = uno.getConstantByName( "com.sun.star.awt.VclWindowPeerAttribute.CLIPCHILDREN" ) + = uno.getConstantByName( + "com.sun.star.awt.VclWindowPeerAttribute.CLIPCHILDREN" ) class OfficeDocument(object): '''Creates a new instance of OfficeDocument ''' @@ -25,22 +26,25 @@ class OfficeDocument(object): def attachEventCall(self, xComponent, EventName, EventType, EventURL): try: oEventProperties = range(2) - oEventProperties[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + oEventProperties[0] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') oEventProperties[0].Name = "EventType" oEventProperties[0].Value = EventType # "Service", "StarBasic" - oEventProperties[1] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + oEventProperties[1] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') oEventProperties[1].Name = "Script" #"URL"; oEventProperties[1].Value = EventURL - uno.invoke(xComponent.getEvents(), "replaceByName", (EventName, uno.Any( \ - "[]com.sun.star.beans.PropertyValue", tuple(oEventProperties)))) + uno.invoke(xComponent.Events, "replaceByName", + (EventName, uno.Any("[]com.sun.star.beans.PropertyValue", + tuple(oEventProperties)))) except Exception, exception: traceback.print_exc() def dispose(self, xMSF, xComponent): try: if xComponent != None: - xFrame = xComponent.getCurrentController().getFrame() + xFrame = xComponent.CurrentController.Frame if xComponent.isModified(): xComponent.setModified(False) @@ -54,19 +58,22 @@ class OfficeDocument(object): @param desktop @param frame @param sDocumentType e.g. swriter, scalc, ( simpress, scalc : not tested) - @return the document Component (implements XComponent) object ( XTextDocument, or XSpreadsheedDocument ) + @return the document Component + (implements XComponent) object ( XTextDocument, or XSpreadsheedDocument ) ''' def createNewDocument(self, frame, sDocumentType, preview, readonly): loadValues = range(2) - loadValues[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[0] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') loadValues[0].Name = "ReadOnly" if readonly: loadValues[0].Value = True else: loadValues[0].Value = False - loadValues[1] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[1] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') loadValues[1].Name = "Preview" if preview: loadValues[1].Value = True @@ -75,8 +82,8 @@ class OfficeDocument(object): sURL = "private:factory/" + sDocumentType try: - - xComponent = frame.loadComponentFromURL(sURL, "_self", 0, loadValues) + xComponent = frame.loadComponentFromURL( + sURL, "_self", 0, loadValues) except Exception, exception: traceback.print_exc() @@ -157,7 +164,8 @@ class OfficeDocument(object): def load(self, xInterface, sURL, sFrame, xValues): xComponent = None try: - xComponent = xInterface.loadComponentFromURL(sURL, sFrame, 0, tuple(xValues)) + xComponent = xInterface.loadComponentFromURL( + sURL, sFrame, 0, tuple(xValues)) except Exception, exception: traceback.print_exc() @@ -168,12 +176,15 @@ class OfficeDocument(object): try: if FilterName.length() > 0: oStoreProperties = range(2) - oStoreProperties[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + oStoreProperties[0] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') oStoreProperties[0].Name = "FilterName" oStoreProperties[0].Value = FilterName - oStoreProperties[1] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + oStoreProperties[1] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') oStoreProperties[1].Name = "InteractionHandler" - oStoreProperties[1].Value = xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler") + oStoreProperties[1].Value = xMSF.createInstance( + "com.sun.star.comp.uui.UUIInteractionHandler") else: oStoreProperties = range(0) @@ -209,16 +220,20 @@ class OfficeDocument(object): if rowcount > 0: colcount = datalist[0].length if colcount > 0: - xNewRange = oTable.getCellRangeByPosition(xpos, ypos, (colcount + xpos) - 1, (rowcount + ypos) - 1) + xNewRange = oTable.getCellRangeByPosition( + xpos, ypos, (colcount + xpos) - 1, + (rowcount + ypos) - 1) xNewRange.setDataArray(datalist) except Exception, e: traceback.print_exc() def getFileMediaDecriptor(self, xmsf, url): - typeDetect = xmsf.createInstance("com.sun.star.document.TypeDetection") + typeDetect = xmsf.createInstance( + "com.sun.star.document.TypeDetection") mediaDescr = range(1) - mediaDescr[0][0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + mediaDescr[0][0] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') mediaDescr[0][0].Name = "URL" mediaDescr[0][0].Value = url Type = typeDetect.queryTypeByDescriptor(mediaDescr, True) @@ -228,7 +243,8 @@ class OfficeDocument(object): return typeDetect.getByName(type) def getTypeMediaDescriptor(self, xmsf, type): - typeDetect = xmsf.createInstance("com.sun.star.document.TypeDetection") + typeDetect = xmsf.createInstance( + "com.sun.star.document.TypeDetection") return typeDetect.getByName(type) ''' @@ -244,9 +260,11 @@ class OfficeDocument(object): def getDocumentProperties(self, document): return document.getDocumentProperties() - def showMessageBox(self, xMSF, windowServiceName, windowAttribute, MessageText): + def showMessageBox( + self, xMSF, windowServiceName, windowAttribute, MessageText): - return SystemDialog.showMessageBox(xMSF, windowServiceName, windowAttribute, MessageText) + return SystemDialog.showMessageBox( + xMSF, windowServiceName, windowAttribute, MessageText) def getWindowPeer(self): return self.xWindowPeer diff --git a/wizards/com/sun/star/wizards/document/__init__.py b/wizards/com/sun/star/wizards/document/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.py b/wizards/com/sun/star/wizards/fax/CallWizard.py index 2bd940d82ec4..6faa3490db74 100644 --- a/wizards/com/sun/star/wizards/fax/CallWizard.py +++ b/wizards/com/sun/star/wizards/fax/CallWizard.py @@ -10,15 +10,20 @@ class CallWizard(object): @param xMSF The service manager, who gives access to every known service. @param xregistrykey Makes structural information (except regarding tree structures) of a single registry key accessible. - @return Returns a XSingleServiceFactory for creating the component. + @return Returns a XSingleServiceFactory + for creating the component. @see com.sun.star.comp.loader.JavaLoader# ''' @classmethod - def __getServiceFactory(self, stringImplementationName, xMSF, xregistrykey): + def __getServiceFactory(self, stringImplementationName, xMSF, \ + xregistrykey): + xsingleservicefactory = None if stringImplementationName.equals(WizardImplementation.getName()): - xsingleservicefactory = FactoryHelper.getServiceFactory(WizardImplementation, WizardImplementation.__serviceName, xMSF, xregistrykey) + xsingleservicefactory = FactoryHelper.getServiceFactory( \ + WizardImplementation, WizardImplementation.__serviceName, + xMSF, xregistrykey) return xsingleservicefactory @@ -32,18 +37,24 @@ class CallWizard(object): #private XMultiServiceFactory xmultiservicefactory ''' - The constructor of the inner class has a XMultiServiceFactory parameter. - @param xmultiservicefactoryInitialization A special service factory could be - introduced while initializing. + The constructor of the inner class has a XMultiServiceFactory + parameter. + @param xmultiservicefactoryInitialization A special service factory + could be introduced while initializing. ''' @classmethod - def WizardImplementation_XMultiServiceFactory(self, xmultiservicefactoryInitialization): + def WizardImplementation_XMultiServiceFactory(self, \ + xmultiservicefactoryInitialization): + tmp = WizardImplementation() - tmp.WizardImplementation_body_XMultiServiceFactory(xmultiservicefactoryInitialization) + tmp.WizardImplementation_body_XMultiServiceFactory( \ + xmultiservicefactoryInitialization) return tmp - def WizardImplementation_body_XMultiServiceFactory(self, xmultiservicefactoryInitialization): + def WizardImplementation_body_XMultiServiceFactory(self, \ + xmultiservicefactoryInitialization): + self.xmultiservicefactory = xmultiservicefactoryInitialization if self.xmultiservicefactory != None: pass @@ -55,19 +66,19 @@ class CallWizard(object): def trigger(self, str): if str.equalsIgnoreCase("start"): - lw = FaxWizardDialogImpl.FaxWizardDialogImpl_unknown(self.xmultiservicefactory) + lw = FaxWizardDialogImpl(self.xmultiservicefactory) if not FaxWizardDialogImpl.running: lw.startWizard(self.xmultiservicefactory, None) ''' - The service name, that must be used to get an instance of this service. + The service name, that must be used to get an instance of this service The service manager, that gives access to all registered services. - This method is a member of the interface for initializing an object directly - after its creation. - @param object This array of arbitrary objects will be passed to the component - after its creation. - @throws com.sun.star.uno.Exception Every exception will not be handled, but - will be passed to the caller. + This method is a member of the interface for initializing an object + directly after its creation. + @param object This array of arbitrary objects will be passed to the + component after its creation. + @throws com.sun.star.uno.Exception Every exception will not be + handled, but will be passed to the caller. ''' def initialize(self, object): @@ -84,8 +95,8 @@ class CallWizard(object): return (stringSupportedServiceNames) ''' - This method returns true, if the given service will be supported by the - component. + This method returns true, if the given service will be supported by + the component. @param stringService Service name. @return True, if the given service name will be supported. ''' @@ -98,13 +109,14 @@ class CallWizard(object): return (booleanSupportsService) ''' - This method returns an array of bytes, that can be used to unambiguously - distinguish between two sets of types, e.g. to realise hashing functionality - when the object is introspected. Two objects that return the same ID also - have to return the same set of types in getTypes(). If an unique - implementation Id cannot be provided this method has to return an empty - sequence. Important: If the object aggregates other objects the ID has to be - unique for the whole combination of objects. + This method returns an array of bytes, that can be used to + unambiguously distinguish between two sets of types, + e.g. to realise hashing functionality when the object is introspected. + Two objects that return the same ID also have to return the same + set of types in getTypes(). If an unique implementation Id cannot be + provided this method has to return an empty sequence. Important: + If the object aggregates other objects the ID has to be unique for + the whole combination of objects. @return Array of bytes, in order to distinguish between two sets. ''' @@ -126,10 +138,10 @@ class CallWizard(object): return (WizardImplementation.getName()) ''' - Provides a sequence of all types (usually interface types) provided by the - object. - @return Sequence of all types (usually interface types) provided by the - service. + Provides a sequence of all types (usually interface types) provided + by the object. + @return Sequence of all types (usually interface types) provided + by the service. ''' def getTypes(self): diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py index 691c5effd506..8c0f0c4588ef 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.py +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py @@ -14,14 +14,17 @@ from com.sun.star.style.NumberingType import ARABIC class FaxDocument(TextDocument): def __init__(self, xMSF, listener): - super(FaxDocument,self).__init__(xMSF, listener, None, "WIZARD_LIVE_PREVIEW") + super(FaxDocument,self).__init__(xMSF, listener, None, + "WIZARD_LIVE_PREVIEW") self.keepLogoFrame = True self.keepTypeFrame = True def switchElement(self, sElement, bState): try: - mySectionHandler = TextSectionHandler(self.xMSF, self.xTextDocument) - oSection = mySectionHandler.xTextDocument.getTextSections().getByName(sElement) + mySectionHandler = TextSectionHandler(self.xMSF, + self.xTextDocument) + oSection = \ + mySectionHandler.xTextDocument.TextSections.getByName(sElement) Helper.setUnoPropertyValue(oSection, "IsVisible", bState) except UnoException, exception: traceback.print_exc() @@ -35,7 +38,8 @@ class FaxDocument(TextDocument): self.xTextDocument.lockControllers() try: - xPageStyleCollection = self.xTextDocument.getStyleFamilies().getByName("PageStyles") + xPageStyleCollection = \ + self.xTextDocument.StyleFamilies.getByName("PageStyles") xPageStyle = xPageStyleCollection.getByName(sPageStyle) if bState: @@ -47,16 +51,21 @@ class FaxDocument(TextDocument): #Adding the Page Number myCursor = xFooterText.Text.createTextCursor() myCursor.gotoEnd(False) - xFooterText.insertControlCharacter(myCursor, PARAGRAPH_BREAK, False) + xFooterText.insertControlCharacter(myCursor, + PARAGRAPH_BREAK, False) myCursor.setPropertyValue("ParaAdjust", CENTER ) - xPageNumberField = xMSFDoc.createInstance("com.sun.star.text.TextField.PageNumber") - xPageNumberField.setPropertyValue("NumberingType", uno.Any("short",ARABIC)) + xPageNumberField = xMSFDoc.createInstance( + "com.sun.star.text.TextField.PageNumber") + xPageNumberField.setPropertyValue( + "NumberingType", uno.Any("short",ARABIC)) xPageNumberField.setPropertyValue("SubType", CURRENT) - xFooterText.insertTextContent(xFooterText.getEnd(), xPageNumberField, False) + xFooterText.insertTextContent(xFooterText.getEnd(), + xPageNumberField, False) else: - Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", False) + Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", + False) self.xTextDocument.unlockControllers() except UnoException, exception: @@ -64,7 +73,8 @@ class FaxDocument(TextDocument): def hasElement(self, sElement): if self.xTextDocument != None: - mySectionHandler = TextSectionHandler(self.xMSF, self.xTextDocument) + mySectionHandler = TextSectionHandler(self.xMSF, + self.xTextDocument) return mySectionHandler.hasTextSectionByName(sElement) else: return False @@ -78,14 +88,24 @@ class FaxDocument(TextDocument): def fillSenderWithUserData(self): try: - myFieldHandler = TextFieldHandler(self.xTextDocument, self.xTextDocument) - oUserDataAccess = Configuration.getConfigurationRoot(self.xMSF, "org.openoffice.UserProfile/Data", False) - myFieldHandler.changeUserFieldContent("Company", Helper.getUnoObjectbyName(oUserDataAccess, "o")) - myFieldHandler.changeUserFieldContent("Street", Helper.getUnoObjectbyName(oUserDataAccess, "street")) - myFieldHandler.changeUserFieldContent("PostCode", Helper.getUnoObjectbyName(oUserDataAccess, "postalcode")) - myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, Helper.getUnoObjectbyName(oUserDataAccess, "st")) - myFieldHandler.changeUserFieldContent("City", Helper.getUnoObjectbyName(oUserDataAccess, "l")) - myFieldHandler.changeUserFieldContent("Fax", Helper.getUnoObjectbyName(oUserDataAccess, "facsimiletelephonenumber")) + myFieldHandler = TextFieldHandler(self.xTextDocument, + self.xTextDocument) + oUserDataAccess = Configuration.getConfigurationRoot( + self.xMSF, "org.openoffice.UserProfile/Data", False) + myFieldHandler.changeUserFieldContent("Company", + Helper.getUnoObjectbyName(oUserDataAccess, "o")) + myFieldHandler.changeUserFieldContent("Street", + Helper.getUnoObjectbyName(oUserDataAccess, "street")) + myFieldHandler.changeUserFieldContent("PostCode", + Helper.getUnoObjectbyName(oUserDataAccess, "postalcode")) + myFieldHandler.changeUserFieldContent( + PropertyNames.PROPERTY_STATE, + Helper.getUnoObjectbyName(oUserDataAccess, "st")) + myFieldHandler.changeUserFieldContent("City", + Helper.getUnoObjectbyName(oUserDataAccess, "l")) + myFieldHandler.changeUserFieldContent("Fax", + Helper.getUnoObjectbyName(oUserDataAccess, + "facsimiletelephonenumber")) except UnoException, exception: traceback.print_exc() @@ -96,12 +116,14 @@ class FaxDocument(TextDocument): def killEmptyFrames(self): try: if not self.keepLogoFrame: - xTF = TextFrameHandler.getFrameByName("Company Logo", self.xTextDocument) + xTF = TextFrameHandler.getFrameByName("Company Logo", + self.xTextDocument) if xTF != None: xTF.dispose() if not self.keepTypeFrame: - xTF = TextFrameHandler.getFrameByName("Communication Type", self.xTextDocument) + xTF = TextFrameHandler.getFrameByName("Communication Type", + self.xTextDocument) if xTF != None: xTF.dispose() diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py index 513331fb3b3e..5b178cb75949 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py @@ -19,13 +19,22 @@ class FaxWizardDialog(WizardDialog): #set dialog properties... Helper.setUnoPropertyValues(self.xDialogModel, - ("Closeable", PropertyNames.PROPERTY_HEIGHT, "Moveable", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH), - (True, 210, True, 104, 52, 1, uno.Any("short",1), self.resources.resFaxWizardDialog_title, 310)) + ("Closeable", PropertyNames.PROPERTY_HEIGHT, "Moveable", + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, + "Title", PropertyNames.PROPERTY_WIDTH), + (True, 210, True, 104, 52, 1, uno.Any("short",1), + self.resources.resFaxWizardDialog_title, 310)) - self.fontDescriptor1 = uno.createUnoStruct('com.sun.star.awt.FontDescriptor') - self.fontDescriptor2 = uno.createUnoStruct('com.sun.star.awt.FontDescriptor') - self.fontDescriptor4 = uno.createUnoStruct('com.sun.star.awt.FontDescriptor') - self.fontDescriptor5 = uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + self.fontDescriptor1 = \ + uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + self.fontDescriptor2 = \ + uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + self.fontDescriptor4 = \ + uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + self.fontDescriptor5 = \ + uno.createUnoStruct('com.sun.star.awt.FontDescriptor') #Set member- FontDescriptors... self.fontDescriptor1.Weight = 150 self.fontDescriptor1.Underline = SINGLE @@ -36,66 +45,613 @@ class FaxWizardDialog(WizardDialog): #build components def buildStep1(self): - self.optBusinessFax = self.insertRadioButton("optBusinessFax", OPTBUSINESSFAX_ITEM_CHANGED,(PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTBUSINESSFAX_HID, self.resources.resoptBusinessFax_value, 97, 28, 1, uno.Any("short",1), 184), self) - self.lstBusinessStyle = self.insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTBUSINESSSTYLE_HID, 180, 40, 1, uno.Any("short",3), 74), self) - self.optPrivateFax = self.insertRadioButton("optPrivateFax", OPTPRIVATEFAX_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTPRIVATEFAX_HID, self.resources.resoptPrivateFax_value, 97, 81, 1, uno.Any("short",2), 184), self) - self.lstPrivateStyle = self.insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTPRIVATESTYLE_HID, 180, 95, 1, uno.Any("short",4), 74), self) - self.lblBusinessStyle = self.insertLabel("lblBusinessStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblBusinessStyle_value, 110, 42, 1, uno.Any("short",32), 60)) + self.optBusinessFax = self.insertRadioButton("optBusinessFax", + OPTBUSINESSFAX_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, OPTBUSINESSFAX_HID, self.resources.resoptBusinessFax_value, + 97, 28, 1, uno.Any("short",1), 184), self) + self.lstBusinessStyle = self.insertListBox("lstBusinessStyle", + LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, + ("Dropdown", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, LSTBUSINESSSTYLE_HID, 180, 40, 1, + uno.Any("short",3), 74), self) + self.optPrivateFax = self.insertRadioButton("optPrivateFax", + OPTPRIVATEFAX_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, OPTPRIVATEFAX_HID, self.resources.resoptPrivateFax_value, + 97, 81, 1, uno.Any("short",2), 184), self) + self.lstPrivateStyle = self.insertListBox("lstPrivateStyle", + LSTPRIVATESTYLE_ACTION_PERFORMED, + LSTPRIVATESTYLE_ITEM_CHANGED, + ("Dropdown", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, LSTPRIVATESTYLE_HID, 180, 95, 1, + uno.Any("short",4), 74), self) + self.lblBusinessStyle = self.insertLabel("lblBusinessStyle", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblBusinessStyle_value, + 110, 42, 1, uno.Any("short",32), 60)) - self.lblTitle1 = self.insertLabel("lblTitle1", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle1_value, True, 91, 8, 1, uno.Any("short",37), 212)) - self.lblPrivateStyle = self.insertLabel("lblPrivateStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPrivateStyle_value, 110, 95, 1, uno.Any("short",50), 60)) - self.lblIntroduction = self.insertLabel("lblIntroduction", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (39, self.resources.reslblIntroduction_value, True, 104, 145, 1, uno.Any("short",55), 199)) + self.lblTitle1 = self.insertLabel("lblTitle1", + ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor5, 16, self.resources.reslblTitle1_value, + True, 91, 8, 1, uno.Any("short",37), 212)) + self.lblPrivateStyle = self.insertLabel("lblPrivateStyle", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblPrivateStyle_value, 110, 95, 1, + uno.Any("short",50), 60)) + self.lblIntroduction = self.insertLabel("lblIntroduction", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (39, self.resources.reslblIntroduction_value, True, 104, 145, 1, + uno.Any("short",55), 199)) self.ImageControl3 = self.insertInfoImage(92, 145, 1) def buildStep2(self): - self.chkUseLogo = self.insertCheckBox("chkUseLogo", CHKUSELOGO_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSELOGO_HID, self.resources.reschkUseLogo_value, 97, 28, uno.Any("short",0), 2, uno.Any("short",5), 212), self) - self.chkUseDate = self.insertCheckBox("chkUseDate", CHKUSEDATE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSEDATE_HID, self.resources.reschkUseDate_value, 97, 43, uno.Any("short",0), 2,uno.Any("short",6), 212), self) - self.chkUseCommunicationType = self.insertCheckBox("chkUseCommunicationType", CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSECOMMUNICATIONTYPE_HID, self.resources.reschkUseCommunicationType_value, 97, 57, uno.Any("short",0), 2, uno.Any("short",07), 100), self) - self.lstCommunicationType = self.insertComboBox("lstCommunicationType", LSTCOMMUNICATIONTYPE_ACTION_PERFORMED, LSTCOMMUNICATIONTYPE_ITEM_CHANGED, LSTCOMMUNICATIONTYPE_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTCOMMUNICATIONTYPE_HID, 105, 68, 2, uno.Any("short",8), 174), self) - self.chkUseSubject = self.insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSESUBJECT_HID, self.resources.reschkUseSubject_value, 97, 87, uno.Any("short",0), 2, uno.Any("short",9), 212), self) - self.chkUseSalutation = self.insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSESALUTATION_HID, self.resources.reschkUseSalutation_value, 97, 102, uno.Any("short",0), 2, uno.Any("short",10), 100), self) - self.lstSalutation = self.insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, LSTSALUTATION_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTSALUTATION_HID, 105, 113, 2, uno.Any("short",11), 174), self) - self.chkUseGreeting = self.insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSEGREETING_HID, self.resources.reschkUseGreeting_value, 97, 132, uno.Any("short",0), 2, uno.Any("short",12), 100), self) - self.lstGreeting = self.insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTGREETING_HID, 105, 143, 2,uno.Any("short",13), 174), self) - self.chkUseFooter = self.insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSEFOOTER_HID, self.resources.reschkUseFooter_value, 97, 163, uno.Any("short",0), 2, uno.Any("short",14), 212), self) - self.lblTitle3 = self.insertLabel("lblTitle3", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle3_value, True, 91, 8, 2, uno.Any("short",59), 212)) + self.chkUseLogo = self.insertCheckBox("chkUseLogo", + CHKUSELOGO_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKUSELOGO_HID, self.resources.reschkUseLogo_value, 97, 28, + uno.Any("short",0), 2, uno.Any("short",5), 212), self) + self.chkUseDate = self.insertCheckBox("chkUseDate", + CHKUSEDATE_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKUSEDATE_HID, self.resources.reschkUseDate_value, 97, 43, + uno.Any("short",0), 2,uno.Any("short",6), 212), self) + self.chkUseCommunicationType = self.insertCheckBox( + "chkUseCommunicationType", + CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKUSECOMMUNICATIONTYPE_HID, + self.resources.reschkUseCommunicationType_value, 97, 57, + uno.Any("short",0), 2, uno.Any("short",07), 100), self) + self.lstCommunicationType = self.insertComboBox( + "lstCommunicationType", + LSTCOMMUNICATIONTYPE_ACTION_PERFORMED, + LSTCOMMUNICATIONTYPE_ITEM_CHANGED, + LSTCOMMUNICATIONTYPE_TEXT_CHANGED, + ("Dropdown", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, LSTCOMMUNICATIONTYPE_HID, 105, 68, 2, + uno.Any("short",8), 174), self) + self.chkUseSubject = self.insertCheckBox("chkUseSubject", + CHKUSESUBJECT_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKUSESUBJECT_HID, self.resources.reschkUseSubject_value, + 97, 87, uno.Any("short",0), 2, uno.Any("short",9), 212), self) + self.chkUseSalutation = self.insertCheckBox("chkUseSalutation", + CHKUSESALUTATION_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKUSESALUTATION_HID, + self.resources.reschkUseSalutation_value, 97, 102, + uno.Any("short",0), 2, uno.Any("short",10), 100), self) + self.lstSalutation = self.insertComboBox("lstSalutation", + LSTSALUTATION_ACTION_PERFORMED, + LSTSALUTATION_ITEM_CHANGED, + LSTSALUTATION_TEXT_CHANGED, + ("Dropdown", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, LSTSALUTATION_HID, 105, 113, 2, + uno.Any("short",11), 174), self) + self.chkUseGreeting = self.insertCheckBox("chkUseGreeting", + CHKUSEGREETING_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKUSEGREETING_HID, + self.resources.reschkUseGreeting_value, 97, 132, + uno.Any("short",0), 2, uno.Any("short",12), 100), self) + self.lstGreeting = self.insertComboBox("lstGreeting", + LSTGREETING_ACTION_PERFORMED, + LSTGREETING_ITEM_CHANGED, + LSTGREETING_TEXT_CHANGED, + ("Dropdown", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, LSTGREETING_HID, 105, 143, 2, + uno.Any("short",13), 174), self) + self.chkUseFooter = self.insertCheckBox("chkUseFooter", + CHKUSEFOOTER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKUSEFOOTER_HID, + self.resources.reschkUseFooter_value, 97, 163, + uno.Any("short",0), 2, uno.Any("short",14), 212), self) + self.lblTitle3 = self.insertLabel("lblTitle3", + ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor5, 16, self.resources.reslblTitle3_value, + True, 91, 8, 2, uno.Any("short",59), 212)) def buildStep3(self): - self.optSenderPlaceholder = self.insertRadioButton("optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTSENDERPLACEHOLDER_HID, self.resources.resoptSenderPlaceholder_value, 104, 42, 3, uno.Any("short",15), 149), self) - self.optSenderDefine = self.insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTSENDERDEFINE_HID, self.resources.resoptSenderDefine_value, 104, 54, 3, uno.Any("short",16), 149), self) - self.txtSenderName = self.insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERNAME_HID, 182, 67, 3, uno.Any("short",17), 119), self) - self.txtSenderStreet = self.insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERSTREET_HID, 182, 81, 3, uno.Any("short",18), 119), self) - self.txtSenderPostCode = self.insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERPOSTCODE_HID, 182, 95, 3, uno.Any("short",19), 25), self) - self.txtSenderState = self.insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERSTATE_HID, 211, 95, 3, uno.Any("short",20), 21), self) - self.txtSenderCity = self.insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERCITY_HID, 236, 95, 3, uno.Any("short",21), 65), self) - self.txtSenderFax = self.insertTextField("txtSenderFax", TXTSENDERFAX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERFAX_HID, 182, 109, 3, uno.Any("short",22), 119), self) - self.optReceiverPlaceholder = self.insertRadioButton("optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTRECEIVERPLACEHOLDER_HID, self.resources.resoptReceiverPlaceholder_value, 104, 148, 3, uno.Any("short",23), 200), self) - self.optReceiverDatabase = self.insertRadioButton("optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTRECEIVERDATABASE_HID, self.resources.resoptReceiverDatabase_value, 104, 160, 3, uno.Any("short",24), 200), self) - self.lblSenderAddress = self.insertLabel("lblSenderAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderAddress_value, 97, 28, 3, uno.Any("short",46), 136)) - self.FixedLine2 = self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (5, 90, 126, 3, uno.Any("short",51), 212)) - self.lblSenderName = self.insertLabel("lblSenderName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderName_value, 113, 69, 3, uno.Any("short",52), 68)) - self.lblSenderStreet = self.insertLabel("lblSenderStreet", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderStreet_value, 113, 82, 3, uno.Any("short",53), 68)) - self.lblPostCodeCity = self.insertLabel("lblPostCodeCity", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPostCodeCity_value, 113, 97, 3, uno.Any("short",54), 68)) - self.lblTitle4 = self.insertLabel("lblTitle4", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle4_value, True, 91, 8, 3, uno.Any("short",60), 212)) - self.Label1 = self.insertLabel("lblSenderFax", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.resLabel1_value, 113, 111, 3, uno.Any("short",68), 68)) - self.Label2 = self.insertLabel("Label2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.resLabel2_value, 97, 137, 3, uno.Any("short",69), 136)) + self.optSenderPlaceholder = self.insertRadioButton( + "optSenderPlaceholder", + OPTSENDERPLACEHOLDER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, OPTSENDERPLACEHOLDER_HID, + self.resources.resoptSenderPlaceholder_value, + 104, 42, 3, uno.Any("short",15), 149), self) + self.optSenderDefine = self.insertRadioButton("optSenderDefine", + OPTSENDERDEFINE_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, OPTSENDERDEFINE_HID, self.resources.resoptSenderDefine_value, + 104, 54, 3, uno.Any("short",16), 149), self) + self.txtSenderName = self.insertTextField("txtSenderName", + TXTSENDERNAME_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, TXTSENDERNAME_HID, 182, 67, 3, + uno.Any("short",17), 119), self) + self.txtSenderStreet = self.insertTextField("txtSenderStreet", + TXTSENDERSTREET_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, TXTSENDERSTREET_HID, 182, 81, 3, + uno.Any("short",18), 119), self) + self.txtSenderPostCode = self.insertTextField("txtSenderPostCode", + TXTSENDERPOSTCODE_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, TXTSENDERPOSTCODE_HID, 182, 95, 3, + uno.Any("short",19), 25), self) + self.txtSenderState = self.insertTextField("txtSenderState", + TXTSENDERSTATE_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, TXTSENDERSTATE_HID, 211, 95, 3, + uno.Any("short",20), 21), self) + self.txtSenderCity = self.insertTextField("txtSenderCity", + TXTSENDERCITY_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, TXTSENDERCITY_HID, 236, 95, 3, + uno.Any("short",21), 65), self) + self.txtSenderFax = self.insertTextField("txtSenderFax", + TXTSENDERFAX_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, TXTSENDERFAX_HID, 182, 109, 3, + uno.Any("short",22), 119), self) + self.optReceiverPlaceholder = self.insertRadioButton( + "optReceiverPlaceholder", + OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, OPTRECEIVERPLACEHOLDER_HID, + self.resources.resoptReceiverPlaceholder_value, + 104, 148, 3, uno.Any("short",23), 200), self) + self.optReceiverDatabase = self.insertRadioButton( + "optReceiverDatabase", + OPTRECEIVERDATABASE_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, OPTRECEIVERDATABASE_HID, + self.resources.resoptReceiverDatabase_value, 104, 160, 3, + uno.Any("short",24), 200), self) + self.lblSenderAddress = self.insertLabel("lblSenderAddress", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblSenderAddress_value, 97, 28, 3, uno.Any("short",46), 136)) + self.FixedLine2 = self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (5, 90, 126, 3, uno.Any("short",51), 212)) + self.lblSenderName = self.insertLabel("lblSenderName", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblSenderName_value, 113, 69, 3, + uno.Any("short",52), 68)) + self.lblSenderStreet = self.insertLabel("lblSenderStreet", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblSenderStreet_value, 113, 82, 3, + uno.Any("short",53), 68)) + self.lblPostCodeCity = self.insertLabel("lblPostCodeCity", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblPostCodeCity_value, + 113, 97, 3, uno.Any("short",54), 68)) + self.lblTitle4 = self.insertLabel("lblTitle4", + ("FontDescriptor", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor5, 16, self.resources.reslblTitle4_value, + True, 91, 8, 3, uno.Any("short",60), 212)) + self.Label1 = self.insertLabel("lblSenderFax", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.resLabel1_value, 113, 111, 3, + uno.Any("short",68), 68)) + self.Label2 = self.insertLabel("Label2", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.resLabel2_value, 97, 137, 3, + uno.Any("short",69), 136)) def buildStep4(self): - self.txtFooter = self.insertTextField("txtFooter", TXTFOOTER_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (47, TXTFOOTER_HID, True, 97, 40, 4, uno.Any("short",25), 203), self) - self.chkFooterNextPages = self.insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKFOOTERNEXTPAGES_HID, self.resources.reschkFooterNextPages_value, 97, 92, uno.Any("short",0), 4, uno.Any("short",26), 202), self) - self.chkFooterPageNumbers = self.insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKFOOTERPAGENUMBERS_HID, self.resources.reschkFooterPageNumbers_value, 97, 106, uno.Any("short",0), 4, uno.Any("short",27), 201), self) - self.lblFooter = self.insertLabel("lblFooter", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor4, 8, self.resources.reslblFooter_value, 97, 28, 4, uno.Any("short",33), 116)) - self.lblTitle5 = self.insertLabel("lblTitle5", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle5_value, True, 91, 8, 4, uno.Any("short",61), 212)) + self.txtFooter = self.insertTextField("txtFooter", + TXTFOOTER_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (47, TXTFOOTER_HID, True, 97, 40, 4, + uno.Any("short",25), 203), self) + self.chkFooterNextPages = self.insertCheckBox("chkFooterNextPages", + CHKFOOTERNEXTPAGES_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKFOOTERNEXTPAGES_HID, + self.resources.reschkFooterNextPages_value, 97, 92, + uno.Any("short",0), 4, uno.Any("short",26), 202), self) + self.chkFooterPageNumbers = self.insertCheckBox("chkFooterPageNumbers", + CHKFOOTERPAGENUMBERS_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, CHKFOOTERPAGENUMBERS_HID, + self.resources.reschkFooterPageNumbers_value, 97, 106, + uno.Any("short",0), 4, uno.Any("short",27), 201), self) + self.lblFooter = self.insertLabel("lblFooter", + ("FontDescriptor", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor4, 8, self.resources.reslblFooter_value, + 97, 28, 4, uno.Any("short",33), 116)) + self.lblTitle5 = self.insertLabel("lblTitle5", + ("FontDescriptor", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor5, 16, self.resources.reslblTitle5_value, + True, 91, 8, 4, uno.Any("short",61), 212)) def buildStep5(self): - self.txtTemplateName = self.insertTextField("txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH), (12, TXTTEMPLATENAME_HID, 202, 56, 5, uno.Any("short",28), self.resources.restxtTemplateName_value, 100), self) + self.txtTemplateName = self.insertTextField("txtTemplateName", + TXTTEMPLATENAME_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Text", + PropertyNames.PROPERTY_WIDTH), + (12, TXTTEMPLATENAME_HID, 202, 56, 5, uno.Any("short",28), + self.resources.restxtTemplateName_value, 100), self) - self.optCreateFax = self.insertRadioButton("optCreateFax", OPTCREATEFAX_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTCREATEFAX_HID, self.resources.resoptCreateFax_value, 104, 111, 5, uno.Any("short",30), 198), self) - self.optMakeChanges = self.insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTMAKECHANGES_HID, self.resources.resoptMakeChanges_value, 104, 123, 5, uno.Any("short",31), 198), self) - self.lblFinalExplanation1 = self.insertLabel("lblFinalExplanation1", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (28, self.resources.reslblFinalExplanation1_value, True, 97, 28, 5, uno.Any("short",34), 205)) - self.lblProceed = self.insertLabel("lblProceed", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblProceed_value, 97, 100, 5, uno.Any("short",35), 204)) - self.lblFinalExplanation2 = self.insertLabel("lblFinalExplanation2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (33, self.resources.reslblFinalExplanation2_value, True, 104, 145, 5, uno.Any("short",36), 199)) - self.ImageControl2 = self.insertImage("ImageControl2", ("Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (uno.Any("short",0), 10, "private:resource/dbu/image/19205", 92, 145, False, 5, uno.Any("short",47), 10)) - self.lblTemplateName = self.insertLabel("lblTemplateName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblTemplateName_value, 97, 58, 5, uno.Any("short",57), 101)) - - self.lblTitle6 = self.insertLabel("lblTitle6", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle6_value, True, 91, 8, 5, uno.Any("short",62), 212)) + self.optCreateFax = self.insertRadioButton("optCreateFax", + OPTCREATEFAX_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, OPTCREATEFAX_HID, self.resources.resoptCreateFax_value, + 104, 111, 5, uno.Any("short",30), 198), self) + self.optMakeChanges = self.insertRadioButton("optMakeChanges", + OPTMAKECHANGES_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, OPTMAKECHANGES_HID, self.resources.resoptMakeChanges_value, + 104, 123, 5, uno.Any("short",31), 198), self) + self.lblFinalExplanation1 = self.insertLabel("lblFinalExplanation1", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (28, self.resources.reslblFinalExplanation1_value, + True, 97, 28, 5, uno.Any("short",34), 205)) + self.lblProceed = self.insertLabel("lblProceed", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblProceed_value, 97, 100, 5, + uno.Any("short",35), 204)) + self.lblFinalExplanation2 = self.insertLabel("lblFinalExplanation2", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (33, self.resources.reslblFinalExplanation2_value, True, 104, 145, 5, + uno.Any("short",36), 199)) + self.ImageControl2 = self.insertImage("ImageControl2", + ("Border", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_IMAGEURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "ScaleImage", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (uno.Any("short",0), 10, "private:resource/dbu/image/19205", 92, 145, + False, 5, uno.Any("short",47), 10)) + self.lblTemplateName = self.insertLabel("lblTemplateName", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblTemplateName_value, 97, 58, 5, + uno.Any("short",57), 101)) + self.lblTitle6 = self.insertLabel("lblTitle6", + ("FontDescriptor", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor5, 16, self.resources.reslblTitle6_value, + True, 91, 8, 5, uno.Any("short",62), 212)) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py index 191d60dfd996..b87a3af54ed6 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py @@ -1,4 +1,5 @@ -import common.HelpIds as HelpIds +from common.HelpIds import HelpIds + OPTBUSINESSFAX_ITEM_CHANGED = "optBusinessFaxItemChanged" LSTBUSINESSSTYLE_ACTION_PERFORMED = None # "lstBusinessStyleActionPerformed" @@ -11,7 +12,7 @@ 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 = None #"lstCommunicationTextChanged" CHKUSESUBJECT_ITEM_CHANGED = "chkUseSubjectItemChanged" CHKUSESALUTATION_ITEM_CHANGED = "chkUseSalutationItemChanged" LSTSALUTATION_ACTION_PERFORMED = None # "lstSalutationActionPerformed" @@ -44,39 +45,39 @@ imageURLImageControl3 = None #"images/ImageControl3" #Help IDs -HID = 349 -HIDMAIN = 411 -OPTBUSINESSFAX_HID = HelpIds.array2[HID + 1] -LSTBUSINESSSTYLE_HID = HelpIds.array2[HID + 2] -OPTPRIVATEFAX_HID = HelpIds.array2[HID + 3] -LSTPRIVATESTYLE_HID = HelpIds.array2[HID + 4] -IMAGECONTROL3_HID = HelpIds.array2[HID + 5] -CHKUSELOGO_HID = HelpIds.array2[HID + 6] -CHKUSEDATE_HID = HelpIds.array2[HID + 7] -CHKUSECOMMUNICATIONTYPE_HID = HelpIds.array2[HID + 8] -LSTCOMMUNICATIONTYPE_HID = HelpIds.array2[HID + 9] -CHKUSESUBJECT_HID = HelpIds.array2[HID + 10] -CHKUSESALUTATION_HID = HelpIds.array2[HID + 11] -LSTSALUTATION_HID = HelpIds.array2[HID + 12] -CHKUSEGREETING_HID = HelpIds.array2[HID + 13] -LSTGREETING_HID = HelpIds.array2[HID + 14] -CHKUSEFOOTER_HID = HelpIds.array2[HID + 15] -OPTSENDERPLACEHOLDER_HID = HelpIds.array2[HID + 16] -OPTSENDERDEFINE_HID = HelpIds.array2[HID + 17] -TXTSENDERNAME_HID = HelpIds.array2[HID + 18] -TXTSENDERSTREET_HID = HelpIds.array2[HID + 19] -TXTSENDERPOSTCODE_HID = HelpIds.array2[HID + 20] -TXTSENDERSTATE_HID = HelpIds.array2[HID + 21] -TXTSENDERCITY_HID = HelpIds.array2[HID + 22] -TXTSENDERFAX_HID = HelpIds.array2[HID + 23] -OPTRECEIVERPLACEHOLDER_HID = HelpIds.array2[HID + 24] -OPTRECEIVERDATABASE_HID = HelpIds.array2[HID + 25] -TXTFOOTER_HID = HelpIds.array2[HID + 26] -CHKFOOTERNEXTPAGES_HID = HelpIds.array2[HID + 27] -CHKFOOTERPAGENUMBERS_HID = HelpIds.array2[HID + 28] -TXTTEMPLATENAME_HID = HelpIds.array2[HID + 29] -FILETEMPLATEPATH_HID = HelpIds.array2[HID + 30] -OPTCREATEFAX_HID = HelpIds.array2[HID + 31] -OPTMAKECHANGES_HID = HelpIds.array2[HID + 32] -IMAGECONTROL2_HID = HelpIds.array2[HID + 33] +HID = 41119 #TODO enter first hid here +HIDMAIN = 41180 +OPTBUSINESSFAX_HID = HelpIds.getHelpIdString(HID + 1) +LSTBUSINESSSTYLE_HID = HelpIds.getHelpIdString(HID + 2) +OPTPRIVATEFAX_HID = HelpIds.getHelpIdString(HID + 3) +LSTPRIVATESTYLE_HID = HelpIds.getHelpIdString(HID + 4) +IMAGECONTROL3_HID = HelpIds.getHelpIdString(HID + 5) +CHKUSELOGO_HID = HelpIds.getHelpIdString(HID + 6) +CHKUSEDATE_HID = HelpIds.getHelpIdString(HID + 7) +CHKUSECOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 8) +LSTCOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 9) +CHKUSESUBJECT_HID = HelpIds.getHelpIdString(HID + 10) +CHKUSESALUTATION_HID = HelpIds.getHelpIdString(HID + 11) +LSTSALUTATION_HID = HelpIds.getHelpIdString(HID + 12) +CHKUSEGREETING_HID = HelpIds.getHelpIdString(HID + 13) +LSTGREETING_HID = HelpIds.getHelpIdString(HID + 14) +CHKUSEFOOTER_HID = HelpIds.getHelpIdString(HID + 15) +OPTSENDERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 16) +OPTSENDERDEFINE_HID = HelpIds.getHelpIdString(HID + 17) +TXTSENDERNAME_HID = HelpIds.getHelpIdString(HID + 18) +TXTSENDERSTREET_HID = HelpIds.getHelpIdString(HID + 19) +TXTSENDERPOSTCODE_HID = HelpIds.getHelpIdString(HID + 20) +TXTSENDERSTATE_HID = HelpIds.getHelpIdString(HID + 21) +TXTSENDERCITY_HID = HelpIds.getHelpIdString(HID + 22) +TXTSENDERFAX_HID = HelpIds.getHelpIdString(HID + 23) +OPTRECEIVERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 24) +OPTRECEIVERDATABASE_HID = HelpIds.getHelpIdString(HID + 25) +TXTFOOTER_HID = HelpIds.getHelpIdString(HID + 26) +CHKFOOTERNEXTPAGES_HID = HelpIds.getHelpIdString(HID + 27) +CHKFOOTERPAGENUMBERS_HID = HelpIds.getHelpIdString(HID + 28) +TXTTEMPLATENAME_HID = HelpIds.getHelpIdString(HID + 29) +FILETEMPLATEPATH_HID = HelpIds.getHelpIdString(HID + 30) +OPTCREATEFAX_HID = HelpIds.getHelpIdString(HID + 31) +OPTMAKECHANGES_HID = HelpIds.getHelpIdString(HID + 32) +IMAGECONTROL2_HID = HelpIds.getHelpIdString(HID + 33) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 94e696539731..9ffade4bfdc8 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -18,8 +18,6 @@ from com.sun.star.view.DocumentZoomType import OPTIMAL from com.sun.star.document.UpdateDocMode import FULL_UPDATE from com.sun.star.document.MacroExecMode import ALWAYS_EXECUTE -import timeit - class FaxWizardDialogImpl(FaxWizardDialog): def leaveStep(self, nOldStep, nNewStep): @@ -36,7 +34,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): def __init__(self, xmsf): - super(FaxWizardDialogImpl,self).__init__(xmsf) + super(FaxWizardDialogImpl, self).__init__(xmsf) self.mainDA = [] self.faxDA = [] self.bSaveSuccess = False @@ -48,7 +46,8 @@ class FaxWizardDialogImpl(FaxWizardDialog): def main(self, args): #only being called when starting wizard remotely try: - ConnectStr = "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" + ConnectStr = \ + "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" xLocMSF = Desktop.connect(ConnectStr) lw = FaxWizardDialogImpl(xLocMSF) lw.startWizard(xLocMSF, None) @@ -88,18 +87,19 @@ class FaxWizardDialogImpl(FaxWizardDialog): #special Control fFrameor setting the save Path: self.insertPathSelectionControl() - #load the last used settings from the registry and apply listeners to the controls: + #load the last used settings + #from the registry and apply listeners to the controls: self.initConfiguration() self.initializeTemplates(xMSF) #update the dialog UI according to the loaded Configuration self.__updateUI() - if self.myPathSelection.xSaveTextBox.getText().lower() == "": + if self.myPathSelection.xSaveTextBox.Text.lower() == "": self.myPathSelection.initializePath() self.xContainerWindow = self.myFaxDoc.xFrame.getContainerWindow() - self.createWindowPeer(self.xContainerWindow); + self.createWindowPeer(self.xContainerWindow) #add the Roadmap to the dialog: self.insertRoadmap() @@ -108,14 +108,15 @@ class FaxWizardDialogImpl(FaxWizardDialog): #TODO: self.setConfiguration() - #If the configuration does not define Greeting/Salutation/CommunicationType yet choose a default + #If the configuration does not define + #Greeting/Salutation/CommunicationType yet choose a default self.__setDefaultForGreetingAndSalutationAndCommunication() #disable funtionality that is not supported by the template: self.initializeElements() #disable the document, so that the user cannot change anything: - self.myFaxDoc.xFrame.getComponentWindow().setEnable(False) + self.myFaxDoc.xFrame.getComponentWindow().Enable = False self.executeDialogFromComponent(self.myFaxDoc.xFrame) self.removeTerminateListener() @@ -133,7 +134,9 @@ class FaxWizardDialogImpl(FaxWizardDialog): def finishWizard(self): self.switchToStep(self.getCurrentStep(), self.getMaxStep()) - self.myFaxDoc.setWizardTemplateDocInfo(self.resources.resFaxWizardDialog_title, self.resources.resTemplateDescription) + self.myFaxDoc.setWizardTemplateDocInfo( \ + self.resources.resFaxWizardDialog_title, + self.resources.resTemplateDescription) try: fileAccess = FileAccess(self.xMSF) self.sPath = self.myPathSelection.getSelectedPath() @@ -148,31 +151,44 @@ class FaxWizardDialogImpl(FaxWizardDialog): # file exists and warn the user. if not self.__filenameChanged: if fileAccess.exists(self.sPath, True): - answer = SystemDialog.showMessageBox(xMSF, xControl.getPeer(), "MessBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, self.resources.resOverwriteWarning) - if (answer == 3): # user said: no, do not overwrite.... + answer = SystemDialog.showMessageBox( \ + xMSF, xControl.getPeer(), "MessBox", + VclWindowPeerAttribute.YES_NO + \ + VclWindowPeerAttribute.DEF_NO, + self.resources.resOverwriteWarning) + if (answer == 3): # user said: no, do not overwrite... return False - self.myFaxDoc.setWizardTemplateDocInfo(self.resources.resFaxWizardDialog_title, self.resources.resTemplateDescription) + self.myFaxDoc.setWizardTemplateDocInfo( \ + self.resources.resFaxWizardDialog_title, + self.resources.resTemplateDescription) self.myFaxDoc.killEmptyUserFields() - self.myFaxDoc.keepLogoFrame = (self.chkUseLogo.getState() != 0); - self.myFaxDoc.keepTypeFrame = (self.chkUseCommunicationType.getState() != 0); + self.myFaxDoc.keepLogoFrame = (self.chkUseLogo.State is not 0) + self.myFaxDoc.keepTypeFrame = \ + (self.chkUseCommunicationType.State is not 0) self.myFaxDoc.killEmptyFrames() - self.bSaveSuccess = OfficeDocument.store(xMSF, self.xTextDocument, self.sPath, "writer8_template", False) + self.bSaveSuccess = OfficeDocument.store(xMSF, self.xTextDocument, + self.sPath, "writer8_template", False) if self.bSaveSuccess: saveConfiguration() - xIH = xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler") + xIH = xMSF.createInstance( \ + "com.sun.star.comp.uui.UUIInteractionHandler") loadValues = range(3) - loadValues[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') - loadValues[0].Name = "AsTemplate"; - loadValues[0].Value = True; - loadValues[1] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') - loadValues[1].Name = "MacroExecutionMode"; - loadValues[1].Value = uno.Any("short",ALWAYS_EXECUTE) - loadValues[2] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') - loadValues[2].Name = "UpdateDocMode"; - loadValues[2].Value = uno.Any("short",FULL_UPDATE) - loadValues[3] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[0] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') + loadValues[0].Name = "AsTemplate" + loadValues[0].Value = True + loadValues[1] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') + loadValues[1].Name = "MacroExecutionMode" + loadValues[1].Value = uno.Any("short", ALWAYS_EXECUTE) + loadValues[2] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') + loadValues[2].Name = "UpdateDocMode" + loadValues[2].Value = uno.Any("short", FULL_UPDATE) + loadValues[3] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') loadValues[3].Name = "InteractionHandler" loadValues[3].Value = xIH if self.bEditTemplate: @@ -180,9 +196,11 @@ class FaxWizardDialogImpl(FaxWizardDialog): else: loadValues[0].Value = True - oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), self.sPath, "_default", loadValues) + oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), + self.sPath, "_default", loadValues) myViewHandler = oDoc.getCurrentController().getViewSettings() - myViewHandler.setPropertyValue("ZoomType", uno.Any("short",OPTIMAL)); + myViewHandler.setPropertyValue("ZoomType", + uno.Any("short",OPTIMAL)) else: pass #TODO: Error Handling @@ -204,11 +222,25 @@ class FaxWizardDialogImpl(FaxWizardDialog): def insertRoadmap(self): self.addRoadmap() i = 0 - i = self.insertRoadmapItem(0, True, self.resources.RoadmapLabels[FaxWizardDialogImpl.RM_TYPESTYLE - 1], FaxWizardDialogImpl.RM_TYPESTYLE) - i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[FaxWizardDialogImpl.RM_ELEMENTS - 1], FaxWizardDialogImpl.RM_ELEMENTS) - i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[FaxWizardDialogImpl.RM_SENDERRECEIVER - 1], FaxWizardDialogImpl.RM_SENDERRECEIVER) - i = self.insertRoadmapItem(i, False, self.resources.RoadmapLabels[FaxWizardDialogImpl.RM_FOOTER - 1], FaxWizardDialogImpl.RM_FOOTER) - i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[FaxWizardDialogImpl.RM_FINALSETTINGS - 1], FaxWizardDialogImpl.RM_FINALSETTINGS) + i = self.insertRoadmapItem( + 0, True, self.resources.RoadmapLabels[ + FaxWizardDialogImpl.RM_TYPESTYLE - 1], + FaxWizardDialogImpl.RM_TYPESTYLE) + i = self.insertRoadmapItem( + i, True, self.resources.RoadmapLabels[ + FaxWizardDialogImpl.RM_ELEMENTS - 1], + FaxWizardDialogImpl.RM_ELEMENTS) + i = self.insertRoadmapItem( + i, True, self.resources.RoadmapLabels[ + FaxWizardDialogImpl.RM_SENDERRECEIVER - 1], + FaxWizardDialogImpl.RM_SENDERRECEIVER) + i = self.insertRoadmapItem( + i, False, self.resources.RoadmapLabels[ + FaxWizardDialogImpl.RM_FOOTER - 1], FaxWizardDialogImpl.RM_FOOTER) + i = self.insertRoadmapItem(i, True, + self.resources.RoadmapLabels[ + FaxWizardDialogImpl.RM_FINALSETTINGS - 1], + FaxWizardDialogImpl.RM_FINALSETTINGS) self.setRoadmapInteractive(True) self.setRoadmapComplete(True) self.setCurrentRoadmapItemID(1) @@ -222,12 +254,18 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.myPathSelection.usedPathPicker = False def insertPathSelectionControl(self): - self.myPathSelection = PathSelection(self.xMSF, self, PathSelection.TransferMode.SAVE, PathSelection.DialogTypes.FILE) - self.myPathSelection.insert(5, 97, 70, 205, 45, self.resources.reslblTemplatePath_value, True, HelpIds.array2[HID + 34], HelpIds.array2[HID + 35]) + self.myPathSelection = PathSelection(self.xMSF, + self, PathSelection.TransferMode.SAVE, + PathSelection.DialogTypes.FILE) + self.myPathSelection.insert( + 5, 97, 70, 205, 45, self.resources.reslblTemplatePath_value, + True, HelpIds.getHelpIdString(HID + 34), + HelpIds.getHelpIdString(HID + 35)) self.myPathSelection.sDefaultDirectory = self.UserTemplatePath self.myPathSelection.sDefaultName = "myFaxTemplate.ott" self.myPathSelection.sDefaultFilter = "writer8_template" - self.myPathSelection.addSelectionListener(self.__myPathSelectionListener()) + self.myPathSelection.addSelectionListener( \ + self.__myPathSelectionListener()) def __updateUI(self): UnoDataAware.updateUIs(self.mainDA) @@ -235,20 +273,28 @@ class FaxWizardDialogImpl(FaxWizardDialog): def __initializePaths(self): try: - self.sTemplatePath = FileAccess.getOfficePath2(self.xMSF, "Template", "share", "/wizard") - self.UserTemplatePath = FileAccess.getOfficePath2(self.xMSF, "Template", "user", "") - self.sBitmapPath = FileAccess.combinePaths(self.xMSF, self.sTemplatePath, "/../wizard/bitmap") + self.sTemplatePath = FileAccess.getOfficePath2(self.xMSF, + "Template", "share", "/wizard") + self.UserTemplatePath = FileAccess.getOfficePath2(self.xMSF, + "Template", "user", "") + self.sBitmapPath = FileAccess.combinePaths(self.xMSF, + self.sTemplatePath, "/../wizard/bitmap") except NoValidPathException, e: traceback.print_exc() def initializeTemplates(self, xMSF): try: - self.sFaxPath = FileAccess.combinePaths(xMSF,self.sTemplatePath, "/wizard/fax") + self.sFaxPath = FileAccess.combinePaths(xMSF, self.sTemplatePath, + "/wizard/fax") self.sWorkPath = FileAccess.getOfficePath2(xMSF, "Work", "", "") - self.BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", self.sFaxPath) - self.PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", self.sFaxPath) - self.setControlProperty("lstBusinessStyle", "StringItemList", tuple(self.BusinessFiles[0])) - self.setControlProperty("lstPrivateStyle", "StringItemList", tuple(self.PrivateFiles[0])) + self.BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", + self.sFaxPath) + self.PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", + self.sFaxPath) + self.setControlProperty("lstBusinessStyle", "StringItemList", + tuple(self.BusinessFiles[0])) + self.setControlProperty("lstPrivateStyle", "StringItemList", + tuple(self.PrivateFiles[0])) self.setControlProperty("lstBusinessStyle", "SelectedItems", [0]) self.setControlProperty("lstPrivateStyle", "SelectedItems" , [0]) return True @@ -258,69 +304,119 @@ class FaxWizardDialogImpl(FaxWizardDialog): return False def initializeElements(self): - self.setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, self.myFaxDoc.hasElement("Company Logo")) - self.setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED,self.myFaxDoc.hasElement("Subject Line")) - self.setControlProperty("chkUseDate", PropertyNames.PROPERTY_ENABLED,self.myFaxDoc.hasElement("Date")) + self.setControlProperty("chkUseLogo", + PropertyNames.PROPERTY_ENABLED, + self.myFaxDoc.hasElement("Company Logo")) + self.setControlProperty("chkUseSubject", + PropertyNames.PROPERTY_ENABLED, + self.myFaxDoc.hasElement("Subject Line")) + self.setControlProperty("chkUseDate", + PropertyNames.PROPERTY_ENABLED, + self.myFaxDoc.hasElement("Date")) self.myFaxDoc.updateDateFields() def initializeSalutation(self): - self.setControlProperty("lstSalutation", "StringItemList", self.resources.SalutationLabels) + self.setControlProperty("lstSalutation", "StringItemList", + self.resources.SalutationLabels) def initializeGreeting(self): - self.setControlProperty("lstGreeting", "StringItemList", self.resources.GreetingLabels) + self.setControlProperty("lstGreeting", "StringItemList", + self.resources.GreetingLabels) def initializeCommunication(self): - self.setControlProperty("lstCommunicationType", "StringItemList", self.resources.CommunicationLabels) + self.setControlProperty("lstCommunicationType", "StringItemList", + self.resources.CommunicationLabels) def __setDefaultForGreetingAndSalutationAndCommunication(self): - if self.lstSalutation.getText() == "": + if self.lstSalutation.Text == "": self.lstSalutation.setText(self.resources.SalutationLabels[0]) - if self.lstGreeting.getText() == "": + if self.lstGreeting.Text == "": self.lstGreeting.setText(self.resources.GreetingLabels[0]) - if self.lstCommunicationType.getText() == "": - self.lstCommunicationType.setText(self.resources.CommunicationLabels[0]) + if self.lstCommunicationType.Text == "": + self.lstCommunicationType.setText( \ + self.resources.CommunicationLabels[0]) def initConfiguration(self): try: self.myConfig = CGFaxWizard() - root = Configuration.getConfigurationRoot(self.xMSF, "/org.openoffice.Office.Writer/Wizards/Fax", False) + root = Configuration.getConfigurationRoot(self.xMSF, + "/org.openoffice.Office.Writer/Wizards/Fax", False) self.myConfig.readConfiguration(root, "cp_") - self.mainDA.append(RadioDataAware.attachRadioButtons(self.myConfig, "cp_FaxType", (self.optBusinessFax, self.optPrivateFax), None, True)) - self.mainDA.append(UnoDataAware.attachListBox(self.myConfig.cp_BusinessFax, "cp_Style", self.lstBusinessStyle, None, True)) - self.mainDA.append(UnoDataAware.attachListBox(self.myConfig.cp_PrivateFax, "cp_Style", self.lstPrivateStyle, None, True)) + self.mainDA.append(RadioDataAware.attachRadioButtons( + self.myConfig, "cp_FaxType", + (self.optBusinessFax, self.optPrivateFax), None, True)) + self.mainDA.append(UnoDataAware.attachListBox( + self.myConfig.cp_BusinessFax, "cp_Style", + self.lstBusinessStyle, None, True)) + self.mainDA.append(UnoDataAware.attachListBox( + self.myConfig.cp_PrivateFax, "cp_Style", self.lstPrivateStyle, + None, True)) cgl = self.myConfig.cp_BusinessFax - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintCompanyLogo", self.chkUseLogo, None, True)) - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintSubjectLine", self.chkUseSubject, None, True)) - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintSalutation", self.chkUseSalutation, None, True)) - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintDate", self.chkUseDate, None, True)) - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintCommunicationType", self.chkUseCommunicationType, None, True)) - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintGreeting", self.chkUseGreeting, None, True)) - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintFooter", self.chkUseFooter, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_Salutation", self.lstSalutation, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_Greeting", self.lstGreeting, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_CommunicationType", self.lstCommunicationType, None, True)) - self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_SenderAddressType", (self.optSenderDefine, self.optSenderPlaceholder), None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderCompanyName", self.txtSenderName, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderStreet", self.txtSenderStreet, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderPostCode", self.txtSenderPostCode, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderState", self.txtSenderState, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderCity", self.txtSenderCity, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderFax", self.txtSenderFax, None, True)) - self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_ReceiverAddressType", (self.optReceiverDatabase, self.optReceiverPlaceholder), None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_Footer", self.txtFooter, None, True)) - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_FooterOnlySecondPage", self.chkFooterNextPages, None, True)) - self.faxDA.append(UnoDataAware.attachCheckBox(cgl, "cp_FooterPageNumbers", self.chkFooterPageNumbers, None, True)) - self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_CreationType", (self.optCreateFax, self.optMakeChanges), None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_TemplateName", self.txtTemplateName, None, True)) - self.faxDA.append(UnoDataAware.attachEditControl(cgl, "cp_TemplatePath", self.myPathSelection.xSaveTextBox, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_PrintCompanyLogo", self.chkUseLogo, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_PrintSubjectLine", self.chkUseSubject, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_PrintSalutation", self.chkUseSalutation, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_PrintDate", self.chkUseDate, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_PrintCommunicationType", self.chkUseCommunicationType, + None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_PrintGreeting", self.chkUseGreeting, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_PrintFooter", self.chkUseFooter, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_Salutation", self.lstSalutation, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_Greeting", self.lstGreeting, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_CommunicationType", self.lstCommunicationType, + None, True)) + self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, + "cp_SenderAddressType", (self.optSenderDefine, \ + self.optSenderPlaceholder), None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_SenderCompanyName", self.txtSenderName, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_SenderStreet", self.txtSenderStreet, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_SenderPostCode", self.txtSenderPostCode, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_SenderState", self.txtSenderState, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_SenderCity", self.txtSenderCity, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_SenderFax", self.txtSenderFax, None, True)) + self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, + "cp_ReceiverAddressType", (self.optReceiverDatabase, + self.optReceiverPlaceholder), None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_Footer", self.txtFooter, None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_FooterOnlySecondPage", self.chkFooterNextPages, + None, True)) + self.faxDA.append(UnoDataAware.attachCheckBox(cgl, + "cp_FooterPageNumbers", self.chkFooterPageNumbers, + None, True)) + self.faxDA.append(RadioDataAware.attachRadioButtons(cgl, + "cp_CreationType", (self.optCreateFax, self.optMakeChanges), + None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_TemplateName", self.txtTemplateName, None, True)) + self.faxDA.append(UnoDataAware.attachEditControl(cgl, + "cp_TemplatePath", self.myPathSelection.xSaveTextBox, + None, True)) except UnoException, exception: traceback.print_exc() def saveConfiguration(self): try: - root = Configuration.getConfigurationRoot(xMSF, "/org.openoffice.Office.Writer/Wizards/Fax", True) + root = Configuration.getConfigurationRoot(xMSF, + "/org.openoffice.Office.Writer/Wizards/Fax", True) self.myConfig.writeConfiguration(root, "cp_") Configuration.commit(root) except UnoException, e: @@ -328,68 +424,102 @@ class FaxWizardDialogImpl(FaxWizardDialog): def setConfiguration(self): #set correct Configuration tree: - if self.optBusinessFax.getState(): + if self.optBusinessFax.State: self.optBusinessFaxItemChanged() - if self.optPrivateFax.getState(): + if self.optPrivateFax.State: self.optPrivateFaxItemChanged() def optBusinessFaxItemChanged(self): - DataAware.setDataObjects(self.faxDA, self.myConfig.cp_BusinessFax, True) - self.setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) + DataAware.setDataObjects(self.faxDA, + self.myConfig.cp_BusinessFax, True) + self.setControlProperty("lblBusinessStyle", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lstBusinessStyle", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblPrivateStyle", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lstPrivateStyle", + PropertyNames.PROPERTY_ENABLED, False) self.lstBusinessStyleItemChanged() self.__enableSenderReceiver() self.__setPossibleFooter(True) def lstBusinessStyleItemChanged(self): - self.xTextDocument = self.myFaxDoc.loadAsPreview(self.BusinessFiles[1][self.lstBusinessStyle.getSelectedItemPos()], False) + self.xTextDocument = self.myFaxDoc.loadAsPreview( \ + self.BusinessFiles[1][self.lstBusinessStyle.getSelectedItemPos()], + False) self.initializeElements() self.setElements() def optPrivateFaxItemChanged(self): - DataAware.setDataObjects(self.faxDA, self.myConfig.cp_PrivateFax, True) - self.setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) + DataAware.setDataObjects(self.faxDA, + self.myConfig.cp_PrivateFax, True) + self.setControlProperty("lblBusinessStyle", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lstBusinessStyle", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblPrivateStyle", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lstPrivateStyle", + PropertyNames.PROPERTY_ENABLED, True) self.lstPrivateStyleItemChanged() self.__disableSenderReceiver() self.__setPossibleFooter(False) def lstPrivateStyleItemChanged(self): - self.xTextDocument = self.myFaxDoc.loadAsPreview(self.PrivateFiles[1][self.lstPrivateStyle.getSelectedItemPos()], False) + self.xTextDocument = self.myFaxDoc.loadAsPreview( \ + self.PrivateFiles[1][self.lstPrivateStyle.getSelectedItemPos()], + False) self.initializeElements() self.setElements() def txtTemplateNameTextChanged(self): xDocProps = self.xTextDocument.getDocumentProperties() - xDocProps.Title = self.txtTemplateName.getText() + xDocProps.Title = self.txtTemplateName.Text def optSenderPlaceholderItemChanged(self): - self.setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblSenderFax", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderFax", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblSenderName", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblSenderStreet", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblPostCodeCity", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("lblSenderFax", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderName", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderStreet", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderPostCode", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderState", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderCity", + PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty("txtSenderFax", + PropertyNames.PROPERTY_ENABLED, False) self.myFaxDoc.fillSenderWithUserData() def optSenderDefineItemChanged(self): - self.setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblSenderFax", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderFax", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblSenderName", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblSenderStreet", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblPostCodeCity", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("lblSenderFax", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderName", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderStreet", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderPostCode", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderState", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderCity", + PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty("txtSenderFax", + PropertyNames.PROPERTY_ENABLED, True) self.txtSenderNameTextChanged() self.txtSenderStreetTextChanged() self.txtSenderPostCodeTextChanged() @@ -398,10 +528,12 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.txtSenderFaxTextChanged() def optReceiverPlaceholderItemChanged(self): - OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", "StarBasic", "macro:#/Template.Correspondence.Placeholder()") + OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", + "StarBasic", "macro:#/Template.Correspondence.Placeholder()") def optReceiverDatabaseItemChanged(self): - OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", "StarBasic", "macro:#/Template.Correspondence.Database()") + OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", + "StarBasic", "macro:#/Template.Correspondence.Database()") def optCreateFaxItemChanged(self): self.bEditTemplate = False @@ -410,37 +542,48 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.bEditTemplate = True def txtSenderNameTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("Company", self.txtSenderName.getText()) + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, + self.xTextDocument) + myFieldHandler.changeUserFieldContent("Company", + self.txtSenderName.Text) def txtSenderStreetTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("Street", self.txtSenderStreet.getText()) + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, + self.xTextDocument) + myFieldHandler.changeUserFieldContent("Street", + self.txtSenderStreet.Text) def txtSenderCityTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("City", self.txtSenderCity.getText()) + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, + self.xTextDocument) + myFieldHandler.changeUserFieldContent("City", + self.txtSenderCity.Text) def txtSenderPostCodeTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("PostCode", self.txtSenderPostCode.getText()) + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, + self.xTextDocument) + myFieldHandler.changeUserFieldContent("PostCode", + self.txtSenderPostCode.Text) def txtSenderStateTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, self.txtSenderState.getText()) + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, + self.xTextDocument) + myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, + self.txtSenderState.Text) def txtSenderFaxTextChanged(self): - myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("Fax", self.txtSenderFax.getText()) + myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, + self.xTextDocument) + myFieldHandler.changeUserFieldContent("Fax", self.txtSenderFax.Text) - #switch Elements on/off ------------------------------------------------------- + #switch Elements on/off -------------------------------------------------- def setElements(self): #UI relevant: - if self.optSenderDefine.getState(): + if self.optSenderDefine.State: self.optSenderDefineItemChanged() - if self.optSenderPlaceholder.getState(): + if self.optSenderPlaceholder.State: self.optSenderPlaceholderItemChanged() self.chkUseLogoItemChanged() @@ -452,43 +595,58 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.chkUseFooterItemChanged() self.txtTemplateNameTextChanged() #not UI relevant: - if self.optReceiverDatabase.getState(): + if self.optReceiverDatabase.State: self.optReceiverDatabaseItemChanged() - if self.optReceiverPlaceholder.getState(): + if self.optReceiverPlaceholder.State: self.optReceiverPlaceholderItemChanged() - if self.optCreateFax.getState(): + if self.optCreateFax.State: self.optCreateFaxItemChanged() - if self.optMakeChanges.getState(): + if self.optMakeChanges.State: self.optMakeChangesItemChanged() def chkUseLogoItemChanged(self): if self.myFaxDoc.hasElement("Company Logo"): - self.myFaxDoc.switchElement("Company Logo", (self.chkUseLogo.getState() != 0)) + self.myFaxDoc.switchElement("Company Logo", + (self.chkUseLogo.State is not 0)) def chkUseSubjectItemChanged(self): if self.myFaxDoc.hasElement("Subject Line"): - self.myFaxDoc.switchElement("Subject Line", (self.chkUseSubject.getState() != 0)) + self.myFaxDoc.switchElement("Subject Line", + (self.chkUseSubject.State is not 0)) def chkUseDateItemChanged(self): if self.myFaxDoc.hasElement("Date"): - self.myFaxDoc.switchElement("Date", (self.chkUseDate.getState() != 0)) + self.myFaxDoc.switchElement("Date", + (self.chkUseDate.State is not 0)) def chkUseFooterItemChanged(self): try: - bFooterPossible = (self.chkUseFooter.getState() != 0) and bool(getControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED)) - if self.chkFooterNextPages.getState() != 0: - self.myFaxDoc.switchFooter("First Page", False, (self.chkFooterPageNumbers.getState() != 0), self.txtFooter.getText()) - self.myFaxDoc.switchFooter("Standard", bFooterPossible, (self.chkFooterPageNumbers.getState() != 0), self.txtFooter.getText()) + bFooterPossible = (self.chkUseFooter.State is not 0) \ + and bool(getControlProperty("chkUseFooter", + PropertyNames.PROPERTY_ENABLED)) + if self.chkFooterNextPages.State is not 0: + self.myFaxDoc.switchFooter("First Page", False, + (self.chkFooterPageNumbers.State is not 0), + self.txtFooter.Text) + self.myFaxDoc.switchFooter("Standard", bFooterPossible, + (self.chkFooterPageNumbers.State is not 0), + self.txtFooter.Text) else: - self.myFaxDoc.switchFooter("First Page", bFooterPossible, (self.chkFooterPageNumbers.getState() != 0), self.txtFooter.getText()) - self.myFaxDoc.switchFooter("Standard", bFooterPossible, (self.chkFooterPageNumbers.getState() != 0), self.txtFooter.getText()) + self.myFaxDoc.switchFooter("First Page", bFooterPossible, + (self.chkFooterPageNumbers.State is not 0), + self.txtFooter.Text) + self.myFaxDoc.switchFooter("Standard", bFooterPossible, + (self.chkFooterPageNumbers.State is not 0), + self.txtFooter.Text) #enable/disable roadmap item for footer page - BPaperItem = self.getRoadmapItemByID(FaxWizardDialogImpl.RM_FOOTER) - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, bFooterPossible) + BPaperItem = self.getRoadmapItemByID( \ + FaxWizardDialogImpl.RM_FOOTER) + Helper.setUnoPropertyValue(BPaperItem, + PropertyNames.PROPERTY_ENABLED, bFooterPossible) except UnoException, exception: traceback.print_exc() @@ -502,38 +660,57 @@ class FaxWizardDialogImpl(FaxWizardDialog): chkUseFooterItemChanged() def chkUseSalutationItemChanged(self): - self.myFaxDoc.switchUserField("Salutation", self.lstSalutation.getText(), (self.chkUseSalutation.getState() != 0)) - self.setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, self.chkUseSalutation.getState() != 0) + self.myFaxDoc.switchUserField("Salutation", + self.lstSalutation.Text, (self.chkUseSalutation.State is not 0)) + self.setControlProperty("lstSalutation", + PropertyNames.PROPERTY_ENABLED, + self.chkUseSalutation.State is not 0) def lstSalutationItemChanged(self): - self.myFaxDoc.switchUserField("Salutation", self.lstSalutation.getText(), (self.chkUseSalutation.getState() != 0)) + self.myFaxDoc.switchUserField("Salutation", + self.lstSalutation.Text, (self.chkUseSalutation.State is not 0)) def chkUseCommunicationItemChanged(self): - self.myFaxDoc.switchUserField("CommunicationType", self.lstCommunicationType.getText(), (self.chkUseCommunicationType.getState() != 0)) - self.setControlProperty("lstCommunicationType", PropertyNames.PROPERTY_ENABLED, self.chkUseCommunicationType.getState() != 0) + self.myFaxDoc.switchUserField("CommunicationType", + self.lstCommunicationType.Text, + (self.chkUseCommunicationType.State is not 0)) + self.setControlProperty("lstCommunicationType", + PropertyNames.PROPERTY_ENABLED, + self.chkUseCommunicationType.State is not 0) def lstCommunicationItemChanged(self): - self.myFaxDoc.switchUserField("CommunicationType", self.lstCommunicationType.getText(), (self.chkUseCommunicationType.getState() != 0)) + self.myFaxDoc.switchUserField("CommunicationType", + self.lstCommunicationType.Text, + (self.chkUseCommunicationType.State is not 0)) def chkUseGreetingItemChanged(self): - self.myFaxDoc.switchUserField("Greeting", self.lstGreeting.getText(), (self.chkUseGreeting.getState() != 0)) - self.setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, (self.chkUseGreeting.getState() != 0)) + self.myFaxDoc.switchUserField("Greeting", + self.lstGreeting.Text, (self.chkUseGreeting.State is not 0)) + self.setControlProperty("lstGreeting", + PropertyNames.PROPERTY_ENABLED, + (self.chkUseGreeting.State is not 0)) def lstGreetingItemChanged(self): - self.myFaxDoc.switchUserField("Greeting", self.lstGreeting.getText(), (self.chkUseGreeting.getState() != 0)) + self.myFaxDoc.switchUserField("Greeting", self.lstGreeting.Text, + (self.chkUseGreeting.State is not 0)) def __setPossibleFooter(self, bState): - self.setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty("chkUseFooter", + PropertyNames.PROPERTY_ENABLED, bState) if not bState: - self.chkUseFooter.setState(0) + self.chkUseFooter.State = 0 self.chkUseFooterItemChanged() def __enableSenderReceiver(self): - BPaperItem = self.getRoadmapItemByID(FaxWizardDialogImpl.RM_SENDERRECEIVER) - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, True) + BPaperItem = self.getRoadmapItemByID( \ + FaxWizardDialogImpl.RM_SENDERRECEIVER) + Helper.setUnoPropertyValue(BPaperItem, + PropertyNames.PROPERTY_ENABLED, True) def __disableSenderReceiver(self): - BPaperItem = self.getRoadmapItemByID(FaxWizardDialogImpl.RM_SENDERRECEIVER) - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, False) + BPaperItem = self.getRoadmapItemByID( \ + FaxWizardDialogImpl.RM_SENDERRECEIVER) + Helper.setUnoPropertyValue(BPaperItem, + PropertyNames.PROPERTY_ENABLED, False) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py index dcb474ed6242..864112fedbd3 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py @@ -12,7 +12,8 @@ class FaxWizardDialogResources(Resource): def __init__(self, xmsf): - super(FaxWizardDialogResources,self).__init__(xmsf, FaxWizardDialogResources.MODULE_NAME) + super(FaxWizardDialogResources,self).__init__(xmsf, + FaxWizardDialogResources.MODULE_NAME) self.RoadmapLabels = () self.SalutationLabels = () self.GreetingLabels = () @@ -21,46 +22,86 @@ class FaxWizardDialogResources(Resource): #Delete the String, uncomment the self.getResText method - self.resFaxWizardDialog_title = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 1) - self.resLabel9_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 2) - self.resoptBusinessFax_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 3) - self.resoptPrivateFax_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 4) - self.reschkUseLogo_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 5) - self.reschkUseSubject_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 6) - self.reschkUseSalutation_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 7) - self.reschkUseGreeting_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 8) - self.reschkUseFooter_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 9) - self.resoptSenderPlaceholder_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 10) - self.resoptSenderDefine_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 11) - self.restxtTemplateName_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 12) - self.resoptCreateFax_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 13) - self.resoptMakeChanges_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 14) - self.reslblBusinessStyle_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 15) - self.reslblPrivateStyle_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 16) - self.reslblIntroduction_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 17) - self.reslblSenderAddress_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 18) - self.reslblSenderName_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 19) - self.reslblSenderStreet_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 20) - self.reslblPostCodeCity_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 21) - self.reslblFooter_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 22) - self.reslblFinalExplanation1_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 23) - self.reslblFinalExplanation2_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 24) - self.reslblTemplateName_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 25) - self.reslblTemplatePath_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 26) - self.reslblProceed_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 27) - self.reslblTitle1_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 28) - self.reslblTitle3_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 29) - self.reslblTitle4_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 30) - self.reslblTitle5_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 31) - self.reslblTitle6_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 32) - self.reschkFooterNextPages_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 33) - self.reschkFooterPageNumbers_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 34) - self.reschkUseDate_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 35) - self.reschkUseCommunicationType_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 36) - self.resLabel1_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 37) - self.resoptReceiverPlaceholder_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 38) - self.resoptReceiverDatabase_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 39) - self.resLabel2_value = self.getResText(FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 40) + self.resFaxWizardDialog_title = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 1) + self.resLabel9_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 2) + self.resoptBusinessFax_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 3) + self.resoptPrivateFax_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 4) + self.reschkUseLogo_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 5) + self.reschkUseSubject_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 6) + self.reschkUseSalutation_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 7) + self.reschkUseGreeting_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 8) + self.reschkUseFooter_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 9) + self.resoptSenderPlaceholder_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 10) + self.resoptSenderDefine_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 11) + self.restxtTemplateName_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 12) + self.resoptCreateFax_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 13) + self.resoptMakeChanges_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 14) + self.reslblBusinessStyle_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 15) + self.reslblPrivateStyle_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 16) + self.reslblIntroduction_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 17) + self.reslblSenderAddress_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 18) + self.reslblSenderName_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 19) + self.reslblSenderStreet_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 20) + self.reslblPostCodeCity_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 21) + self.reslblFooter_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 22) + self.reslblFinalExplanation1_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 23) + self.reslblFinalExplanation2_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 24) + self.reslblTemplateName_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 25) + self.reslblTemplatePath_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 26) + self.reslblProceed_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 27) + self.reslblTitle1_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 28) + self.reslblTitle3_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 29) + self.reslblTitle4_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 30) + self.reslblTitle5_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 31) + self.reslblTitle6_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 32) + self.reschkFooterNextPages_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 33) + self.reschkFooterPageNumbers_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 34) + self.reschkUseDate_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 35) + self.reschkUseCommunicationType_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 36) + self.resLabel1_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 37) + self.resoptReceiverPlaceholder_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 38) + self.resoptReceiverDatabase_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 39) + self.resLabel2_value = self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 40) self.loadRoadmapResources() self.loadSalutationResources() self.loadGreetingResources() @@ -68,29 +109,33 @@ class FaxWizardDialogResources(Resource): self.loadCommonResources() def loadCommonResources(self): - self.resOverwriteWarning = self.getResText(FaxWizardDialogResources.RID_RID_COMMON_START + 19) - self.resTemplateDescription = self.getResText(FaxWizardDialogResources.RID_RID_COMMON_START + 20) + self.resOverwriteWarning = self.getResText( + FaxWizardDialogResources.RID_RID_COMMON_START + 19) + self.resTemplateDescription = self.getResText( + FaxWizardDialogResources.RID_RID_COMMON_START + 20) def loadRoadmapResources(self): - i = 1 - while i < 6: - self.RoadmapLabels = self.RoadmapLabels + ((self.getResText(FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START + i)),) - i += 1 + for i in xrange(5): + self.RoadmapLabels = self.RoadmapLabels + ((self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START + \ + + i + 1)),) def loadSalutationResources(self): i = 1 - while i < 5: - self.SalutationLabels = self.SalutationLabels + ((self.getResText(FaxWizardDialogResources.RID_FAXWIZARDSALUTATION_START + i)),) - i += 1 + for i in xrange(4): + self.SalutationLabels = self.SalutationLabels + ((self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDSALUTATION_START + \ + i + 1)),) def loadGreetingResources(self): - i = 1 - while i < 5: - self.GreetingLabels = self.GreetingLabels + ((self.getResText(FaxWizardDialogResources.RID_FAXWIZARDGREETING_START + i)),) - i += 1 + for i in xrange(4): + self.GreetingLabels = self.GreetingLabels + ((self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDGREETING_START + \ + i +1 )),) def loadCommunicationResources(self): - i = 1 - while i < 4: - self.CommunicationLabels = self.CommunicationLabels+ ((self.getResText(FaxWizardDialogResources.RID_FAXWIZARDCOMMUNICATION_START + i)),) - i += 1 + for i in xrange(3): + self.CommunicationLabels = \ + self.CommunicationLabels + ((self.getResText( + FaxWizardDialogResources.RID_FAXWIZARDCOMMUNICATION_START + \ + i + 1)),) diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index 93351c6c02f3..fed93fccb957 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -24,38 +24,46 @@ class TextDocument(object): if listener is not None: if FrameName is not None: - '''creates an instance of TextDocument and creates a named frame. + '''creates an instance of TextDocument + and creates a named frame. No document is actually loaded into this frame.''' - self.xFrame = OfficeDocument.createNewFrame(xMSF, listener, FrameName); + self.xFrame = OfficeDocument.createNewFrame( + xMSF, listener, FrameName) return elif _sPreviewURL is not None: - '''creates an instance of TextDocument by loading a given URL as preview''' + '''creates an instance of TextDocument by + loading a given URL as preview''' self.xFrame = OfficeDocument.createNewFrame(xMSF, listener) self.xTextDocument = self.loadAsPreview(_sPreviewURL, True) elif xArgs is not None: - '''creates an instance of TextDocument and creates a frame and loads a document''' + '''creates an instance of TextDocument + and creates a frame and loads a document''' self.xDesktop = Desktop.getDesktop(xMSF); - self.xFrame = OfficeDocument.createNewFrame(xMSF, listener); - self.xTextDocument = OfficeDocument.load(xFrame, URL, "_self", xArgs); + self.xFrame = OfficeDocument.createNewFrame(xMSF, listener) + self.xTextDocument = OfficeDocument.load( + xFrame, URL, "_self", xArgs); self.xWindowPeer = xFrame.getComponentWindow() - self.m_xDocProps = self.xTextDocument.getDocumentProperties(); - CharLocale = Helper.getUnoStructValue( self.xTextDocument, "CharLocale"); + self.m_xDocProps = self.xTextDocument.DocumentProperties + CharLocale = Helper.getUnoStructValue( + self.xTextDocument, "CharLocale"); return else: - '''creates an instance of TextDocument from the desktop's current frame''' + '''creates an instance of TextDocument from + the desktop's current frame''' self.xDesktop = Desktop.getDesktop(xMSF); self.xFrame = self.xDesktop.getActiveFrame() - self.xTextDocument = self.xFrame.getController().getModel() + self.xTextDocument = self.xFrame.getController().Model elif _moduleIdentifier is not None: try: '''create the empty document, and set its module identifier''' - self.xTextDocument = xMSF.createInstance("com.sun.star.text.TextDocument") + self.xTextDocument = xMSF.createInstance( + "com.sun.star.text.TextDocument") self.xTextDocument.initNew() - self.xTextDocument.setIdentifier(_moduleIdentifier.getIdentifier()) + self.xTextDocument.setIdentifier(_moduleIdentifier.Identifier) # load the document into a blank frame xDesktop = Desktop.getDesktop(xMSF) loadArgs = range(1) @@ -63,15 +71,17 @@ class TextDocument(object): loadArgs[0] = -1 loadArgs[0] = self.xTextDocument loadArgs[0] = DIRECT_VALUE - xDesktop.loadComponentFromURL("private:object", "_blank", 0, loadArgs) + xDesktop.loadComponentFromURL( + "private:object", "_blank", 0, loadArgs) # remember some things for later usage - self.xFrame = self.xTextDocument.getCurrentController().getFrame() + self.xFrame = self.xTextDocument.CurrentController.Frame except Exception, e: traceback.print_exc() elif _textDocument is not None: - '''creates an instance of TextDocument from a given XTextDocument''' - self.xFrame = _textDocument.getCurrentController().getFrame() + '''creates an instance of TextDocument + from a given XTextDocument''' + self.xFrame = _textDocument.CurrentController.Frame self.xTextDocument = _textDocument if bShowStatusIndicator: self.showStatusIndicator() @@ -80,8 +90,9 @@ class TextDocument(object): def init(self): self.xWindowPeer = self.xFrame.getComponentWindow() self.m_xDocProps = self.xTextDocument.getDocumentProperties() - self.CharLocale = Helper.getUnoStructValue(self.xTextDocument, "CharLocale") - self.xText = self.xTextDocument.getText() + self.CharLocale = Helper.getUnoStructValue( + self.xTextDocument, "CharLocale") + self.xText = self.xTextDocument.Text def showStatusIndicator(self): self.xProgressBar = self.xFrame.createStatusIndicator() @@ -91,30 +102,36 @@ class TextDocument(object): def loadAsPreview(self, sDefaultTemplate, asTemplate): loadValues = range(3) # open document in the Preview mode - loadValues[0] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[0] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') loadValues[0].Name = "ReadOnly" loadValues[0].Value = True - loadValues[1] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[1] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') loadValues[1].Name = "AsTemplate" if asTemplate: loadValues[1].Value = True else: loadValues[1].Value = False - loadValues[2] = uno.createUnoStruct('com.sun.star.beans.PropertyValue') + loadValues[2] = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') loadValues[2].Name = "Preview" loadValues[2].Value = True - #set the preview document to non-modified mode in order to avoid the 'do u want to save' box + '''set the preview document to non-modified + mode in order to avoid the 'do u want to save' box''' if self.xTextDocument is not None: try: self.xTextDocument.setModified(False) except PropertyVetoException, e1: traceback.print_exc() - self.xTextDocument = OfficeDocument.load(self.xFrame, sDefaultTemplate, "_self", loadValues) + self.xTextDocument = OfficeDocument.load( + self.xFrame, sDefaultTemplate, "_self", loadValues) self.DocSize = self.getPageSize() myViewHandler = ViewHandler(self.xTextDocument, self.xTextDocument) try: - myViewHandler.setViewSetting("ZoomType", uno.Any("short",ENTIRE_PAGE)) + myViewHandler.setViewSetting( + "ZoomType", uno.Any("short",ENTIRE_PAGE)) except Exception, e: traceback.print_exc() myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) @@ -131,7 +148,8 @@ class TextDocument(object): traceback.print_exc() return None - #creates an instance of TextDocument and creates a frame and loads a document + '''creates an instance of TextDocument and creates a + frame and loads a document''' def createTextCursor(self, oCursorContainer): xTextCursor = oCursorContainer.createTextCursor() @@ -147,11 +165,12 @@ class TextDocument(object): iScale = 200 self.xTextDocument.lockControllers() iScaleLen = ScaleString.length() - xTextCursor = createTextCursor(self.xTextDocument.getText()) + xTextCursor = createTextCursor(self.xTextDocument.Text) xTextCursor.gotoStart(False) - com.sun.star.wizards.common.Helper.setUnoPropertyValue(xTextCursor, "PageDescName", "First Page") + com.sun.star.wizards.common.Helper.setUnoPropertyValue( + xTextCursor, "PageDescName", "First Page") xTextCursor.setString(ScaleString) - xViewCursor = self.xTextDocument.getCurrentController() + xViewCursor = self.xTextDocument.CurrentController xTextViewCursor = xViewCursor.getViewCursor() xTextViewCursor.gotoStart(False) iFirstPos = xTextViewCursor.getPosition().X @@ -175,13 +194,15 @@ class TextDocument(object): This method sets the Author of a Wizard-generated template correctly and adds a explanatory sentence to the template description. @param WizardName The name of the Wizard. - @param TemplateDescription The old Description which is being appended with another sentence. + @param TemplateDescription The old Description which is being + appended with another sentence. @return void. ''' def setWizardTemplateDocInfo(self, WizardName, TemplateDescription): try: - xNA = Configuration.getConfigurationRoot(self.xMSF, "/org.openoffice.UserProfile/Data", False) + xNA = Configuration.getConfigurationRoot( + self.xMSF, "/org.openoffice.UserProfile/Data", False) gn = xNA.getByName("givenname") sn = xNA.getByName("sn") fullname = str(gn) + " " + str(sn) @@ -198,8 +219,10 @@ class TextDocument(object): xDocProps2.setModifiedBy(fullname) description = xDocProps2.getDescription() description = description + " " + TemplateDescription - description = JavaTools.replaceSubString(description, WizardName, "") - description = JavaTools.replaceSubString(description, myDate, "") + description = JavaTools.replaceSubString( + description, WizardName, "") + description = JavaTools.replaceSubString( + description, myDate, "") xDocProps2.setDescription(description) except NoSuchElementException, e: # TODO Auto-generated catch block @@ -240,6 +263,7 @@ class TextDocument(object): return xPC.getPage() ''' - Possible Values for "OptionString" are: "LoadCellStyles", "LoadTextStyles", "LoadFrameStyles", + Possible Values for "OptionString" are: "LoadCellStyles", + "LoadTextStyles", "LoadFrameStyles", "LoadPageStyles", "LoadNumberingStyles", "OverwriteStyles" ''' diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.py b/wizards/com/sun/star/wizards/text/TextFieldHandler.py index c318de0876c4..c49267429ef8 100644 --- a/wizards/com/sun/star/wizards/text/TextFieldHandler.py +++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.py @@ -16,7 +16,7 @@ class TextFieldHandler(object): self.xTextFieldsSupplier = xTextDocument def refreshTextFields(self): - xUp = self.xTextFieldsSupplier.getTextFields() + xUp = self.xTextFieldsSupplier.TextFields xUp.refresh() def getUserFieldContent(self, xTextCursor): @@ -37,38 +37,46 @@ class TextFieldHandler(object): def insertUserField(self, xTextCursor, FieldName, FieldTitle): try: - xField = self.xMSFDoc.createInstance("com.sun.star.text.TextField.User") + xField = self.xMSFDoc.createInstance( + "com.sun.star.text.TextField.User") - if self.xTextFieldsSupplier.getTextFieldMasters().hasByName("com.sun.star.text.FieldMaster.User." + FieldName): + if self.xTextFieldsSupplier.getTextFieldMasters().hasByName( + "com.sun.star.text.FieldMaster.User." + FieldName): oMaster = self.xTextFieldsSupplier.getTextFieldMasters().getByName( \ "com.sun.star.text.FieldMaster.User." + FieldName) oMaster.dispose() xPSet = createUserField(FieldName, FieldTitle) xField.attachTextFieldMaster(xPSet) - xTextCursor.getText().insertTextContent(xTextCursor, xField, False) + xTextCursor.getText().insertTextContent( + xTextCursor, xField, False) except com.sun.star.uno.Exception, exception: traceback.print_exc() def createUserField(self, FieldName, FieldTitle): - xPSet = self.xMSFDoc.createInstance("com.sun.star.text.FieldMaster.User") + xPSet = self.xMSFDoc.createInstance( + "com.sun.star.text.FieldMaster.User") xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, FieldName) xPSet.setPropertyValue("Content", FieldTitle) return xPSet - def __getTextFieldsByProperty(self, _PropertyName, _aPropertyValue, _TypeName): + def __getTextFieldsByProperty( + self, _PropertyName, _aPropertyValue, _TypeName): try: - xDependentVector = [] - if self.xTextFieldsSupplier.getTextFields().hasElements(): - xEnum = self.xTextFieldsSupplier.getTextFields().createEnumeration() + if self.xTextFieldsSupplier.TextFields.hasElements(): + xEnum = \ + self.xTextFieldsSupplier.TextFields.createEnumeration() + xDependentVector = [] while xEnum.hasMoreElements(): oTextField = xEnum.nextElement() - xPropertySet = oTextField.getTextFieldMaster() - if xPropertySet.getPropertySetInfo().hasPropertyByName(_PropertyName): + xPropertySet = oTextField.TextFieldMaster + if xPropertySet.PropertySetInfo.hasPropertyByName( + _PropertyName): oValue = xPropertySet.getPropertyValue(_PropertyName) if isinstance(oValue,unicode): if _TypeName == "String": - sValue = unicodedata.normalize('NFKD', oValue).encode('ascii','ignore') + sValue = unicodedata.normalize( + 'NFKD', oValue).encode('ascii','ignore') if sValue == _aPropertyValue: xDependentVector.append(oTextField) #COMMENTED @@ -78,9 +86,10 @@ class TextFieldHandler(object): ishortValue = AnyConverter.toShort(oValue) if ishortValue == iShortParam: xDependentVector.append(oTextField) ''' - - if len(xDependentVector) > 0: - return xDependentVector + if xDependentVector: + return xDependentVector + else: + return None except Exception, e: #TODO Auto-generated catch block @@ -90,10 +99,12 @@ class TextFieldHandler(object): def changeUserFieldContent(self, _FieldName, _FieldContent): try: - xDependentTextFields = self.__getTextFieldsByProperty(PropertyNames.PROPERTY_NAME, _FieldName, "String") + xDependentTextFields = self.__getTextFieldsByProperty( + PropertyNames.PROPERTY_NAME, _FieldName, "String") if xDependentTextFields != None: for i in xDependentTextFields: - i.getTextFieldMaster().setPropertyValue("Content", _FieldContent) + i.getTextFieldMaster().setPropertyValue( + "Content", _FieldContent) self.refreshTextFields() except Exception, e: @@ -101,13 +112,15 @@ class TextFieldHandler(object): def updateDocInfoFields(self): try: - xEnum = self.xTextFieldsSupplier.getTextFields().createEnumeration() + xEnum = self.xTextFieldsSupplier.TextFields.createEnumeration() while xEnum.hasMoreElements(): oTextField = xEnum.nextElement() - if oTextField.supportsService("com.sun.star.text.TextField.ExtendedUser"): + if oTextField.supportsService( + "com.sun.star.text.TextField.ExtendedUser"): oTextField.update() - if oTextField.supportsService("com.sun.star.text.TextField.User"): + if oTextField.supportsService( + "com.sun.star.text.TextField.User"): oTextField.update() except Exception, e: @@ -115,7 +128,7 @@ class TextFieldHandler(object): def updateDateFields(self): try: - xEnum = self.xTextFieldsSupplier.getTextFields().createEnumeration() + xEnum = self.xTextFieldsSupplier.TextFields.createEnumeration() now = time.localtime(time.time()) dt = DateTime() dt.Day = time.strftime("%d", now) @@ -124,7 +137,8 @@ class TextFieldHandler(object): dt.Month += 1 while xEnum.hasMoreElements(): oTextField = xEnum.nextElement() - if oTextField.supportsService("com.sun.star.text.TextField.DateTime"): + if oTextField.supportsService( + "com.sun.star.text.TextField.DateTime"): oTextField.setPropertyValue("IsFixed", False) oTextField.setPropertyValue("DateTimeValue", dt) @@ -133,10 +147,11 @@ class TextFieldHandler(object): def fixDateFields(self, _bSetFixed): try: - xEnum = self.xTextFieldsSupplier.getTextFields().createEnumeration() + xEnum = self.xTextFieldsSupplier.TextFields.createEnumeration() while xEnum.hasMoreElements(): oTextField = xEnum.nextElement() - if oTextField.supportsService("com.sun.star.text.TextField.DateTime"): + if oTextField.supportsService( + "com.sun.star.text.TextField.DateTime"): oTextField.setPropertyValue("IsFixed", _bSetFixed) except Exception, e: @@ -144,7 +159,8 @@ class TextFieldHandler(object): def removeUserFieldByContent(self, _FieldContent): try: - xDependentTextFields = self.__getTextFieldsByProperty("Content", _FieldContent, "String") + xDependentTextFields = self.__getTextFieldsByProperty( + "Content", _FieldContent, "String") if xDependentTextFields != None: i = 0 while i < xDependentTextFields.length: @@ -156,11 +172,13 @@ class TextFieldHandler(object): def changeExtendedUserFieldContent(self, UserDataPart, _FieldContent): try: - xDependentTextFields = self.__getTextFieldsByProperty("UserDataType", uno.Any("short",UserDataPart), "Short") + xDependentTextFields = self.__getTextFieldsByProperty( + "UserDataType", uno.Any("short",UserDataPart), "Short") if xDependentTextFields != None: i = 0 while i < xDependentTextFields.length: - xDependentTextFields[i].getTextFieldMaster().setPropertyValue("Content", _FieldContent) + xDependentTextFields[i].getTextFieldMaster().setPropertyValue( + "Content", _FieldContent) i += 1 self.refreshTextFields() diff --git a/wizards/com/sun/star/wizards/text/TextSectionHandler.py b/wizards/com/sun/star/wizards/text/TextSectionHandler.py index f1c40ea563d7..98a19ab4a4ee 100644 --- a/wizards/com/sun/star/wizards/text/TextSectionHandler.py +++ b/wizards/com/sun/star/wizards/text/TextSectionHandler.py @@ -5,26 +5,28 @@ class TextSectionHandler(object): def __init__(self, xMSF, xTextDocument): self.xMSFDoc = xMSF self.xTextDocument = xTextDocument - self.xText = xTextDocument.getText() + self.xText = xTextDocument.Text def removeTextSectionbyName(self, SectionName): try: - xAllTextSections = self.xTextDocument.getTextSections() + xAllTextSections = self.xTextDocument.TextSections if xAllTextSections.hasByName(SectionName) == True: - oTextSection = self.xTextDocument.getTextSections().getByName(SectionName) + oTextSection = self.xTextDocument.TextSections.getByName( + SectionName) removeTextSection(oTextSection) except Exception, exception: traceback.print_exc() def hasTextSectionByName(self, SectionName): - xAllTextSections = self.xTextDocument.getTextSections() + xAllTextSections = self.xTextDocument.TextSections return xAllTextSections.hasByName(SectionName) def removeLastTextSection(self): try: - xAllTextSections = self.xTextDocument.getTextSections() - oTextSection = xAllTextSections.getByIndex(xAllTextSections.getCount() - 1) + xAllTextSections = self.xTextDocument.TextSections + oTextSection = xAllTextSections.getByIndex( + xAllTextSections.getCount() - 1) removeTextSection(oTextSection) except Exception, exception: traceback.print_exc() @@ -37,13 +39,12 @@ class TextSectionHandler(object): def removeInvisibleTextSections(self): try: - xAllTextSections = self.xTextDocument.getTextSections() + xAllTextSections = self.xTextDocument.TextSections TextSectionCount = xAllTextSections.getCount() i = TextSectionCount - 1 while i >= 0: xTextContentTextSection = xAllTextSections.getByIndex(i) - bRemoveTextSection = (not AnyConverter.toBoolean(xTextContentTextSection.getPropertyValue("IsVisible"))) - if bRemoveTextSection: + if not bool(xTextContentTextSection.getPropertyValue("IsVisible")): self.xText.removeTextContent(xTextContentTextSection) i -= 1 @@ -52,7 +53,7 @@ class TextSectionHandler(object): def removeAllTextSections(self): try: - TextSectionCount = self.xTextDocument.getTextSections().getCount() + TextSectionCount = self.xTextDocument.TextSections.getCount() i = TextSectionCount - 1 while i >= 0: xTextContentTextSection = xAllTextSections.getByIndex(i) @@ -63,13 +64,15 @@ class TextSectionHandler(object): def breakLinkofTextSections(self): try: - iSectionCount = self.xTextDocument.getTextSections().getCount() + iSectionCount = self.xTextDocument.TextSections.getCount() oSectionLink = SectionFileLink.SectionFileLink() oSectionLink.FileURL = "" i = 0 while i < iSectionCount: oTextSection = xAllTextSections.getByIndex(i) - Helper.setUnoPropertyValues(oTextSection, ["FileLink", "LinkRegion"], [oSectionLink, ""]) + Helper.setUnoPropertyValues( + oTextSection, ["FileLink", "LinkRegion"], + [oSectionLink, ""]) i += 1 except Exception, exception: traceback.print_exc() @@ -77,11 +80,13 @@ class TextSectionHandler(object): def breakLinkOfTextSection(self, oTextSection): oSectionLink = SectionFileLink.SectionFileLink() oSectionLink.FileURL = "" - Helper.setUnoPropertyValues(oTextSection, ["FileLink", "LinkRegion"],[oSectionLink, ""]) + Helper.setUnoPropertyValues( + oTextSection, ["FileLink", "LinkRegion"],[oSectionLink, ""]) def linkSectiontoTemplate(self, TemplateName, SectionName): try: - oTextSection = self.xTextDocument.getTextSections().getByName(SectionName) + oTextSection = self.xTextDocument.TextSections.getByName( + SectionName) linkSectiontoTemplate(oTextSection, TemplateName, SectionName) except Exception, e: traceback.print_exc() @@ -89,7 +94,9 @@ class TextSectionHandler(object): def linkSectiontoTemplate(self, oTextSection, TemplateName, SectionName): oSectionLink = SectionFileLink.SectionFileLink() oSectionLink.FileURL = TemplateName - Helper.setUnoPropertyValues(oTextSection, ["FileLink", "LinkRegion"],[oSectionLink, SectionName]) + Helper.setUnoPropertyValues( + oTextSection, ["FileLink", "LinkRegion"], + [oSectionLink, SectionName]) NewSectionName = oTextSection.getName() if NewSectionName.compareTo(SectionName) != 0: oTextSection.setName(SectionName) @@ -98,7 +105,8 @@ class TextSectionHandler(object): try: if _bAddParagraph: xTextCursor = self.xText.createTextCursor() - self.xText.insertControlCharacter(xTextCursor, ControlCharacter.PARAGRAPH_BREAK, False) + self.xText.insertControlCharacter( + xTextCursor, ControlCharacter.PARAGRAPH_BREAK, False) xTextCursor.collapseToEnd() xSecondTextCursor = self.xText.createTextCursor() @@ -109,11 +117,14 @@ class TextSectionHandler(object): def insertTextSection(self, sectionName, templateName, position): try: - if self.xTextDocument.getTextSections().hasByName(sectionName) == True: - xTextSection = self.xTextDocument.getTextSections().getByName(sectionName) + if self.xTextDocument.TextSections.hasByName(sectionName): + xTextSection = \ + self.xTextDocument.TextSections.getByName(sectionName) else: - xTextSection = self.xMSFDoc.createInstance("com.sun.star.text.TextSection") - position.getText().insertTextContent(position, xTextSection, False) + xTextSection = self.xMSFDoc.createInstance( + "com.sun.star.text.TextSection") + position.getText().insertTextContent( + position, xTextSection, False) linkSectiontoTemplate(xTextSection, templateName, sectionName) except Exception, exception: diff --git a/wizards/com/sun/star/wizards/text/ViewHandler.py b/wizards/com/sun/star/wizards/text/ViewHandler.py index 73462f871d3d..9a646da05f54 100644 --- a/wizards/com/sun/star/wizards/text/ViewHandler.py +++ b/wizards/com/sun/star/wizards/text/ViewHandler.py @@ -6,17 +6,19 @@ class ViewHandler(object): def __init__ (self, xMSF, xTextDocument): self.xMSFDoc = xMSF self.xTextDocument = xTextDocument - self.xTextViewCursorSupplier = self.xTextDocument.getCurrentController() + self.xTextViewCursorSupplier = self.xTextDocument.CurrentController def selectFirstPage(self, oTextTableHandler): try: - xPageCursor = self.xTextViewCursorSupplier.getViewCursor() + xPageCursor = self.xTextViewCursorSupplier.ViewCursor xPageCursor.jumpToFirstPage() xPageCursor.jumpToStartOfPage() - Helper.setUnoPropertyValue(xPageCursor, "PageDescName", "First Page") - oPageStyles = self.xTextDocument.getStyleFamilies().getByName("PageStyles") + Helper.setUnoPropertyValue( + xPageCursor, "PageDescName", "First Page") + oPageStyles = self.xTextDocument.StyleFamilies.getByName( + "PageStyles") oPageStyle = oPageStyles.getByName("First Page") - xAllTextTables = oTextTableHandler.xTextTablesSupplier.getTextTables() + xAllTextTables = oTextTableHandler.xTextTablesSupplier.TextTables xTextTable = xAllTextTables.getByIndex(0) xRange = xTextTable.getAnchor().getText() xPageCursor.gotoRange(xRange, False) @@ -30,9 +32,10 @@ class ViewHandler(object): exception.printStackTrace(System.out) def setViewSetting(self, Setting, Value): - uno.invoke(self.xTextViewCursorSupplier.getViewSettings(),"setPropertyValue",(Setting, Value)) + uno.invoke(self.xTextViewCursorSupplier.ViewSettings,"setPropertyValue",( + Setting, Value)) def collapseViewCursorToStart(self): - xTextViewCursor = self.xTextViewCursorSupplier.getViewCursor() + xTextViewCursor = self.xTextViewCursorSupplier.ViewCursor xTextViewCursor.collapseToStart() diff --git a/wizards/com/sun/star/wizards/text/__init__.py b/wizards/com/sun/star/wizards/text/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.py b/wizards/com/sun/star/wizards/ui/PathSelection.py index c2335547c3e4..aa7231e19966 100644 --- a/wizards/com/sun/star/wizards/ui/PathSelection.py +++ b/wizards/com/sun/star/wizards/ui/PathSelection.py @@ -27,23 +27,63 @@ class PathSelection(object): self.CMDSELECTPATH = 1 self.TXTSAVEPATH = 1 - def insert(self, DialogStep, XPos, YPos, Width, CurTabIndex, LabelText, Enabled, TxtHelpURL, BtnHelpURL): - self.CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblSaveAs", (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 8, LabelText, XPos, YPos, DialogStep, uno.Any("short",CurTabIndex), Width)) - self.xSaveTextBox = self.CurUnoDialog.insertTextField("txtSavePath", "callXPathSelectionListener", (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 12, TxtHelpURL, XPos, YPos + 10, DialogStep, uno.Any("short",(CurTabIndex + 1)), Width - 26), self) + def insert( + self, DialogStep, XPos, YPos, Width, + CurTabIndex, LabelText, Enabled, TxtHelpURL, BtnHelpURL): - self.CurUnoDialog.setControlProperty("txtSavePath", PropertyNames.PROPERTY_ENABLED, False ) - self.CurUnoDialog.insertButton("cmdSelectPath", "triggerPathPicker", (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 14, BtnHelpURL, "...",XPos + Width - 16, YPos + 9, DialogStep, uno.Any("short",(CurTabIndex + 2)), 16), self) + self.CurUnoDialog.insertControlModel( + "com.sun.star.awt.UnoControlFixedTextModel", "lblSaveAs", + (PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (Enabled, 8, LabelText, XPos, YPos, DialogStep, + uno.Any("short",CurTabIndex), Width)) + self.xSaveTextBox = self.CurUnoDialog.insertTextField( + "txtSavePath", "callXPathSelectionListener", + (PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (Enabled, 12, TxtHelpURL, XPos, YPos + 10, DialogStep, + uno.Any("short",(CurTabIndex + 1)), Width - 26), self) + + self.CurUnoDialog.setControlProperty("txtSavePath", + PropertyNames.PROPERTY_ENABLED, False ) + self.CurUnoDialog.insertButton("cmdSelectPath", "triggerPathPicker", + (PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (Enabled, 14, BtnHelpURL, "...",XPos + Width - 16, YPos + 9, + DialogStep, uno.Any("short",(CurTabIndex + 2)), 16), self) def addSelectionListener(self, xAction): self.xAction = xAction def getSelectedPath(self): - return self.xSaveTextBox.getText() + return self.xSaveTextBox.Text def initializePath(self): try: myFA = FileAccess(self.xMSF) - self.xSaveTextBox.setText(myFA.getPath(self.sDefaultDirectory + "/" + self.sDefaultName, None)) + self.xSaveTextBox.setText( + myFA.getPath(self.sDefaultDirectory + \ + "/" + \ + self.sDefaultName, None)) except UnoException, e: traceback.print_exc() @@ -55,14 +95,18 @@ class PathSelection(object): return elif self.iDialogType == self.DialogTypes.FILE: self.usedPathPicker = True - myFilePickerDialog = SystemDialog.createStoreDialog(self.xMSF) - myFilePickerDialog.callStoreDialog(self.sDefaultDirectory, self.sDefaultName, self.sDefaultFilter); - sStorePath = myFilePickerDialog.sStorePath; + myFilePickerDialog = \ + SystemDialog.createStoreDialog(self.xMSF) + myFilePickerDialog.callStoreDialog( + self.sDefaultDirectory, + self.sDefaultName, self.sDefaultFilter) + sStorePath = myFilePickerDialog.sStorePath if sStorePath is not None: myFA = FileAccess(xMSF); - xSaveTextBox.setText(myFA.getPath(sStorePath, None)); - self.sDefaultDirectory = FileAccess.getParentDir(sStorePath); - self.sDefaultName = myFA.getFilename(sStorePath); + xSaveTextBox.setText(myFA.getPath(sStorePath, None)) + self.sDefaultDirectory = \ + FileAccess.getParentDir(sStorePath) + self.sDefaultName = myFA.getFilename(sStorePath) return elif iTransferMode == TransferMode.LOAD: if iDialogType == DialogTypes.FOLDER: diff --git a/wizards/com/sun/star/wizards/ui/PeerConfig.py b/wizards/com/sun/star/wizards/ui/PeerConfig.py index b062846823db..7f0dba4b3ce2 100644 --- a/wizards/com/sun/star/wizards/ui/PeerConfig.py +++ b/wizards/com/sun/star/wizards/ui/PeerConfig.py @@ -45,25 +45,33 @@ class PeerConfig(object): xVclWindowPeer = aPeerTask.xControl.getPeer() n = 0 while n < aPeerTask.propnames.length: - xVclWindowPeer.setProperty(aPeerTask.propnames[n], aPeerTask.propvalues[n]) + xVclWindowPeer.setProperty(aPeerTask.propnames[n], + aPeerTask.propvalues[n]) n += 1 i += 1 i = 0 while i < self.aControlTasks.size(): aControlTask = self.aControlTasks.elementAt(i) - Helper.setUnoPropertyValue(aControlTask.oModel, aControlTask.propname, aControlTask.propvalue) + Helper.setUnoPropertyValue(aControlTask.oModel, + aControlTask.propname, aControlTask.propvalue) i += 1 i = 0 while i < self.aImageUrlTasks.size(): aImageUrlTask = self.aImageUrlTasks.elementAt(i) sImageUrl = "" if isinstance(aImageUrlTask.oResource,int): - sImageUrl = self.oUnoDialog.getWizardImageUrl((aImageUrlTask.oResource).intValue(), (aImageUrlTask.oHCResource).intValue()) + sImageUrl = self.oUnoDialog.getWizardImageUrl( + (aImageUrlTask.oResource).intValue(), + (aImageUrlTask.oHCResource).intValue()) elif isinstance(aImageUrlTask.oResource,str): - sImageUrl = self.oUnoDialog.getImageUrl((aImageUrlTask.oResource), (aImageUrlTask.oHCResource)) + sImageUrl = self.oUnoDialog.getImageUrl( + (aImageUrlTask.oResource), + (aImageUrlTask.oHCResource)) if not sImageUrl.equals(""): - Helper.setUnoPropertyValue(aImageUrlTask.oModel, PropertyNames.PROPERTY_IMAGEURL, sImageUrl) + Helper.setUnoPropertyValue( + aImageUrlTask.oModel, + PropertyNames.PROPERTY_IMAGEURL, sImageUrl) i += 1 except RuntimeException, re: @@ -71,7 +79,8 @@ class PeerConfig(object): raise re; ''' - @param oAPIControl an API control that the interface XControl can be derived from + @param oAPIControl an API control that the interface XControl + can be derived from @param _saccessname ''' @@ -82,7 +91,8 @@ class PeerConfig(object): setPeerProperties(_xControl, ("AccessibleName"), (_saccessname)) ''' - @param oAPIControl an API control that the interface XControl can be derived from + @param oAPIControl an API control that the interface XControl + can be derived from @param _propnames @param _propvalues ''' @@ -96,20 +106,21 @@ class PeerConfig(object): ''' assigns an arbitrary property to a control as soon as the peer is created - Note: The property 'ImageUrl' should better be assigned with 'setImageurl(...)', to consider the High Contrast Mode + Note: The property 'ImageUrl' should better be assigned with + 'setImageurl(...)', to consider the High Contrast Mode @param _ocontrolmodel @param _spropname @param _propvalue ''' def setControlProperty(self, _ocontrolmodel, _spropname, _propvalue): - oControlTask = self.ControlTask.ControlTask_unknown(_ocontrolmodel, _spropname, _propvalue) + oControlTask = self.ControlTask(_ocontrolmodel, _spropname, _propvalue) self.aControlTasks.append(oControlTask) ''' - Assigns an image to the property 'ImageUrl' of a dialog control. The image id must be assigned in a resource file - within the wizards project - wizards project + Assigns an image to the property 'ImageUrl' of a dialog control. + The image id must be assigned in a resource file within the wizards + project wizards project @param _ocontrolmodel @param _nResId @param _nhcResId @@ -120,7 +131,8 @@ class PeerConfig(object): self.aImageUrlTasks.append(oImageUrlTask) ''' - Assigns an image to the property 'ImageUrl' of a dialog control. The image ids that the Resource urls point to + Assigns an image to the property 'ImageUrl' of a dialog control. + The image ids that the Resource urls point to may be assigned in a Resource file outside the wizards project @param _ocontrolmodel @param _sResourceUrl @@ -128,18 +140,20 @@ class PeerConfig(object): ''' def setImageUrl(self, _ocontrolmodel, _sResourceUrl, _sHCResourceUrl): - oImageUrlTask = ImageUrlTask(_ocontrolmodel, _sResourceUrl, _sHCResourceUrl) + oImageUrlTask = ImageUrlTask( + _ocontrolmodel, _sResourceUrl, _sHCResourceUrl) self.aImageUrlTasks.append(oImageUrlTask) ''' - Assigns an image to the property 'ImageUrl' of a dialog control. The image id must be assigned in a resource file - within the wizards project - wizards project + Assigns an image to the property 'ImageUrl' of a dialog control. + The image id must be assigned in a resource file within the wizards + project wizards project @param _ocontrolmodel @param _oResource @param _oHCResource ''' def setImageUrl(self, _ocontrolmodel, _oResource, _oHCResource): - oImageUrlTask = self.ImageUrlTask(_ocontrolmodel, _oResource, _oHCResource) + oImageUrlTask = self.ImageUrlTask( + _ocontrolmodel, _oResource, _oHCResource) self.aImageUrlTasks.append(oImageUrlTask) diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py index cfc1c043786b..32ac6e51bf66 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -13,9 +13,11 @@ class UnoDialog(object): try: self.xMSF = xMSF self.ControlList = {} - self.xDialogModel = xMSF.createInstance("com.sun.star.awt.UnoControlDialogModel") + self.xDialogModel = xMSF.createInstance( + "com.sun.star.awt.UnoControlDialogModel") self.xDialogModel.setPropertyValues(PropertyNames, PropertyValues) - self.xUnoDialog = xMSF.createInstance("com.sun.star.awt.UnoControlDialog") + self.xUnoDialog = xMSF.createInstance( + "com.sun.star.awt.UnoControlDialog") self.xUnoDialog.setModel(self.xDialogModel) self.BisHighContrastModeActivated = None self.m_oPeerConfig = None @@ -26,7 +28,8 @@ class UnoDialog(object): def getControlKey(self, EventObject, ControlList): xControlModel = EventObject.getModel() try: - sName = xControlModel.getPropertyValue(PropertyNames.PROPERTY_NAME) + sName = xControlModel.getPropertyValue( + PropertyNames.PROPERTY_NAME) iKey = ControlList.get(sName).intValue() except com.sun.star.uno.Exception, exception: traceback.print_exc() @@ -59,8 +62,8 @@ class UnoDialog(object): else: PropertyValue = (PropertyValue,) - uno.invoke(xPSet, "setPropertyValue", (PropertyName, uno.Any( \ - methodname, PropertyValue))) + uno.invoke(xPSet, "setPropertyValue", (PropertyName, + uno.Any( methodname, PropertyValue))) except Exception, exception: traceback.print_exc() @@ -77,7 +80,8 @@ class UnoDialog(object): def getResource(self): return self.m_oResource - def setControlProperties(self, ControlName, PropertyNames, PropertyValues): + def setControlProperties( + self, ControlName, PropertyNames, PropertyValues): self.setControlProperty(ControlName, PropertyNames, PropertyValues) def getControlProperty(self, ControlName, PropertyName): @@ -92,31 +96,31 @@ class UnoDialog(object): def printControlProperties(self, ControlName): try: xControlModel = self.xDialogModel().getByName(ControlName) - allProps = xControlModel.getPropertySetInfo().getProperties() + allProps = xControlModel.PropertySetInfo.Properties i = 0 while i < allProps.length: sName = allProps[i].Name i += 1 - except com.sun.star.uno.Exception, exception: + except UnoException, exception: traceback.print_exc() def getMAPConversionFactor(self, ControlName): xControl2 = self.xUnoDialog.getControl(ControlName) - aSize = xControl2.getSize() - dblMAPWidth = ((Helper.getUnoPropertyValue(xControl2.getModel(), PropertyNames.PROPERTY_WIDTH)).intValue()) - dblFactor = (((aSize.Width)) / dblMAPWidth) - return dblFactor + aSize = xControl2.Size + dblMAPWidth = Helper.getUnoPropertyValue(xControl2.Model, + int(PropertyNames.PROPERTY_WIDTH)) + return (aSize.Width / dblMAPWidth) def getpreferredLabelSize(self, LabelName, sLabel): xControl2 = self.xUnoDialog.getControl(LabelName) - OldText = xControl2.getText() + OldText = xControl2.Text xControl2.setText(sLabel) - aSize = xControl2.getPreferredSize() + aSize = xControl2.PreferredSize xControl2.setText(OldText) return aSize def removeSelectedItems(self, xListBox): - SelList = xListBox.getSelectedItemsPos() + SelList = xListBox.SelectedItemsPos Sellen = SelList.length i = Sellen - 1 while i >= 0: @@ -124,18 +128,21 @@ class UnoDialog(object): i -= 1 def getListBoxItemCount(self, _xListBox): - # This function may look ugly, but this is the only way to check the count - # of values in the model,which is always right. + # This function may look ugly, but this is the only way to check + # the count of values in the model,which is always right. # the control is only a view and could be right or not. - fieldnames = Helper.getUnoPropertyValue(getModel(_xListBox), "StringItemList") + fieldnames = Helper.getUnoPropertyValue(getModel(_xListBox), + "StringItemList") return fieldnames.length def getSelectedItemPos(self, _xListBox): - ipos = Helper.getUnoPropertyValue(getModel(_xListBox), "SelectedItems") + ipos = Helper.getUnoPropertyValue(getModel(_xListBox), + "SelectedItems") return ipos[0] def isListBoxSelected(self, _xListBox): - ipos = Helper.getUnoPropertyValue(getModel(_xListBox), "SelectedItems") + ipos = Helper.getUnoPropertyValue(getModel(_xListBox), + "SelectedItems") return ipos.length > 0 def addSingleItemtoListbox(self, xListBox, ListItem, iSelIndex): @@ -145,7 +152,9 @@ class UnoDialog(object): def insertLabel(self, sName, sPropNames, oPropValues): try: - oFixedText = self.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", sName, sPropNames, oPropValues) + oFixedText = self.insertControlModel( + "com.sun.star.awt.UnoControlFixedTextModel", + sName, sPropNames, oPropValues) oFixedText.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) oLabel = self.xUnoDialog.getControl(sName) return oLabel @@ -153,12 +162,16 @@ class UnoDialog(object): traceback.print_exc() return None - def insertButton(self, sName, iControlKey, xActionListener, sProperties, sValues): - oButtonModel = self.insertControlModel("com.sun.star.awt.UnoControlButtonModel", sName, sProperties, sValues) + def insertButton( + self, sName, iControlKey, xActionListener, sProperties, sValues): + oButtonModel = self.insertControlModel( + "com.sun.star.awt.UnoControlButtonModel", + sName, sProperties, sValues) xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) xButton = self.xUnoDialog.getControl(sName) if xActionListener != None: - xButton.addActionListener(ActionListenerProcAdapter(xActionListener)) + xButton.addActionListener( + ActionListenerProcAdapter(xActionListener)) ControlKey = iControlKey if self.ControlList != None: @@ -166,31 +179,43 @@ class UnoDialog(object): return xButton - def insertCheckBox(self, sName, iControlKey, xItemListener, sProperties, sValues): - oButtonModel = self.insertControlModel("com.sun.star.awt.UnoControlCheckBoxModel", sName, sProperties, sValues) + def insertCheckBox( + self, sName, iControlKey, xItemListener, sProperties, sValues): + oButtonModel = self.insertControlModel( + "com.sun.star.awt.UnoControlCheckBoxModel", + sName, sProperties, sValues) oButtonModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) xCheckBox = self.xUnoDialog.getControl(sName) if xItemListener != None: - xCheckBox.addItemListener(ItemListenerProcAdapter(xItemListener)) + xCheckBox.addItemListener( + ItemListenerProcAdapter(xItemListener)) ControlKey = iControlKey if self.ControlList != None: self.ControlList.put(sName, ControlKey) - def insertNumericField(self, sName, iControlKey, xTextListener, sProperties, sValues): - oNumericFieldModel = self.insertControlModel("com.sun.star.awt.UnoControlNumericFieldModel", sName, sProperties, sValues) - oNumericFieldModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + def insertNumericField( + self, sName, iControlKey, xTextListener, sProperties, sValues): + oNumericFieldModel = self.insertControlModel( + "com.sun.star.awt.UnoControlNumericFieldModel", + sName, sProperties, sValues) + oNumericFieldModel.setPropertyValue( + PropertyNames.PROPERTY_NAME, sName) xNumericField = self.xUnoDialog.getControl(sName) if xTextListener != None: - xNumericField.addTextListener(TextListenerProcAdapter(xTextListener)) + xNumericField.addTextListener( + TextListenerProcAdapter(xTextListener)) ControlKey = iControlKey if self.ControlList != None: self.ControlList.put(sName, ControlKey) - def insertScrollBar(self, sName, iControlKey, xAdjustmentListener, sProperties, sValues): + def insertScrollBar( + self, sName, iControlKey, xAdjustmentListener, sProperties, sValues): try: - oScrollModel = self.insertControlModel("com.sun.star.awt.UnoControlScrollBarModel", sName, sProperties, sValues) + oScrollModel = self.insertControlModel( + "com.sun.star.awt.UnoControlScrollBarModel", + sName, sProperties, sValues) oScrollModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) xScrollBar = self.xUnoDialog.getControl(sName) if xAdjustmentListener != None: @@ -205,17 +230,27 @@ class UnoDialog(object): traceback.print_exc() return None - def insertTextField(self, sName, iControlKey, xTextListener, sProperties, sValues): - xTextBox = insertEditField("com.sun.star.awt.UnoControlEditModel", sName, iControlKey, xTextListener, sProperties, sValues) + def insertTextField( + self, sName, iControlKey, xTextListener, sProperties, sValues): + xTextBox = insertEditField( + "com.sun.star.awt.UnoControlEditModel", sName, iControlKey, + xTextListener, sProperties, sValues) return xTextBox - def insertFormattedField(self, sName, iControlKey, xTextListener, sProperties, sValues): - xTextBox = insertEditField("com.sun.star.awt.UnoControlFormattedFieldModel", sName, iControlKey, xTextListener, sProperties, sValues) + def insertFormattedField( + self, sName, iControlKey, xTextListener, sProperties, sValues): + xTextBox = insertEditField( + "com.sun.star.awt.UnoControlFormattedFieldModel", sName, + iControlKey, xTextListener, sProperties, sValues) return xTextBox - def insertEditField(self, ServiceName, sName, iControlKey, xTextListener, sProperties, sValues): + def insertEditField( + self, ServiceName, sName, iControlKey, + xTextListener, sProperties, sValues): + try: - xTextModel = self.insertControlModel(ServiceName, sName, sProperties, sValues) + xTextModel = self.insertControlModel( + ServiceName, sName, sProperties, sValues) xTextModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) xTextBox = self.xUnoDialog.getControl(sName) if xTextListener != None: @@ -228,22 +263,31 @@ class UnoDialog(object): traceback.print_exc() return None - def insertListBox(self, sName, iControlKey, xActionListener, xItemListener, sProperties, sValues): - xListBoxModel = self.insertControlModel("com.sun.star.awt.UnoControlListBoxModel", sName, sProperties, sValues) + def insertListBox( + self, sName, iControlKey, xActionListener, + xItemListener, sProperties, sValues): + xListBoxModel = self.insertControlModel( + "com.sun.star.awt.UnoControlListBoxModel", + sName, sProperties, sValues) xListBoxModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) xListBox = self.xUnoDialog.getControl(sName) if xItemListener != None: xListBox.addItemListener(ItemListenerProcAdapter(xItemListener)) if xActionListener != None: - xListBox.addActionListener(ActionListenerProcAdapter(xActionListener)) + xListBox.addActionListener( + ActionListenerProcAdapter(xActionListener)) ControlKey = iControlKey self.ControlList.put(sName, ControlKey) return xListBox - def insertComboBox(self, sName, iControlKey, xActionListener, xTextListener, xItemListener, sProperties, sValues): - xComboBoxModel = self.insertControlModel("com.sun.star.awt.UnoControlComboBoxModel", sName, sProperties, sValues) + def insertComboBox( + self, sName, iControlKey, xActionListener, xTextListener, + xItemListener, sProperties, sValues): + xComboBoxModel = self.insertControlModel( + "com.sun.star.awt.UnoControlComboBoxModel", + sName, sProperties, sValues) xComboBoxModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) xComboBox = self.xUnoDialog.getControl(sName) if xItemListener != None: @@ -253,28 +297,35 @@ class UnoDialog(object): xComboBox.addTextListener(TextListenerProcAdapter(xTextListener)) if xActionListener != None: - xComboBox.addActionListener(ActionListenerProcAdapter(xActionListener)) + xComboBox.addActionListener( + ActionListenerProcAdapter(xActionListener)) ControlKey = iControlKey self.ControlList.put(sName, ControlKey) return xComboBox - def insertRadioButton(self, sName, iControlKey, xItemListener, sProperties, sValues): + def insertRadioButton( + self, sName, iControlKey, xItemListener, sProperties, sValues): try: - xRadioButton = insertRadioButton(sName, iControlKey, sProperties, sValues) + xRadioButton = insertRadioButton( + sName, iControlKey, sProperties, sValues) if xItemListener != None: - xRadioButton.addItemListener(ItemListenerProcAdapter(xItemListener)) + xRadioButton.addItemListener( + ItemListenerProcAdapter(xItemListener)) return xRadioButton except com.sun.star.uno.Exception, exception: traceback.print_exc() return None - def insertRadioButton(self, sName, iControlKey, xActionListener, sProperties, sValues): + def insertRadioButton( + self, sName, iControlKey, xActionListener, sProperties, sValues): try: - xButton = insertRadioButton(sName, iControlKey, sProperties, sValues) + xButton = insertRadioButton( + sName, iControlKey, sProperties, sValues) if xActionListener != None: - xButton.addActionListener(ActionListenerProcAdapter(xActionListener)) + xButton.addActionListener( + ActionListenerProcAdapter(xActionListener)) return xButton except com.sun.star.uno.Exception, exception: @@ -289,46 +340,61 @@ class UnoDialog(object): def insertRadioButton(self, sName, sProperties, sValues): try: - oRadioButtonModel = self.insertControlModel("com.sun.star.awt.UnoControlRadioButtonModel", sName, sProperties, sValues) - oRadioButtonModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName) + oRadioButtonModel = self.insertControlModel( + "com.sun.star.awt.UnoControlRadioButtonModel", + sName, sProperties, sValues) + oRadioButtonModel.setPropertyValue( + PropertyNames.PROPERTY_NAME, sName) xRadioButton = self.xUnoDialog.getControl(sName) return xRadioButton except com.sun.star.uno.Exception, exception: traceback.print_exc() return None ''' - The problem with setting the visibility of controls is that changing the current step - of a dialog will automatically make all controls visible. The PropertyNames.PROPERTY_STEP property always wins against - the property "visible". Therfor a control meant to be invisible is placed on a step far far away. + The problem with setting the visibility of controls + is that changing the current step of a dialog will automatically + make all controls visible. The PropertyNames.PROPERTY_STEP property + always wins against the property "visible". Therfor a control meant + to be invisible is placed on a step far far away. @param the name of the control @param iStep change the step if you want to make the control invisible ''' def setControlVisible(self, controlname, iStep): try: - iCurStep = int(getControlProperty(controlname, PropertyNames.PROPERTY_STEP)) - setControlProperty(controlname, PropertyNames.PROPERTY_STEP, iStep) + iCurStep = int(getControlProperty( + controlname, PropertyNames.PROPERTY_STEP)) + setControlProperty( + controlname, PropertyNames.PROPERTY_STEP, iStep) except com.sun.star.uno.Exception, exception: traceback.print_exc() ''' - The problem with setting the visibility of controls is that changing the current step - of a dialog will automatically make all controls visible. The PropertyNames.PROPERTY_STEP property always wins against - the property "visible". Therfor a control meant to be invisible is placed on a step far far away. - Afterwards the step property of the dialog has to be set with "repaintDialogStep". As the performance - of that method is very bad it should be used only once for all controls + The problem with setting the visibility of controls is that + changing the current step of a dialog will automatically make + all controls visible. The PropertyNames.PROPERTY_STEP property + always wins against the property "visible". + Therfor a control meant to be invisible is placed on a step far far away. + Afterwards the step property of the dialog has to be set with + "repaintDialogStep". As the performance of that method is very bad it + should be used only once for all controls @param controlname the name of the control @param bIsVisible sets the control visible or invisible ''' def setControlVisible(self, controlname, bIsVisible): try: - iCurControlStep = int(getControlProperty(controlname, PropertyNames.PROPERTY_STEP)) - iCurDialogStep = int(Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP)) + iCurControlStep = int(getControlProperty( + controlname, PropertyNames.PROPERTY_STEP)) + iCurDialogStep = int(Helper.getUnoPropertyValue( + self.xDialogModel, PropertyNames.PROPERTY_STEP)) if bIsVisible: - setControlProperty(controlname, PropertyNames.PROPERTY_STEP, iCurDialogStep) + setControlProperty( + controlname, PropertyNames.PROPERTY_STEP, iCurDialogStep) else: - setControlProperty(controlname, PropertyNames.PROPERTY_STEP, UIConsts.INVISIBLESTEP) + setControlProperty( + controlname, PropertyNames.PROPERTY_STEP, + UIConsts.INVISIBLESTEP) except com.sun.star.uno.Exception, exception: traceback.print_exc() @@ -338,9 +404,12 @@ class UnoDialog(object): def repaintDialogStep(self): try: - ncurstep = int(Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP)) - Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP, 99) - Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP, ncurstep) + ncurstep = int(Helper.getUnoPropertyValue( + self.xDialogModel, PropertyNames.PROPERTY_STEP)) + Helper.setUnoPropertyValue( + self.xDialogModel, PropertyNames.PROPERTY_STEP, 99) + Helper.setUnoPropertyValue( + self.xDialogModel, PropertyNames.PROPERTY_STEP, ncurstep) except com.sun.star.uno.Exception, exception: traceback.print_exc() @@ -363,7 +432,7 @@ class UnoDialog(object): FirstList = [sFirstEntry] ResultList = [MainList.length + 1] System.arraycopy(FirstList, 0, ResultList, 0, 1) - System.arraycopy(MainList, 0, ResultList, 1, MainList.length) + System.arraycopy(MainList, 0, ResultList, 1, len(MainList)) return ResultList except java.lang.Exception, jexception: traceback.print_exc() @@ -387,7 +456,8 @@ class UnoDialog(object): Helper.setUnoPropertyValue(oListBoxModel, "StringItemList", sList) def calculateDialogPosition(self, FramePosSize): - # Todo: check if it would be useful or possible to create a dialog peer, that can be used for the messageboxes to + # Todo:check if it would be useful or possible to create a dialog peer + # that can be used for the messageboxes to # maintain modality when they pop up. CurPosSize = self.xUnoDialog.getPosSize() WindowHeight = FramePosSize.Height @@ -396,7 +466,8 @@ class UnoDialog(object): DialogHeight = CurPosSize.Height iXPos = ((WindowWidth / 2) - (DialogWidth / 2)) iYPos = ((WindowHeight / 2) - (DialogHeight / 2)) - self.xUnoDialog.setPosSize(iXPos, iYPos, DialogWidth, DialogHeight, POS) + self.xUnoDialog.setPosSize( + iXPos, iYPos, DialogWidth, DialogHeight, POS) ''' @param FramePosSize @@ -406,7 +477,8 @@ class UnoDialog(object): def executeDialog(self, FramePosSize): if self.xUnoDialog.getPeer() == None: - raise AttributeError("Please create a peer, using your own frame"); + raise AttributeError( + "Please create a peer, using your own frame"); self.calculateDialogPosition(FramePosSize) @@ -503,7 +575,8 @@ class UnoDialog(object): @classmethod def setEnabled(self, control, enabled): - Helper.setUnoPropertyValue(getModel(control), PropertyNames.PROPERTY_ENABLED, enabled) + Helper.setUnoPropertyValue( + getModel(control), PropertyNames.PROPERTY_ENABLED, enabled) ''' @author bc93774 @@ -513,42 +586,60 @@ class UnoDialog(object): @classmethod def getControlModelType(self, oControlModel): - if oControlModel.supportsService("com.sun.star.awt.UnoControlFixedTextModel"): + if oControlModel.supportsService( + "com.sun.star.awt.UnoControlFixedTextModel"): return UIConsts.CONTROLTYPE.FIXEDTEXT - elif oControlModel.supportsService("com.sun.star.awt.UnoControlButtonModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlButtonModel"): return UIConsts.CONTROLTYPE.BUTTON - elif oControlModel.supportsService("com.sun.star.awt.UnoControlCurrencyFieldModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlCurrencyFieldModel"): return UIConsts.CONTROLTYPE.CURRENCYFIELD - elif oControlModel.supportsService("com.sun.star.awt.UnoControlDateFieldModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlDateFieldModel"): return UIConsts.CONTROLTYPE.DATEFIELD - elif oControlModel.supportsService("com.sun.star.awt.UnoControlFixedLineModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlFixedLineModel"): return UIConsts.CONTROLTYPE.FIXEDLINE - elif oControlModel.supportsService("com.sun.star.awt.UnoControlFormattedFieldModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlFormattedFieldModel"): return UIConsts.CONTROLTYPE.FORMATTEDFIELD - elif oControlModel.supportsService("com.sun.star.awt.UnoControlRoadmapModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlRoadmapModel"): return UIConsts.CONTROLTYPE.ROADMAP - elif oControlModel.supportsService("com.sun.star.awt.UnoControlNumericFieldModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlNumericFieldModel"): return UIConsts.CONTROLTYPE.NUMERICFIELD - elif oControlModel.supportsService("com.sun.star.awt.UnoControlPatternFieldModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlPatternFieldModel"): return UIConsts.CONTROLTYPE.PATTERNFIELD - elif oControlModel.supportsService("com.sun.star.awt.UnoControlHyperTextModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlHyperTextModel"): return UIConsts.CONTROLTYPE.HYPERTEXT - elif oControlModel.supportsService("com.sun.star.awt.UnoControlProgressBarModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlProgressBarModel"): return UIConsts.CONTROLTYPE.PROGRESSBAR - elif oControlModel.supportsService("com.sun.star.awt.UnoControlTimeFieldModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlTimeFieldModel"): return UIConsts.CONTROLTYPE.TIMEFIELD - elif oControlModel.supportsService("com.sun.star.awt.UnoControlImageControlModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlImageControlModel"): return UIConsts.CONTROLTYPE.IMAGECONTROL - elif oControlModel.supportsService("com.sun.star.awt.UnoControlRadioButtonModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlRadioButtonModel"): return UIConsts.CONTROLTYPE.RADIOBUTTON - elif oControlModel.supportsService("com.sun.star.awt.UnoControlCheckBoxModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlCheckBoxModel"): return UIConsts.CONTROLTYPE.CHECKBOX - elif oControlModel.supportsService("com.sun.star.awt.UnoControlEditModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlEditModel"): return UIConsts.CONTROLTYPE.EDITCONTROL - elif oControlModel.supportsService("com.sun.star.awt.UnoControlComboBoxModel"): + elif oControlModel.supportsService( + "com.sun.star.awt.UnoControlComboBoxModel"): return UIConsts.CONTROLTYPE.COMBOBOX else: - if (oControlModel.supportsService("com.sun.star.awt.UnoControlListBoxModel")): + if (oControlModel.supportsService( + "com.sun.star.awt.UnoControlListBoxModel")): return UIConsts.CONTROLTYPE.LISTBOX else: return UIConsts.CONTROLTYPE.UNKNOWN @@ -581,7 +672,7 @@ class UnoDialog(object): ''' def addResourceHandler(self, _Unit, _Module): - self.m_oResource = Resource.Resource_unknown(self.xMSF, _Unit, _Module) + self.m_oResource = Resource(self.xMSF, _Unit, _Module) def setInitialTabindex(self, _istep): return (short)(_istep * 100) @@ -590,12 +681,14 @@ class UnoDialog(object): if self.xContainerWindow != None: if self.BisHighContrastModeActivated == None: try: - nUIColor = int(self.xContainerWindow.getProperty("DisplayBackgroundColor")) + nUIColor = int(self.xContainerWindow.getProperty( + "DisplayBackgroundColor")) except IllegalArgumentException, e: traceback.print_exc() return False - #TODO: The following methods could be wrapped in an own class implementation + #TODO: The following methods could be wrapped + # in an own class implementation nRed = self.getRedColorShare(nUIColor) nGreen = self.getGreenColorShare(nUIColor) nBlue = self.getBlueColorShare(nUIColor) diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.py b/wizards/com/sun/star/wizards/ui/UnoDialog2.py index ff1a2510a7f8..cc9ec652f223 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.py @@ -6,10 +6,11 @@ from UIConsts import * ''' This class contains convenience methods for inserting components to a dialog. It was created for use with the automatic conversion of Basic XML Dialog -description files to a Java class which builds the same dialog through the UNO API.
+description files to a Java class which builds +the same dialog through the UNO API.
It uses an Event-Listener method, which calls a method through reflection wenn an event on a component is trigered. -see the classes AbstractListener, CommonListener, MethodInvocation for details. +see the classes AbstractListener, CommonListener, MethodInvocation for details ''' class UnoDialog2(UnoDialog): @@ -22,35 +23,51 @@ class UnoDialog2(UnoDialog): def __init__(self, xmsf): super(UnoDialog2,self).__init__(xmsf,(), ()) - def insertButton(self, sName, actionPerformed, sPropNames, oPropValues, listener): - xButton = self.insertControlModel2("com.sun.star.awt.UnoControlButtonModel", sName, sPropNames, oPropValues) + def insertButton( + self, sName, actionPerformed, sPropNames, oPropValues, listener): + xButton = self.insertControlModel2( + "com.sun.star.awt.UnoControlButtonModel", + sName, sPropNames, oPropValues) if actionPerformed is not None: actionPerformed = getattr(listener, actionPerformed) - xButton.addActionListener(ActionListenerProcAdapter(actionPerformed)) + xButton.addActionListener( + ActionListenerProcAdapter(actionPerformed)) return xButton - def insertImageButton(self, sName, actionPerformed, sPropNames, oPropValues, listener): - xButton = self.insertControlModel2("com.sun.star.awt.UnoControlButtonModel", sName, sPropNames, oPropValues) + def insertImageButton( + self, sName, actionPerformed, sPropNames, oPropValues, listener): + xButton = self.insertControlModel2( + "com.sun.star.awt.UnoControlButtonModel", + sName, sPropNames, oPropValues) if actionPerformed is not None: actionPerformed = getattr(listener, actionPerformed) - xButton.addActionListener(ActionListenerProcAdapter(actionPerformed)) + xButton.addActionListener( + ActionListenerProcAdapter(actionPerformed)) return xButton - def insertCheckBox(self, sName, itemChanged, sPropNames, oPropValues, listener): - xCheckBox = self.insertControlModel2("com.sun.star.awt.UnoControlCheckBoxModel", sName, sPropNames, oPropValues) + def insertCheckBox( + self, sName, itemChanged, sPropNames, oPropValues, listener): + xCheckBox = self.insertControlModel2( + "com.sun.star.awt.UnoControlCheckBoxModel", + sName, sPropNames, oPropValues) if itemChanged is not None: itemChanged = getattr(listener, itemChanged) xCheckBox.addItemListener(ItemListenerProcAdapter(itemChanged)) return xCheckBox - def insertComboBox(self, sName, actionPerformed, itemChanged, textChanged, sPropNames, oPropValues, listener): - xComboBox = self.insertControlModel2("com.sun.star.awt.UnoControlComboBoxModel", sName, sPropNames, oPropValues) + def insertComboBox( + self, sName, actionPerformed, itemChanged, + textChanged, sPropNames, oPropValues, listener): + xComboBox = self.insertControlModel2( + "com.sun.star.awt.UnoControlComboBoxModel", + sName, sPropNames, oPropValues) if actionPerformed is not None: actionPerformed = getattr(listener, actionPerformed) - xComboBox.addActionListener(ActionListenerProcAdapter(actionPerformed)) + xComboBox.addActionListener( + ActionListenerProcAdapter(actionPerformed)) if itemChanged is not None: itemChanged = getattr(listener, itemChanged) @@ -62,8 +79,11 @@ class UnoDialog2(UnoDialog): return xComboBox - def insertListBox(self, sName, actionPerformed, itemChanged, sPropNames, oPropValues, listener): - xListBox = self.insertControlModel2("com.sun.star.awt.UnoControlListBoxModel", + def insertListBox( + self, sName, actionPerformed, itemChanged, + sPropNames, oPropValues, listener): + xListBox = self.insertControlModel2( + "com.sun.star.awt.UnoControlListBoxModel", sName, sPropNames, oPropValues) if actionPerformed is not None: @@ -76,87 +96,150 @@ class UnoDialog2(UnoDialog): return xListBox - def insertRadioButton(self, sName, itemChanged, sPropNames, oPropValues, listener): - xRadioButton = self.insertControlModel2("com.sun.star.awt.UnoControlRadioButtonModel", + def insertRadioButton( + self, sName, itemChanged, sPropNames, oPropValues, listener): + xRadioButton = self.insertControlModel2( + "com.sun.star.awt.UnoControlRadioButtonModel", sName, sPropNames, oPropValues) if itemChanged is not None: itemChanged = getattr(listener, itemChanged) - xRadioButton.addItemListener(ItemListenerProcAdapter(itemChanged)) + xRadioButton.addItemListener( + ItemListenerProcAdapter(itemChanged)) return xRadioButton def insertTitledBox(self, sName, sPropNames, oPropValues): - oTitledBox = self.insertControlModel2("com.sun.star.awt.UnoControlGroupBoxModel", sName, sPropNames, oPropValues) + oTitledBox = self.insertControlModel2( + "com.sun.star.awt.UnoControlGroupBoxModel", + sName, sPropNames, oPropValues) return oTitledBox - def insertTextField(self, sName, sTextChanged, sPropNames, oPropValues, listener): - return self.insertEditField(sName, sTextChanged, - "com.sun.star.awt.UnoControlEditModel", sPropNames, oPropValues, listener) + def insertTextField( + self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField( + sName, sTextChanged, "com.sun.star.awt.UnoControlEditModel", + sPropNames, oPropValues, listener) def insertImage(self, sName, sPropNames, oPropValues): - return self.insertControlModel2("com.sun.star.awt.UnoControlImageControlModel", sName, sPropNames, oPropValues) + return self.insertControlModel2( + "com.sun.star.awt.UnoControlImageControlModel", + sName, sPropNames, oPropValues) def insertInfoImage(self, _posx, _posy, _iStep): - xImgControl = self.insertImage(Desktop.getUniqueName(self.xDialogModel, "imgHint"),("Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH),(uno.Any("short",0), 10, UIConsts.INFOIMAGEURL, _posx, _posy, False, _iStep, 10)) - self.getPeerConfiguration().setImageUrl(self.getModel(xImgControl), UIConsts.INFOIMAGEURL, UIConsts.INFOIMAGEURL_HC) + xImgControl = self.insertImage( + Desktop.getUniqueName(self.xDialogModel, "imgHint"), + ("Border", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_IMAGEURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_WIDTH), + (uno.Any("short",0), 10, + UIConsts.INFOIMAGEURL, _posx, _posy, False, _iStep, 10)) + self.getPeerConfiguration().setImageUrl( + self.getModel(xImgControl), + UIConsts.INFOIMAGEURL, + UIConsts.INFOIMAGEURL_HC) return xImgControl ''' - This method is used for creating Edit, Currency, Date, Formatted, Pattern, File - and Time edit components. + This method is used for creating Edit, Currency, Date, Formatted, + Pattern, File and Time edit components. ''' - def insertEditField(self, sName, sTextChanged, sModelClass, sPropNames, oPropValues, listener): - xField = self.insertControlModel2(sModelClass, sName, sPropNames, oPropValues) + def insertEditField( + self, sName, sTextChanged, sModelClass, + sPropNames, oPropValues, listener): + xField = self.insertControlModel2(sModelClass, + sName, sPropNames, oPropValues) if sTextChanged is not None: sTextChanged = getattr(listener, sTextChanged) xField.addTextListener(TextListenerProcAdapter(sTextChanged)) return xField - def insertFileControl(self, sName, sTextChanged, sPropNames, oPropValues, listener): - return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlFileControlModel", sPropNames, oPropValues, listener) - - def insertCurrencyField(self, sName, sTextChanged, sPropNames, oPropValues, listener): - return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlCurrencyFieldModel", sPropNames, oPropValues, listener) - - def insertDateField(self, sName, sTextChanged, sPropNames, oPropValues, listener): - return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlDateFieldModel", sPropNames, oPropValues, listener) - - def insertNumericField(self, sName, sTextChanged, sPropNames, oPropValues, listener): - return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlNumericFieldModel", sPropNames, oPropValues, listener) - - def insertTimeField(self, sName, sTextChanged, sPropNames, oPropValues, listener): - return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlTimeFieldModel", sPropNames, oPropValues, listener) - - def insertPatternField(self, sName, sTextChanged, oPropValues, listener): - return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlPatternFieldModel", sPropNames, oPropValues, listener) + def insertFileControl( + self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField(sName, sTextChanged, + "com.sun.star.awt.UnoControlFileControlModel", + sPropNames, oPropValues, listener) + + def insertCurrencyField( + self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField( + sName, sTextChanged, + "com.sun.star.awt.UnoControlCurrencyFieldModel", + sPropNames, oPropValues, listener) + + def insertDateField( + self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField( + sName, sTextChanged, + "com.sun.star.awt.UnoControlDateFieldModel", + sPropNames, oPropValues, listener) + + def insertNumericField( + self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField( + sName, sTextChanged, + "com.sun.star.awt.UnoControlNumericFieldModel", + sPropNames, oPropValues, listener) + + def insertTimeField( + self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField( + sName, sTextChanged, + "com.sun.star.awt.UnoControlTimeFieldModel", + sPropNames, oPropValues, listener) + + def insertPatternField( + self, sName, sTextChanged, oPropValues, listener): + return self.insertEditField(sName, sTextChanged, + "com.sun.star.awt.UnoControlPatternFieldModel", + sPropNames, oPropValues, listener) - def insertFormattedField(self, sName, sTextChanged, sPropNames, oPropValues, listener): - return self.insertEditField(sName, sTextChanged, "com.sun.star.awt.UnoControlFormattedFieldModel", sPropNames, oPropValues, listener) + def insertFormattedField( + self, sName, sTextChanged, sPropNames, oPropValues, listener): + return self.insertEditField( + sName, sTextChanged, + "com.sun.star.awt.UnoControlFormattedFieldModel", + sPropNames, oPropValues, listener) def insertFixedLine(self, sName, sPropNames, oPropValues): - oLine = self.insertControlModel2("com.sun.star.awt.UnoControlFixedLineModel", sName, sPropNames, oPropValues) + oLine = self.insertControlModel2( + "com.sun.star.awt.UnoControlFixedLineModel", + sName, sPropNames, oPropValues) return oLine def insertScrollBar(self, sName, sPropNames, oPropValues): - oScrollBar = self.insertControlModel2("com.sun.star.awt.UnoControlScrollBarModel", sName, sPropNames, oPropValues) + oScrollBar = self.insertControlModel2( + "com.sun.star.awt.UnoControlScrollBarModel", + sName, sPropNames, oPropValues) return oScrollBar def insertProgressBar(self, sName, sPropNames, oPropValues): - oProgressBar = self.insertControlModel2("com.sun.star.awt.UnoControlProgressBarModel", sName, sPropNames, oPropValues) + oProgressBar = self.insertControlModel2( + "com.sun.star.awt.UnoControlProgressBarModel", + sName, sPropNames, oPropValues) return oProgressBar def insertGroupBox(self, sName, sPropNames, oPropValues): - oGroupBox = self.insertControlModel2("com.sun.star.awt.UnoControlGroupBoxModel", sName, sPropNames, oPropValues) + oGroupBox = self.insertControlModel2( + "com.sun.star.awt.UnoControlGroupBoxModel", + sName, sPropNames, oPropValues) return oGroupBox - def insertControlModel2(self, serviceName, componentName, sPropNames, oPropValues): + def insertControlModel2( + self, serviceName, componentName, sPropNames, oPropValues): try: - xControlModel = self.insertControlModel(serviceName, componentName, (), ()) - Helper.setUnoPropertyValues(xControlModel, sPropNames, oPropValues) - Helper.setUnoPropertyValue(xControlModel, PropertyNames.PROPERTY_NAME, componentName) + xControlModel = self.insertControlModel( + serviceName, componentName, (), ()) + Helper.setUnoPropertyValues( + xControlModel, sPropNames, oPropValues) + Helper.setUnoPropertyValue(xControlModel, + PropertyNames.PROPERTY_NAME, componentName) except Exception, ex: traceback.print_exc() @@ -171,9 +254,11 @@ class UnoDialog2(UnoDialog): i += 1 def getControlModel(self, unoControl): - obj = unoControl.getModel() + obj = unoControl.Model return obj def showMessageBox(self, windowServiceName, windowAttribute, MessageText): - return SystemDialog.showMessageBox(xMSF, self.xControl.getPeer(), windowServiceName, windowAttribute, MessageText) + return SystemDialog.showMessageBox( + xMSF, self.xControl.Peer, + windowServiceName, windowAttribute, MessageText) diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index 6cdd7363e9f3..23c099efdeb1 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -5,7 +5,7 @@ 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 -import common.HelpIds as HelpIds +from common.HelpIds import * from com.sun.star.awt.PushButtonType import HELP, STANDARD from event.MethodInvocation import * from event.EventNames import EVENT_ITEM_CHANGED @@ -42,7 +42,8 @@ class WizardDialog(UnoDialog2): self.__nMaxStep = 1 self.__bTerminateListenermustberemoved = True self.__oWizardResource = Resource(xMSF, "dbw") - self.sMsgEndAutopilot = self.__oWizardResource.getResText(UIConsts.RID_DB_COMMON + 33) + self.sMsgEndAutopilot = self.__oWizardResource.getResText( + UIConsts.RID_DB_COMMON + 33) self.oRoadmap = None #self.vetos = VetoableChangeSupport.VetoableChangeSupport_unknown(this) @@ -76,16 +77,15 @@ class WizardDialog(UnoDialog2): def getNewStep(self): return self.__nNewStep - #@see java.beans.VetoableChangeListener#vetoableChange(java.beans.PropertyChangeEvent) - - def vetoableChange(self, arg0): self.__nNewStep = self.__nOldStep def itemStateChanged(self, itemEvent): try: self.__nNewStep = itemEvent.ItemId - self.__nOldStep = int(Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP)) + self.__nOldStep = int(Helper.getUnoPropertyValue( + self.xDialogModel, + PropertyNames.PROPERTY_STEP)) if self.__nNewStep != self.__nOldStep: switchToStep() @@ -109,48 +109,70 @@ class WizardDialog(UnoDialog2): if self.oRoadmap != None: nCurItemID = self.getCurrentRoadmapItemID() if nCurItemID != ID: - Helper.setUnoPropertyValue(self.oRoadmap, "CurrentItemID", uno.Any("short",ID)) + Helper.setUnoPropertyValue(self.oRoadmap, "CurrentItemID", + uno.Any("short",ID)) def getCurrentRoadmapItemID(self): try: - return int(Helper.getUnoPropertyValue(self.oRoadmap, "CurrentItemID")) + return int(Helper.getUnoPropertyValue( + self.oRoadmap, "CurrentItemID")) except UnoException, exception: traceback.print_exc() return -1 def addRoadmap(self): try: - iDialogHeight = Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_HEIGHT) + iDialogHeight = Helper.getUnoPropertyValue( + self.xDialogModel, + PropertyNames.PROPERTY_HEIGHT) # the roadmap control has got no real TabIndex ever - # that is not correct, but changing this would need time, so it is used - # without TabIndex as before - self.oRoadmap = self.insertControlModel("com.sun.star.awt.UnoControlRoadmapModel", "rdmNavi", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tabstop", PropertyNames.PROPERTY_WIDTH),((iDialogHeight - 26), 0, 0, 0, uno.Any("short",0), True, uno.Any("short",85))) - self.oRoadmap.setPropertyValue(PropertyNames.PROPERTY_NAME, "rdmNavi") + # that is not correct, but changing this would need time, + # so it is used without TabIndex as before + self.oRoadmap = self.insertControlModel( + "com.sun.star.awt.UnoControlRoadmapModel", + "rdmNavi", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, "Tabstop", + PropertyNames.PROPERTY_WIDTH), + ((iDialogHeight - 26), 0, 0, 0, + uno.Any("short",0), True, uno.Any("short",85))) + self.oRoadmap.setPropertyValue( + PropertyNames.PROPERTY_NAME, "rdmNavi") mi = MethodInvocation("itemStateChanged", self) self.xRoadmapControl = self.xUnoDialog.getControl("rdmNavi") - self.xRoadmapControl.addItemListener(ItemListenerProcAdapter(None)) + self.xRoadmapControl.addItemListener( + ItemListenerProcAdapter(None)) - Helper.setUnoPropertyValue(self.oRoadmap, "Text", self.__oWizardResource.getResText(UIConsts.RID_COMMON + 16)) + Helper.setUnoPropertyValue( + self.oRoadmap, "Text", + self.__oWizardResource.getResText(UIConsts.RID_COMMON + 16)) except NoSuchMethodException, ex: Resource.showCommonResourceError(xMSF) except UnoException, jexception: traceback.print_exc() def setRMItemLabels(self, _oResource, StartResID): - self.sRMItemLabels = _oResource.getResArray(StartResID, self.__nMaxStep) + self.sRMItemLabels = _oResource.getResArray( + StartResID, self.__nMaxStep) def getRMItemLabels(self): return self.sRMItemLabels def insertRoadmapItem(self, _Index, _bEnabled, _LabelID, _CurItemID): - return insertRoadmapItem(_Index, _bEnabled, self.sRMItemLabels(_LabelID), _CurItemID) + return insertRoadmapItem( + _Index, _bEnabled, self.sRMItemLabels(_LabelID), _CurItemID) def insertRoadmapItem(self, Index, _bEnabled, _sLabel, _CurItemID): try: oRoadmapItem = self.oRoadmap.createInstance() - Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_LABEL, _sLabel) - Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_ENABLED, _bEnabled) + Helper.setUnoPropertyValue(oRoadmapItem, + PropertyNames.PROPERTY_LABEL, _sLabel) + Helper.setUnoPropertyValue(oRoadmapItem, + PropertyNames.PROPERTY_ENABLED, _bEnabled) Helper.setUnoPropertyValue(oRoadmapItem, "ID", _CurItemID) self.oRoadmap.insertByIndex(Index, oRoadmapItem) NextIndex = Index + 1 @@ -185,11 +207,15 @@ class WizardDialog(UnoDialog2): self.leaveStep(self.__nOldStep, self.__nNewStep) if self.__nNewStep != self.__nOldStep: if self.__nNewStep == self.__nMaxStep: - self.setControlProperty("btnWizardNext", "DefaultButton", False) - self.setControlProperty("btnWizardFinish", "DefaultButton", True) + self.setControlProperty( + "btnWizardNext", "DefaultButton", False) + self.setControlProperty( + "btnWizardFinish", "DefaultButton", True) else: - self.setControlProperty("btnWizardNext", "DefaultButton", True) - self.setControlProperty("btnWizardFinish", "DefaultButton", False) + self.setControlProperty( + "btnWizardNext", "DefaultButton", True) + self.setControlProperty( + "btnWizardFinish", "DefaultButton", False) self.changeToStep(self.__nNewStep) self.enterStep(self.__nOldStep, self.__nNewStep) @@ -206,7 +232,8 @@ class WizardDialog(UnoDialog2): pass def changeToStep(self, nNewStep): - Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP, nNewStep) + Helper.setUnoPropertyValue(self.xDialogModel, + PropertyNames.PROPERTY_STEP, nNewStep) self.setCurrentRoadmapItemID(nNewStep) self.enableNextButton(self.getNextAvailableStep() > 0) self.enableBackButton(nNewStep != 1) @@ -223,30 +250,99 @@ class WizardDialog(UnoDialog2): iButtonWidth = self.__iButtonWidth iButtonHeight = 14 iCurStep = 0 - iDialogHeight = Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_HEIGHT) - iDialogWidth = Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_WIDTH) + iDialogHeight = Helper.getUnoPropertyValue(self.xDialogModel, + PropertyNames.PROPERTY_HEIGHT) + iDialogWidth = Helper.getUnoPropertyValue(self.xDialogModel, + PropertyNames.PROPERTY_WIDTH) iHelpPosX = 8 iBtnPosY = iDialogHeight - iButtonHeight - 6 iCancelPosX = iDialogWidth - self.__iButtonWidth - 6 iFinishPosX = iCancelPosX - 6 - self.__iButtonWidth iNextPosX = iFinishPosX - 6 - self.__iButtonWidth iBackPosX = iNextPosX - 3 - self.__iButtonWidth - self.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lnNaviSep", (PropertyNames.PROPERTY_HEIGHT, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH), (1, 0, 0, iDialogHeight - 26, iCurStep, iDialogWidth)) - self.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lnRoadSep",(PropertyNames.PROPERTY_HEIGHT, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH),(iBtnPosY - 6, 1, 85, 0, iCurStep, 1)) - propNames = (PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH) - Helper.setUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_HELPURL, HelpIds.array2[self.__hid]) - self.insertButton("btnWizardHelp", WizardDialog.__HELP_ACTION_PERFORMED,(PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH),(True, iButtonHeight, self.__oWizardResource.getResText(UIConsts.RID_COMMON + 15), iHelpPosX, iBtnPosY, uno.Any("short",HELP), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth), self) - self.insertButton("btnWizardBack", WizardDialog.__BACK_ACTION_PERFORMED, propNames,(False, iButtonHeight, HelpIds.array2[self.__hid + 2], self.__oWizardResource.getResText(UIConsts.RID_COMMON + 13), iBackPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth), self) - self.insertButton("btnWizardNext", WizardDialog.__NEXT_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.array2[self.__hid + 3], self.__oWizardResource.getResText(UIConsts.RID_COMMON + 14), iNextPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth), self) - self.insertButton("btnWizardFinish", WizardDialog.__FINISH_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.array2[self.__hid + 4], self.__oWizardResource.getResText(UIConsts.RID_COMMON + 12), iFinishPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth), self) - self.insertButton("btnWizardCancel", WizardDialog.__CANCEL_ACTION_PERFORMED, propNames,(True, iButtonHeight, HelpIds.array2[self.__hid + 5], self.__oWizardResource.getResText(UIConsts.RID_COMMON + 11), iCancelPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, uno.Any("short",(curtabindex + 1)), iButtonWidth), self) + self.insertControlModel( + "com.sun.star.awt.UnoControlFixedLineModel", + "lnNaviSep", + (PropertyNames.PROPERTY_HEIGHT, "Orientation", + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_WIDTH), + (1, 0, 0, iDialogHeight - 26, iCurStep, iDialogWidth)) + self.insertControlModel( + "com.sun.star.awt.UnoControlFixedLineModel", + "lnRoadSep", + (PropertyNames.PROPERTY_HEIGHT, + "Orientation", + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_WIDTH), + (iBtnPosY - 6, 1, 85, 0, iCurStep, 1)) + propNames = (PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "PushButtonType", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH) + Helper.setUnoPropertyValue( + self.xDialogModel, PropertyNames.PROPERTY_HELPURL, + HelpIds.getHelpIdString(self.__hid)) + self.insertButton("btnWizardHelp", + WizardDialog.__HELP_ACTION_PERFORMED, + (PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "PushButtonType", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, iButtonHeight, + self.__oWizardResource.getResText(UIConsts.RID_COMMON + 15), + iHelpPosX, iBtnPosY, + uno.Any("short",HELP), iCurStep, + uno.Any("short",(curtabindex + 1)), iButtonWidth), self) + self.insertButton("btnWizardBack", + WizardDialog.__BACK_ACTION_PERFORMED, propNames, + (False, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 2), + self.__oWizardResource.getResText(UIConsts.RID_COMMON + 13), + iBackPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, + uno.Any("short",(curtabindex + 1)), iButtonWidth), self) + self.insertButton("btnWizardNext", + WizardDialog.__NEXT_ACTION_PERFORMED, propNames, + (True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 3), + self.__oWizardResource.getResText(UIConsts.RID_COMMON + 14), + iNextPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, + uno.Any("short",(curtabindex + 1)), iButtonWidth), self) + self.insertButton("btnWizardFinish", + WizardDialog.__FINISH_ACTION_PERFORMED, propNames, + (True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 4), + self.__oWizardResource.getResText(UIConsts.RID_COMMON + 12), + iFinishPosX, iBtnPosY, uno.Any("short",STANDARD), + iCurStep, + uno.Any("short",(curtabindex + 1)), + iButtonWidth), self) + self.insertButton("btnWizardCancel", + WizardDialog.__CANCEL_ACTION_PERFORMED, propNames, + (True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 5), + self.__oWizardResource.getResText(UIConsts.RID_COMMON + 11), + iCancelPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep, + uno.Any("short",(curtabindex + 1)), + iButtonWidth), self) self.setControlProperty("btnWizardNext", "DefaultButton", True) # add a window listener, to know # if the user used "escape" key to # close the dialog. windowHidden = MethodInvocation("windowHidden", self) self.xUnoDialog.addWindowListener(WindowListenerProcAdapter(None)) - dialogName = Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_NAME) + dialogName = Helper.getUnoPropertyValue(self.xDialogModel, + PropertyNames.PROPERTY_NAME) except Exception, exception: traceback.print_exc() @@ -261,24 +357,29 @@ class WizardDialog(UnoDialog2): if self.getNextAvailableStep() > 0: self.enableNextButton(bEnabled) - def enableNavigationButtons(self, _bEnableBack, _bEnableNext, _bEnableFinish): + def enableNavigationButtons( + self, _bEnableBack, _bEnableNext, _bEnableFinish): self.enableBackButton(_bEnableBack) self.enableNextButton(_bEnableNext) self.enableFinishButton(_bEnableFinish) def enableBackButton(self, enabled): - self.setControlProperty("btnWizardBack", PropertyNames.PROPERTY_ENABLED, enabled) + self.setControlProperty("btnWizardBack", + PropertyNames.PROPERTY_ENABLED, enabled) def enableNextButton(self, enabled): - self.setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, enabled) + self.setControlProperty("btnWizardNext", + PropertyNames.PROPERTY_ENABLED, enabled) def enableFinishButton(self, enabled): - self.setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, enabled) + self.setControlProperty("btnWizardFinish", + PropertyNames.PROPERTY_ENABLED, enabled) def setStepEnabled(self, _nStep, bEnabled): xRoadmapItem = getRoadmapItemByID(_nStep) if xRoadmapItem != None: - Helper.setUnoPropertyValue(xRoadmapItem, PropertyNames.PROPERTY_ENABLED, bEnabled) + Helper.setUnoPropertyValue(xRoadmapItem, + PropertyNames.PROPERTY_ENABLED, bEnabled) def enablefromStep(self, _iStep, _bDoEnable): if _iStep <= self.__nMaxStep: @@ -298,7 +399,8 @@ class WizardDialog(UnoDialog2): # Todo: In this case an exception should be thrown if (xRoadmapItem == None): return False - bIsEnabled = bool(Helper.getUnoPropertyValue(xRoadmapItem, PropertyNames.PROPERTY_ENABLED)) + bIsEnabled = bool(Helper.getUnoPropertyValue(xRoadmapItem, + PropertyNames.PROPERTY_ENABLED)) return bIsEnabled except UnoException, exception: traceback.print_exc() @@ -348,7 +450,8 @@ class WizardDialog(UnoDialog2): pass def finishWizard_1(self): - '''This function will call if the finish button is pressed on the UI''' + '''This function will call + if the finish button is pressed on the UI''' try: self.enableFinishButton(False) success = False @@ -368,7 +471,8 @@ class WizardDialog(UnoDialog2): def getCurrentStep(self): try: - return int(Helper.getUnoPropertyValue(self.xDialogModel, PropertyNames.PROPERTY_STEP)) + return int(Helper.getUnoPropertyValue(self.xDialogModel, + PropertyNames.PROPERTY_STEP)) except UnoException, exception: traceback.print_exc() return -1 @@ -388,7 +492,17 @@ class WizardDialog(UnoDialog2): oFontDesc.Weight = com.sun.star.awt.FontWeight.BOLD i = 0 while i < self.sRightPaneHeaders.length: - insertLabel("lblQueryTitle" + String.valueOf(i),("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH),(oFontDesc, 16, self.sRightPaneHeaders(i), True, 91, 8, i + 1, uno.Any("short",12), 212)) + insertLabel("lblQueryTitle" + String.valueOf(i),("FontDescriptor", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH),( + oFontDesc, 16, self.sRightPaneHeaders(i), + True, 91, 8, i + 1, uno.Any("short",12), 212)) i += 1 def cancelWizard(self): diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py b/wizards/com/sun/star/wizards/ui/event/CommonListener.py index b03bf3fbdfc1..24ff52172f7c 100644 --- a/wizards/com/sun/star/wizards/ui/event/CommonListener.py +++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.py @@ -43,7 +43,8 @@ import inspect # When actionPerformed is called, this will call an arbitrary # python procedure, passing it... # 1. the oActionEvent -# 2. any other parameters you specified to this object's constructor (as a tuple). +# 2. any other parameters you specified to this object's +# constructor (as a tuple). from com.sun.star.awt import XActionListener class ActionListenerProcAdapter( unohelper.Base, XActionListener ): def __init__( self, oProcToCall, tParams=() ): @@ -63,7 +64,8 @@ class ActionListenerProcAdapter( unohelper.Base, XActionListener ): # When itemStateChanged is called, this will call an arbitrary # python procedure, passing it... # 1. the oItemEvent -# 2. any other parameters you specified to this object's constructor (as a tuple). +# 2. any other parameters you specified to this object's +# constructor (as a tuple). from com.sun.star.awt import XItemListener class ItemListenerProcAdapter( unohelper.Base, XItemListener ): def __init__( self, oProcToCall, tParams=() ): @@ -82,7 +84,8 @@ class ItemListenerProcAdapter( unohelper.Base, XItemListener ): # When textChanged is called, this will call an arbitrary # python procedure, passing it... # 1. the oTextEvent -# 2. any other parameters you specified to this object's constructor (as a tuple). +# 2. any other parameters you specified to this object's +# constructor (as a tuple). from com.sun.star.awt import XTextListener class TextListenerProcAdapter( unohelper.Base, XTextListener ): def __init__( self, oProcToCall, tParams=() ): @@ -100,7 +103,8 @@ class TextListenerProcAdapter( unohelper.Base, XTextListener ): # When textChanged is called, this will call an arbitrary # python procedure, passing it... # 1. the oTextEvent -# 2. any other parameters you specified to this object's constructor (as a tuple). +# 2. any other parameters you specified to this object's +# constructor (as a tuple). from com.sun.star.awt import XWindowListener class WindowListenerProcAdapter( unohelper.Base, XWindowListener ): def __init__( self, oProcToCall, tParams=() ): diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.py b/wizards/com/sun/star/wizards/ui/event/DataAware.py index 36f421ecad7d..2e7c3e3232c8 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.py @@ -139,13 +139,16 @@ class DataAware(object): sets the given DataObject to each DataAware object in the given collection @param dataAwares a collection of DataAware objects. - @param dataObject new data object to set to the DataAware objects in the given collection. + @param dataObject new data object to set to the DataAware + objects in the given collection. @param updateUI if true, calls updateUI() on each DataAware object. ''' def setDataObject(self, dataObject, updateUI): - if dataObject != None and not (type(self._value) is not type(dataObject)): - raise ClassCastException ("can not cast new DataObject to original Class"); + if dataObject != None and not (type(self._value) is not + type(dataObject)): + raise ClassCastException ( + "can not cast new DataObject to original Class") self._dataObject = dataObject if updateUI: self.updateUI() @@ -155,7 +158,8 @@ class DataAware(object): sets the given DataObject to each DataAware object in the given collection @param dataAwares a collection of DataAware objects. - @param dataObject new data object to set to the DataAware objects in the given collection. + @param dataObject new data object to set to the DataAware objects + in the given collection. @param updateUI if true, calls updateUI() on each DataAware object. ''' @@ -218,13 +222,15 @@ class DataAware(object): ''' creates a PropertyValue for the property with the given name, of the given JavaBean object. - @param propertyName the property to access. Must be a Cup letter (e.g. PropertyNames.PROPERTY_NAME for getName() and setName("..."). ) - @param propertyOwner the object which "own" or "contains" the property. + @param propertyName the property to access. Must be a Cup letter + (e.g. PropertyNames.PROPERTY_NAME for getName() and setName("..."). ) + @param propertyOwner the object which "own" or "contains" the property ''' def __init__(self, propertyName, propertyOwner): self.getMethod = createGetMethod(propertyName, propertyOwner) - self.setMethod = createSetMethod(propertyName, propertyOwner, self.getMethod.getReturnType()) + self.setMethod = createSetMethod( + propertyName, propertyOwner, self.getMethod.getReturnType()) ''' called from the constructor, and creates a get method reflection object @@ -238,15 +244,19 @@ class DataAware(object): m = None try: #try to get a "get" method. - m = obj.getClass().getMethod("get" + propName, self.__class__.__EMPTY_ARRAY) + m = obj.getClass().getMethod( + "get" + propName, self.__class__.__EMPTY_ARRAY) except NoSuchMethodException, ex1: - raise IllegalArgumentException ("get" + propName + "() method does not exist on " + obj.getClass().getName()); + raise IllegalArgumentException ( + "get" + propName + "() method does not exist on " + \ + obj.Class.Name) return m def Get(self, target): try: - return self.getMethod.invoke(target, self.__class__.__EMPTY_ARRAY) + return self.getMethod.invoke( + target, self.__class__.__EMPTY_ARRAY) except IllegalAccessException, ex1: ex1.printStackTrace() except InvocationTargetException, ex2: @@ -271,7 +281,9 @@ class DataAware(object): try: m = obj.getClass().getMethod("set" + propName, [paramClass]) except NoSuchMethodException, ex1: - raise IllegalArgumentException ("set" + propName + "(" + self.getMethod.getReturnType().getName() + ") method does not exist on " + obj.getClass().getName()); + raise IllegalArgumentException ("set" + propName + "(" + \ + self.getMethod.getReturnType().getName() + \ + ") method does not exist on " + obj.Class.Name); return m @@ -284,5 +296,6 @@ class DataAware(object): ex2.printStackTrace() def isAssignable(self, type): - return self.getMethod.getDeclaringClass().isAssignableFrom(type) and self.setMethod.getDeclaringClass().isAssignableFrom(type) + return self.getMethod.getDeclaringClass().isAssignableFrom(type) \ + and self.setMethod.getDeclaringClass().isAssignableFrom(type) diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py index b23cce2eef01..80f400dedc58 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py +++ b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.py @@ -76,7 +76,9 @@ class DataAwareFields(object): elif self.convertTo.type == uno.Any("short",0).type: return uno.Any("short",b) else: - raise AttributeError("Cannot convert boolean value to given type (" + str(type(self.convertTo)) + ")."); + raise AttributeError( + "Cannot convert boolean value to given type (" + \ + str(type(self.convertTo)) + ").") except Exception, ex: traceback.print_exc() @@ -109,7 +111,9 @@ class DataAwareFields(object): elif self.convertTo.type == uno.Any("short",0).type: return uno.Any("[]short",(i,)) else: - raise AttributeError("Cannot convert int value to given type (" + str(type(self.convertTo)) + ")."); + raise AttributeError( + "Cannot convert int value to given type (" + \ + str(type(self.convertTo)) + ")."); except Exception, ex: traceback.print_exc() @@ -142,8 +146,9 @@ class DataAwareFields(object): else: return s else: - raise AttributeError("Cannot convert int value to given type (" \ - + str(type(self.convertTo)) + ")." ) + raise AttributeError( + "Cannot convert int value to given type (" + \ + str(type(self.convertTo)) + ")." ) except Exception, ex: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.py b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.py index 0a662d2f2075..2bdbcc6be8b7 100644 --- a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.py +++ b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.py @@ -25,7 +25,8 @@ class MethodInvocation(object): self.mObject = obj self.mWithParam = not (paramClass==None) - '''Returns the result of calling the method on the object, or null, if no result. ''' + '''Returns the result of calling the method on the object, or null, + if no result. ''' def invoke(self, param=None): if self.mWithParam: diff --git a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py index 1c33e4d0b9ed..95df5c7ef401 100644 --- a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py @@ -26,7 +26,7 @@ class RadioDataAware(DataAware): def getFromUI(self): for i in self.radioButtons: - if i.getState(): + if i.State: return i return -1 diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py index 5654eb7d54f7..2564b88f1c04 100644 --- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py @@ -96,7 +96,8 @@ class UnoDataAware(DataAware): return Helper.getUnoPropertyValue(self.unoModel, self.unoPropName) @classmethod - def __attachTextControl(self, data, prop, unoText, listener, unoProperty, field, value): + def __attachTextControl( + self, data, prop, unoText, listener, unoProperty, field, value): if field: aux = DataAwareFields.getFieldValueFor(data, prop, value) else: @@ -121,22 +122,27 @@ class UnoDataAware(DataAware): @classmethod def attachEditControl(self, data, prop, unoControl, listener, field): - return self.__attachTextControl(data, prop, unoControl, listener, "Text", field, "") + return self.__attachTextControl( + data, prop, unoControl, listener, "Text", field, "") @classmethod def attachDateControl(self, data, prop, unoControl, listener, field): - return self.__attachTextControl(data, prop, unoControl, listener, "Date", field, 0) + return self.__attachTextControl( + data, prop, unoControl, listener, "Date", field, 0) def attachTimeControl(self, data, prop, unoControl, listener, field): - return self.__attachTextControl(data, prop, unoControl, listener, "Time", field, 0) + return self.__attachTextControl( + data, prop, unoControl, listener, "Time", field, 0) def attachNumericControl(self, data, prop, unoControl, listener, field): - return self.__attachTextControl(data, prop, unoControl, listener, "Value", field, float(0)) + return self.__attachTextControl( + data, prop, unoControl, listener, "Value", field, float(0)) @classmethod def attachCheckBox(self, data, prop, checkBox, listener, field): if field: - aux = DataAwareFields.getFieldValueFor(data, prop, uno.Any("short",0)) + aux = DataAwareFields.getFieldValueFor( + data, prop, uno.Any("short",0)) else: aux = DataAware.PropertyValue (prop, data) uda = UnoDataAware(data, aux , checkBox, PropertyNames.PROPERTY_STATE) @@ -167,7 +173,8 @@ class UnoDataAware(DataAware): @classmethod def attachListBox(self, data, prop, listBox, listener, field): if field: - aux = DataAwareFields.getFieldValueFor(data, prop, uno.Any("short",0)) + aux = DataAwareFields.getFieldValueFor( + data, prop, uno.Any("short",0)) else: aux = DataAware.PropertyValue (prop, data) uda = UnoDataAware(data, aux, listBox, "SelectedItems") @@ -181,4 +188,5 @@ class UnoDataAware(DataAware): setEnabled(control, enabled) def setEnabled(self, control, enabled): - Helper.setUnoPropertyValue(getModel(control), PropertyNames.PROPERTY_ENABLED, enabled) + Helper.setUnoPropertyValue( + getModel(control), PropertyNames.PROPERTY_ENABLED, enabled) diff --git a/wizards/com/sun/star/wizards/ui/event/__init__.py b/wizards/com/sun/star/wizards/ui/event/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 -- cgit v1.2.3 From b9564de3438a767c1a42fbb2982b9c56e3bc6a9e Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 16 Jun 2011 19:47:04 +0200 Subject: Remove unused class --- wizards/com/sun/star/wizards/common/FileAccess.py | 12 ++++---- wizards/com/sun/star/wizards/fax/CallWizard.py | 6 ++-- wizards/com/sun/star/wizards/fax/FaxDocument.py | 13 ++++---- .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 20 ++++++------- wizards/com/sun/star/wizards/text/TextDocument.py | 10 +++---- wizards/com/sun/star/wizards/ui/PeerConfig.py | 2 +- wizards/com/sun/star/wizards/ui/WizardDialog.py | 4 +-- wizards/com/sun/star/wizards/ui/event/DataAware.py | 13 ++++---- .../sun/star/wizards/ui/event/MethodInvocation.py | 35 ---------------------- 9 files changed, 40 insertions(+), 75 deletions(-) delete mode 100644 wizards/com/sun/star/wizards/ui/event/MethodInvocation.py (limited to 'wizards/com/sun/star/wizards/fax/FaxDocument.py') diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index c129b6b842a5..83a447257959 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -391,8 +391,6 @@ class FileAccess(object): def getFolderTitles(self, xMSF, FilterName, FolderName): LocLayoutFiles = [[2],[]] try: - TitleVector = None - NameVector = None xDocInterface = xMSF.createInstance( "com.sun.star.document.DocumentProperties") xInterface = xMSF.createInstance( @@ -400,17 +398,19 @@ class FileAccess(object): nameList = xInterface.getFolderContents(FolderName, False) TitleVector = [] NameVector = [] - if FilterName == None or FilterName == "": + if FilterName is None or FilterName == "": FilterName = None else: FilterName = FilterName + "-" fileName = "" + NameVectorAppend = NameVector.append + TitleVectoAppend = TitleVector.append for i in nameList: fileName = self.getFilename(i) - if FilterName == None or fileName.startswith(FilterName): + if FilterName is None or fileName.startswith(FilterName): xDocInterface.loadFromMedium(i, tuple()) - NameVector.append(i) - TitleVector.append(xDocInterface.Title) + NameVectorAppend(i) + TitleVectoAppend(xDocInterface.Title) LocLayoutFiles[1] = NameVector LocLayoutFiles[0] = TitleVector diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.py b/wizards/com/sun/star/wizards/fax/CallWizard.py index 6faa3490db74..21414507e6c6 100644 --- a/wizards/com/sun/star/wizards/fax/CallWizard.py +++ b/wizards/com/sun/star/wizards/fax/CallWizard.py @@ -20,7 +20,7 @@ class CallWizard(object): xregistrykey): xsingleservicefactory = None - if stringImplementationName.equals(WizardImplementation.getName()): + if stringImplementationName.equals(WizardImplementation.Name): xsingleservicefactory = FactoryHelper.getServiceFactory( \ WizardImplementation, WizardImplementation.__serviceName, xMSF, xregistrykey) @@ -123,7 +123,7 @@ class CallWizard(object): def getImplementationId(self): byteReturn = [] try: - byteReturn = ("" + self.hashCode()).getBytes() + byteReturn = ("" + self.hashCode()).Bytes except Exception, exception: traceback.print_exc() @@ -135,7 +135,7 @@ class CallWizard(object): ''' def getImplementationName(self): - return (WizardImplementation.getName()) + return (WizardImplementation.Name) ''' Provides a sequence of all types (usually interface types) provided diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py index 8c0f0c4588ef..f07917dd8d0c 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.py +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py @@ -34,7 +34,7 @@ class FaxDocument(TextDocument): FH.updateDateFields() def switchFooter(self, sPageStyle, bState, bPageNumber, sText): - if self.xTextDocument != None: + if self.xTextDocument is not None: self.xTextDocument.lockControllers() try: @@ -45,7 +45,7 @@ class FaxDocument(TextDocument): if bState: xPageStyle.setPropertyValue("FooterIsOn", True) xFooterText = propertySet.getPropertyValue("FooterText") - xFooterText.setString(sText) + xFooterText.String = sText if bPageNumber: #Adding the Page Number @@ -60,9 +60,8 @@ class FaxDocument(TextDocument): xPageNumberField.setPropertyValue( "NumberingType", uno.Any("short",ARABIC)) xPageNumberField.setPropertyValue("SubType", CURRENT) - xFooterText.insertTextContent(xFooterText.getEnd(), + xFooterText.insertTextContent(xFooterText.End, xPageNumberField, False) - else: Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", False) @@ -72,7 +71,7 @@ class FaxDocument(TextDocument): traceback.print_exc() def hasElement(self, sElement): - if self.xTextDocument != None: + if self.xTextDocument is not None: mySectionHandler = TextSectionHandler(self.xMSF, self.xTextDocument) return mySectionHandler.hasTextSectionByName(sElement) @@ -118,13 +117,13 @@ class FaxDocument(TextDocument): if not self.keepLogoFrame: xTF = TextFrameHandler.getFrameByName("Company Logo", self.xTextDocument) - if xTF != None: + if xTF is not None: xTF.dispose() if not self.keepTypeFrame: xTF = TextFrameHandler.getFrameByName("Communication Type", self.xTextDocument) - if xTF != None: + if xTF is not None: xTF.dispose() except UnoException, e: diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 1905ae610a29..5cae6d6b8f54 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -98,7 +98,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): if self.myPathSelection.xSaveTextBox.Text.lower() == "": self.myPathSelection.initializePath() - self.xContainerWindow = self.myFaxDoc.xFrame.getContainerWindow() + self.xContainerWindow = self.myFaxDoc.xFrame.ContainerWindow self.createWindowPeer(self.xContainerWindow) #add the Roadmap to the dialog: @@ -116,7 +116,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.initializeElements() #disable the document, so that the user cannot change anything: - self.myFaxDoc.xFrame.getComponentWindow().Enable = False + self.myFaxDoc.xFrame.ComponentWindow.Enable = False self.executeDialogFromComponent(self.myFaxDoc.xFrame) self.removeTerminateListener() @@ -133,16 +133,16 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.running = False def finishWizard(self): - self.switchToStep(self.getCurrentStep(), self.nMaxStep) + self.switchToStep(self.CurrentStep, self.nMaxStep) self.myFaxDoc.setWizardTemplateDocInfo( \ self.resources.resFaxWizardDialog_title, self.resources.resTemplateDescription) try: fileAccess = FileAccess(self.xMSF) - self.sPath = self.myPathSelection.getSelectedPath() + self.sPath = self.myPathSelection.SelectedPath if self.sPath == "": self.myPathSelection.triggerPathPicker() - self.sPath = self.myPathSelection.getSelectedPath() + self.sPath = self.myPathSelection.SelectedPath print self.sPath self.sPath = fileAccess.getURL(self.sPath) @@ -152,7 +152,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): if not self.__filenameChanged: if fileAccess.exists(self.sPath, True): answer = SystemDialog.showMessageBox( \ - xMSF, xControl.getPeer(), "MessBox", + xMSF, xControl.Peer, "MessBox", VclWindowPeerAttribute.YES_NO + \ VclWindowPeerAttribute.DEF_NO, self.resources.resOverwriteWarning) @@ -198,7 +198,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), self.sPath, "_default", loadValues) - myViewHandler = oDoc.getCurrentController().getViewSettings() + myViewHandler = oDoc.CurrentController.ViewSettings myViewHandler.setPropertyValue("ZoomType", uno.Any("short",OPTIMAL)) else: @@ -445,7 +445,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.__setPossibleFooter(True) def lstBusinessStyleItemChanged(self): self.xTextDocument = self.myFaxDoc.loadAsPreview( \ - self.BusinessFiles[1][self.lstBusinessStyle.getSelectedItemPos()], + self.BusinessFiles[1][self.lstBusinessStyle.SelectedItemPos], False) self.initializeElements() self.setElements() @@ -467,13 +467,13 @@ class FaxWizardDialogImpl(FaxWizardDialog): def lstPrivateStyleItemChanged(self): self.xTextDocument = self.myFaxDoc.loadAsPreview( \ - self.PrivateFiles[1][self.lstPrivateStyle.getSelectedItemPos()], + self.PrivateFiles[1][self.lstPrivateStyle.SelectedItemPos], False) self.initializeElements() self.setElements() def txtTemplateNameTextChanged(self): - xDocProps = self.xTextDocument.getDocumentProperties() + xDocProps = self.xTextDocument.DocumentProperties xDocProps.Title = self.txtTemplateName.Text def optSenderPlaceholderItemChanged(self): diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index fed93fccb957..7c564d5a24d7 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -169,17 +169,17 @@ class TextDocument(object): xTextCursor.gotoStart(False) com.sun.star.wizards.common.Helper.setUnoPropertyValue( xTextCursor, "PageDescName", "First Page") - xTextCursor.setString(ScaleString) + xTextCursor.String = ScaleString xViewCursor = self.xTextDocument.CurrentController - xTextViewCursor = xViewCursor.getViewCursor() + xTextViewCursor = xViewCursor.ViewCursor xTextViewCursor.gotoStart(False) - iFirstPos = xTextViewCursor.getPosition().X + iFirstPos = xTextViewCursor.Position.X xTextViewCursor.gotoEnd(False) - iLastPos = xTextViewCursor.getPosition().X + iLastPos = xTextViewCursor.Position.X iScale = (iLastPos - iFirstPos) / iScaleLen xTextCursor.gotoStart(False) xTextCursor.gotoEnd(True) - xTextCursor.setString("") + xTextCursor.String = "" unlockallControllers() return iScale diff --git a/wizards/com/sun/star/wizards/ui/PeerConfig.py b/wizards/com/sun/star/wizards/ui/PeerConfig.py index 7f0dba4b3ce2..4647ad172f2a 100644 --- a/wizards/com/sun/star/wizards/ui/PeerConfig.py +++ b/wizards/com/sun/star/wizards/ui/PeerConfig.py @@ -42,7 +42,7 @@ class PeerConfig(object): i = 0 while i < self.m_aPeerTasks.size(): aPeerTask = self.m_aPeerTasks.elementAt(i) - xVclWindowPeer = aPeerTask.xControl.getPeer() + xVclWindowPeer = aPeerTask.xControl.Peer n = 0 while n < aPeerTask.propnames.length: xVclWindowPeer.setProperty(aPeerTask.propnames[n], diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index 4ed4fe35f6b1..ad46e2dbc5f3 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -159,12 +159,12 @@ class WizardDialog(UnoDialog2): return -1 def getRMItemCount(self): - return self.oRoadmap.getCount() + return self.oRoadmap.Count def getRoadmapItemByID(self, _ID): try: i = 0 - while i < self.oRoadmap.getCount(): + while i < self.oRoadmap.Count: CurRoadmapItem = self.oRoadmap.getByIndex(i) CurID = int(Helper.getUnoPropertyValue(CurRoadmapItem, "ID")) if CurID == _ID: diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.py b/wizards/com/sun/star/wizards/ui/event/DataAware.py index 2e7c3e3232c8..f21b86b76f82 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.py @@ -77,7 +77,7 @@ class DataAware(object): def updateUI(self): data = self.getFromData() ui = self.getFromUI() - if data != ui: + if data is not ui: try: self.setToUI(data) except Exception, ex: @@ -145,10 +145,11 @@ class DataAware(object): ''' def setDataObject(self, dataObject, updateUI): - if dataObject != None and not (type(self._value) is not - type(dataObject)): - raise ClassCastException ( - "can not cast new DataObject to original Class") + if dataObject is not None: + if not (type(self._value) is not + type(dataObject)): + raise ClassCastException ( + "can not cast new DataObject to original Class") self._dataObject = dataObject if updateUI: self.updateUI() @@ -166,7 +167,7 @@ class DataAware(object): @classmethod def setDataObjects(self, dataAwares, dataObject, updateUI): for i in dataAwares: - i.setDataObject(dataObject, updateUI); + i.setDataObject(dataObject, updateUI) ''' Value objects read and write a value from and diff --git a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.py b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.py deleted file mode 100644 index 2bdbcc6be8b7..000000000000 --- a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.py +++ /dev/null @@ -1,35 +0,0 @@ -'''import java.lang.reflect.InvocationTargetException; - -import java.lang.reflect.Method; - -import com.sun.star.wizards.common.PropertyNames; -''' - -'''Encapsulate a Method invocation. -In the constructor one defines a method, a target object and an optional -Parameter. -Then one calls "invoke", with or without a parameter.
-Limitations: I do not check anything myself. If the param is not ok, from the -wrong type, or the mothod doesnot exist on the given object. -You can trick this class howmuch you want: it will all throw exceptions -on the java level. i throw no error warnings or my own excceptions... -''' - -class MethodInvocation(object): - - EMPTY_ARRAY = () - - '''Creates a new instance of MethodInvokation''' - def __init__(self, method, obj, paramClass=None): - self.mMethod = method - self.mObject = obj - self.mWithParam = not (paramClass==None) - - '''Returns the result of calling the method on the object, or null, - if no result. ''' - - def invoke(self, param=None): - if self.mWithParam: - return self.mMethod.invoke(self.mObject, (param)) - else: - return self.mMethod.invoke(self.mObject, EMPTY_ARRAY) -- cgit v1.2.3 From 7b7a3f5143260b69202ede557975b9ef1cd59f8a Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Sat, 18 Jun 2011 01:16:37 +0200 Subject: First attempt to create the document --- wizards/com/sun/star/wizards/common/ConfigGroup.py | 49 ++++++------- .../com/sun/star/wizards/common/Configuration.py | 85 +++++----------------- wizards/com/sun/star/wizards/common/FileAccess.py | 21 ++---- .../sun/star/wizards/document/OfficeDocument.py | 8 +- wizards/com/sun/star/wizards/fax/FaxDocument.py | 4 +- .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 36 +++++---- wizards/com/sun/star/wizards/text/TextDocument.py | 6 ++ wizards/com/sun/star/wizards/ui/PathSelection.py | 6 +- wizards/com/sun/star/wizards/ui/WizardDialog.py | 2 +- 9 files changed, 84 insertions(+), 133 deletions(-) (limited to 'wizards/com/sun/star/wizards/fax/FaxDocument.py') diff --git a/wizards/com/sun/star/wizards/common/ConfigGroup.py b/wizards/com/sun/star/wizards/common/ConfigGroup.py index d8675f4aa556..2cd261831dd9 100644 --- a/wizards/com/sun/star/wizards/common/ConfigGroup.py +++ b/wizards/com/sun/star/wizards/common/ConfigGroup.py @@ -1,4 +1,5 @@ from ConfigNode import * +from Configuration import Configuration import traceback class ConfigGroup(ConfigNode): @@ -13,16 +14,17 @@ class ConfigGroup(ConfigNode): traceback.print_exc() def writeField(self, field, configView, prefix): - propertyName = field.getName().substring(prefix.length()) - fieldType = field.getType() - if ConfigNode.isAssignableFrom(fieldType): - childView = Configuration.addConfigNode(configView, propertyName) - child = field.get(this) - child.writeConfiguration(childView, prefix) - elif fieldType.isPrimitive(): - Configuration.set(convertValue(field), propertyName, configView) - elif isinstance(fieldType,str): - Configuration.set(field.get(this), propertyName, configView) + propertyName = field[len(prefix):] + field = getattr(self,field) + fieldType = type(field) + if isinstance(field, ConfigNode): + pass + #COMMENTED + #childView = Configuration.addConfigNode(configView, propertyName) + #self.writeConfiguration(childView, prefix) + else: + Configuration.Set(self.convertValue(field), propertyName, + configView) ''' convert the primitive type value of the @@ -34,22 +36,19 @@ class ConfigGroup(ConfigNode): ''' def convertValue(self, field): - if field.getType().equals(Boolean.TYPE): - return field.getBoolean(this) - - if field.getType().equals(Integer.TYPE): - return field.getInt(this) - - if field.getType().equals(Short.TYPE): - return field.getShort(this) + if isinstance(field,bool): + return bool(field) + elif isinstance(field,int): + return int(field) - if field.getType().equals(Float.TYPE): - return field.getFloat(this) - - if (field.getType().equals(Double.TYPE)): - return field.getDouble(this) - return None - #and good luck with it :-) ... + def readConfiguration(self, configurationView, param): + for i in dir(self): + if i.startswith(param): + try: + self.readField( i, configurationView, param) + except Exception, ex: + print "Error reading field: " + i + traceback.print_exc() def readConfiguration(self, configurationView, param): for i in dir(self): diff --git a/wizards/com/sun/star/wizards/common/Configuration.py b/wizards/com/sun/star/wizards/common/Configuration.py index c73dec9d8348..88f853bbafe3 100644 --- a/wizards/com/sun/star/wizards/common/Configuration.py +++ b/wizards/com/sun/star/wizards/common/Configuration.py @@ -19,60 +19,12 @@ in hierarchy form from the root of the registry. class Configuration(object): - @classmethod - def getInt(self, name, parent): - o = getNode(name, parent) - if AnyConverter.isVoid(o): - return 0 - - return AnyConverter.toInt(o) - - @classmethod - def getShort(self, name, parent): - o = getNode(name, parent) - if AnyConverter.isVoid(o): - return 0 - - return AnyConverter.toShort(o) - - @classmethod - def getFloat(self, name, parent): - o = getNode(name, parent) - if AnyConverter.isVoid(o): - return 0 - - return AnyConverter.toFloat(o) - - @classmethod - def getDouble(self, name, parent): - o = getNode(name, parent) - if AnyConverter.isVoid(o): - return 0 - - return AnyConverter.toDouble(o) - - @classmethod - def getString(self, name, parent): - o = getNode(name, parent) - if AnyConverter.isVoid(o): - return "" - - return o - - @classmethod - def getBoolean(self, name, parent): - o = getNode(name, parent) - if AnyConverter.isVoid(o): - return False - - return AnyConverter.toBoolean(o) - @classmethod def getNode(self, name, parent): return parent.getByName(name) @classmethod - def set(self, value, name, parent): + def Set(self, value, name, parent): parent.setHierarchicalPropertyValue(name, value) ''' @@ -90,24 +42,25 @@ class Configuration(object): def getConfigurationRoot(self, xmsf, sPath, updateable): oConfigProvider = xmsf.createInstance( "com.sun.star.configuration.ConfigurationProvider") - if updateable: - sView = "com.sun.star.configuration.ConfigurationUpdateAccess" - else: - sView = "com.sun.star.configuration.ConfigurationAccess" + args = [] aPathArgument = uno.createUnoStruct( 'com.sun.star.beans.PropertyValue') aPathArgument.Name = "nodepath" aPathArgument.Value = sPath - aModeArgument = uno.createUnoStruct( - 'com.sun.star.beans.PropertyValue') + + args.append(aPathArgument) if updateable: + sView = "com.sun.star.configuration.ConfigurationUpdateAccess" + aModeArgument = uno.createUnoStruct( + 'com.sun.star.beans.PropertyValue') aModeArgument.Name = "lazywrite" aModeArgument.Value = False + args.append(aModeArgument) + else: + sView = "com.sun.star.configuration.ConfigurationAccess" - - return oConfigProvider.createInstanceWithArguments(sView, - (aPathArgument,aModeArgument,)) + return oConfigProvider.createInstanceWithArguments(sView, tuple(args)) @classmethod def getChildrenNames(self, configView): @@ -176,14 +129,16 @@ class Configuration(object): @classmethod def addConfigNode(self, configView, name): - if configView == None: + if configView is None: return configView.getByName(name) else: - # the new element is the result ! - newNode = configView.createInstance() + print configView # insert it - this also names the element - xNameContainer.insertByName(name, newNode) - return newNode + try: + configView.insertByName(name, configView.createInstance()) + except Exception,e: + traceback.print_exc() + #return newNode @classmethod def removeNode(self, configView, name): @@ -197,14 +152,14 @@ class Configuration(object): @classmethod def updateConfiguration(self, xmsf, path, name, node, param): - view = Configuration.self.getConfigurationRoot(xmsf, path, True) + view = self.getConfigurationRoot(xmsf, path, True) addConfigNode(path, name) node.writeConfiguration(view, param) view.commitChanges() @classmethod def removeNode(self, xmsf, path, name): - view = Configuration.self.getConfigurationRoot(xmsf, path, True) + view = self.getConfigurationRoot(xmsf, path, True) removeNode(view, name) view.commitChanges() diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 5af66d826f3b..6f8e16bb2880 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -4,6 +4,7 @@ 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 ''' This class delivers static convenience methods @@ -412,11 +413,9 @@ class FileAccess(object): NameVectorAppend(i) TitleVectorAppend(xDocInterface.Title) - LocLayoutFiles[1] = NameVector - LocLayoutFiles[0] = TitleVector + LocLayoutFiles[1] = sorted(NameVector) + LocLayoutFiles[0] = sorted(TitleVector) - #COMMENTED - #JavaTools.bubblesortList(LocLayoutFiles) except Exception, exception: traceback.print_exc() @@ -557,7 +556,7 @@ class FileAccess(object): f = open(path) r = self.filenameConverter.getFileURLFromSystemPath(path, - f.getAbsolutePath()) + osPath.abspath(path)) return r def getPath(self, parentURL, childURL): @@ -737,15 +736,9 @@ class FileAccess(object): @classmethod def getParentDir(self, url): - if url.endsWith("/"): - return getParentDir(url.substring(0, url.length() - 1)) - - pos = url.indexOf("/", pos + 1) - lastPos = 0 - while pos > -1: - lastPos = pos - pos = url.indexOf("/", pos + 1) - return url.substring(0, lastPos) + while url[-1] == "/": + url = hello[:-1] + return url[:url.rfind("/")] def createNewDir(self, parentDir, name): s = getNewFile(parentDir, name, "") diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py index 0647d328a76a..a14f42ba9f71 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.py +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py @@ -174,7 +174,7 @@ class OfficeDocument(object): @classmethod def store(self, xMSF, xComponent, StorePath, FilterName, bStoreToUrl): try: - if FilterName.length() > 0: + if len(FilterName): oStoreProperties = range(2) oStoreProperties[0] = uno.createUnoStruct( 'com.sun.star.beans.PropertyValue') @@ -188,10 +188,10 @@ class OfficeDocument(object): else: oStoreProperties = range(0) - if bStoreToUrl == True: - xComponent.storeToURL(StorePath, oStoreProperties) + if bStoreToUrl: + xComponent.storeToURL(StorePath, tuple(oStoreProperties)) else: - xStoreable.storeAsURL(StorePath, oStoreProperties) + xComponent.storeAsURL(StorePath, tuple(oStoreProperties)) return True except Exception, exception: diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py index f07917dd8d0c..8ff2e648b848 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.py +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py @@ -115,13 +115,13 @@ class FaxDocument(TextDocument): def killEmptyFrames(self): try: if not self.keepLogoFrame: - xTF = TextFrameHandler.getFrameByName("Company Logo", + xTF = self.getFrameByName("Company Logo", self.xTextDocument) if xTF is not None: xTF.dispose() if not self.keepTypeFrame: - xTF = TextFrameHandler.getFrameByName("Communication Type", + xTF = self.getFrameByName("Communication Type", self.xTextDocument) if xTF is not None: xTF.dispose() diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 5cae6d6b8f54..4d1119dee46a 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -9,6 +9,7 @@ from ui.XPathSelectionListener import XPathSelectionListener from common.Configuration import * from document.OfficeDocument import OfficeDocument from text.TextFieldHandler import TextFieldHandler +from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO from common.NoValidPathException import * from com.sun.star.uno import RuntimeException @@ -133,17 +134,16 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.running = False def finishWizard(self): - self.switchToStep(self.CurrentStep, self.nMaxStep) + self.switchToStep(self.getCurrentStep(), self.nMaxStep) self.myFaxDoc.setWizardTemplateDocInfo( \ self.resources.resFaxWizardDialog_title, self.resources.resTemplateDescription) try: fileAccess = FileAccess(self.xMSF) - self.sPath = self.myPathSelection.SelectedPath - if self.sPath == "": + self.sPath = self.myPathSelection.getSelectedPath() + if self.sPath is "": self.myPathSelection.triggerPathPicker() - self.sPath = self.myPathSelection.SelectedPath - print self.sPath + self.sPath = self.myPathSelection.getSelectedPath() self.sPath = fileAccess.getURL(self.sPath) #first, if the filename was not changed, thus @@ -151,12 +151,10 @@ class FaxWizardDialogImpl(FaxWizardDialog): # file exists and warn the user. if not self.__filenameChanged: if fileAccess.exists(self.sPath, True): - answer = SystemDialog.showMessageBox( \ - xMSF, xControl.Peer, "MessBox", - VclWindowPeerAttribute.YES_NO + \ - VclWindowPeerAttribute.DEF_NO, - self.resources.resOverwriteWarning) - if (answer == 3): # user said: no, do not overwrite... + answer = SystemDialog.showMessageBox( + self.xMSF, self.xUnoDialog.Peer, "MessBox", + YES_NO + DEF_NO, self.resources.resOverwriteWarning) + if answer == 3: # user said: no, do not overwrite... return False @@ -168,13 +166,13 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.myFaxDoc.keepTypeFrame = \ (self.chkUseCommunicationType.State is not 0) self.myFaxDoc.killEmptyFrames() - self.bSaveSuccess = OfficeDocument.store(xMSF, self.xTextDocument, + self.bSaveSuccess = OfficeDocument.store(self.xMSF, self.xTextDocument, self.sPath, "writer8_template", False) if self.bSaveSuccess: - saveConfiguration() - xIH = xMSF.createInstance( \ + self.saveConfiguration() + xIH = self.xMSF.createInstance( \ "com.sun.star.comp.uui.UUIInteractionHandler") - loadValues = range(3) + loadValues = range(4) loadValues[0] = uno.createUnoStruct( \ 'com.sun.star.beans.PropertyValue') loadValues[0].Name = "AsTemplate" @@ -196,10 +194,10 @@ class FaxWizardDialogImpl(FaxWizardDialog): else: loadValues[0].Value = True - oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), + oDoc = OfficeDocument.load(Desktop.getDesktop(self.xMSF), self.sPath, "_default", loadValues) - myViewHandler = oDoc.CurrentController.ViewSettings - myViewHandler.setPropertyValue("ZoomType", + myViewHandler = ViewHandler(self.xMSF, oDoc) + myViewHandler.setViewSetting("ZoomType", uno.Any("short",OPTIMAL)) else: pass @@ -415,7 +413,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): def saveConfiguration(self): try: - root = Configuration.getConfigurationRoot(xMSF, + root = Configuration.getConfigurationRoot(self.xMSF, "/org.openoffice.Office.Writer/Wizards/Fax", True) self.myConfig.writeConfiguration(root, "cp_") Configuration.commit(root) diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index 7c564d5a24d7..c6ff21144337 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -262,6 +262,12 @@ class TextDocument(object): xPC.jumpToLastPage() return xPC.getPage() + def getFrameByName(self, sFrameName, xTD): + if xTD.TextFrames.hasByName(sFrameName): + return xTD.TextFrames.getByName(sFrameName) + + return None + ''' Possible Values for "OptionString" are: "LoadCellStyles", "LoadTextStyles", "LoadFrameStyles", diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.py b/wizards/com/sun/star/wizards/ui/PathSelection.py index aa7231e19966..ef5f6e4473a5 100644 --- a/wizards/com/sun/star/wizards/ui/PathSelection.py +++ b/wizards/com/sun/star/wizards/ui/PathSelection.py @@ -102,11 +102,11 @@ class PathSelection(object): self.sDefaultName, self.sDefaultFilter) sStorePath = myFilePickerDialog.sStorePath if sStorePath is not None: - myFA = FileAccess(xMSF); - xSaveTextBox.setText(myFA.getPath(sStorePath, None)) + myFA = FileAccess(self.xMSF); + self.xSaveTextBox.Text = myFA.getPath(sStorePath, None) self.sDefaultDirectory = \ FileAccess.getParentDir(sStorePath) - self.sDefaultName = myFA.getFilename(sStorePath) + self.sDefaultName = myFA.getFilename(self.sStorePath) return elif iTransferMode == TransferMode.LOAD: if iDialogType == DialogTypes.FOLDER: diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index b8f1236427db..d39e6d11e95b 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -431,7 +431,7 @@ class WizardDialog(UnoDialog2): self.enableFinishButton(True) if success: - removeTerminateListener() + self.removeTerminateListener() except Exception, e: traceback.print_exc() -- cgit v1.2.3 From 59115457ac2fa9735357c1c6d2fbd294f1c0ae96 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 20 Jun 2011 14:20:37 +0200 Subject: Footer checkbox works correctly now. Others: - Replace all UnoException by python Exception --- .../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 ++++++++--------- .../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 +++++++-------- 10 files changed, 60 insertions(+), 71 deletions(-) (limited to 'wizards/com/sun/star/wizards/fax/FaxDocument.py') diff --git a/wizards/com/sun/star/wizards/common/Configuration.py b/wizards/com/sun/star/wizards/common/Configuration.py index 88f853bbafe3..96385bfab88b 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 81dab16877ec..0bdf9617e303 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 8c58091c75c9..8ac514ab6dc7 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 f2c6d69445cd..727f3f0778e9 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 2da851dd9d02..324242674d94 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 8ff2e648b848..581b8e7ee80f 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 32ce4b80859a..5abc8c03f567 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 b7ea23c48d38..bc2685431750 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 fc63ddbc41c6..6a79746f7b9e 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 377cffd7a2d6..18e3dc9ae1aa 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 -- cgit v1.2.3 From c4179c019dc94f3be5c5b356a3a5243783caf0ec Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 21 Jun 2011 16:14:25 +0200 Subject: Replace some uno.invoke(now it loads faster) --- wizards/com/sun/star/wizards/common/FileAccess.py | 21 ++-- wizards/com/sun/star/wizards/common/Helper.py | 12 +-- .../com/sun/star/wizards/common/SystemDialog.py | 6 +- wizards/com/sun/star/wizards/fax/FaxDocument.py | 6 +- .../com/sun/star/wizards/fax/FaxWizardDialog.py | 113 ++++++++++----------- .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 14 +-- wizards/com/sun/star/wizards/text/TextDocument.py | 2 +- .../com/sun/star/wizards/text/TextFieldHandler.py | 2 +- .../sun/star/wizards/text/TextSectionHandler.py | 7 +- wizards/com/sun/star/wizards/text/ViewHandler.py | 5 +- wizards/com/sun/star/wizards/ui/PathSelection.py | 7 +- wizards/com/sun/star/wizards/ui/UnoDialog.py | 26 +---- wizards/com/sun/star/wizards/ui/UnoDialog2.py | 3 +- wizards/com/sun/star/wizards/ui/WizardDialog.py | 7 +- .../sun/star/wizards/ui/event/CommonListener.py | 1 - .../com/sun/star/wizards/ui/event/UnoDataAware.py | 3 +- 16 files changed, 98 insertions(+), 137 deletions(-) (limited to 'wizards/com/sun/star/wizards/fax/FaxDocument.py') diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 8ac514ab6dc7..dfa5d803299c 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -542,15 +542,18 @@ class FileAccess(object): "com.sun.star.ucb.FileContentProvider") def getURL(self, path, childPath=None): - if childPath is not None: - path = self.filenameConverter.getSystemPathFromFileURL(path) - f = open(path,childPath) - else: - f = open(path) + try: + if childPath is not None: + path = self.filenameConverter.getSystemPathFromFileURL(path) + f = open(path,childPath) + else: + f = open(path) - r = self.filenameConverter.getFileURLFromSystemPath(path, - osPath.abspath(path)) - return r + r = self.filenameConverter.getFileURLFromSystemPath(path, + osPath.abspath(path)) + return r + except Exception: + return None def getPath(self, parentURL, childURL): string = "" @@ -607,7 +610,7 @@ class FileAccess(object): return self.fileAccess.exists(filename) except CommandAbortedException, cax: pass - except com.sun.star.uno.Exception, ex: + except Exception: pass return defe diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py index 727f3f0778e9..45923cfe848e 100644 --- a/wizards/com/sun/star/wizards/common/Helper.py +++ b/wizards/com/sun/star/wizards/common/Helper.py @@ -17,14 +17,12 @@ class Helper(object): @classmethod def setUnoPropertyValue(self, xPSet, PropertyName, PropertyValue): try: - if xPSet.getPropertySetInfo().hasPropertyByName(PropertyName): - uno.invoke(xPSet,"setPropertyValue", - (PropertyName,PropertyValue)) - else: - selementnames = xPSet.getPropertySetInfo().getProperties() - raise ValueError("No Such Property: '" + PropertyName + "'") + if PropertyValue is not None: + setattr(xPSet, PropertyName, PropertyValue) - except Exception, exception: + except AttributeError: + raise AttributeError, "No Such Property: '%s'" % PropertyName + except Exception: traceback.print_exc() @classmethod diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.py b/wizards/com/sun/star/wizards/common/SystemDialog.py index 324242674d94..f6bca5b64a21 100644 --- a/wizards/com/sun/star/wizards/common/SystemDialog.py +++ b/wizards/com/sun/star/wizards/common/SystemDialog.py @@ -25,9 +25,9 @@ class SystemDialog(object): self.xMSF = xMSF self.systemDialog = xMSF.createInstance(ServiceName) self.xStringSubstitution = self.createStringSubstitution(xMSF) - if self.systemDialog != None: - prova = uno.Any("[]short",(Type,)) - #uno.invoke(prova, "initialize", (uno.Any("short",(Type,)),)) + #if self.systemDialog != None: + #COMMENTED + #self.systemDialog.initialize(Type) except Exception, exception: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py index 581b8e7ee80f..a744a7cd340b 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.py +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py @@ -1,4 +1,3 @@ -import uno from text.TextDocument import * from text.TextSectionHandler import TextSectionHandler from text.TextFieldHandler import TextFieldHandler @@ -24,7 +23,7 @@ class FaxDocument(TextDocument): self.xTextDocument) oSection = \ mySectionHandler.xTextDocument.TextSections.getByName(sElement) - Helper.setUnoPropertyValue(oSection, "IsVisible", bState) + Helper.setUnoPropertyValue(oSection,"IsVisible",bState) except Exception, exception: traceback.print_exc() @@ -57,8 +56,7 @@ class FaxDocument(TextDocument): xPageNumberField = self.xTextDocument.createInstance( "com.sun.star.text.TextField.PageNumber") xPageNumberField.setPropertyValue("SubType", CURRENT) - uno.invoke(xPageNumberField, "setPropertyValue", - ("NumberingType", uno.Any("short",ARABIC))) + xPageNumberField.NumberingType = ARABIC xFooterText.insertTextContent(xFooterText.End, xPageNumberField, False) else: diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py index c3c2bd7d8038..9323215e1983 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py @@ -24,7 +24,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH), - (True, 210, True, 104, 52, 1, uno.Any("short",1), + (True, 210, True, 104, 52, 1, 1, self.resources.resFaxWizardDialog_title, 310)) self.fontDescriptor1 = \ @@ -56,7 +56,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTBUSINESSFAX_HID, self.resources.resoptBusinessFax_value, - 97, 28, 1, uno.Any("short",1), 184), self) + 97, 28, 1, 1, 184), self) self.lstBusinessStyle = self.insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, @@ -66,8 +66,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (True, 12, LSTBUSINESSSTYLE_HID, 180, 40, 1, - uno.Any("short",3), 74), self) + (True, 12, LSTBUSINESSSTYLE_HID, 180, 40, 1, 3, 74), self) self.optPrivateFax = self.insertRadioButton("optPrivateFax", OPTPRIVATEFAX_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -79,7 +78,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTPRIVATEFAX_HID, self.resources.resoptPrivateFax_value, - 97, 81, 1, uno.Any("short",2), 184), self) + 97, 81, 1, 2, 184), self) self.lstPrivateStyle = self.insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED, @@ -91,7 +90,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTPRIVATESTYLE_HID, 180, 95, 1, - uno.Any("short",4), 74), self) + 4, 74), self) self.lblBusinessStyle = self.insertLabel("lblBusinessStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -101,7 +100,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblBusinessStyle_value, - 110, 42, 1, uno.Any("short",32), 60)) + 110, 42, 1, 32, 60)) self.lblTitle1 = self.insertLabel("lblTitle1", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, @@ -113,7 +112,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle1_value, - True, 91, 8, 1, uno.Any("short",37), 212)) + True, 91, 8, 1, 37, 212)) self.lblPrivateStyle = self.insertLabel("lblPrivateStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -122,8 +121,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, self.resources.reslblPrivateStyle_value, 110, 95, 1, - uno.Any("short",50), 60)) + (8, self.resources.reslblPrivateStyle_value, 110, 95, 1, 50, 60)) self.lblIntroduction = self.insertLabel("lblIntroduction", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -133,8 +131,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (39, self.resources.reslblIntroduction_value, True, 104, 145, 1, - uno.Any("short",55), 199)) + (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", @@ -149,7 +146,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSELOGO_HID, self.resources.reschkUseLogo_value, 97, 28, - uno.Any("short",0), 2, uno.Any("short",5), 212), self) + 0, 2, 5, 212), self) self.chkUseDate = self.insertCheckBox("chkUseDate", CHKUSEDATE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -162,7 +159,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSEDATE_HID, self.resources.reschkUseDate_value, 97, 43, - uno.Any("short",0), 2,uno.Any("short",6), 212), self) + 0, 2, 6, 212), self) self.chkUseCommunicationType = self.insertCheckBox( "chkUseCommunicationType", CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED, @@ -177,7 +174,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, CHKUSECOMMUNICATIONTYPE_HID, self.resources.reschkUseCommunicationType_value, 97, 57, - uno.Any("short",0), 2, uno.Any("short",07), 100), self) + 0, 2, 7, 100), self) self.lstCommunicationType = self.insertComboBox( "lstCommunicationType", LSTCOMMUNICATIONTYPE_ACTION_PERFORMED, @@ -191,7 +188,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTCOMMUNICATIONTYPE_HID, 105, 68, 2, - uno.Any("short",8), 174), self) + 8, 174), self) self.chkUseSubject = self.insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -204,7 +201,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, CHKUSESUBJECT_HID, self.resources.reschkUseSubject_value, - 97, 87, uno.Any("short",0), 2, uno.Any("short",9), 212), self) + 97, 87, 0, 2, 9, 212), self) self.chkUseSalutation = self.insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -218,7 +215,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, CHKUSESALUTATION_HID, self.resources.reschkUseSalutation_value, 97, 102, - uno.Any("short",0), 2, uno.Any("short",10), 100), self) + 0, 2, 10, 100), self) self.lstSalutation = self.insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, @@ -231,7 +228,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, LSTSALUTATION_HID, 105, 113, 2, - uno.Any("short",11), 174), self) + 11, 174), self) self.chkUseGreeting = self.insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -245,7 +242,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, CHKUSEGREETING_HID, self.resources.reschkUseGreeting_value, 97, 132, - uno.Any("short",0), 2, uno.Any("short",12), 100), self) + 0, 2, 12, 100), self) self.lstGreeting = self.insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, @@ -257,8 +254,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (True, 12, LSTGREETING_HID, 105, 143, 2, - uno.Any("short",13), 174), self) + (True, 12, LSTGREETING_HID, 105, 143, 2, 13, 174), self) self.chkUseFooter = self.insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -272,7 +268,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, CHKUSEFOOTER_HID, self.resources.reschkUseFooter_value, 97, 163, - uno.Any("short",0), 2, uno.Any("short",14), 212), self) + 0, 2, 14, 212), self) self.lblTitle3 = self.insertLabel("lblTitle3", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -283,7 +279,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle3_value, - True, 91, 8, 2, uno.Any("short",59), 212)) + True, 91, 8, 2, 59, 212)) def buildStep3(self): self.optSenderPlaceholder = self.insertRadioButton( @@ -299,7 +295,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, OPTSENDERPLACEHOLDER_HID, self.resources.resoptSenderPlaceholder_value, - 104, 42, 3, uno.Any("short",15), 149), self) + 104, 42, 3, 15, 149), self) self.optSenderDefine = self.insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -311,7 +307,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTSENDERDEFINE_HID, self.resources.resoptSenderDefine_value, - 104, 54, 3, uno.Any("short",16), 149), self) + 104, 54, 3, 16, 149), self) self.txtSenderName = self.insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -322,7 +318,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERNAME_HID, 182, 67, 3, - uno.Any("short",17), 119), self) + 17, 119), self) self.txtSenderStreet = self.insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -333,7 +329,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERSTREET_HID, 182, 81, 3, - uno.Any("short",18), 119), self) + 18, 119), self) self.txtSenderPostCode = self.insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -344,7 +340,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERPOSTCODE_HID, 182, 95, 3, - uno.Any("short",19), 25), self) + 19, 25), self) self.txtSenderState = self.insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -355,7 +351,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERSTATE_HID, 211, 95, 3, - uno.Any("short",20), 21), self) + 20, 21), self) self.txtSenderCity = self.insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -366,7 +362,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERCITY_HID, 236, 95, 3, - uno.Any("short",21), 65), self) + 21, 65), self) self.txtSenderFax = self.insertTextField("txtSenderFax", TXTSENDERFAX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -377,7 +373,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, TXTSENDERFAX_HID, 182, 109, 3, - uno.Any("short",22), 119), self) + 22, 119), self) self.optReceiverPlaceholder = self.insertRadioButton( "optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, @@ -391,7 +387,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, OPTRECEIVERPLACEHOLDER_HID, self.resources.resoptReceiverPlaceholder_value, - 104, 148, 3, uno.Any("short",23), 200), self) + 104, 148, 3, 23, 200), self) self.optReceiverDatabase = self.insertRadioButton( "optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, @@ -405,7 +401,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, OPTRECEIVERDATABASE_HID, self.resources.resoptReceiverDatabase_value, 104, 160, 3, - uno.Any("short",24), 200), self) + 24, 200), self) self.lblSenderAddress = self.insertLabel("lblSenderAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -414,14 +410,14 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, self.resources.reslblSenderAddress_value, 97, 28, 3, uno.Any("short",46), 136)) + (8, self.resources.reslblSenderAddress_value, 97, 28, 3, 46, 136)) self.FixedLine2 = self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (5, 90, 126, 3, uno.Any("short",51), 212)) + (5, 90, 126, 3, 51, 212)) self.lblSenderName = self.insertLabel("lblSenderName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -431,7 +427,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderName_value, 113, 69, 3, - uno.Any("short",52), 68)) + 52, 68)) self.lblSenderStreet = self.insertLabel("lblSenderStreet", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -441,7 +437,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderStreet_value, 113, 82, 3, - uno.Any("short",53), 68)) + 53, 68)) self.lblPostCodeCity = self.insertLabel("lblPostCodeCity", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -451,7 +447,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPostCodeCity_value, - 113, 97, 3, uno.Any("short",54), 68)) + 113, 97, 3, 54, 68)) self.lblTitle4 = self.insertLabel("lblTitle4", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, @@ -463,7 +459,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle4_value, - True, 91, 8, 3, uno.Any("short",60), 212)) + True, 91, 8, 3, 60, 212)) self.Label1 = self.insertLabel("lblSenderFax", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -472,8 +468,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, self.resources.resLabel1_value, 113, 111, 3, - uno.Any("short",68), 68)) + (8, self.resources.resLabel1_value, 113, 111, 3, 68, 68)) self.Label2 = self.insertLabel("Label2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -482,8 +477,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (8, self.resources.resLabel2_value, 97, 137, 3, - uno.Any("short",69), 136)) + (8, self.resources.resLabel2_value, 97, 137, 3, 69, 136)) def buildStep4(self): self.txtFooter = self.insertTextField("txtFooter", @@ -496,8 +490,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (47, TXTFOOTER_HID, True, 97, 40, 4, - uno.Any("short",25), 203), self) + (47, TXTFOOTER_HID, True, 97, 40, 4, 25, 203), self) self.chkFooterNextPages = self.insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -511,7 +504,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, CHKFOOTERNEXTPAGES_HID, self.resources.reschkFooterNextPages_value, 97, 92, - uno.Any("short",0), 4, uno.Any("short",26), 202), self) + 0, 4, 26, 202), self) self.chkFooterPageNumbers = self.insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -525,7 +518,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_WIDTH), (8, CHKFOOTERPAGENUMBERS_HID, self.resources.reschkFooterPageNumbers_value, 97, 106, - uno.Any("short",0), 4, uno.Any("short",27), 201), self) + 0, 4, 27, 201), self) self.lblFooter = self.insertLabel("lblFooter", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, @@ -536,7 +529,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor4, 8, self.resources.reslblFooter_value, - 97, 28, 4, uno.Any("short",33), 116)) + 97, 28, 4, 33, 116)) self.lblTitle5 = self.insertLabel("lblTitle5", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, @@ -548,7 +541,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle5_value, - True, 91, 8, 4, uno.Any("short",61), 212)) + True, 91, 8, 4, 61, 212)) def buildStep5(self): self.txtTemplateName = self.insertTextField("txtTemplateName", @@ -561,7 +554,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH), - (12, TXTTEMPLATENAME_HID, 202, 56, 5, uno.Any("short",28), + (12, TXTTEMPLATENAME_HID, 202, 56, 5, 28, self.resources.restxtTemplateName_value, 100), self) self.optCreateFax = self.insertRadioButton("optCreateFax", @@ -575,7 +568,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTCREATEFAX_HID, self.resources.resoptCreateFax_value, - 104, 111, 5, uno.Any("short",30), 198), self) + 104, 111, 5, 30, 198), self) self.optMakeChanges = self.insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, @@ -587,7 +580,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, OPTMAKECHANGES_HID, self.resources.resoptMakeChanges_value, - 104, 123, 5, uno.Any("short",31), 198), self) + 104, 123, 5, 31, 198), self) self.lblFinalExplanation1 = self.insertLabel("lblFinalExplanation1", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -598,7 +591,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (28, self.resources.reslblFinalExplanation1_value, - True, 97, 28, 5, uno.Any("short",34), 205)) + True, 97, 28, 5, 34, 205)) self.lblProceed = self.insertLabel("lblProceed", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -608,7 +601,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblProceed_value, 97, 100, 5, - uno.Any("short",35), 204)) + 35, 204)) self.lblFinalExplanation2 = self.insertLabel("lblFinalExplanation2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -619,7 +612,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (33, self.resources.reslblFinalExplanation2_value, True, 104, 145, 5, - uno.Any("short",36), 199)) + 36, 199)) self.ImageControl2 = self.insertImage("ImageControl2", ("Border", PropertyNames.PROPERTY_HEIGHT, @@ -630,8 +623,8 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), - (uno.Any("short",0), 10, UIConsts.INFOIMAGEURL, 92, 145, - False, 5, uno.Any("short",47), 10)) + (0, 10, UIConsts.INFOIMAGEURL, 92, 145, + False, 5, 47, 10)) self.lblTemplateName = self.insertLabel("lblTemplateName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, @@ -641,7 +634,7 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblTemplateName_value, 97, 58, 5, - uno.Any("short",57), 101)) + 57, 101)) self.lblTitle6 = self.insertLabel("lblTitle6", ("FontDescriptor", @@ -654,4 +647,4 @@ class FaxWizardDialog(WizardDialog): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 16, self.resources.reslblTitle6_value, - True, 91, 8, 5, uno.Any("short",62), 212)) + True, 91, 8, 5, 62, 212)) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 5abc8c03f567..615e0cdc1321 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -181,11 +181,11 @@ class FaxWizardDialogImpl(FaxWizardDialog): loadValues[1] = uno.createUnoStruct( \ 'com.sun.star.beans.PropertyValue') loadValues[1].Name = "MacroExecutionMode" - loadValues[1].Value = uno.Any("short", ALWAYS_EXECUTE) + loadValues[1].Value = ALWAYS_EXECUTE loadValues[2] = uno.createUnoStruct( \ 'com.sun.star.beans.PropertyValue') loadValues[2].Name = "UpdateDocMode" - loadValues[2].Value = uno.Any("short", FULL_UPDATE) + loadValues[2].Value = FULL_UPDATE loadValues[3] = uno.createUnoStruct( \ 'com.sun.star.beans.PropertyValue') loadValues[3].Name = "InteractionHandler" @@ -198,8 +198,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): oDoc = OfficeDocument.load(Desktop.getDesktop(self.xMSF), self.sPath, "_default", loadValues) myViewHandler = ViewHandler(self.xMSF, oDoc) - myViewHandler.setViewSetting("ZoomType", - uno.Any("short",OPTIMAL)) + myViewHandler.setViewSetting("ZoomType", OPTIMAL) else: pass #TODO: Error Handling @@ -295,8 +294,8 @@ class FaxWizardDialogImpl(FaxWizardDialog): tuple(self.BusinessFiles[0])) self.setControlProperty("lstPrivateStyle", "StringItemList", tuple(self.PrivateFiles[0])) - self.setControlProperty("lstBusinessStyle", "SelectedItems", [0]) - self.setControlProperty("lstPrivateStyle", "SelectedItems" , [0]) + self.setControlProperty("lstBusinessStyle", "SelectedItems", (0,)) + self.setControlProperty("lstPrivateStyle", "SelectedItems" , (0,)) return True except NoValidPathException, e: # TODO Auto-generated catch block @@ -313,7 +312,8 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.setControlProperty("chkUseDate", PropertyNames.PROPERTY_ENABLED, self.myFaxDoc.hasElement("Date")) - self.myFaxDoc.updateDateFields() + #COMMENTED + #self.myFaxDoc.updateDateFields() def initializeSalutation(self): self.setControlProperty("lstSalutation", "StringItemList", diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index fb97048d63b5..09cae9536e93 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -136,7 +136,7 @@ class TextDocument(object): myViewHandler = ViewHandler(self.xTextDocument, self.xTextDocument) try: myViewHandler.setViewSetting( - "ZoomType", uno.Any("short",ENTIRE_PAGE)) + "ZoomType", ENTIRE_PAGE) except Exception, e: traceback.print_exc() myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.py b/wizards/com/sun/star/wizards/text/TextFieldHandler.py index 22f94a3866fd..97d578dd24e9 100644 --- a/wizards/com/sun/star/wizards/text/TextFieldHandler.py +++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.py @@ -176,7 +176,7 @@ class TextFieldHandler(object): def changeExtendedUserFieldContent(self, UserDataPart, _FieldContent): try: xDependentTextFields = self.__getTextFieldsByProperty( - "UserDataType", uno.Any("short",UserDataPart), "Short") + "UserDataType", UserDataPart, "Short") if xDependentTextFields != None: i = 0 while i < xDependentTextFields.length: diff --git a/wizards/com/sun/star/wizards/text/TextSectionHandler.py b/wizards/com/sun/star/wizards/text/TextSectionHandler.py index 98a19ab4a4ee..67eee12e2d51 100644 --- a/wizards/com/sun/star/wizards/text/TextSectionHandler.py +++ b/wizards/com/sun/star/wizards/text/TextSectionHandler.py @@ -10,10 +10,11 @@ class TextSectionHandler(object): def removeTextSectionbyName(self, SectionName): try: xAllTextSections = self.xTextDocument.TextSections - if xAllTextSections.hasByName(SectionName) == True: + if xAllTextSections.hasByName(SectionName): oTextSection = self.xTextDocument.TextSections.getByName( SectionName) - removeTextSection(oTextSection) + self.removeTextSection(oTextSection) + except Exception, exception: traceback.print_exc() @@ -27,7 +28,7 @@ class TextSectionHandler(object): xAllTextSections = self.xTextDocument.TextSections oTextSection = xAllTextSections.getByIndex( xAllTextSections.getCount() - 1) - removeTextSection(oTextSection) + self.removeTextSection(oTextSection) except Exception, exception: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/text/ViewHandler.py b/wizards/com/sun/star/wizards/text/ViewHandler.py index 9a646da05f54..32533aabcbd6 100644 --- a/wizards/com/sun/star/wizards/text/ViewHandler.py +++ b/wizards/com/sun/star/wizards/text/ViewHandler.py @@ -1,5 +1,3 @@ -import uno - class ViewHandler(object): '''Creates a new instance of View ''' @@ -32,8 +30,7 @@ class ViewHandler(object): exception.printStackTrace(System.out) def setViewSetting(self, Setting, Value): - uno.invoke(self.xTextViewCursorSupplier.ViewSettings,"setPropertyValue",( - Setting, Value)) + setattr(self.xTextViewCursorSupplier.ViewSettings, Setting, Value) def collapseViewCursorToStart(self): xTextViewCursor = self.xTextViewCursorSupplier.ViewCursor diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.py b/wizards/com/sun/star/wizards/ui/PathSelection.py index bc2685431750..2be27ac836f9 100644 --- a/wizards/com/sun/star/wizards/ui/PathSelection.py +++ b/wizards/com/sun/star/wizards/ui/PathSelection.py @@ -1,5 +1,4 @@ import traceback -import uno from common.PropertyNames import * from common.FileAccess import * from common.SystemDialog import SystemDialog @@ -41,7 +40,7 @@ class PathSelection(object): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 8, LabelText, XPos, YPos, DialogStep, - uno.Any("short",CurTabIndex), Width)) + CurTabIndex, Width)) self.xSaveTextBox = self.CurUnoDialog.insertTextField( "txtSavePath", "callXPathSelectionListener", (PropertyNames.PROPERTY_ENABLED, @@ -53,7 +52,7 @@ class PathSelection(object): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 12, TxtHelpURL, XPos, YPos + 10, DialogStep, - uno.Any("short",(CurTabIndex + 1)), Width - 26), self) + (CurTabIndex + 1), Width - 26), self) self.CurUnoDialog.setControlProperty("txtSavePath", PropertyNames.PROPERTY_ENABLED, False ) @@ -68,7 +67,7 @@ class PathSelection(object): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (Enabled, 14, BtnHelpURL, "...",XPos + Width - 16, YPos + 9, - DialogStep, uno.Any("short",(CurTabIndex + 2)), 16), self) + DialogStep, (CurTabIndex + 2), 16), self) def addSelectionListener(self, xAction): self.xAction = xAction diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py index 6a79746f7b9e..15412dbb4fd8 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py @@ -50,35 +50,11 @@ class UnoDialog(object): if not self.xDialogModel.hasByName(ControlName): return xPSet = self.xDialogModel.getByName(ControlName) - if isinstance(PropertyValue,bool): - xPSet.setPropertyValue(PropertyName, PropertyValue) - else: - methodname = "[]string" - if not isinstance(PropertyValue,tuple): - if isinstance(PropertyValue,list): - methodname = "[]short" - PropertyValue = tuple(PropertyValue) - else: - PropertyValue = (PropertyValue,) - - uno.invoke(xPSet, "setPropertyValue", (PropertyName, - uno.Any( methodname, PropertyValue))) + setattr(xPSet,PropertyName, PropertyValue) except Exception, exception: traceback.print_exc() - def transform( self, struct , propName, value ): - myinv = self.inv.createInstanceWithArguments( (struct,) ) - access = self.insp.inspect( myinv ) - method = access.getMethod( "setValue" , -1 ) - uno.invoke( method, "invoke", ( myinv, ( propName , value ) )) - method = access.getMethod( "getMaterial" , -1 ) - ret,dummy = method.invoke(myinv,() ) - return ret - - def getResource(self): - return self.m_oResource - def setControlProperties( self, ControlName, PropertyNames, PropertyValues): self.setControlProperty(ControlName, PropertyNames, PropertyValues) diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.py b/wizards/com/sun/star/wizards/ui/UnoDialog2.py index 4fcdadb6bed6..0bf868687017 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.py @@ -136,8 +136,7 @@ class UnoDialog2(UnoDialog): PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH), - (uno.Any("short",0), 10, - UIConsts.INFOIMAGEURL, _posx, _posy, False, _iStep, 10)) + (0, 10, UIConsts.INFOIMAGEURL, _posx, _posy, False, _iStep, 10)) return xImgControl ''' diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index 18e3dc9ae1aa..f32f01a3d5a1 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -85,8 +85,7 @@ class WizardDialog(UnoDialog2): if self.oRoadmap != None: nCurItemID = self.getCurrentRoadmapItemID() if nCurItemID != ID: - Helper.setUnoPropertyValue(self.oRoadmap, "CurrentItemID", - uno.Any("short",ID)) + Helper.setUnoPropertyValue(self.oRoadmap, "CurrentItemID",ID) def getCurrentRoadmapItemID(self): try: @@ -114,7 +113,7 @@ class WizardDialog(UnoDialog2): PropertyNames.PROPERTY_TABINDEX, "Tabstop", PropertyNames.PROPERTY_WIDTH), ((iDialogHeight - 26), 0, 0, 0, - uno.Any("short",0), True, uno.Any("short",85))) + 0, True, 85)) self.oRoadmap.setPropertyValue( PropertyNames.PROPERTY_NAME, "rdmNavi") @@ -468,7 +467,7 @@ class WizardDialog(UnoDialog2): PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH),( oFontDesc, 16, self.sRightPaneHeaders(i), - True, 91, 8, i + 1, uno.Any("short",12), 212)) + True, 91, 8, i + 1, 12, 212)) i += 1 def cancelWizard(self): diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py b/wizards/com/sun/star/wizards/ui/event/CommonListener.py index 1ab35e395854..6ff03667d669 100644 --- a/wizards/com/sun/star/wizards/ui/event/CommonListener.py +++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.py @@ -33,7 +33,6 @@ #********************************************************************** # OOo's libraries -import uno import unohelper import inspect diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py index 2564b88f1c04..cca27ae5f76f 100644 --- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py +++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py @@ -141,8 +141,7 @@ class UnoDataAware(DataAware): @classmethod def attachCheckBox(self, data, prop, checkBox, listener, field): if field: - aux = DataAwareFields.getFieldValueFor( - data, prop, uno.Any("short",0)) + aux = DataAwareFields.getFieldValueFor(data, prop, 0) else: aux = DataAware.PropertyValue (prop, data) uda = UnoDataAware(data, aux , checkBox, PropertyNames.PROPERTY_STATE) -- cgit v1.2.3 From 6d4de2a05f9aab2fc0b9e8b95168be1aa659e62a Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 4 Jul 2011 12:01:08 +0200 Subject: apply python style and fix some minor things --- wizards/com/sun/star/wizards/fax/FaxDocument.py | 48 +- .../sun/star/wizards/fax/FaxWizardDialogImpl.py | 14 +- .../com/sun/star/wizards/letter/LetterDocument.py | 277 +++-- .../sun/star/wizards/letter/LetterWizardDialog.py | 1184 ++++++++++++++++++-- .../star/wizards/letter/LetterWizardDialogImpl.py | 1015 +++++++++++------ .../wizards/letter/LetterWizardDialogResources.py | 243 +++- wizards/com/sun/star/wizards/text/TextDocument.py | 62 +- wizards/com/sun/star/wizards/text/ViewHandler.py | 2 +- 8 files changed, 2220 insertions(+), 625 deletions(-) (limited to 'wizards/com/sun/star/wizards/fax/FaxDocument.py') diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py index a744a7cd340b..9ee53cd434d9 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.py +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py @@ -20,29 +20,30 @@ class FaxDocument(TextDocument): def switchElement(self, sElement, bState): try: mySectionHandler = TextSectionHandler(self.xMSF, - self.xTextDocument) + TextDocument.xTextDocument) oSection = \ mySectionHandler.xTextDocument.TextSections.getByName(sElement) Helper.setUnoPropertyValue(oSection,"IsVisible",bState) - except Exception, exception: + except Exception: traceback.print_exc() def updateDateFields(self): - FH = TextFieldHandler(self.xTextDocument, self.xTextDocument) + FH = TextFieldHandler( + TextDocument.xTextDocument, TextDocument.xTextDocument) FH.updateDateFields() def switchFooter(self, sPageStyle, bState, bPageNumber, sText): - if self.xTextDocument is not None: - self.xTextDocument.lockControllers() + if TextDocument.xTextDocument is not None: + TextDocument.xTextDocument.lockControllers() try: - xPageStyleCollection = \ - self.xTextDocument.StyleFamilies.getByName("PageStyles") + TextDocument.xTextDocument.StyleFamilies.getByName("PageStyles") xPageStyle = xPageStyleCollection.getByName(sPageStyle) if bState: xPageStyle.setPropertyValue("FooterIsOn", True) - xFooterText = Helper.getUnoPropertyValue(xPageStyle, "FooterText") + xFooterText = \ + Helper.getUnoPropertyValue(xPageStyle, "FooterText") xFooterText.String = sText if bPageNumber: @@ -53,8 +54,9 @@ class FaxDocument(TextDocument): PARAGRAPH_BREAK, False) myCursor.setPropertyValue("ParaAdjust", CENTER ) - xPageNumberField = self.xTextDocument.createInstance( - "com.sun.star.text.TextField.PageNumber") + xPageNumberField = \ + TextDocument.xTextDocument.createInstance( + "com.sun.star.text.TextField.PageNumber") xPageNumberField.setPropertyValue("SubType", CURRENT) xPageNumberField.NumberingType = ARABIC xFooterText.insertTextContent(xFooterText.End, @@ -63,20 +65,21 @@ class FaxDocument(TextDocument): Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", False) - self.xTextDocument.unlockControllers() - except Exception, exception: + TextDocument.xTextDocument.unlockControllers() + except Exception: traceback.print_exc() def hasElement(self, sElement): - if self.xTextDocument is not None: + if TextDocument.xTextDocument is not None: mySectionHandler = TextSectionHandler(self.xMSF, - self.xTextDocument) + TextDocument.xTextDocument) return mySectionHandler.hasTextSectionByName(sElement) else: return False def switchUserField(self, sFieldName, sNewContent, bState): - myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) + myFieldHandler = TextFieldHandler( + self.xMSF, TextDocument.xTextDocument) if bState: myFieldHandler.changeUserFieldContent(sFieldName, sNewContent) else: @@ -84,8 +87,8 @@ class FaxDocument(TextDocument): def fillSenderWithUserData(self): try: - myFieldHandler = TextFieldHandler(self.xTextDocument, - self.xTextDocument) + myFieldHandler = TextFieldHandler(TextDocument.xTextDocument, + TextDocument.xTextDocument) oUserDataAccess = Configuration.getConfigurationRoot( self.xMSF, "org.openoffice.UserProfile/Data", False) myFieldHandler.changeUserFieldContent("Company", @@ -102,26 +105,27 @@ class FaxDocument(TextDocument): myFieldHandler.changeUserFieldContent("Fax", Helper.getUnoObjectbyName(oUserDataAccess, "facsimiletelephonenumber")) - except Exception, exception: + except Exception: traceback.print_exc() def killEmptyUserFields(self): - myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) + myFieldHandler = TextFieldHandler( + self.xMSF, TextDocument.xTextDocument) myFieldHandler.removeUserFieldByContent("") def killEmptyFrames(self): try: if not self.keepLogoFrame: xTF = self.getFrameByName("Company Logo", - self.xTextDocument) + TextDocument.xTextDocument) if xTF is not None: xTF.dispose() if not self.keepTypeFrame: xTF = self.getFrameByName("Communication Type", - self.xTextDocument) + TextDocument.xTextDocument) if xTF is not None: xTF.dispose() - except Exception, e: + except Exception: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 5564283d7c58..f4495e255579 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -164,7 +164,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.myFaxDoc.keepTypeFrame = \ (self.chkUseCommunicationType.State is not 0) self.myFaxDoc.killEmptyFrames() - self.bSaveSuccess = OfficeDocument.store(self.xMSF, self.xTextDocument, + self.bSaveSuccess = OfficeDocument.store(self.xMSF, TextDocument.xTextDocument, self.sPath, "writer8_template") if self.bSaveSuccess: self.saveConfiguration() @@ -440,7 +440,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.__enableSenderReceiver() self.__setPossibleFooter(True) def lstBusinessStyleItemChanged(self): - self.xTextDocument = self.myFaxDoc.loadAsPreview( \ + TextDocument.xTextDocument = self.myFaxDoc.loadAsPreview( \ self.BusinessFiles[1][self.lstBusinessStyle.SelectedItemPos], False) self.initializeElements() @@ -462,14 +462,14 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.__setPossibleFooter(False) def lstPrivateStyleItemChanged(self): - self.xTextDocument = self.myFaxDoc.loadAsPreview( \ + TextDocument.xTextDocument = self.myFaxDoc.loadAsPreview( \ self.PrivateFiles[1][self.lstPrivateStyle.SelectedItemPos], False) self.initializeElements() self.setElements() def txtTemplateNameTextChanged(self): - xDocProps = self.xTextDocument.DocumentProperties + xDocProps = TextDocument.xTextDocument.DocumentProperties xDocProps.Title = self.txtTemplateName.Text def optSenderPlaceholderItemChanged(self): @@ -518,7 +518,7 @@ class FaxWizardDialogImpl(FaxWizardDialog): PropertyNames.PROPERTY_ENABLED, True) self.myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF, - self.xTextDocument) + TextDocument.xTextDocument) self.txtSenderNameTextChanged() self.txtSenderStreetTextChanged() self.txtSenderPostCodeTextChanged() @@ -527,11 +527,11 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.txtSenderFaxTextChanged() def optReceiverPlaceholderItemChanged(self): - OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", + OfficeDocument.attachEventCall(TextDocument.xTextDocument, "OnNew", "StarBasic", "macro:#/Template.Correspondence.Placeholder()") def optReceiverDatabaseItemChanged(self): - OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", + OfficeDocument.attachEventCall(TextDocument.xTextDocument, "OnNew", "StarBasic", "macro:#/Template.Correspondence.Database()") def optCreateFaxItemChanged(self): diff --git a/wizards/com/sun/star/wizards/letter/LetterDocument.py b/wizards/com/sun/star/wizards/letter/LetterDocument.py index 2d630ae64150..b5a172f8808c 100644 --- a/wizards/com/sun/star/wizards/letter/LetterDocument.py +++ b/wizards/com/sun/star/wizards/letter/LetterDocument.py @@ -1,14 +1,25 @@ from text.TextDocument import * from text.TextSectionHandler import TextSectionHandler +from text.TextFieldHandler import TextFieldHandler +from com.sun.star.table import BorderLine from common.PropertyNames import PropertyNames from com.sun.star.text.ControlCharacter import PARAGRAPH_BREAK from com.sun.star.style.ParagraphAdjust import CENTER from com.sun.star.text.PageNumberType import CURRENT from com.sun.star.style.NumberingType import ARABIC +from com.sun.star.text.HoriOrientation import NONE as NONEHORI +from com.sun.star.text.VertOrientation import NONE as NONEVERT +from com.sun.star.text.RelOrientation import PAGE_FRAME +from com.sun.star.text.TextContentAnchorType import AT_PAGE +from com.sun.star.text.SizeType import FIX +from com.sun.star.text.WrapTextMode import THROUGHT +from com.sun.star.awt.FontWeight import BOLD class LetterDocument(TextDocument): + TextDocument = None + def __init__(self, xMSF, listener): super(LetterDocument,self).__init__(xMSF, listener, None, "WIZARD_LIVE_PREVIEW") @@ -20,53 +31,65 @@ class LetterDocument(TextDocument): def switchElement(self, sElement, bState): try: - mySectionHandler = TextSectionHandler(self.xMSF, self.xTextDocument) - oSection = mySectionHandler.xTextDocument.TextSections.getByName(sElement) + mySectionHandler = TextSectionHandler( + self.xMSF, TextDocument.xTextDocument) + oSection = \ + mySectionHandler.xTextDocument.TextSections.getByName(sElement) Helper.setUnoPropertyValue(oSection, "IsVisible", bState) - except Exception, exception: + except Exception: traceback.print_exc() def updateDateFields(self): - FH = TextFieldHandler(self.xTextDocument, self.xTextDocument) + FH = TextFieldHandler( + TextDocument.xTextDocument, TextDocument.xTextDocument) FH.updateDateFields() def switchFooter(self, sPageStyle, bState, bPageNumber, sText): - if self.xTextDocument is not None: - self.xTextDocument.lockControllers() + if TextDocument.xTextDocument != None: try: - xNameAccess = self.xTextDocument.StyleFamilies + TextDocument.xTextDocument.lockControllers() + xNameAccess = TextDocument.xTextDocument.StyleFamilies xPageStyleCollection = xNameAccess.getByName("PageStyles") xPageStyle = xPageStyleCollection.getByName(sPageStyle) if bState: - Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn",True) - xFooterText = Helper.getUnoPropertyValue(xPageStyle, "FooterText") + Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", True) + xFooterText = \ + Helper.getUnoPropertyValue(xPageStyle, "FooterText") xFooterText.String = sText if bPageNumber: #Adding the Page Number - myCursor = xFooterText.createTextCursor() + myCursor = xFooterText.Text.createTextCursor() myCursor.gotoEnd(False) - xFooterText.insertControlCharacter(myCursor, PARAGRAPH_BREAK, False) - myCursor.setPropertyValue("ParaAdjust", CENTER) - xPageNumberField = self.xTextDocument.createInstance("com.sun.star.text.TextField.PageNumber") + xFooterText.insertControlCharacter(myCursor, + PARAGRAPH_BREAK, False) + myCursor.setPropertyValue("ParaAdjust", CENTER ) + + xPageNumberField = \ + TextDocument.xTextDocument.createInstance( + "com.sun.star.text.TextField.PageNumber") xPageNumberField.setPropertyValue("SubType", CURRENT) - xPageNumberField.setPropertyValue("NumberingType", ARABIC) - xFooterText.insertTextContent(xFooterText.getEnd(), xPageNumberField, False) + xPageNumberField.NumberingType = ARABIC + xFooterText.insertTextContent(xFooterText.End, + xPageNumberField, False) + else: - Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", False) + Helper.setUnoPropertyValue( + xPageStyle, "FooterIsOn", False) - self.xTextDocument.unlockControllers() - except Exception, exception: + TextDocument.xTextDocument.unlockControllers() + except Exception: traceback.print_exc() def hasElement(self, sElement): - if self.xTextDocument is not None: - SH = TextSectionHandler(self.xMSF, self.xTextDocument) + if TextDocument.xTextDocument != None: + SH = TextSectionHandler(self.xMSF, TextDocument.xTextDocument) return SH.hasTextSectionByName(sElement) else: return False def switchUserField(self, sFieldName, sNewContent, bState): - myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) + myFieldHandler = TextFieldHandler( + self.xMSF, TextDocument.xTextDocument) if bState: myFieldHandler.changeUserFieldContent(sFieldName, sNewContent) else: @@ -74,107 +97,163 @@ class LetterDocument(TextDocument): def fillSenderWithUserData(self): try: - myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) - oUserDataAccess = Configuration.getConfigurationRoot(self.xMSF, "org.openoffice.UserProfile/Data", False) - myFieldHandler.changeUserFieldContent("Company", Helper.getUnoObjectbyName(oUserDataAccess, "o")) - myFieldHandler.changeUserFieldContent("Street", Helper.getUnoObjectbyName(oUserDataAccess, "street")) - myFieldHandler.changeUserFieldContent("PostCode", Helper.getUnoObjectbyName(oUserDataAccess, "postalcode")) - myFieldHandler.changeUserFieldContent("City", Helper.getUnoObjectbyName(oUserDataAccess, "l")) - myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, Helper.getUnoObjectbyName(oUserDataAccess, "st")) - except Exception, exception: + myFieldHandler = TextFieldHandler( + TextDocument.xTextDocument, TextDocument.xTextDocument) + oUserDataAccess = Configuration.getConfigurationRoot( + self.xMSF, "org.openoffice.UserProfile/Data", False) + myFieldHandler.changeUserFieldContent( + "Company", Helper.getUnoObjectbyName(oUserDataAccess, "o")) + myFieldHandler.changeUserFieldContent( + "Street", Helper.getUnoObjectbyName(oUserDataAccess, "street")) + myFieldHandler.changeUserFieldContent( + "PostCode", + Helper.getUnoObjectbyName(oUserDataAccess, "postalcode")) + myFieldHandler.changeUserFieldContent( + "City", Helper.getUnoObjectbyName(oUserDataAccess, "l")) + myFieldHandler.changeUserFieldContent( + PropertyNames.PROPERTY_STATE, + Helper.getUnoObjectbyName(oUserDataAccess, "st")) + except Exception: traceback.print_exc() def killEmptyUserFields(self): - myFieldHandler = TextFieldHandle(self.xMSF, self.xTextDocument) + myFieldHandler = TextFieldHandler( + self.xMSF, TextDocument.xTextDocument) myFieldHandler.removeUserFieldByContent("") def killEmptyFrames(self): try: if not self.keepLogoFrame: - xTF = TextFrameHandler.getFrameByName("Company Logo", self.xTextDocument) - if xTF is not None: - xTF.dispose() + xTF = self.getFrameByName( + "Company Logo", TextDocument.xTextDocument) + if xTF != None: + xTF.dispose() if not self.keepBendMarksFrame: - xTF = TextFrameHandler.getFrameByName("Bend Marks", self.xTextDocument) - if xTF is not None: - xTF.dispose() + xTF = self.getFrameByName( + "Bend Marks", TextDocument.xTextDocument) + if xTF != None: + xTF.dispose() if not self.keepLetterSignsFrame: - xTF = TextFrameHandler.getFrameByName("Letter Signs", self.xTextDocument) - if xTF is not None: - xTF.dispose() + xTF = self.getFrameByName( + "Letter Signs", TextDocument.xTextDocument) + if xTF != None: + xTF.dispose() if not self.keepSenderAddressRepeatedFrame: - xTF = TextFrameHandler.getFrameByName("Sender Address Repeated", self.xTextDocument) - if xTF is not None: - xTF.dispose() + xTF = self.getFrameByName( + "Sender Address Repeated", TextDocument.xTextDocument) + if xTF != None: + xTF.dispose() if not self.keepAddressFrame: - xTF = TextFrameHandler.getFrameByName("Sender Address", self.xTextDocument) - if xTF is not None: - xTF.dispose() + xTF = self.getFrameByName( + "Sender Address", TextDocument.xTextDocument) + if xTF != None: + xTF.dispose() - except Exception, e: + except Exception: traceback.print_exc() -class BusinessPaperObject(object): + class BusinessPaperObject(object): - def __init__(self, FrameText, Width, Height, XPos, YPos): - self.iWidth = Width - self.iHeight = Height - self.iXPos = XPos - self.iYPos = YPos + xFrame = None - try: - xFrame = self.xTextDocument.createInstance("com.sun.star.text.TextFrame") - self.setFramePosition() - Helper.setUnoPropertyValue(xFrame, "AnchorType", TextContentAnchorType.AT_PAGE) - Helper.setUnoPropertyValue(xFrame, "SizeType", SizeType.FIX) - - Helper.setUnoPropertyValue(xFrame, "TextWrap", WrapTextMode.THROUGHT) - Helper.setUnoPropertyValue(xFrame, "Opaque", Boolean.TRUE) - Helper.setUnoPropertyValue(xFrame, "BackColor", 15790320) - - myBorder = BorderLine() - myBorder.OuterLineWidth = 0 - Helper.setUnoPropertyValue(xFrame, "LeftBorder", myBorder) - Helper.setUnoPropertyValue(xFrame, "RightBorder", myBorder) - Helper.setUnoPropertyValue(xFrame, "TopBorder", myBorder) - Helper.setUnoPropertyValue(xFrame, "BottomBorder", myBorder) - Helper.setUnoPropertyValue(xFrame, "Print", False) - - xTextCursor = self.xTextDocument.Text.createTextCursor() - xTextCursor.gotoEnd(True) - xText = self.xTextDocument.Text - xText.insertTextContent(xTextCursor, xFrame, False) - - xFrameText = xFrame.Text - xFrameCursor = xFrameText.createTextCursor() - xFrameCursor.setPropertyValue("CharWeight", com.sun.star.awt.FontWeight.BOLD) - xFrameCursor.setPropertyValue("CharColor", 16777215) - xFrameCursor.setPropertyValue("CharFontName", "Albany") - xFrameCursor.setPropertyValue("CharHeight", 18) - - xFrameText.insertString(xFrameCursor, FrameText, False) + def __init__(self, FrameText, Width, Height, XPos, YPos): + self.iWidth = Width + self.iHeight = Height + self.iXPos = XPos + self.iYPos = YPos + try: + LetterDocument.BusinessPaperObject.xFrame = \ + TextDocument.xTextDocument.createInstance( + "com.sun.star.text.TextFrame") + self.setFramePosition() + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "AnchorType", AT_PAGE) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "SizeType", FIX) - except Exception: - traceback.print_exc() + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "TextWrap", THROUGHT) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "Opaque", True); + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "BackColor", 15790320) - def setFramePosition(self): - Helper.setUnoPropertyValue(xFrame, "HoriOrient", HoriOrientation.NONE) - Helper.setUnoPropertyValue(xFrame, "VertOrient", VertOrientation.NONE) - Helper.setUnoPropertyValue(xFrame, PropertyNames.PROPERTY_HEIGHT, iHeight) - Helper.setUnoPropertyValue(xFrame, PropertyNames.PROPERTY_WIDTH, iWidth) - Helper.setUnoPropertyValue(xFrame, "HoriOrientPosition", iXPos) - Helper.setUnoPropertyValue(xFrame, "VertOrientPosition", iYPos) - Helper.setUnoPropertyValue(xFrame, "HoriOrientRelation", RelOrientation.PAGE_FRAME) - Helper.setUnoPropertyValue(xFrame, "VertOrientRelation", RelOrientation.PAGE_FRAME) - - def removeFrame(self): - if xFrame is not None: - try: - self.xTextDocument.Text.removeTextContent(xFrame) + myBorder = BorderLine() + myBorder.OuterLineWidth = 0 + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "LeftBorder", myBorder) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "RightBorder", myBorder) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "TopBorder", myBorder) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "BottomBorder", myBorder) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "Print", False) + + xTextCursor = \ + TextDocument.xTextDocument.Text.createTextCursor() + xTextCursor.gotoEnd(True) + xText = TextDocument.xTextDocument.Text + xText.insertTextContent( + xTextCursor, LetterDocument.BusinessPaperObject.xFrame, + False) + + xFrameText = LetterDocument.BusinessPaperObject.xFrame.Text + xFrameCursor = xFrameText.createTextCursor() + xFrameCursor.setPropertyValue("CharWeight", BOLD) + xFrameCursor.setPropertyValue("CharColor", 16777215) + xFrameCursor.setPropertyValue("CharFontName", "Albany") + xFrameCursor.setPropertyValue("CharHeight", 18) + + xFrameText.insertString(xFrameCursor, FrameText, False) except Exception: traceback.print_exc() + def setFramePosition(self): + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "HoriOrient", NONEHORI) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "VertOrient", NONEVERT) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + PropertyNames.PROPERTY_HEIGHT, self.iHeight) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + PropertyNames.PROPERTY_WIDTH, self.iWidth) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "HoriOrientPosition", self.iXPos) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "VertOrientPosition", self.iYPos) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "HoriOrientRelation", PAGE_FRAME) + Helper.setUnoPropertyValue( + LetterDocument.BusinessPaperObject.xFrame, + "VertOrientRelation", PAGE_FRAME) + + def removeFrame(self): + if LetterDocument.BusinessPaperObject.xFrame is not None: + try: + TextDocument.xTextDocument.Text.removeTextContent( + LetterDocument.BusinessPaperObject.xFrame) + except Exception: + traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py index f2fa2f593078..ac87206f243c 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py @@ -10,7 +10,21 @@ class LetterWizardDialog(WizardDialog): super(LetterWizardDialog, self).__init__(xmsf, HIDMAIN ) self.resources = LetterWizardDialogResources(xmsf) - Helper.setUnoPropertyValues(self.xDialogModel, ("Closeable", PropertyNames.PROPERTY_HEIGHT, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH), (True, 210, True, "LetterWizardDialog", 104, 52, 1, 1, self.resources.resLetterWizardDialog_title, 310)) + Helper.setUnoPropertyValues( + self.xDialogModel, + ("Closeable", + PropertyNames.PROPERTY_HEIGHT, + "Moveable", + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Title", + PropertyNames.PROPERTY_WIDTH), + (True, 210, True, + "LetterWizardDialog", 104, 52, 1, 1, + self.resources.resLetterWizardDialog_title, 310)) self.fontDescriptor1 = \ uno.createUnoStruct('com.sun.star.awt.FontDescriptor') self.fontDescriptor2 = \ @@ -26,94 +40,1102 @@ class LetterWizardDialog(WizardDialog): self.fontDescriptor6.Weight = 150 def buildStep1(self): - self.optBusinessLetter = self.insertRadioButton("optBusinessLetter", OPTBUSINESSLETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 1), self.resources.resoptBusinessLetter_value, "optBusinessLetter", 97, 28, 1, 1, 184), self) - self.optPrivOfficialLetter = self.insertRadioButton("optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 2), self.resources.resoptPrivOfficialLetter_value, "optPrivOfficialLetter", 97, 74, 1, 2, 184), self) - self.optPrivateLetter = self.insertRadioButton("optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 3), self.resources.resoptPrivateLetter_value, "optPrivateLetter", 97, 106, 1, 3, 184), self) - self.lstBusinessStyle = self.insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 4), "lstBusinessStyle", 180, 40, 1, 4, 74), self) - self.chkBusinessPaper = self.insertCheckBox("chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 5), self.resources.reschkBusinessPaper_value, "chkBusinessPaper", 110, 56, 0, 1, 5, 168), self) - self.lstPrivOfficialStyle = self.insertListBox("lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED, LSTPRIVOFFICIALSTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 6), "lstPrivOfficialStyle", 180, 86, 1, 6, 74), self) - self.lstPrivateStyle = self.insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 7), "lstPrivateStyle", 180, 118, 1, 7, 74), self) - self.lblBusinessStyle = self.insertLabel("lblBusinessStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblBusinessStyle_value, "lblBusinessStyle", 110, 42, 1, 48, 60)) - self.lblPrivOfficialStyle = self.insertLabel("lblPrivOfficialStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPrivOfficialStyle_value, "lblPrivOfficialStyle", 110, 88, 1, 49, 60)) - self.lblTitle1 = self.insertLabel("lblTitle1", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle1_value, True, "lblTitle1", 91, 8, 1, 55, 212)) - self.lblPrivateStyle = self.insertLabel("lblPrivateStyle", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPrivateStyle_value, "lblPrivateStyle", 110, 120, 1, 74, 60)) - self.lblIntroduction = self.insertLabel("lblIntroduction", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (39, self.resources.reslblIntroduction_value, True, "lblIntroduction", 104, 145, 1, 80, 199)) + self.optBusinessLetter = self.insertRadioButton( + "optBusinessLetter", OPTBUSINESSLETTER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 1), + self.resources.resoptBusinessLetter_value, + "optBusinessLetter", 97, 28, 1, 1, 184), self) + self.optPrivOfficialLetter = self.insertRadioButton( + "optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 2), + self.resources.resoptPrivOfficialLetter_value, + "optPrivOfficialLetter", 97, 74, 1, 2, 184), self) + self.optPrivateLetter = self.insertRadioButton( + "optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 3), + self.resources.resoptPrivateLetter_value, + "optPrivateLetter", 97, 106, 1, 3, 184), self) + self.lstBusinessStyle = self.insertListBox( + "lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, + LSTBUSINESSSTYLE_ITEM_CHANGED, + ("Dropdown", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, HelpIds.getHelpIdString(HID + 4), + "lstBusinessStyle", + 180, 40, 1, 4, 74), self) + self.chkBusinessPaper = self.insertCheckBox( + "chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 5), + self.resources.reschkBusinessPaper_value, + "chkBusinessPaper", 110, 56, 0, 1, 5, 168), self) + self.lstPrivOfficialStyle = self.insertListBox( + "lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED, + LSTPRIVOFFICIALSTYLE_ITEM_CHANGED, + ("Dropdown", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, HelpIds.getHelpIdString(HID + 6), + "lstPrivOfficialStyle", 180, 86, 1, 6, 74), self) + self.lstPrivateStyle = self.insertListBox( + "lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, + LSTPRIVATESTYLE_ITEM_CHANGED, + ("Dropdown", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, HelpIds.getHelpIdString(HID + 7), + "lstPrivateStyle", 180, 118, 1, 7, 74), self) + self.lblBusinessStyle = self.insertLabel( + "lblBusinessStyle", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblBusinessStyle_value, + "lblBusinessStyle", 110, 42, 1, 48, 60)) + self.lblPrivOfficialStyle = self.insertLabel( + "lblPrivOfficialStyle", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblPrivOfficialStyle_value, + "lblPrivOfficialStyle", 110, 88, 1, 49, 60)) + self.lblTitle1 = self.insertLabel( + "lblTitle1", + ("FontDescriptor", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor6, 16, + self.resources.reslblTitle1_value, True, + "lblTitle1", 91, 8, 1, 55, 212)) + self.lblPrivateStyle = self.insertLabel( + "lblPrivateStyle", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblPrivateStyle_value, + "lblPrivateStyle", 110, 120, 1, 74, 60)) + self.lblIntroduction = self.insertLabel( + "lblIntroduction", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (39, self.resources.reslblIntroduction_value, + True, + "lblIntroduction", 104, 145, 1, 80, 199)) self.ImageControl3 = self.insertInfoImage(92, 145, 1) def buildStep2(self): - self.chkPaperCompanyLogo = self.insertCheckBox("chkPaperCompanyLogo", CHKPAPERCOMPANYLOGO_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 8), self.resources.reschkPaperCompanyLogo_value, "chkPaperCompanyLogo", 97, 28, 0, 2, 8, 68), self) - self.numLogoHeight = self.insertNumericField("numLogoHeight", NUMLOGOHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, "StrictFormat", PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 9), "numLogoHeight", 138, 40, True, 2, True, 9, 3, 30), self) - self.numLogoX = self.insertNumericField("numLogoX", NUMLOGOX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 10), "numLogoX", 266, 40, True, 2, 10, 0, 30), self) - self.numLogoWidth = self.insertNumericField("numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 11), "numLogoWidth", 138, 56, True, 2, 11, 3.8, 30), self) - self.numLogoY = self.insertNumericField("numLogoY", NUMLOGOY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 12), "numLogoY", 266, 56, True, 2, 12, -3.4, 30), self) - self.chkPaperCompanyAddress = self.insertCheckBox("chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 13), self.resources.reschkPaperCompanyAddress_value, "chkPaperCompanyAddress", 98, 84, 0, 2, 13, 68), self) - self.numAddressHeight = self.insertNumericField("numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, "StrictFormat", PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 14), "numAddressHeight", 138, 96, True, 2, True, 14, 3, 30), self) - self.numAddressX = self.insertNumericField("numAddressX", NUMADDRESSX_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 15), "numAddressX", 266, 96, True, 2, 15, 3.8, 30), self) - self.numAddressWidth = self.insertNumericField("numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 16), "numAddressWidth", 138, 112, True, 2, 16, 13.8, 30), self) - self.numAddressY = self.insertNumericField("numAddressY", NUMADDRESSY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 17), "numAddressY", 266, 112, True, 2, 17, -3.4, 30), self) - self.chkCompanyReceiver = self.insertCheckBox("chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 18), self.resources.reschkCompanyReceiver_value, "chkCompanyReceiver", 103, 131, 0, 2, 18, 185), self) - self.chkPaperFooter = self.insertCheckBox("chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 19), self.resources.reschkPaperFooter_value, "chkPaperFooter", 97, 158, 0, 2, 19, 68), self) - self.numFooterHeight = self.insertNumericField("numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 20), "numFooterHeight", 236, 156, True, 2, 20, 5, 30), self) - self.lblLogoHeight = self.insertLabel("lblLogoHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoHeight_value, "lblLogoHeight", 103, 42, 2, 68, 32)) - self.lblLogoWidth = self.insertLabel("lblLogoWidth", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoWidth_value, "lblLogoWidth", 103, 58, 2, 69, 32)) - self.FixedLine5 = self.insertFixedLine("FixedLine5", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (2, "FixedLine5", 90, 78, 2, 70, 215)) - self.FixedLine6 = self.insertFixedLine("FixedLine6", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (2, "FixedLine6", 90, 150, 2, 71, 215)) - self.lblFooterHeight = self.insertLabel("lblFooterHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblFooterHeight_value, "lblFooterHeight", 200, 158, 2, 72, 32)) - self.lblLogoX = self.insertLabel("lblLogoX", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoX_value, "lblLogoX", 170, 42, 2, 84, 94)) - self.lblLogoY = self.insertLabel("lblLogoY", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblLogoY_value, "lblLogoY", 170, 58, 2, 85, 94)) - self.lblAddressHeight = self.insertLabel("lblAddressHeight", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressHeight_value, "lblAddressHeight", 103, 98, 2, 86, 32)) - self.lblAddressWidth = self.insertLabel("lblAddressWidth", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressWidth_value, "lblAddressWidth", 103, 114, 2, 87, 32)) - self.lblAddressX = self.insertLabel("lblAddressX", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressX_value, "lblAddressX", 170, 98, 2, 88, 94)) - self.lblAddressY = self.insertLabel("lblAddressY", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblAddressY_value, "lblAddressY", 170, 114, 2, 89, 94)) - self.lblTitle2 = self.insertLabel("lblTitle2", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle2_value, True, "lblTitle2", 91, 8, 2, 91, 212)) + self.chkPaperCompanyLogo = self.insertCheckBox( + "chkPaperCompanyLogo", + CHKPAPERCOMPANYLOGO_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 8), + self.resources.reschkPaperCompanyLogo_value, + "chkPaperCompanyLogo", 97, 28, 0, 2, 8, 68), self) + self.numLogoHeight = self.insertNumericField( + "numLogoHeight", + NUMLOGOHEIGHT_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + "StrictFormat", + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 9), + "numLogoHeight", 138, 40, True, 2, True, 9, 3, 30), self) + self.numLogoX = self.insertNumericField( + "numLogoX", NUMLOGOX_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 10), + "numLogoX", 266, 40, True, 2, 10, 0, 30), self) + self.numLogoWidth = self.insertNumericField( + "numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 11), + "numLogoWidth", 138, 56, True, 2, 11, 3.8, 30), self) + self.numLogoY = self.insertNumericField( + "numLogoY", NUMLOGOY_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 12), + "numLogoY", 266, 56, True, 2, 12, -3.4, 30), self) + self.chkPaperCompanyAddress = self.insertCheckBox( + "chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 13), + self.resources.reschkPaperCompanyAddress_value, + "chkPaperCompanyAddress", 98, 84, 0, 2, 13, 68), self) + self.numAddressHeight = self.insertNumericField( + "numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + "StrictFormat", + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 14), + "numAddressHeight", 138, 96, True, 2, True, 14, 3, 30), self) + self.numAddressX = self.insertNumericField( + "numAddressX", NUMADDRESSX_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 15), + "numAddressX", 266, 96, True, 2, 15, 3.8, 30), self) + self.numAddressWidth = self.insertNumericField( + "numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 16), + "numAddressWidth", 138, 112, True, 2, 16, 13.8, 30), self) + self.numAddressY = self.insertNumericField( + "numAddressY", NUMADDRESSY_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 17), + "numAddressY", 266, 112, True, 2, 17, -3.4, 30), self) + self.chkCompanyReceiver = self.insertCheckBox( + "chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 18), + self.resources.reschkCompanyReceiver_value, + "chkCompanyReceiver", 103, 131, 0, 2, 18, 185), self) + self.chkPaperFooter = self.insertCheckBox( + "chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 19), + self.resources.reschkPaperFooter_value, + "chkPaperFooter", 97, 158, 0, 2, 19, 68), self) + self.numFooterHeight = self.insertNumericField( + "numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "Spin", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Value", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 20), + "numFooterHeight", 236, 156, True, 2, 20, 5, 30), self) + self.lblLogoHeight = self.insertLabel( + "lblLogoHeight", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblLogoHeight_value, + "lblLogoHeight", 103, 42, 2, 68, 32)) + self.lblLogoWidth = self.insertLabel( + "lblLogoWidth", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblLogoWidth_value, + "lblLogoWidth", 103, 58, 2, 69, 32)) + self.FixedLine5 = self.insertFixedLine( + "FixedLine5", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (2, + "FixedLine5", 90, 78, 2, 70, 215)) + self.FixedLine6 = self.insertFixedLine( + "FixedLine6", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (2, + "FixedLine6", 90, 150, 2, 71, 215)) + self.lblFooterHeight = self.insertLabel( + "lblFooterHeight", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblFooterHeight_value, + "lblFooterHeight", 200, 158, 2, 72, 32)) + self.lblLogoX = self.insertLabel( + "lblLogoX", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblLogoX_value, + "lblLogoX", 170, 42, 2, 84, 94)) + self.lblLogoY = self.insertLabel( + "lblLogoY", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblLogoY_value, + "lblLogoY", 170, 58, 2, 85, 94)) + self.lblAddressHeight = self.insertLabel( + "lblAddressHeight", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblAddressHeight_value, + "lblAddressHeight", 103, 98, 2, 86, 32)) + self.lblAddressWidth = self.insertLabel( + "lblAddressWidth", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblAddressWidth_value, + "lblAddressWidth", 103, 114, 2, 87, 32)) + self.lblAddressX = self.insertLabel( + "lblAddressX", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblAddressX_value, + "lblAddressX", 170, 98, 2, 88, 94)) + self.lblAddressY = self.insertLabel( + "lblAddressY", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblAddressY_value, + "lblAddressY", 170, 114, 2, 89, 94)) + self.lblTitle2 = self.insertLabel( + "lblTitle2", + ("FontDescriptor", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor6, 16, + self.resources.reslblTitle2_value, True, + "lblTitle2", 91, 8, 2, 91, 212)) def buildStep3(self): - self.lstLetterNorm = self.insertListBox("lstLetterNorm", LSTLETTERNORM_ACTION_PERFORMED, LSTLETTERNORM_ITEM_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 21), "lstLetterNorm", 210, 34, 3, 21, 74), self) - self.chkUseLogo = self.insertCheckBox("chkUseLogo", CHKUSELOGO_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 22), self.resources.reschkUseLogo_value, "chkUseLogo", 97, 54, 0, 3, 22, 212), self) - self.chkUseAddressReceiver = self.insertCheckBox("chkUseAddressReceiver", CHKUSEADDRESSRECEIVER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 23), self.resources.reschkUseAddressReceiver_value, "chkUseAddressReceiver", 97, 69, 0, 3, 23, 212), self) - self.chkUseSigns = self.insertCheckBox("chkUseSigns", CHKUSESIGNS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 24), self.resources.reschkUseSigns_value, "chkUseSigns", 97, 82, 0, 3, 24, 212), self) - self.chkUseSubject = self.insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 25), self.resources.reschkUseSubject_value, "chkUseSubject", 97, 98, 0, 3, 25, 212), self) - self.chkUseSalutation = self.insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 26), self.resources.reschkUseSalutation_value, "chkUseSalutation", 97, 113, 0, 3, 26, 66), self) - self.lstSalutation = self.insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, LSTSALUTATION_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 27), "lstSalutation", 210, 110, 3, 27, 74), self) - self.chkUseBendMarks = self.insertCheckBox("chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 28), self.resources.reschkUseBendMarks_value, "chkUseBendMarks", 97, 127, 0, 3, 28, 212), self) - self.chkUseGreeting = self.insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 29), self.resources.reschkUseGreeting_value, "chkUseGreeting", 97, 142, 0, 3, 29, 66), self) - self.lstGreeting = self.insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED, ("Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (True, 12, HelpIds.getHelpIdString(HID + 30), "lstGreeting", 210, 141, 3, 30, 74), self) - self.chkUseFooter = self.insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 31), self.resources.reschkUseFooter_value, "chkUseFooter", 97, 158, 0, 3, 31, 212), self) - self.lblLetterNorm = self.insertLabel("lblLetterNorm", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (16, self.resources.reslblLetterNorm_value, True, "lblLetterNorm", 97, 28, 3, 50, 109)) - self.lblTitle3 = self.insertLabel("lblTitle3", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle3_value, True, "lblTitle3", 91, 8, 3, 90, 212)) + self.lstLetterNorm = self.insertListBox( + "lstLetterNorm", + LSTLETTERNORM_ACTION_PERFORMED, + LSTLETTERNORM_ITEM_CHANGED, + ("Dropdown", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, HelpIds.getHelpIdString(HID + 21), + "lstLetterNorm", 210, 34, 3, 21, 74), self) + self.chkUseLogo = self.insertCheckBox( + "chkUseLogo", CHKUSELOGO_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 22), + self.resources.reschkUseLogo_value, + "chkUseLogo", 97, 54, 0, 3, 22, 212), self) + self.chkUseAddressReceiver = self.insertCheckBox( + "chkUseAddressReceiver", + CHKUSEADDRESSRECEIVER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 23), + self.resources.reschkUseAddressReceiver_value, + "chkUseAddressReceiver", 97, 69, 0, 3, 23, 212), self) + self.chkUseSigns = self.insertCheckBox( + "chkUseSigns", CHKUSESIGNS_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 24), + self.resources.reschkUseSigns_value, + "chkUseSigns", 97, 82, 0, 3, 24, 212), self) + self.chkUseSubject = self.insertCheckBox( + "chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 25), + self.resources.reschkUseSubject_value, + "chkUseSubject", 97, 98, 0, 3, 25, 212), self) + self.chkUseSalutation = self.insertCheckBox( + "chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 26), + self.resources.reschkUseSalutation_value, + "chkUseSalutation", 97, 113, 0, 3, 26, 66), self) + self.lstSalutation = self.insertComboBox( + "lstSalutation", + LSTSALUTATION_ACTION_PERFORMED, + LSTSALUTATION_ITEM_CHANGED, + LSTSALUTATION_TEXT_CHANGED, + ("Dropdown", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, HelpIds.getHelpIdString(HID + 27), + "lstSalutation", 210, 110, 3, 27, 74), self) + self.chkUseBendMarks = self.insertCheckBox( + "chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 28), + self.resources.reschkUseBendMarks_value, + "chkUseBendMarks", 97, 127, 0, 3, 28, 212), self) + self.chkUseGreeting = self.insertCheckBox( + "chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 29), + self.resources.reschkUseGreeting_value, + "chkUseGreeting", 97, 142, 0, 3, 29, 66), self) + self.lstGreeting = self.insertComboBox( + "lstGreeting", LSTGREETING_ACTION_PERFORMED, + LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED, + ("Dropdown", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (True, 12, HelpIds.getHelpIdString(HID + 30), + "lstGreeting", 210, 141, 3, 30, 74), self) + self.chkUseFooter = self.insertCheckBox( + "chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 31), + self.resources.reschkUseFooter_value, + "chkUseFooter", 97, 158, 0, 3, 31, 212), self) + self.lblLetterNorm = self.insertLabel( + "lblLetterNorm", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (16, self.resources.reslblLetterNorm_value, True, + "lblLetterNorm", 97, 28, 3, 50, 109)) + self.lblTitle3 = self.insertLabel( + "lblTitle3", + ( + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor6, 16, + self.resources.reslblTitle3_value, True, + "lblTitle3", 91, 8, 3, 90, 212)) def buildStep4(self): - self.optSenderPlaceholder = self.insertRadioButton("optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 32), self.resources.resoptSenderPlaceholder_value, "optSenderPlaceholder", 104, 42, 4, 32, 149), self) - self.optSenderDefine = self.insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 33), self.resources.resoptSenderDefine_value, "optSenderDefine", 104, 54, 4, 33, 149), self) - self.txtSenderName = self.insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 34), "txtSenderName", 182, 67, 4, 34, 119), self) - self.txtSenderStreet = self.insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 35), "txtSenderStreet", 182, 81, 4, 35, 119), self) - self.txtSenderPostCode = self.insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 36), "txtSenderPostCode", 182, 95, 4, 36, 25), self) - self.txtSenderState = self.insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 37), "txtSenderState", 211, 95, 4, 37, 21), self) - self.txtSenderCity = self.insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 38), "txtSenderCity", 236, 95, 4, 38, 65), self) - self.optReceiverPlaceholder = self.insertRadioButton("optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 39), self.resources.resoptReceiverPlaceholder_value, "optReceiverPlaceholder", 104, 145, 4, 39, 200), self) - self.optReceiverDatabase = self.insertRadioButton("optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 40), self.resources.resoptReceiverDatabase_value, "optReceiverDatabase", 104, 157, 4, 40, 200), self) - self.lblSenderAddress = self.insertLabel("lblSenderAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderAddress_value, "lblSenderAddress", 97, 28, 4, 64, 136)) - self.FixedLine2 = self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (5, "FixedLine2", 90, 126, 4, 75, 212)) - self.lblReceiverAddress = self.insertLabel("lblReceiverAddress", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblReceiverAddress_value, "lblReceiverAddress", 97, 134, 4, 76, 136)) - self.lblSenderName = self.insertLabel("lblSenderName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderName_value, "lblSenderName", 113, 69, 4, 77, 68)) - self.lblSenderStreet = self.insertLabel("lblSenderStreet", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblSenderStreet_value, "lblSenderStreet", 113, 82, 4, 78, 68)) - self.lblPostCodeCity = self.insertLabel("lblPostCodeCity", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblPostCodeCity_value, "lblPostCodeCity", 113, 97, 4, 79, 68)) - self.lblTitle4 = self.insertLabel("lblTitle4", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle4_value, True, "lblTitle4", 91, 8, 4, 92, 212)) + self.optSenderPlaceholder = self.insertRadioButton( + "optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 32), + self.resources.resoptSenderPlaceholder_value, + "optSenderPlaceholder", 104, 42, 4, 32, 149), self) + self.optSenderDefine = self.insertRadioButton( + "optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 33), + self.resources.resoptSenderDefine_value, + "optSenderDefine", 104, 54, 4, 33, 149), self) + self.txtSenderName = self.insertTextField( + "txtSenderName", TXTSENDERNAME_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 34), + "txtSenderName", 182, 67, 4, 34, 119), self) + self.txtSenderStreet = self.insertTextField( + "txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 35), + "txtSenderStreet", 182, 81, 4, 35, 119), self) + self.txtSenderPostCode = self.insertTextField( + "txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 36), + "txtSenderPostCode", 182, 95, 4, 36, 25), self) + self.txtSenderState = self.insertTextField( + "txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 37), + "txtSenderState", 211, 95, 4, 37, 21), self) + self.txtSenderCity = self.insertTextField( + "txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 38), + "txtSenderCity", 236, 95, 4, 38, 65), self) + self.optReceiverPlaceholder = self.insertRadioButton( + "optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 39), + self.resources.resoptReceiverPlaceholder_value, + "optReceiverPlaceholder", 104, 145, 4, 39, 200), self) + self.optReceiverDatabase = self.insertRadioButton( + "optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 40), + self.resources.resoptReceiverDatabase_value, + "optReceiverDatabase", 104, 157, 4, 40, 200), self) + self.lblSenderAddress = self.insertLabel( + "lblSenderAddress", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblSenderAddress_value, + "lblSenderAddress", 97, 28, 4, 64, 136)) + self.FixedLine2 = self.insertFixedLine( + "FixedLine2", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (5, + "FixedLine2", 90, 126, 4, 75, 212)) + self.lblReceiverAddress = self.insertLabel( + "lblReceiverAddress", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblReceiverAddress_value, + "lblReceiverAddress", 97, 134, 4, 76, 136)) + self.lblSenderName = self.insertLabel( + "lblSenderName", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblSenderName_value, + "lblSenderName", 113, 69, 4, 77, 68)) + self.lblSenderStreet = self.insertLabel( + "lblSenderStreet", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblSenderStreet_value, + "lblSenderStreet", 113, 82, 4, 78, 68)) + self.lblPostCodeCity = self.insertLabel( + "lblPostCodeCity", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblPostCodeCity_value, + "lblPostCodeCity", 113, 97, 4, 79, 68)) + self.lblTitle4 = self.insertLabel( + "lblTitle4", + ( + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor6, 16, + self.resources.reslblTitle4_value, True, + "lblTitle4", 91, 8, 4, 92, 212)) def buildStep5(self): - self.txtFooter = self.insertTextField("txtFooter", TXTFOOTER_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (47, HelpIds.getHelpIdString(HID + 41), True, "txtFooter", 97, 40, 5, 41, 203), self) - self.chkFooterNextPages = self.insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 42), self.resources.reschkFooterNextPages_value, "chkFooterNextPages", 97, 92, 0, 5, 42, 202), self) - self.chkFooterPageNumbers = self.insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 43), self.resources.reschkFooterPageNumbers_value, "chkFooterPageNumbers", 97, 106, 0, 5, 43, 201), self) - self.lblFooter = self.insertLabel("lblFooter", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor5, 8, self.resources.reslblFooter_value, "lblFooter", 97, 28, 5, 52, 116)) - self.lblTitle5 = self.insertLabel("lblTitle5", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle5_value, True, "lblTitle5", 91, 8, 5, 93, 212)) + self.txtFooter = self.insertTextField( + "txtFooter", TXTFOOTER_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (47, HelpIds.getHelpIdString(HID + 41), True, + "txtFooter", 97, 40, 5, 41, 203), self) + self.chkFooterNextPages = self.insertCheckBox( + "chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 42), + self.resources.reschkFooterNextPages_value, + "chkFooterNextPages", 97, 92, 0, 5, 42, 202), self) + self.chkFooterPageNumbers = self.insertCheckBox( + "chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 43), + self.resources.reschkFooterPageNumbers_value, + "chkFooterPageNumbers", 97, 106, 0, 5, 43, 201), self) + self.lblFooter = self.insertLabel( + "lblFooter", + ( + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor5, 8, self.resources.reslblFooter_value, + "lblFooter", 97, 28, 5, 52, 116)) + self.lblTitle5 = self.insertLabel( + "lblTitle5", + ( + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor6, 16, + self.resources.reslblTitle5_value, True, + "lblTitle5", 91, 8, 5, 93, 212)) def buildStep6(self): - self.txtTemplateName = self.insertTextField("txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH), (12, HelpIds.getHelpIdString(HID + 44), "txtTemplateName", 202, 56, 6, 44, self.resources.restxtTemplateName_value, 100), self) - self.optCreateLetter = self.insertRadioButton("optCreateLetter", OPTCREATELETTER_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 45), self.resources.resoptCreateLetter_value, "optCreateLetter", 104, 111, 6, 50, 198), self) - self.optMakeChanges = self.insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, HelpIds.getHelpIdString(HID + 46), self.resources.resoptMakeChanges_value, "optMakeChanges", 104, 123, 6, 51, 198), self) - self.lblFinalExplanation1 = self.insertLabel("lblFinalExplanation1", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (26, self.resources.reslblFinalExplanation1_value, True, "lblFinalExplanation1", 97, 28, 6, 52, 205)) - self.lblProceed = self.insertLabel("lblProceed", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblProceed_value, "lblProceed", 97, 100, 6, 53, 204)) - self.lblFinalExplanation2 = self.insertLabel("lblFinalExplanation2", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (33, self.resources.reslblFinalExplanation2_value, True, "lblFinalExplanation2", 104, 145, 6, 54, 199)) - self.ImageControl2 = self.insertImage("ImageControl2", ("Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (0, 10, "private:resource/dbu/image/19205", "ImageControl2", 92, 145, False, 6, 66, 10)) - self.lblTemplateName = self.insertLabel("lblTemplateName", (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (8, self.resources.reslblTemplateName_value, "lblTemplateName", 97, 58, 6, 82, 101)) - self.lblTitle6 = self.insertLabel("lblTitle6", ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH), (self.fontDescriptor6, 16, self.resources.reslblTitle6_value, True, "lblTitle6", 91, 8, 6, 94, 212)) + self.txtTemplateName = self.insertTextField( + "txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + "Text", + PropertyNames.PROPERTY_WIDTH), + (12, HelpIds.getHelpIdString(HID + 44), + "txtTemplateName", 202, 56, 6, 44, + self.resources.restxtTemplateName_value, 100), self) + self.optCreateLetter = self.insertRadioButton( + "optCreateLetter", OPTCREATELETTER_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 45), + self.resources.resoptCreateLetter_value, + "optCreateLetter", 104, 111, 6, 50, 198), self) + self.optMakeChanges = self.insertRadioButton( + "optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, HelpIds.getHelpIdString(HID + 46), + self.resources.resoptMakeChanges_value, + "optMakeChanges", 104, 123, 6, 51, 198), self) + self.lblFinalExplanation1 = self.insertLabel( + "lblFinalExplanation1", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (26, self.resources.reslblFinalExplanation1_value, True, + "lblFinalExplanation1", 97, 28, 6, 52, 205)) + self.lblProceed = self.insertLabel( + "lblProceed", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblProceed_value, + "lblProceed", 97, 100, 6, 53, 204)) + self.lblFinalExplanation2 = self.insertLabel( + "lblFinalExplanation2", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (33, self.resources.reslblFinalExplanation2_value, True, + "lblFinalExplanation2", 104, 145, 6, 54, 199)) + self.ImageControl2 = self.insertImage( + "ImageControl2", + ( + "Border", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_IMAGEURL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + "ScaleImage", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (0, 10, + "private:resource/dbu/image/19205", + "ImageControl2", 92, 145, False, 6, 66, 10)) + self.lblTemplateName = self.insertLabel( + "lblTemplateName", + (PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (8, self.resources.reslblTemplateName_value, + "lblTemplateName", 97, 58, 6, 82, 101)) + self.lblTitle6 = self.insertLabel( + "lblTitle6", + ( + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_MULTILINE, + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH), + (self.fontDescriptor6, 16, + self.resources.reslblTitle6_value, True, + "lblTitle6", 91, 8, 6, 94, 212)) diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py index f6b61e77a73a..f1eb6af81293 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py @@ -1,6 +1,6 @@ import traceback from LetterWizardDialog import * -from LetterDocument import LetterDocument +from LetterDocument import * from common.NoValidPathException import * from common.FileAccess import * from LocaleCodes import LocaleCodes @@ -12,6 +12,11 @@ from ui.event.RadioDataAware import * from document.OfficeDocument import OfficeDocument from ui.XPathSelectionListener import XPathSelectionListener from text.TextFieldHandler import TextFieldHandler +from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO + +from com.sun.star.view.DocumentZoomType import OPTIMAL +from com.sun.star.document.UpdateDocMode import FULL_UPDATE +from com.sun.star.document.MacroExecMode import ALWAYS_EXECUTE class LetterWizardDialogImpl(LetterWizardDialog): RM_TYPESTYLE = 1 @@ -91,22 +96,28 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.myConfig.cp_PrivateLetter.cp_Norm = oL self.initializeTemplates(xMSF) if self.myConfig.cp_BusinessLetter.cp_Greeting == "": - self.myConfig.cp_BusinessLetter.cp_Greeting = self.resources.GreetingLabels[0] + self.myConfig.cp_BusinessLetter.cp_Greeting = \ + self.resources.GreetingLabels[0] if self.myConfig.cp_BusinessLetter.cp_Salutation == "": - self.myConfig.cp_BusinessLetter.cp_Salutation = self.resources.SalutationLabels[0] + self.myConfig.cp_BusinessLetter.cp_Salutation = \ + self.resources.SalutationLabels[0] if self.myConfig.cp_PrivateOfficialLetter.cp_Greeting == "": - self.myConfig.cp_PrivateOfficialLetter.cp_Greeting = self.resources.GreetingLabels[1] + self.myConfig.cp_PrivateOfficialLetter.cp_Greeting = \ + self.resources.GreetingLabels[1] if self.myConfig.cp_PrivateOfficialLetter.cp_Salutation == "": - self.myConfig.cp_PrivateOfficialLetter.cp_Salutation = self.resources.SalutationLabels[1] + self.myConfig.cp_PrivateOfficialLetter.cp_Salutation = \ + self.resources.SalutationLabels[1] if self.myConfig.cp_PrivateLetter.cp_Greeting == "": - self.myConfig.cp_PrivateLetter.cp_Greeting = self.resources.GreetingLabels[2] + self.myConfig.cp_PrivateLetter.cp_Greeting = \ + self.resources.GreetingLabels[2] if self.myConfig.cp_PrivateLetter.cp_Salutation == "": - self.myConfig.cp_PrivateLetter.cp_Salutation = self.resources.SalutationLabels[2] + self.myConfig.cp_PrivateLetter.cp_Salutation = \ + self.resources.SalutationLabels[2] self.updateUI() if self.myPathSelection.xSaveTextBox.Text.lower() == "": @@ -134,52 +145,71 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.running = False def finishWizard(self): - switchToStep(getCurrentStep(), getMaxStep()) + self.switchToStep(self.getCurrentStep(), self.nMaxStep) try: - fileAccess = FileAccess.FileAccess_unknown(xMSF) + fileAccess = FileAccess(self.xMSF) self.sPath = self.myPathSelection.getSelectedPath() - if self.sPath.equals(""): + if self.sPath == "": self.myPathSelection.triggerPathPicker() self.sPath = self.myPathSelection.getSelectedPath() self.sPath = fileAccess.getURL(self.sPath) if not self.filenameChanged: if fileAccess.exists(self.sPath, True): - answer = SystemDialog.showMessageBox(xMSF, xControl.getPeer(), "MessBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, self.resources.resOverwriteWarning) + answer = SystemDialog.showMessageBox( + self.xMSF, "MessBox", YES_NO + DEF_NO, + self.resources.resOverwriteWarning, + self.xUnoDialog.Peer) if answer == 3: - return False; + return False - self.myLetterDoc.setWizardTemplateDocInfo(self.resources.resLetterWizardDialog_title, self.resources.resTemplateDescription) + self.myLetterDoc.setWizardTemplateDocInfo( + self.resources.resLetterWizardDialog_title, + self.resources.resTemplateDescription) self.myLetterDoc.killEmptyUserFields() - self.myLetterDoc.keepLogoFrame = (chkUseLogo.State != 0) - if (chkBusinessPaper.State != 0) and (chkPaperCompanyLogo.State != 0): + self.myLetterDoc.keepLogoFrame = self.chkUseLogo.State != 0 + if self.chkBusinessPaper.State != 0 \ + and self.chkPaperCompanyLogo.State != 0: self.myLetterDoc.keepLogoFrame = False - self.myLetterDoc.keepBendMarksFrame = (chkUseBendMarks.State != 0) - self.myLetterDoc.keepLetterSignsFrame = (chkUseSigns.State != 0) - self.myLetterDoc.keepSenderAddressRepeatedFrame = (chkUseAddressReceiver.State != 0) - if optBusinessLetter.State: - if (chkBusinessPaper.State != 0) and (self.chkCompanyReceiver.State != 0): + self.myLetterDoc.keepBendMarksFrame = \ + self.chkUseBendMarks.State != 0 + self.myLetterDoc.keepLetterSignsFrame = \ + self.chkUseSigns.State != 0 + self.myLetterDoc.keepSenderAddressRepeatedFrame = \ + self.chkUseAddressReceiver.State != 0 + if self.optBusinessLetter.State: + if self.chkBusinessPaper.State != 0 \ + and self.chkCompanyReceiver.State != 0: self.myLetterDoc.keepSenderAddressRepeatedFrame = False - if (chkBusinessPaper.State != 0) and (chkPaperCompanyAddress.State != 0): + if self.chkBusinessPaper.State != 0 \ + and self.chkPaperCompanyAddress.State != 0: self.myLetterDoc.keepAddressFrame = False self.myLetterDoc.killEmptyFrames() - self.bSaveSuccess = OfficeDocument.store(xMSF, self.xTextDocument, self.sPath, "writer8_template", False) + self.bSaveSuccess = \ + OfficeDocument.store( + self.xMSF, TextDocument.xTextDocument, + self.sPath, "writer8_template") if self.bSaveSuccess: - saveConfiguration() - xIH = xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler") + self.saveConfiguration() + xIH = self.xMSF.createInstance( + "com.sun.star.comp.uui.UUIInteractionHandler") loadValues = range(4) - loadValues[0] = PropertyValue.PropertyValue() + loadValues[0] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') loadValues[0].Name = "AsTemplate" - loadValues[1] = PropertyValue.PropertyValue() + loadValues[1] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') loadValues[1].Name = "MacroExecutionMode" - loadValues[1].Value = Short.Short_unknown(MacroExecMode.ALWAYS_EXECUTE) - loadValues[2] = PropertyValue.PropertyValue() + loadValues[1].Value = ALWAYS_EXECUTE + loadValues[2] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') loadValues[2].Name = "UpdateDocMode" - loadValues[2].Value = Short.Short_unknown(com.sun.star.document.UpdateDocMode.FULL_UPDATE) - loadValues[3] = PropertyValue.PropertyValue() + loadValues[2].Value = FULL_UPDATE + loadValues[3] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') loadValues[3].Name = "InteractionHandler" loadValues[3].Value = xIH if self.bEditTemplate: @@ -187,16 +217,18 @@ class LetterWizardDialogImpl(LetterWizardDialog): else: loadValues[0].Value = True - oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), self.sPath, "_default", loadValues) - myViewHandler = ViewHandler(xDocMSF, oDoc) - myViewHandler.setViewSetting("ZoomType", com.sun.star.view.DocumentZoomType.OPTIMAL) + oDoc = OfficeDocument.load( + Desktop.getDesktop(self.xMSF), + self.sPath, "_default", loadValues) + myViewHandler = ViewHandler(self.xMSF, oDoc) + myViewHandler.setViewSetting("ZoomType", OPTIMAL) else: pass except Exception, e: traceback.print_exc() finally: - xDialog.endExecute() + self.xUnoDialog.endExecute() self.running = False return True; @@ -209,14 +241,22 @@ class LetterWizardDialogImpl(LetterWizardDialog): traceback.print_exc() def optBusinessLetterItemChanged(self): - DataAware.setDataObjects(self.letterDA, self.myConfig.cp_BusinessLetter, True) - self.setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) + DataAware.setDataObjects( + self.letterDA, self.myConfig.cp_BusinessLetter, True) + self.setControlProperty( + "lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) self.lstBusinessStyleItemChanged() self.enableSenderReceiver() self.setPossibleFooter(True) @@ -224,14 +264,22 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.myPathSelection.initializePath() def optPrivOfficialLetterItemChanged(self): - DataAware.setDataObjects(self.letterDA, self.myConfig.cp_PrivateOfficialLetter, True) - self.setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) + DataAware.setDataObjects( + self.letterDA, self.myConfig.cp_PrivateOfficialLetter, True) + self.setControlProperty( + "lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, False) self.lstPrivOfficialStyleItemChanged() self.disableBusinessPaper() self.enableSenderReceiver() @@ -240,14 +288,22 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.myPathSelection.initializePath() def optPrivateLetterItemChanged(self): - DataAware.setDataObjects(self.letterDA, self.myConfig.cp_PrivateLetter, True) - self.setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) + DataAware.setDataObjects( + self.letterDA, self.myConfig.cp_PrivateLetter, True) + self.setControlProperty( + "lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, True) self.lstPrivateStyleItemChanged() self.disableBusinessPaper() self.disableSenderReceiver() @@ -256,25 +312,41 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.myPathSelection.initializePath() def optSenderPlaceholderItemChanged(self): - self.setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblSenderName", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblSenderStreet", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "txtSenderName", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "txtSenderStreet", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "txtSenderState", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "txtSenderCity", PropertyNames.PROPERTY_ENABLED, False) self.myLetterDoc.fillSenderWithUserData() def optSenderDefineItemChanged(self): - self.setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblSenderName", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblSenderStreet", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "txtSenderName", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "txtSenderStreet", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "txtSenderState", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "txtSenderCity", PropertyNames.PROPERTY_ENABLED, True) self.txtSenderNameTextChanged() self.txtSenderStreetTextChanged() self.txtSenderPostCodeTextChanged() @@ -288,13 +360,20 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.bEditTemplate = True def optReceiverPlaceholderItemChanged(self): - OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", "StarBasic", "macro:///Template.Correspondence.Placeholder()") + OfficeDocument.attachEventCall( + TextDocument.xTextDocument, "OnNew", "StarBasic", + "macro:///Template.Correspondence.Placeholder()") def optReceiverDatabaseItemChanged(self): - OfficeDocument.attachEventCall(self.xTextDocument, "OnNew", "StarBasic", "macro:///Template.Correspondence.Database()") + OfficeDocument.attachEventCall( + TextDocument.xTextDocument, "OnNew", "StarBasic", + "macro:///Template.Correspondence.Database()") def lstBusinessStyleItemChanged(self): - self.xTextDocument = self.myLetterDoc.loadAsPreview(self.BusinessFiles[1][self.lstBusinessStyle.SelectedItemPos], False) + TextDocument.xTextDocument = \ + self.myLetterDoc.loadAsPreview( + self.BusinessFiles[1][self.lstBusinessStyle.SelectedItemPos], + False) self.myLetterDoc.xTextDocument.lockControllers() self.initializeElements() self.chkBusinessPaperItemChanged() @@ -303,7 +382,10 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.activate() def lstPrivOfficialStyleItemChanged(self): - self.xTextDocument = self.myLetterDoc.loadAsPreview(self.OfficialFiles[1][self.lstPrivOfficialStyle.SelectedItemPos], False) + TextDocument.xTextDocument = \ + self.myLetterDoc.loadAsPreview( + self.OfficialFiles[1][self.lstPrivOfficialStyle.SelectedItemPos], + False) self.myLetterDoc.xTextDocument.lockControllers() self.initializeElements() self.setPossibleSenderData(True) @@ -312,7 +394,10 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.activate() def lstPrivateStyleItemChanged(self): - self.xTextDocument = self.myLetterDoc.loadAsPreview(self.PrivateFiles[1][self.lstPrivateStyle.getSelectedItemPos()], False) + TextDocument.xTextDocument = \ + self.myLetterDoc.loadAsPreview( + self.PrivateFiles[1][self.lstPrivateStyle.getSelectedItemPos()], + False) self.myLetterDoc.xTextDocument.lockControllers() self.initializeElements() self.setElements(True) @@ -320,209 +405,286 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.activate() def numLogoHeightTextChanged(self): - self.BusCompanyLogo.iHeight = (int)(numLogoHeight.getValue() * 1000) + self.BusCompanyLogo.iHeight = numLogoHeight.Value * 1000 self.BusCompanyLogo.setFramePosition() def numLogoWidthTextChanged(self): - self.BusCompanyLogo.iWidth = (int)(numLogoWidth.getValue() * 1000) + self.BusCompanyLogo.iWidth = numLogoWidth.Value * 1000 self.BusCompanyLogo.setFramePosition() def numLogoXTextChanged(self): - self.BusCompanyLogo.iXPos = (int)(numLogoX.getValue() * 1000) + self.BusCompanyLogo.iXPos = numLogoX.Value * 1000 self.BusCompanyLogo.setFramePosition() def numLogoYTextChanged(self): - self.BusCompanyLogo.iYPos = (int)(numLogoY.getValue() * 1000) + self.BusCompanyLogo.iYPos = numLogoY.Value * 1000 self.BusCompanyLogo.setFramePosition() def numAddressWidthTextChanged(self): - self.BusCompanyAddress.iWidth = (int)(self.numAddressWidth.getValue() * 1000) + self.BusCompanyAddress.iWidth = self.numAddressWidth.Value * 1000 self.BusCompanyAddress.setFramePosition() def numAddressXTextChanged(self): - self.BusCompanyAddress.iXPos = (int)(self.numAddressX.getValue() * 1000) + self.BusCompanyAddress.iXPos = self.numAddressX.Value * 1000 self.BusCompanyAddress.setFramePosition() def numAddressYTextChanged(self): - self.BusCompanyAddress.iYPos = (int)(self.numAddressY.getValue() * 1000) + self.BusCompanyAddress.iYPos = self.numAddressY.Value * 1000 self.BusCompanyAddress.setFramePosition() def numAddressHeightTextChanged(self): - self.BusCompanyAddress.iHeight = (int)(self.numAddressHeight.getValue() * 1000) + self.BusCompanyAddress.iHeight = self.numAddressHeight.Value * 1000 self.BusCompanyAddress.setFramePosition() def numFooterHeightTextChanged(self): - self.BusFooter.iHeight = (int)(self.numFooterHeight.getValue() * 1000) - self.BusFooter.iYPos = self.myLetterDoc.DocSize.Height - self.BusFooter.iHeight + self.BusFooter.iHeight = self.numFooterHeight.Value * 1000 + self.BusFooter.iYPos = \ + self.myLetterDoc.DocSize.Height - self.BusFooter.iHeight self.BusFooter.setFramePosition() def chkPaperCompanyLogoItemChanged(self): - if chkPaperCompanyLogo.State != 0: - if numLogoWidth.getValue() == 0: - numLogoWidth.setValue(0.1) - - if numLogoHeight.getValue() == 0: - numLogoHeight.setValue(0.1) - - self.BusCompanyLogo = BusinessPaperObject("Company Logo", (int)(numLogoWidth.getValue() * 1000), (int)(numLogoHeight.getValue() * 1000), (int)(numLogoX.getValue() * 1000), (int)(numLogoY.getValue() * 1000)) - self.setControlProperty("numLogoHeight", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblCompanyLogoHeight", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("numLogoWidth", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblCompanyLogoWidth", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("numLogoX", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblCompanyLogoX", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("numLogoY", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblCompanyLogoY", PropertyNames.PROPERTY_ENABLED, True) - setPossibleLogo(False) + if self.chkPaperCompanyLogo.State != 0: + if self.numLogoWidth.Value == 0: + self.numLogoWidth.Value = 0.1 + + if self.numLogoHeight.Value == 0: + self.numLogoHeight.Value = 0.1 + self.BusCompanyLogo = LetterDocument.BusinessPaperObject( + "Company Logo", self.numLogoWidth.Value * 1000, + self.numLogoHeight.Value * 1000, self.numLogoX.Value * 1000, + self.numLogoY.Value * 1000) + self.setControlProperty( + "numLogoHeight", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblCompanyLogoHeight", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "numLogoWidth", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblCompanyLogoWidth", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "numLogoX", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblCompanyLogoX", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "numLogoY", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblCompanyLogoY", PropertyNames.PROPERTY_ENABLED, True) + self.setPossibleLogo(False) else: if self.BusCompanyLogo != None: self.BusCompanyLogo.removeFrame() - self.setControlProperty("numLogoHeight", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblCompanyLogoHeight", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("numLogoWidth", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblCompanyLogoWidth", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("numLogoX", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblCompanyLogoX", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("numLogoY", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblCompanyLogoY", PropertyNames.PROPERTY_ENABLED, False) - setPossibleLogo(True) + self.setControlProperty( + "numLogoHeight", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblCompanyLogoHeight", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "numLogoWidth", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblCompanyLogoWidth", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "numLogoX", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblCompanyLogoX", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "numLogoY", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblCompanyLogoY", PropertyNames.PROPERTY_ENABLED, False) + self.setPossibleLogo(True) def chkPaperCompanyAddressItemChanged(self): - if chkPaperCompanyAddress.State != 0: - if self.numAddressWidth.getValue() == 0: - self.numAddressWidth.setValue(0.1) - - if self.numAddressHeight.getValue() == 0: - self.numAddressHeight.setValue(0.1) - - self.BusCompanyAddress = BusinessPaperObject("Company Address", (int)(self.numAddressWidth.getValue() * 1000), (int)(self.numAddressHeight.getValue() * 1000), (int)(self.numAddressX.getValue() * 1000), (int)(self.numAddressY.getValue() * 1000)) - self.setControlProperty("self.numAddressHeight", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblCompanyAddressHeight", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("self.numAddressWidth", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblCompanyAddressWidth", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("self.numAddressX", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblCompanyAddressX", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("self.numAddressY", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblCompanyAddressY", PropertyNames.PROPERTY_ENABLED, True) + if self.chkPaperCompanyAddress.State != 0: + if self.numAddressWidth.Value == 0: + self.numAddressWidth.Value = 0.1 + + if self.numAddressHeight.Value == 0: + self.numAddressHeight.Value = 0.1 + + self.BusCompanyAddress = LetterDocument.BusinessPaperObject( + "Company Address", self.numAddressWidth.Value * 1000, + self.numAddressHeight.Value * 1000, + self.numAddressX.Value * 1000, self.numAddressY.Value * 1000) + self.setControlProperty( + "self.numAddressHeight", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblCompanyAddressHeight", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "self.numAddressWidth", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblCompanyAddressWidth", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "self.numAddressX", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblCompanyAddressX", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "self.numAddressY", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblCompanyAddressY", PropertyNames.PROPERTY_ENABLED, True) if self.myLetterDoc.hasElement("Sender Address"): - self.myLetterDoc.switchElement("Sender Address", (False)) + self.myLetterDoc.switchElement( + "Sender Address", False) if self.chkCompanyReceiver.State != 0: - setPossibleSenderData(False) + self.setPossibleSenderData(False) else: if self.BusCompanyAddress != None: self.BusCompanyAddress.removeFrame() - self.setControlProperty("self.numAddressHeight", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblCompanyAddressHeight", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("self.numAddressWidth", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblCompanyAddressWidth", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("self.numAddressX", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblCompanyAddressX", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("self.numAddressY", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblCompanyAddressY", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "self.numAddressHeight", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblCompanyAddressHeight", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "self.numAddressWidth", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblCompanyAddressWidth", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "self.numAddressX", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblCompanyAddressX", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "self.numAddressY", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblCompanyAddressY", PropertyNames.PROPERTY_ENABLED, False) if self.myLetterDoc.hasElement("Sender Address"): - self.myLetterDoc.switchElement("Sender Address", (True)) + self.myLetterDoc.switchElement( + "Sender Address", (True)) - setPossibleSenderData(True) - if optSenderDefine.State: - optSenderDefineItemChanged() + self.setPossibleSenderData(True) + if self.optSenderDefine.State: + self.optSenderDefineItemChanged() - if optSenderPlaceholder.State: - optSenderPlaceholderItemChanged() + if self.optSenderPlaceholder.State: + self.optSenderPlaceholderItemChanged() def chkCompanyReceiverItemChanged(self): xReceiverFrame = None if self.chkCompanyReceiver.State != 0: try: - xReceiverFrame = TextFrameHandler.getFrameByName("Receiver Address", self.xTextDocument) - iFrameWidth = int(Helper.getUnoPropertyValue(xReceiverFrame, PropertyNames.PROPERTY_WIDTH)) - iFrameX = int(Helper.getUnoPropertyValue(xReceiverFrame, "HoriOrientPosition")) - iFrameY = int(Helper.getUnoPropertyValue(xReceiverFrame, "VertOrientPosition")) + xReceiverFrame = TextDocument.getFrameByName( + "Receiver Address", TextDocument.xTextDocument) + iFrameWidth = int(Helper.getUnoPropertyValue( + xReceiverFrame, PropertyNames.PROPERTY_WIDTH)) + iFrameX = int(Helper.getUnoPropertyValue( + xReceiverFrame, "HoriOrientPosition")) + iFrameY = int(Helper.getUnoPropertyValue( + xReceiverFrame, "VertOrientPosition")) iReceiverHeight = int(0.5 * 1000) - self.BusCompanyAddressReceiver = BusinessPaperObject(" ", iFrameWidth, iReceiverHeight, iFrameX, (iFrameY - iReceiverHeight)) - setPossibleAddressReceiver(False) - except NoSuchElementException, e: + self.BusCompanyAddressReceiver = \ + LetterDocument.BusinessPaperObject( + " ", iFrameWidth, iReceiverHeight, iFrameX, + iFrameY - iReceiverHeight) + self.setPossibleAddressReceiver(False) + except NoSuchElementException: traceback.print_exc() - except WrappedTargetException, e: + except WrappedTargetException: traceback.print_exc() - if chkPaperCompanyAddress.State != 0: - setPossibleSenderData(False) + if self.chkPaperCompanyAddress.State != 0: + self.setPossibleSenderData(False) else: if self.BusCompanyAddressReceiver != None: self.BusCompanyAddressReceiver.removeFrame() - setPossibleAddressReceiver(True) - setPossibleSenderData(True) - if optSenderDefine.State: - optSenderDefineItemChanged() + self.setPossibleAddressReceiver(True) + self.setPossibleSenderData(True) + if self.optSenderDefine.State: + self.optSenderDefineItemChanged() - if optSenderPlaceholder.State: - optSenderPlaceholderItemChanged() + if self.optSenderPlaceholder.State: + self.optSenderPlaceholderItemChanged() def chkPaperFooterItemChanged(self): if self.chkPaperFooter.State != 0: - if self.numFooterHeight.getValue() == 0: - self.numFooterHeight.setValue(0.1) - - self.BusFooter = BusinessPaperObject("Footer", self.myLetterDoc.DocSize.Width, (int)(self.numFooterHeight.getValue() * 1000), 0, (int)(self.myLetterDoc.DocSize.Height - (self.numFooterHeight.getValue() * 1000))) - self.setControlProperty("self.numFooterHeight", PropertyNames.PROPERTY_ENABLED, True) - self.setControlProperty("lblFooterHeight", PropertyNames.PROPERTY_ENABLED, True) - setPossibleFooter(False) + if self.numFooterHeight.Value == 0: + self.numFooterHeight.Value = 0.1 + + self.BusFooter = LetterDocument.BusinessPaperObject( + "Footer", self.myLetterDoc.DocSize.Width, + self.numFooterHeight.Value * 1000, 0, + self.myLetterDoc.DocSize.Height - \ + (self.numFooterHeight.Value * 1000)) + self.setControlProperty( + "self.numFooterHeight", PropertyNames.PROPERTY_ENABLED, True) + self.setControlProperty( + "lblFooterHeight", PropertyNames.PROPERTY_ENABLED, True) + self.setPossibleFooter(False) else: if self.BusFooter != None: self.BusFooter.removeFrame() - self.setControlProperty("self.numFooterHeight", PropertyNames.PROPERTY_ENABLED, False) - self.setControlProperty("lblFooterHeight", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "self.numFooterHeight", PropertyNames.PROPERTY_ENABLED, False) + self.setControlProperty( + "lblFooterHeight", PropertyNames.PROPERTY_ENABLED, False) setPossibleFooter(True) def chkUseLogoItemChanged(self): try: if self.myLetterDoc.hasElement("Company Logo"): - logostatus = bool(self.getControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED)) and (self.chkUseLogo.State != 0) - self.myLetterDoc.switchElement("Company Logo", logostatus) - + logostatus = \ + bool(self.getControlProperty( + "chkUseLogo", PropertyNames.PROPERTY_ENABLED)) \ + and (self.chkUseLogo.State != 0) + self.myLetterDoc.switchElement( + "Company Logo", logostatus) except IllegalArgumentException, e: traceback.print_exc() def chkUseAddressReceiverItemChanged(self): try: if self.myLetterDoc.hasElement("Sender Address Repeated"): - rstatus = bool(self.getControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED)) and (self.chkUseAddressReceiver.State != 0) - self.myLetterDoc.switchElement("Sender Address Repeated", rstatus) + rstatus = \ + bool(self.getControlProperty( + "chkUseAddressReceiver", + PropertyNames.PROPERTY_ENABLED)) \ + and (self.chkUseAddressReceiver.State != 0) + self.myLetterDoc.switchElement( + "Sender Address Repeated", rstatus) except IllegalArgumentException, e: traceback.print_exc() def chkUseSignsItemChanged(self): if self.myLetterDoc.hasElement("Letter Signs"): - self.myLetterDoc.switchElement("Letter Signs", (self.chkUseSigns.State != 0)) + self.myLetterDoc.switchElement( + "Letter Signs", self.chkUseSigns.State != 0) def chkUseSubjectItemChanged(self): if self.myLetterDoc.hasElement("Subject Line"): - self.myLetterDoc.switchElement("Subject Line", (self.chkUseSubject.State != 0)) + self.myLetterDoc.switchElement( + "Subject Line", self.chkUseSubject.State != 0) def chkUseBendMarksItemChanged(self): if self.myLetterDoc.hasElement("Bend Marks"): - self.myLetterDoc.switchElement("Bend Marks", (self.chkUseBendMarks.State != 0)) + self.myLetterDoc.switchElement( + "Bend Marks", self.chkUseBendMarks.State != 0) def chkUseFooterItemChanged(self): try: - bFooterPossible = (self.chkUseFooter.State != 0) and bool(self.getControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED)) + bFooterPossible = (self.chkUseFooter.State != 0) \ + and bool(self.getControlProperty( + "chkUseFooter", PropertyNames.PROPERTY_ENABLED)) if self.chkFooterNextPages.State != 0: - self.myLetterDoc.switchFooter("First Page", False, (self.chkFooterPageNumbers.State != 0), txtFooter.Text) - self.myLetterDoc.switchFooter("Standard", bFooterPossible, (self.chkFooterPageNumbers.State != 0), self.txtFooter.Text) + self.myLetterDoc.switchFooter( + "First Page", False, self.chkFooterPageNumbers.State != 0, + txtFooter.Text) + self.myLetterDoc.switchFooter("Standard", bFooterPossible, + self.chkFooterPageNumbers.State != 0, self.txtFooter.Text) else: - self.myLetterDoc.switchFooter("First Page", bFooterPossible, (self.chkFooterPageNumbers.State != 0), self.txtFooter.Text) - self.myLetterDoc.switchFooter("Standard", bFooterPossible, (self.chkFooterPageNumbers.State != 0), self.txtFooter.Text) - - BPaperItem = self.getRoadmapItemByID(LetterWizardDialogImpl.RM_FOOTER) - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, bFooterPossible) + self.myLetterDoc.switchFooter( + "First Page", bFooterPossible, + self.chkFooterPageNumbers.State != 0, self.txtFooter.Text) + self.myLetterDoc.switchFooter( + "Standard", bFooterPossible, + self.chkFooterPageNumbers.State != 0, self.txtFooter.Text) + + BPaperItem = \ + self.getRoadmapItemByID(LetterWizardDialogImpl.RM_FOOTER) + Helper.setUnoPropertyValue( + BPaperItem, PropertyNames.PROPERTY_ENABLED, bFooterPossible) except Exception, exception: traceback.print_exc() @@ -533,57 +695,79 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.chkUseFooterItemChanged() def setPossibleFooter(self, bState): - self.setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "chkUseFooter", PropertyNames.PROPERTY_ENABLED, bState) self.chkUseFooterItemChanged() def setPossibleAddressReceiver(self, bState): if self.myLetterDoc.hasElement("Sender Address Repeated"): - self.setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, bState) self.chkUseAddressReceiverItemChanged() def setPossibleLogo(self, bState): if self.myLetterDoc.hasElement("Company Logo"): - self.setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "chkUseLogo", PropertyNames.PROPERTY_ENABLED, bState) self.chkUseLogoItemChanged() def txtFooterTextChanged(self): self.chkUseFooterItemChanged() def txtSenderNameTextChanged(self): - myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("Company", self.txtSenderName.Text) + myFieldHandler = TextFieldHandler( + self.myLetterDoc.xMSF, TextDocument.xTextDocument) + myFieldHandler.changeUserFieldContent( + "Company", self.txtSenderName.Text) def txtSenderStreetTextChanged(self): - myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("Street", self.txtSenderStreet.Text) + myFieldHandler = TextFieldHandler( + self.myLetterDoc.xMSF, TextDocument.xTextDocument) + myFieldHandler.changeUserFieldContent( + "Street", self.txtSenderStreet.Text) def txtSenderCityTextChanged(self): - myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("City", self.txtSenderCity.Text) + myFieldHandler = TextFieldHandler( + self.myLetterDoc.xMSF, TextDocument.xTextDocument) + myFieldHandler.changeUserFieldContent( + "City", self.txtSenderCity.Text) def txtSenderPostCodeTextChanged(self): - myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent("PostCode", self.txtSenderPostCode.Text) + myFieldHandler = TextFieldHandler( + self.myLetterDoc.xMSF, TextDocument.xTextDocument) + myFieldHandler.changeUserFieldContent( + "PostCode", self.txtSenderPostCode.Text) def txtSenderStateTextChanged(self): - myFieldHandler = TextFieldHandler(self.myLetterDoc.xMSF, self.xTextDocument) - myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, self.txtSenderState.Text) + myFieldHandler = TextFieldHandler( + self.myLetterDoc.xMSF, TextDocument.xTextDocument) + myFieldHandler.changeUserFieldContent( + PropertyNames.PROPERTY_STATE, self.txtSenderState.Text) def txtTemplateNameTextChanged(self): - xDocProps = self.xTextDocument.DocumentProperties + xDocProps = TextDocument.xTextDocument.DocumentProperties TitleName = self.txtTemplateName.Text xDocProps.Title = TitleName def chkUseSalutationItemChanged(self): - self.myLetterDoc.switchUserField("Salutation", self.lstSalutation.Text, (self.chkUseSalutation.State != 0)) - self.setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, self.chkUseSalutation.State != 0) + self.myLetterDoc.switchUserField( + "Salutation", self.lstSalutation.Text, + self.chkUseSalutation.State != 0) + self.setControlProperty( + "lstSalutation", PropertyNames.PROPERTY_ENABLED, + self.chkUseSalutation.State != 0) def lstSalutationItemChanged(self): - self.myLetterDoc.switchUserField("Salutation", self.lstSalutation.Text, (self.chkUseSalutation.State != 0)) + self.myLetterDoc.switchUserField( + "Salutation", self.lstSalutation.Text, + self.chkUseSalutation.State != 0) def chkUseGreetingItemChanged(self): - self.myLetterDoc.switchUserField("Greeting", self.lstGreeting.Text, (self.chkUseGreeting.State != 0)) - self.setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, self.chkUseGreeting.State != 0) + self.myLetterDoc.switchUserField( + "Greeting", self.lstGreeting.Text, self.chkUseGreeting.State != 0) + self.setControlProperty( + "lstGreeting", PropertyNames.PROPERTY_ENABLED, + self.chkUseGreeting.State != 0) def setDefaultForGreetingAndSalutation(self): if self.lstSalutation.Text == "": @@ -593,7 +777,8 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.lstGreeting.Text = self.resources.GreetingLabels[0] def lstGreetingItemChanged(self): - self.myLetterDoc.switchUserField("Greeting", self.lstGreeting.Text, (self.chkUseGreeting.State != 0)) + self.myLetterDoc.switchUserField( + "Greeting", self.lstGreeting.Text, self.chkUseGreeting.State != 0) def chkBusinessPaperItemChanged(self): if self.chkBusinessPaper.State != 0: @@ -611,7 +796,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): if self.Norms[i].lower() == OfficeLinguistic.lower(): oL = i found = True - break; + break if not found: for i in xrange(len(self.Norms)): @@ -619,59 +804,86 @@ class LetterWizardDialogImpl(LetterWizardDialog): oL = i found = True break - return oL; + return oL def setPossibleSenderData(self, bState): - self.setControlProperty("optSenderDefine", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("optSenderPlaceholder", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("lblSenderAddress", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "optSenderDefine", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "optSenderPlaceholder", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "lblSenderAddress", PropertyNames.PROPERTY_ENABLED, bState) if not bState: - self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, bState) - self.setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "txtSenderCity", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "txtSenderName", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "txtSenderStreet", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "txtSenderCity", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "txtSenderState", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "lblSenderName", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "lblSenderStreet", PropertyNames.PROPERTY_ENABLED, bState) + self.setControlProperty( + "lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, bState) def enableSenderReceiver(self): - BPaperItem = self.getRoadmapItemByID(LetterWizardDialogImpl.RM_SENDERRECEIVER) - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, True) + BPaperItem = self.getRoadmapItemByID( + LetterWizardDialogImpl.RM_SENDERRECEIVER) + Helper.setUnoPropertyValue( + BPaperItem, PropertyNames.PROPERTY_ENABLED, True) def disableSenderReceiver(self): - BPaperItem = self.getRoadmapItemByID(LetterWizardDialogImpl.RM_SENDERRECEIVER) - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, False) + BPaperItem = self.getRoadmapItemByID( + LetterWizardDialogImpl.RM_SENDERRECEIVER) + Helper.setUnoPropertyValue( + BPaperItem, PropertyNames.PROPERTY_ENABLED, False) def enableBusinessPaper(self): - BPaperItem = self.getRoadmapItemByID(LetterWizardDialogImpl.RM_BUSINESSPAPER) - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, True) - self.chkPaperCompanyLogoItemChanged() - self.chkPaperCompanyAddressItemChanged() - self.chkPaperFooterItemChanged() - self.chkCompanyReceiverItemChanged() + try: + BPaperItem = self.getRoadmapItemByID( + LetterWizardDialogImpl.RM_BUSINESSPAPER) + Helper.setUnoPropertyValue( + BPaperItem, PropertyNames.PROPERTY_ENABLED, True) + self.chkPaperCompanyLogoItemChanged() + self.chkPaperCompanyAddressItemChanged() + self.chkPaperFooterItemChanged() + self.chkCompanyReceiverItemChanged() + except Exception: + traceback.print_exc() def disableBusinessPaper(self): - BPaperItem = self.getRoadmapItemByID(LetterWizardDialogImpl.RM_BUSINESSPAPER) - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, False) - if self.BusCompanyLogo != None: - self.BusCompanyLogo.removeFrame() + try: + BPaperItem = self.getRoadmapItemByID( + LetterWizardDialogImpl.RM_BUSINESSPAPER) + Helper.setUnoPropertyValue( + BPaperItem, PropertyNames.PROPERTY_ENABLED, False) + if self.BusCompanyLogo != None: + self.BusCompanyLogo.removeFrame() - if self.BusCompanyAddress != None: - self.BusCompanyAddress.removeFrame() + if self.BusCompanyAddress != None: + self.BusCompanyAddress.removeFrame() - if self.BusFooter != None: - self.BusFooter.removeFrame() + if self.BusFooter != None: + self.BusFooter.removeFrame() - if self.BusCompanyAddressReceiver != None: - self.BusCompanyAddressReceiver.removeFrame() + if self.BusCompanyAddressReceiver != None: + self.BusCompanyAddressReceiver.removeFrame() - self.setPossibleAddressReceiver(True) - self.setPossibleFooter(True) - self.setPossibleLogo(True) - if self.myLetterDoc.hasElement("Sender Address"): - self.myLetterDoc.switchElement("Sender Address", True) + self.setPossibleAddressReceiver(True) + self.setPossibleFooter(True) + self.setPossibleLogo(True) + if self.myLetterDoc.hasElement("Sender Address"): + self.myLetterDoc.switchElement( + "Sender Address", True) + except Exception: + traceback.print_exc() def lstLetterNormItemChanged(self): sCurrentNorm = self.Norms[getCurrentLetter().cp_Norm] @@ -686,10 +898,13 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.lstPrivateStyleItemChanged() def initializeSalutation(self): - self.setControlProperty("lstSalutation", "StringItemList", self.resources.SalutationLabels) + self.setControlProperty( + "lstSalutation", "StringItemList", + self.resources.SalutationLabels) def initializeGreeting(self): - self.setControlProperty("lstGreeting", "StringItemList", self.resources.GreetingLabels) + self.setControlProperty( + "lstGreeting", "StringItemList", self.resources.GreetingLabels) def initializeNorms(self): lc = LocaleCodes(self.xmsf) @@ -697,11 +912,14 @@ class LetterWizardDialogImpl(LetterWizardDialog): nameList = [] sLetterSubPath = "/wizard/letter/" try: - self.sTemplatePath = FileAccess.deleteLastSlashfromUrl(self.sTemplatePath) - nuString = self.sTemplatePath[:self.sTemplatePath.rfind("/")] + "/" + self.sTemplatePath = \ + FileAccess.deleteLastSlashfromUrl(self.sTemplatePath) + nuString = \ + self.sTemplatePath[:self.sTemplatePath.rfind("/")] + "/" sMainPath = FileAccess.deleteLastSlashfromUrl(nuString) self.sLetterPath = sMainPath + sLetterSubPath - xInterface = self.xmsf.createInstance("com.sun.star.ucb.SimpleFileAccess") + xInterface = \ + self.xmsf.createInstance("com.sun.star.ucb.SimpleFileAccess") nameList = xInterface.getFolderContents(self.sLetterPath, True) except Exception, e: traceback.print_exc() @@ -736,7 +954,8 @@ class LetterWizardDialogImpl(LetterWizardDialog): #COMMENTED #LanguageLabels = [LanguageLabelsVector.size()] #LanguageLabelsVector.toArray(LanguageLabels) - #self.setControlProperty("lstLetterNorm", "StringItemList", LanguageLabels) + #self.setControlProperty( + # "lstLetterNorm", "StringItemList", LanguageLabels) def getCurrentLetter(self): if self.myConfig.cp_LetterType == 0: @@ -750,32 +969,59 @@ class LetterWizardDialogImpl(LetterWizardDialog): def __initializePaths(self): try: - self.sTemplatePath = FileAccess.getOfficePath2(self.xMSF, "Template", "share", "/wizard") - self.sUserTemplatePath = FileAccess.getOfficePath2(self.xMSF, "Template", "user", "") - self.sBitmapPath = FileAccess.combinePaths(self.xMSF, self.sTemplatePath, "/../wizard/bitmap") + self.sTemplatePath = \ + FileAccess.getOfficePath2( + self.xMSF, "Template", "share", "/wizard") + self.sUserTemplatePath = \ + FileAccess.getOfficePath2(self.xMSF, "Template", "user", "") + self.sBitmapPath = \ + FileAccess.combinePaths( + self.xMSF, self.sTemplatePath, "/../wizard/bitmap") except NoValidPathException, e: traceback.print_exc() def initializeTemplates(self, xMSF): self.sCurrentNorm = self.Norms[self.getCurrentLetter().cp_Norm] sLetterPath = self.NormPaths[self.getCurrentLetter().cp_Norm] - self.BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", sLetterPath) - self.OfficialFiles = FileAccess.getFolderTitles(xMSF, "off", sLetterPath) - self.PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", sLetterPath) - self.setControlProperty("lstBusinessStyle", "StringItemList", tuple(self.BusinessFiles[0])) - self.setControlProperty("lstPrivOfficialStyle", "StringItemList", tuple(self.OfficialFiles[0])) - self.setControlProperty("lstPrivateStyle", "StringItemList", tuple(self.PrivateFiles[0])) - self.setControlProperty("lstBusinessStyle", "SelectedItems", (0,)) - self.setControlProperty("lstPrivOfficialStyle", "SelectedItems", (0,)) - self.setControlProperty("lstPrivateStyle", "SelectedItems", (0,)) + self.BusinessFiles = \ + FileAccess.getFolderTitles(xMSF, "bus", sLetterPath) + self.OfficialFiles = \ + FileAccess.getFolderTitles(xMSF, "off", sLetterPath) + self.PrivateFiles = \ + FileAccess.getFolderTitles(xMSF, "pri", sLetterPath) + self.setControlProperty( + "lstBusinessStyle", "StringItemList", + tuple(self.BusinessFiles[0])) + self.setControlProperty( + "lstPrivOfficialStyle", "StringItemList", + tuple(self.OfficialFiles[0])) + self.setControlProperty( + "lstPrivateStyle", "StringItemList", + tuple(self.PrivateFiles[0])) + self.setControlProperty( + "lstBusinessStyle", "SelectedItems", (0,)) + self.setControlProperty( + "lstPrivOfficialStyle", "SelectedItems", (0,)) + self.setControlProperty( + "lstPrivateStyle", "SelectedItems", (0,)) return True def initializeElements(self): - self.setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Company Logo")) - self.setControlProperty("chkUseBendMarks", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Bend Marks")) - self.setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Sender Address Repeated")) - self.setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Subject Line")) - self.setControlProperty("chkUseSigns", PropertyNames.PROPERTY_ENABLED, self.myLetterDoc.hasElement("Letter Signs")) + self.setControlProperty( + "chkUseLogo", PropertyNames.PROPERTY_ENABLED, + self.myLetterDoc.hasElement("Company Logo")) + self.setControlProperty( + "chkUseBendMarks", PropertyNames.PROPERTY_ENABLED, + self.myLetterDoc.hasElement("Bend Marks")) + self.setControlProperty( + "chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, + self.myLetterDoc.hasElement("Sender Address Repeated")) + self.setControlProperty( + "chkUseSubject", PropertyNames.PROPERTY_ENABLED, + self.myLetterDoc.hasElement("Subject Line")) + self.setControlProperty( + "chkUseSigns", PropertyNames.PROPERTY_ENABLED, + self.myLetterDoc.hasElement("Letter Signs")) self.myLetterDoc.updateDateFields() def setConfiguration(self): @@ -817,12 +1063,30 @@ class LetterWizardDialogImpl(LetterWizardDialog): def insertRoadmap(self): self.addRoadmap() i = 0 - i = self.insertRoadmapItem(0, True, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_TYPESTYLE -1], LetterWizardDialogImpl.RM_TYPESTYLE) - i = self.insertRoadmapItem(i, False, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_BUSINESSPAPER - 1], LetterWizardDialogImpl.RM_BUSINESSPAPER) - i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_ELEMENTS - 1], LetterWizardDialogImpl.RM_ELEMENTS) - i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_SENDERRECEIVER - 1], LetterWizardDialogImpl.RM_SENDERRECEIVER) - i = self.insertRoadmapItem(i, False, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_FOOTER -1], LetterWizardDialogImpl.RM_FOOTER) - i = self.insertRoadmapItem(i, True, self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_FINALSETTINGS - 1], LetterWizardDialogImpl.RM_FINALSETTINGS) + i = self.insertRoadmapItem( + 0, True, + self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_TYPESTYLE -1], + LetterWizardDialogImpl.RM_TYPESTYLE) + i = self.insertRoadmapItem( + i, False, + self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_BUSINESSPAPER - 1], + LetterWizardDialogImpl.RM_BUSINESSPAPER) + i = self.insertRoadmapItem( + i, True, + self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_ELEMENTS - 1], + LetterWizardDialogImpl.RM_ELEMENTS) + i = self.insertRoadmapItem( + i, True, + self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_SENDERRECEIVER - 1], + LetterWizardDialogImpl.RM_SENDERRECEIVER) + i = self.insertRoadmapItem( + i, False, + self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_FOOTER -1], + LetterWizardDialogImpl.RM_FOOTER) + i = self.insertRoadmapItem( + i, True, + self.resources.RoadmapLabels[LetterWizardDialogImpl.RM_FINALSETTINGS - 1], + LetterWizardDialogImpl.RM_FINALSETTINGS) self.setRoadmapInteractive(True) self.setRoadmapComplete(True) self.setCurrentRoadmapItemID(1) @@ -836,63 +1100,166 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.myPathSelection.usedPathPicker = False def insertPathSelectionControl(self): - self.myPathSelection = PathSelection(self.xMSF, self, PathSelection.TransferMode.SAVE, PathSelection.DialogTypes.FILE) - self.myPathSelection.insert(6, 97, 70, 205, 45, self.resources.reslblTemplatePath_value, True, HelpIds.getHelpIdString(HID + 47), HelpIds.getHelpIdString(HID + 48)) + self.myPathSelection = \ + PathSelection(self.xMSF, self, PathSelection.TransferMode.SAVE, + PathSelection.DialogTypes.FILE) + self.myPathSelection.insert( + 6, 97, 70, 205, 45, self.resources.reslblTemplatePath_value, + True, HelpIds.getHelpIdString(HID + 47), + HelpIds.getHelpIdString(HID + 48)) self.myPathSelection.sDefaultDirectory = self.sUserTemplatePath self.myPathSelection.sDefaultName = "myLetterTemplate.ott" self.myPathSelection.sDefaultFilter = "writer8_template" - self.myPathSelection.addSelectionListener(self.myPathSelectionListener()) + self.myPathSelection.addSelectionListener( + self.myPathSelectionListener()) def initConfiguration(self): try: self.myConfig = CGLetterWizard() - root = Configuration.getConfigurationRoot(self.xMSF, "/org.openoffice.Office.Writer/Wizards/Letter", False) + root = Configuration.getConfigurationRoot( + self.xMSF, "/org.openoffice.Office.Writer/Wizards/Letter", + False) self.myConfig.readConfiguration(root, "cp_") - self.mainDA.append(RadioDataAware.attachRadioButtons(self.myConfig, "cp_LetterType", (self.optBusinessLetter, self.optPrivOfficialLetter, self.optPrivateLetter), True)) - self.mainDA.append(UnoDataAware.attachListBox(self.myConfig.cp_BusinessLetter, "cp_Style", self.lstBusinessStyle, True)) - self.mainDA.append(UnoDataAware.attachListBox(self.myConfig.cp_PrivateOfficialLetter, "cp_Style", self.lstPrivOfficialStyle, True)) - self.mainDA.append(UnoDataAware.attachListBox(self.myConfig.cp_PrivateLetter, "cp_Style", self.lstPrivateStyle, True)) - self.mainDA.append(UnoDataAware.attachCheckBox(self.myConfig.cp_BusinessLetter, "cp_BusinessPaper", self.chkBusinessPaper, True)) + self.mainDA.append( + RadioDataAware.attachRadioButtons( + self.myConfig, "cp_LetterType", + (self.optBusinessLetter, self.optPrivOfficialLetter, + self.optPrivateLetter), True)) + self.mainDA.append( + UnoDataAware.attachListBox( + self.myConfig.cp_BusinessLetter, "cp_Style", + self.lstBusinessStyle, True)) + self.mainDA.append( + UnoDataAware.attachListBox( + self.myConfig.cp_PrivateOfficialLetter, "cp_Style", + self.lstPrivOfficialStyle, True)) + self.mainDA.append( + UnoDataAware.attachListBox( + self.myConfig.cp_PrivateLetter, "cp_Style", + self.lstPrivateStyle, True)) + self.mainDA.append( + UnoDataAware.attachCheckBox( + self.myConfig.cp_BusinessLetter, "cp_BusinessPaper", + self.chkBusinessPaper, True)) cgl = self.myConfig.cp_BusinessLetter cgpl = self.myConfig.cp_BusinessLetter.cp_CompanyLogo cgpa = self.myConfig.cp_BusinessLetter.cp_CompanyAddress - self.businessDA.append(UnoDataAware.attachCheckBox(cgpl, "cp_Display", self.chkPaperCompanyLogo, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgpl, "cp_Width", self.numLogoWidth, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgpl, "cp_Height", self.numLogoHeight, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgpl, "cp_X", self.numLogoX, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgpl, "cp_Y", self.numLogoY, True)) - self.businessDA.append(UnoDataAware.attachCheckBox(cgpa, "cp_Display", self.chkPaperCompanyAddress, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgpa, "cp_Width", self.numAddressWidth, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgpa, "cp_Height", self.numAddressHeight, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgpa, "cp_X", self.numAddressX, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgpa, "cp_Y", self.numAddressY, True)) - self.businessDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PaperCompanyAddressReceiverField", self.chkCompanyReceiver, True)) - self.businessDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PaperFooter", self.chkPaperFooter, True)) - self.businessDA.append(UnoDataAware.attachNumericControl(cgl, "cp_PaperFooterHeight", self.numFooterHeight, True)) - self.letterDA.append(UnoDataAware.attachListBox(cgl, "cp_Norm", self.lstLetterNorm, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintCompanyLogo", self.chkUseLogo, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintCompanyAddressReceiverField", self.chkUseAddressReceiver, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintLetterSigns", self.chkUseSigns, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintSubjectLine", self.chkUseSubject, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintSalutation", self.chkUseSalutation, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintBendMarks", self.chkUseBendMarks, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintGreeting", self.chkUseGreeting, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_PrintFooter", self.chkUseFooter, True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_Salutation", self.lstSalutation, True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_Greeting", self.lstGreeting, True)) - self.letterDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_SenderAddressType", [self.optSenderDefine, self.optSenderPlaceholder], True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderCompanyName", self.txtSenderName, True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderStreet", self.txtSenderStreet, True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderPostCode", self.txtSenderPostCode, True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderState", self.txtSenderState, True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_SenderCity", self.txtSenderCity, True)) - self.letterDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_ReceiverAddressType", [self.optReceiverDatabase, self.optReceiverPlaceholder], True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_Footer", self.txtFooter, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_FooterOnlySecondPage", self.chkFooterNextPages, True)) - self.letterDA.append(UnoDataAware.attachCheckBox(cgl, "cp_FooterPageNumbers", self.chkFooterPageNumbers, True)) - self.letterDA.append(RadioDataAware.attachRadioButtons(cgl, "cp_CreationType", [self.optCreateLetter, self.optMakeChanges], True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_TemplateName", self.txtTemplateName, True)) - self.letterDA.append(UnoDataAware.attachEditControl(cgl, "cp_TemplatePath", self.myPathSelection.xSaveTextBox, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgpl, "cp_Display", self.chkPaperCompanyLogo, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgpl, "cp_Width", self.numLogoWidth, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgpl, "cp_Height", self.numLogoHeight, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgpl, "cp_X", self.numLogoX, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgpl, "cp_Y", self.numLogoY, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgpa, "cp_Display", self.chkPaperCompanyAddress, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgpa, "cp_Width", self.numAddressWidth, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgpa, "cp_Height", self.numAddressHeight, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgpa, "cp_X", self.numAddressX, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgpa, "cp_Y", self.numAddressY, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PaperCompanyAddressReceiverField", + self.chkCompanyReceiver, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PaperFooter", self.chkPaperFooter, True)) + self.businessDA.append( + UnoDataAware.attachNumericControl( + cgl, "cp_PaperFooterHeight", self.numFooterHeight, True)) + self.businessDA.append( + UnoDataAware.attachListBox( + cgl, "cp_Norm", self.lstLetterNorm, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PrintCompanyLogo", self.chkUseLogo, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PrintCompanyAddressReceiverField", + self.chkUseAddressReceiver, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PrintLetterSigns", self.chkUseSigns, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PrintSubjectLine", self.chkUseSubject, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PrintSalutation", self.chkUseSalutation, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PrintBendMarks", self.chkUseBendMarks, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PrintGreeting", self.chkUseGreeting, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_PrintFooter", self.chkUseFooter, True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_Salutation", self.lstSalutation, True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_Greeting", self.lstGreeting, True)) + self.letterDA.append(RadioDataAware.attachRadioButtons( + cgl, "cp_SenderAddressType", + (self.optSenderDefine, self.optSenderPlaceholder), True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_SenderCompanyName", self.txtSenderName, True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_SenderStreet", self.txtSenderStreet, True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_SenderPostCode", self.txtSenderPostCode, True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_SenderState", self.txtSenderState, True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_SenderCity", self.txtSenderCity, True)) + self.letterDA.append(RadioDataAware.attachRadioButtons( + cgl, "cp_ReceiverAddressType", + (self.optReceiverDatabase, self.optReceiverPlaceholder), + True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_Footer", self.txtFooter, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_FooterOnlySecondPage", + self.chkFooterNextPages, True)) + self.businessDA.append( + UnoDataAware.attachCheckBox( + cgl, "cp_FooterPageNumbers", + self.chkFooterPageNumbers, True)) + self.letterDA.append(RadioDataAware.attachRadioButtons( + cgl, "cp_CreationType", + (self.optCreateLetter, self.optMakeChanges), True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_TemplateName", self.txtTemplateName, True)) + self.businessDA.append( + UnoDataAware.attachEditControl( + cgl, "cp_TemplatePath", self.myPathSelection.xSaveTextBox, True)) except Exception, exception: traceback.print_exc() @@ -903,8 +1270,8 @@ class LetterWizardDialogImpl(LetterWizardDialog): def saveConfiguration(self): try: - root = Configuration.getConfigurationRoot(xMSF, "/org.openoffice.Office.Writer/Wizards/Letter", True) + root = Configuration.getConfigurationRoot(self.xMSF, "/org.openoffice.Office.Writer/Wizards/Letter", True) self.myConfig.writeConfiguration(root, "cp_") - Configuration.commit(root) + root.commitChanges() except Exception, e: traceback.print_exc() diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py index 439f9ba6af9d..d25c0c2651ac 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py @@ -11,78 +11,199 @@ class LetterWizardDialogResources(Resource): RID_RID_COMMON_START = 500 def __init__(self, xmsf): - super(LetterWizardDialogResources,self).__init__(xmsf, LetterWizardDialogResources.MODULE_NAME) + super(LetterWizardDialogResources,self).__init__( + xmsf, LetterWizardDialogResources.MODULE_NAME) self.RoadmapLabels = () self.SalutationLabels = () self.GreetingLabels = () self.LanguageLabels = () - self.resLetterWizardDialog_title = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 1) - self.resLabel9_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 2) - self.resoptBusinessLetter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 3) - self.resoptPrivOfficialLetter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 4) - self.resoptPrivateLetter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 5) - self.reschkBusinessPaper_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 6) - self.reschkPaperCompanyLogo_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 7) - self.reschkPaperCompanyAddress_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 8) - self.reschkPaperFooter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 9) - self.reschkCompanyReceiver_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 10) - self.reschkUseLogo_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 11) - self.reschkUseAddressReceiver_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 12) - self.reschkUseSigns_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 13) - self.reschkUseSubject_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 14) - self.reschkUseSalutation_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 15) - self.reschkUseBendMarks_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 16) - self.reschkUseGreeting_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 17) - self.reschkUseFooter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 18) - self.resoptSenderPlaceholder_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 19) - self.resoptSenderDefine_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 20) - self.resoptReceiverPlaceholder_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 21) - self.resoptReceiverDatabase_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 22) - self.reschkFooterNextPages_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 23) - self.reschkFooterPageNumbers_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 24) - self.restxtTemplateName_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 25) - self.resoptCreateLetter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 26) - self.resoptMakeChanges_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 27) - self.reslblBusinessStyle_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 28) - self.reslblPrivOfficialStyle_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 29) - self.reslblPrivateStyle_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 30) - self.reslblIntroduction_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 31) - self.reslblLogoHeight_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 32) - self.reslblLogoWidth_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 33) - self.reslblLogoX_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 34) - self.reslblLogoY_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 35) - self.reslblAddressHeight_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 36) - self.reslblAddressWidth_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 37) - self.reslblAddressX_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 38) - self.reslblAddressY_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 39) - self.reslblFooterHeight_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 40) - self.reslblLetterNorm_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 41) - self.reslblSenderAddress_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 42) - self.reslblSenderName_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 43) - self.reslblSenderStreet_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 44) - self.reslblPostCodeCity_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 45) - self.reslblReceiverAddress_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 46) - self.reslblFooter_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 47) - self.reslblFinalExplanation1_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 48) - self.reslblFinalExplanation2_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 49) - self.reslblTemplateName_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 50) - self.reslblTemplatePath_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 51) - self.reslblProceed_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 52) - self.reslblTitle1_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 53) - self.reslblTitle3_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 54) - self.reslblTitle2_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 55) - self.reslblTitle4_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 56) - self.reslblTitle5_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 57) - self.reslblTitle6_value = self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 58) + self.resLetterWizardDialog_title = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 1) + self.resLabel9_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 2) + self.resoptBusinessLetter_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 3) + self.resoptPrivOfficialLetter_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 4) + self.resoptPrivateLetter_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 5) + self.reschkBusinessPaper_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 6) + self.reschkPaperCompanyLogo_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 7) + self.reschkPaperCompanyAddress_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 8) + self.reschkPaperFooter_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 9) + self.reschkCompanyReceiver_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 10) + self.reschkUseLogo_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 11) + self.reschkUseAddressReceiver_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 12) + self.reschkUseSigns_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 13) + self.reschkUseSubject_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 14) + self.reschkUseSalutation_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 15) + self.reschkUseBendMarks_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 16) + self.reschkUseGreeting_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 17) + self.reschkUseFooter_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 18) + self.resoptSenderPlaceholder_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 19) + self.resoptSenderDefine_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 20) + self.resoptReceiverPlaceholder_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 21) + self.resoptReceiverDatabase_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 22) + self.reschkFooterNextPages_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 23) + self.reschkFooterPageNumbers_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 24) + self.restxtTemplateName_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 25) + self.resoptCreateLetter_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 26) + self.resoptMakeChanges_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 27) + self.reslblBusinessStyle_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 28) + self.reslblPrivOfficialStyle_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 29) + self.reslblPrivateStyle_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 30) + self.reslblIntroduction_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 31) + self.reslblLogoHeight_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 32) + self.reslblLogoWidth_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 33) + self.reslblLogoX_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 34) + self.reslblLogoY_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 35) + self.reslblAddressHeight_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 36) + self.reslblAddressWidth_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 37) + self.reslblAddressX_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 38) + self.reslblAddressY_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 39) + self.reslblFooterHeight_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 40) + self.reslblLetterNorm_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 41) + self.reslblSenderAddress_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 42) + self.reslblSenderName_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 43) + self.reslblSenderStreet_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 44) + self.reslblPostCodeCity_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 45) + self.reslblReceiverAddress_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 46) + self.reslblFooter_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 47) + self.reslblFinalExplanation1_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 48) + self.reslblFinalExplanation2_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 49) + self.reslblTemplateName_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 50) + self.reslblTemplatePath_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 51) + self.reslblProceed_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 52) + self.reslblTitle1_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 53) + self.reslblTitle3_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 54) + self.reslblTitle2_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 55) + self.reslblTitle4_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 56) + self.reslblTitle5_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 57) + self.reslblTitle6_value = \ + self.getResText( + LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 58) self.loadRoadmapResources() self.loadSalutationResources() self.loadGreetingResources() self.loadCommonResources() def loadCommonResources(self): - self.resOverwriteWarning = self.getResText(LetterWizardDialogResources.RID_RID_COMMON_START + 19) - self.resTemplateDescription = self.getResText(LetterWizardDialogResources.RID_RID_COMMON_START + 20) + self.resOverwriteWarning = \ + self.getResText( + LetterWizardDialogResources.RID_RID_COMMON_START + 19) + self.resTemplateDescription = \ + self.getResText( + LetterWizardDialogResources.RID_RID_COMMON_START + 20) def loadRoadmapResources(self): i = 1 diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index 09cae9536e93..ebff4a4c1fba 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -17,12 +17,13 @@ from com.sun.star.i18n.NumberFormatIndex import DATE_SYS_DDMMYY class TextDocument(object): + xTextDocument = None + def __init__(self, xMSF,listener=None,bShowStatusIndicator=None, FrameName=None,_sPreviewURL=None,_moduleIdentifier=None, _textDocument=None, xArgs=None): self.xMSF = xMSF - self.xTextDocument = None if listener is not None: if FrameName is not None: @@ -37,19 +38,19 @@ class TextDocument(object): '''creates an instance of TextDocument by loading a given URL as preview''' self.xFrame = OfficeDocument.createNewFrame(xMSF, listener) - self.xTextDocument = self.loadAsPreview(_sPreviewURL, True) + TextDocument.xTextDocument = self.loadAsPreview(_sPreviewURL, True) elif xArgs is not None: '''creates an instance of TextDocument and creates a frame and loads a document''' self.xDesktop = Desktop.getDesktop(xMSF); self.xFrame = OfficeDocument.createNewFrame(xMSF, listener) - self.xTextDocument = OfficeDocument.load( + TextDocument.xTextDocument = OfficeDocument.load( xFrame, URL, "_self", xArgs); self.xWindowPeer = xFrame.getComponentWindow() - self.m_xDocProps = self.xTextDocument.DocumentProperties + self.m_xDocProps = TextDocument.xTextDocument.DocumentProperties CharLocale = Helper.getUnoStructValue( - self.xTextDocument, "CharLocale"); + TextDocument.xTextDocument, "CharLocale"); return else: @@ -57,26 +58,26 @@ class TextDocument(object): the desktop's current frame''' self.xDesktop = Desktop.getDesktop(xMSF); self.xFrame = self.xDesktop.getActiveFrame() - self.xTextDocument = self.xFrame.getController().Model + TextDocument.xTextDocument = self.xFrame.getController().Model elif _moduleIdentifier is not None: try: '''create the empty document, and set its module identifier''' - self.xTextDocument = xMSF.createInstance( + TextDocument.xTextDocument = xMSF.createInstance( "com.sun.star.text.TextDocument") - self.xTextDocument.initNew() - self.xTextDocument.setIdentifier(_moduleIdentifier.Identifier) + TextDocument.xTextDocument.initNew() + TextDocument.xTextDocument.setIdentifier(_moduleIdentifier.Identifier) # load the document into a blank frame xDesktop = Desktop.getDesktop(xMSF) loadArgs = range(1) loadArgs[0] = "Model" loadArgs[0] = -1 - loadArgs[0] = self.xTextDocument + loadArgs[0] = TextDocument.xTextDocument loadArgs[0] = DIRECT_VALUE xDesktop.loadComponentFromURL( "private:object", "_blank", 0, loadArgs) # remember some things for later usage - self.xFrame = self.xTextDocument.CurrentController.Frame + self.xFrame = TextDocument.xTextDocument.CurrentController.Frame except Exception, e: traceback.print_exc() @@ -84,17 +85,17 @@ class TextDocument(object): '''creates an instance of TextDocument from a given XTextDocument''' self.xFrame = _textDocument.CurrentController.Frame - self.xTextDocument = _textDocument + TextDocument.xTextDocument = _textDocument if bShowStatusIndicator: self.showStatusIndicator() self.init() def init(self): self.xWindowPeer = self.xFrame.getComponentWindow() - self.m_xDocProps = self.xTextDocument.getDocumentProperties() + self.m_xDocProps = TextDocument.xTextDocument.getDocumentProperties() self.CharLocale = Helper.getUnoStructValue( - self.xTextDocument, "CharLocale") - self.xText = self.xTextDocument.Text + TextDocument.xTextDocument, "CharLocale") + self.xText = TextDocument.xTextDocument.Text def showStatusIndicator(self): self.xProgressBar = self.xFrame.createStatusIndicator() @@ -122,30 +123,30 @@ class TextDocument(object): loadValues[2].Value = True '''set the preview document to non-modified mode in order to avoid the 'do u want to save' box''' - if self.xTextDocument is not None: + if TextDocument.xTextDocument is not None: try: - self.xTextDocument.Modified = False + TextDocument.xTextDocument.Modified = False except PropertyVetoException, e1: traceback.print_exc() - self.xTextDocument = OfficeDocument.load( + TextDocument.xTextDocument = OfficeDocument.load( self.xFrame, sDefaultTemplate, "_self", loadValues) self.DocSize = self.getPageSize() - myViewHandler = ViewHandler(self.xTextDocument, self.xTextDocument) + myViewHandler = ViewHandler(TextDocument.xTextDocument, TextDocument.xTextDocument) try: myViewHandler.setViewSetting( "ZoomType", ENTIRE_PAGE) except Exception, e: traceback.print_exc() - myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument) + myFieldHandler = TextFieldHandler(self.xMSF, TextDocument.xTextDocument) myFieldHandler.updateDocInfoFields() - return self.xTextDocument + return TextDocument.xTextDocument def getPageSize(self): try: - xNameAccess = self.xTextDocument.StyleFamilies + xNameAccess = TextDocument.xTextDocument.StyleFamilies xPageStyleCollection = xNameAccess.getByName("PageStyles") xPageStyle = xPageStyleCollection.getByName("First Page") return Helper.getUnoPropertyValue(xPageStyle, "Size") @@ -168,14 +169,14 @@ class TextDocument(object): def getCharWidth(self, ScaleString): iScale = 200 - self.xTextDocument.lockControllers() + TextDocument.xTextDocument.lockControllers() iScaleLen = ScaleString.length() - xTextCursor = createTextCursor(self.xTextDocument.Text) + xTextCursor = createTextCursor(TextDocument.xTextDocument.Text) xTextCursor.gotoStart(False) com.sun.star.wizards.common.Helper.setUnoPropertyValue( xTextCursor, "PageDescName", "First Page") xTextCursor.String = ScaleString - xViewCursor = self.xTextDocument.CurrentController + xViewCursor = TextDocument.xTextDocument.CurrentController xTextViewCursor = xViewCursor.ViewCursor xTextViewCursor.gotoStart(False) iFirstPos = xTextViewCursor.Position.X @@ -189,11 +190,11 @@ class TextDocument(object): return iScale def unlockallControllers(self): - while self.xTextDocument.hasControllersLocked() == True: - self.xTextDocument.unlockControllers() + while TextDocument.xTextDocument.hasControllersLocked() == True: + TextDocument.xTextDocument.unlockControllers() def refresh(self): - self.xTextDocument.refresh() + TextDocument.xTextDocument.refresh() ''' This method sets the Author of a Wizard-generated template correctly @@ -220,10 +221,10 @@ class TextDocument(object): currentDate.Year = year currentDate.Month = month dateObject = dateTimeObject(int(year), int(month), int(day)) - du = Helper.DateUtils(self.xMSF, self.xTextDocument) + du = Helper.DateUtils(self.xMSF, TextDocument.xTextDocument) ff = du.getFormat(DATE_SYS_DDMMYY) myDate = du.format(ff, dateObject) - xDocProps2 = self.xTextDocument.DocumentProperties + xDocProps2 = TextDocument.xTextDocument.DocumentProperties xDocProps2.Author = fullname xDocProps2.ModifiedBy = fullname description = xDocProps2.Description @@ -269,6 +270,7 @@ class TextDocument(object): xPC.jumpToLastPage() return xPC.getPage() + @classmethod def getFrameByName(self, sFrameName, xTD): if xTD.TextFrames.hasByName(sFrameName): return xTD.TextFrames.getByName(sFrameName) diff --git a/wizards/com/sun/star/wizards/text/ViewHandler.py b/wizards/com/sun/star/wizards/text/ViewHandler.py index d449f3cd4d7c..cf5401efb834 100644 --- a/wizards/com/sun/star/wizards/text/ViewHandler.py +++ b/wizards/com/sun/star/wizards/text/ViewHandler.py @@ -4,7 +4,7 @@ class ViewHandler(object): def __init__ (self, xMSF, xTextDocument): self.xMSFDoc = xMSF self.xTextDocument = xTextDocument - self.xTextViewCursorSupplier = self.xTextDocument.CurrentController + self.xTextViewCursorSupplier = xTextDocument.CurrentController def selectFirstPage(self, oTextTableHandler): try: -- cgit v1.2.3