summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/letter
diff options
context:
space:
mode:
authorRelease Engineers <releng@openoffice.org>2008-12-01 12:31:27 +0000
committerRelease Engineers <releng@openoffice.org>2008-12-01 12:31:27 +0000
commitf0a7951ee7a9bb75519cefa5e226d186633e3e95 (patch)
treee60b8bbac6a8c4b3b0282f5cda72baf0d0ebc6ce /wizards/com/sun/star/wizards/letter
parent97a48f7a4812bc224729a88dbc8272d940bcb339 (diff)
CWS-TOOLING: integrate CWS dba31e
2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
Diffstat (limited to 'wizards/com/sun/star/wizards/letter')
-rw-r--r--wizards/com/sun/star/wizards/letter/CGLetter.java35
-rw-r--r--wizards/com/sun/star/wizards/letter/CGLetterWizard.java35
-rw-r--r--wizards/com/sun/star/wizards/letter/CGPaperElementLocation.java35
-rw-r--r--wizards/com/sun/star/wizards/letter/CallWizard.java118
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterDocument.java196
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialog.java1344
-rwxr-xr-xwizards/com/sun/star/wizards/letter/LetterWizardDialogConst.java36
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogEvents.java36
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java948
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java67
-rw-r--r--wizards/com/sun/star/wizards/letter/LocaleCodes.java54
11 files changed, 2019 insertions, 885 deletions
diff --git a/wizards/com/sun/star/wizards/letter/CGLetter.java b/wizards/com/sun/star/wizards/letter/CGLetter.java
index 51e0d6ef02a8..0d464732c10b 100644
--- a/wizards/com/sun/star/wizards/letter/CGLetter.java
+++ b/wizards/com/sun/star/wizards/letter/CGLetter.java
@@ -1,8 +1,40 @@
+/*
+ ************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: CGLetter.java,v $
+ *
+ * $Revision: 1.4.192.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
package com.sun.star.wizards.letter;
import com.sun.star.wizards.common.ConfigGroup;
-public class CGLetter extends ConfigGroup {
+public class CGLetter extends ConfigGroup
+{
public int cp_Style;
public boolean cp_BusinessPaper;
@@ -35,5 +67,4 @@ public class CGLetter extends ConfigGroup {
public int cp_CreationType;
public String cp_TemplateName;
public String cp_TemplatePath;
-
}
diff --git a/wizards/com/sun/star/wizards/letter/CGLetterWizard.java b/wizards/com/sun/star/wizards/letter/CGLetterWizard.java
index 0fe90cd4f059..55f21e029892 100644
--- a/wizards/com/sun/star/wizards/letter/CGLetterWizard.java
+++ b/wizards/com/sun/star/wizards/letter/CGLetterWizard.java
@@ -1,12 +1,43 @@
+/*
+ ************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: CGLetterWizard.java,v $
+ *
+ * $Revision: 1.3.192.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
package com.sun.star.wizards.letter;
import com.sun.star.wizards.common.ConfigGroup;
-public class CGLetterWizard extends ConfigGroup {
+public class CGLetterWizard extends ConfigGroup
+{
public int cp_LetterType;
public CGLetter cp_BusinessLetter = new CGLetter();
public CGLetter cp_PrivateOfficialLetter = new CGLetter();
public CGLetter cp_PrivateLetter = new CGLetter();
-
}
diff --git a/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.java b/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.java
index 7d5ff1265dc7..92d40c21d4de 100644
--- a/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.java
+++ b/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.java
@@ -1,13 +1,44 @@
+/*
+ ************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: CGPaperElementLocation.java,v $
+ *
+ * $Revision: 1.3.192.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
package com.sun.star.wizards.letter;
import com.sun.star.wizards.common.ConfigGroup;
-public class CGPaperElementLocation extends ConfigGroup {
+public class CGPaperElementLocation extends ConfigGroup
+{
public boolean cp_Display;
public double cp_Width;
public double cp_Height;
public double cp_X;
public double cp_Y;
-
}
diff --git a/wizards/com/sun/star/wizards/letter/CallWizard.java b/wizards/com/sun/star/wizards/letter/CallWizard.java
index e53fbeceadbf..7b0e7e170597 100644
--- a/wizards/com/sun/star/wizards/letter/CallWizard.java
+++ b/wizards/com/sun/star/wizards/letter/CallWizard.java
@@ -1,3 +1,34 @@
+/*
+ ************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: CallWizard.java,v $
+ *
+ * $Revision: 1.3.192.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
package com.sun.star.wizards.letter;
import com.sun.star.beans.XPropertyAccess;
@@ -18,9 +49,10 @@ import com.sun.star.uno.Type;
* information into the given registry key (<CODE>__writeRegistryServiceInfo</CODE>).
*
* @author $author$
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.3.192.1 $
*/
-public class CallWizard {
+public class CallWizard
+{
/**
* Gives a factory for creating the service. This method is called by the
@@ -37,10 +69,12 @@ public class CallWizard {
*
* @see com.sun.star.comp.loader.JavaLoader#
*/
- public static XSingleServiceFactory __getServiceFactory(String stringImplementationName, XMultiServiceFactory xMSF, XRegistryKey xregistrykey) {
+ public static XSingleServiceFactory __getServiceFactory(String stringImplementationName, XMultiServiceFactory xMSF, XRegistryKey xregistrykey)
+ {
XSingleServiceFactory xsingleservicefactory = null;
- if (stringImplementationName.equals(WizardImplementation.class.getName())) {
+ if (stringImplementationName.equals(WizardImplementation.class.getName()))
+ {
xsingleservicefactory = FactoryHelper.getServiceFactory(WizardImplementation.class, WizardImplementation.__serviceName, xMSF, xregistrykey);
}
@@ -58,7 +92,8 @@ public class CallWizard {
*
* @see com.sun.star.comp.loader.JavaLoader#
*/
- public static boolean __writeRegistryServiceInfo(XRegistryKey xregistrykey) {
+ public static boolean __writeRegistryServiceInfo(XRegistryKey xregistrykey)
+ {
return FactoryHelper.writeRegistryServiceInfo(WizardImplementation.class.getName(), WizardImplementation.__serviceName, xregistrykey);
}
@@ -66,7 +101,8 @@ public class CallWizard {
* This class implements the component. At least the interfaces XServiceInfo,
* XTypeProvider, and XInitialization should be provided by the service.
*/
- public static class WizardImplementation implements XInitialization, XTypeProvider, XServiceInfo, XJobExecutor {
+ public static class WizardImplementation implements XInitialization, XTypeProvider, XServiceInfo, XJobExecutor
+ {
/**
* The constructor of the inner class has a XMultiServiceFactory parameter.
@@ -74,11 +110,12 @@ public class CallWizard {
* @param xmultiservicefactoryInitialization A special service factory could be
* introduced while initializing.
*/
- public WizardImplementation(XMultiServiceFactory xmultiservicefactoryInitialization) {
+ public WizardImplementation(XMultiServiceFactory xmultiservicefactoryInitialization)
+ {
xmultiservicefactory = xmultiservicefactoryInitialization;
- if (xmultiservicefactory != null) {
-
+ if (xmultiservicefactory != null)
+ {
}
}
@@ -87,23 +124,21 @@ public class CallWizard {
*
* @param str only valid parameter is 'start' at the moment.
*/
-
- public void trigger(String str) {
- if (str.equalsIgnoreCase("start")) {
+ public void trigger(String str)
+ {
+ if (str.equalsIgnoreCase("start"))
+ {
LetterWizardDialogImpl lw = new LetterWizardDialogImpl(xmultiservicefactory);
- if (!LetterWizardDialogImpl.running) {
+ if (!LetterWizardDialogImpl.running)
+ {
lw.startWizard(xmultiservicefactory, null);
}
}
- }
-
- //*******************************************
-
+ } //*******************************************
/**
* The service name, that must be used to get an instance of this service.
*/
private static final String __serviceName = "com.sun.star.wizards.letter.CallWizard";
-
/**
* The service manager, that gives access to all registered services.
*/
@@ -119,8 +154,8 @@ public class CallWizard {
* @throws com.sun.star.uno.Exception Every exception will not be handled, but
* will be passed to the caller.
*/
- public void initialize(Object[] object) throws com.sun.star.uno.Exception {
-
+ public void initialize(Object[] object) throws com.sun.star.uno.Exception
+ {
}
/**
@@ -128,7 +163,8 @@ public class CallWizard {
*
* @return Array of supported service names.
*/
- public java.lang.String[] getSupportedServiceNames() {
+ public java.lang.String[] getSupportedServiceNames()
+ {
String[] stringSupportedServiceNames = new String[1];
stringSupportedServiceNames[0] = __serviceName;
@@ -143,10 +179,12 @@ public class CallWizard {
*
* @return True, if the given service name will be supported.
*/
- public boolean supportsService(String stringService) {
+ public boolean supportsService(String stringService)
+ {
boolean booleanSupportsService = false;
- if (stringService.equals(__serviceName)) {
+ if (stringService.equals(__serviceName))
+ {
booleanSupportsService = true;
}
@@ -164,13 +202,18 @@ public class CallWizard {
*
* @return Array of bytes, in order to distinguish between two sets.
*/
- public byte[] getImplementationId() {
- byte[] byteReturn = {
+ public byte[] getImplementationId()
+ {
+ byte[] byteReturn =
+ {
};
- try {
+ try
+ {
byteReturn = ("" + this.hashCode()).getBytes();
- } catch (Exception exception) {
+ }
+ catch (Exception exception)
+ {
System.err.println(exception);
}
@@ -182,7 +225,8 @@ public class CallWizard {
*
* @return Class name of the component.
*/
- public java.lang.String getImplementationName() {
+ public java.lang.String getImplementationName()
+ {
return (WizardImplementation.class.getName());
}
@@ -193,13 +237,21 @@ public class CallWizard {
* @return Sequence of all types (usually interface types) provided by the
* service.
*/
- public com.sun.star.uno.Type[] getTypes() {
- Type[] typeReturn = {
+ public com.sun.star.uno.Type[] getTypes()
+ {
+ Type[] typeReturn =
+ {
};
- try {
- typeReturn = new Type[] { new Type(XPropertyAccess.class), new Type(XJob.class), new Type(XJobExecutor.class), new Type(XTypeProvider.class), new Type(XServiceInfo.class), new Type(XInitialization.class)};
- } catch (Exception exception) {
+ try
+ {
+ typeReturn = new Type[]
+ {
+ new Type(XPropertyAccess.class), new Type(XJob.class), new Type(XJobExecutor.class), new Type(XTypeProvider.class), new Type(XServiceInfo.class), new Type(XInitialization.class)
+ };
+ }
+ catch (Exception exception)
+ {
System.err.println(exception);
}
diff --git a/wizards/com/sun/star/wizards/letter/LetterDocument.java b/wizards/com/sun/star/wizards/letter/LetterDocument.java
index 7f7354f91343..492b867e0d6b 100644
--- a/wizards/com/sun/star/wizards/letter/LetterDocument.java
+++ b/wizards/com/sun/star/wizards/letter/LetterDocument.java
@@ -1,3 +1,34 @@
+/*
+ ************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: LetterDocument.java,v $
+ *
+ * $Revision: 1.10.146.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
package com.sun.star.wizards.letter;
import com.sun.star.wizards.common.*;
@@ -17,7 +48,8 @@ import com.sun.star.style.ParagraphAdjust;
import com.sun.star.style.XStyleFamiliesSupplier;
import com.sun.star.style.XStyle;
-public class LetterDocument extends TextDocument {
+public class LetterDocument extends TextDocument
+{
XDesktop xDesktop;
boolean keepLogoFrame = true;
@@ -26,36 +58,44 @@ public class LetterDocument extends TextDocument {
boolean keepSenderAddressRepeatedFrame = true;
boolean keepAddressFrame = true;
-
- public LetterDocument(XMultiServiceFactory xMSF, XTerminateListener listener) {
+ public LetterDocument(XMultiServiceFactory xMSF, XTerminateListener listener)
+ {
super(xMSF, listener, "WIZARD_LIVE_PREVIEW");
}
-
- public XWindowPeer getWindowPeer() {
+ public XWindowPeer getWindowPeer()
+ {
XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xTextDocument);
return xWindowPeer;
}
- public void switchElement(String sElement, boolean bState) {
- try {
+ public void switchElement(String sElement, boolean bState)
+ {
+ try
+ {
TextSectionHandler mySectionHandler = new TextSectionHandler(xMSF, xTextDocument);
Object oSection = mySectionHandler.xTextSectionsSupplier.getTextSections().getByName(sElement);
Helper.setUnoPropertyValue(oSection, "IsVisible", new Boolean(bState));
- } catch (Exception exception) {
+ }
+ catch (Exception exception)
+ {
exception.printStackTrace(System.out);
}
}
- public void updateDateFields() {
+ public void updateDateFields()
+ {
TextFieldHandler FH = new TextFieldHandler(xMSFDoc, xTextDocument);
FH.updateDateFields();
}
- public void switchFooter(String sPageStyle, boolean bState, boolean bPageNumber, String sText) {
- if (xTextDocument != null) {
- try {
+ public void switchFooter(String sPageStyle, boolean bState, boolean bPageNumber, String sText)
+ {
+ if (xTextDocument != null)
+ {
+ try
+ {
xTextDocument.lockControllers();
XStyleFamiliesSupplier xStyleFamiliesSupplier = (XStyleFamiliesSupplier) com.sun.star.uno.UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument);
com.sun.star.container.XNameAccess xNameAccess = null;
@@ -67,11 +107,13 @@ public class LetterDocument extends TextDocument {
XText xFooterText;
XStyle xPageStyle = (XStyle) UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName(sPageStyle));
- if (bState) {
+ if (bState)
+ {
Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", new Boolean(true));
xFooterText = (XText) UnoRuntime.queryInterface(XText.class, Helper.getUnoPropertyValue(xPageStyle, "FooterText"));
xFooterText.setString(sText);
- if (bPageNumber) {
+ if (bPageNumber)
+ {
//Adding the Page Number
XTextCursor myCursor = xFooterText.createTextCursor();
myCursor.gotoEnd(false);
@@ -81,39 +123,53 @@ public class LetterDocument extends TextDocument {
XTextField xPageNumberField = (XTextField) UnoRuntime.queryInterface(XTextField.class, xMSFDoc.createInstance("com.sun.star.text.TextField.PageNumber"));
XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xPageNumberField);
xPSet.setPropertyValue("SubType", PageNumberType.CURRENT);
- xPSet.setPropertyValue("NumberingType", new Short (NumberingType.ARABIC));
+ xPSet.setPropertyValue("NumberingType", new Short(NumberingType.ARABIC));
xFooterText.insertTextContent(xFooterText.getEnd(), xPageNumberField, false);
}
- } else {
+ }
+ else
+ {
Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", new Boolean(false));
}
xTextDocument.unlockControllers();
- } catch (Exception exception) {
+ }
+ catch (Exception exception)
+ {
exception.printStackTrace(System.out);
}
}
}
- public boolean hasElement(String sElement) {
- if (xTextDocument != null) {
+ public boolean hasElement(String sElement)
+ {
+ if (xTextDocument != null)
+ {
TextSectionHandler SH = new TextSectionHandler(xMSF, xTextDocument);
return SH.hasTextSectionByName(sElement);
- } else {
+ }
+ else
+ {
return false;
}
}
- public void switchUserField(String sFieldName, String sNewContent, boolean bState) {
+ public void switchUserField(String sFieldName, String sNewContent, boolean bState)
+ {
TextFieldHandler myFieldHandler = new TextFieldHandler(xMSF, xTextDocument);
- if (bState) {
+ if (bState)
+ {
myFieldHandler.changeUserFieldContent(sFieldName, sNewContent);
- } else {
+ }
+ else
+ {
myFieldHandler.changeUserFieldContent(sFieldName, "");
}
}
- public void fillSenderWithUserData() {
- try {
+ public void fillSenderWithUserData()
+ {
+ try
+ {
TextFieldHandler myFieldHandler = new TextFieldHandler(xMSFDoc, xTextDocument);
Object oUserDataAccess = Configuration.getConfigurationRoot(xMSF, "org.openoffice.UserProfile/Data", false);
myFieldHandler.changeUserFieldContent("Company", (String) Helper.getUnoObjectbyName(oUserDataAccess, "o"));
@@ -121,64 +177,92 @@ public class LetterDocument extends TextDocument {
myFieldHandler.changeUserFieldContent("PostCode", (String) Helper.getUnoObjectbyName(oUserDataAccess, "postalcode"));
myFieldHandler.changeUserFieldContent("City", (String) Helper.getUnoObjectbyName(oUserDataAccess, "l"));
myFieldHandler.changeUserFieldContent("State", (String) Helper.getUnoObjectbyName(oUserDataAccess, "st"));
- } catch (Exception exception) {
+ }
+ catch (Exception exception)
+ {
exception.printStackTrace(System.out);
}
}
- public void killEmptyUserFields() {
+ public void killEmptyUserFields()
+ {
TextFieldHandler myFieldHandler = new TextFieldHandler(xMSF, xTextDocument);
myFieldHandler.removeUserFieldByContent("");
}
- public void killEmptyFrames() {
- try {
- if (!keepLogoFrame) {
+ public void killEmptyFrames()
+ {
+ try
+ {
+ if (!keepLogoFrame)
+ {
XTextFrame xTF = TextFrameHandler.getFrameByName("Company Logo", xTextDocument);
- if (xTF != null) xTF.dispose();
+ if (xTF != null)
+ {
+ xTF.dispose();
+ }
}
- if (!keepBendMarksFrame) {
+ if (!keepBendMarksFrame)
+ {
XTextFrame xTF = TextFrameHandler.getFrameByName("Bend Marks", xTextDocument);
- if (xTF != null) xTF.dispose();
+ if (xTF != null)
+ {
+ xTF.dispose();
+ }
}
- if (!keepLetterSignsFrame) {
+ if (!keepLetterSignsFrame)
+ {
XTextFrame xTF = TextFrameHandler.getFrameByName("Letter Signs", xTextDocument);
- if (xTF != null) xTF.dispose();
+ if (xTF != null)
+ {
+ xTF.dispose();
+ }
}
- if (!keepSenderAddressRepeatedFrame) {
+ if (!keepSenderAddressRepeatedFrame)
+ {
XTextFrame xTF = TextFrameHandler.getFrameByName("Sender Address Repeated", xTextDocument);
- if (xTF != null) xTF.dispose();
+ if (xTF != null)
+ {
+ xTF.dispose();
+ }
}
- if (!keepAddressFrame) {
+ if (!keepAddressFrame)
+ {
XTextFrame xTF = TextFrameHandler.getFrameByName("Sender Address", xTextDocument);
- if (xTF != null) xTF.dispose();
+ if (xTF != null)
+ {
+ xTF.dispose();
+ }
}
- } catch (Exception e) {
+ }
+ catch (Exception e)
+ {
e.printStackTrace();
}
}
-
- public class BusinessPaperObject {
+ public class BusinessPaperObject
+ {
public int iWidth;
public int iHeight;
public int iXPos;
public int iYPos;
-
XTextFrame xFrame;
XShape xShape;
- public BusinessPaperObject(String FrameText, int Width, int Height, int XPos, int YPos) {
+ public BusinessPaperObject(String FrameText, int Width, int Height, int XPos, int YPos)
+ {
iWidth = Width;
iHeight = Height;
iXPos = XPos;
iYPos = YPos;
- try {
+ try
+ {
xFrame = (XTextFrame) UnoRuntime.queryInterface(XTextFrame.class, xMSFDoc.createInstance("com.sun.star.text.TextFrame"));
xShape = (XShape) UnoRuntime.queryInterface(XShape.class, xFrame);
@@ -213,12 +297,15 @@ public class LetterDocument extends TextDocument {
xFrameText.insertString(xFrameCursor, FrameText, false);
- } catch (Exception e) {
+ }
+ catch (Exception e)
+ {
e.printStackTrace(System.out);
}
}
- public void setFramePosition() {
+ public void setFramePosition()
+ {
Helper.setUnoPropertyValue(xFrame, "HoriOrient", new Short(HoriOrientation.NONE));
Helper.setUnoPropertyValue(xFrame, "VertOrient", new Short(VertOrientation.NONE));
Helper.setUnoPropertyValue(xFrame, "Height", new Integer(iHeight));
@@ -229,16 +316,19 @@ public class LetterDocument extends TextDocument {
Helper.setUnoPropertyValue(xFrame, "VertOrientRelation", new Short(RelOrientation.PAGE_FRAME));
}
- public void removeFrame() {
- if (xFrame != null) {
- try {
+ public void removeFrame()
+ {
+ if (xFrame != null)
+ {
+ try
+ {
xTextDocument.getText().removeTextContent(xFrame);
- } catch (Exception e) {
+ }
+ catch (Exception e)
+ {
e.printStackTrace(System.out);
}
}
}
-
}
-
}
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java
index cd5a1a5eb7b4..3c54f92ca6f6 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java
@@ -1,3 +1,34 @@
+/*
+ ************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: LetterWizardDialog.java,v $
+ *
+ * $Revision: 1.6.192.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
package com.sun.star.wizards.letter;
import com.sun.star.awt.*;
@@ -5,473 +36,882 @@ import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.wizards.common.*;
import com.sun.star.wizards.ui.*;
-public abstract class LetterWizardDialog extends WizardDialog implements LetterWizardDialogConst, UIConsts {
- //GUI Components as Class members.
- XRadioButton optBusinessLetter;
- XListBox lstBusinessStyle;
- XCheckBox chkBusinessPaper;
- XRadioButton optPrivOfficialLetter;
- XListBox lstPrivOfficialStyle;
- XRadioButton optPrivateLetter;
- XListBox lstPrivateStyle;
- XFixedText lblBusinessStyle;
- XFixedText lblPrivOfficialStyle;
- XFixedText lblTitle1;
- XFixedText lblPrivateStyle;
- XFixedText lblIntroduction;
- //Image Control
- XControl ImageControl3;
- XCheckBox chkPaperCompanyLogo;
- XNumericField numLogoHeight;
- XNumericField numLogoX;
- XNumericField numLogoWidth;
- XNumericField numLogoY;
- XCheckBox chkPaperCompanyAddress;
- XNumericField numAddressHeight;
- XNumericField numAddressX;
- XNumericField numAddressWidth;
- XNumericField numAddressY;
- XCheckBox chkCompanyReceiver;
- XCheckBox chkPaperFooter;
- XNumericField numFooterHeight;
- XFixedText lblLogoHeight;
- XFixedText lblLogoWidth;
- //Fixed Line
- XControl FixedLine5;
- //Fixed Line
- XControl FixedLine6;
- XFixedText lblFooterHeight;
- XFixedText lblLogoX;
- XFixedText lblLogoY;
- XFixedText lblAddressHeight;
- XFixedText lblAddressWidth;
- XFixedText lblAddressX;
- XFixedText lblAddressY;
- XFixedText lblTitle2;
- XListBox lstLetterNorm;
- XCheckBox chkUseLogo;
- XCheckBox chkUseAddressReceiver;
- XCheckBox chkUseSigns;
- XCheckBox chkUseSubject;
- XCheckBox chkUseSalutation;
- XComboBox lstSalutation;
- XCheckBox chkUseBendMarks;
- XCheckBox chkUseGreeting;
- XComboBox lstGreeting;
- XCheckBox chkUseFooter;
- XFixedText lblLetterNorm;
- XFixedText lblTitle3;
- XRadioButton optSenderPlaceholder;
- XRadioButton optSenderDefine;
- XTextComponent txtSenderName;
- XTextComponent txtSenderStreet;
- XTextComponent txtSenderPostCode;
- XTextComponent txtSenderState;
- XTextComponent txtSenderCity;
- XRadioButton optReceiverPlaceholder;
- XRadioButton optReceiverDatabase;
- XFixedText lblSenderAddress;
- //Fixed Line
- XControl FixedLine2;
- XFixedText lblReceiverAddress;
- XFixedText lblSenderName;
- XFixedText lblSenderStreet;
- XFixedText lblPostCodeCity;
- XFixedText lblTitle4;
- XTextComponent txtFooter;
- XCheckBox chkFooterNextPages;
- XCheckBox chkFooterPageNumbers;
- XFixedText lblFooter;
- XFixedText lblTitle5;
- XTextComponent txtTemplateName;
- //File Control
- XControl fileTemplatePath;
- XRadioButton optCreateLetter;
- XRadioButton optMakeChanges;
- XFixedText lblFinalExplanation1;
- XFixedText lblProceed;
- XFixedText lblFinalExplanation2;
- //Image Control
- XControl ImageControl2;
- XFixedText lblTemplateName;
- XFixedText lblTemplatePath;
- XFixedText lblTitle6;
- XFixedText Label9;
- //Font Descriptors as Class members.
- FontDescriptor fontDescriptor1 = new FontDescriptor();
- FontDescriptor fontDescriptor2 = new FontDescriptor();
- FontDescriptor fontDescriptor5 = new FontDescriptor();
- FontDescriptor fontDescriptor6 = new FontDescriptor();
+public abstract class LetterWizardDialog extends WizardDialog implements LetterWizardDialogConst, UIConsts
+{
+ //GUI Components as Class members.
+ XRadioButton optBusinessLetter;
+ XListBox lstBusinessStyle;
+ XCheckBox chkBusinessPaper;
+ XRadioButton optPrivOfficialLetter;
+ XListBox lstPrivOfficialStyle;
+ XRadioButton optPrivateLetter;
+ XListBox lstPrivateStyle;
+ XFixedText lblBusinessStyle;
+ XFixedText lblPrivOfficialStyle;
+ XFixedText lblTitle1;
+ XFixedText lblPrivateStyle;
+ XFixedText lblIntroduction;
+ //Image Control
+ XControl ImageControl3;
+ XCheckBox chkPaperCompanyLogo;
+ XNumericField numLogoHeight;
+ XNumericField numLogoX;
+ XNumericField numLogoWidth;
+ XNumericField numLogoY;
+ XCheckBox chkPaperCompanyAddress;
+ XNumericField numAddressHeight;
+ XNumericField numAddressX;
+ XNumericField numAddressWidth;
+ XNumericField numAddressY;
+ XCheckBox chkCompanyReceiver;
+ XCheckBox chkPaperFooter;
+ XNumericField numFooterHeight;
+ XFixedText lblLogoHeight;
+ XFixedText lblLogoWidth;
+ //Fixed Line
+ XControl FixedLine5;
+ //Fixed Line
+ XControl FixedLine6;
+ XFixedText lblFooterHeight;
+ XFixedText lblLogoX;
+ XFixedText lblLogoY;
+ XFixedText lblAddressHeight;
+ XFixedText lblAddressWidth;
+ XFixedText lblAddressX;
+ XFixedText lblAddressY;
+ XFixedText lblTitle2;
+ XListBox lstLetterNorm;
+ XCheckBox chkUseLogo;
+ XCheckBox chkUseAddressReceiver;
+ XCheckBox chkUseSigns;
+ XCheckBox chkUseSubject;
+ XCheckBox chkUseSalutation;
+ XComboBox lstSalutation;
+ XCheckBox chkUseBendMarks;
+ XCheckBox chkUseGreeting;
+ XComboBox lstGreeting;
+ XCheckBox chkUseFooter;
+ XFixedText lblLetterNorm;
+ XFixedText lblTitle3;
+ XRadioButton optSenderPlaceholder;
+ XRadioButton optSenderDefine;
+ XTextComponent txtSenderName;
+ XTextComponent txtSenderStreet;
+ XTextComponent txtSenderPostCode;
+ XTextComponent txtSenderState;
+ XTextComponent txtSenderCity;
+ XRadioButton optReceiverPlaceholder;
+ XRadioButton optReceiverDatabase;
+ XFixedText lblSenderAddress;
+ //Fixed Line
+ XControl FixedLine2;
+ XFixedText lblReceiverAddress;
+ XFixedText lblSenderName;
+ XFixedText lblSenderStreet;
+ XFixedText lblPostCodeCity;
+ XFixedText lblTitle4;
+ XTextComponent txtFooter;
+ XCheckBox chkFooterNextPages;
+ XCheckBox chkFooterPageNumbers;
+ XFixedText lblFooter;
+ XFixedText lblTitle5;
+ XTextComponent txtTemplateName;
+ //File Control
+ XControl fileTemplatePath;
+ XRadioButton optCreateLetter;
+ XRadioButton optMakeChanges;
+ XFixedText lblFinalExplanation1;
+ XFixedText lblProceed;
+ XFixedText lblFinalExplanation2;
+ //Image Control
+ XControl ImageControl2;
+ XFixedText lblTemplateName;
+ XFixedText lblTemplatePath;
+ XFixedText lblTitle6;
+ XFixedText Label9;
+ //Font Descriptors as Class members.
+ FontDescriptor fontDescriptor1 = new FontDescriptor();
+ FontDescriptor fontDescriptor2 = new FontDescriptor();
+ FontDescriptor fontDescriptor5 = new FontDescriptor();
+ FontDescriptor fontDescriptor6 = new FontDescriptor(); //Resources Object
+ LetterWizardDialogResources resources;
- //Resources Object
-LetterWizardDialogResources resources;
+ public LetterWizardDialog(XMultiServiceFactory xmsf)
+ {
+ super(xmsf, HIDMAIN);
+ //Load Resources
+ resources = new LetterWizardDialogResources(xmsf);
- public LetterWizardDialog(XMultiServiceFactory xmsf) {
- super(xmsf, HIDMAIN);
- //Load Resources
- resources = new LetterWizardDialogResources(xmsf);
+ //set dialog properties...
+ Helper.setUnoPropertyValues(xDialogModel,
+ new String[]
+ {
+ "Closeable", "Height", "Moveable", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Title", "Width"
+ },
+ new Object[]
+ {
+ Boolean.TRUE, new Integer(210), Boolean.TRUE, "LetterWizardDialog", new Integer(104), new Integer(52), INTEGERS[1], new Short((short) 1), resources.resLetterWizardDialog_title, new Integer(310)
+ });
- //set dialog properties...
- Helper.setUnoPropertyValues(xDialogModel,
- new String[] { "Closeable","Height","Moveable","Name","PositionX","PositionY","Step","TabIndex","Title","Width"},
- new Object[] { Boolean.TRUE,new Integer(210),Boolean.TRUE,"LetterWizardDialog",new Integer(104),new Integer(52),INTEGERS[1],new Short((short)1),resources.resLetterWizardDialog_title,new Integer(310)}
- );
-
- //Set member- FontDescriptors...
- fontDescriptor1.Weight = 150;
- fontDescriptor1.Underline = com.sun.star.awt.FontUnderline.SINGLE;
- fontDescriptor2.Weight = 100;
- fontDescriptor5.Weight = 100;
- fontDescriptor6.Weight = 150;
- }
- //build components
- public void buildStep1() {
- optBusinessLetter = insertRadioButton("optBusinessLetter", OPTBUSINESSLETTER_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 1 ),resources.resoptBusinessLetter_value,"optBusinessLetter",new Integer(97),new Integer(28),INTEGERS[1],new Short((short)1),new Integer(184)}
- );
- optPrivOfficialLetter = insertRadioButton("optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 2 ),resources.resoptPrivOfficialLetter_value,"optPrivOfficialLetter",new Integer(97),new Integer(74),INTEGERS[1],new Short((short)2),new Integer(184)}
- );
- optPrivateLetter = insertRadioButton("optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 3 ),resources.resoptPrivateLetter_value,"optPrivateLetter",new Integer(97),new Integer(106),INTEGERS[1],new Short((short)3),new Integer(184)}
- );
- lstBusinessStyle = insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED,LSTBUSINESSSTYLE_ITEM_CHANGED,
- new String[] {"Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { Boolean.TRUE,INTEGER_12,"HID:" + ( HID + 4 ),"lstBusinessStyle",new Integer(180),INTEGER_40,INTEGERS[1],new Short((short)4),new Integer(74)}
- );
- chkBusinessPaper = insertCheckBox("chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 5 ),resources.reschkBusinessPaper_value,"chkBusinessPaper",new Integer(110),new Integer(56),new Short((short)0),INTEGERS[1],new Short((short)5),new Integer(168)}
- );
- lstPrivOfficialStyle = insertListBox("lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED,LSTPRIVOFFICIALSTYLE_ITEM_CHANGED,
- new String[] {"Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { Boolean.TRUE,INTEGER_12,"HID:" + ( HID + 6 ),"lstPrivOfficialStyle",new Integer(180),new Integer(86),INTEGERS[1],new Short((short)6),new Integer(74)}
- );
- lstPrivateStyle = insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED,LSTPRIVATESTYLE_ITEM_CHANGED,
- new String[] {"Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { Boolean.TRUE,INTEGER_12,"HID:" + ( HID + 7 ),"lstPrivateStyle",new Integer(180),new Integer(118),INTEGERS[1],new Short((short)7),new Integer(74)}
- );
- lblBusinessStyle = insertLabel("lblBusinessStyle",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblBusinessStyle_value,"lblBusinessStyle",new Integer(110),new Integer(42),INTEGERS[1],new Short((short)48),new Integer(60)}
- );
- lblPrivOfficialStyle = insertLabel("lblPrivOfficialStyle",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblPrivOfficialStyle_value,"lblPrivOfficialStyle",new Integer(110),new Integer(88),INTEGERS[1],new Short((short)49),new Integer(60)}
- );
- lblTitle1 = insertLabel("lblTitle1",
- new String[] {"FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { fontDescriptor6,INTEGER_16,resources.reslblTitle1_value,Boolean.TRUE,"lblTitle1",new Integer(91),INTEGERS[8],INTEGERS[1],new Short((short)55),new Integer(212)}
- );
- lblPrivateStyle = insertLabel("lblPrivateStyle",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblPrivateStyle_value,"lblPrivateStyle",new Integer(110),new Integer(120),INTEGERS[1],new Short((short)74),new Integer(60)}
- );
- lblIntroduction = insertLabel("lblIntroduction",
- new String[] {"Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { new Integer(39),resources.reslblIntroduction_value,Boolean.TRUE,"lblIntroduction",new Integer(104),new Integer(145),INTEGERS[1],new Short((short)80),new Integer(199)}
- );
- ImageControl3 = insertInfoImage(92, 145, 1);
+ //Set member- FontDescriptors...
+ fontDescriptor1.Weight = 150;
+ fontDescriptor1.Underline = com.sun.star.awt.FontUnderline.SINGLE;
+ fontDescriptor2.Weight = 100;
+ fontDescriptor5.Weight = 100;
+ fontDescriptor6.Weight = 150;
+ }
+ //build components
+ public void buildStep1()
+ {
+ optBusinessLetter = insertRadioButton("optBusinessLetter", OPTBUSINESSLETTER_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 1), resources.resoptBusinessLetter_value, "optBusinessLetter", new Integer(97), new Integer(28), INTEGERS[1], new Short((short) 1), new Integer(184)
+ });
+ optPrivOfficialLetter = insertRadioButton("optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 2), resources.resoptPrivOfficialLetter_value, "optPrivOfficialLetter", new Integer(97), new Integer(74), INTEGERS[1], new Short((short) 2), new Integer(184)
+ });
+ optPrivateLetter = insertRadioButton("optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 3), resources.resoptPrivateLetter_value, "optPrivateLetter", new Integer(97), new Integer(106), INTEGERS[1], new Short((short) 3), new Integer(184)
+ });
+ lstBusinessStyle = insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED,
+ new String[]
+ {
+ "Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ Boolean.TRUE, INTEGER_12, "HID:" + (HID + 4), "lstBusinessStyle", new Integer(180), INTEGER_40, INTEGERS[1], new Short((short) 4), new Integer(74)
+ });
+ chkBusinessPaper = insertCheckBox("chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 5), resources.reschkBusinessPaper_value, "chkBusinessPaper", new Integer(110), new Integer(56), new Short((short) 0), INTEGERS[1], new Short((short) 5), new Integer(168)
+ });
+ lstPrivOfficialStyle = insertListBox("lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED, LSTPRIVOFFICIALSTYLE_ITEM_CHANGED,
+ new String[]
+ {
+ "Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ Boolean.TRUE, INTEGER_12, "HID:" + (HID + 6), "lstPrivOfficialStyle", new Integer(180), new Integer(86), INTEGERS[1], new Short((short) 6), new Integer(74)
+ });
+ lstPrivateStyle = insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED,
+ new String[]
+ {
+ "Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ Boolean.TRUE, INTEGER_12, "HID:" + (HID + 7), "lstPrivateStyle", new Integer(180), new Integer(118), INTEGERS[1], new Short((short) 7), new Integer(74)
+ });
+ lblBusinessStyle = insertLabel("lblBusinessStyle",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblBusinessStyle_value, "lblBusinessStyle", new Integer(110), new Integer(42), INTEGERS[1], new Short((short) 48), new Integer(60)
+ });
+ lblPrivOfficialStyle = insertLabel("lblPrivOfficialStyle",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblPrivOfficialStyle_value, "lblPrivOfficialStyle", new Integer(110), new Integer(88), INTEGERS[1], new Short((short) 49), new Integer(60)
+ });
+ lblTitle1 = insertLabel("lblTitle1",
+ new String[]
+ {
+ "FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ fontDescriptor6, INTEGER_16, resources.reslblTitle1_value, Boolean.TRUE, "lblTitle1", new Integer(91), INTEGERS[8], INTEGERS[1], new Short((short) 55), new Integer(212)
+ });
+ lblPrivateStyle = insertLabel("lblPrivateStyle",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblPrivateStyle_value, "lblPrivateStyle", new Integer(110), new Integer(120), INTEGERS[1], new Short((short) 74), new Integer(60)
+ });
+ lblIntroduction = insertLabel("lblIntroduction",
+ new String[]
+ {
+ "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ new Integer(39), resources.reslblIntroduction_value, Boolean.TRUE, "lblIntroduction", new Integer(104), new Integer(145), INTEGERS[1], new Short((short) 80), new Integer(199)
+ });
+ ImageControl3 = insertInfoImage(92, 145, 1);
// ImageControl3 = insertImage("ImageControl3",
// new String[] {"Border", "Height", "ImageURL", "Name", "PositionX", "PositionY", "ScaleImage", "Step", "TabIndex", "Width"},
// new Object[] { new Short((short)0), INTEGERS[10],"private:resource/dbu/image/19205","ImageControl3",new Integer(92),new Integer(145),Boolean.FALSE,INTEGERS[1],new Short((short)81),INTEGERS[10]}
// );
- }
-
- public void buildStep2() {
- chkPaperCompanyLogo = insertCheckBox("chkPaperCompanyLogo", CHKPAPERCOMPANYLOGO_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 8 ),resources.reschkPaperCompanyLogo_value,"chkPaperCompanyLogo",new Integer(97),new Integer(28),new Short((short)0),INTEGERS[2],new Short((short)8),new Integer(68)}
- );
- numLogoHeight = insertNumericField("numLogoHeight", NUMLOGOHEIGHT_TEXT_CHANGED,
- new String[] {"Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "StrictFormat", "TabIndex", "Value", "Width"},
- new Object[] { INTEGER_12,"HID:" + ( HID + 9 ),"numLogoHeight",new Integer(138),INTEGER_40,Boolean.TRUE,INTEGERS[2],Boolean.TRUE,new Short((short)9),INTEGERS[3],new Integer(30)}
-
- );
- numLogoX = insertNumericField("numLogoX", NUMLOGOX_TEXT_CHANGED,
- new String[] {"Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width"},
- new Object[] { INTEGER_12,"HID:" + ( HID + 10 ),"numLogoX",new Integer(266),INTEGER_40,Boolean.TRUE,INTEGERS[2],new Short((short)10),INTEGERS[0],new Integer(30)}
- );
- numLogoWidth = insertNumericField("numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED,
- new String[] {"Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width"},
- new Object[] { INTEGER_12,"HID:" + ( HID + 11 ),"numLogoWidth",new Integer(138),new Integer(56),Boolean.TRUE,INTEGERS[2],new Short((short)11),new Double(3.8),new Integer(30)}
- );
- numLogoY = insertNumericField("numLogoY", NUMLOGOY_TEXT_CHANGED,
- new String[] {"Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width"},
- new Object[] { INTEGER_12,"HID:" + ( HID + 12 ),"numLogoY",new Integer(266),new Integer(56),Boolean.TRUE,INTEGERS[2],new Short((short)12),new Double(-3.4),new Integer(30)}
- );
- chkPaperCompanyAddress = insertCheckBox("chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 13 ),resources.reschkPaperCompanyAddress_value,"chkPaperCompanyAddress",new Integer(98),new Integer(84),new Short((short)0),INTEGERS[2],new Short((short)13),new Integer(68)}
- );
- numAddressHeight = insertNumericField("numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED,
- new String[] {"Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "StrictFormat", "TabIndex", "Value", "Width"},
- new Object[] { INTEGER_12,"HID:" + ( HID + 14 ),"numAddressHeight",new Integer(138),new Integer(96),Boolean.TRUE,INTEGERS[2],Boolean.TRUE,new Short((short)14),INTEGERS[3],new Integer(30)}
- );
- numAddressX = insertNumericField("numAddressX", NUMADDRESSX_TEXT_CHANGED,
- new String[] {"Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width"},
- new Object[] { INTEGER_12,"HID:" + ( HID + 15 ),"numAddressX",new Integer(266),new Integer(96),Boolean.TRUE,INTEGERS[2],new Short((short)15),new Double(3.8),new Integer(30)}
- );
- numAddressWidth = insertNumericField("numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED,
- new String[] {"Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width"},
- new Object[] { INTEGER_12,"HID:" + ( HID + 16 ),"numAddressWidth",new Integer(138),new Integer(112),Boolean.TRUE,INTEGERS[2],new Short((short)16),new Double(13.8),new Integer(30)}
- );
- numAddressY = insertNumericField("numAddressY", NUMADDRESSY_TEXT_CHANGED,
- new String[] {"Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width"},
- new Object[] { INTEGER_12,"HID:" + ( HID + 17 ),"numAddressY",new Integer(266),new Integer(112),Boolean.TRUE,INTEGERS[2],new Short((short)17),new Double(-3.4),new Integer(30)}
- );
- chkCompanyReceiver = insertCheckBox("chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 18 ),resources.reschkCompanyReceiver_value,"chkCompanyReceiver",new Integer(103),new Integer(131),new Short((short)0),INTEGERS[2],new Short((short)18),new Integer(185)}
- );
- chkPaperFooter = insertCheckBox("chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 19 ),resources.reschkPaperFooter_value,"chkPaperFooter",new Integer(97),new Integer(158),new Short((short)0),INTEGERS[2],new Short((short)19),new Integer(68)}
- );
- numFooterHeight = insertNumericField("numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED,
- new String[] {"Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width"},
- new Object[] { INTEGER_12,"HID:" + ( HID + 20 ),"numFooterHeight",new Integer(236),new Integer(156),Boolean.TRUE,INTEGERS[2],new Short((short)20),INTEGERS[5],new Integer(30)}
- );
- lblLogoHeight = insertLabel("lblLogoHeight",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblLogoHeight_value,"lblLogoHeight",new Integer(103),new Integer(42),INTEGERS[2],new Short((short)68),new Integer(32)}
- );
- lblLogoWidth = insertLabel("lblLogoWidth",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblLogoWidth_value,"lblLogoWidth",new Integer(103),new Integer(58),INTEGERS[2],new Short((short)69),new Integer(32)}
- );
- FixedLine5 = insertFixedLine("FixedLine5",
- new String[] {"Height", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[2],"FixedLine5",new Integer(90),new Integer(78),INTEGERS[2],new Short((short)70),new Integer(215)}
- );
- FixedLine6 = insertFixedLine("FixedLine6",
- new String[] {"Height", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[2],"FixedLine6",new Integer(90),new Integer(150),INTEGERS[2],new Short((short)71),new Integer(215)}
- );
- lblFooterHeight = insertLabel("lblFooterHeight",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblFooterHeight_value,"lblFooterHeight",new Integer(200),new Integer(158),INTEGERS[2],new Short((short)72),new Integer(32)}
- );
- lblLogoX = insertLabel("lblLogoX",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblLogoX_value,"lblLogoX",new Integer(170),new Integer(42),INTEGERS[2],new Short((short)84),new Integer(94)}
- );
- lblLogoY = insertLabel("lblLogoY",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblLogoY_value,"lblLogoY",new Integer(170),new Integer(58),INTEGERS[2],new Short((short)85),new Integer(94)}
- );
- lblAddressHeight = insertLabel("lblAddressHeight",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblAddressHeight_value,"lblAddressHeight",new Integer(103),new Integer(98),INTEGERS[2],new Short((short)86),new Integer(32)}
- );
- lblAddressWidth = insertLabel("lblAddressWidth",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblAddressWidth_value,"lblAddressWidth",new Integer(103),new Integer(114),INTEGERS[2],new Short((short)87),new Integer(32)}
- );
- lblAddressX = insertLabel("lblAddressX",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblAddressX_value,"lblAddressX",new Integer(170),new Integer(98),INTEGERS[2],new Short((short)88),new Integer(94)}
- );
- lblAddressY = insertLabel("lblAddressY",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblAddressY_value,"lblAddressY",new Integer(170),new Integer(114),INTEGERS[2],new Short((short)89),new Integer(94)}
- );
- lblTitle2 = insertLabel("lblTitle2",
- new String[] {"FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { fontDescriptor6,INTEGER_16,resources.reslblTitle2_value,Boolean.TRUE,"lblTitle2",new Integer(91),INTEGERS[8],INTEGERS[2],new Short((short)91),new Integer(212)}
- );
- }
+ }
- public void buildStep3() {
- lstLetterNorm = insertListBox("lstLetterNorm", LSTLETTERNORM_ACTION_PERFORMED,LSTLETTERNORM_ITEM_CHANGED,
- new String[] {"Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { Boolean.TRUE,INTEGER_12,"HID:" + ( HID + 21 ),"lstLetterNorm",new Integer(210),new Integer(34),INTEGERS[3],new Short((short)21),new Integer(74)}
- );
- chkUseLogo = insertCheckBox("chkUseLogo", CHKUSELOGO_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 22 ),resources.reschkUseLogo_value,"chkUseLogo",new Integer(97),new Integer(54),new Short((short)0),INTEGERS[3],new Short((short)22),new Integer(212)}
- );
- chkUseAddressReceiver = insertCheckBox("chkUseAddressReceiver", CHKUSEADDRESSRECEIVER_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 23 ),resources.reschkUseAddressReceiver_value,"chkUseAddressReceiver",new Integer(97),new Integer(69),new Short((short)0),INTEGERS[3],new Short((short)23),new Integer(212)}
- );
- chkUseSigns = insertCheckBox("chkUseSigns", CHKUSESIGNS_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 24 ),resources.reschkUseSigns_value,"chkUseSigns",new Integer(97),new Integer(82),new Short((short)0),INTEGERS[3],new Short((short)24),new Integer(212)}
- );
- chkUseSubject = insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 25 ),resources.reschkUseSubject_value,"chkUseSubject",new Integer(97),new Integer(98),new Short((short)0),INTEGERS[3],new Short((short)25),new Integer(212)}
- );
- chkUseSalutation = insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 26 ),resources.reschkUseSalutation_value,"chkUseSalutation",new Integer(97),new Integer(113),new Short((short)0),INTEGERS[3],new Short((short)26),new Integer(66)}
- );
- lstSalutation = insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED,LSTSALUTATION_ITEM_CHANGED,LSTSALUTATION_TEXT_CHANGED,
- new String[] {"Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { Boolean.TRUE,INTEGER_12,"HID:" + ( HID + 27 ),"lstSalutation",new Integer(210),new Integer(110),INTEGERS[3],new Short((short)27),new Integer(74)}
- );
- chkUseBendMarks = insertCheckBox("chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 28 ),resources.reschkUseBendMarks_value,"chkUseBendMarks",new Integer(97),new Integer(127),new Short((short)0),INTEGERS[3],new Short((short)28),new Integer(212)}
- );
- chkUseGreeting = insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 29 ),resources.reschkUseGreeting_value,"chkUseGreeting",new Integer(97),new Integer(142),new Short((short)0),INTEGERS[3],new Short((short)29),new Integer(66)}
- );
- lstGreeting = insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED,LSTGREETING_ITEM_CHANGED,LSTGREETING_TEXT_CHANGED,
- new String[] {"Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { Boolean.TRUE,INTEGER_12,"HID:" + ( HID + 30 ),"lstGreeting",new Integer(210),new Integer(141),INTEGERS[3],new Short((short)30),new Integer(74)}
- );
- chkUseFooter = insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 31 ),resources.reschkUseFooter_value,"chkUseFooter",new Integer(97),new Integer(158),new Short((short)0),INTEGERS[3],new Short((short)31),new Integer(212)}
- );
- lblLetterNorm = insertLabel("lblLetterNorm",
- new String[] {"Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGER_16,resources.reslblLetterNorm_value,Boolean.TRUE,"lblLetterNorm",new Integer(97),new Integer(28),INTEGERS[3],new Short((short)50),new Integer(109)}
- );
- lblTitle3 = insertLabel("lblTitle3",
- new String[] {"FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { fontDescriptor6,INTEGER_16,resources.reslblTitle3_value,Boolean.TRUE,"lblTitle3",new Integer(91),INTEGERS[8],INTEGERS[3],new Short((short)90),new Integer(212)}
- );
- }
+ public void buildStep2()
+ {
+ chkPaperCompanyLogo = insertCheckBox("chkPaperCompanyLogo", CHKPAPERCOMPANYLOGO_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 8), resources.reschkPaperCompanyLogo_value, "chkPaperCompanyLogo", new Integer(97), new Integer(28), new Short((short) 0), INTEGERS[2], new Short((short) 8), new Integer(68)
+ });
+ numLogoHeight = insertNumericField("numLogoHeight", NUMLOGOHEIGHT_TEXT_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "StrictFormat", "TabIndex", "Value", "Width"
+ },
+ new Object[]
+ {
+ INTEGER_12, "HID:" + (HID + 9), "numLogoHeight", new Integer(138), INTEGER_40, Boolean.TRUE, INTEGERS[2], Boolean.TRUE, new Short((short) 9), INTEGERS[3], new Integer(30)
+ });
+ numLogoX = insertNumericField("numLogoX", NUMLOGOX_TEXT_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width"
+ },
+ new Object[]
+ {
+ INTEGER_12, "HID:" + (HID + 10), "numLogoX", new Integer(266), INTEGER_40, Boolean.TRUE, INTEGERS[2], new Short((short) 10), INTEGERS[0], new Integer(30)
+ });
+ numLogoWidth = insertNumericField("numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width"
+ },
+ new Object[]
+ {
+ INTEGER_12, "HID:" + (HID + 11), "numLogoWidth", new Integer(138), new Integer(56), Boolean.TRUE, INTEGERS[2], new Short((short) 11), new Double(3.8), new Integer(30)
+ });
+ numLogoY = insertNumericField("numLogoY", NUMLOGOY_TEXT_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width"
+ },
+ new Object[]
+ {
+ INTEGER_12, "HID:" + (HID + 12), "numLogoY", new Integer(266), new Integer(56), Boolean.TRUE, INTEGERS[2], new Short((short) 12), new Double(-3.4), new Integer(30)
+ });
+ chkPaperCompanyAddress = insertCheckBox("chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 13), resources.reschkPaperCompanyAddress_value, "chkPaperCompanyAddress", new Integer(98), new Integer(84), new Short((short) 0), INTEGERS[2], new Short((short) 13), new Integer(68)
+ });
+ numAddressHeight = insertNumericField("numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "StrictFormat", "TabIndex", "Value", "Width"
+ },
+ new Object[]
+ {
+ INTEGER_12, "HID:" + (HID + 14), "numAddressHeight", new Integer(138), new Integer(96), Boolean.TRUE, INTEGERS[2], Boolean.TRUE, new Short((short) 14), INTEGERS[3], new Integer(30)
+ });
+ numAddressX = insertNumericField("numAddressX", NUMADDRESSX_TEXT_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width"
+ },
+ new Object[]
+ {
+ INTEGER_12, "HID:" + (HID + 15), "numAddressX", new Integer(266), new Integer(96), Boolean.TRUE, INTEGERS[2], new Short((short) 15), new Double(3.8), new Integer(30)
+ });
+ numAddressWidth = insertNumericField("numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width"
+ },
+ new Object[]
+ {
+ INTEGER_12, "HID:" + (HID + 16), "numAddressWidth", new Integer(138), new Integer(112), Boolean.TRUE, INTEGERS[2], new Short((short) 16), new Double(13.8), new Integer(30)
+ });
+ numAddressY = insertNumericField("numAddressY", NUMADDRESSY_TEXT_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width"
+ },
+ new Object[]
+ {
+ INTEGER_12, "HID:" + (HID + 17), "numAddressY", new Integer(266), new Integer(112), Boolean.TRUE, INTEGERS[2], new Short((short) 17), new Double(-3.4), new Integer(30)
+ });
+ chkCompanyReceiver = insertCheckBox("chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 18), resources.reschkCompanyReceiver_value, "chkCompanyReceiver", new Integer(103), new Integer(131), new Short((short) 0), INTEGERS[2], new Short((short) 18), new Integer(185)
+ });
+ chkPaperFooter = insertCheckBox("chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 19), resources.reschkPaperFooter_value, "chkPaperFooter", new Integer(97), new Integer(158), new Short((short) 0), INTEGERS[2], new Short((short) 19), new Integer(68)
+ });
+ numFooterHeight = insertNumericField("numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width"
+ },
+ new Object[]
+ {
+ INTEGER_12, "HID:" + (HID + 20), "numFooterHeight", new Integer(236), new Integer(156), Boolean.TRUE, INTEGERS[2], new Short((short) 20), INTEGERS[5], new Integer(30)
+ });
+ lblLogoHeight = insertLabel("lblLogoHeight",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblLogoHeight_value, "lblLogoHeight", new Integer(103), new Integer(42), INTEGERS[2], new Short((short) 68), new Integer(32)
+ });
+ lblLogoWidth = insertLabel("lblLogoWidth",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblLogoWidth_value, "lblLogoWidth", new Integer(103), new Integer(58), INTEGERS[2], new Short((short) 69), new Integer(32)
+ });
+ FixedLine5 = insertFixedLine("FixedLine5",
+ new String[]
+ {
+ "Height", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[2], "FixedLine5", new Integer(90), new Integer(78), INTEGERS[2], new Short((short) 70), new Integer(215)
+ });
+ FixedLine6 = insertFixedLine("FixedLine6",
+ new String[]
+ {
+ "Height", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[2], "FixedLine6", new Integer(90), new Integer(150), INTEGERS[2], new Short((short) 71), new Integer(215)
+ });
+ lblFooterHeight = insertLabel("lblFooterHeight",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblFooterHeight_value, "lblFooterHeight", new Integer(200), new Integer(158), INTEGERS[2], new Short((short) 72), new Integer(32)
+ });
+ lblLogoX = insertLabel("lblLogoX",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblLogoX_value, "lblLogoX", new Integer(170), new Integer(42), INTEGERS[2], new Short((short) 84), new Integer(94)
+ });
+ lblLogoY = insertLabel("lblLogoY",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblLogoY_value, "lblLogoY", new Integer(170), new Integer(58), INTEGERS[2], new Short((short) 85), new Integer(94)
+ });
+ lblAddressHeight = insertLabel("lblAddressHeight",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblAddressHeight_value, "lblAddressHeight", new Integer(103), new Integer(98), INTEGERS[2], new Short((short) 86), new Integer(32)
+ });
+ lblAddressWidth = insertLabel("lblAddressWidth",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblAddressWidth_value, "lblAddressWidth", new Integer(103), new Integer(114), INTEGERS[2], new Short((short) 87), new Integer(32)
+ });
+ lblAddressX = insertLabel("lblAddressX",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblAddressX_value, "lblAddressX", new Integer(170), new Integer(98), INTEGERS[2], new Short((short) 88), new Integer(94)
+ });
+ lblAddressY = insertLabel("lblAddressY",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblAddressY_value, "lblAddressY", new Integer(170), new Integer(114), INTEGERS[2], new Short((short) 89), new Integer(94)
+ });
+ lblTitle2 = insertLabel("lblTitle2",
+ new String[]
+ {
+ "FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ fontDescriptor6, INTEGER_16, resources.reslblTitle2_value, Boolean.TRUE, "lblTitle2", new Integer(91), INTEGERS[8], INTEGERS[2], new Short((short) 91), new Integer(212)
+ });
+ }
- public void buildStep4() {
- optSenderPlaceholder = insertRadioButton("optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 32 ),resources.resoptSenderPlaceholder_value,"optSenderPlaceholder",new Integer(104),new Integer(42),INTEGERS[4],new Short((short)32),new Integer(149)}
- );
- optSenderDefine = insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 33 ),resources.resoptSenderDefine_value,"optSenderDefine",new Integer(104),new Integer(54),INTEGERS[4],new Short((short)33),new Integer(149)}
- );
- txtSenderName = insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED,
- new String[] {"Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGER_12,"HID:" + ( HID + 34 ),"txtSenderName",new Integer(182),new Integer(67),INTEGERS[4],new Short((short)34),new Integer(119)}
- );
- txtSenderStreet = insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED,
- new String[] {"Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGER_12,"HID:" + ( HID + 35 ),"txtSenderStreet",new Integer(182),new Integer(81),INTEGERS[4],new Short((short)35),new Integer(119)}
- );
- txtSenderPostCode = insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED,
- new String[] {"Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGER_12,"HID:" + ( HID + 36 ),"txtSenderPostCode",new Integer(182),new Integer(95),INTEGERS[4],new Short((short)36),new Integer(25)}
- );
- txtSenderState = insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED,
- new String[] {"Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGER_12,"HID:" + ( HID + 37 ),"txtSenderState",new Integer(211),new Integer(95),INTEGERS[4],new Short((short)37),new Integer(21)}
- );
- txtSenderCity = insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED,
- new String[] {"Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGER_12,"HID:" + ( HID + 38 ),"txtSenderCity",new Integer(236),new Integer(95),INTEGERS[4],new Short((short)38),new Integer(65)}
- );
- optReceiverPlaceholder = insertRadioButton("optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 39 ),resources.resoptReceiverPlaceholder_value,"optReceiverPlaceholder",new Integer(104),new Integer(145),INTEGERS[4],new Short((short)39),new Integer(200)}
- );
- optReceiverDatabase = insertRadioButton("optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 40 ),resources.resoptReceiverDatabase_value,"optReceiverDatabase",new Integer(104),new Integer(157),INTEGERS[4],new Short((short)40),new Integer(200)}
- );
- lblSenderAddress = insertLabel("lblSenderAddress",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblSenderAddress_value,"lblSenderAddress",new Integer(97),new Integer(28),INTEGERS[4],new Short((short)64),new Integer(136)}
- );
- FixedLine2 = insertFixedLine("FixedLine2",
- new String[] {"Height", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[5],"FixedLine2",new Integer(90),new Integer(126),INTEGERS[4],new Short((short)75),new Integer(212)}
- );
- lblReceiverAddress = insertLabel("lblReceiverAddress",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblReceiverAddress_value,"lblReceiverAddress",new Integer(97),new Integer(134),INTEGERS[4],new Short((short)76),new Integer(136)}
- );
- lblSenderName = insertLabel("lblSenderName",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblSenderName_value,"lblSenderName",new Integer(113),new Integer(69),INTEGERS[4],new Short((short)77),new Integer(68)}
- );
- lblSenderStreet = insertLabel("lblSenderStreet",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblSenderStreet_value,"lblSenderStreet",new Integer(113),new Integer(82),INTEGERS[4],new Short((short)78),new Integer(68)}
- );
- lblPostCodeCity = insertLabel("lblPostCodeCity",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblPostCodeCity_value,"lblPostCodeCity",new Integer(113),new Integer(97),INTEGERS[4],new Short((short)79),new Integer(68)}
- );
- lblTitle4 = insertLabel("lblTitle4",
- new String[] {"FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { fontDescriptor6,INTEGER_16,resources.reslblTitle4_value,Boolean.TRUE,"lblTitle4",new Integer(91),INTEGERS[8],INTEGERS[4],new Short((short)92),new Integer(212)}
- );
- }
+ public void buildStep3()
+ {
+ lstLetterNorm = insertListBox("lstLetterNorm", LSTLETTERNORM_ACTION_PERFORMED, LSTLETTERNORM_ITEM_CHANGED,
+ new String[]
+ {
+ "Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ Boolean.TRUE, INTEGER_12, "HID:" + (HID + 21), "lstLetterNorm", new Integer(210), new Integer(34), INTEGERS[3], new Short((short) 21), new Integer(74)
+ });
+ chkUseLogo = insertCheckBox("chkUseLogo", CHKUSELOGO_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 22), resources.reschkUseLogo_value, "chkUseLogo", new Integer(97), new Integer(54), new Short((short) 0), INTEGERS[3], new Short((short) 22), new Integer(212)
+ });
+ chkUseAddressReceiver = insertCheckBox("chkUseAddressReceiver", CHKUSEADDRESSRECEIVER_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 23), resources.reschkUseAddressReceiver_value, "chkUseAddressReceiver", new Integer(97), new Integer(69), new Short((short) 0), INTEGERS[3], new Short((short) 23), new Integer(212)
+ });
+ chkUseSigns = insertCheckBox("chkUseSigns", CHKUSESIGNS_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 24), resources.reschkUseSigns_value, "chkUseSigns", new Integer(97), new Integer(82), new Short((short) 0), INTEGERS[3], new Short((short) 24), new Integer(212)
+ });
+ chkUseSubject = insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 25), resources.reschkUseSubject_value, "chkUseSubject", new Integer(97), new Integer(98), new Short((short) 0), INTEGERS[3], new Short((short) 25), new Integer(212)
+ });
+ chkUseSalutation = insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 26), resources.reschkUseSalutation_value, "chkUseSalutation", new Integer(97), new Integer(113), new Short((short) 0), INTEGERS[3], new Short((short) 26), new Integer(66)
+ });
+ lstSalutation = insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, LSTSALUTATION_TEXT_CHANGED,
+ new String[]
+ {
+ "Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ Boolean.TRUE, INTEGER_12, "HID:" + (HID + 27), "lstSalutation", new Integer(210), new Integer(110), INTEGERS[3], new Short((short) 27), new Integer(74)
+ });
+ chkUseBendMarks = insertCheckBox("chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 28), resources.reschkUseBendMarks_value, "chkUseBendMarks", new Integer(97), new Integer(127), new Short((short) 0), INTEGERS[3], new Short((short) 28), new Integer(212)
+ });
+ chkUseGreeting = insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 29), resources.reschkUseGreeting_value, "chkUseGreeting", new Integer(97), new Integer(142), new Short((short) 0), INTEGERS[3], new Short((short) 29), new Integer(66)
+ });
+ lstGreeting = insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED,
+ new String[]
+ {
+ "Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ Boolean.TRUE, INTEGER_12, "HID:" + (HID + 30), "lstGreeting", new Integer(210), new Integer(141), INTEGERS[3], new Short((short) 30), new Integer(74)
+ });
+ chkUseFooter = insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 31), resources.reschkUseFooter_value, "chkUseFooter", new Integer(97), new Integer(158), new Short((short) 0), INTEGERS[3], new Short((short) 31), new Integer(212)
+ });
+ lblLetterNorm = insertLabel("lblLetterNorm",
+ new String[]
+ {
+ "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGER_16, resources.reslblLetterNorm_value, Boolean.TRUE, "lblLetterNorm", new Integer(97), new Integer(28), INTEGERS[3], new Short((short) 50), new Integer(109)
+ });
+ lblTitle3 = insertLabel("lblTitle3",
+ new String[]
+ {
+ "FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ fontDescriptor6, INTEGER_16, resources.reslblTitle3_value, Boolean.TRUE, "lblTitle3", new Integer(91), INTEGERS[8], INTEGERS[3], new Short((short) 90), new Integer(212)
+ });
+ }
- public void buildStep5() {
- txtFooter = insertTextField("txtFooter", TXTFOOTER_TEXT_CHANGED,
- new String[] {"Height", "HelpURL", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { new Integer(47),"HID:" + ( HID + 41 ),Boolean.TRUE,"txtFooter",new Integer(97),INTEGER_40,INTEGERS[5],new Short((short)41),new Integer(203)}
- );
- chkFooterNextPages = insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 42 ),resources.reschkFooterNextPages_value,"chkFooterNextPages",new Integer(97),new Integer(92),new Short((short)0),INTEGERS[5],new Short((short)42),new Integer(202)}
- );
- chkFooterPageNumbers = insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 43 ),resources.reschkFooterPageNumbers_value,"chkFooterPageNumbers",new Integer(97),new Integer(106),new Short((short)0),INTEGERS[5],new Short((short)43),new Integer(201)}
- );
- lblFooter = insertLabel("lblFooter",
- new String[] {"FontDescriptor", "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { fontDescriptor5,INTEGERS[8],resources.reslblFooter_value,"lblFooter",new Integer(97),new Integer(28),INTEGERS[5],new Short((short)52),new Integer(116)}
- );
- lblTitle5 = insertLabel("lblTitle5",
- new String[] {"FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { fontDescriptor6,INTEGER_16,resources.reslblTitle5_value,Boolean.TRUE,"lblTitle5",new Integer(91),INTEGERS[8],INTEGERS[5],new Short((short)93),new Integer(212)}
- );
- }
+ public void buildStep4()
+ {
+ optSenderPlaceholder = insertRadioButton("optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 32), resources.resoptSenderPlaceholder_value, "optSenderPlaceholder", new Integer(104), new Integer(42), INTEGERS[4], new Short((short) 32), new Integer(149)
+ });
+ optSenderDefine = insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 33), resources.resoptSenderDefine_value, "optSenderDefine", new Integer(104), new Integer(54), INTEGERS[4], new Short((short) 33), new Integer(149)
+ });
+ txtSenderName = insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGER_12, "HID:" + (HID + 34), "txtSenderName", new Integer(182), new Integer(67), INTEGERS[4], new Short((short) 34), new Integer(119)
+ });
+ txtSenderStreet = insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGER_12, "HID:" + (HID + 35), "txtSenderStreet", new Integer(182), new Integer(81), INTEGERS[4], new Short((short) 35), new Integer(119)
+ });
+ txtSenderPostCode = insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGER_12, "HID:" + (HID + 36), "txtSenderPostCode", new Integer(182), new Integer(95), INTEGERS[4], new Short((short) 36), new Integer(25)
+ });
+ txtSenderState = insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGER_12, "HID:" + (HID + 37), "txtSenderState", new Integer(211), new Integer(95), INTEGERS[4], new Short((short) 37), new Integer(21)
+ });
+ txtSenderCity = insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGER_12, "HID:" + (HID + 38), "txtSenderCity", new Integer(236), new Integer(95), INTEGERS[4], new Short((short) 38), new Integer(65)
+ });
+ optReceiverPlaceholder = insertRadioButton("optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 39), resources.resoptReceiverPlaceholder_value, "optReceiverPlaceholder", new Integer(104), new Integer(145), INTEGERS[4], new Short((short) 39), new Integer(200)
+ });
+ optReceiverDatabase = insertRadioButton("optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 40), resources.resoptReceiverDatabase_value, "optReceiverDatabase", new Integer(104), new Integer(157), INTEGERS[4], new Short((short) 40), new Integer(200)
+ });
+ lblSenderAddress = insertLabel("lblSenderAddress",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblSenderAddress_value, "lblSenderAddress", new Integer(97), new Integer(28), INTEGERS[4], new Short((short) 64), new Integer(136)
+ });
+ FixedLine2 = insertFixedLine("FixedLine2",
+ new String[]
+ {
+ "Height", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[5], "FixedLine2", new Integer(90), new Integer(126), INTEGERS[4], new Short((short) 75), new Integer(212)
+ });
+ lblReceiverAddress = insertLabel("lblReceiverAddress",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblReceiverAddress_value, "lblReceiverAddress", new Integer(97), new Integer(134), INTEGERS[4], new Short((short) 76), new Integer(136)
+ });
+ lblSenderName = insertLabel("lblSenderName",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblSenderName_value, "lblSenderName", new Integer(113), new Integer(69), INTEGERS[4], new Short((short) 77), new Integer(68)
+ });
+ lblSenderStreet = insertLabel("lblSenderStreet",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblSenderStreet_value, "lblSenderStreet", new Integer(113), new Integer(82), INTEGERS[4], new Short((short) 78), new Integer(68)
+ });
+ lblPostCodeCity = insertLabel("lblPostCodeCity",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblPostCodeCity_value, "lblPostCodeCity", new Integer(113), new Integer(97), INTEGERS[4], new Short((short) 79), new Integer(68)
+ });
+ lblTitle4 = insertLabel("lblTitle4",
+ new String[]
+ {
+ "FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ fontDescriptor6, INTEGER_16, resources.reslblTitle4_value, Boolean.TRUE, "lblTitle4", new Integer(91), INTEGERS[8], INTEGERS[4], new Short((short) 92), new Integer(212)
+ });
+ }
- public void buildStep6() {
- txtTemplateName = insertTextField("txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED,
- new String[] {"Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Text", "Width"},
- new Object[] { INTEGER_12,"HID:" + ( HID + 44 ),"txtTemplateName",new Integer(202),new Integer(56),INTEGERS[6],new Short((short)44),resources.restxtTemplateName_value,new Integer(100)}
- );
- optCreateLetter = insertRadioButton("optCreateLetter", OPTCREATELETTER_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 45 ),resources.resoptCreateLetter_value,"optCreateLetter",new Integer(104),new Integer(111),INTEGERS[6],new Short((short)50),new Integer(198)}
- );
- optMakeChanges = insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED,
- new String[] {"Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],"HID:" + ( HID + 46 ),resources.resoptMakeChanges_value,"optMakeChanges",new Integer(104),new Integer(123),INTEGERS[6],new Short((short)51),new Integer(198)}
- );
- lblFinalExplanation1 = insertLabel("lblFinalExplanation1",
- new String[] {"Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { new Integer(26),resources.reslblFinalExplanation1_value,Boolean.TRUE,"lblFinalExplanation1",new Integer(97),new Integer(28),INTEGERS[6],new Short((short)52),new Integer(205)}
- );
- lblProceed = insertLabel("lblProceed",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblProceed_value,"lblProceed",new Integer(97),new Integer(100),INTEGERS[6],new Short((short)53),new Integer(204)}
- );
- lblFinalExplanation2 = insertLabel("lblFinalExplanation2",
- new String[] {"Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { new Integer(33),resources.reslblFinalExplanation2_value,Boolean.TRUE,"lblFinalExplanation2",new Integer(104),new Integer(145),INTEGERS[6],new Short((short)54),new Integer(199)}
- );
- ImageControl2 = insertImage("ImageControl2",
- new String[] {"Border", "Height", "ImageURL", "Name", "PositionX", "PositionY", "ScaleImage", "Step", "TabIndex", "Width"},
- new Object[] { new Short((short)0),INTEGERS[10],"private:resource/dbu/image/19205","ImageControl2",new Integer(92),new Integer(145),Boolean.FALSE,INTEGERS[6],new Short((short)66),INTEGERS[10]}
- );
- lblTemplateName = insertLabel("lblTemplateName",
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { INTEGERS[8],resources.reslblTemplateName_value,"lblTemplateName",new Integer(97),new Integer(58),INTEGERS[6],new Short((short)82),new Integer(101)}
- );
- lblTitle6 = insertLabel("lblTitle6",
- new String[] {"FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"},
- new Object[] { fontDescriptor6,INTEGER_16,resources.reslblTitle6_value,Boolean.TRUE,"lblTitle6",new Integer(91),INTEGERS[8],INTEGERS[6],new Short((short)94),new Integer(212)}
- );
+ public void buildStep5()
+ {
+ txtFooter = insertTextField("txtFooter", TXTFOOTER_TEXT_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ new Integer(47), "HID:" + (HID + 41), Boolean.TRUE, "txtFooter", new Integer(97), INTEGER_40, INTEGERS[5], new Short((short) 41), new Integer(203)
+ });
+ chkFooterNextPages = insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 42), resources.reschkFooterNextPages_value, "chkFooterNextPages", new Integer(97), new Integer(92), new Short((short) 0), INTEGERS[5], new Short((short) 42), new Integer(202)
+ });
+ chkFooterPageNumbers = insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 43), resources.reschkFooterPageNumbers_value, "chkFooterPageNumbers", new Integer(97), new Integer(106), new Short((short) 0), INTEGERS[5], new Short((short) 43), new Integer(201)
+ });
+ lblFooter = insertLabel("lblFooter",
+ new String[]
+ {
+ "FontDescriptor", "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ fontDescriptor5, INTEGERS[8], resources.reslblFooter_value, "lblFooter", new Integer(97), new Integer(28), INTEGERS[5], new Short((short) 52), new Integer(116)
+ });
+ lblTitle5 = insertLabel("lblTitle5",
+ new String[]
+ {
+ "FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ fontDescriptor6, INTEGER_16, resources.reslblTitle5_value, Boolean.TRUE, "lblTitle5", new Integer(91), INTEGERS[8], INTEGERS[5], new Short((short) 93), new Integer(212)
+ });
+ }
- }
+ public void buildStep6()
+ {
+ txtTemplateName = insertTextField("txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Text", "Width"
+ },
+ new Object[]
+ {
+ INTEGER_12, "HID:" + (HID + 44), "txtTemplateName", new Integer(202), new Integer(56), INTEGERS[6], new Short((short) 44), resources.restxtTemplateName_value, new Integer(100)
+ });
+ optCreateLetter = insertRadioButton("optCreateLetter", OPTCREATELETTER_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 45), resources.resoptCreateLetter_value, "optCreateLetter", new Integer(104), new Integer(111), INTEGERS[6], new Short((short) 50), new Integer(198)
+ });
+ optMakeChanges = insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED,
+ new String[]
+ {
+ "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], "HID:" + (HID + 46), resources.resoptMakeChanges_value, "optMakeChanges", new Integer(104), new Integer(123), INTEGERS[6], new Short((short) 51), new Integer(198)
+ });
+ lblFinalExplanation1 = insertLabel("lblFinalExplanation1",
+ new String[]
+ {
+ "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ new Integer(26), resources.reslblFinalExplanation1_value, Boolean.TRUE, "lblFinalExplanation1", new Integer(97), new Integer(28), INTEGERS[6], new Short((short) 52), new Integer(205)
+ });
+ lblProceed = insertLabel("lblProceed",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblProceed_value, "lblProceed", new Integer(97), new Integer(100), INTEGERS[6], new Short((short) 53), new Integer(204)
+ });
+ lblFinalExplanation2 = insertLabel("lblFinalExplanation2",
+ new String[]
+ {
+ "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ new Integer(33), resources.reslblFinalExplanation2_value, Boolean.TRUE, "lblFinalExplanation2", new Integer(104), new Integer(145), INTEGERS[6], new Short((short) 54), new Integer(199)
+ });
+ ImageControl2 = insertImage("ImageControl2",
+ new String[]
+ {
+ "Border", "Height", "ImageURL", "Name", "PositionX", "PositionY", "ScaleImage", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ new Short((short) 0), INTEGERS[10], "private:resource/dbu/image/19205", "ImageControl2", new Integer(92), new Integer(145), Boolean.FALSE, INTEGERS[6], new Short((short) 66), INTEGERS[10]
+ });
+ lblTemplateName = insertLabel("lblTemplateName",
+ new String[]
+ {
+ "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ INTEGERS[8], resources.reslblTemplateName_value, "lblTemplateName", new Integer(97), new Integer(58), INTEGERS[6], new Short((short) 82), new Integer(101)
+ });
+ lblTitle6 = insertLabel("lblTitle6",
+ new String[]
+ {
+ "FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width"
+ },
+ new Object[]
+ {
+ fontDescriptor6, INTEGER_16, resources.reslblTitle6_value, Boolean.TRUE, "lblTitle6", new Integer(91), INTEGERS[8], INTEGERS[6], new Short((short) 94), new Integer(212)
+ });
+ }
} \ No newline at end of file
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.java
index 3d85953f1443..74aec498b10a 100755
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.java
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.java
@@ -1,5 +1,39 @@
+/*
+ ************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: LetterWizardDialogConst.java,v $
+ *
+ * $Revision: 1.4.192.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
package com.sun.star.wizards.letter;
-public interface LetterWizardDialogConst {
+
+public interface LetterWizardDialogConst
+{
+
public static final String OPTBUSINESSLETTER_ITEM_CHANGED = "optBusinessLetterItemChanged";
public static final String OPTPRIVOFFICIALLETTER_ITEM_CHANGED = "optPrivOfficialLetterItemChanged";
public static final String OPTPRIVATELETTER_ITEM_CHANGED = "optPrivateLetterItemChanged";
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogEvents.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogEvents.java
index 0e1256afb83a..d81bd4b1d06b 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogEvents.java
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogEvents.java
@@ -1,6 +1,39 @@
+/*
+ ************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: LetterWizardDialogEvents.java,v $
+ *
+ * $Revision: 1.3.192.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
package com.sun.star.wizards.letter;
-public interface LetterWizardDialogEvents {
+public interface LetterWizardDialogEvents
+{
+
public static final String OPTBUSINESSLETTER_ITEM_CHANGED = null;
public static final String OPTPRIVOFFICIALLETTER_ITEM_CHANGED = null;
public static final String OPTPRIVATELETTER_ITEM_CHANGED = null;
@@ -57,5 +90,4 @@ public interface LetterWizardDialogEvents {
public static final String imageURLImageControl1 = "images/ImageControl1";
public static final String imageURLImageControl2 = "images/ImageControl2";
public static final String imageURLImageControl3 = "images/ImageControl3";
-
}
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
index 3f689dc2bf42..aac291740eda 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
@@ -1,3 +1,34 @@
+/*
+ ************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: LetterWizardDialogImpl.java,v $
+ *
+ * $Revision: 1.19.36.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
package com.sun.star.wizards.letter;
import java.util.Vector;
@@ -34,32 +65,31 @@ import com.sun.star.wizards.ui.*;
import com.sun.star.wizards.ui.event.*;
import com.sun.star.wizards.common.Helper;
+public class LetterWizardDialogImpl extends LetterWizardDialog
+{
-public class LetterWizardDialogImpl extends LetterWizardDialog {
-
-protected void enterStep(int OldStep, int NewStep){}
-protected void leaveStep(int OldStep, int NewStep){}
+ protected void enterStep(int OldStep, int NewStep)
+ {
+ }
+ protected void leaveStep(int OldStep, int NewStep)
+ {
+ }
static LetterDocument myLetterDoc;
static boolean running;
-
XMultiServiceFactory xmsf;
-
XTextDocument xTextDocument;
PathSelection myPathSelection;
-
CGLetterWizard myConfig;
Vector mainDA = new Vector();
Vector letterDA = new Vector();
Vector businessDA = new Vector();
-
String[][] BusinessFiles;
String[][] OfficialFiles;
String[][] PrivateFiles;
String[] Norms;
- String[] NormPaths;
+ String[] NormPaths;
String[] NormNames;
-
String sTemplatePath;
String sUserTemplatePath;
String sBitmapPath;
@@ -71,12 +101,10 @@ protected void leaveStep(int OldStep, int NewStep){}
boolean bEditTemplate;
boolean bSaveSuccess = false;
private boolean filenameChanged = false;
-
LetterDocument.BusinessPaperObject BusCompanyLogo = null;
LetterDocument.BusinessPaperObject BusCompanyAddress = null;
LetterDocument.BusinessPaperObject BusCompanyAddressReceiver = null;
LetterDocument.BusinessPaperObject BusFooter = null;
-
final static int RM_TYPESTYLE = 1;
final static int RM_BUSINESSPAPER = 2;
final static int RM_ELEMENTS = 3;
@@ -84,31 +112,40 @@ protected void leaveStep(int OldStep, int NewStep){}
final static int RM_FOOTER = 5;
final static int RM_FINALSETTINGS = 6;
- public LetterWizardDialogImpl(XMultiServiceFactory xmsf) {
+ public LetterWizardDialogImpl(XMultiServiceFactory xmsf)
+ {
super(xmsf);
this.xmsf = xmsf;
}
- public static void main(String args[]) {
+ public static void main(String args[])
+ {
//only being called when starting wizard remotely
- String ConnectStr = "uno:socket,host=127.0.0.1,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.NamingService";
- XMultiServiceFactory xLocMSF = null;
- try {
- xLocMSF = Desktop.connect(ConnectStr);
- } catch (Exception e) {
- e.printStackTrace();
- } catch (java.lang.Exception e) {
- e.printStackTrace();
- }
- LetterWizardDialogImpl lw = new LetterWizardDialogImpl(xLocMSF);
- lw.startWizard(xLocMSF, null);
+ String ConnectStr = "uno:socket,host=127.0.0.1,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.NamingService";
+ XMultiServiceFactory xLocMSF = null;
+ try
+ {
+ xLocMSF = Desktop.connect(ConnectStr);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ catch (java.lang.Exception e)
+ {
+ e.printStackTrace();
+ }
+ LetterWizardDialogImpl lw = new LetterWizardDialogImpl(xLocMSF);
+ lw.startWizard(xLocMSF, null);
}
- public void startWizard(XMultiServiceFactory xMSF, Object[] CurPropertyValue) {
+ public void startWizard(XMultiServiceFactory xMSF, Object[] CurPropertyValue)
+ {
running = true;
- try {
+ try
+ {
//Number of steps on WizardDialog:
setMaxStep(6);
@@ -143,29 +180,38 @@ protected void leaveStep(int OldStep, int NewStep){}
myConfig.cp_PrivateLetter.cp_Norm = oL;
initializeTemplates(xMSF);
- if (myConfig.cp_BusinessLetter.cp_Greeting.equals("")){
+ if (myConfig.cp_BusinessLetter.cp_Greeting.equals(""))
+ {
myConfig.cp_BusinessLetter.cp_Greeting = resources.GreetingLabels[0];
}
- if (myConfig.cp_BusinessLetter.cp_Salutation.equals("")){
+ if (myConfig.cp_BusinessLetter.cp_Salutation.equals(""))
+ {
myConfig.cp_BusinessLetter.cp_Salutation = resources.SalutationLabels[0];
}
- if (myConfig.cp_PrivateOfficialLetter.cp_Greeting.equals("")){
+ if (myConfig.cp_PrivateOfficialLetter.cp_Greeting.equals(""))
+ {
myConfig.cp_PrivateOfficialLetter.cp_Greeting = resources.GreetingLabels[1];
}
- if (myConfig.cp_PrivateOfficialLetter.cp_Salutation.equals("")){
+ if (myConfig.cp_PrivateOfficialLetter.cp_Salutation.equals(""))
+ {
myConfig.cp_PrivateOfficialLetter.cp_Salutation = resources.SalutationLabels[1];
}
- if (myConfig.cp_PrivateLetter.cp_Greeting.equals("")){
+ if (myConfig.cp_PrivateLetter.cp_Greeting.equals(""))
+ {
myConfig.cp_PrivateLetter.cp_Greeting = resources.GreetingLabels[2];
}
- if (myConfig.cp_PrivateLetter.cp_Salutation.equals("")){
+ if (myConfig.cp_PrivateLetter.cp_Salutation.equals(""))
+ {
myConfig.cp_PrivateLetter.cp_Salutation = resources.SalutationLabels[2];
}
//update the dialog UI according to the loaded Configuration
updateUI();
- if(myPathSelection.xSaveTextBox.getText().equalsIgnoreCase("")) {myPathSelection.initializePath();}
+ if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(""))
+ {
+ myPathSelection.initializePath();
+ }
XWindow xContainerWindow = myLetterDoc.xFrame.getContainerWindow();
XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow);
@@ -191,27 +237,32 @@ protected void leaveStep(int OldStep, int NewStep){}
closeDocument();
running = false;
- } catch (Exception exception) {
+ }
+ catch (Exception exception)
+ {
removeTerminateListener();
exception.printStackTrace(System.out);
- running=false;
+ running = false;
return;
}
}
-
- public void cancelWizard() {
+ public void cancelWizard()
+ {
xDialog.endExecute();
running = false;
}
- public void finishWizard() {
- switchToStep(getCurrentStep(),getMaxStep());
- try {
+ public void finishWizard()
+ {
+ switchToStep(getCurrentStep(), getMaxStep());
+ try
+ {
//myLetterDoc.xTextDocument.lockControllers();
FileAccess fileAccess = new FileAccess(xMSF);
sPath = myPathSelection.getSelectedPath();
- if (sPath.equals("")) {
+ if (sPath.equals(""))
+ {
myPathSelection.triggerPathPicker();
sPath = myPathSelection.getSelectedPath();
}
@@ -221,27 +272,36 @@ protected void leaveStep(int OldStep, int NewStep){}
//it is coming from a saved session, check if the
// file exists and warn the user.
if (!filenameChanged)
- if (fileAccess.exists(sPath, true)) {
+ {
+ if (fileAccess.exists(sPath, true))
+ {
int answer = SystemDialog.showMessageBox(xMSF, xControl.getPeer(), "MessBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, resources.resOverwriteWarning);
if (answer == 3) // user said: no, do not overwrite....
+ {
return;
+ }
}
+ }
myLetterDoc.setWizardTemplateDocInfo(resources.resLetterWizardDialog_title, resources.resTemplateDescription);
myLetterDoc.killEmptyUserFields();
myLetterDoc.keepLogoFrame = (chkUseLogo.getState() != 0);
- if ((chkBusinessPaper.getState() != 0) && (chkPaperCompanyLogo.getState() !=0)) {
+ if ((chkBusinessPaper.getState() != 0) && (chkPaperCompanyLogo.getState() != 0))
+ {
myLetterDoc.keepLogoFrame = false;
}
myLetterDoc.keepBendMarksFrame = (chkUseBendMarks.getState() != 0);
myLetterDoc.keepLetterSignsFrame = (chkUseSigns.getState() != 0);
myLetterDoc.keepSenderAddressRepeatedFrame = (chkUseAddressReceiver.getState() != 0);
- if (optBusinessLetter.getState()) {
- if ((chkBusinessPaper.getState() != 0) && (chkCompanyReceiver.getState() !=0)) {
+ if (optBusinessLetter.getState())
+ {
+ if ((chkBusinessPaper.getState() != 0) && (chkCompanyReceiver.getState() != 0))
+ {
myLetterDoc.keepSenderAddressRepeatedFrame = false;
}
- if ((chkBusinessPaper.getState() != 0) && (chkPaperCompanyAddress.getState() !=0)) {
+ if ((chkBusinessPaper.getState() != 0) && (chkPaperCompanyAddress.getState() != 0))
+ {
myLetterDoc.keepAddressFrame = false;
}
}
@@ -251,7 +311,8 @@ protected void leaveStep(int OldStep, int NewStep){}
bSaveSuccess = OfficeDocument.store(xMSF, xTextDocument, sPath, "writer8_template", false, "Template could not be saved to " + sPath);
- if (bSaveSuccess) {
+ if (bSaveSuccess)
+ {
saveConfiguration();
XInteractionHandler xIH = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler"));
PropertyValue loadValues[] = new PropertyValue[4];
@@ -259,17 +320,20 @@ protected void leaveStep(int OldStep, int NewStep){}
loadValues[0].Name = "AsTemplate";
loadValues[1] = new PropertyValue();
loadValues[1].Name = "MacroExecutionMode";
- loadValues[1].Value = new Short (MacroExecMode.ALWAYS_EXECUTE);
+ loadValues[1].Value = new Short(MacroExecMode.ALWAYS_EXECUTE);
loadValues[2] = new PropertyValue();
loadValues[2].Name = "UpdateDocMode";
- loadValues[2].Value = new Short (com.sun.star.document.UpdateDocMode.FULL_UPDATE);
+ loadValues[2].Value = new Short(com.sun.star.document.UpdateDocMode.FULL_UPDATE);
loadValues[3] = new PropertyValue();
loadValues[3].Name = "InteractionHandler";
loadValues[3].Value = xIH;
- if (bEditTemplate) {
+ if (bEditTemplate)
+ {
loadValues[0].Value = Boolean.FALSE;
- } else {
+ }
+ else
+ {
loadValues[0].Value = Boolean.TRUE;
}
Object oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), sPath, "_default", loadValues);
@@ -277,31 +341,41 @@ protected void leaveStep(int OldStep, int NewStep){}
XMultiServiceFactory xDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
ViewHandler myViewHandler = new ViewHandler(xDocMSF, xTextDocument);
myViewHandler.setViewSetting("ZoomType", new Short(com.sun.star.view.DocumentZoomType.OPTIMAL));
- } else {
+ }
+ else
+ {
//TODO: Error Handling
}
- } catch (Exception e) {
+ }
+ catch (Exception e)
+ {
e.printStackTrace();
}
- finally {
+ finally
+ {
xDialog.endExecute();
running = false;
}
}
- public void closeDocument() {
- try {
+ public void closeDocument()
+ {
+ try
+ {
//xComponent.dispose();
XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, myLetterDoc.xFrame);
xCloseable.close(false);
- } catch (CloseVetoException e) {
+ }
+ catch (CloseVetoException e)
+ {
e.printStackTrace();
}
}
- public void optBusinessLetterItemChanged() {
- DataAware.setDataObject(letterDA,myConfig.cp_BusinessLetter,true);
+ public void optBusinessLetterItemChanged()
+ {
+ DataAware.setDataObject(letterDA, myConfig.cp_BusinessLetter, true);
setControlProperty("lblBusinessStyle", "Enabled", Boolean.TRUE);
setControlProperty("lstBusinessStyle", "Enabled", Boolean.TRUE);
setControlProperty("chkBusinessPaper", "Enabled", Boolean.TRUE);
@@ -312,11 +386,15 @@ protected void leaveStep(int OldStep, int NewStep){}
lstBusinessStyleItemChanged();
enableSenderReceiver();
setPossibleFooter(true);
- if(myPathSelection.xSaveTextBox.getText().equalsIgnoreCase("")) {myPathSelection.initializePath();}
+ if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(""))
+ {
+ myPathSelection.initializePath();
+ }
}
- public void optPrivOfficialLetterItemChanged() {
- DataAware.setDataObject(letterDA,myConfig.cp_PrivateOfficialLetter,true);
+ public void optPrivOfficialLetterItemChanged()
+ {
+ DataAware.setDataObject(letterDA, myConfig.cp_PrivateOfficialLetter, true);
setControlProperty("lblBusinessStyle", "Enabled", Boolean.FALSE);
setControlProperty("lstBusinessStyle", "Enabled", Boolean.FALSE);
setControlProperty("chkBusinessPaper", "Enabled", Boolean.FALSE);
@@ -328,11 +406,15 @@ protected void leaveStep(int OldStep, int NewStep){}
disableBusinessPaper();
enableSenderReceiver();
setPossibleFooter(true);
- if(myPathSelection.xSaveTextBox.getText().equalsIgnoreCase("")) {myPathSelection.initializePath();}
+ if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(""))
+ {
+ myPathSelection.initializePath();
+ }
}
- public void optPrivateLetterItemChanged() {
- DataAware.setDataObject(letterDA,myConfig.cp_PrivateLetter,true);
+ public void optPrivateLetterItemChanged()
+ {
+ DataAware.setDataObject(letterDA, myConfig.cp_PrivateLetter, true);
setControlProperty("lblBusinessStyle", "Enabled", Boolean.FALSE);
setControlProperty("lstBusinessStyle", "Enabled", Boolean.FALSE);
setControlProperty("chkBusinessPaper", "Enabled", Boolean.FALSE);
@@ -344,10 +426,14 @@ protected void leaveStep(int OldStep, int NewStep){}
disableBusinessPaper();
disableSenderReceiver();
setPossibleFooter(false);
- if(myPathSelection.xSaveTextBox.getText().equalsIgnoreCase("")) {myPathSelection.initializePath();}
+ if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(""))
+ {
+ myPathSelection.initializePath();
+ }
}
- public void optSenderPlaceholderItemChanged() {
+ public void optSenderPlaceholderItemChanged()
+ {
setControlProperty("lblSenderName", "Enabled", Boolean.FALSE);
setControlProperty("lblSenderStreet", "Enabled", Boolean.FALSE);
setControlProperty("lblPostCodeCity", "Enabled", Boolean.FALSE);
@@ -359,7 +445,8 @@ protected void leaveStep(int OldStep, int NewStep){}
myLetterDoc.fillSenderWithUserData();
}
- public void optSenderDefineItemChanged() {
+ public void optSenderDefineItemChanged()
+ {
setControlProperty("lblSenderName", "Enabled", Boolean.TRUE);
setControlProperty("lblSenderStreet", "Enabled", Boolean.TRUE);
setControlProperty("lblPostCodeCity", "Enabled", Boolean.TRUE);
@@ -375,24 +462,29 @@ protected void leaveStep(int OldStep, int NewStep){}
txtSenderCityTextChanged();
}
- public void optCreateLetterItemChanged() {
+ public void optCreateLetterItemChanged()
+ {
bEditTemplate = false;
}
- public void optMakeChangesItemChanged() {
+ public void optMakeChangesItemChanged()
+ {
bEditTemplate = true;
}
- public void optReceiverPlaceholderItemChanged() {
+ public void optReceiverPlaceholderItemChanged()
+ {
OfficeDocument.attachEventCall(xTextDocument, "OnNew", "StarBasic", "macro:///Template.Correspondence.Placeholder()");
}
- public void optReceiverDatabaseItemChanged() {
+ public void optReceiverDatabaseItemChanged()
+ {
OfficeDocument.attachEventCall(xTextDocument, "OnNew", "StarBasic", "macro:///Template.Correspondence.Database()");
}
- public void lstBusinessStyleItemChanged() {
- xTextDocument = myLetterDoc.loadAsPreview(BusinessFiles[1][lstBusinessStyle.getSelectedItemPos()], false );
+ public void lstBusinessStyleItemChanged()
+ {
+ xTextDocument = myLetterDoc.loadAsPreview(BusinessFiles[1][lstBusinessStyle.getSelectedItemPos()], false);
myLetterDoc.xTextDocument.lockControllers();
initializeElements();
chkBusinessPaperItemChanged();
@@ -401,8 +493,9 @@ protected void leaveStep(int OldStep, int NewStep){}
activate();
}
- public void lstPrivOfficialStyleItemChanged() {
- xTextDocument = myLetterDoc.loadAsPreview(OfficialFiles[1][lstPrivOfficialStyle.getSelectedItemPos()] , false );
+ public void lstPrivOfficialStyleItemChanged()
+ {
+ xTextDocument = myLetterDoc.loadAsPreview(OfficialFiles[1][lstPrivOfficialStyle.getSelectedItemPos()], false);
myLetterDoc.xTextDocument.lockControllers();
initializeElements();
setPossibleSenderData(true);
@@ -411,8 +504,9 @@ protected void leaveStep(int OldStep, int NewStep){}
activate();
}
- public void lstPrivateStyleItemChanged() {
- xTextDocument = myLetterDoc.loadAsPreview(PrivateFiles[1][lstPrivateStyle.getSelectedItemPos()] , false );
+ public void lstPrivateStyleItemChanged()
+ {
+ xTextDocument = myLetterDoc.loadAsPreview(PrivateFiles[1][lstPrivateStyle.getSelectedItemPos()], false);
myLetterDoc.xTextDocument.lockControllers();
initializeElements();
setElements(true);
@@ -420,59 +514,72 @@ protected void leaveStep(int OldStep, int NewStep){}
activate();
}
- public void numLogoHeightTextChanged() {
+ public void numLogoHeightTextChanged()
+ {
BusCompanyLogo.iHeight = (int) (numLogoHeight.getValue() * 1000);
BusCompanyLogo.setFramePosition();
}
- public void numLogoWidthTextChanged() {
+ public void numLogoWidthTextChanged()
+ {
BusCompanyLogo.iWidth = (int) (numLogoWidth.getValue() * 1000);
BusCompanyLogo.setFramePosition();
}
- public void numLogoXTextChanged() {
+ public void numLogoXTextChanged()
+ {
BusCompanyLogo.iXPos = (int) (numLogoX.getValue() * 1000);
BusCompanyLogo.setFramePosition();
}
- public void numLogoYTextChanged() {
+ public void numLogoYTextChanged()
+ {
BusCompanyLogo.iYPos = (int) (numLogoY.getValue() * 1000);
BusCompanyLogo.setFramePosition();
}
- public void numAddressWidthTextChanged() {
+ public void numAddressWidthTextChanged()
+ {
BusCompanyAddress.iWidth = (int) (numAddressWidth.getValue() * 1000);
BusCompanyAddress.setFramePosition();
}
- public void numAddressXTextChanged() {
+ public void numAddressXTextChanged()
+ {
BusCompanyAddress.iXPos = (int) (numAddressX.getValue() * 1000);
BusCompanyAddress.setFramePosition();
}
- public void numAddressYTextChanged() {
+ public void numAddressYTextChanged()
+ {
BusCompanyAddress.iYPos = (int) (numAddressY.getValue() * 1000);
BusCompanyAddress.setFramePosition();
}
- public void numAddressHeightTextChanged() {
+ public void numAddressHeightTextChanged()
+ {
BusCompanyAddress.iHeight = (int) (numAddressHeight.getValue() * 1000);
BusCompanyAddress.setFramePosition();
}
- public void numFooterHeightTextChanged() {
+ public void numFooterHeightTextChanged()
+ {
BusFooter.iHeight = (int) (numFooterHeight.getValue() * 1000);
BusFooter.iYPos = myLetterDoc.DocSize.Height - BusFooter.iHeight;
BusFooter.setFramePosition();
}
- public void chkPaperCompanyLogoItemChanged() {
- if (chkPaperCompanyLogo.getState() != 0) {
+ public void chkPaperCompanyLogoItemChanged()
+ {
+ if (chkPaperCompanyLogo.getState() != 0)
+ {
//minimal value is required, otherwise the frame creation fails
- if (numLogoWidth.getValue() == 0) {
+ if (numLogoWidth.getValue() == 0)
+ {
numLogoWidth.setValue(0.1);
}
- if (numLogoHeight.getValue() == 0) {
+ if (numLogoHeight.getValue() == 0)
+ {
numLogoHeight.setValue(0.1);
}
BusCompanyLogo = myLetterDoc.new BusinessPaperObject("Company Logo", (int) (numLogoWidth.getValue() * 1000), (int) (numLogoHeight.getValue() * 1000), (int) (numLogoX.getValue() * 1000), (int) (numLogoY.getValue() * 1000));
@@ -485,8 +592,11 @@ protected void leaveStep(int OldStep, int NewStep){}
setControlProperty("numLogoY", "Enabled", Boolean.TRUE);
setControlProperty("lblCompanyLogoY", "Enabled", Boolean.TRUE);
setPossibleLogo(false);
- } else {
- if (BusCompanyLogo != null) {
+ }
+ else
+ {
+ if (BusCompanyLogo != null)
+ {
BusCompanyLogo.removeFrame();
}
setControlProperty("numLogoHeight", "Enabled", Boolean.FALSE);
@@ -501,13 +611,17 @@ protected void leaveStep(int OldStep, int NewStep){}
}
}
- public void chkPaperCompanyAddressItemChanged() {
- if (chkPaperCompanyAddress.getState() != 0) {
+ public void chkPaperCompanyAddressItemChanged()
+ {
+ if (chkPaperCompanyAddress.getState() != 0)
+ {
// minimal value is required, otherwise the frame creation fails
- if (numAddressWidth.getValue() == 0) {
+ if (numAddressWidth.getValue() == 0)
+ {
numAddressWidth.setValue(0.1);
}
- if (numAddressHeight.getValue() == 0) {
+ if (numAddressHeight.getValue() == 0)
+ {
numAddressHeight.setValue(0.1);
}
BusCompanyAddress = myLetterDoc.new BusinessPaperObject("Company Address", (int) (numAddressWidth.getValue() * 1000), (int) (numAddressHeight.getValue() * 1000), (int) (numAddressX.getValue() * 1000), (int) (numAddressY.getValue() * 1000));
@@ -519,14 +633,19 @@ protected void leaveStep(int OldStep, int NewStep){}
setControlProperty("lblCompanyAddressX", "Enabled", Boolean.TRUE);
setControlProperty("numAddressY", "Enabled", Boolean.TRUE);
setControlProperty("lblCompanyAddressY", "Enabled", Boolean.TRUE);
- if (myLetterDoc.hasElement("Sender Address")) {
+ if (myLetterDoc.hasElement("Sender Address"))
+ {
myLetterDoc.switchElement("Sender Address", (false));
}
- if (chkCompanyReceiver.getState() != 0) {
+ if (chkCompanyReceiver.getState() != 0)
+ {
setPossibleSenderData(false);
}
- } else {
- if (BusCompanyAddress != null) {
+ }
+ else
+ {
+ if (BusCompanyAddress != null)
+ {
BusCompanyAddress.removeFrame();
}
setControlProperty("numAddressHeight", "Enabled", Boolean.FALSE);
@@ -537,20 +656,30 @@ protected void leaveStep(int OldStep, int NewStep){}
setControlProperty("lblCompanyAddressX", "Enabled", Boolean.FALSE);
setControlProperty("numAddressY", "Enabled", Boolean.FALSE);
setControlProperty("lblCompanyAddressY", "Enabled", Boolean.FALSE);
- if (myLetterDoc.hasElement("Sender Address")) {
+ if (myLetterDoc.hasElement("Sender Address"))
+ {
myLetterDoc.switchElement("Sender Address", (true));
}
setPossibleSenderData(true);
- if (optSenderDefine.getState()) {optSenderDefineItemChanged();}
- if (optSenderPlaceholder.getState()) {optSenderPlaceholderItemChanged();}
+ if (optSenderDefine.getState())
+ {
+ optSenderDefineItemChanged();
+ }
+ if (optSenderPlaceholder.getState())
+ {
+ optSenderPlaceholderItemChanged();
+ }
}
}
- public void chkCompanyReceiverItemChanged() {
+ public void chkCompanyReceiverItemChanged()
+ {
XTextFrame xReceiverFrame = null;
- if (chkCompanyReceiver.getState() != 0) {
- try {
+ if (chkCompanyReceiver.getState() != 0)
+ {
+ try
+ {
xReceiverFrame = TextFrameHandler.getFrameByName("Receiver Address", xTextDocument);
Integer FrameWidth = (Integer) Helper.getUnoPropertyValue(xReceiverFrame, "Width");
int iFrameWidth = FrameWidth.intValue();
@@ -564,39 +693,59 @@ protected void leaveStep(int OldStep, int NewStep){}
BusCompanyAddressReceiver = myLetterDoc.new BusinessPaperObject(" ", iFrameWidth, iReceiverHeight, iFrameX, (iFrameY - iReceiverHeight));
setPossibleAddressReceiver(false);
- } catch (NoSuchElementException e) {
+ }
+ catch (NoSuchElementException e)
+ {
// TODO Error Message: Template modified!
e.printStackTrace();
- } catch (WrappedTargetException e) {
+ }
+ catch (WrappedTargetException e)
+ {
e.printStackTrace();
}
- if (chkPaperCompanyAddress.getState() != 0) {
+ if (chkPaperCompanyAddress.getState() != 0)
+ {
setPossibleSenderData(false);
}
- } else {
- if (BusCompanyAddressReceiver != null) {
+ }
+ else
+ {
+ if (BusCompanyAddressReceiver != null)
+ {
BusCompanyAddressReceiver.removeFrame();
}
setPossibleAddressReceiver(true);
setPossibleSenderData(true);
- if (optSenderDefine.getState()) {optSenderDefineItemChanged();}
- if (optSenderPlaceholder.getState()) {optSenderPlaceholderItemChanged();}
+ if (optSenderDefine.getState())
+ {
+ optSenderDefineItemChanged();
+ }
+ if (optSenderPlaceholder.getState())
+ {
+ optSenderPlaceholderItemChanged();
+ }
}
}
- public void chkPaperFooterItemChanged() {
+ public void chkPaperFooterItemChanged()
+ {
- if (chkPaperFooter.getState() != 0) {
+ if (chkPaperFooter.getState() != 0)
+ {
//minimal value is required, otherwise the frame creation fails
- if (numFooterHeight.getValue() == 0) {
+ if (numFooterHeight.getValue() == 0)
+ {
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)));
this.setControlProperty("numFooterHeight", "Enabled", Boolean.TRUE);
this.setControlProperty("lblFooterHeight", "Enabled", Boolean.TRUE);
setPossibleFooter(false);
- } else {
- if (BusFooter != null) {
+ }
+ else
+ {
+ if (BusFooter != null)
+ {
BusFooter.removeFrame();
}
setControlProperty("numFooterHeight", "Enabled", Boolean.FALSE);
@@ -606,54 +755,75 @@ protected void leaveStep(int OldStep, int NewStep){}
}
//switch Elements on/off -------------------------------------------------------
- public void chkUseLogoItemChanged() {
- try {
- if (myLetterDoc.hasElement("Company Logo")) {
+ public void chkUseLogoItemChanged()
+ {
+ try
+ {
+ if (myLetterDoc.hasElement("Company Logo"))
+ {
boolean logostatus = AnyConverter.toBoolean(getControlProperty("chkUseLogo", "Enabled")) && (chkUseLogo.getState() != 0);
myLetterDoc.switchElement("Company Logo", logostatus);
}
- } catch (IllegalArgumentException e) {
+ }
+ catch (IllegalArgumentException e)
+ {
e.printStackTrace();
}
}
- public void chkUseAddressReceiverItemChanged() {
- try {
- if (myLetterDoc.hasElement("Sender Address Repeated")) {
+ public void chkUseAddressReceiverItemChanged()
+ {
+ try
+ {
+ if (myLetterDoc.hasElement("Sender Address Repeated"))
+ {
boolean rstatus = AnyConverter.toBoolean(getControlProperty("chkUseAddressReceiver", "Enabled")) && (chkUseAddressReceiver.getState() != 0);
myLetterDoc.switchElement("Sender Address Repeated", rstatus);
}
- } catch (IllegalArgumentException e) {
+ }
+ catch (IllegalArgumentException e)
+ {
e.printStackTrace();
}
}
- public void chkUseSignsItemChanged() {
- if (myLetterDoc.hasElement("Letter Signs")) {
+ public void chkUseSignsItemChanged()
+ {
+ if (myLetterDoc.hasElement("Letter Signs"))
+ {
myLetterDoc.switchElement("Letter Signs", (chkUseSigns.getState() != 0));
}
}
- public void chkUseSubjectItemChanged() {
- if (myLetterDoc.hasElement("Subject Line")) {
+ public void chkUseSubjectItemChanged()
+ {
+ if (myLetterDoc.hasElement("Subject Line"))
+ {
myLetterDoc.switchElement("Subject Line", (chkUseSubject.getState() != 0));
}
}
- public void chkUseBendMarksItemChanged() {
- if (myLetterDoc.hasElement("Bend Marks")) {
+ public void chkUseBendMarksItemChanged()
+ {
+ if (myLetterDoc.hasElement("Bend Marks"))
+ {
myLetterDoc.switchElement("Bend Marks", (chkUseBendMarks.getState() != 0));
}
}
- public void chkUseFooterItemChanged() {
- try {
+ public void chkUseFooterItemChanged()
+ {
+ try
+ {
boolean bFooterPossible = (chkUseFooter.getState() != 0) && AnyConverter.toBoolean(getControlProperty("chkUseFooter", "Enabled"));
- if (chkFooterNextPages.getState() != 0) {
- myLetterDoc.switchFooter("First Page", false, (chkFooterPageNumbers.getState() != 0),txtFooter.getText());
+ if (chkFooterNextPages.getState() != 0)
+ {
+ myLetterDoc.switchFooter("First Page", false, (chkFooterPageNumbers.getState() != 0), txtFooter.getText());
myLetterDoc.switchFooter("Standard", bFooterPossible, (chkFooterPageNumbers.getState() != 0), txtFooter.getText());
- } else {
+ }
+ else
+ {
myLetterDoc.switchFooter("First Page", bFooterPossible, (chkFooterPageNumbers.getState() != 0), txtFooter.getText());
myLetterDoc.switchFooter("Standard", bFooterPossible, (chkFooterPageNumbers.getState() != 0), txtFooter.getText());
}
@@ -662,145 +832,175 @@ protected void leaveStep(int OldStep, int NewStep){}
XInterface BPaperItem = getRoadmapItemByID(RM_FOOTER);
Helper.setUnoPropertyValue(BPaperItem, "Enabled", new Boolean(bFooterPossible));
- } catch (Exception exception) {
+ }
+ catch (Exception exception)
+ {
exception.printStackTrace(System.out);
}
}
-
-
- public void chkFooterNextPagesItemChanged() {
+ public void chkFooterNextPagesItemChanged()
+ {
chkUseFooterItemChanged();
}
- public void chkFooterPageNumbersItemChanged() {
+ public void chkFooterPageNumbersItemChanged()
+ {
chkUseFooterItemChanged();
}
- private void setPossibleFooter(boolean bState) {
+ private void setPossibleFooter(boolean bState)
+ {
setControlProperty("chkUseFooter", "Enabled", new Boolean(bState));
chkUseFooterItemChanged();
}
- private void setPossibleAddressReceiver(boolean bState) {
- if (myLetterDoc.hasElement("Sender Address Repeated")) {
+ private void setPossibleAddressReceiver(boolean bState)
+ {
+ if (myLetterDoc.hasElement("Sender Address Repeated"))
+ {
setControlProperty("chkUseAddressReceiver", "Enabled", new Boolean(bState));
chkUseAddressReceiverItemChanged();
}
}
- private void setPossibleLogo(boolean bState) {
- if (myLetterDoc.hasElement("Company Logo")) {
+ private void setPossibleLogo(boolean bState)
+ {
+ if (myLetterDoc.hasElement("Company Logo"))
+ {
setControlProperty("chkUseLogo", "Enabled", new Boolean(bState));
chkUseLogoItemChanged();
}
}
- public void txtFooterTextChanged() {
+ public void txtFooterTextChanged()
+ {
chkUseFooterItemChanged();
}
- public void txtSenderNameTextChanged() {
+ public void txtSenderNameTextChanged()
+ {
TextFieldHandler myFieldHandler = new TextFieldHandler(myLetterDoc.xMSF, xTextDocument);
myFieldHandler.changeUserFieldContent("Company", txtSenderName.getText());
}
- public void txtSenderStreetTextChanged() {
+ public void txtSenderStreetTextChanged()
+ {
TextFieldHandler myFieldHandler = new TextFieldHandler(myLetterDoc.xMSF, xTextDocument);
myFieldHandler.changeUserFieldContent("Street", txtSenderStreet.getText());
}
- public void txtSenderCityTextChanged() {
+ public void txtSenderCityTextChanged()
+ {
TextFieldHandler myFieldHandler = new TextFieldHandler(myLetterDoc.xMSF, xTextDocument);
myFieldHandler.changeUserFieldContent("City", txtSenderCity.getText());
}
- public void txtSenderPostCodeTextChanged() {
+ public void txtSenderPostCodeTextChanged()
+ {
TextFieldHandler myFieldHandler = new TextFieldHandler(myLetterDoc.xMSF, xTextDocument);
myFieldHandler.changeUserFieldContent("PostCode", txtSenderPostCode.getText());
}
- public void txtSenderStateTextChanged() {
+ public void txtSenderStateTextChanged()
+ {
TextFieldHandler myFieldHandler = new TextFieldHandler(myLetterDoc.xMSF, xTextDocument);
myFieldHandler.changeUserFieldContent("State", txtSenderState.getText());
}
- public void txtTemplateNameTextChanged() {
+ public void txtTemplateNameTextChanged()
+ {
XDocumentInfoSupplier xDocInfoSuppl = (XDocumentInfoSupplier) UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xTextDocument);
XDocumentInfo xDocInfo = xDocInfoSuppl.getDocumentInfo();
String TitleName = txtTemplateName.getText();
Helper.setUnoPropertyValue(xDocInfo, "Title", TitleName);
}
-
-
- public void chkUseSalutationItemChanged() {
+ public void chkUseSalutationItemChanged()
+ {
XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
myLetterDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0));
setControlProperty("lstSalutation", "Enabled", new Boolean(chkUseSalutation.getState() != 0));
}
- public void lstSalutationItemChanged() {
+ public void lstSalutationItemChanged()
+ {
XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
myLetterDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0));
}
- public void lstSalutationTextChanged() {
+ public void lstSalutationTextChanged()
+ {
}
- public void chkUseGreetingItemChanged() {
+ public void chkUseGreetingItemChanged()
+ {
XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
myLetterDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0));
setControlProperty("lstGreeting", "Enabled", new Boolean(chkUseGreeting.getState() != 0));
}
- private void setDefaultForGreetingAndSalutation() {
+ private void setDefaultForGreetingAndSalutation()
+ {
XTextComponent xTextComponent;
xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
- if (xTextComponent.getText().equals("")) {
+ if (xTextComponent.getText().equals(""))
+ {
xTextComponent.setText(resources.SalutationLabels[0]);
}
xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
- if (xTextComponent.getText().equals("")) {
+ if (xTextComponent.getText().equals(""))
+ {
xTextComponent.setText(resources.GreetingLabels[0]);
}
}
- public void lstGreetingItemChanged() {
+ public void lstGreetingItemChanged()
+ {
XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
myLetterDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0));
}
- public void lstGreetingTextChanged() {
+ public void lstGreetingTextChanged()
+ {
}
// ----------------------------------------------------------------------------
-
- public void chkBusinessPaperItemChanged() {
+ public void chkBusinessPaperItemChanged()
+ {
//enable/disable Roadmap Entry Business Paper
- if (chkBusinessPaper.getState() != 0) {
+ if (chkBusinessPaper.getState() != 0)
+ {
enableBusinessPaper();
- } else {
+ }
+ else
+ {
disableBusinessPaper();
setPossibleSenderData(true);
}
}
- private int getOfficeLinguistic() {
+ private int getOfficeLinguistic()
+ {
int oL = 0;
boolean found = false;
String OfficeLinguistic = Configuration.getOfficeLinguistic(xMSF);
- for (int i = 0; i < Norms.length; i++){
- if (Norms[i].equalsIgnoreCase(OfficeLinguistic)) {
+ for (int i = 0; i < Norms.length; i++)
+ {
+ if (Norms[i].equalsIgnoreCase(OfficeLinguistic))
+ {
oL = i;
found = true;
break;
}
}
- if (!found) {
+ if (!found)
+ {
//fall back to English:
- for (int i = 0; i < Norms.length; i++){
- if (Norms[i].equalsIgnoreCase("en-US")) {
+ for (int i = 0; i < Norms.length; i++)
+ {
+ if (Norms[i].equalsIgnoreCase("en-US"))
+ {
oL = i;
found = true;
break;
@@ -810,11 +1010,13 @@ protected void leaveStep(int OldStep, int NewStep){}
return oL;
}
- private void setPossibleSenderData(boolean bState) {
+ private void setPossibleSenderData(boolean bState)
+ {
setControlProperty("optSenderDefine", "Enabled", new Boolean(bState));
setControlProperty("optSenderPlaceholder", "Enabled", new Boolean(bState));
setControlProperty("lblSenderAddress", "Enabled", new Boolean(bState));
- if ( !bState) {
+ if (!bState)
+ {
setControlProperty("txtSenderCity", "Enabled", new Boolean(bState));
setControlProperty("txtSenderName", "Enabled", new Boolean(bState));
setControlProperty("txtSenderPostCode", "Enabled", new Boolean(bState));
@@ -827,17 +1029,20 @@ protected void leaveStep(int OldStep, int NewStep){}
}
}
- private void enableSenderReceiver() {
+ private void enableSenderReceiver()
+ {
XInterface BPaperItem = getRoadmapItemByID(RM_SENDERRECEIVER);
Helper.setUnoPropertyValue(BPaperItem, "Enabled", Boolean.TRUE);
}
- private void disableSenderReceiver() {
+ private void disableSenderReceiver()
+ {
XInterface BPaperItem = getRoadmapItemByID(RM_SENDERRECEIVER);
Helper.setUnoPropertyValue(BPaperItem, "Enabled", Boolean.FALSE);
}
- private void enableBusinessPaper() {
+ private void enableBusinessPaper()
+ {
XInterface BPaperItem = getRoadmapItemByID(RM_BUSINESSPAPER);
Helper.setUnoPropertyValue(BPaperItem, "Enabled", Boolean.TRUE);
chkPaperCompanyLogoItemChanged();
@@ -846,70 +1051,97 @@ protected void leaveStep(int OldStep, int NewStep){}
chkCompanyReceiverItemChanged();
}
- private void disableBusinessPaper() {
+ private void disableBusinessPaper()
+ {
XInterface BPaperItem = getRoadmapItemByID(RM_BUSINESSPAPER);
Helper.setUnoPropertyValue(BPaperItem, "Enabled", Boolean.FALSE);
- if (BusCompanyLogo != null) {
+ if (BusCompanyLogo != null)
+ {
BusCompanyLogo.removeFrame();
}
- if (BusCompanyAddress != null) {
+ if (BusCompanyAddress != null)
+ {
BusCompanyAddress.removeFrame();
}
- if (BusFooter != null) {
+ if (BusFooter != null)
+ {
BusFooter.removeFrame();
}
- if (BusCompanyAddressReceiver != null) {
+ if (BusCompanyAddressReceiver != null)
+ {
BusCompanyAddressReceiver.removeFrame();
}
setPossibleAddressReceiver(true);
setPossibleFooter(true);
setPossibleLogo(true);
- if (myLetterDoc.hasElement("Sender Address")) {
+ if (myLetterDoc.hasElement("Sender Address"))
+ {
myLetterDoc.switchElement("Sender Address", (true));
}
}
- public void lstLetterNormItemChanged() {
+ public void lstLetterNormItemChanged()
+ {
//when the norm changes, the correct template needs to be reloaded
sCurrentNorm = Norms[getCurrentLetter().cp_Norm];
initializeTemplates(xMSF);
- if (optBusinessLetter.getState()) {
+ if (optBusinessLetter.getState())
+ {
lstBusinessStyleItemChanged();
}
- if (optPrivOfficialLetter.getState()) {
+ if (optPrivOfficialLetter.getState())
+ {
lstPrivOfficialStyleItemChanged();
}
- if (optPrivateLetter.getState()) {
+ if (optPrivateLetter.getState())
+ {
lstPrivateStyleItemChanged();
}
}
- public void initializeSalutation() {
+ public void initializeSalutation()
+ {
setControlProperty("lstSalutation", "StringItemList", resources.SalutationLabels);
}
- public void initializeGreeting() {
+ public void initializeGreeting()
+ {
setControlProperty("lstGreeting", "StringItemList", resources.GreetingLabels);
}
- public void initializeNorms() {
+ public void initializeNorms()
+ {
LocaleCodes lc = new LocaleCodes(xmsf);
- String [] allLocales = lc.getIDs();
- Object [] nameList = {"",""};
- String [] nameList1 = {"",""};
- String [] nameList1b = {"",""};
- String [] nameList2 = {"",""};
- Vector allPaths = new Vector();
+ String[] allLocales = lc.getIDs();
+ Object[] nameList =
+ {
+ "", ""
+ };
+ String[] nameList1 =
+ {
+ "", ""
+ };
+ String[] nameList1b =
+ {
+ "", ""
+ };
+ String[] nameList2 =
+ {
+ "", ""
+ };
+ Vector allPaths = new Vector();
String sLetterSubPath = "/wizard/letter/";
- try {
+ try
+ {
sTemplatePath = FileAccess.deleteLastSlashfromUrl(sTemplatePath);
- String [] PathParts = sTemplatePath.split("/");
- String nuString ="";
- String sMainPath;
- for (int i=0; i<(PathParts.length -1); i++) {
+ String[] PathParts = sTemplatePath.split("/");
+ String nuString = "";
+ String sMainPath;
+ for (int i = 0; i < (PathParts.length - 1); i++)
+ {
nuString = nuString + PathParts[i] + "/";
}
String sLocLetterPath;
@@ -923,155 +1155,195 @@ protected void leaveStep(int OldStep, int NewStep){}
com.sun.star.ucb.XSimpleFileAccess xSimpleFileAccess = (com.sun.star.ucb.XSimpleFileAccess) UnoRuntime.queryInterface(com.sun.star.ucb.XSimpleFileAccess.class, xInterface);
nameList1 = xSimpleFileAccess.getFolderContents(sMainPath, true);
nameList2 = xSimpleFileAccess.getFolderContents(sLetterPath, true);
- for (int i=0;i<nameList1.length;i++) {
- String theFileName = FileAccess.getFilename(nameList1[i]);
- if (!theFileName.equalsIgnoreCase("wizard")) {
+ for (int i = 0; i < nameList1.length; i++)
+ {
+ String theFileName = FileAccess.getFilename(nameList1[i]);
+ if (!theFileName.equalsIgnoreCase("wizard"))
+ {
sLocLetterPath = FileAccess.deleteLastSlashfromUrl(nameList1[i] + sLetterSubPath);
- try{
+ try
+ {
nameList1b = xSimpleFileAccess.getFolderContents(sLocLetterPath, true);
- for (int j=0;j<nameList1b.length;j++) {
+ for (int j = 0; j < nameList1b.length; j++)
+ {
String theFileNameb = FileAccess.getFilename(nameList1b[j]);
- allPaths.add(nameList1[i]+ sLetterSubPath + theFileNameb);
+ allPaths.add(nameList1[i] + sLetterSubPath + theFileNameb);
}
}
- catch(Exception e)
+ catch (Exception e)
{
//if the path is invalid an exception is thrown - try the fallback below then
}
}
}
- for (int i=0;i<nameList2.length;i++) {
+ for (int i = 0; i < nameList2.length; i++)
+ {
boolean found = false;
- for (int t=0;t<nameList1.length;t++) {
- if (FileAccess.getFilename(nameList2[i]).equalsIgnoreCase(FileAccess.getFilename(nameList1[t])) ) {
+ for (int t = 0; t < nameList1.length; t++)
+ {
+ if (FileAccess.getFilename(nameList2[i]).equalsIgnoreCase(FileAccess.getFilename(nameList1[t])))
+ {
found = true;
}
}
- if (!found) {
+ if (!found)
+ {
allPaths.add(nameList2[i]);
}
}
nameList = allPaths.toArray();
- } catch (CommandAbortedException e) {
+ }
+ catch (CommandAbortedException e)
+ {
// TODO Auto-generated catch block
e.printStackTrace();
//} catch (NoValidPathException e) {
- // TODO Auto-generated catch block
+ // TODO Auto-generated catch block
// e.printStackTrace();
- } catch (Exception e) {
+ }
+ catch (Exception e)
+ {
// TODO Auto-generated catch block
e.printStackTrace();
}
- Vector NormsVector = new Vector();
- Vector NormsPathVector = new Vector();
- Vector LanguageLabelsVector = new Vector();
- String [] LanguageLabels;
+ Vector NormsVector = new Vector();
+ Vector NormsPathVector = new Vector();
+ Vector LanguageLabelsVector = new Vector();
+ String[] LanguageLabels;
boolean found = false;
String cIsoCode = "";
String MSID = "";
- int z = 0;
- for (int i=0; i < nameList.length; i++) {
+ int z = 0;
+ for (int i = 0; i < nameList.length; i++)
+ {
found = false;
- cIsoCode = FileAccess.getFilename((String)nameList[i]);
- for (int t=0; t < allLocales.length; t++) {
- String [] aLang = allLocales[t].split(";");
- if (cIsoCode.equalsIgnoreCase(aLang[1])) {
- MSID= aLang[2];
+ cIsoCode = FileAccess.getFilename((String) nameList[i]);
+ for (int t = 0; t < allLocales.length; t++)
+ {
+ String[] aLang = allLocales[t].split(";");
+ if (cIsoCode.equalsIgnoreCase(aLang[1]))
+ {
+ MSID = aLang[2];
found = true;
t = allLocales.length;
}
}
- if (!found) {
- for (int t=0; t < allLocales.length; t++) {
- String [] aLang = allLocales[t].split(";");
- if (cIsoCode.equalsIgnoreCase(aLang[1].substring(0,2))) {
- MSID= aLang[2];
+ if (!found)
+ {
+ for (int t = 0; t < allLocales.length; t++)
+ {
+ String[] aLang = allLocales[t].split(";");
+ if (cIsoCode.equalsIgnoreCase(aLang[1].substring(0, 2)))
+ {
+ MSID = aLang[2];
found = true;
t = allLocales.length;
}
}
}
- if (found) {
- NormsVector.add(cIsoCode);
- NormsPathVector.add((String) nameList[i]);
- LanguageLabelsVector.add(lc.getLanguageString(MSID));
- /*
- Norms[z] = cIsoCode;
- NormPaths[z] = (String) nameList[i];
- LanguageLabels[z] = lc.getLanguageString(MSID);
- z++;
- **/
- }
+ if (found)
+ {
+ NormsVector.add(cIsoCode);
+ NormsPathVector.add((String) nameList[i]);
+ LanguageLabelsVector.add(lc.getLanguageString(MSID));
+ /*
+ Norms[z] = cIsoCode;
+ NormPaths[z] = (String) nameList[i];
+ LanguageLabels[z] = lc.getLanguageString(MSID);
+ z++;
+ **/
+ }
}
- Norms = new String[NormsVector.size()];
- NormsVector.toArray(Norms);
+ Norms = new String[NormsVector.size()];
+ NormsVector.toArray(Norms);
- NormPaths = new String[NormsPathVector.size()];
- NormsPathVector.toArray(NormPaths);
+ NormPaths = new String[NormsPathVector.size()];
+ NormsPathVector.toArray(NormPaths);
- LanguageLabels = new String[LanguageLabelsVector.size()];
- LanguageLabelsVector.toArray(LanguageLabels);
+ LanguageLabels = new String[LanguageLabelsVector.size()];
+ LanguageLabelsVector.toArray(LanguageLabels);
- //Norms = new String[nameList.length];
- //NormPaths = new String[nameList.length];
+ //Norms = new String[nameList.length];
+ //NormPaths = new String[nameList.length];
//LanguageLabels = new String[Norms.length];
setControlProperty("lstLetterNorm", "StringItemList", LanguageLabels);
}
- private CGLetter getCurrentLetter() {
- switch (myConfig.cp_LetterType) {
- case 0 : return myConfig.cp_BusinessLetter;
- case 1 : return myConfig.cp_PrivateOfficialLetter;
- case 2 : return myConfig.cp_PrivateLetter;
- default : return null;
+ private CGLetter getCurrentLetter()
+ {
+ switch (myConfig.cp_LetterType)
+ {
+ case 0:
+ return myConfig.cp_BusinessLetter;
+ case 1:
+ return myConfig.cp_PrivateOfficialLetter;
+ case 2:
+ return myConfig.cp_PrivateLetter;
+ default:
+ return null;
}
}
- private void initializePaths() {
- try {
+ private void initializePaths()
+ {
+ try
+ {
sTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard");
sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", "");
sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/wizard/bitmap");
- } catch (NoValidPathException e) {
+ }
+ catch (NoValidPathException e)
+ {
e.printStackTrace();
}
}
- public boolean initializeTemplates(XMultiServiceFactory xMSF) {
- sCurrentNorm = Norms[getCurrentLetter().cp_Norm];
- //creation of the language independent path:
- String sLetterPath = NormPaths[getCurrentLetter().cp_Norm];
-
- // try
- // {
- BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", sLetterPath);
- 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", "SelectedItems", new short[]{0});
- setControlProperty("lstPrivOfficialStyle", "SelectedItems", new short[]{0});
- setControlProperty("lstPrivateStyle", "SelectedItems", new short[]{0});
+ public boolean initializeTemplates(XMultiServiceFactory xMSF)
+ {
+ sCurrentNorm = Norms[getCurrentLetter().cp_Norm];
+ //creation of the language independent path:
+ String sLetterPath = NormPaths[getCurrentLetter().cp_Norm];
+
+ // try
+ // {
+ BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", sLetterPath);
+ 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", "SelectedItems", new short[]
+ {
+ 0
+ });
+ setControlProperty("lstPrivOfficialStyle", "SelectedItems", new short[]
+ {
+ 0
+ });
+ setControlProperty("lstPrivateStyle", "SelectedItems", new short[]
+ {
+ 0
+ });
// }
// catch (com.sun.star.wizards.common.NoValidPathException e)
// {
// return false;
// }
- return true;
+ return true;
}
- public void initializeElements() {
+ public void initializeElements()
+ {
setControlProperty("chkUseLogo", "Enabled", new Boolean(myLetterDoc.hasElement("Company Logo")));
setControlProperty("chkUseBendMarks", "Enabled", new Boolean(myLetterDoc.hasElement("Bend Marks")));
setControlProperty("chkUseAddressReceiver", "Enabled", new Boolean(myLetterDoc.hasElement("Sender Address Repeated")));
@@ -1080,24 +1352,35 @@ protected void leaveStep(int OldStep, int NewStep){}
myLetterDoc.updateDateFields();
}
- public void setConfiguration() {
+ public void setConfiguration()
+ {
//set correct Configuration tree:
- if (optBusinessLetter.getState()) {
+ if (optBusinessLetter.getState())
+ {
optBusinessLetterItemChanged();
}
- if (optPrivOfficialLetter.getState()) {
+ if (optPrivOfficialLetter.getState())
+ {
optPrivOfficialLetterItemChanged();
}
- if (optPrivateLetter.getState()) {
+ if (optPrivateLetter.getState())
+ {
optPrivateLetterItemChanged();
}
}
- public void setElements(boolean privLetter) {
+ public void setElements(boolean privLetter)
+ {
//UI relevant:
- if (optSenderDefine.getState()) {optSenderDefineItemChanged();}
- if (optSenderPlaceholder.getState()) {optSenderPlaceholderItemChanged();}
+ if (optSenderDefine.getState())
+ {
+ optSenderDefineItemChanged();
+ }
+ if (optSenderPlaceholder.getState())
+ {
+ optSenderPlaceholderItemChanged();
+ }
chkUseSignsItemChanged();
chkUseSubjectItemChanged();
chkUseSalutationItemChanged();
@@ -1107,13 +1390,26 @@ protected void leaveStep(int OldStep, int NewStep){}
txtTemplateNameTextChanged();
//not UI relevant:
- if (optReceiverDatabase.getState() && !privLetter) {optReceiverDatabaseItemChanged();}
- if (optReceiverPlaceholder.getState() && !privLetter) {optReceiverPlaceholderItemChanged();}
- if (optCreateLetter.getState()) {optCreateLetterItemChanged();}
- if (optMakeChanges.getState()) {optMakeChangesItemChanged();}
+ if (optReceiverDatabase.getState() && !privLetter)
+ {
+ optReceiverDatabaseItemChanged();
+ }
+ if (optReceiverPlaceholder.getState() && !privLetter)
+ {
+ optReceiverPlaceholderItemChanged();
+ }
+ if (optCreateLetter.getState())
+ {
+ optCreateLetterItemChanged();
+ }
+ if (optMakeChanges.getState())
+ {
+ optMakeChangesItemChanged();
+ }
}
- public void insertRoadmap() {
+ public void insertRoadmap()
+ {
addRoadmap();
int i = 0;
i = insertRoadmapItem(0, true, resources.RoadmapLabels[RM_TYPESTYLE], RM_TYPESTYLE);
@@ -1127,31 +1423,40 @@ protected void leaveStep(int OldStep, int NewStep){}
setCurrentRoadmapItemID((short) 1);
}
- private class myPathSelectionListener implements XPathSelectionListener {
- public void validatePath() {
- if (myPathSelection.usedPathPicker) {
+ private class myPathSelectionListener implements XPathSelectionListener
+ {
+
+ public void validatePath()
+ {
+ if (myPathSelection.usedPathPicker)
+ {
filenameChanged = true;
}
myPathSelection.usedPathPicker = false;
}
}
- public void insertPathSelectionControl() {
+ public void insertPathSelectionControl()
+ {
myPathSelection = new PathSelection(xMSF, this, PathSelection.TransferMode.SAVE, PathSelection.DialogTypes.FILE);
- myPathSelection.insert(6, 97, 70, 205, (short) 45, resources.reslblTemplatePath_value, true, "HID:" + ( HID + 47 ), "HID:" + ( HID + 48 ));
+ myPathSelection.insert(6, 97, 70, 205, (short) 45, resources.reslblTemplatePath_value, true, "HID:" + (HID + 47), "HID:" + (HID + 48));
myPathSelection.sDefaultDirectory = sUserTemplatePath;
myPathSelection.sDefaultName = "myLetterTemplate.ott";
myPathSelection.sDefaultFilter = "writer8_template";
myPathSelection.addSelectionListener(new myPathSelectionListener());
}
-
- public void initConfiguration() {
- try {
+ public void initConfiguration()
+ {
+ try
+ {
myConfig = new CGLetterWizard();
Object root = Configuration.getConfigurationRoot(xMSF, "/org.openoffice.Office.Writer/Wizards/Letter", false);
myConfig.readConfiguration(root, "cp_");
- mainDA.add(RadioDataAware.attachRadioButtons(myConfig, "cp_LetterType", new Object[] { optBusinessLetter, optPrivOfficialLetter, optPrivateLetter }, null, true));
+ mainDA.add(RadioDataAware.attachRadioButtons(myConfig, "cp_LetterType", new Object[]
+ {
+ optBusinessLetter, optPrivOfficialLetter, optPrivateLetter
+ }, null, true));
mainDA.add(UnoDataAware.attachListBox(myConfig.cp_BusinessLetter, "cp_Style", lstBusinessStyle, null, true));
mainDA.add(UnoDataAware.attachListBox(myConfig.cp_PrivateOfficialLetter, "cp_Style", lstPrivOfficialStyle, null, true));
mainDA.add(UnoDataAware.attachListBox(myConfig.cp_PrivateLetter, "cp_Style", lstPrivateStyle, null, true));
@@ -1188,40 +1493,55 @@ protected void leaveStep(int OldStep, int NewStep){}
letterDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintFooter", chkUseFooter, null, true));
letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_Salutation", lstSalutation, null, true));
letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_Greeting", lstGreeting, null, true));
- letterDA.add(RadioDataAware.attachRadioButtons(cgl, "cp_SenderAddressType", new Object[] { optSenderDefine, optSenderPlaceholder }, null, true));
+ letterDA.add(RadioDataAware.attachRadioButtons(cgl, "cp_SenderAddressType", new Object[]
+ {
+ optSenderDefine, optSenderPlaceholder
+ }, null, true));
letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderCompanyName", txtSenderName, null, true));
letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderStreet", txtSenderStreet, null, true));
letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderPostCode", txtSenderPostCode, null, true));
letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderState", txtSenderState, null, true));
letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderCity", txtSenderCity, null, true));
- letterDA.add(RadioDataAware.attachRadioButtons(cgl, "cp_ReceiverAddressType", new Object[] { optReceiverDatabase, optReceiverPlaceholder }, null, true));
+ letterDA.add(RadioDataAware.attachRadioButtons(cgl, "cp_ReceiverAddressType", new Object[]
+ {
+ optReceiverDatabase, optReceiverPlaceholder
+ }, null, true));
letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_Footer", txtFooter, null, true));
letterDA.add(UnoDataAware.attachCheckBox(cgl, "cp_FooterOnlySecondPage", chkFooterNextPages, null, true));
letterDA.add(UnoDataAware.attachCheckBox(cgl, "cp_FooterPageNumbers", chkFooterPageNumbers, null, true));
- letterDA.add(RadioDataAware.attachRadioButtons(cgl, "cp_CreationType", new Object[] { optCreateLetter, optMakeChanges }, null, true));
+ letterDA.add(RadioDataAware.attachRadioButtons(cgl, "cp_CreationType", new Object[]
+ {
+ optCreateLetter, optMakeChanges
+ }, null, true));
letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_TemplateName", txtTemplateName, null, true));
letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_TemplatePath", myPathSelection.xSaveTextBox, null, true));
- } catch (Exception exception) {
+ }
+ catch (Exception exception)
+ {
exception.printStackTrace();
}
}
- private void updateUI() {
+ private void updateUI()
+ {
UnoDataAware.updateUI(mainDA);
UnoDataAware.updateUI(letterDA);
UnoDataAware.updateUI(businessDA);
}
- public void saveConfiguration() {
- try {
+ public void saveConfiguration()
+ {
+ try
+ {
Object root = Configuration.getConfigurationRoot(xMSF, "/org.openoffice.Office.Writer/Wizards/Letter", true);
myConfig.writeConfiguration(root, "cp_");
Configuration.commit(root);
- } catch (Exception e) {
+ }
+ catch (Exception e)
+ {
e.printStackTrace();
}
}
-
}
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java
index bfc1a66d76d2..381baae0e0f9 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java
@@ -1,9 +1,41 @@
+/*
+ ************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: LetterWizardDialogResources.java,v $
+ *
+ * $Revision: 1.7.192.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
package com.sun.star.wizards.letter;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.wizards.common.Resource;
-public class LetterWizardDialogResources extends Resource {
+public class LetterWizardDialogResources extends Resource
+{
final static String UNIT_NAME = "dbwizres";
final static String MODULE_NAME = "dbw";
@@ -13,15 +45,12 @@ public class LetterWizardDialogResources extends Resource {
final static int RID_LETTERWIZARDROADMAP_START = 3100;
final static int RID_LETTERWIZARDLANGUAGE_START = 3110;
final static int RID_RID_COMMON_START = 500;
-
protected String[] RoadmapLabels = new String[7];
protected String[] SalutationLabels = new String[3];
protected String[] GreetingLabels = new String[3];
protected String[] LanguageLabels = new String[16];
-
String resOverwriteWarning;
String resTemplateDescription;
-
String resLetterWizardDialog_title;
String resLabel9_value;
String resoptBusinessLetter_value;
@@ -80,7 +109,9 @@ public class LetterWizardDialogResources extends Resource {
String reslblTitle4_value;
String reslblTitle5_value;
String reslblTitle6_value;
- public LetterWizardDialogResources(XMultiServiceFactory xmsf) {
+
+ public LetterWizardDialogResources(XMultiServiceFactory xmsf)
+ {
super(xmsf, UNIT_NAME, MODULE_NAME);
resLetterWizardDialog_title = getResText(RID_LETTERWIZARDDIALOG_START + 1);
@@ -148,27 +179,33 @@ public class LetterWizardDialogResources extends Resource {
loadCommonResources();
}
- private void loadCommonResources() {
+ private void loadCommonResources()
+ {
resOverwriteWarning = getResText(RID_RID_COMMON_START + 19);
resTemplateDescription = getResText(RID_RID_COMMON_START + 20);
}
- private void loadRoadmapResources() {
- for (int i = 1; i < 7; i++) {
+ private void loadRoadmapResources()
+ {
+ for (int i = 1; i < 7; i++)
+ {
RoadmapLabels[i] = getResText(RID_LETTERWIZARDROADMAP_START + i);
}
}
- private void loadSalutationResources() {
- for (int i = 1; i < 4; i++) {
- SalutationLabels[i-1] = getResText(RID_LETTERWIZARDSALUTATION_START + i);
+ private void loadSalutationResources()
+ {
+ for (int i = 1; i < 4; i++)
+ {
+ SalutationLabels[i - 1] = getResText(RID_LETTERWIZARDSALUTATION_START + i);
}
}
- private void loadGreetingResources() {
- for (int i = 1; i < 4; i++) {
- GreetingLabels[i-1] = getResText(RID_LETTERWIZARDGREETING_START + i);
+ private void loadGreetingResources()
+ {
+ for (int i = 1; i < 4; i++)
+ {
+ GreetingLabels[i - 1] = getResText(RID_LETTERWIZARDGREETING_START + i);
}
}
-
}
diff --git a/wizards/com/sun/star/wizards/letter/LocaleCodes.java b/wizards/com/sun/star/wizards/letter/LocaleCodes.java
index a8e58a927bfa..7cc7b811e26a 100644
--- a/wizards/com/sun/star/wizards/letter/LocaleCodes.java
+++ b/wizards/com/sun/star/wizards/letter/LocaleCodes.java
@@ -1,32 +1,69 @@
+/*
+ ************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: LocaleCodes.java,v $
+ *
+ * $Revision: 1.7.52.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
package com.sun.star.wizards.letter;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.wizards.common.Resource;
import com.sun.star.beans.PropertyValue;
-public class LocaleCodes extends Resource {
+public class LocaleCodes extends Resource
+{
final static String UNIT_NAME = "svtres";
final static String MODULE_NAME = "svt";
- PropertyValue [] allLanguageStrings;
+ PropertyValue[] allLanguageStrings;
- public LocaleCodes (XMultiServiceFactory xmsf) {
+ public LocaleCodes(XMultiServiceFactory xmsf)
+ {
super(xmsf, UNIT_NAME, MODULE_NAME);
allLanguageStrings = getStringList(16300); // STR_ARR_SVT_LANGUAGE_TABLE from svtools/source/misc/langtab.src
}
- public String getLanguageString(String MSID) {
+ public String getLanguageString(String MSID)
+ {
String LS = "unknown Language";
- for (int i=0; i < allLanguageStrings.length; i++) {
- if (allLanguageStrings[i].Value.toString().equalsIgnoreCase(MSID)) {
+ for (int i = 0; i < allLanguageStrings.length; i++)
+ {
+ if (allLanguageStrings[i].Value.toString().equalsIgnoreCase(MSID))
+ {
LS = allLanguageStrings[i].Name;
}
}
return LS;
}
- public String[] getIDs() {
- String []Ids = new String [134];
+ public String[] getIDs()
+ {
+ String[] Ids = new String[134];
Ids[0] = "Afrikaans;af;1078";
Ids[1] = "Albanian;sq;1052";
@@ -165,5 +202,4 @@ public class LocaleCodes extends Resource {
return Ids;
}
-
}