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