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