summaryrefslogtreecommitdiff
path: root/wizards/source/euro/Init.xba
blob: e68ff563caead535051395b6fb4188afce01db53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Init" script:language="StarBasic">Option Explicit
REM  *****  BASIC  *****

&apos; Zu diskutieren:
&apos; Autopilot von Werkzeugleiste für Textdokumente mit eigener Konverterseite?
&apos; Konvertierung von Datenbankfeldern &apos;- Problematik der Formatierung mit FS durchsprechen!?
&apos; Option des einleitenden Welcome-Text, der erklärt, was eigentlich Sache ist (wie beim Dokumenten Konverter)
&apos; Option der Checkbox-Gruppe in der die zu konvertierenden Dokumenttypen aufgeführt sind
&apos; -&gt; bei den letztgenannten Optionen müsste der Dialog in seiner Höhe vergrößert werden.
&apos; Wir sollten informiert werden, ob und wie oder wann das Standard - Währungsformat für die Euroländer umgesetzt
&apos; wird.

Public Const SBRANGEUBOUND = 20
Public StyleRangeAssignmentList(SBRANGEUBOUND)as String
Public SelRangeList(SBRANGEUBOUND) as String
Public RangeList(SBRANGEUBOUND, 1) as String
Public UnprotectList() as String
Public FilterNames(7,1) as String


Public sREADY as String
Public sPROTECT as String
Public sCONTINUE as String

Public sSELTEMPL as String
Public sSELCELL as String
Public sCURRRANGES as String
Public sTEMPLATES as String

Public sSOURCEFILE as String
Public sSOURCEDIR as String
Public sTARGETDIR as String

Public sStsPROGRESS as String
Public sStsCELLPROGRSS as String
Public sStsRELRANGES as String
Public sStsRELSHEETRANGES as String
Public sStsREPROTECT as String

Public sMsgREADY as String
Public sMsgSELDIR as String
Public sMsgSELFILE as String
Public sMsgTARGETDIR as String
Public sMsgNOTTHERE as String
Public sMsgDLGTITLE as String
Public sMsgUNPROTECT as String
Public sMsgPWPROTECT as String
Public sMsgWRONGPW as String
Public sMsgSHEETPROTECTED as String
Public sMsgWARNING as String
Public sMsgSHEETSNOPROTECT as String
Public sMsgSHEETNOPROTECT as String
Public sMsgCHOOSECURRENCY as String
Public sMsgPASSWORD as String
Public sMsgOK as String
Public sMsgCANCEL as String
Public sMsgFileInvalid as String
Public sMsgNODIRECTORY as String
Public sMsgDOCISREADONLY as String

Public sCurrPORTUGUESE as String
Public sCurrDUTCH as String
Public sCurrFRENCH as String
Public sCurrSPANISH as String
Public sCurrITALIAN as String
Public sCurrGERMAN as String
Public sCurrBELGIAN as String
Public sCurrIRISH as String
Public sCurrLUXEMBOURG as String
Public sCurrAUSTRIAN as String
Public sCurrFINNISH as String
Public sCurrGREEK as String
Public sCurrUNKNOWN as String
Public sCurrSYSUNKNOWN as String

Public sPrgsRETRIEVAL as String
Public sPrgsCONVERTING as String
Public sPrgsUNPROTECT as String

