diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-23 12:36:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-24 16:38:31 +0200 |
commit | a95def1aed681bbb664ff24470e0da7c5a5530ac (patch) | |
tree | be2faa5bea4f931e4ac84ec3c1523a4fb60c7ab1 /wizards/com | |
parent | 99b7c4f57d7fe3cac772cce38e2dd6879e128315 (diff) |
convert java wizards to .properties for translations
like LibreOffice java extensions, and nlpsolver and librelogo, do, removes the
magic number problem
Change-Id: I561249ccebe41c787cd8cdaa80e1d035f27052cc
Reviewed-on: https://gerrit.libreoffice.org/37986
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'wizards/com')
50 files changed, 354 insertions, 369 deletions
diff --git a/wizards/com/sun/star/wizards/common/Configuration.java b/wizards/com/sun/star/wizards/common/Configuration.java index 3fcef49e8991..378ad9f3fa8d 100644 --- a/wizards/com/sun/star/wizards/common/Configuration.java +++ b/wizards/com/sun/star/wizards/common/Configuration.java @@ -120,6 +120,11 @@ public abstract class Configuration return getLocale(xMSF, "org.openoffice.Setup/L10N/", "ooSetupSystemLocale"); } + public static Locale getUILocale(XMultiServiceFactory xMSF) + { + return getLocale(xMSF, "org.openoffice.Setup/L10N/", "ooLocale"); + } + public static String[] getNodeDisplayNames(XNameAccess _xNameAccessNode) { return getNodeChildNames(_xNameAccessNode, PropertyNames.PROPERTY_NAME); diff --git a/wizards/com/sun/star/wizards/common/InvalidQueryException.java b/wizards/com/sun/star/wizards/common/InvalidQueryException.java index 56a54ebd7ae7..a4ac8f90a190 100644 --- a/wizards/com/sun/star/wizards/common/InvalidQueryException.java +++ b/wizards/com/sun/star/wizards/common/InvalidQueryException.java @@ -24,14 +24,12 @@ public class InvalidQueryException extends java.lang.Throwable // TODO don't show messages in Exceptions public InvalidQueryException(XMultiServiceFactory xMSF, String sCommand) { - final int RID_REPORT = 2400; - SystemDialog.showErrorBox(xMSF, "dbw", RID_REPORT + 65, "<STATEMENT>", sCommand); // Querycreationnotpossible + SystemDialog.showErrorBox(xMSF, "RID_REPORT_65", "<STATEMENT>", sCommand); // Querycreationnotpossible } // TODO don't show messages in Exceptions public InvalidQueryException(XMultiServiceFactory xMSF, String sCommand, Throwable cause) { super(cause); - final int RID_REPORT = 2400; - SystemDialog.showErrorBox(xMSF, "dbw", RID_REPORT + 65, "<STATEMENT>", sCommand); // Querycreationnotpossible + SystemDialog.showErrorBox(xMSF, "RID_REPORT_65", "<STATEMENT>", sCommand); // Querycreationnotpossible } } diff --git a/wizards/com/sun/star/wizards/common/NoValidPathException.java b/wizards/com/sun/star/wizards/common/NoValidPathException.java index 2881a79e7a06..3dd465953b17 100644 --- a/wizards/com/sun/star/wizards/common/NoValidPathException.java +++ b/wizards/com/sun/star/wizards/common/NoValidPathException.java @@ -28,7 +28,7 @@ public class NoValidPathException extends Exception // TODO: NEVER open a dialog in an exception if (xMSF != null) { - SystemDialog.showErrorBox(xMSF, "dbw", 521); // OfficePathnotavailable + SystemDialog.showErrorBox(xMSF, "RID_COMMON_21"); // OfficePathnotavailable } } @@ -38,7 +38,7 @@ public class NoValidPathException extends Exception // TODO: NEVER open a dialog in an exception if (xMSF != null) { - SystemDialog.showErrorBox(xMSF, "dbw", 521); // OfficePathnotavailable + SystemDialog.showErrorBox(xMSF, "RID_COMMON_21"); // OfficePathnotavailable } } } diff --git a/wizards/com/sun/star/wizards/common/Resource.java b/wizards/com/sun/star/wizards/common/Resource.java index 7158bad13f4b..0da8f97566e6 100644 --- a/wizards/com/sun/star/wizards/common/Resource.java +++ b/wizards/com/sun/star/wizards/common/Resource.java @@ -18,76 +18,44 @@ package com.sun.star.wizards.common; -import com.sun.star.container.XIndexAccess; -import com.sun.star.container.XNameAccess; +import com.sun.star.beans.PropertyState; +import com.sun.star.beans.PropertyValue; +import com.sun.star.beans.XPropertySet; +import com.sun.star.configuration.theDefaultProvider; +import com.sun.star.lang.Locale; import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.resource.StringResourceWithLocation; +import com.sun.star.resource.XStringResourceWithLocation; +import com.sun.star.util.XMacroExpander; +import com.sun.star.uno.AnyConverter; +import com.sun.star.uno.XComponentContext; import com.sun.star.uno.XInterface; import com.sun.star.uno.UnoRuntime; -public class Resource +public final class Resource { + private XStringResourceWithLocation m_xStrResource; - private XIndexAccess xStringIndexAccess; - - /** Creates a new instance of Resource + /** + * <p>Load the resource bundle that contains the resource {@code String} + * values.</p> */ - public Resource(XMultiServiceFactory _xMSF, String _Module) - { - try - { - Object[] aArgs = new Object[] { _Module }; - XInterface xResource = (XInterface) _xMSF.createInstanceWithArguments( - "org.libreoffice.resource.ResourceIndexAccess", - aArgs); - if (xResource == null) - throw new Exception("could not initialize ResourceIndexAccess"); - XNameAccess xNameAccess = UnoRuntime.queryInterface( - XNameAccess.class, - xResource); - if (xNameAccess == null) - throw new Exception("ResourceIndexAccess is no XNameAccess"); - this.xStringIndexAccess = UnoRuntime.queryInterface( - XIndexAccess.class, - xNameAccess.getByName("String")); - if(this.xStringIndexAccess == null) - throw new Exception("could not initialize xStringIndexAccess"); - } - catch (Exception exception) - { - exception.printStackTrace(); - showCommonResourceError(_xMSF); - } - } - - public String getResText(int nID) - { - try - { - return (String)this.xStringIndexAccess.getByIndex(nID); - } - catch (Exception exception) - { - throw new java.lang.IllegalArgumentException("Resource with ID not " + nID + "not found", exception); - } + public Resource(XMultiServiceFactory xMSF) { + XComponentContext xContext = Helper.getComponentContext(xMSF); + XMacroExpander xExpander = Helper.getMacroExpander(xMSF); + String sPath = xExpander.expandMacros("$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/wizards/"); + Locale locale = Configuration.getUILocale(xMSF); + m_xStrResource = StringResourceWithLocation.create(xContext, sPath, true, locale, "resources", "", null); } - - - public String[] getResArray(int nID, int iCount) - { - try - { - String[] ResArray = new String[iCount]; - for (int i = 0; i < iCount; i++) - { - ResArray[i] = getResText(nID + i); - } - return ResArray; - } - catch (Exception exception) - { - throw new java.lang.IllegalArgumentException("Resource with ID not" + nID + "not found", exception); - } + /** + * This method returns the corresponding {@code String} given the key. + * + * @param key Key string for getting the message {@code String}. + * @return Message {@code String} corresponding to the key. + */ + public String getResText(String key) { + return m_xStrResource.resolveString(key); } public static void showCommonResourceError(XMultiServiceFactory xMSF) diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.java b/wizards/com/sun/star/wizards/common/SystemDialog.java index a9800bc867c9..73be87b5aacc 100644 --- a/wizards/com/sun/star/wizards/common/SystemDialog.java +++ b/wizards/com/sun/star/wizards/common/SystemDialog.java @@ -29,11 +29,11 @@ import com.sun.star.awt.XMessageBox; public class SystemDialog { - public static int showErrorBox(XMultiServiceFactory xMSF, String ResPrefix, int ResID, String AddTag, String AddString) + public static int showErrorBox(XMultiServiceFactory xMSF, String ResID, String AddTag, String AddString) { Resource oResource; String ProductName = Configuration.getProductName(xMSF); - oResource = new Resource(xMSF, ResPrefix); + oResource = new Resource(xMSF); String sErrorMessage = oResource.getResText(ResID); sErrorMessage = JavaTools.replaceSubString(sErrorMessage, ProductName, "%PRODUCTNAME"); sErrorMessage = JavaTools.replaceSubString(sErrorMessage, String.valueOf((char) 13), "<BR>"); @@ -41,11 +41,11 @@ public class SystemDialog return SystemDialog.showMessageBox(xMSF, "ErrorBox", com.sun.star.awt.VclWindowPeerAttribute.OK, sErrorMessage); } - public static int showErrorBox(XMultiServiceFactory xMSF, String ResPrefix, int ResID) + public static int showErrorBox(XMultiServiceFactory xMSF, String ResID) { Resource oResource; String ProductName = Configuration.getProductName(xMSF); - oResource = new Resource(xMSF, ResPrefix); + oResource = new Resource(xMSF); String sErrorMessage = oResource.getResText(ResID); sErrorMessage = JavaTools.replaceSubString(sErrorMessage, ProductName, "%PRODUCTNAME"); sErrorMessage = JavaTools.replaceSubString(sErrorMessage, String.valueOf((char) 13), "<BR>"); diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java index 5b2b09ca31a1..28180382f2b1 100644 --- a/wizards/com/sun/star/wizards/db/CommandMetaData.java +++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java @@ -291,8 +291,8 @@ public class CommandMetaData extends DBMetaData { exception.printStackTrace(System.err); } - Resource oResource = new Resource(xMSF, "dbw"); - String sMsgNoFieldsFromCommand = oResource.getResText(RID_DB_COMMON + 45); + Resource oResource = new Resource(xMSF); + String sMsgNoFieldsFromCommand = oResource.getResText("RID_DB_COMMON_45"); sMsgNoFieldsFromCommand = JavaTools.replaceSubString(sMsgNoFieldsFromCommand, _commandname, "%NAME"); showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, sMsgNoFieldsFromCommand); return false; diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index 99b48405b1d1..8d90126d3e5e 100644 --- a/wizards/com/sun/star/wizards/db/DBMetaData.java +++ b/wizards/com/sun/star/wizards/db/DBMetaData.java @@ -131,7 +131,6 @@ public class DBMetaData private int iMaxTableNameLength = -1; private boolean bPasswordIsRequired; private static final int NOLIMIT = 9999999; - protected static final int RID_DB_COMMON = 1000; private static final int INVALID = 9999999; public TypeInspector oTypeInspector; private NumberFormatter oNumberFormatter = null; @@ -598,7 +597,7 @@ public class DBMetaData private boolean getConnection(XDataSource _dataSource) { - Resource oResource = new Resource(xMSF, "dbw"); + Resource oResource = new Resource(xMSF); try { int iMsg = 0; @@ -632,7 +631,7 @@ public class DBMetaData catch (Exception exception) { // Note: WindowAttributes from toolkit/source/awt/vclxtoolkit.cxx - String sMsgNoConnection = oResource.getResText(RID_DB_COMMON + 14); + String sMsgNoConnection = oResource.getResText("RID_DB_COMMON_14"); iMsg = showMessageBox("QueryBox", VclWindowPeerAttribute.RETRY_CANCEL, sMsgNoConnection); bExitLoop = iMsg == 0; bgetConnection = false; @@ -642,7 +641,7 @@ public class DBMetaData } if (!bgetConnection) { - String sMsgConnectionImpossible = oResource.getResText(RID_DB_COMMON + 35); + String sMsgConnectionImpossible = oResource.getResText("RID_DB_COMMON_35"); showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, sMsgConnectionImpossible); } else @@ -655,7 +654,7 @@ public class DBMetaData } catch (Exception e) { - String sMsgConnectionImpossible = oResource.getResText(RID_DB_COMMON + 35); + String sMsgConnectionImpossible = oResource.getResText("RID_DB_COMMON_35"); showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, sMsgConnectionImpossible); Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e ); return false; diff --git a/wizards/com/sun/star/wizards/document/GridControl.java b/wizards/com/sun/star/wizards/document/GridControl.java index 381370835d7c..79f35de337e9 100644 --- a/wizards/com/sun/star/wizards/document/GridControl.java +++ b/wizards/com/sun/star/wizards/document/GridControl.java @@ -73,7 +73,7 @@ public class GridControl extends Shape FieldColumn curfieldcolumn = _fieldcolumns[i]; if (curfieldcolumn.getFieldType() == DataType.TIMESTAMP) { - new TimeStampControl(new Resource(_xMSF, "dbw"), this, curfieldcolumn); + new TimeStampControl(new Resource(_xMSF), this, curfieldcolumn); } else { diff --git a/wizards/com/sun/star/wizards/document/TimeStampControl.java b/wizards/com/sun/star/wizards/document/TimeStampControl.java index bd4bd8a7493e..0ce10a33cc83 100644 --- a/wizards/com/sun/star/wizards/document/TimeStampControl.java +++ b/wizards/com/sun/star/wizards/document/TimeStampControl.java @@ -79,8 +79,8 @@ public class TimeStampControl extends DatabaseControl { super(_oGridControl, _curfieldcolumn); oResource = _oResource; - String sDateAppendix = oResource.getResText(UIConsts.RID_FORM + 88); - String sTimeAppendix = oResource.getResText(UIConsts.RID_FORM + 89); + String sDateAppendix = oResource.getResText("RID_FORM_88"); + String sTimeAppendix = oResource.getResText("RID_FORM_89"); oDateControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.DATE, _curfieldcolumn.getFieldTitle() + PropertyNames.SPACE + sDateAppendix); oTimeControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.TIME, _curfieldcolumn.getFieldTitle() + PropertyNames.SPACE + sTimeAppendix); } diff --git a/wizards/com/sun/star/wizards/form/DataEntrySetter.java b/wizards/com/sun/star/wizards/form/DataEntrySetter.java index 8bebe54f859e..4b4a3e0cf9ac 100644 --- a/wizards/com/sun/star/wizards/form/DataEntrySetter.java +++ b/wizards/com/sun/star/wizards/form/DataEntrySetter.java @@ -41,12 +41,12 @@ public class DataEntrySetter { short curtabindex = (short) (FormWizard.SODATA_PAGE * 100); Integer IDataStep = Integer.valueOf(FormWizard.SODATA_PAGE); - String sNewDataOnly = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 44); - String sDisplayAllData = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 46); - String sNoModification = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 47); // AllowUpdates - String sNoDeletion = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 48); // AllowDeletes - String sNoAddition = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 49); // AllowInserts - String sdontdisplayExistingData = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 45); + String sNewDataOnly = CurUnoDialog.m_oResource.getResText("RID_FORM_44"); + String sDisplayAllData = CurUnoDialog.m_oResource.getResText("RID_FORM_46"); + String sNoModification = CurUnoDialog.m_oResource.getResText("RID_FORM_47"); // AllowUpdates + String sNoDeletion = CurUnoDialog.m_oResource.getResText("RID_FORM_48"); // AllowDeletes + String sNoAddition = CurUnoDialog.m_oResource.getResText("RID_FORM_49"); // AllowInserts + String sdontdisplayExistingData = CurUnoDialog.m_oResource.getResText("RID_FORM_45"); CurUnoDialog.insertRadioButton("optNewDataOnly", new XItemListenerAdapter() { @Override diff --git a/wizards/com/sun/star/wizards/form/FieldLinker.java b/wizards/com/sun/star/wizards/form/FieldLinker.java index c5222f26d9d6..74dc5707e10d 100644 --- a/wizards/com/sun/star/wizards/form/FieldLinker.java +++ b/wizards/com/sun/star/wizards/form/FieldLinker.java @@ -41,7 +41,7 @@ public class FieldLinker extends DBLimitedFieldSelection private XListBox[] lstMasterFields; private int[] SOLINKLST = null; private String[] sSlaveListHeader; - private String[] sMasterListHeader; //CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40); + private String[] sMasterListHeader; //CurUnoDialog.m_oResource.getResText("RID_FORM_40"); public FieldLinker(WizardDialog _CurUnoDialog, int iStep, int iCompPosY, int _firsthelpid) { @@ -63,8 +63,16 @@ public class FieldLinker extends DBLimitedFieldSelection int SOSECLINKLST = 1; int SOTHIRDLINKLST = 2; int SOFOURTHLINKLST = 3; - sSlaveListHeader = CurUnoDialog.m_oResource.getResArray(UIConsts.RID_FORM + 20, 4); //new String[rowcount];PropertyNames.EMPTY_STRING; //CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40); - sMasterListHeader = CurUnoDialog.m_oResource.getResArray(UIConsts.RID_FORM + 24, 4);// new String[rowcount];PropertyNames.EMPTY_STRING; //CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40); + sSlaveListHeader = new String[4]; //new String[rowcount];PropertyNames.EMPTY_STRING; //CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40); + sSlaveListHeader[0] = CurUnoDialog.m_oResource.getResText("RID_FORM_20"); + sSlaveListHeader[1] = CurUnoDialog.m_oResource.getResText("RID_FORM_21"); + sSlaveListHeader[2] = CurUnoDialog.m_oResource.getResText("RID_FORM_22"); + sSlaveListHeader[3] = CurUnoDialog.m_oResource.getResText("RID_FORM_23"); + sMasterListHeader = new String[4]; // new String[rowcount];PropertyNames.EMPTY_STRING; //CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40); + sMasterListHeader[0] = CurUnoDialog.m_oResource.getResText("RID_FORM_24"); + sMasterListHeader[1] = CurUnoDialog.m_oResource.getResText("RID_FORM_25"); + sMasterListHeader[2] = CurUnoDialog.m_oResource.getResText("RID_FORM_26"); + sMasterListHeader[3] = CurUnoDialog.m_oResource.getResText("RID_FORM_27"); SOLINKLST = new int[] { SOFIRSTLINKLST, SOSECLINKLST, SOTHIRDLINKLST, SOFOURTHLINKLST @@ -264,7 +272,7 @@ public class FieldLinker extends DBLimitedFieldSelection int iduplicate = JavaTools.getDuplicateFieldIndex(LinkFieldNames); if (iduplicate != -1) { - String sLinkFieldsAreDuplicate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 19); + String sLinkFieldsAreDuplicate = CurUnoDialog.m_oResource.getResText("RID_FORM_19"); String sLocLinkFieldsAreDuplicate = JavaTools.replaceSubString(sLinkFieldsAreDuplicate, LinkFieldNames[0][iduplicate], "<FIELDNAME1>"); sLocLinkFieldsAreDuplicate = JavaTools.replaceSubString(sLocLinkFieldsAreDuplicate, LinkFieldNames[1][iduplicate], "<FIELDNAME2>"); CurUnoDialog.setCurrentStep(FormWizard.SOFIELDLINKER_PAGE); diff --git a/wizards/com/sun/star/wizards/form/Finalizer.java b/wizards/com/sun/star/wizards/form/Finalizer.java index ef2541d2d56a..1fa97b0ac56f 100644 --- a/wizards/com/sun/star/wizards/form/Finalizer.java +++ b/wizards/com/sun/star/wizards/form/Finalizer.java @@ -43,10 +43,10 @@ public class Finalizer this.CurUnoDialog = _CurUnoDialog; short curtabindex = (short) (FormWizard.SOSTORE_PAGE * 100); - String slblFormName = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 50); - String slblProceed = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 51); - String sWorkWithForm = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 52); - String sModifyForm = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 53); + String slblFormName = CurUnoDialog.m_oResource.getResText("RID_FORM_50"); + String slblProceed = CurUnoDialog.m_oResource.getResText("RID_FORM_51"); + String sWorkWithForm = CurUnoDialog.m_oResource.getResText("RID_FORM_52"); + String sModifyForm = CurUnoDialog.m_oResource.getResText("RID_FORM_53"); CurUnoDialog.insertLabel("lblFormName", new String[] { diff --git a/wizards/com/sun/star/wizards/form/FormConfiguration.java b/wizards/com/sun/star/wizards/form/FormConfiguration.java index 9782a5aa25ea..9f74c2437987 100644 --- a/wizards/com/sun/star/wizards/form/FormConfiguration.java +++ b/wizards/com/sun/star/wizards/form/FormConfiguration.java @@ -56,11 +56,11 @@ public class FormConfiguration this.CurUnoDialog = _CurUnoDialog; short curtabindex = (short) (FormWizard.SOSUBFORM_PAGE * 100); Integer ISubFormStep = Integer.valueOf(FormWizard.SOSUBFORM_PAGE); - String sOnExistingRelation = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 5); - String sOnManualRelation = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 7); - String sSelectManually = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 4); - String sSelectRelation = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 8); - String sSubFormDescription = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 3); + String sOnExistingRelation = CurUnoDialog.m_oResource.getResText("RID_FORM_5"); + String sOnManualRelation = CurUnoDialog.m_oResource.getResText("RID_FORM_7"); + String sSelectManually = CurUnoDialog.m_oResource.getResText("RID_FORM_4"); + String sSelectRelation = CurUnoDialog.m_oResource.getResText("RID_FORM_8"); + String sSubFormDescription = CurUnoDialog.m_oResource.getResText("RID_FORM_3"); // CheckBox 'Add sub form' chkcreateSubForm = CurUnoDialog.insertCheckBox("chkcreateSubForm", new XItemListenerAdapter() { diff --git a/wizards/com/sun/star/wizards/form/FormControlArranger.java b/wizards/com/sun/star/wizards/form/FormControlArranger.java index bfe66e9e1178..9a46928ac045 100644 --- a/wizards/com/sun/star/wizards/form/FormControlArranger.java +++ b/wizards/com/sun/star/wizards/form/FormControlArranger.java @@ -598,7 +598,7 @@ public class FormControlArranger { if (nFieldType == DataType.TIMESTAMP) { - DBControlList[i] = new TimeStampControl(new Resource(xMSF, "dbw"), oFormHandler, xFormName, sFieldName, aPoint); + DBControlList[i] = new TimeStampControl(new Resource(xMSF), oFormHandler, xFormName, sFieldName, aPoint); } else { diff --git a/wizards/com/sun/star/wizards/form/FormWizard.java b/wizards/com/sun/star/wizards/form/FormWizard.java index 106d3ccf9ac6..4534d8ac5b35 100644 --- a/wizards/com/sun/star/wizards/form/FormWizard.java +++ b/wizards/com/sun/star/wizards/form/FormWizard.java @@ -67,7 +67,7 @@ public class FormWizard extends DatabaseObjectWizard public FormWizard(XMultiServiceFactory i_servicFactory, final PropertyValue[] i_wizardContext) { super(i_servicFactory, 34400, i_wizardContext); - super.addResourceHandler("dbw"); + super.addResourceHandler(); Helper.setUnoPropertyValues(xDialogModel, new String[] { @@ -75,11 +75,11 @@ public class FormWizard extends DatabaseObjectWizard }, new Object[] { - 210, Boolean.TRUE, "DialogForm", 102, 41, 1, Short.valueOf((short) 0), m_oResource.getResText(UIConsts.RID_FORM), 310 + 210, Boolean.TRUE, "DialogForm", 102, 41, 1, Short.valueOf((short) 0), m_oResource.getResText("RID_FORM_0"), 310 }); drawNaviBar(); getFormResources(); - setRightPaneHeaders(m_oResource, UIConsts.RID_FORM + 90, 8); + setRightPaneHeaders(m_oResource, "RID_FORM_", 90, 8); } public static void main(String i_args[]) @@ -316,14 +316,14 @@ public class FormWizard extends DatabaseObjectWizard { addRoadmap(); int i = 0; - i = insertRoadmapItem(0, true, m_oResource.getResText(UIConsts.RID_FORM + 80), SOMAIN_PAGE); - i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_FORM + 81), SOSUBFORM_PAGE); - i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_FORM + 82), SOSUBFORMFIELDS_PAGE); - i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_FORM + 83), SOFIELDLINKER_PAGE); - i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_FORM + 84), SOCONTROL_PAGE); - i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_FORM + 85), SODATA_PAGE); - i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_FORM + 86), SOSTYLE_PAGE); - i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_FORM + 87), SOSTORE_PAGE); + i = insertRoadmapItem(0, true, m_oResource.getResText("RID_FORM_80"), SOMAIN_PAGE); + i = insertRoadmapItem(i, false, m_oResource.getResText("RID_FORM_81"), SOSUBFORM_PAGE); + i = insertRoadmapItem(i, false, m_oResource.getResText("RID_FORM_82"), SOSUBFORMFIELDS_PAGE); + i = insertRoadmapItem(i, false, m_oResource.getResText("RID_FORM_83"), SOFIELDLINKER_PAGE); + i = insertRoadmapItem(i, false, m_oResource.getResText("RID_FORM_84"), SOCONTROL_PAGE); + i = insertRoadmapItem(i, false, m_oResource.getResText("RID_FORM_85"), SODATA_PAGE); + i = insertRoadmapItem(i, false, m_oResource.getResText("RID_FORM_86"), SOSTYLE_PAGE); + i = insertRoadmapItem(i, false, m_oResource.getResText("RID_FORM_87"), SOSTORE_PAGE); setRoadmapInteractive(true); setRoadmapComplete(true); setCurrentRoadmapItemID((short) 1); @@ -367,11 +367,11 @@ public class FormWizard extends DatabaseObjectWizard private void getFormResources() { - sShowBinaryFields = m_oResource.getResText(UIConsts.RID_FORM + 2); - slblTables = m_oResource.getResText(UIConsts.RID_FORM + 6); - slblFields = m_oResource.getResText(UIConsts.RID_FORM + 12); - slblSelFields = m_oResource.getResText(UIConsts.RID_FORM + 1); - serrFormNameexists = m_oResource.getResText(UIConsts.RID_FORM + 98); + sShowBinaryFields = m_oResource.getResText("RID_FORM_2"); + slblTables = m_oResource.getResText("RID_FORM_6"); + slblFields = m_oResource.getResText("RID_FORM_12"); + slblSelFields = m_oResource.getResText("RID_FORM_1"); + serrFormNameexists = m_oResource.getResText("RID_FORM_98"); } private class FieldSelectionListener implements com.sun.star.wizards.ui.XFieldSelectionListener diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java index 88c1a63fb8b0..f780273a9718 100644 --- a/wizards/com/sun/star/wizards/form/StyleApplier.java +++ b/wizards/com/sun/star/wizards/form/StyleApplier.java @@ -70,11 +70,11 @@ public class StyleApplier xPageStylePropertySet = oTextStyleHandler.getStyleByName("PageStyles", "Standard"); short curtabindex = (short) (FormWizard.SOSTYLE_PAGE * 100); Integer IStyleStep = Integer.valueOf(FormWizard.SOSTYLE_PAGE); - String sPageStyles = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 86); - String sNoBorder = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 29); - String s3DLook = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 30); - String sFlat = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 31); - String sFieldBorder = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 28); + String sPageStyles = CurUnoDialog.m_oResource.getResText("RID_FORM_86"); + String sNoBorder = CurUnoDialog.m_oResource.getResText("RID_FORM_29"); + String s3DLook = CurUnoDialog.m_oResource.getResText("RID_FORM_30"); + String sFlat = CurUnoDialog.m_oResource.getResText("RID_FORM_31"); + String sFieldBorder = CurUnoDialog.m_oResource.getResText("RID_FORM_28"); setStyles(); short[] SelLayoutPos; SelLayoutPos = new short[] diff --git a/wizards/com/sun/star/wizards/form/UIControlArranger.java b/wizards/com/sun/star/wizards/form/UIControlArranger.java index 15122111fec1..b73796eca410 100644 --- a/wizards/com/sun/star/wizards/form/UIControlArranger.java +++ b/wizards/com/sun/star/wizards/form/UIControlArranger.java @@ -63,9 +63,9 @@ public class UIControlArranger this.curFormDocument = _curFormDocument; curtabindex = (short) (FormWizard.SOCONTROL_PAGE * 100); IControlStep = Integer.valueOf(FormWizard.SOCONTROL_PAGE); - String sLabelPlacment = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 32); - String sAlignLeft = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 33); - String sAlignRight = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 34); + String sLabelPlacment = CurUnoDialog.m_oResource.getResText("RID_FORM_32"); + String sAlignLeft = CurUnoDialog.m_oResource.getResText("RID_FORM_33"); + String sAlignRight = CurUnoDialog.m_oResource.getResText("RID_FORM_34"); // Label "Label Placement" ----------------- flnLabelPlacement = CurUnoDialog.insertFixedLine("lnLabelPlacement", @@ -116,21 +116,21 @@ public class UIControlArranger imageModel.addElement(ARRANGEFREE); // "Columnar - Labels Left" - helpTexts.put(ARRANGELISTSIDE, CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 36)); + helpTexts.put(ARRANGELISTSIDE, CurUnoDialog.m_oResource.getResText("RID_FORM_36")); // "Columnar - Labels of Top" - helpTexts.put(ARRANGELISTTOP, CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 37)); + helpTexts.put(ARRANGELISTTOP, CurUnoDialog.m_oResource.getResText("RID_FORM_37")); // "As Data Sheet" - helpTexts.put(ARRANGETABLE, CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40)); + helpTexts.put(ARRANGETABLE, CurUnoDialog.m_oResource.getResText("RID_FORM_40")); // "In Blocks - Labels Above" - helpTexts.put(ARRANGEFREE, CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 39)); + helpTexts.put(ARRANGEFREE, CurUnoDialog.m_oResource.getResText("RID_FORM_39")); - String sMainArrangementHeader = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 41); // "Arrangement of the main form" + String sMainArrangementHeader = CurUnoDialog.m_oResource.getResText("RID_FORM_41"); // "Arrangement of the main form" m_aArrangeList[0] = new ArrangeButtonList(0, imageModel, sMainArrangementHeader); - String sSubArrangementHeader = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 42); // "Arrangement of the sub form" + String sSubArrangementHeader = CurUnoDialog.m_oResource.getResText("RID_FORM_42"); // "Arrangement of the sub form" m_aArrangeList[1] = new ArrangeButtonList(1, imageModel, sSubArrangementHeader); enableAlignControlGroup(false); } diff --git a/wizards/com/sun/star/wizards/query/Finalizer.java b/wizards/com/sun/star/wizards/query/Finalizer.java index a14923b4d75c..6a556beffe12 100644 --- a/wizards/com/sun/star/wizards/query/Finalizer.java +++ b/wizards/com/sun/star/wizards/query/Finalizer.java @@ -52,12 +52,12 @@ public class Finalizer String reslblHowGoOn; this.m_queryWizard = i_queryWizard; this.CurDBMetaData = _CurDBMetaData; - reslblQueryTitle = m_queryWizard.m_oResource.getResText(UIConsts.RID_QUERY + 5); - resoptDisplayQuery = m_queryWizard.m_oResource.getResText(UIConsts.RID_QUERY + 6); - resoptModifyQuery = m_queryWizard.m_oResource.getResText(UIConsts.RID_QUERY + 7); - resflnSummary = m_queryWizard.m_oResource.getResText(UIConsts.RID_QUERY + 87); - reslblHowGoOn = m_queryWizard.m_oResource.getResText(UIConsts.RID_QUERY + 8); - resQuery = m_queryWizard.m_oResource.getResText(UIConsts.RID_QUERY + 1); + reslblQueryTitle = m_queryWizard.m_oResource.getResText("RID_QUERY_5"); + resoptDisplayQuery = m_queryWizard.m_oResource.getResText("RID_QUERY_6"); + resoptModifyQuery = m_queryWizard.m_oResource.getResText("RID_QUERY_7"); + resflnSummary = m_queryWizard.m_oResource.getResText("RID_QUERY_87"); + reslblHowGoOn = m_queryWizard.m_oResource.getResText("RID_QUERY_8"); + resQuery = m_queryWizard.m_oResource.getResText("RID_QUERY_1"); int curHelpIndex = 40955; m_queryWizard.insertLabel("lblQueryTitle", new String[] diff --git a/wizards/com/sun/star/wizards/query/QuerySummary.java b/wizards/com/sun/star/wizards/query/QuerySummary.java index 9e0b531828b0..443c96453525 100644 --- a/wizards/com/sun/star/wizards/query/QuerySummary.java +++ b/wizards/com/sun/star/wizards/query/QuerySummary.java @@ -26,8 +26,6 @@ import com.sun.star.wizards.db.FieldColumn; import com.sun.star.wizards.db.QueryMetaData; import com.sun.star.wizards.ui.FilterComponent; -import static com.sun.star.wizards.ui.UIConsts.RID_QUERY; - public class QuerySummary extends QueryMetaData { @@ -42,9 +40,9 @@ public class QuerySummary extends QueryMetaData { super(_xMSF); this.oResource = _oResource; - sAnd = oResource.getResText(RID_QUERY + 38); - sOr = oResource.getResText(RID_QUERY + 39); - sSeparator = oResource.getResText(RID_QUERY + 91); + sAnd = oResource.getResText("RID_QUERY_38"); + sOr = oResource.getResText("RID_QUERY_39"); + sSeparator = oResource.getResText("RID_QUERY_91"); sReturnChar = String.valueOf((char) 13) + String.valueOf((char) 13); } @@ -59,15 +57,15 @@ public class QuerySummary extends QueryMetaData String sGroupByFraction = PropertyNames.EMPTY_STRING; String sHavingFraction = PropertyNames.EMPTY_STRING; sFieldNamesFraction = combineFieldNameFraction() + sReturnChar; - sSortingFraction = combinePartString(RID_QUERY + 51, getSortFieldNames(), RID_QUERY + 52, RID_QUERY + 93, new String[] + sSortingFraction = combinePartString("RID_QUERY_51", getSortFieldNames(), "RID_QUERY_52", "RID_QUERY_93", new String[] { "<FIELDNAME>", "<SORTMODE>" }) + sReturnChar; - sFilterFraction = combineFilterNameFraction(this.getFilterConditions(), RID_QUERY + 53, RID_QUERY + 54) + sReturnChar; + sFilterFraction = combineFilterNameFraction(this.getFilterConditions(), "RID_QUERY_53", "RID_QUERY_54") + sReturnChar; if (xDBMetaData.supportsGroupBy()) { - sGroupByFraction = combinePartString(RID_QUERY + 57, GroupFieldNames, RID_QUERY + 58) + sReturnChar; - sHavingFraction = combineFilterNameFraction(getGroupByFilterConditions(), RID_QUERY + 59, RID_QUERY + 60); + sGroupByFraction = combinePartString("RID_QUERY_57", GroupFieldNames, "RID_QUERY_58") + sReturnChar; + sHavingFraction = combineFilterNameFraction(getGroupByFilterConditions(), "RID_QUERY_59", "RID_QUERY_60"); } // TODO: remove the last return from the string sSummary = sFieldNamesFraction + sSortingFraction + sFilterFraction + sAggregateFraction + sGroupByFraction + sHavingFraction; @@ -84,13 +82,13 @@ public class QuerySummary extends QueryMetaData return sSummary; } - private String combineFilterNameFraction(PropertyValue[][] _filterconditions, int _InitResID, int _AlternativeResID) + private String combineFilterNameFraction(PropertyValue[][] _filterconditions, String _InitResID, String _AlternativeResID) { if (_filterconditions != null && _filterconditions.length > 0) { String sconditions = PropertyNames.EMPTY_STRING; String sStart = oResource.getResText(_InitResID); - String BaseString = oResource.getResText(RID_QUERY + 96); + String BaseString = oResource.getResText("RID_QUERY_96"); if (_filterconditions.length == 1) { PropertyValue[] curfilterconditions = _filterconditions[0]; @@ -117,8 +115,8 @@ public class QuerySummary extends QueryMetaData private String combineFieldNameFraction() { String CurString = PropertyNames.EMPTY_STRING; - String sReturn = oResource.getResText(RID_QUERY + 50); - String BaseString = oResource.getResText(RID_QUERY + 92); + String sReturn = oResource.getResText("RID_QUERY_50"); + String BaseString = oResource.getResText("RID_QUERY_92"); for (int i = 0; i < FieldColumns.length; i++) { CurString = BaseString; @@ -149,7 +147,7 @@ public class QuerySummary extends QueryMetaData } // TODO: How can you merge the following two methods to a single one in a smarter way?? - private String combinePartString(int _InitResID, String[] _FieldNames, int _AlternativeResID) + private String combinePartString(String _InitResID, String[] _FieldNames, String _AlternativeResID) { if (_FieldNames != null && _FieldNames.length > 0) { @@ -158,7 +156,7 @@ public class QuerySummary extends QueryMetaData return oResource.getResText(_AlternativeResID); } - private String ArrayFieldsToString(int _InitResID, String[] _FieldNames) + private String ArrayFieldsToString(String _InitResID, String[] _FieldNames) { StringBuilder sReturn = new StringBuilder(oResource.getResText(_InitResID)); int FieldCount = _FieldNames.length; @@ -173,7 +171,7 @@ public class QuerySummary extends QueryMetaData return sReturn.toString(); } - private String combinePartString(int _InitResID, String[][] _FieldNames, int _AlternativeResID, int _BaseStringID, String[] _ReplaceTags) + private String combinePartString(String _InitResID, String[][] _FieldNames, String _AlternativeResID, String _BaseStringID, String[] _ReplaceTags) { if (_FieldNames != null && _FieldNames.length > 0) { @@ -182,7 +180,7 @@ public class QuerySummary extends QueryMetaData return oResource.getResText(_AlternativeResID); } - private String ArrayFieldsToString(int _InitResID, String[][] _FieldNames, int _BaseStringID, String[] _ReplaceTags) + private String ArrayFieldsToString(String _InitResID, String[][] _FieldNames, String _BaseStringID, String[] _ReplaceTags) { String CurString = PropertyNames.EMPTY_STRING; StringBuilder sReturn = new StringBuilder(oResource.getResText(_InitResID)); diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java index 1a76ca7a4d5f..ec531ee600aa 100644 --- a/wizards/com/sun/star/wizards/query/QueryWizard.java +++ b/wizards/com/sun/star/wizards/query/QueryWizard.java @@ -71,7 +71,7 @@ public class QueryWizard extends DatabaseObjectWizard public QueryWizard(XMultiServiceFactory xMSF, PropertyValue[] i_wizardContext) { super(xMSF, 40970, i_wizardContext); - addResourceHandler("dbw"); + addResourceHandler(); m_DBMetaData = new QuerySummary(xMSF, m_oResource); } @@ -91,14 +91,14 @@ public class QueryWizard extends DatabaseObjectWizard { if (m_DBMetaData.getConnection(m_wizardContext)) { - reslblFields = m_oResource.getResText(UIConsts.RID_QUERY + 4); - reslblFieldHeader = m_oResource.getResText(UIConsts.RID_QUERY + 19); //Fielnames in AliasComponent - reslblAliasHeader = m_oResource.getResText(UIConsts.RID_QUERY + 20); //Fieldtitles header in AliasComponent - reslblSelFields = m_oResource.getResText(UIConsts.RID_QUERY + 50); - reslblTables = m_oResource.getResText(UIConsts.RID_QUERY + 3); - reslblGroupBy = m_oResource.getResText(UIConsts.RID_QUERY + 18); - String resQueryWizard = m_oResource.getResText(UIConsts.RID_QUERY + 2); - resmsgNonNumericAsGroupBy = m_oResource.getResText(UIConsts.RID_QUERY + 88); + reslblFields = m_oResource.getResText("RID_QUERY_4"); + reslblFieldHeader = m_oResource.getResText("RID_QUERY_19"); //Fielnames in AliasComponent + reslblAliasHeader = m_oResource.getResText("RID_QUERY_20"); //Fieldtitles header in AliasComponent + reslblSelFields = m_oResource.getResText("RID_QUERY_50"); + reslblTables = m_oResource.getResText("RID_QUERY_3"); + reslblGroupBy = m_oResource.getResText("RID_QUERY_18"); + String resQueryWizard = m_oResource.getResText("RID_QUERY_2"); + resmsgNonNumericAsGroupBy = m_oResource.getResText("RID_QUERY_88"); Helper.setUnoPropertyValues(xDialogModel, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_MOVEABLE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_TITLE, PropertyNames.PROPERTY_WIDTH @@ -108,7 +108,7 @@ public class QueryWizard extends DatabaseObjectWizard 210, Boolean.TRUE, "DialogQuery", 102, 41, 1, Short.valueOf((short) 0), resQueryWizard, 310 }); drawNaviBar(); - setRightPaneHeaders(m_oResource, UIConsts.RID_QUERY + 70, 8); + setRightPaneHeaders(m_oResource, "RID_QUERY_", 70, 8); this.setMaxStep(8); buildSteps(); this.m_DBCommandFieldSelectio.preselectCommand(m_wizardContext, false); @@ -192,7 +192,7 @@ public class QueryWizard extends DatabaseObjectWizard { try { - setRMItemLabels(m_oResource, UIConsts.RID_QUERY + 80); + setRMItemLabels(m_oResource); addRoadmap(); int i = 0; i = insertRoadmapItem(0, true, SOFIELDSELECTION_PAGE - 1, SOFIELDSELECTION_PAGE); diff --git a/wizards/com/sun/star/wizards/report/Dataimport.java b/wizards/com/sun/star/wizards/report/Dataimport.java index 17eb4c098a26..8e9d3e321c2a 100644 --- a/wizards/com/sun/star/wizards/report/Dataimport.java +++ b/wizards/com/sun/star/wizards/report/Dataimport.java @@ -42,12 +42,12 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi public Dataimport(XMultiServiceFactory _xMSF) { super(_xMSF); - super.addResourceHandler("dbw"); - sProgressDBConnection = m_oResource.getResText(UIConsts.RID_DB_COMMON + 34); - sProgressDataImport = m_oResource.getResText(UIConsts.RID_REPORT + 67); - sProgressTitle = m_oResource.getResText(UIConsts.RID_REPORT + 62); - m_oResource.getResText(UIConsts.RID_REPORT + 63); - sStop = m_oResource.getResText(UIConsts.RID_DB_COMMON + 21); + super.addResourceHandler(); + sProgressDBConnection = m_oResource.getResText("RID_DB_COMMON_34"); + sProgressDataImport = m_oResource.getResText("RID_REPORT_67"); + sProgressTitle = m_oResource.getResText("RID_REPORT_62"); + m_oResource.getResText("RID_REPORT_63"); + sStop = m_oResource.getResText("RID_DB_COMMON_21"); } diff --git a/wizards/com/sun/star/wizards/report/GroupFieldHandler.java b/wizards/com/sun/star/wizards/report/GroupFieldHandler.java index 3130fbe84671..26543bb46218 100644 --- a/wizards/com/sun/star/wizards/report/GroupFieldHandler.java +++ b/wizards/com/sun/star/wizards/report/GroupFieldHandler.java @@ -38,8 +38,8 @@ public class GroupFieldHandler extends FieldSelection public GroupFieldHandler(IReportDocument _CurReportDocument, WizardDialog _CurUnoDialog) { super(_CurUnoDialog, ReportWizard.SOGROUPPAGE, 95, 27, 210, 127, - _CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 19), - _CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 50), 34340, false); + _CurUnoDialog.m_oResource.getResText("RID_REPORT_19"), + _CurUnoDialog.m_oResource.getResText("RID_REPORT_50"), 34340, false); try { diff --git a/wizards/com/sun/star/wizards/report/ReportFinalizer.java b/wizards/com/sun/star/wizards/report/ReportFinalizer.java index 2ed8d286f10a..048c2d3e92e2 100644 --- a/wizards/com/sun/star/wizards/report/ReportFinalizer.java +++ b/wizards/com/sun/star/wizards/report/ReportFinalizer.java @@ -47,13 +47,13 @@ public class ReportFinalizer this.CurReportDocument = _CurReportDocument; short curtabindex = (short) (ReportWizard.SOSTOREPAGE * 100); - String sSaveAsTemplate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 40); - String sUseTemplate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 41); - String sEditTemplate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 42); - String sSaveAsDocument = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 43); - String sReportTitle = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 33); - String slblHowProceed = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 78); - String slblChooseReportKind = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 79); + String sSaveAsTemplate = CurUnoDialog.m_oResource.getResText("RID_REPORT_40"); + String sUseTemplate = CurUnoDialog.m_oResource.getResText("RID_REPORT_41"); + String sEditTemplate = CurUnoDialog.m_oResource.getResText("RID_REPORT_42"); + String sSaveAsDocument = CurUnoDialog.m_oResource.getResText("RID_REPORT_43"); + String sReportTitle = CurUnoDialog.m_oResource.getResText("RID_REPORT_33"); + String slblHowProceed = CurUnoDialog.m_oResource.getResText("RID_REPORT_78"); + String slblChooseReportKind = CurUnoDialog.m_oResource.getResText("RID_REPORT_79"); CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblTitle", new String[] @@ -250,7 +250,7 @@ public class ReportFinalizer return false; } } - String sMsgReportDocumentNameDuplicate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 76); + String sMsgReportDocumentNameDuplicate = CurUnoDialog.m_oResource.getResText("RID_REPORT_76"); String sShowMsgReportNameisDuplicate = JavaTools.replaceSubString(sMsgReportDocumentNameDuplicate, StoreName, "%REPORTNAME"); /* int iMsg = */ CurUnoDialog.showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, sShowMsgReportNameisDuplicate); CurUnoDialog.enableFinishButton(false); diff --git a/wizards/com/sun/star/wizards/report/ReportLayouter.java b/wizards/com/sun/star/wizards/report/ReportLayouter.java index ad11aa8125be..f6397ce92c09 100644 --- a/wizards/com/sun/star/wizards/report/ReportLayouter.java +++ b/wizards/com/sun/star/wizards/report/ReportLayouter.java @@ -65,12 +65,12 @@ public class ReportLayouter this.CurUnoDialog = _CurUnoDialog; this.CurReportDocument = _CurReportDocument; //TODO the constructor for the OfficePathRetriever is redundant and should be instantiated elsewhere - String slblDataStructure = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 15); - String slblPageLayout = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 16); + String slblDataStructure = CurUnoDialog.m_oResource.getResText("RID_REPORT_15"); + String slblPageLayout = CurUnoDialog.m_oResource.getResText("RID_REPORT_16"); - String sOrientationHeader = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 22); - String sOrientVertical = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 23); - String sOrientHorizontal = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 24); + String sOrientationHeader = CurUnoDialog.m_oResource.getResText("RID_REPORT_22"); + String sOrientVertical = CurUnoDialog.m_oResource.getResText("RID_REPORT_23"); + String sOrientHorizontal = CurUnoDialog.m_oResource.getResText("RID_REPORT_24"); CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblContent", new String[] @@ -336,31 +336,31 @@ public class ReportLayouter String text = item.getString().trim().toLowerCase(); if (text.equals("#titleconst#")) { - teTitleconst = new PlaceholderTextElement(item, CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 86), PropertyNames.EMPTY_STRING, m_xMSF); + teTitleconst = new PlaceholderTextElement(item, CurUnoDialog.m_oResource.getResText("RID_REPORT_86"), PropertyNames.EMPTY_STRING, m_xMSF); trTitleconst = item; constRangeList.remove(i--); - writeTitle(teTitleconst, trTitleconst, CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 86)); + writeTitle(teTitleconst, trTitleconst, CurUnoDialog.m_oResource.getResText("RID_REPORT_86")); } else if (text.equals("#authorconst#")) { - teAuthorconst = new PlaceholderTextElement(item, CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 87), PropertyNames.EMPTY_STRING, m_xMSF); + teAuthorconst = new PlaceholderTextElement(item, CurUnoDialog.m_oResource.getResText("RID_REPORT_87"), PropertyNames.EMPTY_STRING, m_xMSF); trAuthorconst = item; constRangeList.remove(i--); - writeTitle(teAuthorconst, trAuthorconst, CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 87)); + writeTitle(teAuthorconst, trAuthorconst, CurUnoDialog.m_oResource.getResText("RID_REPORT_87")); } else if (text.equals("#dateconst#")) { - teDateconst = new PlaceholderTextElement(item, CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 88), PropertyNames.EMPTY_STRING, m_xMSF); + teDateconst = new PlaceholderTextElement(item, CurUnoDialog.m_oResource.getResText("RID_REPORT_88"), PropertyNames.EMPTY_STRING, m_xMSF); trDateconst = item; constRangeList.remove(i--); - writeTitle(teDateconst, trDateconst, CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 88)); + writeTitle(teDateconst, trDateconst, CurUnoDialog.m_oResource.getResText("RID_REPORT_88")); } else if (text.equals("#pageconst#")) { - tePageconst = new PlaceholderTextElement(item, CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 93), PropertyNames.EMPTY_STRING, m_xMSF); + tePageconst = new PlaceholderTextElement(item, CurUnoDialog.m_oResource.getResText("RID_REPORT_93"), PropertyNames.EMPTY_STRING, m_xMSF); trPageconst = item; constRangeList.remove(i--); - writeTitle(tePageconst, trPageconst, CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 93)); + writeTitle(tePageconst, trPageconst, CurUnoDialog.m_oResource.getResText("RID_REPORT_93")); } } } diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index f607ede1a41b..1c109c0b1f52 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -100,7 +100,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen long lDateCorrection = oNumberFormatter.getNullDateCorrection(); oNumberFormatter.setBooleanReportDisplayNumberFormat(); oNumberFormatter.setNullDateCorrection(lDateCorrection); - sMsgCommonReportError = oResource.getResText(UIConsts.RID_REPORT + 72); + sMsgCommonReportError = oResource.getResText("RID_REPORT_72"); sMsgCommonReportError = JavaTools.replaceSubString(sMsgCommonReportError, String.valueOf((char) 13), "<BR>"); bIsCurLandscape = true; getReportPageStyles(); diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java index a7f38d41ac13..783025d5de98 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java +++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java @@ -131,11 +131,11 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme private void initialResources() { - sReportFormNotExisting = m_resource.getResText(UIConsts.RID_REPORT + 64); - sMsgQueryCreationImpossible = m_resource.getResText(UIConsts.RID_REPORT + 65); - m_resource.getResText(UIConsts.RID_REPORT + 66); - sMsgEndAutopilot = m_resource.getResText(UIConsts.RID_DB_COMMON + 33); - m_resource.getResText(UIConsts.RID_DB_COMMON + 14); + sReportFormNotExisting = m_resource.getResText("RID_REPORT_64"); + sMsgQueryCreationImpossible = m_resource.getResText("RID_REPORT_65"); + m_resource.getResText("RID_REPORT_66"); + sMsgEndAutopilot = m_resource.getResText("RID_DB_COMMON_33"); + m_resource.getResText("RID_DB_COMMON_14"); } private void addTextSectionCopies() @@ -707,79 +707,79 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme { if( ContentFiles[0][i].equals("Align Left - Border") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 94); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_94"); } else if( ContentFiles[0][i].equals("Align Left - Compact") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 95); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_95"); } else if( ContentFiles[0][i].equals("Align Left - Elegant") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 96); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_96"); } else if( ContentFiles[0][i].equals("Align Left - Highlighted") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 97); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_97"); } else if( ContentFiles[0][i].equals("Align Left - Modern") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 98); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_98"); } else if( ContentFiles[0][i].equals("Align Left - Red & Blue") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 99); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_99"); } else if( ContentFiles[0][i].equals("Default") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 100); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_100"); } else if( ContentFiles[0][i].equals("Outline - Borders") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 101); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_101"); } else if( ContentFiles[0][i].equals("Outline - Compact") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 102); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_102"); } else if( ContentFiles[0][i].equals("Outline - Elegant") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 103); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_103"); } else if( ContentFiles[0][i].equals("Outline - Highlighted") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 104); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_104"); } else if( ContentFiles[0][i].equals("Outline - Modern") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 105); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_105"); } else if( ContentFiles[0][i].equals("Outline - Red & Blue") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 106); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_106"); } else if( ContentFiles[0][i].equals("Outline, indented - Borders") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 107); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_107"); } else if( ContentFiles[0][i].equals("Outline, indented - Compact") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 108); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_108"); } else if( ContentFiles[0][i].equals("Outline, indented - Elegant") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 109); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_109"); } else if( ContentFiles[0][i].equals("Outline, indented - Highlighted") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 110); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_110"); } else if( ContentFiles[0][i].equals("Outline, indented - Modern") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 111); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_111"); } else if( ContentFiles[0][i].equals("Outline, indented - Red & Blue") ) { - ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 112); + ContentFiles[0][i] = m_resource.getResText("RID_REPORT_112"); } } } @@ -790,43 +790,43 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme { if( LayoutFiles[0][i].equals("Bubbles") ) { - LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 113); + LayoutFiles[0][i] = m_resource.getResText("RID_REPORT_113"); } else if( LayoutFiles[0][i].equals("Cinema") ) { - LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 114); + LayoutFiles[0][i] = m_resource.getResText("RID_REPORT_114"); } else if( LayoutFiles[0][i].equals("Controlling") ) { - LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 115); + LayoutFiles[0][i] = m_resource.getResText("RID_REPORT_115"); } else if( LayoutFiles[0][i].equals("Default") ) { - LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 116); + LayoutFiles[0][i] = m_resource.getResText("RID_REPORT_116"); } else if( LayoutFiles[0][i].equals("Drafting") ) { - LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 117); + LayoutFiles[0][i] = m_resource.getResText("RID_REPORT_117"); } else if( LayoutFiles[0][i].equals("Finances") ) { - LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 118); + LayoutFiles[0][i] = m_resource.getResText("RID_REPORT_118"); } else if( LayoutFiles[0][i].equals("Flipchart") ) { - LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 119); + LayoutFiles[0][i] = m_resource.getResText("RID_REPORT_119"); } else if( LayoutFiles[0][i].equals("Formal with Company Logo") ) { - LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 120); + LayoutFiles[0][i] = m_resource.getResText("RID_REPORT_120"); } else if( LayoutFiles[0][i].equals("Generic") ) { - LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 121); + LayoutFiles[0][i] = m_resource.getResText("RID_REPORT_121"); } else if( LayoutFiles[0][i].equals("Worldmap") ) { - LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 122); + LayoutFiles[0][i] = m_resource.getResText("RID_REPORT_122"); } } } diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java index 7601787fd4d1..e6ca5ab2afe6 100644 --- a/wizards/com/sun/star/wizards/report/ReportWizard.java +++ b/wizards/com/sun/star/wizards/report/ReportWizard.java @@ -81,7 +81,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener public ReportWizard(XMultiServiceFactory i_serviceFactory, final PropertyValue[] i_wizardContext) { super(i_serviceFactory, 34320, i_wizardContext); - super.addResourceHandler("dbw"); + super.addResourceHandler(); if (getReportResources(false)) { Helper.setUnoPropertyValues(xDialogModel, @@ -355,15 +355,15 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener private void insertQueryRelatedSteps() { - setRMItemLabels(m_oResource, UIConsts.RID_QUERY + 80); + setRMItemLabels(m_oResource); addRoadmap(); int i = 0; - i = insertRoadmapItem(0, true, m_oResource.getResText(UIConsts.RID_QUERY + 80), SOMAINPAGE); - i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_REPORT + 68), SOTITLEPAGE); - i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_REPORT + 11), SOGROUPPAGE); - i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_REPORT + 12), SOSORTPAGE); // Orderby is always supported - i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_REPORT + 13), SOTEMPLATEPAGE); - i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_REPORT + 14), SOSTOREPAGE); + i = insertRoadmapItem(0, true, m_oResource.getResText("RID_QUERY_80"), SOMAINPAGE); + i = insertRoadmapItem(i, false, m_oResource.getResText("RID_REPORT_68"), SOTITLEPAGE); + i = insertRoadmapItem(i, false, m_oResource.getResText("RID_REPORT_11"), SOGROUPPAGE); + i = insertRoadmapItem(i, false, m_oResource.getResText("RID_REPORT_12"), SOSORTPAGE); // Orderby is always supported + i = insertRoadmapItem(i, false, m_oResource.getResText("RID_REPORT_13"), SOTEMPLATEPAGE); + i = insertRoadmapItem(i, false, m_oResource.getResText("RID_REPORT_14"), SOSTOREPAGE); setRoadmapInteractive(true); setRoadmapComplete(true); setCurrentRoadmapItemID((short) 1); @@ -472,7 +472,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener String sMessage = e.getMessage(); if (sMessage.equals("default.otr")) { - sMessage = m_oResource.getResText(UIConsts.RID_REPORT + 92); + sMessage = m_oResource.getResText("RID_REPORT_92"); } // show a dialog with the error message SystemDialog.showMessageBox(xMSF, "ErrorBox", VclWindowPeerAttribute.OK, sMessage); @@ -525,22 +525,22 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener private boolean getReportResources(boolean bgetProgressResourcesOnly) { - sMsgWizardName = super.m_oResource.getResText(UIConsts.RID_REPORT); + sMsgWizardName = super.m_oResource.getResText("RID_REPORT_0"); if (!bgetProgressResourcesOnly) { - sShowBinaryFields = m_oResource.getResText(UIConsts.RID_REPORT + 60); - slblTables = m_oResource.getResText(UIConsts.RID_FORM + 6); - slblFields = m_oResource.getResText(UIConsts.RID_FORM + 12); - slblSelFields = m_oResource.getResText(UIConsts.RID_REPORT + 9); - WizardHeaderText[0] = m_oResource.getResText(UIConsts.RID_REPORT + 28); - WizardHeaderText[1] = m_oResource.getResText(UIConsts.RID_REPORT + 69); - WizardHeaderText[2] = m_oResource.getResText(UIConsts.RID_REPORT + 29); - WizardHeaderText[3] = m_oResource.getResText(UIConsts.RID_REPORT + 30); - WizardHeaderText[4] = m_oResource.getResText(UIConsts.RID_REPORT + 31); - WizardHeaderText[5] = m_oResource.getResText(UIConsts.RID_REPORT + 32); - } - slblColumnTitles = m_oResource.getResText(UIConsts.RID_REPORT + 70); - slblColumnNames = m_oResource.getResText(UIConsts.RID_REPORT + 71); + sShowBinaryFields = m_oResource.getResText("RID_REPORT_60"); + slblTables = m_oResource.getResText("RID_FORM_6"); + slblFields = m_oResource.getResText("RID_FORM_12"); + slblSelFields = m_oResource.getResText("RID_REPORT_9"); + WizardHeaderText[0] = m_oResource.getResText("RID_REPORT_28"); + WizardHeaderText[1] = m_oResource.getResText("RID_REPORT_69"); + WizardHeaderText[2] = m_oResource.getResText("RID_REPORT_29"); + WizardHeaderText[3] = m_oResource.getResText("RID_REPORT_30"); + WizardHeaderText[4] = m_oResource.getResText("RID_REPORT_31"); + WizardHeaderText[5] = m_oResource.getResText("RID_REPORT_32"); + } + slblColumnTitles = m_oResource.getResText("RID_REPORT_70"); + slblColumnNames = m_oResource.getResText("RID_REPORT_71"); return true; } @@ -549,7 +549,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener String sBlindTextNote = PropertyNames.EMPTY_STRING; if (_aDocument instanceof ReportTextImplementation) { - sBlindTextNote = _oResource.getResText(UIConsts.RID_REPORT + 75); + sBlindTextNote = _oResource.getResText("RID_REPORT_75"); sBlindTextNote = JavaTools.replaceSubString(sBlindTextNote, String.valueOf((char) 13), "<BR>"); } return sBlindTextNote; diff --git a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java index d9e4e50f726a..0d118e20cb64 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java +++ b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java @@ -636,7 +636,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper if( LayoutFiles[0][i] == null) { break;} if( LayoutFiles[0][i].equals("default") ) { - LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 100); + LayoutFiles[0][i] = m_resource.getResText("RID_REPORT_100"); } } } diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java index d0c03988ba9f..e31e6cc961ef 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java @@ -38,7 +38,7 @@ public class ColumnarSingleColumn extends ReportBuilderLayouter public String getLocalizedName() { - return getResource().getResText(UIConsts.RID_REPORT + 81); + return getResource().getResText("RID_REPORT_81"); } @Override diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarThreeColumns.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarThreeColumns.java index e12d87087ada..81d4ad50ac59 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarThreeColumns.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarThreeColumns.java @@ -38,7 +38,7 @@ public class ColumnarThreeColumns extends ColumnarTwoColumns @Override public String getLocalizedName() { - return getResource().getResText(UIConsts.RID_REPORT + 83); + return getResource().getResText("RID_REPORT_83"); } @Override diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java index eb6fdb7fcdbd..6d21dce05eb9 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java @@ -38,7 +38,7 @@ public class ColumnarTwoColumns extends ReportBuilderLayouter public String getLocalizedName() { - return getResource().getResText(UIConsts.RID_REPORT + 82); + return getResource().getResText("RID_REPORT_82"); } @Override diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java index fd1134954f51..08dbc2db52e2 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java @@ -40,7 +40,7 @@ public class InBlocksLabelsAbove extends ColumnarTwoColumns @Override public String getLocalizedName() { - return getResource().getResText(UIConsts.RID_REPORT + 85); + return getResource().getResText("RID_REPORT_85"); } @Override diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java index 6facdaa3c062..cf88cb29ac31 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java @@ -41,7 +41,7 @@ public class InBlocksLabelsLeft extends ColumnarTwoColumns @Override public String getLocalizedName() { - return getResource().getResText(UIConsts.RID_REPORT + 84); + return getResource().getResText("RID_REPORT_84"); } @Override diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java index d246e379b4ca..10fc4ae59d0b 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java @@ -1242,11 +1242,11 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter // TODO: #i86902# rpt:Author() can't set with something like rpt:author() // TODO: #i86902# more fieldnames need. - final String sTitleTitle = getResource().getResText(UIConsts.RID_REPORT + 86); // "Title:" + final String sTitleTitle = getResource().getResText("RID_REPORT_86"); // "Title:" final String sTitle = getTableName(); // "Default title, this is a first draft report generated by the new report wizard."; - final String sAuthorTitle = getResource().getResText(UIConsts.RID_REPORT + 87); // "Author:" + final String sAuthorTitle = getResource().getResText("RID_REPORT_87"); // "Author:" final String sAuthor = getUserNameFromConfiguration(); // "You"; - final String sDateTitle = getResource().getResText(UIConsts.RID_REPORT + 88); // "Date:" + final String sDateTitle = getResource().getResText("RID_REPORT_88"); // "Date:" // TODO: #i86911# Date: we need to set the style of the date. final String sDate = "rpt:now()"; @@ -1340,7 +1340,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter // If there exists a design template, don't use it. // we don't have a default report definition - final String sPageOf = getResource().getResText(UIConsts.RID_REPORT + 89); // 'Page #page# of #count#' + final String sPageOf = getResource().getResText("RID_REPORT_89"); // 'Page #page# of #count#' // Convert // 'Page #page# of #count#' diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/Tabular.java b/wizards/com/sun/star/wizards/reportbuilder/layout/Tabular.java index bdb5e33154f2..814de5a932ca 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/Tabular.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/Tabular.java @@ -41,7 +41,7 @@ public class Tabular extends ReportBuilderLayouter public String getLocalizedName() { - return getResource().getResText(UIConsts.RID_REPORT + 80); + return getResource().getResText("RID_REPORT_80"); } @Override diff --git a/wizards/com/sun/star/wizards/table/FieldFormatter.java b/wizards/com/sun/star/wizards/table/FieldFormatter.java index df1d3057a1de..db401104a094 100644 --- a/wizards/com/sun/star/wizards/table/FieldFormatter.java +++ b/wizards/com/sun/star/wizards/table/FieldFormatter.java @@ -58,13 +58,13 @@ public class FieldFormatter implements XItemListener this.CurUnoDialog = _CurUnoDialog; curtabindex = (short) (TableWizard.SOFIELDSFORMATPAGE * 100); IFieldFormatStep = Integer.valueOf(TableWizard.SOFIELDSFORMATPAGE); - String sFieldName = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 23); - String sFieldNames = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 25); - String sfieldinfo = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 20); - String sbtnplushelptext = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 45); - String sbtnminushelptext = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 46); + String sFieldName = CurUnoDialog.m_oResource.getResText("RID_TABLE_23"); + String sFieldNames = CurUnoDialog.m_oResource.getResText("RID_TABLE_25"); + String sfieldinfo = CurUnoDialog.m_oResource.getResText("RID_TABLE_20"); + String sbtnplushelptext = CurUnoDialog.m_oResource.getResText("RID_TABLE_45"); + String sbtnminushelptext = CurUnoDialog.m_oResource.getResText("RID_TABLE_46"); - suntitled = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 43); + suntitled = CurUnoDialog.m_oResource.getResText("RID_TABLE_43"); CurUnoDialog.insertLabel("lblFieldNames", new String[] diff --git a/wizards/com/sun/star/wizards/table/Finalizer.java b/wizards/com/sun/star/wizards/table/Finalizer.java index 86496efedbfb..ce6c4bb3151c 100644 --- a/wizards/com/sun/star/wizards/table/Finalizer.java +++ b/wizards/com/sun/star/wizards/table/Finalizer.java @@ -51,14 +51,14 @@ public class Finalizer this.curtabledescriptor = _curtabledescriptor; short curtabindex = (short) (TableWizard.SOFINALPAGE * 100); Integer IFINALSTEP = Integer.valueOf(TableWizard.SOFINALPAGE); - String slblTableName = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 34); - String slblProceed = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 36); - String sWorkWithTable = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 38); - String sStartFormWizard = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 39); - String sModifyTable = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 37); - String sCongratulations = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 35); - String slblCatalog = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 49); - String slblSchema = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 50); + String slblTableName = CurUnoDialog.m_oResource.getResText("RID_TABLE_34"); + String slblProceed = CurUnoDialog.m_oResource.getResText("RID_TABLE_36"); + String sWorkWithTable = CurUnoDialog.m_oResource.getResText("RID_TABLE_38"); + String sStartFormWizard = CurUnoDialog.m_oResource.getResText("RID_TABLE_39"); + String sModifyTable = CurUnoDialog.m_oResource.getResText("RID_TABLE_37"); + String sCongratulations = CurUnoDialog.m_oResource.getResText("RID_TABLE_35"); + String slblCatalog = CurUnoDialog.m_oResource.getResText("RID_TABLE_49"); + String slblSchema = CurUnoDialog.m_oResource.getResText("RID_TABLE_50"); String[] sCatalogNames = curtabledescriptor.getCatalogNames(); String[] sSchemaNames = curtabledescriptor.getSchemaNames(); int nListBoxPosX = 97; diff --git a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java index c9d776140fd6..6bd2ae6e8e92 100644 --- a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java +++ b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java @@ -62,15 +62,15 @@ public class PrimaryKeyHandler implements XFieldSelectionListener bAutoPrimaryKeysupportsAutoIncrmentation = curTableDescriptor.oTypeInspector.isAutoIncrementationSupported(); short curtabindex = (short) ((TableWizard.SOPRIMARYKEYPAGE * 100) - 20); Integer IPRIMEKEYSTEP = Integer.valueOf(TableWizard.SOPRIMARYKEYPAGE); - final String sExplanations = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 26); - final String screatePrimaryKey = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 27); - final String slblPrimeFieldName = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 31); - final String sApplyAutoValue = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 33); - final String sAddAutomatically = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 28); - final String sUseExisting = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 29); - final String sUseSeveral = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 30); - final String slblAvailableFields = CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 4); - final String slblSelPrimaryFields = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 32); + final String sExplanations = CurUnoDialog.m_oResource.getResText("RID_TABLE_26"); + final String screatePrimaryKey = CurUnoDialog.m_oResource.getResText("RID_TABLE_27"); + final String slblPrimeFieldName = CurUnoDialog.m_oResource.getResText("RID_TABLE_31"); + final String sApplyAutoValue = CurUnoDialog.m_oResource.getResText("RID_TABLE_33"); + final String sAddAutomatically = CurUnoDialog.m_oResource.getResText("RID_TABLE_28"); + final String sUseExisting = CurUnoDialog.m_oResource.getResText("RID_TABLE_29"); + final String sUseSeveral = CurUnoDialog.m_oResource.getResText("RID_TABLE_30"); + final String slblAvailableFields = CurUnoDialog.m_oResource.getResText("RID_QUERY_4"); + final String slblSelPrimaryFields = CurUnoDialog.m_oResource.getResText("RID_TABLE_32"); CurUnoDialog.insertLabel("lblExplanation", new String[] { diff --git a/wizards/com/sun/star/wizards/table/ScenarioSelector.java b/wizards/com/sun/star/wizards/table/ScenarioSelector.java index 7f8882995477..7207005894da 100644 --- a/wizards/com/sun/star/wizards/table/ScenarioSelector.java +++ b/wizards/com/sun/star/wizards/table/ScenarioSelector.java @@ -71,12 +71,12 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X bcolumnnameislimited = (imaxcolumnchars > 0) && (imaxcolumnchars < 16); addFieldSelectionListener(this); short pretabindex = (short) (50); - String sExplanation = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 14); - String sCategories = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 15); - String sBusiness = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 16); - String sPrivate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 17); - String sTableNames = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 18); - smytable = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 44); + String sExplanation = CurUnoDialog.m_oResource.getResText("RID_TABLE_14"); + String sCategories = CurUnoDialog.m_oResource.getResText("RID_TABLE_15"); + String sBusiness = CurUnoDialog.m_oResource.getResText("RID_TABLE_16"); + String sPrivate = CurUnoDialog.m_oResource.getResText("RID_TABLE_17"); + String sTableNames = CurUnoDialog.m_oResource.getResText("RID_TABLE_18"); + smytable = CurUnoDialog.m_oResource.getResText("RID_TABLE_44"); Integer IMAINSTEP = Integer.valueOf(TableWizard.SOMAINPAGE); oCGCategory = new CGCategory(CurUnoDialog.xMSF); oCGTable = new CGTable(CurUnoDialog.xMSF); diff --git a/wizards/com/sun/star/wizards/table/TableWizard.java b/wizards/com/sun/star/wizards/table/TableWizard.java index fc8a705552e8..282796a3e4ff 100644 --- a/wizards/com/sun/star/wizards/table/TableWizard.java +++ b/wizards/com/sun/star/wizards/table/TableWizard.java @@ -62,8 +62,8 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener public TableWizard( XMultiServiceFactory xMSF, PropertyValue[] i_wizardContext ) { super( xMSF, 41200, i_wizardContext ); - super.addResourceHandler("dbw"); - String sTitle = m_oResource.getResText(UIConsts.RID_TABLE + 1); + super.addResourceHandler(); + String sTitle = m_oResource.getResText("RID_TABLE_1"); Helper.setUnoPropertyValues(xDialogModel, new String[] { @@ -78,7 +78,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener //TODO if reportResources cannot be gotten dispose officedocument if (getTableResources()) { - setRightPaneHeaders(m_oResource, UIConsts.RID_TABLE + 8, 4); + setRightPaneHeaders(m_oResource, "RID_TABLE_", 8, 4); } } @@ -324,13 +324,13 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener { addRoadmap(); int i = 0; - i = insertRoadmapItem(0, true, m_oResource.getResText(UIConsts.RID_TABLE + 2), SOMAINPAGE); - i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_TABLE + 3), SOFIELDSFORMATPAGE); + i = insertRoadmapItem(0, true, m_oResource.getResText("RID_TABLE_2"), SOMAINPAGE); + i = insertRoadmapItem(i, false, m_oResource.getResText("RID_TABLE_3"), SOFIELDSFORMATPAGE); if (this.curTableDescriptor.supportsPrimaryKeys()) { - i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_TABLE + 4), SOPRIMARYKEYPAGE); + i = insertRoadmapItem(i, false, m_oResource.getResText("RID_TABLE_4"), SOPRIMARYKEYPAGE); } - i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_TABLE + 5), SOFINALPAGE); // Orderby is always supported + i = insertRoadmapItem(i, false, m_oResource.getResText("RID_TABLE_5"), SOFINALPAGE); // Orderby is always supported setRoadmapInteractive(true); setRoadmapComplete(true); setCurrentRoadmapItemID((short) 1); @@ -366,12 +366,12 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener private boolean getTableResources() { - super.m_oResource.getResText(UIConsts.RID_TABLE + 1); - slblFields = m_oResource.getResText(UIConsts.RID_TABLE + 19); - slblSelFields = m_oResource.getResText(UIConsts.RID_TABLE + 25); - serrToManyFields = m_oResource.getResText(UIConsts.RID_TABLE + 47); - serrTableNameexists = m_oResource.getResText(UIConsts.RID_TABLE + 48); - sMsgColumnAlreadyExists = m_oResource.getResText(UIConsts.RID_TABLE + 51); + super.m_oResource.getResText("RID_TABLE_1"); + slblFields = m_oResource.getResText("RID_TABLE_19"); + slblSelFields = m_oResource.getResText("RID_TABLE_25"); + serrToManyFields = m_oResource.getResText("RID_TABLE_47"); + serrTableNameexists = m_oResource.getResText("RID_TABLE_48"); + sMsgColumnAlreadyExists = m_oResource.getResText("RID_TABLE_51"); return true; } diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java b/wizards/com/sun/star/wizards/ui/AggregateComponent.java index 09ca586af85a..c9f0659f385f 100644 --- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java +++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java @@ -180,13 +180,18 @@ public class AggregateComponent extends ControlScroller { if (i == 0) { - soptDetailQuery = CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 11); - soptSummaryQuery = CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 12); - slblAggregate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 16); - slblFieldNames = CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 17); - sFunctions = CurUnoDialog.m_oResource.getResArray(UIConsts.RID_QUERY + 40, 5); - - sDuplicateAggregateFunction = CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 90); + soptDetailQuery = CurUnoDialog.m_oResource.getResText("RID_QUERY_11"); + soptSummaryQuery = CurUnoDialog.m_oResource.getResText("RID_QUERY_12"); + slblAggregate = CurUnoDialog.m_oResource.getResText("RID_QUERY_16"); + slblFieldNames = CurUnoDialog.m_oResource.getResText("RID_QUERY_17"); + sFunctions = new String[5]; + sFunctions[0] = CurUnoDialog.m_oResource.getResText("RID_QUERY_40"); + sFunctions[1] = CurUnoDialog.m_oResource.getResText("RID_QUERY_41"); + sFunctions[2] = CurUnoDialog.m_oResource.getResText("RID_QUERY_42"); + sFunctions[3] = CurUnoDialog.m_oResource.getResText("RID_QUERY_43"); + sFunctions[4] = CurUnoDialog.m_oResource.getResText("RID_QUERY_44"); + + sDuplicateAggregateFunction = CurUnoDialog.m_oResource.getResText("RID_QUERY_90"); } if (ControlRowVector == null) { diff --git a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java index 738b7145a9d6..8cd37ee0ad0e 100644 --- a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java @@ -137,7 +137,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< { if (sQueryPrefix == null) { - sQueryPrefix = CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 22); + sQueryPrefix = CurUnoDialog.m_oResource.getResText("RID_QUERY_22"); } return sQueryPrefix; } @@ -165,7 +165,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< { if (sTablePrefix == null) { - sTablePrefix = CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 21); + sTablePrefix = CurUnoDialog.m_oResource.getResText("RID_QUERY_21"); } return sTablePrefix; } diff --git a/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java b/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java index c08aa9996ef2..f7c8e942e12d 100644 --- a/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/DBLimitedFieldSelection.java @@ -43,7 +43,7 @@ public abstract class DBLimitedFieldSelection this.CurUnoDialog = _CurUnoDialog; FirstHelpIndex = _FirstHelpIndex; curtabindex = (short) (iStep * 100); - sNoField = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 8); + sNoField = CurUnoDialog.m_oResource.getResText("RID_REPORT_8"); IStep = Integer.valueOf(iStep); iCurPosY = iCompPosY; for (int i = 0; i < rowcount; i++) diff --git a/wizards/com/sun/star/wizards/ui/FieldSelection.java b/wizards/com/sun/star/wizards/ui/FieldSelection.java index 1d709b80004c..1f2179f08fb4 100644 --- a/wizards/com/sun/star/wizards/ui/FieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/FieldSelection.java @@ -143,12 +143,12 @@ public class FieldSelection { try { - final String AccessTextMoveSelected = CurUnoDialog.m_oResource.getResText(UIConsts.RID_DB_COMMON + 39); - final String AccessTextRemoveSelected = CurUnoDialog.m_oResource.getResText(UIConsts.RID_DB_COMMON + 40); - final String AccessTextMoveAll = CurUnoDialog.m_oResource.getResText(UIConsts.RID_DB_COMMON + 41); - final String AccessTextRemoveAll = CurUnoDialog.m_oResource.getResText(UIConsts.RID_DB_COMMON + 42); - final String AccessMoveFieldUp = CurUnoDialog.m_oResource.getResText(UIConsts.RID_DB_COMMON + 43); - final String AccessMoveFieldDown = CurUnoDialog.m_oResource.getResText(UIConsts.RID_DB_COMMON + 44); + final String AccessTextMoveSelected = CurUnoDialog.m_oResource.getResText("RID_DB_COMMON_39"); + final String AccessTextRemoveSelected = CurUnoDialog.m_oResource.getResText("RID_DB_COMMON_40"); + final String AccessTextMoveAll = CurUnoDialog.m_oResource.getResText("RID_DB_COMMON_41"); + final String AccessTextRemoveAll = CurUnoDialog.m_oResource.getResText("RID_DB_COMMON_42"); + final String AccessMoveFieldUp = CurUnoDialog.m_oResource.getResText("RID_DB_COMMON_43"); + final String AccessMoveFieldDown = CurUnoDialog.m_oResource.getResText("RID_DB_COMMON_44"); FirstHelpIndex = _FirstHelpIndex; short curtabindex = UnoDialog.setInitialTabindex(_iStep); diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java index b6c39fc55603..f70714a319b1 100644 --- a/wizards/com/sun/star/wizards/ui/FilterComponent.java +++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java @@ -376,14 +376,23 @@ public class FilterComponent boolean bEnabled; sIncSuffix = com.sun.star.wizards.common.Desktop.getIncrementSuffix(CurUnoDialog.getDlgNameAccess(), "optMatchAll"); - String soptMatchAll = CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 9); - String soptMatchAny = CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 10); - slblFieldNames = CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 17); - slblOperators = CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 24); - slblValue = CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 25); - sLogicOperators = CurUnoDialog.m_oResource.getResArray(UIConsts.RID_QUERY + 26, 10 /* 7 */); // =, <>, <, >, <=, >=, like, !like, is null, !is null - - sDuplicateCondition = CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 89); + String soptMatchAll = CurUnoDialog.m_oResource.getResText("RID_QUERY_9"); + String soptMatchAny = CurUnoDialog.m_oResource.getResText("RID_QUERY_10"); + slblFieldNames = CurUnoDialog.m_oResource.getResText("RID_QUERY_17"); + slblOperators = CurUnoDialog.m_oResource.getResText("RID_QUERY_24"); + slblValue = CurUnoDialog.m_oResource.getResText("RID_QUERY_25"); + sLogicOperators = new String[10]; // =, <>, <, >, <=, >=, like, !like, is null, !is null + sLogicOperators[0] = CurUnoDialog.m_oResource.getResText("RID_QUERY_26"); + sLogicOperators[1] = CurUnoDialog.m_oResource.getResText("RID_QUERY_27"); + sLogicOperators[2] = CurUnoDialog.m_oResource.getResText("RID_QUERY_28"); + sLogicOperators[3] = CurUnoDialog.m_oResource.getResText("RID_QUERY_29"); + sLogicOperators[4] = CurUnoDialog.m_oResource.getResText("RID_QUERY_30"); + sLogicOperators[5] = CurUnoDialog.m_oResource.getResText("RID_QUERY_31"); + sLogicOperators[6] = CurUnoDialog.m_oResource.getResText("RID_QUERY_32"); + sLogicOperators[7] = CurUnoDialog.m_oResource.getResText("RID_QUERY_33"); + sLogicOperators[8] = CurUnoDialog.m_oResource.getResText("RID_QUERY_34"); + sLogicOperators[9] = CurUnoDialog.m_oResource.getResText("RID_QUERY_35"); + sDuplicateCondition = CurUnoDialog.m_oResource.getResText("RID_QUERY_89"); // create Radiobuttons // * match all diff --git a/wizards/com/sun/star/wizards/ui/SortingComponent.java b/wizards/com/sun/star/wizards/ui/SortingComponent.java index a15f3a78ce20..a08729fd9af5 100644 --- a/wizards/com/sun/star/wizards/ui/SortingComponent.java +++ b/wizards/com/sun/star/wizards/ui/SortingComponent.java @@ -129,20 +129,20 @@ public class SortingComponent private boolean getResources() { - sSortHeader[0] = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 20); - sSortHeader[1] = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 21); - sSortHeader[2] = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 51); - sSortHeader[3] = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 52); - sSortAscend[0] = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 36); - sSortAscend[1] = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 53); - sSortAscend[2] = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 54); - sSortAscend[3] = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 55); - sSortDescend[0] = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 37); - sSortDescend[1] = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 56); - sSortDescend[2] = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 57); - sSortDescend[3] = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 58); - sSortCriteriaisduplicate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 74); - sNoSorting = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 8); + sSortHeader[0] = CurUnoDialog.m_oResource.getResText("RID_REPORT_20"); + sSortHeader[1] = CurUnoDialog.m_oResource.getResText("RID_REPORT_21"); + sSortHeader[2] = CurUnoDialog.m_oResource.getResText("RID_REPORT_51"); + sSortHeader[3] = CurUnoDialog.m_oResource.getResText("RID_REPORT_52"); + sSortAscend[0] = CurUnoDialog.m_oResource.getResText("RID_REPORT_36"); + sSortAscend[1] = CurUnoDialog.m_oResource.getResText("RID_REPORT_53"); + sSortAscend[2] = CurUnoDialog.m_oResource.getResText("RID_REPORT_54"); + sSortAscend[3] = CurUnoDialog.m_oResource.getResText("RID_REPORT_55"); + sSortDescend[0] = CurUnoDialog.m_oResource.getResText("RID_REPORT_37"); + sSortDescend[1] = CurUnoDialog.m_oResource.getResText("RID_REPORT_56"); + sSortDescend[2] = CurUnoDialog.m_oResource.getResText("RID_REPORT_57"); + sSortDescend[3] = CurUnoDialog.m_oResource.getResText("RID_REPORT_58"); + sSortCriteriaisduplicate = CurUnoDialog.m_oResource.getResText("RID_REPORT_74"); + sNoSorting = CurUnoDialog.m_oResource.getResText("RID_REPORT_8"); return true; } diff --git a/wizards/com/sun/star/wizards/ui/UIConsts.java b/wizards/com/sun/star/wizards/ui/UIConsts.java index 5aeacb03b03b..eb57fefa8650 100644 --- a/wizards/com/sun/star/wizards/ui/UIConsts.java +++ b/wizards/com/sun/star/wizards/ui/UIConsts.java @@ -20,13 +20,6 @@ package com.sun.star.wizards.ui; public interface UIConsts { - - int RID_COMMON = 500; - int RID_DB_COMMON = 1000; - int RID_FORM = 2200; - int RID_QUERY = 2300; - int RID_REPORT = 2400; - int RID_TABLE = 2600; Integer INVISIBLESTEP = 99; String INFOIMAGEURL = "private:graphicrepository/dbaccess/res/exinfo.png"; /** diff --git a/wizards/com/sun/star/wizards/ui/UIConsts.py b/wizards/com/sun/star/wizards/ui/UIConsts.py index b3026cf0590a..f1d7b048c07c 100644 --- a/wizards/com/sun/star/wizards/ui/UIConsts.py +++ b/wizards/com/sun/star/wizards/ui/UIConsts.py @@ -18,10 +18,6 @@ class UIConsts(): RID_COMMON = 500 - RID_DB_COMMON = 1000 - RID_FORM = 2200 - RID_QUERY = 2300 - RID_REPORT = 2400 INVISIBLESTEP = 99 INFOIMAGEURL = "private:graphicrepository/dbaccess/res/exinfo.png" diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java index ee20c710d1f0..404f3b619bd8 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java @@ -761,9 +761,9 @@ public class UnoDialog } } - public void addResourceHandler(String _Module) + public void addResourceHandler() { - m_oResource = new Resource(xMSF, _Module); + m_oResource = new Resource(xMSF); } public static short setInitialTabindex(int _istep) diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java index 93633d6f11a3..238c4da9cea5 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.java +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java @@ -71,8 +71,8 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL { super(xMSF); hid = hid_; - oWizardResource = new Resource(xMSF, "dbw"); - oWizardResource.getResText(UIConsts.RID_DB_COMMON + 33); + oWizardResource = new Resource(xMSF); + oWizardResource.getResText("RID_DB_COMMON_33"); } @Override @@ -220,7 +220,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL } }); - Helper.setUnoPropertyValue(oRoadmap, "Text", oWizardResource.getResText(UIConsts.RID_COMMON + 16)); + Helper.setUnoPropertyValue(oRoadmap, "Text", oWizardResource.getResText("RID_COMMON_16")); } catch (java.lang.Exception jexception) { @@ -228,9 +228,12 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL } } - public void setRMItemLabels(Resource _oResource, int StartResID) + public void setRMItemLabels(Resource _oResource) { - sRMItemLabels = _oResource.getResArray(StartResID, nMaxStep); + sRMItemLabels = new String[nMaxStep]; + for (int i = 0; i < nMaxStep; ++i) { + sRMItemLabels[i] = _oResource.getResText("RID_QUERY_" + String.valueOf(i + 80)); + } } public int insertRoadmapItem(int _Index, boolean _bEnabled, int _LabelID, int _CurItemID) @@ -383,7 +386,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL }, new Object[] { - true, IButtonHeight, oWizardResource.getResText(UIConsts.RID_COMMON + 15), Integer.valueOf(iHelpPosX), Integer.valueOf(iBtnPosY), Short.valueOf((short) PushButtonType.HELP_value), ICurStep, Short.valueOf(curtabindex++), IButtonWidth + true, IButtonHeight, oWizardResource.getResText("RID_COMMON_15"), Integer.valueOf(iHelpPosX), Integer.valueOf(iBtnPosY), Short.valueOf((short) PushButtonType.HELP_value), ICurStep, Short.valueOf(curtabindex++), IButtonWidth }); insertButton("btnWizardBack", new XActionListenerAdapter() { @Override @@ -393,7 +396,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL }, propNames, new Object[] { - false, IButtonHeight, HelpIds.getHelpIdString(hid + 2), oWizardResource.getResText(UIConsts.RID_COMMON + 13), Integer.valueOf(iBackPosX), Integer.valueOf(iBtnPosY), Short.valueOf((short) PushButtonType.STANDARD_value), ICurStep, Short.valueOf(curtabindex++), IButtonWidth + false, IButtonHeight, HelpIds.getHelpIdString(hid + 2), oWizardResource.getResText("RID_COMMON_13"), Integer.valueOf(iBackPosX), Integer.valueOf(iBtnPosY), Short.valueOf((short) PushButtonType.STANDARD_value), ICurStep, Short.valueOf(curtabindex++), IButtonWidth }); insertButton("btnWizardNext", new XActionListenerAdapter() { @@ -404,7 +407,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL }, propNames, new Object[] { - true, IButtonHeight, HelpIds.getHelpIdString(hid + 3), oWizardResource.getResText(UIConsts.RID_COMMON + 14), Integer.valueOf(iNextPosX), Integer.valueOf(iBtnPosY), Short.valueOf((short) PushButtonType.STANDARD_value), ICurStep, Short.valueOf(curtabindex++), IButtonWidth + true, IButtonHeight, HelpIds.getHelpIdString(hid + 3), oWizardResource.getResText("RID_COMMON_14"), Integer.valueOf(iNextPosX), Integer.valueOf(iBtnPosY), Short.valueOf((short) PushButtonType.STANDARD_value), ICurStep, Short.valueOf(curtabindex++), IButtonWidth }); insertButton("btnWizardFinish", new XActionListenerAdapter() { @@ -415,7 +418,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL }, propNames, new Object[] { - true, IButtonHeight, HelpIds.getHelpIdString(hid + 4), oWizardResource.getResText(UIConsts.RID_COMMON + 12), Integer.valueOf(iFinishPosX), Integer.valueOf(iBtnPosY), Short.valueOf((short) PushButtonType.STANDARD_value), ICurStep, Short.valueOf(curtabindex++), IButtonWidth + true, IButtonHeight, HelpIds.getHelpIdString(hid + 4), oWizardResource.getResText("RID_COMMON_12"), Integer.valueOf(iFinishPosX), Integer.valueOf(iBtnPosY), Short.valueOf((short) PushButtonType.STANDARD_value), ICurStep, Short.valueOf(curtabindex++), IButtonWidth }); insertButton("btnWizardCancel", new XActionListenerAdapter() { @@ -426,7 +429,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL }, propNames, new Object[] { - true, IButtonHeight, HelpIds.getHelpIdString(hid + 5), oWizardResource.getResText(UIConsts.RID_COMMON + 11), Integer.valueOf(iCancelPosX), Integer.valueOf(iBtnPosY), Short.valueOf((short) PushButtonType.STANDARD_value), ICurStep, Short.valueOf(curtabindex++), IButtonWidth + true, IButtonHeight, HelpIds.getHelpIdString(hid + 5), oWizardResource.getResText("RID_COMMON_11"), Integer.valueOf(iCancelPosX), Integer.valueOf(iBtnPosY), Short.valueOf((short) PushButtonType.STANDARD_value), ICurStep, Short.valueOf(curtabindex++), IButtonWidth }); setControlProperty("btnWizardNext", "DefaultButton", Boolean.TRUE); @@ -602,9 +605,12 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL changeToStep(nNewStep); } - public void setRightPaneHeaders(Resource _oResource, int StartResID, int _nMaxStep) + public void setRightPaneHeaders(Resource _oResource, String ResNameBase, int StartResID, int _nMaxStep) { - String[] sRightPaneHeaders = _oResource.getResArray(StartResID, _nMaxStep); + String[] sRightPaneHeaders = new String[_nMaxStep]; + for (int i = 0; i < nMaxStep; ++i) { + sRightPaneHeaders[i] = _oResource.getResText(ResNameBase + String.valueOf(i + StartResID)); + } setRightPaneHeaders(sRightPaneHeaders); } |