diff options
author | Xisco Fauli <anistenis@gmail.com> | 2012-10-14 21:02:16 +0200 |
---|---|---|
committer | Xisco Fauli <anistenis@gmail.com> | 2012-10-14 21:46:19 +0200 |
commit | 500edb98783fea1d8f244b0ca0d2eb5b099985e5 (patch) | |
tree | 8eea687acdcc79445b5718102512c44086a8e203 /wizards | |
parent | pyfax: uuups (diff) | |
download | core-500edb98783fea1d8f244b0ca0d2eb5b099985e5.tar.gz core-500edb98783fea1d8f244b0ca0d2eb5b099985e5.zip |
pyfax: Remove java code
Change-Id: If910b37990677458dcb2c88007ad713b1f208fbe
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/Jar_fax.mk | 57 | ||||
-rw-r--r-- | wizards/Module_wizards.mk | 1 | ||||
-rw-r--r-- | wizards/Pyuno_fax.mk | 6 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/CGFax.java | 50 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/CGFaxWizard.java | 28 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/CallWizard.java | 228 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/FaxDocument.java | 201 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/FaxWizardDialog.java | 618 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.java | 106 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java | 1073 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java | 216 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/MANIFEST.MF | 2 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/fax.component | 10 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/pyfax.component | 24 |
14 files changed, 7 insertions, 2613 deletions
diff --git a/wizards/Jar_fax.mk b/wizards/Jar_fax.mk deleted file mode 100644 index b65fd4d5a107..000000000000 --- a/wizards/Jar_fax.mk +++ /dev/null @@ -1,57 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2011 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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. -# -#************************************************************************* - -$(eval $(call gb_Jar_Jar,fax)) - -$(eval $(call gb_Jar_use_jars,fax,\ - ridl \ - unoil \ - jurt \ - juh \ - java_uno \ - commonwizards \ -)) - -$(eval $(call gb_Jar_set_packageroot,fax,com)) - -$(eval $(call gb_Jar_set_manifest,fax,$(SRCDIR)/wizards/com/sun/star/wizards/fax/MANIFEST.MF)) - -$(eval $(call gb_Jar_add_sourcefiles,fax,\ - wizards/com/sun/star/wizards/fax/CallWizard \ - wizards/com/sun/star/wizards/fax/CGFax \ - wizards/com/sun/star/wizards/fax/CGFaxWizard \ - wizards/com/sun/star/wizards/fax/FaxDocument \ - wizards/com/sun/star/wizards/fax/FaxWizardDialog \ - wizards/com/sun/star/wizards/fax/FaxWizardDialogConst \ - wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl \ - wizards/com/sun/star/wizards/fax/FaxWizardDialogResources \ -)) - -$(eval $(call gb_Jar_set_componentfile,fax,wizards/com/sun/star/wizards/fax/fax,OOO)) - -# vim: set noet sw=4 ts=4: diff --git a/wizards/Module_wizards.mk b/wizards/Module_wizards.mk index fb23aa229728..a9547e7e5f40 100644 --- a/wizards/Module_wizards.mk +++ b/wizards/Module_wizards.mk @@ -55,7 +55,6 @@ ifeq ($(SOLAR_JAVA),TRUE) $(eval $(call gb_Module_add_targets,wizards,\ Jar_commonwizards \ Jar_agenda \ - Jar_fax \ Jar_form \ Jar_letter \ Jar_query \ diff --git a/wizards/Pyuno_fax.mk b/wizards/Pyuno_fax.mk index 868eecf4785d..cd5990e77a8f 100644 --- a/wizards/Pyuno_fax.mk +++ b/wizards/Pyuno_fax.mk @@ -25,9 +25,9 @@ # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable # instead of those above. -$(eval $(call gb_Pyuno_Pyuno,pyfax,$(SRCDIR)/wizards/com/sun/star/wizards/fax)) +$(eval $(call gb_Pyuno_Pyuno,fax,$(SRCDIR)/wizards/com/sun/star/wizards/fax)) -$(eval $(call gb_Pyuno_add_files,pyfax,\ +$(eval $(call gb_Pyuno_add_files,fax,\ __init__.py \ CallWizard.py \ CGFax.py \ @@ -38,6 +38,6 @@ $(eval $(call gb_Pyuno_add_files,pyfax,\ FaxWizardDialog.py \ FaxWizardDialogResources.py \ )) -$(eval $(call gb_Pyuno_set_componentfile_full,pyfax,wizards/com/sun/star/wizards/fax/pyfax,vnd.openoffice.pymodule:wizards.fax,.CallWizard)) +$(eval $(call gb_Pyuno_set_componentfile_full,fax,wizards/com/sun/star/wizards/fax/fax,vnd.openoffice.pymodule:wizards.fax,.CallWizard)) # vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/wizards/com/sun/star/wizards/fax/CGFax.java b/wizards/com/sun/star/wizards/fax/CGFax.java deleted file mode 100644 index 52e895a5e720..000000000000 --- a/wizards/com/sun/star/wizards/fax/CGFax.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package com.sun.star.wizards.fax; - -import com.sun.star.wizards.common.ConfigGroup; - -public class CGFax extends ConfigGroup -{ - - public int cp_Style; - public boolean cp_PrintCompanyLogo; - public boolean cp_PrintDate; - public boolean cp_PrintSubjectLine; - public boolean cp_PrintSalutation; - public boolean cp_PrintCommunicationType; - public boolean cp_PrintGreeting; - public boolean cp_PrintFooter; - public String cp_CommunicationType; - public String cp_Salutation; - public String cp_Greeting; - public int cp_SenderAddressType; - public String cp_SenderCompanyName; - public String cp_SenderStreet; - public String cp_SenderPostCode; - public String cp_SenderState; - public String cp_SenderCity; - public String cp_SenderFax; - public int cp_ReceiverAddressType; - public String cp_Footer; - public boolean cp_FooterOnlySecondPage; - public boolean cp_FooterPageNumbers; - public int cp_CreationType; - public String cp_TemplateName; - public String cp_TemplatePath; -} diff --git a/wizards/com/sun/star/wizards/fax/CGFaxWizard.java b/wizards/com/sun/star/wizards/fax/CGFaxWizard.java deleted file mode 100644 index 588c2faff47b..000000000000 --- a/wizards/com/sun/star/wizards/fax/CGFaxWizard.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package com.sun.star.wizards.fax; - -import com.sun.star.wizards.common.ConfigGroup; - -public class CGFaxWizard extends ConfigGroup -{ - - public int cp_FaxType; - public CGFax cp_BusinessFax = new CGFax(); - public CGFax cp_PrivateFax = new CGFax(); -} diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.java b/wizards/com/sun/star/wizards/fax/CallWizard.java deleted file mode 100644 index 64e341f0f7d1..000000000000 --- a/wizards/com/sun/star/wizards/fax/CallWizard.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package com.sun.star.wizards.fax; - -import com.sun.star.beans.XPropertyAccess; -import com.sun.star.comp.loader.FactoryHelper; -import com.sun.star.lang.XInitialization; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.lang.XServiceInfo; -import com.sun.star.lang.XSingleServiceFactory; -import com.sun.star.lang.XTypeProvider; -import com.sun.star.registry.XRegistryKey; -import com.sun.star.task.XJob; -import com.sun.star.task.XJobExecutor; -import com.sun.star.uno.Type; -import com.sun.star.wizards.common.PropertyNames; - -/** - * This class capsulates the class, that implements the minimal component, a factory for - * creating the service (<CODE>__getServiceFactory</CODE>). - */ -public class CallWizard -{ - - /** - * Gives a factory for creating the service. This method is called by the - * <code>JavaLoader</code> - * - * <p></p> - * - * @param stringImplementationName The implementation name of the component. - * @param xMSF The service manager, who gives access to every known service. - * @param xregistrykey Makes structural information (except regarding tree - * structures) of a single registry key accessible. - * - * @return Returns a <code>XSingleServiceFactory</code> for creating the component. - * - * @see com.sun.star.comp.loader.JavaLoader - */ - public static XSingleServiceFactory __getServiceFactory(String stringImplementationName, XMultiServiceFactory xMSF, XRegistryKey xregistrykey) - { - XSingleServiceFactory xsingleservicefactory = null; - - if (stringImplementationName.equals(WizardImplementation.class.getName())) - { - xsingleservicefactory = FactoryHelper.getServiceFactory(WizardImplementation.class, WizardImplementation.__serviceName, xMSF, xregistrykey); - } - - return xsingleservicefactory; - } - - /** - * 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 - { - - /** - * The constructor of the inner class has a XMultiServiceFactory parameter. - * - * @param xmultiservicefactoryInitialization A special service factory could be - * introduced while initializing. - */ - public WizardImplementation(XMultiServiceFactory xmultiservicefactoryInitialization) - { - xmultiservicefactory = xmultiservicefactoryInitialization; - - if (xmultiservicefactory != null) - { - } - } - - /** - * Execute Wizard - * - * @param str only valid parameter is 'start' at the moment. - */ - public void trigger(String str) - { - if (str.equalsIgnoreCase(PropertyNames.START)) - { - FaxWizardDialogImpl lw = new FaxWizardDialogImpl(xmultiservicefactory); - if (!FaxWizardDialogImpl.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.fax.CallWizard"; - /** - * The service manager, that gives access to all registered services. - */ - private XMultiServiceFactory xmultiservicefactory; - - /** - * This method is a member of the interface for initializing an object directly - * after its creation. - * - * @param object This array of arbitrary objects will be passed to the component - * after its creation. - * - * @throws com.sun.star.uno.Exception Every exception will not be handled, but - * will be passed to the caller. - */ - public void initialize(Object[] object) throws com.sun.star.uno.Exception - { - } - - /** - * This method returns an array of all supported service names. - * - * @return Array of supported service names. - */ - public java.lang.String[] getSupportedServiceNames() - { - String[] stringSupportedServiceNames = new String[1]; - stringSupportedServiceNames[0] = __serviceName; - - return (stringSupportedServiceNames); - } - - /** - * This method returns true, if the given service will be supported by the - * component. - * - * @param stringService Service name. - * - * @return True, if the given service name will be supported. - */ - public boolean supportsService(String stringService) - { - boolean booleanSupportsService = false; - - if (stringService.equals(__serviceName)) - { - booleanSupportsService = true; - } - - return (booleanSupportsService); - } - - /** - * This method returns an array of bytes, that can be used to unambiguously - * distinguish between two sets of types, e.g. to realise hashing functionality - * when the object is introspected. Two objects that return the same ID also - * have to return the same set of types in getTypes(). If an unique - * implementation Id cannot be provided this method has to return an empty - * sequence. Important: If the object aggregates other objects the ID has to be - * unique for the whole combination of objects. - * - * @return Array of bytes, in order to distinguish between two sets. - */ - public byte[] getImplementationId() - { - byte[] byteReturn = - { - }; - - try - { - byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes(); - } - catch (Exception exception) - { - System.err.println(exception); - } - - return (byteReturn); - } - - /** - * Return the class name of the component. - * - * @return Class name of the component. - */ - public java.lang.String getImplementationName() - { - return (WizardImplementation.class.getName()); - } - - /** - * Provides a sequence of all types (usually interface types) provided by the - * object. - * - * @return Sequence of all types (usually interface types) provided by the - * service. - */ - 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) - { - System.err.println(exception); - } - - return (typeReturn); - } - } -} diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.java b/wizards/com/sun/star/wizards/fax/FaxDocument.java deleted file mode 100644 index c4cd286dbba3..000000000000 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package com.sun.star.wizards.fax; - -import com.sun.star.wizards.common.*; -import com.sun.star.wizards.text.*; -import com.sun.star.frame.XDesktop; -import com.sun.star.frame.XTerminateListener; -import com.sun.star.text.*; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.awt.XWindowPeer; -import com.sun.star.uno.Exception; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.beans.XPropertySet; -import com.sun.star.style.NumberingType; -import com.sun.star.style.ParagraphAdjust; -import com.sun.star.style.XStyleFamiliesSupplier; -import com.sun.star.style.XStyle; - -public class FaxDocument extends TextDocument -{ - - XDesktop xDesktop; - boolean keepLogoFrame = true; - boolean keepTypeFrame = true; - - public FaxDocument(XMultiServiceFactory xMSF, XTerminateListener listener) - { - super(xMSF, listener, "WIZARD_LIVE_PREVIEW"); - } - - public XWindowPeer getWindowPeer() - { - return UnoRuntime.queryInterface(XWindowPeer.class, xTextDocument); - } - - 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", Boolean.valueOf(bState)); - - } - catch (Exception exception) - { - exception.printStackTrace(System.err); - } - } - - 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) - { - xTextDocument.lockControllers(); - try - { - XStyleFamiliesSupplier xStyleFamiliesSupplier = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument); - com.sun.star.container.XNameAccess xNameAccess = null; - xNameAccess = xStyleFamiliesSupplier.getStyleFamilies(); - - com.sun.star.container.XNameContainer xPageStyleCollection = null; - xPageStyleCollection = UnoRuntime.queryInterface(com.sun.star.container.XNameContainer.class, xNameAccess.getByName("PageStyles")); - - XText xFooterText; - XStyle xPageStyle = UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName(sPageStyle)); - - if (bState) - { - Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", Boolean.TRUE); - xFooterText = UnoRuntime.queryInterface(XText.class, Helper.getUnoPropertyValue(xPageStyle, "FooterText")); - xFooterText.setString(sText); - if (bPageNumber) - { - //Adding the Page Number - XTextCursor myCursor = xFooterText.createTextCursor(); - myCursor.gotoEnd(false); - xFooterText.insertControlCharacter(myCursor, ControlCharacter.PARAGRAPH_BREAK, false); - XPropertySet xCursorPSet = UnoRuntime.queryInterface(XPropertySet.class, myCursor); - xCursorPSet.setPropertyValue("ParaAdjust", ParagraphAdjust.CENTER); - XTextField xPageNumberField = UnoRuntime.queryInterface(XTextField.class, xMSFDoc.createInstance("com.sun.star.text.TextField.PageNumber")); - XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xPageNumberField); - xPSet.setPropertyValue("SubType", PageNumberType.CURRENT); - xPSet.setPropertyValue("NumberingType", new Short(NumberingType.ARABIC)); - xFooterText.insertTextContent(xFooterText.getEnd(), xPageNumberField, false); - } - } - else - { - Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", Boolean.FALSE); - } - xTextDocument.unlockControllers(); - } - catch (Exception exception) - { - exception.printStackTrace(System.err); - } - } - } - - public boolean hasElement(String sElement) - { - if (xTextDocument != null) - { - TextSectionHandler mySectionHandler = new TextSectionHandler(xMSF, xTextDocument); - return mySectionHandler.hasTextSectionByName(sElement); - } - else - { - return false; - } - } - - public void switchUserField(String sFieldName, String sNewContent, boolean bState) - { - TextFieldHandler myFieldHandler = new TextFieldHandler(xMSF, xTextDocument); - if (bState) - { - myFieldHandler.changeUserFieldContent(sFieldName, sNewContent); - } - else - { - myFieldHandler.changeUserFieldContent(sFieldName, PropertyNames.EMPTY_STRING); - } - } - - 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")); - myFieldHandler.changeUserFieldContent("Street", (String) Helper.getUnoObjectbyName(oUserDataAccess, "street")); - myFieldHandler.changeUserFieldContent("PostCode", (String) Helper.getUnoObjectbyName(oUserDataAccess, "postalcode")); - myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, (String) Helper.getUnoObjectbyName(oUserDataAccess, "st")); - myFieldHandler.changeUserFieldContent("City", (String) Helper.getUnoObjectbyName(oUserDataAccess, "l")); - myFieldHandler.changeUserFieldContent("Fax", (String) Helper.getUnoObjectbyName(oUserDataAccess, "facsimiletelephonenumber")); - } - catch (Exception exception) - { - exception.printStackTrace(System.err); - } - } - - public void killEmptyUserFields() - { - TextFieldHandler myFieldHandler = new TextFieldHandler(xMSF, xTextDocument); - myFieldHandler.removeUserFieldByContent(PropertyNames.EMPTY_STRING); - } - - public void killEmptyFrames() - { - try - { - if (!keepLogoFrame) - { - XTextFrame xTF = TextFrameHandler.getFrameByName("Company Logo", xTextDocument); - if (xTF != null) - { - xTF.dispose(); - } - } - if (!keepTypeFrame) - { - XTextFrame xTF = TextFrameHandler.getFrameByName("Communication Type", xTextDocument); - if (xTF != null) - { - xTF.dispose(); - } - } - } - catch (Exception e) - { - e.printStackTrace(); - } - - } -} diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java deleted file mode 100644 index 5fdfb2ab8fbe..000000000000 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java +++ /dev/null @@ -1,618 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package com.sun.star.wizards.fax; - -import com.sun.star.awt.*; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.wizards.common.*; -import com.sun.star.wizards.ui.*; - -public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardDialogConst, UIConsts -{ - - XRadioButton optBusinessFax; - XListBox lstBusinessStyle; - XRadioButton optPrivateFax; - XListBox lstPrivateStyle; - XFixedText lblBusinessStyle; - XFixedText lblTitle1; - XFixedText lblPrivateStyle; - XFixedText lblIntroduction; - //Image Control - XControl ImageControl3; - XCheckBox chkUseLogo; - XCheckBox chkUseDate; - XCheckBox chkUseCommunicationType; - XComboBox lstCommunicationType; - XCheckBox chkUseSubject; - XCheckBox chkUseSalutation; - XComboBox lstSalutation; - XCheckBox chkUseGreeting; - XComboBox lstGreeting; - XCheckBox chkUseFooter; - XFixedText lblTitle3; - XRadioButton optSenderPlaceholder; - XRadioButton optSenderDefine; - XTextComponent txtSenderName; - XTextComponent txtSenderStreet; - XTextComponent txtSenderPostCode; - XTextComponent txtSenderState; - XTextComponent txtSenderCity; - XTextComponent txtSenderFax; - XRadioButton optReceiverDatabase; - XRadioButton optReceiverPlaceholder; - XFixedText lblSenderAddress; - //Fixed Line - XControl FixedLine2; - XFixedText lblSenderName; - XFixedText lblSenderStreet; - XFixedText lblPostCodeCity; - XFixedText lblTitle4; - XFixedText Label1; - XFixedText Label2; - XTextComponent txtFooter; - XCheckBox chkFooterNextPages; - XCheckBox chkFooterPageNumbers; - XFixedText lblFooter; - XFixedText lblTitle5; - XTextComponent txtTemplateName; - //File Control - XControl fileTemplatePath; - XRadioButton optCreateFax; - 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 fontDescriptor4 = new FontDescriptor(); - FontDescriptor fontDescriptor5 = new FontDescriptor(); //Resources Object - FaxWizardDialogResources resources; - - public FaxWizardDialog(XMultiServiceFactory xmsf) - { - super(xmsf, HIDMAIN); - //Load Resources - resources = new FaxWizardDialogResources(xmsf); - - - //set dialog properties... - Helper.setUnoPropertyValues(xDialogModel, - new String[] - { - PropertyNames.PROPERTY_CLOSEABLE, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_MOVEABLE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_TITLE, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - Boolean.TRUE, 210, Boolean.TRUE, 104, 52, INTEGERS[1], new Short((short) 1), resources.resFaxWizardDialog_title, 310 - }); - - - - //Set member- FontDescriptors... - fontDescriptor1.Weight = 150; - fontDescriptor1.Underline = com.sun.star.awt.FontUnderline.SINGLE; - fontDescriptor2.Weight = 100; - fontDescriptor4.Weight = 100; - fontDescriptor5.Weight = 150; - } - //build components - public void buildStep1() - { - optBusinessFax = insertRadioButton("optBusinessFax", OPTBUSINESSFAX_ITEM_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], OPTBUSINESSFAX_HID, resources.resoptBusinessFax_value, 97, 28, INTEGERS[1], new Short((short) 1), 184 - }); - lstBusinessStyle = insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, - new String[] - { - "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - Boolean.TRUE, INTEGER_12, LSTBUSINESSSTYLE_HID, 180, INTEGER_40, INTEGERS[1], new Short((short) 3), 74 - }); - optPrivateFax = insertRadioButton("optPrivateFax", OPTPRIVATEFAX_ITEM_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], OPTPRIVATEFAX_HID, resources.resoptPrivateFax_value, 97, 81, INTEGERS[1], new Short((short) 2), 184 - }); - lstPrivateStyle = insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED, - new String[] - { - "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - Boolean.TRUE, INTEGER_12, LSTPRIVATESTYLE_HID, 180, 95, INTEGERS[1], new Short((short) 4), 74 - }); - lblBusinessStyle = insertLabel("lblBusinessStyle", - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], resources.reslblBusinessStyle_value, 110, 42, INTEGERS[1], new Short((short) 32), 60 - }); - lblTitle1 = insertLabel("lblTitle1", - new String[] - { - PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - fontDescriptor5, INTEGER_16, resources.reslblTitle1_value, Boolean.TRUE, 91, INTEGERS[8], INTEGERS[1], new Short((short) 37), 212 - }); - lblPrivateStyle = insertLabel("lblPrivateStyle", - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], resources.reslblPrivateStyle_value, 110, 95, INTEGERS[1], new Short((short) 50), 60 - }); - lblIntroduction = insertLabel("lblIntroduction", - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - 39, resources.reslblIntroduction_value, Boolean.TRUE, 104, 145, INTEGERS[1], new Short((short) 55), 199 - }); - ImageControl3 = insertInfoImage(92, 145, 1); -// ImageControl3 = insertImage("ImageControl3", -// new String[] {PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}, -// new Object[] { new Short((short)0),INTEGERS[10],"private:resource/dbu/image/19205",92,145,Boolean.FALSE,INTEGERS[1],new Short((short)56),INTEGERS[10]} -// ); - } - - public void buildStep2() - { - chkUseLogo = insertCheckBox("chkUseLogo", CHKUSELOGO_ITEM_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], CHKUSELOGO_HID, resources.reschkUseLogo_value, 97, 28, new Short((short) 0), INTEGERS[2], new Short((short) 5), 212 - }); - chkUseDate = insertCheckBox("chkUseDate", CHKUSEDATE_ITEM_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], CHKUSEDATE_HID, resources.reschkUseDate_value, 97, 43, new Short((short) 0), INTEGERS[2], new Short((short) 6), 212 - }); - chkUseCommunicationType = insertCheckBox("chkUseCommunicationType", CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], CHKUSECOMMUNICATIONTYPE_HID, resources.reschkUseCommunicationType_value, 97, 57, new Short((short) 0), INTEGERS[2], new Short((short) 7), 100 - }); - lstCommunicationType = insertComboBox("lstCommunicationType", LSTCOMMUNICATIONTYPE_ACTION_PERFORMED, LSTCOMMUNICATIONTYPE_ITEM_CHANGED, LSTCOMMUNICATIONTYPE_TEXT_CHANGED, - new String[] - { - "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - Boolean.TRUE, INTEGER_12, LSTCOMMUNICATIONTYPE_HID, 105, 68, INTEGERS[2], new Short((short) 8), 174 - }); - chkUseSubject = insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], CHKUSESUBJECT_HID, resources.reschkUseSubject_value, 97, 87, new Short((short) 0), INTEGERS[2], new Short((short) 9), 212 - }); - chkUseSalutation = insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], CHKUSESALUTATION_HID, resources.reschkUseSalutation_value, 97, 102, new Short((short) 0), INTEGERS[2], new Short((short) 10), 100 - }); - lstSalutation = insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, LSTSALUTATION_TEXT_CHANGED, - new String[] - { - "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - Boolean.TRUE, INTEGER_12, LSTSALUTATION_HID, 105, 113, INTEGERS[2], new Short((short) 11), 174 - }); - chkUseGreeting = insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], CHKUSEGREETING_HID, resources.reschkUseGreeting_value, 97, 132, new Short((short) 0), INTEGERS[2], new Short((short) 12), 100 - }); - lstGreeting = insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED, - new String[] - { - "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - Boolean.TRUE, INTEGER_12, LSTGREETING_HID, 105, 143, INTEGERS[2], new Short((short) 13), 174 - }); - chkUseFooter = insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], CHKUSEFOOTER_HID, resources.reschkUseFooter_value, 97, 163, new Short((short) 0), INTEGERS[2], new Short((short) 14), 212 - }); - lblTitle3 = insertLabel("lblTitle3", - new String[] - { - PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - fontDescriptor5, INTEGER_16, resources.reslblTitle3_value, Boolean.TRUE, 91, INTEGERS[8], INTEGERS[2], new Short((short) 59), 212 - }); - } - - public void buildStep3() - { - optSenderPlaceholder = insertRadioButton("optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], OPTSENDERPLACEHOLDER_HID, resources.resoptSenderPlaceholder_value, 104, 42, INTEGERS[3], new Short((short) 15), 149 - }); - optSenderDefine = insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], OPTSENDERDEFINE_HID, resources.resoptSenderDefine_value, 104, 54, INTEGERS[3], new Short((short) 16), 149 - }); - txtSenderName = insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGER_12, TXTSENDERNAME_HID, 182, 67, INTEGERS[3], new Short((short) 17), 119 - }); - txtSenderStreet = insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGER_12, TXTSENDERSTREET_HID, 182, 81, INTEGERS[3], new Short((short) 18), 119 - }); - txtSenderPostCode = insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGER_12, TXTSENDERPOSTCODE_HID, 182, 95, INTEGERS[3], new Short((short) 19), 25 - }); - txtSenderState = insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGER_12, TXTSENDERSTATE_HID, 211, 95, INTEGERS[3], new Short((short) 20), 21 - }); - txtSenderCity = insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGER_12, TXTSENDERCITY_HID, 236, 95, INTEGERS[3], new Short((short) 21), 65 - }); - txtSenderFax = insertTextField("txtSenderFax", TXTSENDERFAX_TEXT_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGER_12, TXTSENDERFAX_HID, 182, 109, INTEGERS[3], new Short((short) 22), 119 - }); - optReceiverPlaceholder = insertRadioButton("optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], OPTRECEIVERPLACEHOLDER_HID, resources.resoptReceiverPlaceholder_value, 104, 148, INTEGERS[3], new Short((short) 23), 200 - }); - optReceiverDatabase = insertRadioButton("optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], OPTRECEIVERDATABASE_HID, resources.resoptReceiverDatabase_value, 104, 160, INTEGERS[3], new Short((short) 24), 200 - }); - lblSenderAddress = insertLabel("lblSenderAddress", - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], resources.reslblSenderAddress_value, 97, 28, INTEGERS[3], new Short((short) 46), 136 - }); - FixedLine2 = insertFixedLine("FixedLine2", - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[5], 90, 126, INTEGERS[3], new Short((short) 51), 212 - }); - lblSenderName = insertLabel("lblSenderName", - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], resources.reslblSenderName_value, 113, 69, INTEGERS[3], new Short((short) 52), 68 - }); - lblSenderStreet = insertLabel("lblSenderStreet", - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], resources.reslblSenderStreet_value, 113, 82, INTEGERS[3], new Short((short) 53), 68 - }); - lblPostCodeCity = insertLabel("lblPostCodeCity", - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], resources.reslblPostCodeCity_value, 113, 97, INTEGERS[3], new Short((short) 54), 68 - }); - lblTitle4 = insertLabel("lblTitle4", - new String[] - { - PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - fontDescriptor5, INTEGER_16, resources.reslblTitle4_value, Boolean.TRUE, 91, INTEGERS[8], INTEGERS[3], new Short((short) 60), 212 - }); - Label1 = insertLabel("lblSenderFax", - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], resources.resLabel1_value, 113, 111, INTEGERS[3], new Short((short) 68), 68 - }); - Label2 = insertLabel("Label2", - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], resources.resLabel2_value, 97, 137, INTEGERS[3], new Short((short) 69), 136 - }); - } - - public void buildStep4() - { - txtFooter = insertTextField("txtFooter", TXTFOOTER_TEXT_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - 47, TXTFOOTER_HID, Boolean.TRUE, 97, INTEGER_40, INTEGERS[4], new Short((short) 25), 203 - }); - chkFooterNextPages = insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], CHKFOOTERNEXTPAGES_HID, resources.reschkFooterNextPages_value, 97, 92, new Short((short) 0), INTEGERS[4], new Short((short) 26), 202 - }); - chkFooterPageNumbers = insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], CHKFOOTERPAGENUMBERS_HID, resources.reschkFooterPageNumbers_value, 97, 106, new Short((short) 0), INTEGERS[4], new Short((short) 27), 201 - }); - lblFooter = insertLabel("lblFooter", - new String[] - { - PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - fontDescriptor4, INTEGERS[8], resources.reslblFooter_value, 97, 28, INTEGERS[4], new Short((short) 33), 116 - }); - lblTitle5 = insertLabel("lblTitle5", - new String[] - { - PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - fontDescriptor5, INTEGER_16, resources.reslblTitle5_value, Boolean.TRUE, 91, INTEGERS[8], INTEGERS[4], new Short((short) 61), 212 - }); - } - - public void buildStep5() - { - txtTemplateName = insertTextField("txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGER_12, TXTTEMPLATENAME_HID, 202, 56, INTEGERS[5], new Short((short) 28), resources.restxtTemplateName_value, 100 - }); - /* - fileTemplatePath = insertFileControl("fileTemplatePath", FILETEMPLATEPATH_TEXT_CHANGED, - new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}, - new Object[] { INTEGER_12,FILETEMPLATEPATH_HID,172,74,INTEGERS[5],new Short((short)29),130} - ); - */ - optCreateFax = insertRadioButton("optCreateFax", OPTCREATEFAX_ITEM_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], OPTCREATEFAX_HID, resources.resoptCreateFax_value, 104, 111, INTEGERS[5], new Short((short) 30), 198 - }); - optMakeChanges = insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], OPTMAKECHANGES_HID, resources.resoptMakeChanges_value, 104, 123, INTEGERS[5], new Short((short) 31), 198 - }); - lblFinalExplanation1 = insertLabel("lblFinalExplanation1", - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - 28, resources.reslblFinalExplanation1_value, Boolean.TRUE, 97, 28, INTEGERS[5], new Short((short) 34), 205 - }); - lblProceed = insertLabel("lblProceed", - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], resources.reslblProceed_value, 97, 100, INTEGERS[5], new Short((short) 35), 204 - }); - lblFinalExplanation2 = insertLabel("lblFinalExplanation2", - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - 33, resources.reslblFinalExplanation2_value, Boolean.TRUE, 104, 145, INTEGERS[5], new Short((short) 36), 199 - }); - ImageControl2 = insertImage("ImageControl2", - new String[] - { - PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - new Short((short) 0), INTEGERS[10], "private:resource/dbu/image/19205", 92, 145, Boolean.FALSE, INTEGERS[5], new Short((short) 47), INTEGERS[10] - }); - lblTemplateName = insertLabel("lblTemplateName", - new String[] - { - PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - INTEGERS[8], resources.reslblTemplateName_value, 97, 58, INTEGERS[5], new Short((short) 57), 101 - }); - /* - lblTemplatePath = insertLabel("lblTemplatePath", - new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}, - new Object[] { INTEGERS[8],resources.reslblTemplatePath_value,97,77,INTEGERS[5],new Short((short)58),71} - ); - */ - lblTitle6 = insertLabel("lblTitle6", - new String[] - { - PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH - }, - new Object[] - { - fontDescriptor5, INTEGER_16, resources.reslblTitle6_value, Boolean.TRUE, 91, INTEGERS[8], INTEGERS[5], new Short((short) 62), 212 - }); - - } -}
\ No newline at end of file diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.java deleted file mode 100644 index 65e52e99a6a2..000000000000 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package com.sun.star.wizards.fax; -import com.sun.star.wizards.common.*; - -public interface FaxWizardDialogConst -{ - - public static final String OPTBUSINESSFAX_ITEM_CHANGED = "optBusinessFaxItemChanged"; - public static final String LSTBUSINESSSTYLE_ACTION_PERFORMED = null; // "lstBusinessStyleActionPerformed"; - public static final String LSTBUSINESSSTYLE_ITEM_CHANGED = "lstBusinessStyleItemChanged"; - public static final String OPTPRIVATEFAX_ITEM_CHANGED = "optPrivateFaxItemChanged"; - public static final String LSTPRIVATESTYLE_ACTION_PERFORMED = null; // "lstPrivateStyleActionPerformed"; - public static final String LSTPRIVATESTYLE_ITEM_CHANGED = "lstPrivateStyleItemChanged"; - public static final String CHKUSELOGO_ITEM_CHANGED = "chkUseLogoItemChanged"; - public static final String CHKUSEDATE_ITEM_CHANGED = "chkUseDateItemChanged"; - public static final String CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED = "chkUseCommunicationItemChanged"; - public static final String LSTCOMMUNICATIONTYPE_ACTION_PERFORMED = null; // "lstCommunicationActionPerformed"; - public static final String LSTCOMMUNICATIONTYPE_ITEM_CHANGED = "lstCommunicationItemChanged"; - public static final String LSTCOMMUNICATIONTYPE_TEXT_CHANGED = "lstCommunicationTextChanged"; - public static final String CHKUSESUBJECT_ITEM_CHANGED = "chkUseSubjectItemChanged"; - public static final String CHKUSESALUTATION_ITEM_CHANGED = "chkUseSalutationItemChanged"; - public static final String LSTSALUTATION_ACTION_PERFORMED = null; // "lstSalutationActionPerformed"; - public static final String LSTSALUTATION_ITEM_CHANGED = "lstSalutationItemChanged"; - public static final String LSTSALUTATION_TEXT_CHANGED = "lstSalutationTextChanged"; - public static final String CHKUSEGREETING_ITEM_CHANGED = "chkUseGreetingItemChanged"; - public static final String LSTGREETING_ACTION_PERFORMED = null; // "lstGreetingActionPerformed"; - public static final String LSTGREETING_ITEM_CHANGED = "lstGreetingItemChanged"; - public static final String LSTGREETING_TEXT_CHANGED = "lstGreetingTextChanged"; - public static final String CHKUSEFOOTER_ITEM_CHANGED = "chkUseFooterItemChanged"; - public static final String OPTSENDERPLACEHOLDER_ITEM_CHANGED = "optSenderPlaceholderItemChanged"; - public static final String OPTSENDERDEFINE_ITEM_CHANGED = "optSenderDefineItemChanged"; - public static final String TXTSENDERNAME_TEXT_CHANGED = "txtSenderNameTextChanged"; - public static final String TXTSENDERSTREET_TEXT_CHANGED = "txtSenderStreetTextChanged"; - public static final String TXTSENDERPOSTCODE_TEXT_CHANGED = "txtSenderPostCodeTextChanged"; - public static final String TXTSENDERSTATE_TEXT_CHANGED = "txtSenderStateTextChanged"; - public static final String TXTSENDERCITY_TEXT_CHANGED = "txtSenderCityTextChanged"; - public static final String TXTSENDERFAX_TEXT_CHANGED = "txtSenderFaxTextChanged"; - public static final String OPTRECEIVERPLACEHOLDER_ITEM_CHANGED = "optReceiverPlaceholderItemChanged"; - public static final String OPTRECEIVERDATABASE_ITEM_CHANGED = "optReceiverDatabaseItemChanged"; - public static final String TXTFOOTER_TEXT_CHANGED = "txtFooterTextChanged"; - public static final String CHKFOOTERNEXTPAGES_ITEM_CHANGED = "chkFooterNextPagesItemChanged"; - public static final String CHKFOOTERPAGENUMBERS_ITEM_CHANGED = "chkFooterPageNumbersItemChanged"; - public static final String TXTTEMPLATENAME_TEXT_CHANGED = "txtTemplateNameTextChanged"; - public static final String FILETEMPLATEPATH_TEXT_CHANGED = null; // "fileTemplatePathTextChanged"; - public static final String OPTCREATEFAX_ITEM_CHANGED = "optCreateFaxItemChanged"; - public static final String OPTMAKECHANGES_ITEM_CHANGED = "optMakeChangesItemChanged"; - public static final String imageURLImageControl2 = null; //"images/ImageControl2"; - public static final String imageURLImageControl3 = null; //"images/ImageControl3"; - - /* ==================================== - * Help IDs - * ==================================== - */ - public final static int HID = 41119; //TODO enter first hid here - public static final int HIDMAIN = 41180; - public final String OPTBUSINESSFAX_HID = HelpIds.getHelpIdString(HID + 1); - public final String LSTBUSINESSSTYLE_HID = HelpIds.getHelpIdString(HID + 2); - public final String OPTPRIVATEFAX_HID = HelpIds.getHelpIdString(HID + 3); - public final String LSTPRIVATESTYLE_HID = HelpIds.getHelpIdString(HID + 4); - public final String IMAGECONTROL3_HID = HelpIds.getHelpIdString(HID + 5); - public final String CHKUSELOGO_HID = HelpIds.getHelpIdString(HID + 6); - public final String CHKUSEDATE_HID = HelpIds.getHelpIdString(HID + 7); - public final String CHKUSECOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 8); - public final String LSTCOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 9); - public final String CHKUSESUBJECT_HID = HelpIds.getHelpIdString(HID + 10); - public final String CHKUSESALUTATION_HID = HelpIds.getHelpIdString(HID + 11); - public final String LSTSALUTATION_HID = HelpIds.getHelpIdString(HID + 12); - public final String CHKUSEGREETING_HID = HelpIds.getHelpIdString(HID + 13); - public final String LSTGREETING_HID = HelpIds.getHelpIdString(HID + 14); - public final String CHKUSEFOOTER_HID = HelpIds.getHelpIdString(HID + 15); - public final String OPTSENDERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 16); - public final String OPTSENDERDEFINE_HID = HelpIds.getHelpIdString(HID + 17); - public final String TXTSENDERNAME_HID = HelpIds.getHelpIdString(HID + 18); - public final String TXTSENDERSTREET_HID = HelpIds.getHelpIdString(HID + 19); - public final String TXTSENDERPOSTCODE_HID = HelpIds.getHelpIdString(HID + 20); - public final String TXTSENDERSTATE_HID = HelpIds.getHelpIdString(HID + 21); - public final String TXTSENDERCITY_HID = HelpIds.getHelpIdString(HID + 22); - public final String TXTSENDERFAX_HID = HelpIds.getHelpIdString(HID + 23); - public final String OPTRECEIVERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 24); - public final String OPTRECEIVERDATABASE_HID = HelpIds.getHelpIdString(HID + 25); - public final String TXTFOOTER_HID = HelpIds.getHelpIdString(HID + 26); - public final String CHKFOOTERNEXTPAGES_HID = HelpIds.getHelpIdString(HID + 27); - public final String CHKFOOTERPAGENUMBERS_HID = HelpIds.getHelpIdString(HID + 28); - public final String TXTTEMPLATENAME_HID = HelpIds.getHelpIdString(HID + 29); - public final String FILETEMPLATEPATH_HID = HelpIds.getHelpIdString(HID + 30); - public final String OPTCREATEFAX_HID = HelpIds.getHelpIdString(HID + 31); - public final String OPTMAKECHANGES_HID = HelpIds.getHelpIdString(HID + 32); - public final String IMAGECONTROL2_HID = HelpIds.getHelpIdString(HID + 33); -} - diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java deleted file mode 100644 index 6f4792f341c9..000000000000 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java +++ /dev/null @@ -1,1073 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package com.sun.star.wizards.fax; - -import java.util.ArrayList; - -import com.sun.star.awt.VclWindowPeerAttribute; -import com.sun.star.awt.XTextComponent; -import com.sun.star.awt.XWindow; -import com.sun.star.awt.XWindowPeer; -import com.sun.star.beans.PropertyValue; -import com.sun.star.document.MacroExecMode; -import com.sun.star.document.XDocumentProperties; -import com.sun.star.document.XDocumentPropertiesSupplier; -import com.sun.star.graphic.XGraphic; -import com.sun.star.graphic.XGraphicProvider; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.task.XInteractionHandler; -import com.sun.star.text.XTextDocument; -import com.sun.star.uno.AnyConverter; -import com.sun.star.uno.Exception; -import com.sun.star.uno.RuntimeException; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import com.sun.star.util.CloseVetoException; -import com.sun.star.util.XCloseable; -import com.sun.star.wizards.common.Configuration; -import com.sun.star.wizards.common.Desktop; -import com.sun.star.wizards.common.FileAccess; -import com.sun.star.wizards.common.HelpIds; -import com.sun.star.wizards.common.Helper; -import com.sun.star.wizards.common.NoValidPathException; -import com.sun.star.wizards.common.PropertyNames; -import com.sun.star.wizards.common.SystemDialog; -import com.sun.star.wizards.document.OfficeDocument; -import com.sun.star.wizards.text.TextFieldHandler; -import com.sun.star.wizards.text.ViewHandler; -import com.sun.star.wizards.ui.PathSelection; -import com.sun.star.wizards.ui.XPathSelectionListener; -import com.sun.star.wizards.ui.event.DataAware; -import com.sun.star.wizards.ui.event.RadioDataAware; -import com.sun.star.wizards.ui.event.UnoDataAware; - -import com.sun.star.util.XSearchable; -import com.sun.star.util.XSearchDescriptor; -import com.sun.star.container.XIndexAccess; -import com.sun.star.text.*; -import com.sun.star.wizards.common.TextElement; -import com.sun.star.wizards.common.PlaceholderTextElement; - -import java.util.List; -import com.sun.star.beans.XPropertySet; - -public class FaxWizardDialogImpl extends FaxWizardDialog -{ - - protected void enterStep(int OldStep, int NewStep) - { - } - - protected void leaveStep(int OldStep, int NewStep) - { - } - static FaxDocument myFaxDoc; - static boolean running; - XTextDocument xTextDocument; - PathSelection myPathSelection; - CGFaxWizard myConfig; - ArrayList<DataAware> mainDA = new ArrayList<DataAware>(); - ArrayList<DataAware> faxDA = new ArrayList<DataAware>(); - String[][] BusinessFiles; - String[][] PrivateFiles; - String sTemplatePath; - String sUserTemplatePath; - String sBitmapPath; - String sFaxPath; - String sWorkPath; - String sPath; - boolean bEditTemplate; - boolean bSaveSuccess = false; - private boolean filenameChanged = false; - final static int RM_TYPESTYLE = 1; - final static int RM_ELEMENTS = 2; - final static int RM_SENDERRECEIVER = 3; - final static int RM_FOOTER = 4; - final static int RM_FINALSETTINGS = 5; - - List<XTextRange> constRangeList = new ArrayList<XTextRange>(); - XTextRange trTo, trFrom, trFaxconst, trTelconst, trEmailconst, trConsist1, trConsist2, trConsist3; - TextElement teTo, teFrom, teFaxconst, teTelconst, teEmailconst, teConsist1, teConsist2, teConsist3; - - public FaxWizardDialogImpl(XMultiServiceFactory xmsf) - { - super(xmsf); - } - - public static void main(String args[]) - { - //only being called when starting wizard remotely - - try - { - String ConnectStr = "uno:socket,host=127.0.0.1,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.ServiceManager"; - XMultiServiceFactory xLocMSF = Desktop.connect(ConnectStr); - FaxWizardDialogImpl lw = new FaxWizardDialogImpl(xLocMSF); - lw.startWizard(xLocMSF, null); - } - catch (RuntimeException e) - { - // TODO Auto-generated catch block - e.printStackTrace(); - } - catch (Exception e) - { - // TODO Auto-generated catch block - e.printStackTrace(); - } - catch (java.lang.Exception e) - { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - - public void startWizard(XMultiServiceFactory xMSF, Object[] CurPropertyValue) - { - - running = true; - try - { - //Number of steps on WizardDialog: - setMaxStep(5); - - //instatiate The Document Frame for the Preview - myFaxDoc = new FaxDocument(xMSF, this); - - //create the dialog: - drawNaviBar(); - buildStep1(); - buildStep2(); - buildStep3(); - buildStep4(); - buildStep5(); - - initializeSalutation(); - initializeGreeting(); - initializeCommunication(); - initializePaths(); - - //special Control for setting the save Path: - insertPathSelectionControl(); - - //load the last used settings from the registry and apply listeners to the controls: - initConfiguration(); - - initializeTemplates(xMSF); - - - //update the dialog UI according to the loaded Configuration - updateUI(); - - if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING)) - { - myPathSelection.initializePath(); - } - - XWindow xContainerWindow = myFaxDoc.xFrame.getContainerWindow(); - XWindowPeer xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow); - createWindowPeer(xWindowPeer); - - //add the Roadmap to the dialog: - insertRoadmap(); - - //load the last used document and apply last used settings: - //TODO: - setConfiguration(); - - //If the configuration does not define Greeting/Salutation/CommunicationType yet choose a default - setDefaultForGreetingAndSalutationAndCommunication(); - - //disable funtionality that is not supported by the template: - initializeElements(); - - //disable the document, so that the user cannot change anything: - myFaxDoc.xFrame.getComponentWindow().setEnable(false); - - executeDialog(myFaxDoc.xFrame); - removeTerminateListener(); - closeDocument(); - running = false; - - } - catch (Exception exception) - { - removeTerminateListener(); - exception.printStackTrace(System.err); - running = false; - } - } - - public void cancelWizard() - { - xDialog.endExecute(); - running = false; - } - - public boolean finishWizard() - { - switchToStep(getCurrentStep(), getMaxStep()); - myFaxDoc.setWizardTemplateDocInfo(resources.resFaxWizardDialog_title, resources.resTemplateDescription); - try - { - //myFaxDoc.xTextDocument.lockControllers(); - FileAccess fileAccess = new FileAccess(xMSF); - sPath = myPathSelection.getSelectedPath(); - if (sPath.equals(PropertyNames.EMPTY_STRING)) - { - myPathSelection.triggerPathPicker(); - sPath = myPathSelection.getSelectedPath(); - } - sPath = fileAccess.getURL(sPath); - - //first, if the filename was not changed, thus - //it is coming from a saved session, check if the - // file exists and warn the user. - if (!filenameChanged) - { - 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 false; - } - } - } - myFaxDoc.setWizardTemplateDocInfo(resources.resFaxWizardDialog_title, resources.resTemplateDescription); - myFaxDoc.killEmptyUserFields(); - myFaxDoc.keepLogoFrame = (chkUseLogo.getState() != 0); - myFaxDoc.keepTypeFrame = (chkUseCommunicationType.getState() != 0); - myFaxDoc.killEmptyFrames(); - - - bSaveSuccess = OfficeDocument.store(xMSF, xTextDocument, sPath, "writer8_template", false); - if (bSaveSuccess) - { - saveConfiguration(); - XInteractionHandler xIH = UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler")); - PropertyValue loadValues[] = new PropertyValue[4]; - loadValues[0] = new PropertyValue(); - loadValues[0].Name = "AsTemplate"; - loadValues[1] = new PropertyValue(); - loadValues[1].Name = "MacroExecutionMode"; - 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[3] = new PropertyValue(); - loadValues[3].Name = "InteractionHandler"; - loadValues[3].Value = xIH; - - - if (bEditTemplate) - { - loadValues[0].Value = Boolean.FALSE; - } - else - { - loadValues[0].Value = Boolean.TRUE; - } - Object oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), sPath, "_default", loadValues); - XTextDocument xTextDocument = (com.sun.star.text.XTextDocument) oDoc; - XMultiServiceFactory xDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument); - ViewHandler myViewHandler = new ViewHandler(xDocMSF, xTextDocument); - myViewHandler.setViewSetting("ZoomType", new Short(com.sun.star.view.DocumentZoomType.OPTIMAL)); - } - else - { - //TODO: Error Handling - } - } - catch (Exception e) - { - e.printStackTrace(); - } - finally - { - xDialog.endExecute(); - running = false; - } - return true; - } - - public void closeDocument() - { - try - { - //xComponent.dispose(); - XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, myFaxDoc.xFrame); - xCloseable.close(false); - } - catch (CloseVetoException e) - { - e.printStackTrace(); - } - } - - public void drawConstants() - { - constRangeList = searchFillInItems(1); - - XTextRange item = null; - - for (int i = 0; i < constRangeList.size(); i++) - { - item = constRangeList.get(i); - String text = item.getString().trim().toLowerCase(); - if (text.equals(resources.resToPlaceHolder)) - { - teTo = new PlaceholderTextElement(item, resources.resToPlaceHolder_value, "hint", myFaxDoc.xMSF); - trTo = item; - constRangeList.remove(i--); - writeTitle(teTo,trTo,resources.resToPlaceHolder_value); - } - else if (text.equals(resources.resFromPlaceHolder)) - { - teFrom = new PlaceholderTextElement(item, resources.resFromPlaceHolder_value, "hint", myFaxDoc.xMSF); - trFrom = item; - constRangeList.remove(i--); - writeTitle(teFrom,trFrom,resources.resFromPlaceHolder_value); - } - else if (text.equals(resources.resFaxconstPlaceHolder)) - { - teFaxconst = new PlaceholderTextElement(item, resources.resFaxconstPlaceHolder_value, "hint", myFaxDoc.xMSF); - trFaxconst = item; - constRangeList.remove(i--); - writeTitle(teFaxconst,trFaxconst,resources.resFaxconstPlaceHolder_value); - } - else if (text.equals(resources.resTelconstPlaceHolder)) - { - teTelconst = new PlaceholderTextElement(item, resources.resTelconstPlaceHolder_value, "hint", myFaxDoc.xMSF); - trTelconst = item; - constRangeList.remove(i--); - writeTitle(teTelconst,trTelconst,resources.resTelconstPlaceHolder_value); - } - else if (text.equals(resources.resEmailconstPlaceHolder)) - { - teEmailconst = new PlaceholderTextElement(item, resources.resEmailconstPlaceHolder_value, "hint", myFaxDoc.xMSF); - trEmailconst = item; - constRangeList.remove(i--); - writeTitle(teEmailconst,trEmailconst,resources.resEmailconstPlaceHolder_value); - } - else if (text.equals(resources.resConsist1PlaceHolder)) - { - teConsist1 = new PlaceholderTextElement(item, resources.resConsist1PlaceHolder_value, "hint", myFaxDoc.xMSF); - trConsist1 = item; - constRangeList.remove(i--); - writeTitle(teConsist1,trConsist1,resources.resConsist1PlaceHolder_value); - } - else if (text.equals(resources.resConsist2PlaceHolder)) - { - teConsist2 = new PlaceholderTextElement(item, resources.resConsist2PlaceHolder_value, "hint", myFaxDoc.xMSF); - trConsist2 = item; - constRangeList.remove(i--); - writeTitle(teConsist2,trConsist2,resources.resConsist2PlaceHolder_value); - } - else if (text.equals(resources.resConsist3PlaceHolder)) - { - teConsist3 = new PlaceholderTextElement(item, resources.resConsist3PlaceHolder_value, "hint", myFaxDoc.xMSF); - trConsist3 = item; - constRangeList.remove(i--); - writeTitle(teConsist3,trConsist3,resources.resConsist3PlaceHolder_value); - } - - } - } - - public void clearConstants() - { - constRangeList.clear(); - trTo = null; - trFrom = null; - trFaxconst = null; - trTelconst = null; - trEmailconst = null; - trConsist1 = null; - trConsist2 = null; - trConsist3 = null; - teTo = null; - teFrom = null; - teFaxconst = null; - teTelconst = null; - teEmailconst = null; - teConsist1 = null; - teConsist2 = null; - teConsist3 = null; - } - - private void writeTitle(TextElement te, XTextRange tr, String text) - { - te.setText(text == null ? PropertyNames.EMPTY_STRING : text); - te.write(tr); - } - - public List<XTextRange> searchFillInItems(int type) - { - try - { - XSearchable xSearchable = UnoRuntime.queryInterface(XSearchable.class, xTextDocument); - XSearchDescriptor sd = xSearchable.createSearchDescriptor(); - - if(type == 0) - { - sd.setSearchString("<[^>]+>"); - } - else if(type == 1) - { - sd.setSearchString("#[^#]+#"); - } - sd.setPropertyValue("SearchRegularExpression", Boolean.TRUE); - sd.setPropertyValue("SearchWords", Boolean.TRUE); - - XIndexAccess ia = xSearchable.findAll(sd); - - List<XTextRange> l = new ArrayList<XTextRange>(ia.getCount()); - for (int i = 0; i < ia.getCount(); i++) - { - try - { - l.add(UnoRuntime.queryInterface(XTextRange.class, ia.getByIndex(i))); - } - catch (Exception ex) - { - System.err.println("Nonfatal Error in finding fillins."); - } - } - return l; - } - catch (Exception ex) - { - ex.printStackTrace(); - throw new IllegalArgumentException("Fatal Error: Loading template failed: searching fillins failed"); - } - - } - - private void exchangeTitlesToLocalizedOnes() - { - for(int i = 0; i < BusinessFiles[0].length; ++i) - { - if( BusinessFiles[0][i].equals("Classic Fax") ) - { - BusinessFiles[0][i] = resources.resBusinessFaxClassic; - } - else if( BusinessFiles[0][i].equals("Classic Fax from Private") ) - { - BusinessFiles[0][i] = resources.resBusinessFaxClassicPrivate; - } - else if( BusinessFiles[0][i].equals("Modern Fax") ) - { - BusinessFiles[0][i] = resources.resBusinessFaxModern; - } - else if( BusinessFiles[0][i].equals("Modern Fax from Private") ) - { - BusinessFiles[0][i] = resources.resBusinessFaxModernPrivate; - } - } - - for(int i = 0; i < PrivateFiles[0].length; ++i) - { - if( PrivateFiles[0][i].equals("Bottle") ) - { - PrivateFiles[0][i] = resources.resPrivateFaxBottle; - } - else if( PrivateFiles[0][i].equals("Lines") ) - { - PrivateFiles[0][i] = resources.resPrivateFaxLines; - } - else if( PrivateFiles[0][i].equals("Marine") ) - { - PrivateFiles[0][i] = resources.resPrivateFaxMarine; - } - } - } - - public void insertRoadmap() - { - addRoadmap(); - int i = 0; - i = insertRoadmapItem(0, true, resources.RoadmapLabels[RM_TYPESTYLE], RM_TYPESTYLE); - i = insertRoadmapItem(i, true, resources.RoadmapLabels[RM_ELEMENTS], RM_ELEMENTS); - i = insertRoadmapItem(i, true, resources.RoadmapLabels[RM_SENDERRECEIVER], RM_SENDERRECEIVER); - i = insertRoadmapItem(i, false, resources.RoadmapLabels[RM_FOOTER], RM_FOOTER); - i = insertRoadmapItem(i, true, resources.RoadmapLabels[RM_FINALSETTINGS], RM_FINALSETTINGS); - setRoadmapInteractive(true); - setRoadmapComplete(true); - setCurrentRoadmapItemID((short) 1); - } - - private class myPathSelectionListener implements XPathSelectionListener - { - - public void validatePath() - { - if (myPathSelection.usedPathPicker) - { - filenameChanged = true; - } - myPathSelection.usedPathPicker = false; - } - } - - public void insertPathSelectionControl() - { - myPathSelection = new PathSelection(xMSF, this, PathSelection.TransferMode.SAVE, PathSelection.DialogTypes.FILE); - myPathSelection.insert(5, 97, 70, 205, (short) 45, resources.reslblTemplatePath_value, true, HelpIds.getHelpIdString(HID + 34), HelpIds.getHelpIdString(HID + 35)); - myPathSelection.sDefaultDirectory = sUserTemplatePath; - myPathSelection.sDefaultName = "myFaxTemplate.ott"; - myPathSelection.sDefaultFilter = "writer8_template"; - myPathSelection.addSelectionListener(new myPathSelectionListener()); - } - - private void insertIcons() - { - try - { - Object oGS = xMSF.createInstance("com.sun.star.graphic.GraphicProvider"); - XGraphicProvider xGraphicProvider = UnoRuntime.queryInterface(XGraphicProvider.class, oGS); - - PropertyValue GraphicValues[] = new PropertyValue[1]; - GraphicValues[0] = new PropertyValue(); - GraphicValues[0].Name = PropertyNames.URL; - GraphicValues[0].Value = "private:resource/svx/imagelist/18000/18022"; - XGraphic xGraphic = xGraphicProvider.queryGraphic(GraphicValues); - - } - catch (Exception e) - { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - - private void updateUI() - { - UnoDataAware.updateUI(mainDA); - UnoDataAware.updateUI(faxDA); - } - - private void initializePaths() - { - try - { - XInterface xPathInterface = (XInterface) xMSF.createInstance("com.sun.star.util.PathSettings"); - XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xPathInterface); - sTemplatePath = ((String[]) xPropertySet.getPropertyValue("Template_user"))[0]; - sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", PropertyNames.EMPTY_STRING); - sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap"); - } - catch (NoValidPathException e) - { - e.printStackTrace(); - } - catch (Exception e) - { - e.printStackTrace(); - } - } - - public boolean initializeTemplates(XMultiServiceFactory xMSF) - { - try - { - String sFaxSubPath = "/wizard/fax"; - sFaxPath = FileAccess.combinePaths(xMSF, sTemplatePath, sFaxSubPath); - sWorkPath = FileAccess.getOfficePath(xMSF, "Work", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING); - - BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", sFaxPath); - PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", sFaxPath); - - exchangeTitlesToLocalizedOnes(); - - setControlProperty("lstBusinessStyle", PropertyNames.STRING_ITEM_LIST, BusinessFiles[0]); - setControlProperty("lstPrivateStyle", PropertyNames.STRING_ITEM_LIST, PrivateFiles[0]); - - setControlProperty("lstBusinessStyle", PropertyNames.SELECTED_ITEMS, new short[] - { - 0 - }); - setControlProperty("lstPrivateStyle", PropertyNames.SELECTED_ITEMS, new short[] - { - 0 - }); - - return true; - } - catch (NoValidPathException e) - { - // TODO Auto-generated catch block - e.printStackTrace(); - return false; - } - } - - public void initializeElements() - { - setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myFaxDoc.hasElement("Company Logo"))); - setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myFaxDoc.hasElement("Subject Line"))); - setControlProperty("chkUseDate", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myFaxDoc.hasElement("Date"))); - myFaxDoc.updateDateFields(); - } - - public void initializeSalutation() - { - setControlProperty("lstSalutation", PropertyNames.STRING_ITEM_LIST, resources.SalutationLabels); - } - - public void initializeGreeting() - { - setControlProperty("lstGreeting", PropertyNames.STRING_ITEM_LIST, resources.GreetingLabels); - } - - public void initializeCommunication() - { - setControlProperty("lstCommunicationType", PropertyNames.STRING_ITEM_LIST, resources.CommunicationLabels); - } - - private void setDefaultForGreetingAndSalutationAndCommunication() - { - XTextComponent xTextComponent; - xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); - if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING)) - { - xTextComponent.setText(resources.SalutationLabels[0]); - } - xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); - if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING)) - { - xTextComponent.setText(resources.GreetingLabels[0]); - } - xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType); - if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING)) - { - xTextComponent.setText(resources.CommunicationLabels[0]); - } - } - - public void initConfiguration() - { - try - { - myConfig = new CGFaxWizard(); - Object root = Configuration.getConfigurationRoot(xMSF, "/org.openoffice.Office.Writer/Wizards/Fax", false); - myConfig.readConfiguration(root, "cp_"); - mainDA.add(RadioDataAware.attachRadioButtons(myConfig, "cp_FaxType", new Object[] - { - optBusinessFax, optPrivateFax - }, null, true)); - mainDA.add(UnoDataAware.attachListBox(myConfig.cp_BusinessFax, "cp_Style", lstBusinessStyle, null, true)); - mainDA.add(UnoDataAware.attachListBox(myConfig.cp_PrivateFax, "cp_Style", lstPrivateStyle, null, true)); - - CGFax cgl = myConfig.cp_BusinessFax; - - faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintCompanyLogo", chkUseLogo, null, true)); - faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintSubjectLine", chkUseSubject, null, true)); - faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintSalutation", chkUseSalutation, null, true)); - faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintDate", chkUseDate, null, true)); - faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintCommunicationType", chkUseCommunicationType, null, true)); - faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintGreeting", chkUseGreeting, null, true)); - faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintFooter", chkUseFooter, null, true)); - faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_Salutation", lstSalutation, null, true)); - faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_Greeting", lstGreeting, null, true)); - faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_CommunicationType", lstCommunicationType, null, true)); - faxDA.add(RadioDataAware.attachRadioButtons(cgl, "cp_SenderAddressType", new Object[] - { - optSenderDefine, optSenderPlaceholder - }, null, true)); - faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderCompanyName", txtSenderName, null, true)); - faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderStreet", txtSenderStreet, null, true)); - faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderPostCode", txtSenderPostCode, null, true)); - faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderState", txtSenderState, null, true)); - faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderCity", txtSenderCity, null, true)); - faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderFax", txtSenderFax, null, true)); - faxDA.add(RadioDataAware.attachRadioButtons(cgl, "cp_ReceiverAddressType", new Object[] - { - optReceiverDatabase, optReceiverPlaceholder - }, null, true)); - faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_Footer", txtFooter, null, true)); - faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_FooterOnlySecondPage", chkFooterNextPages, null, true)); - faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_FooterPageNumbers", chkFooterPageNumbers, null, true)); - faxDA.add(RadioDataAware.attachRadioButtons(cgl, "cp_CreationType", new Object[] - { - optCreateFax, optMakeChanges - }, null, true)); - faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_TemplateName", txtTemplateName, null, true)); - faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_TemplatePath", myPathSelection.xSaveTextBox, null, true)); - - } - catch (Exception exception) - { - exception.printStackTrace(); - } - - } - - public void saveConfiguration() - { - try - { - Object root = Configuration.getConfigurationRoot(xMSF, "/org.openoffice.Office.Writer/Wizards/Fax", true); - myConfig.writeConfiguration(root, "cp_"); - Configuration.commit(root); - } - catch (Exception e) - { - e.printStackTrace(); - } - } - - public void setConfiguration() - { - //set correct Configuration tree: - if (optBusinessFax.getState()) - { - optBusinessFaxItemChanged(); - } - if (optPrivateFax.getState()) - { - optPrivateFaxItemChanged(); - } - } - - public void optBusinessFaxItemChanged() - { - DataAware.setDataObject(faxDA, myConfig.cp_BusinessFax, true); - setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); - setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); - setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); - setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); - lstBusinessStyleItemChanged(); - enableSenderReceiver(); - setPossibleFooter(true); - } - - public void lstBusinessStyleItemChanged() - { - xTextDocument = myFaxDoc.loadAsPreview(BusinessFiles[1][lstBusinessStyle.getSelectedItemPos()], false); - initializeElements(); - setElements(); - clearConstants(); - drawConstants(); - } - - public void optPrivateFaxItemChanged() - { - DataAware.setDataObject(faxDA, myConfig.cp_PrivateFax, true); - setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); - setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); - setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); - setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); - lstPrivateStyleItemChanged(); - disableSenderReceiver(); - setPossibleFooter(false); - } - - public void lstPrivateStyleItemChanged() - { - xTextDocument = myFaxDoc.loadAsPreview(PrivateFiles[1][lstPrivateStyle.getSelectedItemPos()], false); - initializeElements(); - setElements(); - } - - public void txtTemplateNameTextChanged() - { - XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument); - XDocumentProperties xDocProps = xDocPropsSuppl.getDocumentProperties(); - String TitleName = txtTemplateName.getText(); - xDocProps.setTitle(TitleName); - } - - public void optSenderPlaceholderItemChanged() - { - setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); - setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); - setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); - setControlProperty("lblSenderFax", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); - setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); - setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); - setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); - setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); - setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); - setControlProperty("txtSenderFax", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); - myFaxDoc.fillSenderWithUserData(); - } - - public void optSenderDefineItemChanged() - { - setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); - setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); - setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); - setControlProperty("lblSenderFax", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); - setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); - setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); - setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); - setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); - setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); - setControlProperty("txtSenderFax", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); - txtSenderNameTextChanged(); - txtSenderStreetTextChanged(); - txtSenderPostCodeTextChanged(); - txtSenderStateTextChanged(); - txtSenderCityTextChanged(); - txtSenderFaxTextChanged(); - } - - public void optReceiverPlaceholderItemChanged() - { - OfficeDocument.attachEventCall(xTextDocument, "OnNew", "StarBasic", "macro:///Template.Correspondence.Placeholder()"); - } - - public void optReceiverDatabaseItemChanged() - { - OfficeDocument.attachEventCall(xTextDocument, "OnNew", "StarBasic", "macro:///Template.Correspondence.Database()"); - } - - public void optCreateFaxItemChanged() - { - bEditTemplate = false; - } - - public void optMakeChangesItemChanged() - { - bEditTemplate = true; - } - - public void txtSenderNameTextChanged() - { - TextFieldHandler myFieldHandler = new TextFieldHandler(myFaxDoc.xMSF, xTextDocument); - myFieldHandler.changeUserFieldContent("Company", txtSenderName.getText()); - } - - public void txtSenderStreetTextChanged() - { - TextFieldHandler myFieldHandler = new TextFieldHandler(myFaxDoc.xMSF, xTextDocument); - myFieldHandler.changeUserFieldContent("Street", txtSenderStreet.getText()); - } - - public void txtSenderCityTextChanged() - { - TextFieldHandler myFieldHandler = new TextFieldHandler(myFaxDoc.xMSF, xTextDocument); - myFieldHandler.changeUserFieldContent("City", txtSenderCity.getText()); - } - - public void txtSenderPostCodeTextChanged() - { - TextFieldHandler myFieldHandler = new TextFieldHandler(myFaxDoc.xMSF, xTextDocument); - myFieldHandler.changeUserFieldContent("PostCode", txtSenderPostCode.getText()); - } - - public void txtSenderStateTextChanged() - { - TextFieldHandler myFieldHandler = new TextFieldHandler(myFaxDoc.xMSF, xTextDocument); - myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, txtSenderState.getText()); - } - - public void txtSenderFaxTextChanged() - { - TextFieldHandler myFieldHandler = new TextFieldHandler(myFaxDoc.xMSF, xTextDocument); - myFieldHandler.changeUserFieldContent("Fax", txtSenderFax.getText()); - } - //switch Elements on/off ------------------------------------------------------- - public void setElements() - { - //UI relevant: - if (optSenderDefine.getState()) - { - optSenderDefineItemChanged(); - } - if (optSenderPlaceholder.getState()) - { - optSenderPlaceholderItemChanged(); - } - chkUseLogoItemChanged(); - chkUseSubjectItemChanged(); - chkUseSalutationItemChanged(); - chkUseGreetingItemChanged(); - chkUseCommunicationItemChanged(); - chkUseDateItemChanged(); - chkUseFooterItemChanged(); - txtTemplateNameTextChanged(); - - //not UI relevant: - if (optReceiverDatabase.getState()) - { - optReceiverDatabaseItemChanged(); - } - if (optReceiverPlaceholder.getState()) - { - optReceiverPlaceholderItemChanged(); - } - if (optCreateFax.getState()) - { - optCreateFaxItemChanged(); - } - if (optMakeChanges.getState()) - { - optMakeChangesItemChanged(); - } - } - - public void chkUseLogoItemChanged() - { - if (myFaxDoc.hasElement("Company Logo")) - { - myFaxDoc.switchElement("Company Logo", (chkUseLogo.getState() != 0)); - } - } - - public void chkUseSubjectItemChanged() - { - if (myFaxDoc.hasElement("Subject Line")) - { - myFaxDoc.switchElement("Subject Line", (chkUseSubject.getState() != 0)); - } - } - - public void chkUseDateItemChanged() - { - if (myFaxDoc.hasElement("Date")) - { - myFaxDoc.switchElement("Date", (chkUseDate.getState() != 0)); - } - } - - public void chkUseFooterItemChanged() - { - try - { - boolean bFooterPossible = (chkUseFooter.getState() != 0) && AnyConverter.toBoolean(getControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED)); - - if (chkFooterNextPages.getState() != 0) - { - myFaxDoc.switchFooter("First Page", false, (chkFooterPageNumbers.getState() != 0), txtFooter.getText()); - myFaxDoc.switchFooter("Standard", bFooterPossible, (chkFooterPageNumbers.getState() != 0), txtFooter.getText()); - } - else - { - myFaxDoc.switchFooter("First Page", bFooterPossible, (chkFooterPageNumbers.getState() != 0), txtFooter.getText()); - myFaxDoc.switchFooter("Standard", bFooterPossible, (chkFooterPageNumbers.getState() != 0), txtFooter.getText()); - } - - //enable/disable roadmap item for footer page - XInterface BPaperItem = getRoadmapItemByID(RM_FOOTER); - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bFooterPossible)); - - } - catch (Exception exception) - { - exception.printStackTrace(System.err); - } - } - - public void chkFooterNextPagesItemChanged() - { - chkUseFooterItemChanged(); - } - - public void chkFooterPageNumbersItemChanged() - { - chkUseFooterItemChanged(); - } - - public void txtFooterTextChanged() - { - chkUseFooterItemChanged(); - } - - public void chkUseSalutationItemChanged() - { - XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); - myFaxDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0)); - setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseSalutation.getState() != 0)); - } - - public void lstSalutationItemChanged() - { - XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); - myFaxDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0)); - } - - public void lstSalutationTextChanged() - { - } - - public void chkUseCommunicationItemChanged() - { - XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType); - myFaxDoc.switchUserField("CommunicationType", xTextComponent.getText(), (chkUseCommunicationType.getState() != 0)); - setControlProperty("lstCommunicationType", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseCommunicationType.getState() != 0)); - } - - public void lstCommunicationItemChanged() - { - XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType); - myFaxDoc.switchUserField("CommunicationType", xTextComponent.getText(), (chkUseCommunicationType.getState() != 0)); - } - - public void lstCommunicationTextChanged() - { - } - - public void chkUseGreetingItemChanged() - { - XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); - myFaxDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0)); - setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseGreeting.getState() != 0)); - } - - public void lstGreetingItemChanged() - { - XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); - myFaxDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0)); - } - - public void lstGreetingTextChanged() - { - } - - private void setPossibleFooter(boolean bState) - { - setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState)); - if (!bState) - { - chkUseFooter.setState((short) 0); - } - chkUseFooterItemChanged(); - } - - private void enableSenderReceiver() - { - XInterface BPaperItem = getRoadmapItemByID(RM_SENDERRECEIVER); - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); - } - - private void disableSenderReceiver() - { - XInterface BPaperItem = getRoadmapItemByID(RM_SENDERRECEIVER); - Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); - } -} - - - - - diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java deleted file mode 100644 index fce209faf65b..000000000000 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package com.sun.star.wizards.fax; - -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.wizards.common.Resource; - -public class FaxWizardDialogResources extends Resource -{ - - final static String UNIT_NAME = "dbwizres"; - final static String MODULE_NAME = "dbw"; - final static int RID_FAXWIZARDDIALOG_START = 3200; - final static int RID_FAXWIZARDCOMMUNICATION_START = 3270; - final static int RID_FAXWIZARDGREETING_START = 3280; - final static int RID_FAXWIZARDSALUTATION_START = 3290; - final static int RID_FAXWIZARDROADMAP_START = 3300; - final static int RID_RID_COMMON_START = 500; - protected String[] RoadmapLabels = new String[7]; - protected String[] SalutationLabels = new String[4]; - protected String[] GreetingLabels = new String[4]; - protected String[] CommunicationLabels = new String[3]; - String resOverwriteWarning; - String resTemplateDescription; - String resFaxWizardDialog_title; - String resLabel9_value; - String resoptBusinessFax_value; - String resoptPrivateFax_value; - String reschkUseLogo_value; - String reschkUseSubject_value; - String reschkUseSalutation_value; - String reschkUseGreeting_value; - String reschkUseFooter_value; - String resoptSenderPlaceholder_value; - String resoptSenderDefine_value; - String restxtTemplateName_value; - String resoptCreateFax_value; - String resoptMakeChanges_value; - String reslblBusinessStyle_value; - String reslblPrivateStyle_value; - String reslblIntroduction_value; - String reslblSenderAddress_value; - String reslblSenderName_value; - String reslblSenderStreet_value; - String reslblPostCodeCity_value; - String reslblFooter_value; - String reslblFinalExplanation1_value; - String reslblFinalExplanation2_value; - String reslblTemplateName_value; - String reslblTemplatePath_value; - String reslblProceed_value; - String reslblTitle1_value; - String reslblTitle3_value; - String reslblTitle4_value; - String reslblTitle5_value; - String reslblTitle6_value; - String reschkFooterNextPages_value; - String reschkFooterPageNumbers_value; - String reschkUseDate_value; - String reschkUseCommunicationType_value; - String resLabel1_value; - String resoptReceiverPlaceholder_value; - String resoptReceiverDatabase_value; - String resLabel2_value; - - String resToPlaceHolder = "#to#"; - String resFromPlaceHolder = "#from#"; - String resFaxconstPlaceHolder = "#faxconst#"; - String resTelconstPlaceHolder = "#telconst#"; - String resEmailconstPlaceHolder = "#emailconst#"; - String resConsist1PlaceHolder = "#consist1#"; - String resConsist2PlaceHolder = "#consist2#"; - String resConsist3PlaceHolder = "#consist3#"; - - String resToPlaceHolder_value; - String resFromPlaceHolder_value; - String resFaxconstPlaceHolder_value; - String resTelconstPlaceHolder_value; - String resEmailconstPlaceHolder_value; - String resConsist1PlaceHolder_value; - String resConsist2PlaceHolder_value; - String resConsist3PlaceHolder_value; - - String resPrivateFaxBottle; - String resPrivateFaxLines; - String resPrivateFaxMarine; - String resBusinessFaxClassic; - String resBusinessFaxClassicPrivate; - String resBusinessFaxModern; - String resBusinessFaxModernPrivate; - - public FaxWizardDialogResources(XMultiServiceFactory xmsf) - { - super(xmsf, UNIT_NAME, MODULE_NAME); - /** - * Delete the String, uncomment the getResText method - * - */ - resFaxWizardDialog_title = getResText(RID_FAXWIZARDDIALOG_START + 1); - resLabel9_value = getResText(RID_FAXWIZARDDIALOG_START + 2); - resoptBusinessFax_value = getResText(RID_FAXWIZARDDIALOG_START + 3); - resoptPrivateFax_value = getResText(RID_FAXWIZARDDIALOG_START + 4); - reschkUseLogo_value = getResText(RID_FAXWIZARDDIALOG_START + 5); - reschkUseSubject_value = getResText(RID_FAXWIZARDDIALOG_START + 6); - reschkUseSalutation_value = getResText(RID_FAXWIZARDDIALOG_START + 7); - reschkUseGreeting_value = getResText(RID_FAXWIZARDDIALOG_START + 8); - reschkUseFooter_value = getResText(RID_FAXWIZARDDIALOG_START + 9); - resoptSenderPlaceholder_value = getResText(RID_FAXWIZARDDIALOG_START + 10); - resoptSenderDefine_value = getResText(RID_FAXWIZARDDIALOG_START + 11); - restxtTemplateName_value = getResText(RID_FAXWIZARDDIALOG_START + 12); - resoptCreateFax_value = getResText(RID_FAXWIZARDDIALOG_START + 13); - resoptMakeChanges_value = getResText(RID_FAXWIZARDDIALOG_START + 14); - reslblBusinessStyle_value = getResText(RID_FAXWIZARDDIALOG_START + 15); - reslblPrivateStyle_value = getResText(RID_FAXWIZARDDIALOG_START + 16); - reslblIntroduction_value = getResText(RID_FAXWIZARDDIALOG_START + 17); - reslblSenderAddress_value = getResText(RID_FAXWIZARDDIALOG_START + 18); - reslblSenderName_value = getResText(RID_FAXWIZARDDIALOG_START + 19); - reslblSenderStreet_value = getResText(RID_FAXWIZARDDIALOG_START + 20); - reslblPostCodeCity_value = getResText(RID_FAXWIZARDDIALOG_START + 21); - reslblFooter_value = getResText(RID_FAXWIZARDDIALOG_START + 22); - reslblFinalExplanation1_value = getResText(RID_FAXWIZARDDIALOG_START + 23); - reslblFinalExplanation2_value = getResText(RID_FAXWIZARDDIALOG_START + 24); - reslblTemplateName_value = getResText(RID_FAXWIZARDDIALOG_START + 25); - reslblTemplatePath_value = getResText(RID_FAXWIZARDDIALOG_START + 26); - reslblProceed_value = getResText(RID_FAXWIZARDDIALOG_START + 27); - reslblTitle1_value = getResText(RID_FAXWIZARDDIALOG_START + 28); - reslblTitle3_value = getResText(RID_FAXWIZARDDIALOG_START + 29); - reslblTitle4_value = getResText(RID_FAXWIZARDDIALOG_START + 30); - reslblTitle5_value = getResText(RID_FAXWIZARDDIALOG_START + 31); - reslblTitle6_value = getResText(RID_FAXWIZARDDIALOG_START + 32); - reschkFooterNextPages_value = getResText(RID_FAXWIZARDDIALOG_START + 33); - reschkFooterPageNumbers_value = getResText(RID_FAXWIZARDDIALOG_START + 34); - reschkUseDate_value = getResText(RID_FAXWIZARDDIALOG_START + 35); - reschkUseCommunicationType_value = getResText(RID_FAXWIZARDDIALOG_START + 36); - resLabel1_value = getResText(RID_FAXWIZARDDIALOG_START + 37); - resoptReceiverPlaceholder_value = getResText(RID_FAXWIZARDDIALOG_START + 38); - resoptReceiverDatabase_value = getResText(RID_FAXWIZARDDIALOG_START + 39); - resLabel2_value = getResText(RID_FAXWIZARDDIALOG_START + 40); - - resToPlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 41); - resFromPlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 42); - resFaxconstPlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 43); - resTelconstPlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 44); - resEmailconstPlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 45); - resConsist1PlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 46); - resConsist2PlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 47); - resConsist3PlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 48); - - resPrivateFaxBottle = getResText(RID_FAXWIZARDDIALOG_START + 49); - resPrivateFaxLines = getResText(RID_FAXWIZARDDIALOG_START + 50); - resPrivateFaxMarine = getResText(RID_FAXWIZARDDIALOG_START + 51); - resBusinessFaxClassic = getResText(RID_FAXWIZARDDIALOG_START + 52); - resBusinessFaxClassicPrivate = getResText(RID_FAXWIZARDDIALOG_START + 53); - resBusinessFaxModern = getResText(RID_FAXWIZARDDIALOG_START + 54); - resBusinessFaxModernPrivate = getResText(RID_FAXWIZARDDIALOG_START + 55); - - loadRoadmapResources(); - loadSalutationResources(); - loadGreetingResources(); - loadCommunicationResources(); - 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 < 6; i++) - { - RoadmapLabels[i] = getResText(RID_FAXWIZARDROADMAP_START + i); - } - } - - private void loadSalutationResources() - { - for (int i = 1; i < 5; i++) - { - SalutationLabels[i - 1] = getResText(RID_FAXWIZARDSALUTATION_START + i); - } - } - - private void loadGreetingResources() - { - for (int i = 1; i < 5; i++) - { - GreetingLabels[i - 1] = getResText(RID_FAXWIZARDGREETING_START + i); - } - } - - private void loadCommunicationResources() - { - for (int i = 1; i < 4; i++) - { - CommunicationLabels[i - 1] = getResText(RID_FAXWIZARDCOMMUNICATION_START + i); - } - } -} diff --git a/wizards/com/sun/star/wizards/fax/MANIFEST.MF b/wizards/com/sun/star/wizards/fax/MANIFEST.MF deleted file mode 100644 index 4e699ee9073b..000000000000 --- a/wizards/com/sun/star/wizards/fax/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -RegistrationClassName: com.sun.star.wizards.fax.CallWizard -UNO-Type-Path: diff --git a/wizards/com/sun/star/wizards/fax/fax.component b/wizards/com/sun/star/wizards/fax/fax.component index 6769ece0076a..abc871137fbf 100644 --- a/wizards/com/sun/star/wizards/fax/fax.component +++ b/wizards/com/sun/star/wizards/fax/fax.component @@ -15,12 +15,10 @@ * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . - --> - -<component loader="com.sun.star.loader.Java2" +--> +<component loader="com.sun.star.loader.Python" xmlns="http://openoffice.org/2010/uno-components"> - <implementation - name="com.sun.star.wizards.fax.CallWizard$WizardImplementation"> - <service name="com.sun.star.wizards.fax.CallWizard"/> + <implementation name="com.sun.star.wizards.fax.CallWizard"> + <service name="com.sun.star.task.Job"/> </implementation> </component> diff --git a/wizards/com/sun/star/wizards/fax/pyfax.component b/wizards/com/sun/star/wizards/fax/pyfax.component deleted file mode 100644 index abc871137fbf..000000000000 --- a/wizards/com/sun/star/wizards/fax/pyfax.component +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . ---> -<component loader="com.sun.star.loader.Python" - xmlns="http://openoffice.org/2010/uno-components"> - <implementation name="com.sun.star.wizards.fax.CallWizard"> - <service name="com.sun.star.task.Job"/> - </implementation> -</component> |