Public Const SBCOUNTRYCOUNT = 12
Public CurMimeType as String
Public CurCellCount as Long
Public oSheets as Object
Public oStyles as Object
Public oStyle as Object
Public oFormats as Object
Public aSimpleStr as String
Public nSimpleKey as Long
Public aFormat() as Variant
Public oRanges as Object
Public oRange as Object
Public nLanguage as integer
Public nFormatLanguage as integer
Public aCellFormat as Variant
Public oDocument as Object
Public StartCol, StartRow, EndCol, EndRow as String
Public oSheet as Object
Public IntStartCol,	IntStartRow, IntEndCol,	IntEndRow as integer
Public oSelRanges as Object
Public nFormatType as Integer
Public sFormatCurrency as String
Public sFormatLanguage as String
Public CurSheetName as String
Public oStatusLine as Object
Public Const SBRELGET = 50
Public StatusValue as Single
Public TotCellCount as Long
Public StyleIndex as Integer
Public RangeIndex as Integer
Public CurrIndex as Integer
Public ActLangNumber(1) as Integer
Public CurExtension(1) as String
Public Currfactor as Double
Public CurrSymbolList(2) as String
Public CurrLanguage as String
Public CurrValue(11,5)
Public LangIDValue(11,2,2) as String
Public PreName as String
Public Separator as String
Public BitmapDir as String
Public TypeIndex as Integer, CSIndex as Integer, LangIndex as Integer, FSIndex as Integer
Public oLocale as New com.sun.star.lang.Locale
Public sEuroSign as String
Public oPointer as Object
Public sDocType as String
Public bPreSelected as Boolean
Public DocDisposed as Boolean
Public bMacroStopped as Boolean
Public bRecursive as Boolean
Public bCancelProtection as Boolean
Public CurrRoundMode as Boolean
Public bRangeListDefined as Boolean
&apos; Note the variable bDocHasProtectedSheets does not contain information
&apos; wether sheets have to be reprotected
Public bDocHasProtectedSheets as Boolean
Public sGOON as String
Public sHELP as String
Public sCANCEL as String


Sub InitializeResources()
	With DialogModel
		&apos; Strings that are also needed by the Password Dialog
		sGoOn = GetResText(1003)
		sHelp = GetResText(1001)
		sCANCEL = GetResText(1000)
		.cmdCancel.Label =  sCANCEL
		.cmdHelp.Label =  sHELP
		.cmdBack.Label =  GetResText(1002)
		.cmdGoOn.Label =  sGOON
		.lblHint.Label =  GetResText(1004)
		.lblCurrencies.Label = GetResText(1006)
&apos; Todo: Dieses Model später am Control unsichtbar machen	
		If .Step = 1 Then
			.chkComplete.Label = GetResText(1100)
			.hlnSelection.Label = GetResText(1101)
			.optCellTemplates.Label = GetResText(1102)
			.optSheetRanges.Label = GetResText(1103)
			.optDocRanges.Label = GetResText(1104)
			.optSelRange.Label = GetResText(1105)
			sCURRRANGES = GetResText(1108)
			.lblSelection.Label = sCURRRANGES
		Else
		 	.hlnExtent.Label = GetResText(1200)
