diff options
Diffstat (limited to 'wizards/com/sun/star/wizards/letter')
11 files changed, 2768 insertions, 0 deletions
diff --git a/wizards/com/sun/star/wizards/letter/CGLetter.py b/wizards/com/sun/star/wizards/letter/CGLetter.py new file mode 100644 index 000000000..cf9bd76fe --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/CGLetter.py @@ -0,0 +1,53 @@ +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This file incorporates work covered by the following license notice: +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed +# with this work for additional information regarding copyright +# ownership. The ASF licenses this file to you under the Apache +# License, Version 2.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.apache.org/licenses/LICENSE-2.0 . +# +from .CGPaperElementLocation import CGPaperElementLocation +from ..common.ConfigGroup import ConfigGroup + +class CGLetter(ConfigGroup): + + def __init__(self): + self.cp_Style = int() + self.cp_BusinessPaper = bool() + self.cp_CompanyLogo = CGPaperElementLocation() + self.cp_CompanyAddress = CGPaperElementLocation() + self.cp_PaperCompanyAddressReceiverField = bool() + self.cp_PaperFooter = bool() + self.cp_PaperFooterHeight = float() + self.cp_PrintCompanyLogo = bool() + self.cp_PrintCompanyAddressReceiverField = bool() + self.cp_PrintLetterSigns = bool() + self.cp_PrintSubjectLine = bool() + self.cp_PrintSalutation = bool() + self.cp_PrintBendMarks = bool() + self.cp_PrintGreeting = bool() + self.cp_PrintFooter = bool() + self.cp_Salutation = str() + self.cp_Greeting = str() + self.cp_SenderAddressType = int() + self.cp_SenderCompanyName = str() + self.cp_SenderStreet = str() + self.cp_SenderPostCode = str() + self.cp_SenderState = str() + self.cp_SenderCity = str() + self.cp_ReceiverAddressType = int() + self.cp_Footer = str() + self.cp_FooterOnlySecondPage = bool() + self.cp_FooterPageNumbers = bool() + self.cp_CreationType = int() + self.cp_TemplateName = str() + self.cp_TemplatePath = str() diff --git a/wizards/com/sun/star/wizards/letter/CGLetterWizard.py b/wizards/com/sun/star/wizards/letter/CGLetterWizard.py new file mode 100644 index 000000000..eb1051c44 --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/CGLetterWizard.py @@ -0,0 +1,27 @@ +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This file incorporates work covered by the following license notice: +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed +# with this work for additional information regarding copyright +# ownership. The ASF licenses this file to you under the Apache +# License, Version 2.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.apache.org/licenses/LICENSE-2.0 . +# +from ..common.ConfigGroup import ConfigGroup +from .CGLetter import CGLetter + +class CGLetterWizard (ConfigGroup): + + def __init__(self): + self.cp_LetterType = int() + self.cp_BusinessLetter = CGLetter() + self.cp_PrivateOfficialLetter = CGLetter() + self.cp_PrivateLetter = CGLetter() diff --git a/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.py b/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.py new file mode 100644 index 000000000..c57dde909 --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.py @@ -0,0 +1,27 @@ +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This file incorporates work covered by the following license notice: +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed +# with this work for additional information regarding copyright +# ownership. The ASF licenses this file to you under the Apache +# License, Version 2.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.apache.org/licenses/LICENSE-2.0 . +# +from ..common.ConfigGroup import ConfigGroup + +class CGPaperElementLocation(ConfigGroup): + + def __init__(self): + self.cp_Display = bool() + self.cp_Width = float() + self.cp_Height = float() + self.cp_X = float() + self.cp_Y = float() diff --git a/wizards/com/sun/star/wizards/letter/CallWizard.py b/wizards/com/sun/star/wizards/letter/CallWizard.py new file mode 100644 index 000000000..fc12e1b5e --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/CallWizard.py @@ -0,0 +1,75 @@ +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This file incorporates work covered by the following license notice: +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed +# with this work for additional information regarding copyright +# ownership. The ASF licenses this file to you under the Apache +# License, Version 2.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.apache.org/licenses/LICENSE-2.0 . +# +import unohelper +import traceback + +from .LetterWizardDialogImpl import LetterWizardDialogImpl, Desktop + +from com.sun.star.lang import XServiceInfo +from com.sun.star.task import XJobExecutor + +# pythonloader looks for a static g_ImplementationHelper variable +g_ImplementationHelper = unohelper.ImplementationHelper() +g_implName = "com.sun.star.wizards.letter.CallWizard" + +# implement a UNO component by deriving from the standard unohelper.Base class +# and from the interface(s) you want to implement. +class CallWizard(unohelper.Base, XJobExecutor, XServiceInfo): + def __init__(self, ctx): + # store the component context for later use + self.ctx = ctx + + def trigger(self, args): + try: + lw = LetterWizardDialogImpl(self.ctx.ServiceManager) + lw.startWizard(self.ctx.ServiceManager) + except Exception as e: + print ("Wizard failure exception " + str(type(e)) + + " message " + str(e) + " args " + str(e.args) + + traceback.format_exc()) + + @classmethod + def callRemote(self): + #Call the wizard remotely(see README) + try: + ConnectStr = \ + "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" + xLocMSF = Desktop.connect(ConnectStr) + lw = LetterWizardDialogImpl(xLocMSF) + lw.startWizard(xLocMSF) + except Exception as e: + print ("Wizard failure exception " + str(type(e)) + + " message " + str(e) + " args " + str(e.args) + + traceback.format_exc()) + + def getImplementationName(self): + return g_implName + + def supportsService(self, ServiceName): + return g_ImplementationHelper.supportsService(g_implName, ServiceName) + + def getSupportedServiceNames(self): + return g_ImplementationHelper.getSupportedServiceNames(g_implName) + +g_ImplementationHelper.addImplementation( \ + CallWizard, # UNO object class + g_implName, # implementation name + ("com.sun.star.task.Job",),) # list of implemented services + # (the only service) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/wizards/com/sun/star/wizards/letter/LetterDocument.py b/wizards/com/sun/star/wizards/letter/LetterDocument.py new file mode 100644 index 000000000..5860f2804 --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/LetterDocument.py @@ -0,0 +1,238 @@ +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This file incorporates work covered by the following license notice: +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed +# with this work for additional information regarding copyright +# ownership. The ASF licenses this file to you under the Apache +# License, Version 2.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.apache.org/licenses/LICENSE-2.0 . +# +from ..text.TextDocument import TextDocument, traceback, \ + TextFieldHandler, Configuration +from ..text.TextSectionHandler import TextSectionHandler + +from com.sun.star.table import BorderLine +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 THROUGH +from com.sun.star.awt.FontWeight import BOLD +from com.sun.star.beans import UnknownPropertyException + +class LetterDocument(TextDocument): + + def __init__(self, xMSF, listener): + super(LetterDocument,self).__init__(xMSF, listener, None, + "WIZARD_LIVE_PREVIEW") + self.keepLogoFrame = True + self.keepBendMarksFrame = True + self.keepLetterSignsFrame = True + self.keepSenderAddressRepeatedFrame = True + self.keepAddressFrame = True + + def switchElement(self, sElement, bState): + try: + mySectionHandler = TextSectionHandler( + self.xMSF, self.xTextDocument) + oSection = \ + mySectionHandler.xTextDocument.TextSections.getByName(sElement) + oSection.IsVisible = bState + except Exception: + traceback.print_exc() + + def updateDateFields(self): + FH = TextFieldHandler( + self.xTextDocument, self.xTextDocument) + FH.updateDateFields() + + def switchFooter(self, sPageStyle, bState, bPageNumber, sText): + if self.xTextDocument is not None: + try: + self.xTextDocument.lockControllers() + xNameAccess = self.xTextDocument.StyleFamilies + xPageStyleCollection = xNameAccess.getByName("PageStyles") + xPageStyle = xPageStyleCollection.getByName(sPageStyle) + if bState: + xPageStyle.FooterIsOn = True + xFooterText = xPageStyle.FooterText + xFooterText.String = sText + if bPageNumber: + #Adding the Page Number + myCursor = xFooterText.Text.createTextCursor() + myCursor.gotoEnd(False) + xFooterText.insertControlCharacter(myCursor, + PARAGRAPH_BREAK, False) + myCursor.setPropertyValue("ParaAdjust", CENTER ) + + xPageNumberField = \ + self.xTextDocument.createInstance( + "com.sun.star.text.TextField.PageNumber") + xPageNumberField.setPropertyValue("SubType", CURRENT) + xPageNumberField.NumberingType = ARABIC + xFooterText.insertTextContent(xFooterText.End, + xPageNumberField, False) + + else: + xPageStyle.FooterIsOn = False + + self.xTextDocument.unlockControllers() + except Exception: + traceback.print_exc() + + def hasElement(self, sElement): + if self.xTextDocument is not None: + SH = TextSectionHandler(self.xMSF, self.xTextDocument) + return SH.hasTextSectionByName(sElement) + else: + return False + + def switchUserField(self, sFieldName, sNewContent, bState): + myFieldHandler = TextFieldHandler( + self.xMSF, self.xTextDocument) + if bState: + myFieldHandler.changeUserFieldContent(sFieldName, sNewContent) + else: + myFieldHandler.changeUserFieldContent(sFieldName, "") + + def fillSenderWithUserData(self): + try: + myFieldHandler = TextFieldHandler( + self.xTextDocument, self.xTextDocument) + oUserDataAccess = Configuration.getConfigurationRoot( + self.xMSF, "org.openoffice.UserProfile/Data", False) + myFieldHandler.changeUserFieldContent( + "Company", oUserDataAccess.getByName("o")) + myFieldHandler.changeUserFieldContent( + "Street", oUserDataAccess.getByName("street")) + myFieldHandler.changeUserFieldContent( + "PostCode", oUserDataAccess.getByName("postalcode")) + myFieldHandler.changeUserFieldContent( + "City", oUserDataAccess.getByName("l")) + myFieldHandler.changeUserFieldContent( + "State", oUserDataAccess.getByName("st")) + except Exception: + traceback.print_exc() + + def killEmptyUserFields(self): + myFieldHandler = TextFieldHandler( + self.xMSF, self.xTextDocument) + myFieldHandler.removeUserFieldByContent() + + def killEmptyFrames(self): + try: + if not self.keepLogoFrame: + xTF = self.getFrameByName( + "Company Logo", self.xTextDocument) + if xTF is not None: + xTF.dispose() + + if not self.keepBendMarksFrame: + xTF = self.getFrameByName( + "Bend Marks", self.xTextDocument) + if xTF is not None: + xTF.dispose() + + if not self.keepLetterSignsFrame: + xTF = self.getFrameByName( + "Letter Signs", self.xTextDocument) + if xTF is not None: + xTF.dispose() + + if not self.keepSenderAddressRepeatedFrame: + xTF = self.getFrameByName( + "Sender Address Repeated", self.xTextDocument) + if xTF is not None: + xTF.dispose() + + if not self.keepAddressFrame: + xTF = self.getFrameByName( + "Sender Address", self.xTextDocument) + if xTF is not None: + xTF.dispose() + + except Exception: + traceback.print_exc() + +class BusinessPaperObject(object): + + def __init__(self, xTextDocument, FrameText, Width, Height, XPos, YPos): + self.xTextDocument = xTextDocument + self.iWidth = Width + self.iHeight = Height + self.iXPos = XPos + self.iYPos = YPos + self.xFrame = None + try: + self.xFrame = \ + self.xTextDocument.createInstance( + "com.sun.star.text.TextFrame") + self.setFramePosition() + self.xFrame.AnchorType = AT_PAGE + self.xFrame.SizeType = FIX + + self.xFrame.TextWrap = THROUGH + self.xFrame.Opaque = True + self.xFrame.BackColor = 15790320 + + myBorder = BorderLine() + myBorder.OuterLineWidth = 0 + self.xFrame.LeftBorder = myBorder + self.xFrame.RightBorder = myBorder + self.xFrame.TopBorder = myBorder + self.xFrame.BottomBorder = myBorder + self.xFrame.Print = False + xTextCursor = \ + self.xTextDocument.Text.createTextCursor() + xTextCursor.gotoEnd(True) + xText = self.xTextDocument.Text + xText.insertTextContent( + xTextCursor, self.xFrame, + False) + + xFrameText = self.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): + try: + self.xFrame.HoriOrient = NONEHORI + self.xFrame.VertOrient = NONEVERT + self.xFrame.Height = self.iHeight + self.xFrame.Width = self.iWidth + self.xFrame.HoriOrientPosition = self.iXPos + self.xFrame.VertOrientPosition = self.iYPos + self.xFrame.HoriOrientRelation = PAGE_FRAME + self.xFrame.VertOrientRelation = PAGE_FRAME + except Exception: + traceback.print_exc() + + def removeFrame(self): + if self.xFrame is not None: + try: + self.xTextDocument.Text.removeTextContent( + self.xFrame) + except UnknownPropertyException: + pass + 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 new file mode 100644 index 000000000..0208de833 --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py @@ -0,0 +1,1122 @@ +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This file incorporates work covered by the following license notice: +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed +# with this work for additional information regarding copyright +# ownership. The ASF licenses this file to you under the Apache +# License, Version 2.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.apache.org/licenses/LICENSE-2.0 . +# +from .LetterWizardDialogConst import LetterWizardDialogConst, HIDMAIN, HID +from .LetterWizardDialogResources import LetterWizardDialogResources +from ..common.HelpIds import HelpIds +from ..ui.WizardDialog import WizardDialog, uno, UIConsts, PropertyNames + +from com.sun.star.awt.FontUnderline import SINGLE + +class LetterWizardDialog(WizardDialog): + + def __init__(self, xmsf): + super(LetterWizardDialog, self).__init__(xmsf, HIDMAIN ) + + #Load Resources + self.resources = LetterWizardDialogResources() + + #set dialog properties... + self.setDialogProperties(True, 210, True, 104, 52, 1, 1, + self.resources.resLetterWizardDialog_title, 350) + + self.fontDescriptor5 = \ + uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + self.fontDescriptor6 = \ + uno.createUnoStruct('com.sun.star.awt.FontDescriptor') + self.fontDescriptor5.Weight = 100 + self.fontDescriptor6.Weight = 150 + + def buildStep1(self): + self.optBusinessLetter = self.insertRadioButton( + "optBusinessLetter", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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", + LetterWizardDialogConst.LSTBUSINESSSTYLE_ACTION_PERFORMED, + LetterWizardDialogConst.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", + LetterWizardDialogConst.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", + LetterWizardDialogConst.LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED, + LetterWizardDialogConst.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", + LetterWizardDialogConst.LSTPRIVATESTYLE_ACTION_PERFORMED, + LetterWizardDialogConst.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.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.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.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.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.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", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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, 50), self) + self.numLogoX = self.insertNumericField( + "numLogoX", + LetterWizardDialogConst.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", 286, 40, True, 2, 10, 0, 50), self) + self.numLogoWidth = self.insertNumericField( + "numLogoWidth", + LetterWizardDialogConst.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, 50), self) + self.numLogoY = self.insertNumericField( + "numLogoY", + LetterWizardDialogConst.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", 286, 56, True, 2, 12, -3.4, 50), self) + self.chkPaperCompanyAddress = self.insertCheckBox( + "chkPaperCompanyAddress", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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, 50), self) + self.numAddressX = self.insertNumericField( + "numAddressX", + LetterWizardDialogConst.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", 286, 96, True, 2, 15, 3.8, 50), self) + self.numAddressWidth = self.insertNumericField( + "numAddressWidth", + LetterWizardDialogConst.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, 50), self) + self.numAddressY = self.insertNumericField( + "numAddressY", + LetterWizardDialogConst.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", 286, 112, True, 2, 17, -3.4, 50), self) + self.chkCompanyReceiver = self.insertCheckBox( + "chkCompanyReceiver", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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, 50), self) + 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.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.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, 255)) + 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, 255)) + 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.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", 190, 42, 2, 84, 94)) + 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", 190, 58, 2, 85, 94)) + 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.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.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", 190, 98, 2, 88, 94)) + 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", 190, 114, 2, 89, 94)) + 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.chkUseLogo = self.insertCheckBox( + "chkUseLogo", + LetterWizardDialogConst.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, 34, 0, 3, 22, 212), self) + self.chkUseAddressReceiver = self.insertCheckBox( + "chkUseAddressReceiver", + LetterWizardDialogConst.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, 49, 0, 3, 23, 212), self) + self.chkUseSigns = self.insertCheckBox( + "chkUseSigns", + LetterWizardDialogConst.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, 62, 0, 3, 24, 212), self) + self.chkUseSubject = self.insertCheckBox( + "chkUseSubject", + LetterWizardDialogConst.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, 78, 0, 3, 25, 212), self) + self.chkUseSalutation = self.insertCheckBox( + "chkUseSalutation", + LetterWizardDialogConst.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, 93, 0, 3, 26, 66), self) + self.lstSalutation = self.insertComboBox( + "lstSalutation", + LetterWizardDialogConst.LSTSALUTATION_ACTION_PERFORMED, + LetterWizardDialogConst.LSTSALUTATION_ITEM_CHANGED, + LetterWizardDialogConst.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, 90, 3, 27, 74), self) + self.chkUseBendMarks = self.insertCheckBox( + "chkUseBendMarks", + LetterWizardDialogConst.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, 107, 0, 3, 28, 212), self) + self.chkUseGreeting = self.insertCheckBox( + "chkUseGreeting", + LetterWizardDialogConst.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, 122, 0, 3, 29, 66), self) + self.lstGreeting = self.insertComboBox( + "lstGreeting", + LetterWizardDialogConst.LSTGREETING_ACTION_PERFORMED, + LetterWizardDialogConst.LSTGREETING_ITEM_CHANGED, + LetterWizardDialogConst.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, 121, 3, 30, 74), self) + self.chkUseFooter = self.insertCheckBox( + "chkUseFooter", + LetterWizardDialogConst.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, 138, 0, 3, 31, 212), self) + 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", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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.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.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.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.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.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.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.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", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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.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.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", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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", + LetterWizardDialogConst.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.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.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.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.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, + UIConsts.INFOIMAGEURL, + "ImageControl2", 92, 145, False, 6, 66, 10)) + 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.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/LetterWizardDialogConst.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py new file mode 100644 index 000000000..8517b700e --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py @@ -0,0 +1,76 @@ +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This file incorporates work covered by the following license notice: +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed +# with this work for additional information regarding copyright +# ownership. The ASF licenses this file to you under the Apache +# License, Version 2.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.apache.org/licenses/LICENSE-2.0 . +# + +HID = 40768 +HIDMAIN = 40820 + +class LetterWizardDialogConst: + OPTBUSINESSLETTER_ITEM_CHANGED = "optBusinessLetterItemChanged" + OPTBUSINESSLETTER_ITEM_CHANGED = "optBusinessLetterItemChanged" + OPTPRIVOFFICIALLETTER_ITEM_CHANGED = "optPrivOfficialLetterItemChanged" + OPTPRIVATELETTER_ITEM_CHANGED = "optPrivateLetterItemChanged" + LSTBUSINESSSTYLE_ACTION_PERFORMED = None + LSTBUSINESSSTYLE_ITEM_CHANGED = "lstBusinessStyleItemChanged" + LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED = None + LSTPRIVOFFICIALSTYLE_ITEM_CHANGED = "lstPrivOfficialStyleItemChanged" + CHKBUSINESSPAPER_ITEM_CHANGED = "chkBusinessPaperItemChanged" + LSTPRIVATESTYLE_ACTION_PERFORMED = None + LSTPRIVATESTYLE_ITEM_CHANGED = "lstPrivateStyleItemChanged" + CHKPAPERCOMPANYLOGO_ITEM_CHANGED = "chkPaperCompanyLogoItemChanged" + NUMLOGOHEIGHT_TEXT_CHANGED = "numLogoHeightTextChanged" + NUMLOGOX_TEXT_CHANGED = "numLogoXTextChanged" + NUMLOGOWIDTH_TEXT_CHANGED = "numLogoWidthTextChanged" + NUMLOGOY_TEXT_CHANGED = "numLogoYTextChanged" + CHKCOMPANYRECEIVER_ITEM_CHANGED = "chkCompanyReceiverItemChanged" + CHKPAPERFOOTER_ITEM_CHANGED = "chkPaperFooterItemChanged" + NUMFOOTERHEIGHT_TEXT_CHANGED = "numFooterHeightTextChanged" + CHKPAPERCOMPANYADDRESS_ITEM_CHANGED = "chkPaperCompanyAddressItemChanged" + NUMADDRESSHEIGHT_TEXT_CHANGED = "numAddressHeightTextChanged" + NUMADDRESSX_TEXT_CHANGED = "numAddressXTextChanged" + NUMADDRESSWIDTH_TEXT_CHANGED = "numAddressWidthTextChanged" + NUMADDRESSY_TEXT_CHANGED = "numAddressYTextChanged" + CHKUSELOGO_ITEM_CHANGED = "chkUseLogoItemChanged" + CHKUSEADDRESSRECEIVER_ITEM_CHANGED = "chkUseAddressReceiverItemChanged" + CHKUSESIGNS_ITEM_CHANGED = "chkUseSignsItemChanged" + CHKUSESUBJECT_ITEM_CHANGED = "chkUseSubjectItemChanged" + CHKUSEBENDMARKS_ITEM_CHANGED = "chkUseBendMarksItemChanged" + CHKUSEFOOTER_ITEM_CHANGED = "chkUseFooterItemChanged" + CHKUSESALUTATION_ITEM_CHANGED = "chkUseSalutationItemChanged" + CHKUSEGREETING_ITEM_CHANGED = "chkUseGreetingItemChanged" + LSTSALUTATION_ACTION_PERFORMED = None + LSTSALUTATION_ITEM_CHANGED = "lstSalutationItemChanged" + LSTSALUTATION_TEXT_CHANGED = "lstSalutationItemChanged" + LSTGREETING_ACTION_PERFORMED = None + LSTGREETING_ITEM_CHANGED = "lstGreetingItemChanged" + LSTGREETING_TEXT_CHANGED = "lstGreetingItemChanged" + OPTSENDERPLACEHOLDER_ITEM_CHANGED = "optSenderPlaceholderItemChanged" + OPTSENDERDEFINE_ITEM_CHANGED = "optSenderDefineItemChanged" + OPTRECEIVERPLACEHOLDER_ITEM_CHANGED = "optReceiverPlaceholderItemChanged" + OPTRECEIVERDATABASE_ITEM_CHANGED = "optReceiverDatabaseItemChanged" + TXTSENDERNAME_TEXT_CHANGED = "txtSenderNameTextChanged" + TXTSENDERSTREET_TEXT_CHANGED = "txtSenderStreetTextChanged" + TXTSENDERCITY_TEXT_CHANGED = "txtSenderCityTextChanged" + TXTSENDERPOSTCODE_TEXT_CHANGED = "txtSenderPostCodeTextChanged" + TXTSENDERSTATE_TEXT_CHANGED = "txtSenderStateTextChanged" + TXTFOOTER_TEXT_CHANGED = "txtFooterTextChanged" + CHKFOOTERNEXTPAGES_ITEM_CHANGED = "chkFooterNextPagesItemChanged" + CHKFOOTERPAGENUMBERS_ITEM_CHANGED = "chkFooterPageNumbersItemChanged" + TXTTEMPLATENAME_TEXT_CHANGED = "txtTemplateNameTextChanged" + OPTCREATELETTER_ITEM_CHANGED = "optCreateFromTemplateItemChanged" + OPTMAKECHANGES_ITEM_CHANGED = "optMakeChangesItemChanged" + FILETEMPLATEPATH_TEXT_CHANGED = None diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py new file mode 100644 index 000000000..66c0e3345 --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py @@ -0,0 +1,976 @@ +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This file incorporates work covered by the following license notice: +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed +# with this work for additional information regarding copyright +# ownership. The ASF licenses this file to you under the Apache +# License, Version 2.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.apache.org/licenses/LICENSE-2.0 . +# +import traceback +import os.path +from .LetterWizardDialog import LetterWizardDialog, uno, HelpIds, HID +from .LetterDocument import LetterDocument, BusinessPaperObject +from .CGLetterWizard import CGLetterWizard +from ..common.FileAccess import FileAccess +from ..common.Configuration import Configuration +from ..common.SystemDialog import SystemDialog +from ..common.Desktop import Desktop +from ..ui.PathSelection import PathSelection +from ..ui.event.UnoDataAware import UnoDataAware +from ..ui.event.RadioDataAware import RadioDataAware +from ..ui.event.CommonListener import TerminateListenerProcAdapter +from ..text.TextElement import TextElement +from ..text.TextFieldHandler import TextFieldHandler +from ..document.OfficeDocument import OfficeDocument + +from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO +from com.sun.star.util import CloseVetoException +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 + RM_BUSINESSPAPER = 2 + RM_SENDERRECEIVER = 4 + RM_FOOTER = 5 + + def enterStep(self, OldStep, NewStep): + pass + + def leaveStep(self, OldStep, NewStep): + pass + + def __init__(self, xmsf): + super(LetterWizardDialogImpl, self).__init__(xmsf) + self.lstBusinessStylePos = None + self.lstPrivateStylePos = None + self.lstPrivOfficialStylePos = None + self.xmsf = xmsf + self.bSaveSuccess = False + self.filenameChanged = False + self.BusCompanyLogo = None + self.BusCompanyAddress = None + self.BusCompanyAddressReceiver = None + self.BusFooter = None + + def startWizard(self, xMSF): + self.running = True + try: + #Number of steps on WizardDialog + self.nMaxStep = 6 + + #instantiate The Document Frame for the Preview + self.terminateListener = TerminateListenerProcAdapter(self.queryTermination) + self.myLetterDoc = LetterDocument(xMSF, self.terminateListener) + + #create the dialog + self.drawNaviBar() + self.buildStep1() + self.buildStep2() + self.buildStep3() + self.buildStep4() + self.buildStep5() + self.buildStep6() + + self.initializePaths() + self.initializeSalutation() + self.initializeGreeting() + + #special Control fFrameor setting the save Path: + self.insertPathSelectionControl() + + self.myConfig = CGLetterWizard() + + self.initializeTemplates(xMSF) + + #load the last used settings + #from the registry and apply listeners to the controls: + self.initConfiguration() + + if self.myConfig.cp_BusinessLetter.cp_Greeting : + 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] + + if self.myConfig.cp_PrivateOfficialLetter.cp_Greeting: + 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] + + if self.myConfig.cp_PrivateLetter.cp_Greeting: + 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] + + if self.myPathSelection.xSaveTextBox.Text.lower() == "": + self.myPathSelection.initializePath() + + xContainerWindow = self.myLetterDoc.xFrame.ContainerWindow + self.createWindowPeer(xContainerWindow) + self.insertRoadmap() + self.setConfiguration() + self.setDefaultForGreetingAndSalutation() + self.initializeElements() + self.myLetterDoc.xFrame.ComponentWindow.Enable = False + self.executeDialogFromComponent(self.myLetterDoc.xFrame) + self.removeTerminateListener() + self.closeDocument() + self.running = False + except Exception: + self.removeTerminateListener() + traceback.print_exc() + self.running = False + return + + def cancelWizard(self): + self.xUnoDialog.endExecute() + self.running = False + + def finishWizard(self): + self.switchToStep(self.getCurrentStep(), self.nMaxStep) + endWizard = True + try: + self.sPath = self.myPathSelection.getSelectedPath() + if not self.sPath or not os.path.exists(self.sPath): + self.myPathSelection.triggerPathPicker() + self.sPath = self.myPathSelection.getSelectedPath() + + if not self.filenameChanged: + answer = SystemDialog.showMessageBox( + self.xMSF, "MessBox", YES_NO + DEF_NO, + self.resources.resOverwriteWarning, + self.xUnoDialog.Peer) + if answer == 3: + # user said: no, do not overwrite... + endWizard = False + return False + + self.myLetterDoc.setWizardTemplateDocInfo( + self.resources.resLetterWizardDialog_title, + self.resources.resTemplateDescription) + self.myLetterDoc.killEmptyUserFields() + self.myLetterDoc.keepLogoFrame = self.chkUseLogo.State != 0 + if self.chkBusinessPaper.State != 0 \ + and self.chkPaperCompanyLogo.State != 0: + self.myLetterDoc.keepLogoFrame = False + + 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 self.chkBusinessPaper.State != 0 \ + and self.chkPaperCompanyAddress.State != 0: + self.myLetterDoc.keepAddressFrame = False + + self.myLetterDoc.killEmptyFrames() + self.bSaveSuccess = \ + OfficeDocument.store( + self.xMSF, self.myLetterDoc.xTextDocument, + self.sPath, "writer8_template") + if self.bSaveSuccess: + self.saveConfiguration() + xIH = self.xMSF.createInstance( + "com.sun.star.comp.uui.UUIInteractionHandler") + loadValues = list(range(4)) + loadValues[0] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') + loadValues[0].Name = "AsTemplate" + loadValues[1] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') + loadValues[1].Name = "MacroExecutionMode" + loadValues[1].Value = ALWAYS_EXECUTE + loadValues[2] = uno.createUnoStruct( \ + 'com.sun.star.beans.PropertyValue') + loadValues[2].Name = "UpdateDocMode" + 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: + loadValues[0].Value = False + else: + loadValues[0].Value = True + + oDoc = OfficeDocument.load( + Desktop.getDesktop(self.xMSF), + self.sPath, "_default", loadValues) + oDoc.CurrentController.ViewSettings.ZoomType = OPTIMAL + else: + pass + + except Exception: + traceback.print_exc() + finally: + if endWizard: + self.xUnoDialog.endExecute() + self.running = False + + return True; + + def closeDocument(self): + try: + xCloseable = self.myLetterDoc.xFrame + xCloseable.close(False) + except CloseVetoException: + traceback.print_exc() + + def optBusinessLetterItemChanged(self): + self.lstPrivateStylePos = None + self.lstPrivOfficialStylePos = None + self.xDialogModel.lblBusinessStyle.Enabled = True + self.xDialogModel.lstBusinessStyle.Enabled = True + self.xDialogModel.chkBusinessPaper.Enabled = True + self.xDialogModel.lblPrivOfficialStyle.Enabled = False + self.xDialogModel.lstPrivOfficialStyle.Enabled = False + self.xDialogModel.lblPrivateStyle.Enabled = False + self.xDialogModel.lstPrivateStyle.Enabled = False + self.lstBusinessStyleItemChanged() + self.enableSenderReceiver() + self.setPossibleFooter(True) + if self.myPathSelection.xSaveTextBox.Text.lower() == "": + self.myPathSelection.initializePath() + + def optPrivOfficialLetterItemChanged(self): + self.lstBusinessStylePos = None + self.lstPrivateStylePos = None + self.xDialogModel.lblBusinessStyle.Enabled = False + self.xDialogModel.lstBusinessStyle.Enabled = False + self.xDialogModel.chkBusinessPaper.Enabled = False + self.xDialogModel.lblPrivOfficialStyle.Enabled = True + self.xDialogModel.lstPrivOfficialStyle.Enabled = True + self.xDialogModel.lblPrivateStyle.Enabled = False + self.xDialogModel.lstPrivateStyle.Enabled = False + self.lstPrivOfficialStyleItemChanged() + self.disableBusinessPaper() + self.disableSenderReceiver() + self.setPossibleFooter(True) + if self.myPathSelection.xSaveTextBox.Text.lower() == "": + self.myPathSelection.initializePath() + self.myLetterDoc.fillSenderWithUserData() + + def optPrivateLetterItemChanged(self): + self.lstBusinessStylePos = None + self.lstPrivOfficialStylePos = None + self.xDialogModel.lblBusinessStyle.Enabled = False + self.xDialogModel.lstBusinessStyle.Enabled = False + self.xDialogModel.chkBusinessPaper.Enabled = False + self.xDialogModel.lblPrivOfficialStyle.Enabled = False + self.xDialogModel.lstPrivOfficialStyle.Enabled = False + self.xDialogModel.lblPrivateStyle.Enabled = True + self.xDialogModel.lstPrivateStyle.Enabled = True + self.lstPrivateStyleItemChanged() + self.disableBusinessPaper() + self.disableSenderReceiver() + self.setPossibleFooter(False) + if self.myPathSelection.xSaveTextBox.Text.lower() == "": + self.myPathSelection.initializePath() + + def optSenderPlaceholderItemChanged(self): + self.xDialogModel.lblSenderName.Enabled = False + self.xDialogModel.lblSenderStreet.Enabled = False + self.xDialogModel.lblPostCodeCity.Enabled = False + self.xDialogModel.txtSenderName.Enabled = False + self.xDialogModel.txtSenderStreet.Enabled = False + self.xDialogModel.txtSenderPostCode.Enabled = False + self.xDialogModel.txtSenderState.Enabled = False + self.xDialogModel.txtSenderCity.Enabled = False + self.myLetterDoc.fillSenderWithUserData() + + def optSenderDefineItemChanged(self): + self.xDialogModel.lblSenderName.Enabled = True + self.xDialogModel.lblSenderStreet.Enabled = True + self.xDialogModel.lblPostCodeCity.Enabled = True + self.xDialogModel.txtSenderName.Enabled = True + self.xDialogModel.txtSenderStreet.Enabled = True + self.xDialogModel.txtSenderPostCode.Enabled = True + self.xDialogModel.txtSenderState.Enabled = True + self.xDialogModel.txtSenderCity.Enabled = True + self.txtSenderNameTextChanged() + self.txtSenderStreetTextChanged() + self.txtSenderPostCodeTextChanged() + self.txtSenderStateTextChanged() + self.txtSenderCityTextChanged() + + def lstBusinessStyleItemChanged(self): + selectedItemPos = self.lstBusinessStyle.SelectedItemPos + if self.lstBusinessStylePos != selectedItemPos: + self.lstBusinessStylePos = selectedItemPos + self.myLetterDoc.loadAsPreview( + self.BusinessFiles[1][selectedItemPos], False) + self.initializeElements() + self.chkBusinessPaperItemChanged() + self.setElements(False) + self.drawConstants() + + def lstPrivOfficialStyleItemChanged(self): + selectedItemPos = self.lstPrivOfficialStyle.SelectedItemPos + if self.lstPrivOfficialStylePos != selectedItemPos: + self.lstPrivOfficialStylePos = selectedItemPos + self.myLetterDoc.loadAsPreview( + self.OfficialFiles[1][selectedItemPos], False) + self.initializeElements() + self.setPossibleSenderData(True) + self.setElements(False) + self.drawConstants() + + def lstPrivateStyleItemChanged(self): + selectedItemPos = self.lstPrivateStyle.SelectedItemPos + if self.lstPrivateStylePos != selectedItemPos: + self.lstPrivateStylePos = selectedItemPos + self.myLetterDoc.xTextDocument = \ + self.myLetterDoc.loadAsPreview( + self.PrivateFiles[1][selectedItemPos], False) + self.initializeElements() + self.setElements(True) + + def numLogoHeightTextChanged(self): + self.BusCompanyLogo.iHeight = int(self.numLogoHeight.Value * 1000) + self.BusCompanyLogo.setFramePosition() + + def numLogoWidthTextChanged(self): + self.BusCompanyLogo.iWidth = int(self.numLogoWidth.Value * 1000) + self.BusCompanyLogo.setFramePosition() + + def numLogoXTextChanged(self): + self.BusCompanyLogo.iXPos = int(self.numLogoX.Value * 1000) + self.BusCompanyLogo.setFramePosition() + + def numLogoYTextChanged(self): + self.BusCompanyLogo.iYPos = int(self.numLogoY.Value * 1000) + self.BusCompanyLogo.setFramePosition() + + def numAddressWidthTextChanged(self): + self.BusCompanyAddress.iWidth = int(self.numAddressWidth.Value * 1000) + self.BusCompanyAddress.setFramePosition() + + def numAddressXTextChanged(self): + self.BusCompanyAddress.iXPos = int(self.numAddressX.Value * 1000) + self.BusCompanyAddress.setFramePosition() + + def numAddressYTextChanged(self): + self.BusCompanyAddress.iYPos = int(self.numAddressY.Value * 1000) + self.BusCompanyAddress.setFramePosition() + + def numAddressHeightTextChanged(self): + self.BusCompanyAddress.iHeight = int(self.numAddressHeight.Value * 1000) + self.BusCompanyAddress.setFramePosition() + + def numFooterHeightTextChanged(self): + self.BusFooter.iHeight = int(self.numFooterHeight.Value * 1000) + self.BusFooter.iYPos = \ + self.myLetterDoc.DocSize.Height - self.BusFooter.iHeight + self.BusFooter.setFramePosition() + + def chkPaperCompanyLogoItemChanged(self): + 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 = BusinessPaperObject( + self.myLetterDoc.xTextDocument, "Company Logo", + int(self.numLogoWidth.Value * 1000), + int(self.numLogoHeight.Value * 1000), + int(self.numLogoX.Value * 1000), + self.numLogoY.Value * 1000) + self.xDialogModel.numLogoHeight.Enabled = True + self.xDialogModel.numLogoWidth.Enabled = True + self.xDialogModel.numLogoX.Enabled = True + self.xDialogModel.numLogoY.Enabled = True + self.setPossibleLogo(False) + else: + if self.BusCompanyLogo is not None: + self.BusCompanyLogo.removeFrame() + + self.xDialogModel.numLogoHeight.Enabled = False + self.xDialogModel.numLogoWidth.Enabled = False + self.xDialogModel.numLogoX.Enabled = False + self.xDialogModel.numLogoY.Enabled = False + self.setPossibleLogo(True) + + def chkPaperCompanyAddressItemChanged(self): + 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 = BusinessPaperObject( + self.myLetterDoc.xTextDocument, "Company Address", + int(self.numAddressWidth.Value * 1000), + int(self.numAddressHeight.Value * 1000), + int(self.numAddressX.Value * 1000), + int(self.numAddressY.Value * 1000)) + self.xDialogModel.numAddressHeight.Enabled = True + self.xDialogModel.numAddressWidth.Enabled = True + self.xDialogModel.numAddressX.Enabled = True + self.xDialogModel.numAddressY.Enabled = True + if self.myLetterDoc.hasElement("Sender Address"): + self.myLetterDoc.switchElement( + "Sender Address", False) + + if self.chkCompanyReceiver.State != 0: + self.setPossibleSenderData(False) + + else: + if self.BusCompanyAddress is not None: + self.BusCompanyAddress.removeFrame() + self.xDialogModel.numAddressHeight.Enabled = False + self.xDialogModel.numAddressWidth.Enabled = False + self.xDialogModel.numAddressX.Enabled = False + self.xDialogModel.numAddressY.Enabled = False + if self.myLetterDoc.hasElement("Sender Address"): + self.myLetterDoc.switchElement("Sender Address", True) + + self.setPossibleSenderData(True) + if self.optSenderDefine.State: + self.optSenderDefineItemChanged() + + if self.optSenderPlaceholder.State: + self.optSenderPlaceholderItemChanged() + + def chkCompanyReceiverItemChanged(self): + xReceiverFrame = None + if self.chkCompanyReceiver.State != 0: + try: + xReceiverFrame = self.myLetterDoc.getFrameByName( + "Receiver Address", self.myLetterDoc.xTextDocument) + iFrameWidth = int(xReceiverFrame.Width) + iFrameX = int(xReceiverFrame.HoriOrientPosition) + iFrameY = int(xReceiverFrame.VertOrientPosition) + iReceiverHeight = int(0.5 * 1000) + self.BusCompanyAddressReceiver = BusinessPaperObject( + self.myLetterDoc.xTextDocument, " ", iFrameWidth, iReceiverHeight, + iFrameX, iFrameY - iReceiverHeight) + self.setPossibleAddressReceiver(False) + except Exception: + traceback.print_exc() + + if self.chkPaperCompanyAddress.State != 0: + self.setPossibleSenderData(False) + + else: + if self.BusCompanyAddressReceiver is not None: + self.BusCompanyAddressReceiver.removeFrame() + + self.setPossibleAddressReceiver(True) + self.setPossibleSenderData(True) + if self.optSenderDefine.State: + self.optSenderDefineItemChanged() + + if self.optSenderPlaceholder.State: + self.optSenderPlaceholderItemChanged() + + def chkPaperFooterItemChanged(self): + if self.chkPaperFooter.State != 0: + if self.numFooterHeight.Value == 0: + self.numFooterHeight.Value = 0.1 + + self.BusFooter = BusinessPaperObject( + self.myLetterDoc.xTextDocument, "Footer", + self.myLetterDoc.DocSize.Width, + int(self.numFooterHeight.Value * 1000), 0, + int(self.myLetterDoc.DocSize.Height - \ + (self.numFooterHeight.Value * 1000))) + self.xDialogModel.numFooterHeight.Enabled = True + self.xDialogModel.lblFooterHeight.Enabled = True + self.setPossibleFooter(False) + else: + if self.BusFooter is not None: + self.BusFooter.removeFrame() + + self.xDialogModel.numFooterHeight.Enabled = False + self.xDialogModel.lblFooterHeight.Enabled = False + self.setPossibleFooter(True) + + def chkUseLogoItemChanged(self): + try: + if self.myLetterDoc.hasElement("Company Logo"): + logostatus = \ + bool(self.xDialogModel.chkUseLogo.Enabled) \ + and (self.chkUseLogo.State != 0) + self.myLetterDoc.switchElement( + "Company Logo", logostatus) + except Exception: + traceback.print_exc() + + def chkUseAddressReceiverItemChanged(self): + try: + if self.myLetterDoc.hasElement("Sender Address Repeated"): + rstatus = \ + bool(self.xDialogModel.chkUseAddressReceiver.Enabled) \ + and (self.chkUseAddressReceiver.State != 0) + self.myLetterDoc.switchElement( + "Sender Address Repeated", rstatus) + + except Exception: + traceback.print_exc() + + def chkUseSignsItemChanged(self): + if self.myLetterDoc.hasElement("Letter Signs"): + 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) + + def chkUseBendMarksItemChanged(self): + if self.myLetterDoc.hasElement("Bend Marks"): + self.myLetterDoc.switchElement( + "Bend Marks", self.chkUseBendMarks.State != 0) + + def chkUseFooterItemChanged(self): + try: + bFooterPossible = (self.chkUseFooter.State != 0) \ + and bool(self.xDialogModel.chkUseFooter.Enabled) + if self.chkFooterNextPages.State != 0: + self.myLetterDoc.switchFooter( + "First Page", False, self.chkFooterPageNumbers.State != 0, + self.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) + BPaperItem.Enabled = bFooterPossible + except Exception: + traceback.print_exc() + + def chkFooterNextPagesItemChanged(self): + self.chkUseFooterItemChanged() + + def chkFooterPageNumbersItemChanged(self): + self.chkUseFooterItemChanged() + + def setPossibleFooter(self, bState): + self.xDialogModel.chkUseFooter.Enabled = bState + self.chkUseFooterItemChanged() + + def setPossibleAddressReceiver(self, bState): + if self.myLetterDoc.hasElement("Sender Address Repeated"): + self.xDialogModel.chkUseAddressReceiver.Enabled = bState + self.chkUseAddressReceiverItemChanged() + + def setPossibleLogo(self, bState): + if self.myLetterDoc.hasElement("Company Logo"): + self.xDialogModel.chkUseLogo.Enabled = bState + self.chkUseLogoItemChanged() + + def txtFooterTextChanged(self): + self.chkUseFooterItemChanged() + + def txtSenderNameTextChanged(self): + myFieldHandler = TextFieldHandler( + self.myLetterDoc.xMSF, self.myLetterDoc.xTextDocument) + myFieldHandler.changeUserFieldContent( + "Company", self.txtSenderName.Text) + + def txtSenderStreetTextChanged(self): + myFieldHandler = TextFieldHandler( + self.myLetterDoc.xMSF, self.myLetterDoc.xTextDocument) + myFieldHandler.changeUserFieldContent( + "Street", self.txtSenderStreet.Text) + + def txtSenderCityTextChanged(self): + myFieldHandler = TextFieldHandler( + self.myLetterDoc.xMSF, self.myLetterDoc.xTextDocument) + myFieldHandler.changeUserFieldContent( + "City", self.txtSenderCity.Text) + + def txtSenderPostCodeTextChanged(self): + myFieldHandler = TextFieldHandler( + self.myLetterDoc.xMSF, self.myLetterDoc.xTextDocument) + myFieldHandler.changeUserFieldContent( + "PostCode", self.txtSenderPostCode.Text) + + def txtSenderStateTextChanged(self): + myFieldHandler = TextFieldHandler( + self.myLetterDoc.xMSF, self.myLetterDoc.xTextDocument) + myFieldHandler.changeUserFieldContent( + "State", self.txtSenderState.Text) + + def txtTemplateNameTextChanged(self): + xDocProps = self.myLetterDoc.xTextDocument.DocumentProperties + TitleName = self.txtTemplateName.Text + xDocProps.Title = TitleName + + def chkUseSalutationItemChanged(self): + self.myLetterDoc.switchUserField( + "Salutation", self.lstSalutation.Text, + self.chkUseSalutation.State != 0) + self.xDialogModel.lstSalutation.Enabled = \ + self.chkUseSalutation.State != 0 + + def lstSalutationItemChanged(self): + 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.xDialogModel.lstGreeting.Enabled = \ + self.chkUseGreeting.State != 0 + + def setDefaultForGreetingAndSalutation(self): + if self.lstSalutation.Text: + self.lstSalutation.Text = self.resources.SalutationLabels[0] + + if self.lstGreeting.Text: + self.lstGreeting.Text = self.resources.GreetingLabels[0] + + def lstGreetingItemChanged(self): + self.myLetterDoc.switchUserField( + "Greeting", self.lstGreeting.Text, self.chkUseGreeting.State != 0) + + def chkBusinessPaperItemChanged(self): + if self.chkBusinessPaper.State != 0: + self.enableBusinessPaper() + else: + self.disableBusinessPaper() + self.setPossibleSenderData(True) + + def setPossibleSenderData(self, bState): + self.xDialogModel.optSenderDefine.Enabled = bState + self.xDialogModel.optSenderPlaceholder.Enabled = bState + self.xDialogModel.lblSenderAddress.Enabled = bState + if not bState: + self.xDialogModel.txtSenderCity.Enabled = bState + self.xDialogModel.txtSenderName.Enabled = bState + self.xDialogModel.txtSenderPostCode.Enabled = bState + self.xDialogModel.txtSenderStreet.Enabled = bState + self.xDialogModel.txtSenderCity.Enabled = bState + self.xDialogModel.txtSenderState.Enabled = bState + self.xDialogModel.lblSenderName.Enabled = bState + self.xDialogModel.lblSenderStreet.Enabled = bState + self.xDialogModel.lblPostCodeCity.Enabled = bState + + def enableSenderReceiver(self): + BPaperItem = self.getRoadmapItemByID( + LetterWizardDialogImpl.RM_SENDERRECEIVER) + BPaperItem.Enabled = True + + def disableSenderReceiver(self): + BPaperItem = self.getRoadmapItemByID( + LetterWizardDialogImpl.RM_SENDERRECEIVER) + BPaperItem.Enabled = False + + def enableBusinessPaper(self): + try: + BPaperItem = self.getRoadmapItemByID( + LetterWizardDialogImpl.RM_BUSINESSPAPER) + BPaperItem.Enabled = True + self.chkPaperCompanyLogoItemChanged() + self.chkPaperCompanyAddressItemChanged() + self.chkPaperFooterItemChanged() + self.chkCompanyReceiverItemChanged() + except Exception: + traceback.print_exc() + + def disableBusinessPaper(self): + try: + BPaperItem = self.getRoadmapItemByID( + LetterWizardDialogImpl.RM_BUSINESSPAPER) + BPaperItem.Enabled = False + if self.BusCompanyLogo is not None: + self.BusCompanyLogo.removeFrame() + + if self.BusCompanyAddress is not None: + self.BusCompanyAddress.removeFrame() + + if self.BusFooter is not None: + self.BusFooter.removeFrame() + + if self.BusCompanyAddressReceiver is not 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) + except Exception: + traceback.print_exc() + + def initializeSalutation(self): + self.xDialogModel.lstSalutation.StringItemList = \ + tuple(self.resources.SalutationLabels) + + def initializeGreeting(self): + self.xDialogModel.lstGreeting.StringItemList = \ + tuple(self.resources.GreetingLabels) + + def initializeTemplates(self, xMSF): + sLetterPath = self.sTemplatePath + "/wizard/letter" + self.BusinessFiles = \ + FileAccess.getFolderTitles( + xMSF, "bus", sLetterPath, self.resources.dictBusinessTemplate) + self.OfficialFiles = \ + FileAccess.getFolderTitles( + xMSF, "off", sLetterPath, self.resources.dictOfficialTemplate) + self.PrivateFiles = \ + FileAccess.getFolderTitles( + xMSF, "pri", sLetterPath, self.resources.dictPrivateTemplate) + self.xDialogModel.lstBusinessStyle.StringItemList = \ + tuple(self.BusinessFiles[0]) + self.xDialogModel.lstPrivOfficialStyle.StringItemList = \ + tuple(self.OfficialFiles[0]) + self.xDialogModel.lstPrivateStyle.StringItemList = \ + tuple(self.PrivateFiles[0]) + self.xDialogModel.lstBusinessStyle.SelectedItems = (0,) + self.xDialogModel.lstPrivOfficialStyle.SelectedItems = (0,) + self.xDialogModel.lstPrivateStyle.SelectedItems = (0,) + return True + + def initializeElements(self): + self.xDialogModel.chkUseLogo.Enabled = \ + self.myLetterDoc.hasElement("Company Logo") + self.xDialogModel.chkUseBendMarks.Enabled = \ + self.myLetterDoc.hasElement("Bend Marks") + self.xDialogModel.chkUseAddressReceiver.Enabled = \ + self.myLetterDoc.hasElement("Sender Address Repeated") + self.xDialogModel.chkUseSubject.Enabled = \ + self.myLetterDoc.hasElement("Subject Line") + self.xDialogModel.chkUseSigns.Enabled = \ + self.myLetterDoc.hasElement("Letter Signs") + self.myLetterDoc.updateDateFields() + + def setConfiguration(self): + if self.optBusinessLetter.State: + self.optBusinessLetterItemChanged() + + elif self.optPrivOfficialLetter.State: + self.optPrivOfficialLetterItemChanged() + + elif self.optPrivateLetter.State: + self.optPrivateLetterItemChanged() + + def optReceiverPlaceholderItemChanged(self): + OfficeDocument.attachEventCall( + self.myLetterDoc.xTextDocument, "OnNew", "StarBasic", + "macro:///Template.Correspondence.Placeholder()") + + def optReceiverDatabaseItemChanged(self): + OfficeDocument.attachEventCall( + self.myLetterDoc.xTextDocument, "OnNew", "StarBasic", + "macro:///Template.Correspondence.Database()") + + def setElements(self, privLetter): + if self.optSenderDefine.State: + self.optSenderDefineItemChanged() + + if self.optSenderPlaceholder.State: + self.optSenderPlaceholderItemChanged() + + self.chkUseSignsItemChanged() + self.chkUseSubjectItemChanged() + self.chkUseSalutationItemChanged() + self.chkUseGreetingItemChanged() + self.chkUseBendMarksItemChanged() + self.chkUseAddressReceiverItemChanged() + self.txtTemplateNameTextChanged() + if self.optReceiverDatabase.State and not privLetter: + self.optReceiverDatabaseItemChanged() + + if self.optReceiverPlaceholder.State and not privLetter: + self.optReceiverPlaceholderItemChanged() + + if self.optCreateLetter.State: + self.optCreateFromTemplateItemChanged() + + if self.optMakeChanges.State: + self.optMakeChangesItemChanged() + + def drawConstants(self): + '''Localise the template''' + constRangeList = self.myLetterDoc.searchFillInItems(1) + + for i in constRangeList: + text = i.String.lower() + aux = TextElement(i, self.resources.dictConstants[text]) + aux.write() + + def insertRoadmap(self): + self.addRoadmap() + self.insertRoadMapItems( + self.resources.RoadmapLabels, + [True, False, True, True, False, True]) + self.setRoadmapInteractive(True) + self.setRoadmapComplete(True) + self.setCurrentRoadmapItemID(1) + + 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.sDefaultDirectory = self.sUserTemplatePath + self.myPathSelection.sDefaultName = "myLetterTemplate.ott" + self.myPathSelection.sDefaultFilter = "writer8_template" + self.myPathSelection.addSelectionListener(self) + + def initConfiguration(self): + try: + root = Configuration.getConfigurationRoot( + self.xMSF, "/org.openoffice.Office.Writer/Wizards/Letter", + False) + self.myConfig.readConfiguration(root, "cp_") + RadioDataAware.attachRadioButtons(self.myConfig, "cp_LetterType", + (self.optBusinessLetter, self.optPrivOfficialLetter, + self.optPrivateLetter), True).updateUI() + UnoDataAware.attachListBox( + self.myConfig.cp_BusinessLetter, "cp_Style", + self.lstBusinessStyle, True).updateUI() + UnoDataAware.attachListBox( + self.myConfig.cp_PrivateOfficialLetter, "cp_Style", + self.lstPrivOfficialStyle, True).updateUI() + UnoDataAware.attachListBox( + self.myConfig.cp_PrivateLetter, "cp_Style", + self.lstPrivateStyle, True).updateUI() + UnoDataAware.attachCheckBox( + self.myConfig.cp_BusinessLetter, "cp_BusinessPaper", + self.chkBusinessPaper, True).updateUI() + cgl = self.myConfig.cp_BusinessLetter + cgpl = self.myConfig.cp_BusinessLetter.cp_CompanyLogo + cgpa = self.myConfig.cp_BusinessLetter.cp_CompanyAddress + UnoDataAware.attachCheckBox( + cgpl, "cp_Display", self.chkPaperCompanyLogo, True).updateUI() + UnoDataAware.attachNumericControl( + cgpl, "cp_Width", self.numLogoWidth, True).updateUI() + UnoDataAware.attachNumericControl( + cgpl, "cp_Height", self.numLogoHeight, True).updateUI() + UnoDataAware.attachNumericControl( + cgpl, "cp_X", self.numLogoX, True).updateUI() + UnoDataAware.attachNumericControl( + cgpl, "cp_Y", self.numLogoY, True).updateUI() + UnoDataAware.attachCheckBox( + cgpa, "cp_Display", self.chkPaperCompanyAddress, True).updateUI() + UnoDataAware.attachNumericControl( + cgpa, "cp_Width", self.numAddressWidth, True).updateUI() + UnoDataAware.attachNumericControl( + cgpa, "cp_Height", self.numAddressHeight, True).updateUI() + UnoDataAware.attachNumericControl( + cgpa, "cp_X", self.numAddressX, True).updateUI() + UnoDataAware.attachNumericControl( + cgpa, "cp_Y", self.numAddressY, True).updateUI() + UnoDataAware.attachCheckBox( + cgl, "cp_PaperCompanyAddressReceiverField", + self.chkCompanyReceiver, True).updateUI() + UnoDataAware.attachCheckBox( + cgl, "cp_PaperFooter", self.chkPaperFooter, True).updateUI() + UnoDataAware.attachNumericControl( + cgl, "cp_PaperFooterHeight", self.numFooterHeight, True).updateUI() + UnoDataAware.attachCheckBox( + cgl, "cp_PrintCompanyLogo", self.chkUseLogo, True).updateUI() + UnoDataAware.attachCheckBox( + cgl, "cp_PrintCompanyAddressReceiverField", + self.chkUseAddressReceiver, True).updateUI() + UnoDataAware.attachCheckBox( + cgl, "cp_PrintLetterSigns", self.chkUseSigns, True).updateUI() + UnoDataAware.attachCheckBox( + cgl, "cp_PrintSubjectLine", self.chkUseSubject, True).updateUI() + UnoDataAware.attachCheckBox( + cgl, "cp_PrintSalutation", self.chkUseSalutation, True).updateUI() + UnoDataAware.attachCheckBox( + cgl, "cp_PrintBendMarks", self.chkUseBendMarks, True).updateUI() + UnoDataAware.attachCheckBox( + cgl, "cp_PrintGreeting", self.chkUseGreeting, True).updateUI() + UnoDataAware.attachCheckBox( + cgl, "cp_PrintFooter", self.chkUseFooter, True).updateUI() + UnoDataAware.attachEditControl( + cgl, "cp_Salutation", self.lstSalutation, True).updateUI() + UnoDataAware.attachEditControl( + cgl, "cp_Greeting", self.lstGreeting, True).updateUI() + RadioDataAware.attachRadioButtons( + cgl, "cp_SenderAddressType", + (self.optSenderDefine, self.optSenderPlaceholder), True).updateUI() + UnoDataAware.attachEditControl( + cgl, "cp_SenderCompanyName", self.txtSenderName, True).updateUI() + UnoDataAware.attachEditControl( + cgl, "cp_SenderStreet", self.txtSenderStreet, True).updateUI() + UnoDataAware.attachEditControl( + cgl, "cp_SenderPostCode", self.txtSenderPostCode, True).updateUI() + UnoDataAware.attachEditControl( + cgl, "cp_SenderState", self.txtSenderState, True).updateUI() + UnoDataAware.attachEditControl( + cgl, "cp_SenderCity", self.txtSenderCity, True).updateUI() + RadioDataAware.attachRadioButtons( + cgl, "cp_ReceiverAddressType", + (self.optReceiverDatabase, self.optReceiverPlaceholder), + True).updateUI() + UnoDataAware.attachEditControl( + cgl, "cp_Footer", self.txtFooter, True).updateUI() + UnoDataAware.attachCheckBox( + cgl, "cp_FooterOnlySecondPage", + self.chkFooterNextPages, True).updateUI() + UnoDataAware.attachCheckBox( + cgl, "cp_FooterPageNumbers", + self.chkFooterPageNumbers, True).updateUI() + RadioDataAware.attachRadioButtons( + cgl, "cp_CreationType", + (self.optCreateLetter, self.optMakeChanges), True).updateUI() + UnoDataAware.attachEditControl( + cgl, "cp_TemplateName", self.txtTemplateName, True).updateUI() + UnoDataAware.attachEditControl( + cgl, "cp_TemplatePath", self.myPathSelection.xSaveTextBox, + True).updateUI() + except Exception: + traceback.print_exc() + + def saveConfiguration(self): + try: + root = Configuration.getConfigurationRoot(self.xMSF, + "/org.openoffice.Office.Writer/Wizards/Letter", True) + self.myConfig.writeConfiguration(root, "cp_") + root.commitChanges() + except Exception: + traceback.print_exc() + + def validatePath(self): + if self.myPathSelection.usedPathPicker: + self.filenameChanged = True + self.myPathSelection.usedPathPicker = False diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py new file mode 100644 index 000000000..3a7802f2b --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py @@ -0,0 +1,150 @@ +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This file incorporates work covered by the following license notice: +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed +# with this work for additional information regarding copyright +# ownership. The ASF licenses this file to you under the Apache +# License, Version 2.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.apache.org/licenses/LICENSE-2.0 . +# + +class LetterWizardDialogResources(object): + + def __init__(self): + import sys, os + + if sys.version_info < (3,4): + import imp + imp.load_source('strings', os.path.join(os.path.dirname(__file__), '../common/strings.hrc')) + import strings + elif sys.version_info < (3,7): + # imp is deprecated since Python v.3.4 + from importlib.machinery import SourceFileLoader + SourceFileLoader('strings', os.path.join(os.path.dirname(__file__), '../common/strings.hrc')).load_module() + import strings + else: + # have to jump through hoops since 3.7, partly because python does not like loading modules that do have a .py extension + import importlib + import importlib.util + import importlib.machinery + module_name = 'strings' + path = os.path.join(os.path.dirname(__file__), '../common/strings.hrc') + spec = importlib.util.spec_from_loader( + module_name, + importlib.machinery.SourceFileLoader(module_name, path) + ) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + sys.modules[module_name] = module + strings = module + + import strings + + self.resLetterWizardDialog_title = strings.RID_LETTERWIZARDDIALOG_START_1 + self.resLabel9_value = strings.RID_LETTERWIZARDDIALOG_START_2 + self.resoptBusinessLetter_value = strings.RID_LETTERWIZARDDIALOG_START_3 + self.resoptPrivOfficialLetter_value = strings.RID_LETTERWIZARDDIALOG_START_4 + self.resoptPrivateLetter_value = strings.RID_LETTERWIZARDDIALOG_START_5 + self.reschkBusinessPaper_value = strings.RID_LETTERWIZARDDIALOG_START_6 + self.reschkPaperCompanyLogo_value = strings.RID_LETTERWIZARDDIALOG_START_7 + self.reschkPaperCompanyAddress_value = strings.RID_LETTERWIZARDDIALOG_START_8 + self.reschkPaperFooter_value = strings.RID_LETTERWIZARDDIALOG_START_9 + self.reschkCompanyReceiver_value = strings.RID_LETTERWIZARDDIALOG_START_10 + self.reschkUseLogo_value = strings.RID_LETTERWIZARDDIALOG_START_11 + self.reschkUseAddressReceiver_value = strings.RID_LETTERWIZARDDIALOG_START_12 + self.reschkUseSigns_value = strings.RID_LETTERWIZARDDIALOG_START_13 + self.reschkUseSubject_value = strings.RID_LETTERWIZARDDIALOG_START_14 + self.reschkUseSalutation_value = strings.RID_LETTERWIZARDDIALOG_START_15 + self.reschkUseBendMarks_value = strings.RID_LETTERWIZARDDIALOG_START_16 + self.reschkUseGreeting_value = strings.RID_LETTERWIZARDDIALOG_START_17 + self.reschkUseFooter_value = strings.RID_LETTERWIZARDDIALOG_START_18 + self.resoptSenderPlaceholder_value = strings.RID_LETTERWIZARDDIALOG_START_19 + self.resoptSenderDefine_value = strings.RID_LETTERWIZARDDIALOG_START_20 + self.resoptReceiverPlaceholder_value = strings.RID_LETTERWIZARDDIALOG_START_21 + self.resoptReceiverDatabase_value = strings.RID_LETTERWIZARDDIALOG_START_22 + self.reschkFooterNextPages_value = strings.RID_LETTERWIZARDDIALOG_START_23 + self.reschkFooterPageNumbers_value = strings.RID_LETTERWIZARDDIALOG_START_24 + self.restxtTemplateName_value = strings.RID_LETTERWIZARDDIALOG_START_25 + self.resoptCreateLetter_value = strings.RID_LETTERWIZARDDIALOG_START_26 + self.resoptMakeChanges_value = strings.RID_LETTERWIZARDDIALOG_START_27 + self.reslblBusinessStyle_value = strings.RID_LETTERWIZARDDIALOG_START_28 + self.reslblPrivOfficialStyle_value = strings.RID_LETTERWIZARDDIALOG_START_29 + self.reslblPrivateStyle_value = strings.RID_LETTERWIZARDDIALOG_START_30 + self.reslblIntroduction_value = strings.RID_LETTERWIZARDDIALOG_START_31 + self.reslblLogoHeight_value = strings.RID_LETTERWIZARDDIALOG_START_32 + self.reslblLogoWidth_value = strings.RID_LETTERWIZARDDIALOG_START_33 + self.reslblLogoX_value = strings.RID_LETTERWIZARDDIALOG_START_34 + self.reslblLogoY_value = strings.RID_LETTERWIZARDDIALOG_START_35 + self.reslblAddressHeight_value = strings.RID_LETTERWIZARDDIALOG_START_36 + self.reslblAddressWidth_value = strings.RID_LETTERWIZARDDIALOG_START_37 + self.reslblAddressX_value = strings.RID_LETTERWIZARDDIALOG_START_38 + self.reslblAddressY_value = strings.RID_LETTERWIZARDDIALOG_START_39 + self.reslblFooterHeight_value = strings.RID_LETTERWIZARDDIALOG_START_40 + self.reslblSenderAddress_value = strings.RID_LETTERWIZARDDIALOG_START_42 + self.reslblSenderName_value = strings.RID_LETTERWIZARDDIALOG_START_43 + self.reslblSenderStreet_value = strings.RID_LETTERWIZARDDIALOG_START_44 + self.reslblPostCodeCity_value = strings.RID_LETTERWIZARDDIALOG_START_45 + self.reslblReceiverAddress_value = strings.RID_LETTERWIZARDDIALOG_START_46 + self.reslblFooter_value = strings.RID_LETTERWIZARDDIALOG_START_47 + self.reslblFinalExplanation1_value = strings.RID_LETTERWIZARDDIALOG_START_48 + self.reslblFinalExplanation2_value = strings.RID_LETTERWIZARDDIALOG_START_49 + self.reslblTemplateName_value = strings.RID_LETTERWIZARDDIALOG_START_50 + self.reslblTemplatePath_value = strings.RID_LETTERWIZARDDIALOG_START_51 + self.reslblProceed_value = strings.RID_LETTERWIZARDDIALOG_START_52 + self.reslblTitle1_value = strings.RID_LETTERWIZARDDIALOG_START_53 + self.reslblTitle3_value = strings.RID_LETTERWIZARDDIALOG_START_54 + self.reslblTitle2_value = strings.RID_LETTERWIZARDDIALOG_START_55 + self.reslblTitle4_value = strings.RID_LETTERWIZARDDIALOG_START_56 + self.reslblTitle5_value = strings.RID_LETTERWIZARDDIALOG_START_57 + self.reslblTitle6_value = strings.RID_LETTERWIZARDDIALOG_START_58 + + #Create a Dictionary for the constants values. + self.dictConstants = { + "#subjectconst#" : strings.RID_LETTERWIZARDDIALOG_START_59} + + #Create a dictionary for localising the business templates + self.dictBusinessTemplate = { + "Elegant" : strings.RID_LETTERWIZARDDIALOG_START_60, + "Modern" : strings.RID_LETTERWIZARDDIALOG_START_61, + "Office" : strings.RID_LETTERWIZARDDIALOG_START_62} + + #Create a dictionary for localising the official templates + self.dictOfficialTemplate = { + "Elegant" : strings.RID_LETTERWIZARDDIALOG_START_60, + "Modern" : strings.RID_LETTERWIZARDDIALOG_START_61, + "Office" : strings.RID_LETTERWIZARDDIALOG_START_62} + + #Create a dictionary for localising the private templates + self.dictPrivateTemplate = { + "Bottle" : strings.RID_LETTERWIZARDDIALOG_START_63, + "Mail" : strings.RID_LETTERWIZARDDIALOG_START_64, + "Marine" : strings.RID_LETTERWIZARDDIALOG_START_65, + "Red Line" : strings.RID_LETTERWIZARDDIALOG_START_66} + + #Common Resources + self.resOverwriteWarning = strings.RID_COMMON_START_19 + self.resTemplateDescription = strings.RID_COMMON_START_20 + + self.RoadmapLabels = [] + self.RoadmapLabels.append(strings.RID_LETTERWIZARDROADMAP_START_1) + self.RoadmapLabels.append(strings.RID_LETTERWIZARDROADMAP_START_2) + self.RoadmapLabels.append(strings.RID_LETTERWIZARDROADMAP_START_3) + self.RoadmapLabels.append(strings.RID_LETTERWIZARDROADMAP_START_4) + self.RoadmapLabels.append(strings.RID_LETTERWIZARDROADMAP_START_5) + self.RoadmapLabels.append(strings.RID_LETTERWIZARDROADMAP_START_6) + self.SalutationLabels = [] + self.SalutationLabels.append(strings.RID_LETTERWIZARDSALUTATION_START_1) + self.SalutationLabels.append(strings.RID_LETTERWIZARDSALUTATION_START_2) + self.SalutationLabels.append(strings.RID_LETTERWIZARDSALUTATION_START_3) + self.GreetingLabels = [] + self.GreetingLabels.append(strings.RID_LETTERWIZARDGREETING_START_1) + self.GreetingLabels.append(strings.RID_LETTERWIZARDGREETING_START_2) + self.GreetingLabels.append(strings.RID_LETTERWIZARDGREETING_START_3) diff --git a/wizards/com/sun/star/wizards/letter/__init__.py b/wizards/com/sun/star/wizards/letter/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/__init__.py diff --git a/wizards/com/sun/star/wizards/letter/letter.component b/wizards/com/sun/star/wizards/letter/letter.component new file mode 100644 index 000000000..f7496d829 --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/letter.component @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + --> +<component loader="com.sun.star.loader.Python" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.wizards.letter.CallWizard"> + <service name="com.sun.star.task.Job"/> + </implementation> +</component> |