diff options
author | Xisco Fauli <anistenis@gmail.com> | 2011-07-04 12:01:08 +0200 |
---|---|---|
committer | Xisco Fauli <anistenis@gmail.com> | 2011-07-04 12:01:08 +0200 |
commit | 6d4de2a05f9aab2fc0b9e8b95168be1aa659e62a (patch) | |
tree | 399a3c9fd38968f20e425db0fbab74ebb9960876 /wizards | |
parent | bb5a70bb8f8d9a265de09472e90ab8e691efab35 (diff) |
apply python style and fix some minor things
Diffstat (limited to 'wizards')
8 files changed, 2220 insertions, 625 deletions
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: |