&apos;Todo: Diese Strings in Resourcen!!
			FilterNames(0,0) = &quot;Calc 6.0&quot;
			FilterNames(0,1) = &quot;*.sxc&quot;
			FilterNames(1,0) = &quot;Calc 6.0 Vorlage&quot;
			FilterNames(1,1) = &quot;*.stc&quot;	
			FilterNames(2,0) = &quot;Star Calc 5.0&quot;
			FilterNames(2,1) = &quot;*.sdc&quot;
			FilterNames(3,0) = &quot;Star Calc 5.0 Vorlage&quot;
			FilterNames(3,1) = &quot;*.vor&quot;
			FilterNames(4,0) = &quot;Star Calc 4.0&quot;
			FilterNames(4,1) = &quot;*.sdc&quot;
			FilterNames(5,0) = &quot;Star Calc 4.0 Vorlage&quot;
			FilterNames(5,1) = &quot;*.vor&quot;
			FilterNames(6,0) = &quot;Star Calc 3.0&quot;
			FilterNames(6,1) = &quot;*.sdc&quot;
			FilterNames(7,0) = &quot;Star Calc 3.0 Vorlage&quot;
			FilterNames(7,1) = &quot;*.vor&quot;	
			.optSingleFile.Label = &quot;Einzelnes Tabellen- oder Textdokument&quot;&apos;GetResText(1201)
 			.optWholeDir.Label = GetResText(1202)
 			.chkProtect.Label = GetResText(1207)
 			.chkTextDocuments.Label = &quot;Auch Feldbefehle und Tabellen in Textdokumenten konvertieren&quot;
			sSOURCEFILE = GetResText(1203)
			sSOURCEDIR = GetResText(1204)
 			.lblSource.Label = sSOURCEDIR
 			.chkRecursive.Label = GetResText(1205)
			sTARGETDIR = GetResText(1206)
 			.lblTarget.Label = STARGETDIR 
			.optWholeDir.State = 1
			.txtSource.Text = ConvertfromUrl(GetPathSettings(&quot;Work&quot;))
			.txtTarget.Text = .txtSource.Text
			.hlnProgress.Label = GetResText(1600)
			.lblConfig.Label = GetResText(1603)
			sPrgsRETRIEVAL = GetResText(1601)
			sPrgsCONVERTING = GetResText(1602)
			sPrgsUNPROTECT = GetResText(1604)
		End If
		.cmdBack.Enabled = False
		sPROTECT = GetResText(1005)
		sCONTINUE = GetResText(1007)
		sSELTEMPL = GetResText(1106)
		sSELCELL = GetResText(1107)
		sCURRRANGES = GetResText(1108)
		sTEMPLATES = GetResText(1109)
		sStsPROGRESS = GetResText(1300)
		sStsCELLPROGRSS = GetResText(1301)
		sStsRELSHEETRANGES = GetResText(1302)
		sStsRELRANGES = GetResText(1303)
		sStsREPROTECT = GetResText(1304)
		sMsgREADY = GetResText(1400)
		sMsgSELDIR = GetResText(1401)
		sMsgSELFILE = GetResText(1402)
		sMsgTARGETDIR = GetResText(1403)
		sMsgNOTTHERE = GetResText(1404)
		sMsgDLGTITLE = GetResText(1405)
		sMsgUNPROTECT = GetResText(1406)
		sMsgPWPROTECT = GetResText(1407)
		sMsgWRONGPW = GetResText(1408)
		sMsgSHEETPROTECTED = GetResText(1409)
		sMsgWARNING = GetResText(1410)
		sMsgSHEETSNOPROTECT = GetResText(1411)
		sMsgSHEETNOPROTECT = GetResText(1412)
		sMsgCHOOSECURRENCY = GetResText(1415)
		sMsgPASSWORD = GetResText(1416)
		sMsgOK = GetResText(1417)
		sMsgCANCEL = GetResText(1418)
		sMsgFILEINVALID = GetResText(1419)
		sMsgFILEINVALID = ReplaceString(sMsgFILEINVALID,&quot;%PRODUCTNAME&quot;, GetProductname())
		SMsgNODIRECTORY = GetResText(1420)
		sMsgDOCISREADONLY = GetResText(1421)
		sCurrPORTUGUESE = GetResText(1500)
		sCurrDUTCH = GetResText(1501)
		sCurrFRENCH = GetResText(1502)
		sCurrSPANISH = GetResText(1503)
		sCurrITALIAN = GetResText(1504)
		sCurrGERMAN = GetResText(1505)
		sCurrBELGIAN = GetResText(1506)
		sCurrIRISH = GetResText(1507)
		sCurrLUXEMBOURG = GetResText(1508)
		sCurrAUSTRIAN = GetResText(1509)
		sCurrFINNISH = GetResText(1510)
		sCurrGREEK = GetResText(1511)
		sCurrUNKNOWN = GetResText(1511)
		sCurrSYSUNKNOWN = GetResText(1512)
	End With
End Sub


Sub InitializeLanguages()
	sEuroSign = chr(8364)

&apos; CURRENCIES_PORTUGUESE
	LangIDValue(0,0,0) = &quot;pt&quot;
	LangIDValue(0,0,1) = &quot;&quot;
	LangIDValue(0,0,2) = &quot;-816&quot;

&apos; CURRENCIES_DUTCH
	LangIDValue(1,0,0) = &quot;nl&quot;
	LangIDValue(1,0,1) = &quot;&quot;
	LangIDValue(1,0,2) = &quot;-413&quot;

