xref: /aoo41x/main/wizards/source/euro/Init.xba (revision cf5c25e8)
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
3<!--***********************************************************
4 *
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements.  See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership.  The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License.  You may obtain a copy of the License at
12 *
13 *   http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied.  See the License for the
19 * specific language governing permissions and limitations
20 * under the License.
21 *
22 ***********************************************************-->
23<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Init" script:language="StarBasic">Option Explicit
24REM ***** BASIC *****
25
26Public Const SBRANGEUBOUND = 20
27Public StyleRangeAssignmentList(SBRANGEUBOUND)as String
28Public SelRangeList(SBRANGEUBOUND) as String
29Public RangeList(SBRANGEUBOUND) as String
30Public UnprotectList() as String
31Public FilterNames(2,1) as String
32Public bDoUnProtect as Boolean
33Public bCancelTask as Boolean
34
35Public sREADY as String
36Public sPROTECT as String
37Public sCONTINUE as String
38
39Public sSELTEMPL as String
40Public sSELCELL as String
41Public sCURRRANGES as String
42Public sTEMPLATES as String
43
44Public sSOURCEFILE as String
45Public sSOURCEDIR as String
46Public sTARGETDIR as String
47
48Public sStsPROGRESS as String
49Public sStsCELLPROGRSS as String
50Public sStsRELRANGES as String
51Public sStsRELSHEETRANGES as String
52Public sStsREPROTECT as String
53
54Public sMsgSELDIR as String
55Public sMsgSELFILE as String
56Public sMsgTARGETDIR as String
57Public sMsgNOTTHERE as String
58Public sMsgDLGTITLE as String
59Public sMsgUNPROTECT as String
60Public sMsgPWPROTECT as String
61Public sMsgWRONGPW as String
62Public sMsgSHEETPROTECTED as String
63Public sMsgWARNING as String
64Public sMsgSHEETSNOPROTECT as String
65Public sMsgSHEETNOPROTECT as String
66Public sMsgCHOOSECURRENCY as String
67Public sMsgPASSWORD as String
68Public sMsgOK as String
69Public sMsgCANCEL as String
70Public sMsgFileInvalid as String
71Public sMsgNODIRECTORY as String
72Public sMsgDOCISREADONLY as String
73Public sMsgFileExists as String
74Public sMsgCancelConversion as String
75Public sMsgCancelTitle as String
76Public sCurrPORTUGUESE as String
77Public sCurrDUTCH as String
78Public sCurrFRENCH as String
79Public sCurrSPANISH as String
80Public sCurrITALIAN as String
81Public sCurrGERMAN as String
82Public sCurrBELGIAN as String
83Public sCurrIRISH as String
84Public sCurrLUXEMBOURG as String
85Public sCurrAUSTRIAN as String
86Public sCurrFINNISH as String
87Public sCurrGREEK as String
88Public sCurrSLOVENIAN as String
89Public sCurrCYPRIOT as String
90Public sCurrMALTESE as String
91Public sCurrSLOVAK as String
92Public sCurrUNKNOWN as String
93Public sCurrSYSUNKNOWN as String
94
95Public sPrgsRETRIEVAL as String
96Public sPrgsCONVERTING as String
97Public sPrgsUNPROTECT as String
98Public sInclusiveSubDir as String
99
100Public Const SBCOUNTRYCOUNT = 15
101Public CurMimeType as String
102Public CurCellCount as Long
103Public oSheets as Object
104Public oStyles as Object
105Public oStyle as Object
106Public oFormats as Object
107Public aSimpleStr as String
108Public nSimpleKey as Long
109Public aFormat() as Variant
110Public oRanges as Object
111Public oRange as Object
112Public nLanguage as integer
113Public nFormatLanguage as integer
114Public aCellFormat as Variant
115Public oDocument as Object
116Public StartCol, StartRow, EndCol, EndRow as String
117Public oSheet as Object
118Public IntStartCol,	IntStartRow, IntEndCol,	IntEndRow as integer
119Public oSelRanges as Object
120Public nFormatType as Integer
121Public sFormatCurrency as String
122Public sFormatLanguage as String
123Public CurSheetName as String
124Public oStatusLine as Object
125Public Const SBRELGET = 50
126Public StatusValue as Single
127Public TotCellCount as Long
128Public StyleIndex as Integer
129Public RangeIndex as Integer
130Public CurrIndex as Integer
131Public ActLangNumber(1) as Integer
132Public CurExtension(2) as String
133Public Currfactor as Double
134Public CurrSymbolList(2) as String
135Public CurrLanguage as String
136Public CurrValue(15,5)
137Public LangIDValue(15,2,2) as String
138Public PreName as String
139Public Separator as String
140Public BitmapDir as String
141Public TypeIndex as Integer, CSIndex as Integer, LangIndex as Integer, FSIndex as Integer
142Public oLocale as New com.sun.star.lang.Locale
143Public sEuroSign as String
144Public oPointer as Object
145Public sDocType as String
146Public bPreSelected as Boolean
147Public bRecursive as Boolean
148Public bCancelProtection as Boolean
149Public CurrRoundMode as Boolean
150Public bRangeListDefined as Boolean
151Public bDocHasProtectedSheets as Boolean
152Public sGOON as String
153Public sHELP as String
154Public sCANCEL as String
155Dim sEnd as String
156
157Sub InitializeResources()
158Dim LocWorkPath as String
159	With DialogModel
160		&apos; Strings that are also needed by the Password Dialog
161		sGoOn = GetResText(1003)
162		sHelp = GetResText(1001)
163		sCANCEL = GetResText(1418)
164		sEnd = GetResText(1000)
165		sPROTECT = GetResText(1005)
166		sCONTINUE = GetResText(1007)
167		sSELTEMPL = GetResText(1106)
168		sSELCELL = GetResText(1107)
169		sCURRRANGES = GetResText(1108)
170		sTEMPLATES = GetResText(1109)
171		sStsPROGRESS = GetResText(1300)
172		sStsCELLPROGRSS = GetResText(1301)
173		sStsRELSHEETRANGES = GetResText(1302)
174		sStsRELRANGES = GetResText(1303)
175		sStsREPROTECT = GetResText(1304)
176		sREADY = GetResText(1400)
177		sMsgSELDIR = GetResText(1401)
178		sMsgSELFILE = GetResText(1402)
179		sMsgTARGETDIR = GetResText(1403)
180		sMsgNOTTHERE = GetResText(1404)
181		sMsgDLGTITLE = GetResText(1405)
182		sMsgUNPROTECT = GetResText(1406)
183		sMsgPWPROTECT = GetResText(1407)
184		sMsgWRONGPW = GetResText(1408)
185		sMsgSHEETPROTECTED = GetResText(1409)
186		sMsgWARNING = GetResText(1410)
187		sMsgSHEETSNOPROTECT = GetResText(1411)
188		sMsgSHEETNOPROTECT = GetResText(1412)
189		sMsgCHOOSECURRENCY = GetResText(1415)
190		sMsgPASSWORD = GetResText(1416)
191		sMsgOK = GetResText(1417)
192		sMsgCANCEL = GetResText(1418)
193		sMsgFILEINVALID = GetResText(1419)
194		sMsgFILEINVALID = ReplaceString(sMsgFILEINVALID,&quot;%PRODUCTNAME&quot;, GetProductname())
195		SMsgNODIRECTORY = GetResText(1420)
196		sMsgDOCISREADONLY = GetResText(1421)
197		sMsgFileExists = GetResText(1422)
198		sMsgCancelConversion = GetResText(1423)
199		sMsgCancelTitle = GetResText(1424)
200		sCurrPORTUGUESE = GetResText(1500)
201		sCurrDUTCH = GetResText(1501)
202		sCurrFRENCH = GetResText(1502)
203		sCurrSPANISH = GetResText(1503)
204		sCurrITALIAN = GetResText(1504)
205		sCurrGERMAN = GetResText(1505)
206		sCurrBELGIAN = GetResText(1506)
207		sCurrIRISH = GetResText(1507)
208		sCurrLUXEMBOURG = GetResText(1508)
209		sCurrAUSTRIAN = GetResText(1509)
210		sCurrFINNISH = GetResText(1510)
211		sCurrGREEK = GetResText(1511)
212		sCurrSLOVENIAN = GetResText(1512)
213		sCurrCYPRIOT = GetResText(1513)
214		sCurrMALTESE = GetResText(1514)
215		sCurrSLOVAK = GetResText(1515)
216		sCurrUNKNOWN = GetResText(1516)
217		sCurrSYSUNKNOWN = GetResText(1517)
218		.cmdCancel.Label = sCANCEL
219		.cmdHelp.Label = sHELP
220		.cmdBack.Label = GetResText(1002)
221		.cmdGoOn.Label = sGOON
222		.lblHint.Label = GetResText(1004)
223		.lblCurrencies.Label = GetResText(1006)
224		.cmdBack.Enabled = False
225		If .Step = 1 Then
226			.chkComplete.Label = GetResText(1100)
227			.hlnSelection.Label = GetResText(1101)
228			.optCellTemplates.Label = GetResText(1102)
229			.optSheetRanges.Label = GetResText(1103)
230			.optDocRanges.Label = GetResText(1104)
231			.optSelRange.Label = GetResText(1105)
232			sCURRRANGES = GetResText(1108)
233			.lblSelection.Label = sCURRRANGES
234		Else
235			.lblProgress.Label = sStsPROGRESS
236		 	.hlnExtent.Label = GetResText(1200)
237			.optSingleFile.Label = GetResText(1201)
238 			.optWholeDir.Label = GetResText(1202)
239 			.chkProtect.Label = GetResText(1207)
240 			.chkTextDocuments.Label = GetResText(1210)
241
242			sSOURCEFILE = GetResText(1203)
243			sSOURCEDIR = GetResText(1204)
244 			.lblSource.Label = sSOURCEDIR
245 			sInclusiveSubDir = GetResText(1205)
246 			.chkRecursive.Label = sInclusiveSubDir
247			sTARGETDIR = GetResText(1206)
248 			.lblTarget.Label = STARGETDIR
249
250			LocWorkPath = GetPathSettings(&quot;Work&quot;)
251			If Not oUcb.Exists(LocWorkPath) Then
252				ShowNoOfficePathError()
253				Stop
254			End If
255
256			.txtSource.Text = ConvertfromUrl(LocWorkPath)
257
258			SubstDir = .txtSource.Text
259			.txtTarget.Text = .txtSource.Text
260			.hlnProgress.Label = GetResText(1600)
261			.lblConfig.Label = GetResText(1603)
262			sPrgsRETRIEVAL = GetResText(1601)
263			sPrgsCONVERTING = GetResText(1602)
264			sPrgsUNPROTECT = GetResText(1604)
265		End If
266	End With
267End Sub
268
269Sub InitializeLanguages()
270	sEuroSign = chr(8364)
271
272&apos; CURRENCIES_PORTUGUESE
273	LangIDValue(0,0,0) = &quot;pt&quot;
274	LangIDValue(0,0,1) = &quot;&quot;
275	LangIDValue(0,0,2) = &quot;-816&quot;
276
277&apos; CURRENCIES_DUTCH
278	LangIDValue(1,0,0) = &quot;nl&quot;
279	LangIDValue(1,0,1) = &quot;&quot;
280	LangIDValue(1,0,2) = &quot;-413&quot;
281
282&apos; CURRENCIES_FRENCH
283	LangIDValue(2,0,0) = &quot;fr&quot;
284	LangIDValue(2,0,1) = &quot;&quot;
285	LangIDValue(2,0,2) = &quot;-40C&quot;
286
287&apos; CURRENCIES_SPANISH
288	LangIDValue(3,0,0) = &quot;es&quot;
289	LangIDValue(3,0,1) = &quot;&quot;
290	LangIDValue(3,0,2) = &quot;-40A&quot;
291
292	&apos;Spanish modern
293	LangIDValue(3,1,0) = &quot;es&quot;
294	LangIDValue(3,1,1) = &quot;&quot;
295	LangIDValue(3,1,2) = &quot;-C0A&quot;
296
297	&apos;Spanish katalanic
298	LangIDValue(3,2,0) = &quot;es&quot;
299	LangIDValue(3,2,1) = &quot;&quot;
300	LangIDValue(3,2,2) = &quot;-403&quot;
301
302&apos; CURRENCIES_ITALIAN
303	LangIDValue(4,0,0) = &quot;it&quot;
304	LangIDValue(4,0,1) = &quot;&quot;
305	LangIDValue(4,0,2) = &quot;-410&quot;
306
307&apos; CURRENCIES_GERMAN
308	LangIDValue(5,0,0) = &quot;de&quot;
309	LangIDValue(5,0,1) = &quot;DE&quot;
310	LangIDValue(5,0,2) = &quot;-407&quot;
311
312&apos; CURRENCIES_BELGIAN
313	LangIDValue(6,0,0) = &quot;fr&quot;
314	LangIDValue(6,0,1) = &quot;BE&quot;
315	LangIDValue(6,0,2) = &quot;-80C&quot;
316
317	LangIDValue(6,1,0) = &quot;nl&quot;
318	LangIDValue(6,1,1) = &quot;BE&quot;
319	LangIDValue(6,1,2) = &quot;-813&quot;
320
321&apos; CURRENCIES_IRISH
322	LangIDValue(7,0,0) = &quot;en&quot;
323	LangIDValue(7,0,1) = &quot;IE&quot;
324	LangIDValue(7,0,2) = &quot;-1809&quot;
325
326	LangIDValue(7,1,0) = &quot;ga&quot;
327	LangIDValue(7,1,1) = &quot;IE&quot;
328	LangIDValue(7,1,2) = &quot;-83C&quot;
329
330&apos; CURRENCIES_LUXEMBOURG
331	LangIDValue(8,0,0) = &quot;fr&quot;
332	LangIDValue(8,0,1) = &quot;LU&quot;
333	LangIDValue(8,0,2) = &quot;-140C&quot;
334
335	LangIDValue(8,1,0) = &quot;de&quot;
336	LangIDValue(8,1,1) = &quot;LU&quot;
337	LangIDValue(8,1,2) = &quot;-1007&quot;
338
339&apos; CURRENCIES_AUSTRIAN
340	LangIDValue(9,0,0) = &quot;de&quot;
341	LangIDValue(9,0,1) = &quot;AT&quot;
342	LangIDValue(9,0,2) = &quot;-C07&quot;
343
344&apos; CURRENCIES_FINNISH
345	LangIDValue(10,0,0) = &quot;fi&quot;
346	LangIDValue(10,0,1) = &quot;FI&quot;
347	LangIDValue(10,0,2) = &quot;-40B&quot;
348
349	LangIDValue(10,1,0) = &quot;sv&quot;
350	LangIDValue(10,1,1) = &quot;FI&quot;
351	LangIDValue(10,1,2) = &quot;-81D&quot;
352
353&apos; CURRENCIES_GREEK
354	LangIDValue(11,0,0) = &quot;el&quot;
355	LangIDValue(11,0,1) = &quot;GR&quot;
356	LangIDValue(11,0,2) = &quot;-408&quot;
357
358&apos; CURRENCIES_SLOVENIAN
359	LangIDValue(12,0,0) = &quot;sl&quot;
360	LangIDValue(12,0,1) = &quot;SI&quot;
361	LangIDValue(12,0,2) = &quot;-424&quot;
362
363&apos; CURRENCIES_CYPRIOT
364	LangIDValue(13,0,0) = &quot;el&quot;
365	LangIDValue(13,0,1) = &quot;CY&quot;
366	LangIDValue(13,0,2) = &quot;-408&quot;
367
368&apos; CURRENCIES_MALTESE
369	LangIDValue(14,0,0) = &quot;mt&quot;
370	LangIDValue(14,0,1) = &quot;MT&quot;
371	LangIDValue(14,0,2) = &quot;-43A&quot;
372
373&apos; CURRENCIES_SLOVAK
374	LangIDValue(15,0,0) = &quot;sk&quot;
375	LangIDValue(15,0,1) = &quot;SK&quot;
376	LangIDValue(15,0,2) = &quot;-41B&quot;
377
378End Sub
379
380
381
382Sub InitializeCurrencies()
383Dim i as Integer
384	GoOn = True
385
386	CurrValue(0,0) = sCurrPORTUGUESE
387	&apos; real conversion rate
388	CurrValue(0,1) = 200.482
389	&apos; rounded conversion rate
390	CurrValue(0,2) = 200
391	CurrValue(0,3) = &quot;Esc.&quot;
392	CurrValue(0,4) = &quot;Esc.&quot;
393	CurrValue(0,5) = &quot;PTE&quot;
394
395	CurrValue(1,0) = sCurrDUTCH
396	&apos; real conversion rate
397	CurrValue(1,1) = 2.20371
398	&apos; rounded conversion rate
399	CurrValue(1,2) = 2
400	CurrValue(1,3) = &quot;F&quot;
401	CurrValue(1,4) = &quot;fl&quot;
402	CurrValue(1,5) = &quot;NLG&quot;
403
404	CurrValue(2,0) = sCurrFRENCH
405	&apos; real conversion rate
406	CurrValue(2,1) = 6.55957
407	&apos; rounded conversion rate
408	CurrValue(2,2) = 7
409	CurrValue(2,3) = &quot;F&quot;
410	CurrValue(2,4) = &quot;F&quot;
411	CurrValue(2,5) = &quot;FRF&quot;
412
413	CurrValue(3,0) = sCurrSPANISH
414	&apos; real conversion rate
415	CurrValue(3,1) = 166.386
416	&apos; rounded conversion rate
417	CurrValue(3,2) = 170
418	CurrValue(3,3) = &quot;Pts&quot;
419	CurrValue(3,4) = &quot;Pts&quot;
420	CurrValue(3,5) = &quot;ESP&quot;
421
422	CurrValue(4,0) = sCurrITALIAN
423	&apos; real conversion rate
424	CurrValue(4,1) = 1936.27
425	&apos; rounded conversion rate
426	CurrValue(4,2) = 2000
427	CurrValue(4,3) = &quot;L.&quot;
428	CurrValue(4,4) = &quot;L.&quot;
429	CurrValue(4,5) = &quot;ITL&quot;
430
431	CurrValue(5,0) = sCurrGERMAN
432	&apos; real conversion rate
433	CurrValue(5,1) = 1.95583
434	&apos; rounded conversion rate
435	CurrValue(5,2) = 2
436	CurrValue(5,3) = &quot;DM&quot;
437	CurrValue(5,4) = &quot;DM&quot;
438	CurrValue(5,5) = &quot;DEM&quot;
439
440	CurrValue(6,0) = sCurrBELGIAN
441	&apos; real conversion rate
442	CurrValue(6,1) = 40.3399
443	&apos; rounded conversion rate
444	CurrValue(6,2) = 40
445	CurrValue(6,3) = &quot;FB&quot;
446	CurrValue(6,4) = &quot;BF&quot;
447	CurrValue(6,5) = &quot;BEF&quot;
448
449	CurrValue(7,0) = sCurrIRISH
450	&apos; real conversion rate
451	CurrValue(7,1) = 0.787564
452	&apos; rounded conversion rate
453	CurrValue(7,2) = 0.8
454	CurrValue(7,3) = &quot;IR£&quot;
455	CurrValue(7,4) = &quot;£&quot;
456	CurrValue(7,5) = &quot;IEP&quot;
457
458	CurrValue(8,0) = sCurrLUXEMBOURG
459	&apos; real conversion rate
460	CurrValue(8,1) = 40.3399
461	&apos; rounded conversion rate
462	CurrValue(8,2) = 40
463	CurrValue(8,3) = &quot;F&quot;
464	CurrValue(8,4) = &quot;F&quot;
465	CurrValue(8,5) = &quot;LUF&quot;
466
467	CurrValue(9,0) = sCurrAUSTRIAN
468	&apos; real conversion rate
469	CurrValue(9,1) = 13.7603
470	&apos; rounded conversion rate
471	CurrValue(9,2) = 15
472	CurrValue(9,3) = &quot;öS&quot;
473	CurrValue(9,4) = &quot;S&quot;
474	CurrValue(9,5) = &quot;ATS&quot;
475
476	CurrValue(10,0) = sCurrFINNISH
477	&apos; real conversion rate
478	CurrValue(10,1) = 5.94573
479	&apos; rounded conversion rate
480	CurrValue(10,2) = 6
481	CurrValue(10,3) = &quot;mk&quot;
482	CurrValue(10,4) = &quot;mk&quot;
483	CurrValue(10,5) = &quot;FIM&quot;
484
485	CurrValue(11,0) = sCurrGREEK
486	&apos; real conversion rate
487	CurrValue(11,1) = 340.750
488	&apos; rounded conversion rate
489	CurrValue(11,2) = 400
490	CurrValue(11,3) = chr(916) &amp; chr(961) &amp; chr(967)
491	CurrValue(11,4) = chr(916) &amp; chr(961) &amp; chr(967)
492	CurrValue(11,5) = &quot;GRD&quot;
493
494	CurrValue(12,0) = sCurrSLOVENIAN
495	&apos; real conversion rate
496	CurrValue(12,1) = 239.64
497	&apos; rounded conversion rate
498	CurrValue(12,2) = 240
499	CurrValue(12,3) = &quot;SIT&quot;
500	CurrValue(12,4) = &quot;SIT&quot;
501	CurrValue(12,5) = &quot;SIT&quot;
502
503	CurrValue(13,0) = sCurrCYPRIOT
504	&apos; real conversion rate
505	CurrValue(13,1) = 0.585274
506	&apos; rounded conversion rate
507	CurrValue(13,2) = 0.6
508	CurrValue(13,3) = &quot;£C&quot;
509	CurrValue(13,4) = &quot;£&quot;
510	CurrValue(13,5) = &quot;CYP&quot;
511
512	CurrValue(14,0) = sCurrMALTESE
513	&apos; real conversion rate
514	CurrValue(14,1) = 0.429300
515	&apos; rounded conversion rate
516	CurrValue(14,2) = 0.4
517	CurrValue(14,3) = chr(8356)
518	CurrValue(14,4) = &quot;Lm&quot;
519	CurrValue(14,5) = &quot;MTL&quot;
520
521	CurrValue(15,0) = sCurrSLOVAK
522	&apos; real conversion rate
523	CurrValue(15,1) = 30.1260
524	&apos; rounded conversion rate
525	CurrValue(15,2) = 30
526	CurrValue(15,3) = &quot;Sk&quot;
527	CurrValue(15,4) = &quot;Sk&quot;
528	CurrValue(15,5) = &quot;SKK&quot;
529
530	i = -1
531	CurrSymbolList(0) = &quot;&quot;
532	CurrSymbolList(1) = &quot;&quot;
533	InitializeCurrencyValues(CurrIndex)
534End Sub
535
536
537Sub InitializeControls()
538	If CurrIndex = -1 Then
539		If DialogModel.Step = 1 Then
540			EnableStep1DialogControls(True, False, False)
541		ElseIf DialogModel.Step = 2 Then
542			EnableStep2DialogControls(True)
543		End If
544	End If
545End Sub
546
547
548Sub InitializeConverter(oLocale, iDialogPage as Integer)
549Dim Isthere as Boolean
550	bCancelProtection = False
551	bRangeListDefined = False
552	PWIndex = -1
553	If iDialogPage = 1 Then
554		ToggleWindow(False)
555		sDocType = Tools.GetDocumentType(ThisComponent)
556		If sDocType = &quot;sCalc&quot; Then
557			bDocHasProtectedSheets = CheckSheetProtection(oSheets)
558		End If
559		oStatusline = ThisComponent.GetCurrentController.GetFrame.CreateStatusIndicator()
560	End If
561	DialogConvert = LoadDialog(&quot;Euro&quot;, &quot;DlgConvert&quot;)
562	DialogModel = DialogConvert.Model
563	DialogPassword = LoadDialog(&quot;Euro&quot;, &quot;DlgPassword&quot;)
564	PasswordModel = DialogPassword.Model
565	DialogModel.Step = iDialogPage
566	InitializeResources()
567	InitializeLanguages()
568	InitializeLocales(oLocale)
569	InitializeCurrencies()
570	InitializeControls()
571	BitmapDir = GetOfficeSubPath(&quot;Template&quot;, &quot;../wizard/bitmap&quot;)
572	If BitmapDir = &quot;&quot; Then
573		Stop
574	End If
575	FillUpCurrencyListbox()
576	DialogModel.imgPreview.ImageUrl = BitmapDir &amp; &quot;euro_&quot; &amp; DialogModel.Step &amp; &quot;.png&quot;
577	DialogConvert.Title = sMsgDLGTITLE
578	DialogModel.cmdGoOn.DefaultButton = True
579	If iDialogPage = 1 Then
580		ToggleWindow(True)
581	End If
582End Sub
583
584
585Sub	InitializeCurrencyValues(CurrIndex)
586	If CurrIndex &lt;&gt; -1 Then
587		CurrLanguage = CurrValue(CurrIndex,0)
588		CurrFactor = CurrValue(CurrIndex,1)
589		CurrSymbolList(0) = CurrValue(CurrIndex,3)
590		CurrSymbolList(1) = CurrValue(CurrIndex,4)
591		CurrSymbolList(2) = CurrValue(CurrIndex,5)
592	End If
593End Sub
594
595
596Function InitializeLocales(oLocale) as Boolean
597Dim i as Integer, n as Integer, m as Integer
598Dim sLanguage as String, sCountry as String
599Dim bTakeThisLocale as Boolean
600	sLanguage = oLocale.Language
601	sCountry = oLocale.Country
602	For n = 0 To SBCOUNTRYCOUNT - 1
603		For m = 0 TO 1
604			If DialogModel.Step = 2 Then
605				bTakeThisLocale = LangIDValue(n,m,0) = sLanguage
606			Else
607				bTakeThisLocale = LangIDValue(n,m,0) = sLanguage
608			End If
609			If bTakeThisLocale Then
610				CurrIndex = n
611				For i = 0 To 2
612					CurExtension(i) = LangIDValue(CurrIndex,i,2)
613				Next i
614				InitializeLocales = True
615				Exit Function
616			End If
617		Next m
618	Next n
619	CurrIndex = -1
620	InitializeLocales = False
621End Function
622</script:module>
623