diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-04-22 15:08:05 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-04-22 15:08:05 +0200 |
commit | 2554b31146823b9850d1e0c437bc75a2e8c95033 (patch) | |
tree | 106d014f2a58792ec1e258f5e5baddecb6adcf9f /wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java | |
parent | 0be571d9a673ab48fc7d3a94541c5720e0845016 (diff) | |
parent | e19358aa28e2a43134b49d1c37a27b6fa33ecc2f (diff) |
Merge commit 'ooo/DEV300_m106' into libreoffice-3-4
Conflicts:
extensions/source/svg/svgaction.cxx
extensions/source/svg/svgaction.hxx
extensions/source/svg/svgcom.hxx
extensions/source/svg/svgprinter.cxx
extensions/source/svg/svgprinter.hxx
extensions/source/svg/svguno.cxx
extensions/source/svg/svgwriter.cxx
extensions/source/svg/svgwriter.hxx
javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationOngoingCtrl.java
javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java
javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java
package/inc/ZipFile.hxx
package/inc/ZipOutputStream.hxx
package/inc/ZipPackage.hxx
package/inc/ZipPackageStream.hxx
package/source/manifest/ManifestExport.cxx
package/source/manifest/ManifestImport.cxx
package/source/manifest/UnoRegister.cxx
package/source/xstor/owriteablestream.cxx
package/source/xstor/xstorage.cxx
package/source/xstor/xstorage.hxx
package/source/zipapi/EntryInputStream.cxx
package/source/zipapi/EntryInputStream.hxx
package/source/zipapi/XFileStream.cxx
package/source/zipapi/XFileStream.hxx
package/source/zipapi/XMemoryStream.cxx
package/source/zipapi/XUnbufferedStream.cxx
package/source/zipapi/XUnbufferedStream.hxx
package/source/zipapi/ZipFile.cxx
package/source/zipapi/ZipOutputStream.cxx
package/source/zipapi/sha1context.hxx
package/source/zippackage/ZipPackage.cxx
package/source/zippackage/ZipPackageFolder.cxx
package/source/zippackage/ZipPackageStream.cxx
setup_native/source/win32/customactions/shellextensions/registerextensions.cxx
wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
xmlsecurity/prj/build.lst
xmlsecurity/source/helper/xmlsignaturehelper.cxx
xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx
Diffstat (limited to 'wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java')
-rw-r--r-- | wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java | 139 |
1 files changed, 69 insertions, 70 deletions
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java index 482e4a82c07d..ed3161c7282d 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java @@ -177,27 +177,27 @@ public class LetterWizardDialogImpl extends LetterWizardDialog myConfig.cp_PrivateLetter.cp_Norm = oL; initializeTemplates(xMSF); - if (myConfig.cp_BusinessLetter.cp_Greeting.equals("")) + if (myConfig.cp_BusinessLetter.cp_Greeting.equals(PropertyNames.EMPTY_STRING)) { myConfig.cp_BusinessLetter.cp_Greeting = resources.GreetingLabels[0]; } - if (myConfig.cp_BusinessLetter.cp_Salutation.equals("")) + if (myConfig.cp_BusinessLetter.cp_Salutation.equals(PropertyNames.EMPTY_STRING)) { myConfig.cp_BusinessLetter.cp_Salutation = resources.SalutationLabels[0]; } - if (myConfig.cp_PrivateOfficialLetter.cp_Greeting.equals("")) + if (myConfig.cp_PrivateOfficialLetter.cp_Greeting.equals(PropertyNames.EMPTY_STRING)) { myConfig.cp_PrivateOfficialLetter.cp_Greeting = resources.GreetingLabels[1]; } - if (myConfig.cp_PrivateOfficialLetter.cp_Salutation.equals("")) + if (myConfig.cp_PrivateOfficialLetter.cp_Salutation.equals(PropertyNames.EMPTY_STRING)) { myConfig.cp_PrivateOfficialLetter.cp_Salutation = resources.SalutationLabels[1]; } - if (myConfig.cp_PrivateLetter.cp_Greeting.equals("")) + if (myConfig.cp_PrivateLetter.cp_Greeting.equals(PropertyNames.EMPTY_STRING)) { myConfig.cp_PrivateLetter.cp_Greeting = resources.GreetingLabels[2]; } - if (myConfig.cp_PrivateLetter.cp_Salutation.equals("")) + if (myConfig.cp_PrivateLetter.cp_Salutation.equals(PropertyNames.EMPTY_STRING)) { myConfig.cp_PrivateLetter.cp_Salutation = resources.SalutationLabels[2]; } @@ -205,13 +205,13 @@ public class LetterWizardDialogImpl extends LetterWizardDialog //update the dialog UI according to the loaded Configuration updateUI(); - if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase("")) + if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING)) { myPathSelection.initializePath(); } XWindow xContainerWindow = myLetterDoc.xFrame.getContainerWindow(); - XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow); + XWindowPeer xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow); createWindowPeer(xWindowPeer); //add the Roadmap to the dialog: @@ -240,8 +240,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog removeTerminateListener(); exception.printStackTrace(System.out); running = false; - return; - } + } } public void cancelWizard() @@ -258,7 +257,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog //myLetterDoc.xTextDocument.lockControllers(); FileAccess fileAccess = new FileAccess(xMSF); sPath = myPathSelection.getSelectedPath(); - if (sPath.equals("")) + if (sPath.equals(PropertyNames.EMPTY_STRING)) { myPathSelection.triggerPathPicker(); sPath = myPathSelection.getSelectedPath(); @@ -311,7 +310,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog if (bSaveSuccess) { saveConfiguration(); - XInteractionHandler xIH = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler")); + XInteractionHandler xIH = UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler")); PropertyValue loadValues[] = new PropertyValue[4]; loadValues[0] = new PropertyValue(); loadValues[0].Name = "AsTemplate"; @@ -335,7 +334,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog } Object oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), sPath, "_default", loadValues); XTextDocument xTextDocument = (com.sun.star.text.XTextDocument) oDoc; - XMultiServiceFactory xDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); + XMultiServiceFactory xDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); ViewHandler myViewHandler = new ViewHandler(xDocMSF, xTextDocument); myViewHandler.setViewSetting("ZoomType", new Short(com.sun.star.view.DocumentZoomType.OPTIMAL)); } @@ -361,7 +360,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog try { //xComponent.dispose(); - XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, myLetterDoc.xFrame); + XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, myLetterDoc.xFrame); xCloseable.close(false); } catch (CloseVetoException e) @@ -383,7 +382,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog lstBusinessStyleItemChanged(); enableSenderReceiver(); setPossibleFooter(true); - if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase("")) + if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING)) { myPathSelection.initializePath(); } @@ -403,7 +402,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog disableBusinessPaper(); enableSenderReceiver(); setPossibleFooter(true); - if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase("")) + if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING)) { myPathSelection.initializePath(); } @@ -423,7 +422,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog disableBusinessPaper(); disableSenderReceiver(); setPossibleFooter(false); - if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase("")) + if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING)) { myPathSelection.initializePath(); } @@ -687,7 +686,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog //Height of the Company Address in the Receiver Field int iReceiverHeight = (int) (0.5 * 1000); - BusCompanyAddressReceiver = myLetterDoc.new BusinessPaperObject(" ", iFrameWidth, iReceiverHeight, iFrameX, (iFrameY - iReceiverHeight)); + BusCompanyAddressReceiver = myLetterDoc.new BusinessPaperObject(PropertyNames.SPACE, iFrameWidth, iReceiverHeight, iFrameX, (iFrameY - iReceiverHeight)); setPossibleAddressReceiver(false); } @@ -734,7 +733,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { numFooterHeight.setValue(0.1); } - BusFooter = myLetterDoc.new BusinessPaperObject("Footer", (int) myLetterDoc.DocSize.Width, (int) (numFooterHeight.getValue() * 1000), (int) 0, (int) (myLetterDoc.DocSize.Height - (numFooterHeight.getValue() * 1000))); + BusFooter = myLetterDoc.new BusinessPaperObject("Footer", myLetterDoc.DocSize.Width, (int) (numFooterHeight.getValue() * 1000), 0, (int) (myLetterDoc.DocSize.Height - (numFooterHeight.getValue() * 1000))); this.setControlProperty("numFooterHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); this.setControlProperty("lblFooterHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); setPossibleFooter(false); @@ -827,7 +826,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog //enable/disable roadmap item for footer page XInterface BPaperItem = getRoadmapItemByID(RM_FOOTER); - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, new Boolean(bFooterPossible)); + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bFooterPossible)); } catch (Exception exception) @@ -848,7 +847,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog private void setPossibleFooter(boolean bState) { - setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); chkUseFooterItemChanged(); } @@ -856,7 +855,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { if (myLetterDoc.hasElement("Sender Address Repeated")) { - setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); chkUseAddressReceiverItemChanged(); } } @@ -865,7 +864,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { if (myLetterDoc.hasElement("Company Logo")) { - setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); chkUseLogoItemChanged(); } } @@ -907,7 +906,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void txtTemplateNameTextChanged() { - XDocumentPropertiesSupplier xDocPropsSuppl = (XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument); + XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument); XDocumentProperties xDocProps = xDocPropsSuppl.getDocumentProperties(); String TitleName = txtTemplateName.getText(); xDocProps.setTitle(TitleName); @@ -915,14 +914,14 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void chkUseSalutationItemChanged() { - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); myLetterDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0)); - setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, new Boolean(chkUseSalutation.getState() != 0)); + setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseSalutation.getState() != 0)); } public void lstSalutationItemChanged() { - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); myLetterDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0)); } @@ -932,21 +931,21 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void chkUseGreetingItemChanged() { - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); myLetterDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0)); - setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, new Boolean(chkUseGreeting.getState() != 0)); + setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseGreeting.getState() != 0)); } private void setDefaultForGreetingAndSalutation() { XTextComponent xTextComponent; - xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); - if (xTextComponent.getText().equals("")) + xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); + if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING)) { xTextComponent.setText(resources.SalutationLabels[0]); } - xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); - if (xTextComponent.getText().equals("")) + xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); + if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING)) { xTextComponent.setText(resources.GreetingLabels[0]); } @@ -954,7 +953,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void lstGreetingItemChanged() { - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); myLetterDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0)); } @@ -1009,20 +1008,20 @@ public class LetterWizardDialogImpl extends LetterWizardDialog private void setPossibleSenderData(boolean bState) { - setControlProperty("optSenderDefine", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("optSenderPlaceholder", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("lblSenderAddress", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("optSenderDefine", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("optSenderPlaceholder", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("lblSenderAddress", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); if (!bState) { - setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); - setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); + setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); } } @@ -1099,12 +1098,12 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void initializeSalutation() { - setControlProperty("lstSalutation", "StringItemList", resources.SalutationLabels); + setControlProperty("lstSalutation", PropertyNames.STRING_ITEM_LIST, resources.SalutationLabels); } public void initializeGreeting() { - setControlProperty("lstGreeting", "StringItemList", resources.GreetingLabels); + setControlProperty("lstGreeting", PropertyNames.STRING_ITEM_LIST, resources.GreetingLabels); } public void initializeNorms() @@ -1114,11 +1113,11 @@ public class LetterWizardDialogImpl extends LetterWizardDialog String[] allLocales = lc.getIDs(); Object[] nameList = { - "", "" + PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING }; String[] nameList2 = { - "", "" + PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING }; Vector allPaths = new Vector(); String sLetterSubPath = "/wizard/letter/"; @@ -1127,7 +1126,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { sTemplatePath = FileAccess.deleteLastSlashfromUrl(sTemplatePath); String[] PathParts = sTemplatePath.split("/"); - String nuString = ""; + String nuString = PropertyNames.EMPTY_STRING; String sMainPath; for (int i = 0; i < (PathParts.length - 1); i++) { @@ -1140,7 +1139,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog sLetterPath = sMainPath + sLetterSubPath; XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - com.sun.star.ucb.XSimpleFileAccess xSimpleFileAccess = (com.sun.star.ucb.XSimpleFileAccess) UnoRuntime.queryInterface(com.sun.star.ucb.XSimpleFileAccess.class, xInterface); + com.sun.star.ucb.XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface(com.sun.star.ucb.XSimpleFileAccess.class, xInterface); nameList2 = xSimpleFileAccess.getFolderContents(sLetterPath, true); for (int i = 0; i < nameList2.length; i++) { @@ -1170,8 +1169,8 @@ public class LetterWizardDialogImpl extends LetterWizardDialog String[] LanguageLabels; boolean found = false; - String cIsoCode = ""; - String MSID = ""; + String cIsoCode = PropertyNames.EMPTY_STRING; + String MSID = PropertyNames.EMPTY_STRING; int z = 0; for (int i = 0; i < nameList.length; i++) { @@ -1179,7 +1178,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog cIsoCode = FileAccess.getFilename((String) nameList[i]); for (int t = 0; t < allLocales.length; t++) { - String[] aLang = allLocales[t].split(";"); + String[] aLang = allLocales[t].split(PropertyNames.SEMI_COLON); if (cIsoCode.equalsIgnoreCase(aLang[1])) { MSID = aLang[2]; @@ -1191,7 +1190,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { for (int t = 0; t < allLocales.length; t++) { - String[] aLang = allLocales[t].split(";"); + String[] aLang = allLocales[t].split(PropertyNames.SEMI_COLON); if (cIsoCode.equalsIgnoreCase(aLang[1].substring(0, 2))) { MSID = aLang[2]; @@ -1204,7 +1203,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog if (found) { NormsVector.add(cIsoCode); - NormsPathVector.add((String) nameList[i]); + NormsPathVector.add(nameList[i]); LanguageLabelsVector.add(lc.getLanguageString(MSID)); } } @@ -1219,7 +1218,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog LanguageLabels = new String[LanguageLabelsVector.size()]; LanguageLabelsVector.toArray(LanguageLabels); - setControlProperty("lstLetterNorm", "StringItemList", LanguageLabels); + setControlProperty("lstLetterNorm", PropertyNames.STRING_ITEM_LIST, LanguageLabels); } private CGLetter getCurrentLetter() @@ -1242,7 +1241,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog try { sTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard"); - sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", ""); + sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", PropertyNames.EMPTY_STRING); sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap"); } catch (NoValidPathException e) @@ -1263,19 +1262,19 @@ public class LetterWizardDialogImpl extends LetterWizardDialog OfficialFiles = FileAccess.getFolderTitles(xMSF, "off", sLetterPath); PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", sLetterPath); - setControlProperty("lstBusinessStyle", "StringItemList", BusinessFiles[0]); - setControlProperty("lstPrivOfficialStyle", "StringItemList", OfficialFiles[0]); - setControlProperty("lstPrivateStyle", "StringItemList", PrivateFiles[0]); + setControlProperty("lstBusinessStyle", PropertyNames.STRING_ITEM_LIST, BusinessFiles[0]); + setControlProperty("lstPrivOfficialStyle", PropertyNames.STRING_ITEM_LIST, OfficialFiles[0]); + setControlProperty("lstPrivateStyle", PropertyNames.STRING_ITEM_LIST, PrivateFiles[0]); - setControlProperty("lstBusinessStyle", "SelectedItems", new short[] + setControlProperty("lstBusinessStyle", PropertyNames.SELECTED_ITEMS, new short[] { 0 }); - setControlProperty("lstPrivOfficialStyle", "SelectedItems", new short[] + setControlProperty("lstPrivOfficialStyle", PropertyNames.SELECTED_ITEMS, new short[] { 0 }); - setControlProperty("lstPrivateStyle", "SelectedItems", new short[] + setControlProperty("lstPrivateStyle", PropertyNames.SELECTED_ITEMS, new short[] { 0 }); @@ -1289,11 +1288,11 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void initializeElements() { - setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Company Logo"))); - setControlProperty("chkUseBendMarks", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Bend Marks"))); - setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Sender Address Repeated"))); - setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Subject Line"))); - setControlProperty("chkUseSigns", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Letter Signs"))); + setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Company Logo"))); + setControlProperty("chkUseBendMarks", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Bend Marks"))); + setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Sender Address Repeated"))); + setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Subject Line"))); + setControlProperty("chkUseSigns", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Letter Signs"))); myLetterDoc.updateDateFields(); } |