&apos; CURRENCIES_FRENCH
	LangIDValue(2,0,0) = &quot;fr&quot;
	LangIDValue(2,0,1) = &quot;&quot;
	LangIDValue(2,0,2) = &quot;-40C&quot;

&apos; CURRENCIES_SPANISH
	LangIDValue(3,0,0) = &quot;es&quot;
	LangIDValue(3,0,1) = &quot;&quot;
	LangIDValue(3,0,2) = &quot;-40A&quot;
	
	&apos;Spanish modern
	LangIDValue(3,1,0) = &quot;es&quot;
	LangIDValue(3,1,1) = &quot;&quot;
	LangIDValue(3,1,2) = &quot;-C0A&quot;

&apos; CURRENCIES_ITALIAN
	LangIDValue(4,0,0) = &quot;it&quot;
	LangIDValue(4,0,1) = &quot;&quot;
	LangIDValue(4,0,2) = &quot;-410&quot;

&apos; CURRENCIES_GERMAN
	LangIDValue(5,0,0) = &quot;de&quot;
	LangIDValue(5,0,1) = &quot;DE&quot;
	LangIDValue(5,0,2) = &quot;-407&quot;

&apos; CURRENCIES_BELGIAN
	LangIDValue(6,0,0) = &quot;fr&quot;
	LangIDValue(6,0,1) = &quot;BE&quot;
	LangIDValue(6,0,2) = &quot;-80C&quot;

	LangIDValue(6,1,0) = &quot;nl&quot;
	LangIDValue(6,1,1) = &quot;BE&quot;
	LangIDValue(6,1,2) = &quot;-813&quot;

&apos; CURRENCIES_IRISH
	LangIDValue(7,0,0) = &quot;en&quot;
	LangIDValue(7,0,1) = &quot;IE&quot;
	LangIDValue(7,0,2) = &quot;-1809&quot;

&apos; CURRENCIES_LUXEMBOURG
	LangIDValue(8,0,0) = &quot;fr&quot;
	LangIDValue(8,0,1) = &quot;LU&quot;
	LangIDValue(8,0,2) = &quot;-140C&quot;
	
	LangIDValue(8,1,0) = &quot;de&quot;
	LangIDValue(8,1,1) = &quot;LU&quot;
	LangIDValue(8,1,2) = &quot;-1007&quot;

&apos; CURRENCIES_AUSTRIAN
	LangIDValue(9,0,0) = &quot;de&quot;
	LangIDValue(9,0,1) = &quot;AT&quot;
	LangIDValue(9,0,1) = &quot;-C07&quot;

&apos; CURRENCIES_FINNISH
	LangIDValue(10,0,0) = &quot;fi&quot;
	LangIDValue(10,0,1) = &quot;FI&quot;
	LangIDValue(10,0,2) = &quot;-40B&quot;

	LangIDValue(10,1,0) = &quot;sv&quot;
	LangIDValue(10,1,1) = &quot;FI&quot;
	LangIDValue(10,1,2) = &quot;-81D&quot;

&apos; CURRENCIES_GREEK
	LangIDValue(11,0,0) = &quot;el&quot;
	LangIDValue(11,0,1) = &quot;GR&quot;
	LangIDValue(11,0,2) = &quot;-408&quot;
End Sub



