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.fax;
24 
25 import com.sun.star.lang.XMultiServiceFactory;
26 import com.sun.star.wizards.common.Resource;
27 
28 public class FaxWizardDialogResources extends Resource
29 {
30 
31     final static String UNIT_NAME = "dbwizres";
32     final static String MODULE_NAME = "dbw";
33     final static int RID_FAXWIZARDDIALOG_START = 3200;
34     final static int RID_FAXWIZARDCOMMUNICATION_START = 3270;
35     final static int RID_FAXWIZARDGREETING_START = 3280;
36     final static int RID_FAXWIZARDSALUTATION_START = 3290;
37     final static int RID_FAXWIZARDROADMAP_START = 3300;
38     final static int RID_RID_COMMON_START = 500;
39     protected String[] RoadmapLabels = new String[7];
40     protected String[] SalutationLabels = new String[4];
41     protected String[] GreetingLabels = new String[4];
42     protected String[] CommunicationLabels = new String[3];
43     String resOverwriteWarning;
44     String resTemplateDescription;
45     String resFaxWizardDialog_title;
46     String resLabel9_value;
47     String resoptBusinessFax_value;
48     String resoptPrivateFax_value;
49     String reschkUseLogo_value;
50     String reschkUseSubject_value;
51     String reschkUseSalutation_value;
52     String reschkUseGreeting_value;
53     String reschkUseFooter_value;
54     String resoptSenderPlaceholder_value;
55     String resoptSenderDefine_value;
56     String restxtTemplateName_value;
57     String resoptCreateFax_value;
58     String resoptMakeChanges_value;
59     String reslblBusinessStyle_value;
60     String reslblPrivateStyle_value;
61     String reslblIntroduction_value;
62     String reslblSenderAddress_value;
63     String reslblSenderName_value;
64     String reslblSenderStreet_value;
65     String reslblPostCodeCity_value;
66     String reslblFooter_value;
67     String reslblFinalExplanation1_value;
68     String reslblFinalExplanation2_value;
69     String reslblTemplateName_value;
70     String reslblTemplatePath_value;
71     String reslblProceed_value;
72     String reslblTitle1_value;
73     String reslblTitle3_value;
74     String reslblTitle4_value;
75     String reslblTitle5_value;
76     String reslblTitle6_value;
77     String reschkFooterNextPages_value;
78     String reschkFooterPageNumbers_value;
79     String reschkUseDate_value;
80     String reschkUseCommunicationType_value;
81     String resLabel1_value;
82     String resoptReceiverPlaceholder_value;
83     String resoptReceiverDatabase_value;
84     String resLabel2_value;
85 
FaxWizardDialogResources(XMultiServiceFactory xmsf)86     public FaxWizardDialogResources(XMultiServiceFactory xmsf)
87     {
88         super(xmsf, UNIT_NAME, MODULE_NAME);
89         /**
90          * Delete the String, uncomment the getResText method
91          *
92          */
93         resFaxWizardDialog_title = getResText(RID_FAXWIZARDDIALOG_START + 1);
94         resLabel9_value = getResText(RID_FAXWIZARDDIALOG_START + 2);
95         resoptBusinessFax_value = getResText(RID_FAXWIZARDDIALOG_START + 3);
96         resoptPrivateFax_value = getResText(RID_FAXWIZARDDIALOG_START + 4);
97         reschkUseLogo_value = getResText(RID_FAXWIZARDDIALOG_START + 5);
98         reschkUseSubject_value = getResText(RID_FAXWIZARDDIALOG_START + 6);
99         reschkUseSalutation_value = getResText(RID_FAXWIZARDDIALOG_START + 7);
100         reschkUseGreeting_value = getResText(RID_FAXWIZARDDIALOG_START + 8);
101         reschkUseFooter_value = getResText(RID_FAXWIZARDDIALOG_START + 9);
102         resoptSenderPlaceholder_value = getResText(RID_FAXWIZARDDIALOG_START + 10);
103         resoptSenderDefine_value = getResText(RID_FAXWIZARDDIALOG_START + 11);
104         restxtTemplateName_value = getResText(RID_FAXWIZARDDIALOG_START + 12);
105         resoptCreateFax_value = getResText(RID_FAXWIZARDDIALOG_START + 13);
106         resoptMakeChanges_value = getResText(RID_FAXWIZARDDIALOG_START + 14);
107         reslblBusinessStyle_value = getResText(RID_FAXWIZARDDIALOG_START + 15);
108         reslblPrivateStyle_value = getResText(RID_FAXWIZARDDIALOG_START + 16);
109         reslblIntroduction_value = getResText(RID_FAXWIZARDDIALOG_START + 17);
110         reslblSenderAddress_value = getResText(RID_FAXWIZARDDIALOG_START + 18);
111         reslblSenderName_value = getResText(RID_FAXWIZARDDIALOG_START + 19);
112         reslblSenderStreet_value = getResText(RID_FAXWIZARDDIALOG_START + 20);
113         reslblPostCodeCity_value = getResText(RID_FAXWIZARDDIALOG_START + 21);
114         reslblFooter_value = getResText(RID_FAXWIZARDDIALOG_START + 22);
115         reslblFinalExplanation1_value = getResText(RID_FAXWIZARDDIALOG_START + 23);
116         reslblFinalExplanation2_value = getResText(RID_FAXWIZARDDIALOG_START + 24);
117         reslblTemplateName_value = getResText(RID_FAXWIZARDDIALOG_START + 25);
118         reslblTemplatePath_value = getResText(RID_FAXWIZARDDIALOG_START + 26);
119         reslblProceed_value = getResText(RID_FAXWIZARDDIALOG_START + 27);
120         reslblTitle1_value = getResText(RID_FAXWIZARDDIALOG_START + 28);
121         reslblTitle3_value = getResText(RID_FAXWIZARDDIALOG_START + 29);
122         reslblTitle4_value = getResText(RID_FAXWIZARDDIALOG_START + 30);
123         reslblTitle5_value = getResText(RID_FAXWIZARDDIALOG_START + 31);
124         reslblTitle6_value = getResText(RID_FAXWIZARDDIALOG_START + 32);
125         reschkFooterNextPages_value = getResText(RID_FAXWIZARDDIALOG_START + 33);
126         reschkFooterPageNumbers_value = getResText(RID_FAXWIZARDDIALOG_START + 34);
127         reschkUseDate_value = getResText(RID_FAXWIZARDDIALOG_START + 35);
128         reschkUseCommunicationType_value = getResText(RID_FAXWIZARDDIALOG_START + 36);
129         resLabel1_value = getResText(RID_FAXWIZARDDIALOG_START + 37);
130         resoptReceiverPlaceholder_value = getResText(RID_FAXWIZARDDIALOG_START + 38);
131         resoptReceiverDatabase_value = getResText(RID_FAXWIZARDDIALOG_START + 39);
132         resLabel2_value = getResText(RID_FAXWIZARDDIALOG_START + 40);
133         loadRoadmapResources();
134         loadSalutationResources();
135         loadGreetingResources();
136         loadCommunicationResources();
137         loadCommonResources();
138     }
139 
loadCommonResources()140     private void loadCommonResources()
141     {
142         resOverwriteWarning = getResText(RID_RID_COMMON_START + 19);
143         resTemplateDescription = getResText(RID_RID_COMMON_START + 20);
144     }
145 
loadRoadmapResources()146     private void loadRoadmapResources()
147     {
148         for (int i = 1; i < 6; i++)
149         {
150             RoadmapLabels[i] = getResText(RID_FAXWIZARDROADMAP_START + i);
151         }
152     }
153 
loadSalutationResources()154     private void loadSalutationResources()
155     {
156         for (int i = 1; i < 5; i++)
157         {
158             SalutationLabels[i - 1] = getResText(RID_FAXWIZARDSALUTATION_START + i);
159         }
160     }
161 
loadGreetingResources()162     private void loadGreetingResources()
163     {
164         for (int i = 1; i < 5; i++)
165         {
166             GreetingLabels[i - 1] = getResText(RID_FAXWIZARDGREETING_START + i);
167         }
168     }
169 
loadCommunicationResources()170     private void loadCommunicationResources()
171     {
172         for (int i = 1; i < 4; i++)
173         {
174             CommunicationLabels[i - 1] = getResText(RID_FAXWIZARDCOMMUNICATION_START + i);
175         }
176     }
177 }