1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 package com.sun.star.wizards.letter; 24 25 import com.sun.star.lang.XMultiServiceFactory; 26 import com.sun.star.wizards.common.Resource; 27 28 public class LetterWizardDialogResources extends Resource 29 { 30 31 final static String UNIT_NAME = "dbwizres"; 32 final static String MODULE_NAME = "dbw"; 33 final static int RID_LETTERWIZARDDIALOG_START = 3000; 34 final static int RID_LETTERWIZARDGREETING_START = 3080; 35 final static int RID_LETTERWIZARDSALUTATION_START = 3090; 36 final static int RID_LETTERWIZARDROADMAP_START = 3100; 37 final static int RID_LETTERWIZARDLANGUAGE_START = 3110; 38 final static int RID_RID_COMMON_START = 500; 39 protected String[] RoadmapLabels = new String[7]; 40 protected String[] SalutationLabels = new String[3]; 41 protected String[] GreetingLabels = new String[3]; 42 protected String[] LanguageLabels = new String[16]; 43 String resOverwriteWarning; 44 String resTemplateDescription; 45 String resLetterWizardDialog_title; 46 String resLabel9_value; 47 String resoptBusinessLetter_value; 48 String resoptPrivOfficialLetter_value; 49 String resoptPrivateLetter_value; 50 String reschkBusinessPaper_value; 51 String reschkPaperCompanyLogo_value; 52 String reschkPaperCompanyAddress_value; 53 String reschkPaperFooter_value; 54 String reschkCompanyReceiver_value; 55 String reschkUseLogo_value; 56 String reschkUseAddressReceiver_value; 57 String reschkUseSigns_value; 58 String reschkUseSubject_value; 59 String reschkUseSalutation_value; 60 String reschkUseBendMarks_value; 61 String reschkUseGreeting_value; 62 String reschkUseFooter_value; 63 String resoptSenderPlaceholder_value; 64 String resoptSenderDefine_value; 65 String resoptReceiverPlaceholder_value; 66 String resoptReceiverDatabase_value; 67 String reschkFooterNextPages_value; 68 String reschkFooterPageNumbers_value; 69 String restxtTemplateName_value; 70 String resoptCreateLetter_value; 71 String resoptMakeChanges_value; 72 String reslblBusinessStyle_value; 73 String reslblPrivOfficialStyle_value; 74 String reslblPrivateStyle_value; 75 String reslblIntroduction_value; 76 String reslblLogoHeight_value; 77 String reslblLogoWidth_value; 78 String reslblLogoX_value; 79 String reslblLogoY_value; 80 String reslblAddressHeight_value; 81 String reslblAddressWidth_value; 82 String reslblAddressX_value; 83 String reslblAddressY_value; 84 String reslblFooterHeight_value; 85 String reslblLetterNorm_value; 86 String reslblSenderAddress_value; 87 String reslblSenderName_value; 88 String reslblSenderStreet_value; 89 String reslblPostCodeCity_value; 90 String reslblReceiverAddress_value; 91 String reslblFooter_value; 92 String reslblFinalExplanation1_value; 93 String reslblFinalExplanation2_value; 94 String reslblTemplateName_value; 95 String reslblTemplatePath_value; 96 String reslblProceed_value; 97 String reslblTitle1_value; 98 String reslblTitle3_value; 99 String reslblTitle2_value; 100 String reslblTitle4_value; 101 String reslblTitle5_value; 102 String reslblTitle6_value; 103 LetterWizardDialogResources(XMultiServiceFactory xmsf)104 public LetterWizardDialogResources(XMultiServiceFactory xmsf) 105 { 106 super(xmsf, UNIT_NAME, MODULE_NAME); 107 108 resLetterWizardDialog_title = getResText(RID_LETTERWIZARDDIALOG_START + 1); 109 resLabel9_value = getResText(RID_LETTERWIZARDDIALOG_START + 2); 110 resoptBusinessLetter_value = getResText(RID_LETTERWIZARDDIALOG_START + 3); 111 resoptPrivOfficialLetter_value = getResText(RID_LETTERWIZARDDIALOG_START + 4); 112 resoptPrivateLetter_value = getResText(RID_LETTERWIZARDDIALOG_START + 5); 113 reschkBusinessPaper_value = getResText(RID_LETTERWIZARDDIALOG_START + 6); 114 reschkPaperCompanyLogo_value = getResText(RID_LETTERWIZARDDIALOG_START + 7); 115 reschkPaperCompanyAddress_value = getResText(RID_LETTERWIZARDDIALOG_START + 8); 116 reschkPaperFooter_value = getResText(RID_LETTERWIZARDDIALOG_START + 9); 117 reschkCompanyReceiver_value = getResText(RID_LETTERWIZARDDIALOG_START + 10); 118 reschkUseLogo_value = getResText(RID_LETTERWIZARDDIALOG_START + 11); 119 reschkUseAddressReceiver_value = getResText(RID_LETTERWIZARDDIALOG_START + 12); 120 reschkUseSigns_value = getResText(RID_LETTERWIZARDDIALOG_START + 13); 121 reschkUseSubject_value = getResText(RID_LETTERWIZARDDIALOG_START + 14); 122 reschkUseSalutation_value = getResText(RID_LETTERWIZARDDIALOG_START + 15); 123 reschkUseBendMarks_value = getResText(RID_LETTERWIZARDDIALOG_START + 16); 124 reschkUseGreeting_value = getResText(RID_LETTERWIZARDDIALOG_START + 17); 125 reschkUseFooter_value = getResText(RID_LETTERWIZARDDIALOG_START + 18); 126 resoptSenderPlaceholder_value = getResText(RID_LETTERWIZARDDIALOG_START + 19); 127 resoptSenderDefine_value = getResText(RID_LETTERWIZARDDIALOG_START + 20); 128 resoptReceiverPlaceholder_value = getResText(RID_LETTERWIZARDDIALOG_START + 21); 129 resoptReceiverDatabase_value = getResText(RID_LETTERWIZARDDIALOG_START + 22); 130 reschkFooterNextPages_value = getResText(RID_LETTERWIZARDDIALOG_START + 23); 131 reschkFooterPageNumbers_value = getResText(RID_LETTERWIZARDDIALOG_START + 24); 132 restxtTemplateName_value = getResText(RID_LETTERWIZARDDIALOG_START + 25); 133 resoptCreateLetter_value = getResText(RID_LETTERWIZARDDIALOG_START + 26); 134 resoptMakeChanges_value = getResText(RID_LETTERWIZARDDIALOG_START + 27); 135 reslblBusinessStyle_value = getResText(RID_LETTERWIZARDDIALOG_START + 28); 136 reslblPrivOfficialStyle_value = getResText(RID_LETTERWIZARDDIALOG_START + 29); 137 reslblPrivateStyle_value = getResText(RID_LETTERWIZARDDIALOG_START + 30); 138 reslblIntroduction_value = getResText(RID_LETTERWIZARDDIALOG_START + 31); 139 reslblLogoHeight_value = getResText(RID_LETTERWIZARDDIALOG_START + 32); 140 reslblLogoWidth_value = getResText(RID_LETTERWIZARDDIALOG_START + 33); 141 reslblLogoX_value = getResText(RID_LETTERWIZARDDIALOG_START + 34); 142 reslblLogoY_value = getResText(RID_LETTERWIZARDDIALOG_START + 35); 143 reslblAddressHeight_value = getResText(RID_LETTERWIZARDDIALOG_START + 36); 144 reslblAddressWidth_value = getResText(RID_LETTERWIZARDDIALOG_START + 37); 145 reslblAddressX_value = getResText(RID_LETTERWIZARDDIALOG_START + 38); 146 reslblAddressY_value = getResText(RID_LETTERWIZARDDIALOG_START + 39); 147 reslblFooterHeight_value = getResText(RID_LETTERWIZARDDIALOG_START + 40); 148 reslblLetterNorm_value = getResText(RID_LETTERWIZARDDIALOG_START + 41); 149 reslblSenderAddress_value = getResText(RID_LETTERWIZARDDIALOG_START + 42); 150 reslblSenderName_value = getResText(RID_LETTERWIZARDDIALOG_START + 43); 151 reslblSenderStreet_value = getResText(RID_LETTERWIZARDDIALOG_START + 44); 152 reslblPostCodeCity_value = getResText(RID_LETTERWIZARDDIALOG_START + 45); 153 reslblReceiverAddress_value = getResText(RID_LETTERWIZARDDIALOG_START + 46); 154 reslblFooter_value = getResText(RID_LETTERWIZARDDIALOG_START + 47); 155 reslblFinalExplanation1_value = getResText(RID_LETTERWIZARDDIALOG_START + 48); 156 reslblFinalExplanation2_value = getResText(RID_LETTERWIZARDDIALOG_START + 49); 157 reslblTemplateName_value = getResText(RID_LETTERWIZARDDIALOG_START + 50); 158 reslblTemplatePath_value = getResText(RID_LETTERWIZARDDIALOG_START + 51); 159 reslblProceed_value = getResText(RID_LETTERWIZARDDIALOG_START + 52); 160 reslblTitle1_value = getResText(RID_LETTERWIZARDDIALOG_START + 53); 161 reslblTitle3_value = getResText(RID_LETTERWIZARDDIALOG_START + 54); 162 reslblTitle2_value = getResText(RID_LETTERWIZARDDIALOG_START + 55); 163 reslblTitle4_value = getResText(RID_LETTERWIZARDDIALOG_START + 56); 164 reslblTitle5_value = getResText(RID_LETTERWIZARDDIALOG_START + 57); 165 reslblTitle6_value = getResText(RID_LETTERWIZARDDIALOG_START + 58); 166 167 loadRoadmapResources(); 168 loadSalutationResources(); 169 loadGreetingResources(); 170 loadCommonResources(); 171 } 172 loadCommonResources()173 private void loadCommonResources() 174 { 175 resOverwriteWarning = getResText(RID_RID_COMMON_START + 19); 176 resTemplateDescription = getResText(RID_RID_COMMON_START + 20); 177 } 178 loadRoadmapResources()179 private void loadRoadmapResources() 180 { 181 for (int i = 1; i < 7; i++) 182 { 183 RoadmapLabels[i] = getResText(RID_LETTERWIZARDROADMAP_START + i); 184 } 185 } 186 loadSalutationResources()187 private void loadSalutationResources() 188 { 189 for (int i = 1; i < 4; i++) 190 { 191 SalutationLabels[i - 1] = getResText(RID_LETTERWIZARDSALUTATION_START + i); 192 } 193 } 194 loadGreetingResources()195 private void loadGreetingResources() 196 { 197 for (int i = 1; i < 4; i++) 198 { 199 GreetingLabels[i - 1] = getResText(RID_LETTERWIZARDGREETING_START + i); 200 } 201 } 202 } 203