Sub InitializeCurrencies()
Dim i as Integer
	GoOn = True

	CurrValue(0,0) = sCurrPORTUGUESE
	&apos; Wahrer Umrechnungskurs
	CurrValue(0,1) = 200.482
	&apos; Gerundeter Umrechnungskurs
	CurrValue(0,2) = 200
	CurrValue(0,3) = &quot;Esc.&quot;
	CurrValue(0,4) = &quot;Esc.&quot;
	CurrValue(0,5) = &quot;PTE&quot;

	CurrValue(1,0) = sCurrDUTCH
	&apos; Wahrer Umrechnungskurs
	CurrValue(1,1) = 2.20371
	&apos; Gerundeter Umrechnungskurs
	CurrValue(1,2) = 2
	CurrValue(1,3) = &quot;F&quot;
	CurrValue(1,4) = &quot;F&quot;
	CurrValue(1,5) = &quot;NLG&quot;

	CurrValue(2,0) = sCurrFRENCH
	&apos; Wahrer Umrechnungskurs
	CurrValue(2,1) = 6.55957
	&apos; Gerundeter Umrechnungskurs
	CurrValue(2,2) = 7
	CurrValue(2,3) = &quot;F&quot;
	CurrValue(2,4) = &quot;F&quot;
	CurrValue(2,5) = &quot;FRF&quot;

	CurrValue(3,0) = sCurrSPANISH
	&apos; Wahrer Umrechnungskurs
	CurrValue(3,1) = 166.386
	&apos; Gerundeter Umrechnungskurs
	CurrValue(3,2) = 170
	CurrValue(3,3) = &quot;Pts&quot;
	CurrValue(3,4) = &quot;Pts&quot;
	CurrValue(3,5) = &quot;ESP&quot;

	CurrValue(4,0) = sCurrITALIAN
	&apos; Wahrer Umrechnungskurs
	CurrValue(4,1) = 1936.27
	&apos; Gerundeter Umrechnungskurs
	CurrValue(4,2) = 2000
	CurrValue(4,3) = &quot;L.&quot;
	CurrValue(4,4) = &quot;L.&quot;
	CurrValue(4,5) = &quot;ITL&quot;

	CurrValue(5,0) = sCurrGERMAN
	&apos; Wahrer Umrechnungskurs
	CurrValue(5,1) = 1.95583
	&apos; Gerundeter Umrechnungskurs
	CurrValue(5,2) = 2
	CurrValue(5,3) = &quot;DM&quot;
	CurrValue(5,4) = &quot;DM&quot;
	CurrValue(5,5) = &quot;DEM&quot;

	CurrValue(6,0) = sCurrBELGIAN
	&apos; Wahrer Umrechnungskurs
	CurrValue(6,1) = 40.3399
	&apos; Gerundeter Umrechnungskurs
	CurrValue(6,2) = 40
	CurrValue(6,3) = &quot;FB&quot;
	CurrValue(6,4) = &quot;BF&quot;
	CurrValue(6,5) = &quot;BEF&quot;

	CurrValue(7,0) = sCurrIRISH
	&apos; Wahrer Umrechnungskurs
	CurrValue(7,1) = 0.787564
	&apos; Gerundeter Umrechnungskurs
	CurrValue(7,2) = 0.8
	CurrValue(7,3) = &quot;£&quot;
	CurrValue(7,4) = &quot;£&quot;
	CurrValue(7,5) = &quot;IEP&quot;

	CurrValue(8,0) = sCurrLUXEMBOURG
	&apos; Wahrer Umrechnungskurs
	CurrValue(8,1) = 40.3399
	&apos; Gerundeter Umrechnungskurs
	CurrValue(8,2) = 40
	CurrValue(8,3) = &quot;F&quot;
	CurrValue(8,4) = &quot;F&quot;
	CurrValue(8,5) = &quot;LUF&quot;

	CurrValue(9,0) = sCurrAUSTRIAN
	&apos; Wahrer Umrechnungskurs
	CurrValue(9,1) = 13.7603
	&apos; Gerundeter Umrechnungskurs
	CurrValue(9,2) = 15
	CurrValue(9,3) = &quot;S&quot;
	CurrValue(9,4) = &quot;S&quot;
	CurrValue(9,5) = &quot;ATS&quot;

	CurrValue(10,0) = sCurrFINNISH
	&apos; Wahrer Umrechnungskurs
	CurrValue(10,1) = 5.94573
	&apos; Gerundeter Umrechnungskurs
	CurrValue(10,2) = 6
	CurrValue(10,3) = &quot;mk&quot;
	CurrValue(10,4) = &quot;mk&quot;
	CurrValue(10,5) = &quot;FIM&quot;

&apos; Todo: Werte verlorengegangen?
	CurrValue(11,0) = sCurrGREEK
	&apos; Wahrer Umrechnungskurs
	CurrValue(11,1) = 340.750
	&apos; Gerundeter Umrechnungskurs
	CurrValue(11,2) = 400
	CurrValue(11,3) = chr(916) &amp; chr(961) &amp; chr(967)
	CurrValue(11,4) = chr(916) &amp; chr(961) &amp; chr(967)
	CurrValue(11,5) = &quot;GRD&quot;

	i = -1
	CurrSymbolList(0) = &quot;&quot;
	CurrSymbolList(1) = &quot;&quot;
	InitializeCurrencyValues(CurrIndex)
End Sub


Sub InitializeControls()
	If CurrIndex = -1 Then
		If DialogModel.Step = 1 Then
			EnableStep1DialogControls(True, False, False)
		ElseIf DialogModel.Step = 2 Then
			EnableStep2DialogControls(True)
		End If
	End If
End Sub	

Sub InitializeConverter(oLocale, iDialogPage as Integer)
Dim Isthere as Boolean
	ToggleWindow(False)
	bCancelProtection = False
	bMacroStopped = False
	bRangeListDefined = False
	PWIndex = -1
	sDocType = GetDocumentType(StarDesktop.ActiveFrame.Controller.Model)
	If sDocType = &quot;sCalc&quot; Then
		bDocHasProtectedSheets = CheckSheetProtection(oSheets)
	End If
	DialogConvert = LoadDialog(&quot;Euro&quot;, &quot;DlgConvert&quot;)
	DialogModel = DialogConvert.Model
	DialogPassword = LoadDialog(&quot;Euro&quot;, &quot;DlgPassword&quot;)
	PasswordModel = DialogPassword.Model
	DialogModel.Step = iDialogPage
	InitializeResources()
	InitializeLanguages()
	InitializeLocales(oLocale)
	InitializeCurrencies()
	InitializeControls()
	FilterList(0) = &quot;application/x-starcalc&quot;
	FilterList(1) = &quot;application/x-starwriter&quot;
	FilterList(2) = &quot;application/vnd.stardivision.calc&quot;
	FilterList(3) = &quot;application/vnd.stardivision.writer&quot;
	FilterList(4) = &quot;application/vnd.stardivision.writer/web&quot;
	FilterList(5) = &quot;application/vnd.sun.xml.calc&quot;
	FilterList(6) = &quot;application/vnd.sun.xml.writer&quot;
	BitmapDir = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/bitmap&quot;)
	FillUpCurrencyListbox()
	DialogModel.imgPreview.ImageUrl = BitmapDir &amp; &quot;euro_&quot; &amp; DialogModel.Step &amp; &quot;.bmp&quot;	
	DialogConvert.Title = sMsgDLGTITLE
	DialogModel.cmdGoOn.DefaultButton = True	
	ToggleWindow(True)
End Sub


Sub	InitializeCurrencyValues(CurrIndex)
	If CurrIndex &lt;&gt; -1 Then
		CurrLanguage = CurrValue(CurrIndex,0)
		CurrFactor = CurrValue(CurrIndex,1)
		CurrSymbolList(0) = CurrValue(CurrIndex,3)
		CurrSymbolList(1) = CurrValue(CurrIndex,4)
		CurrSymbolList(2) = CurrValue(CurrIndex,5)
	End If
End Sub		


Function InitializeLocales(oLocale) as Boolean
Dim i as Integer, n as Integer, m as Integer
Dim sLanguage as String, sCountry as String

	sLanguage = oLocale.Language
	sCountry = oLocale.Country
	For n = 0 To SBCOUNTRYCOUNT - 1
		For m = 0 TO 1
			If LangIDValue(n,m,0) = sLanguage AND LangIDValue(n,m,1) = sCountry Then
				CurrIndex = n
				For i = 0 To 1
					CurExtension(i) = LangIDValue(CurrIndex,i,2)
				Next i
				InitializeLocales = True
				Exit Function
			End If
		Next m
	Next n
	CurrIndex = -1
	InitializeLocales = False
End Function</script:module>