merge the formfield patch from ooo-build
[ooovba.git] / wizards / source / euro / Init.xba
blob45fdafdbafe536197c302eddf91c146d6adf4422
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
4 REM ***** BASIC *****
8 Public Const SBRANGEUBOUND = 20
9 Public StyleRangeAssignmentList(SBRANGEUBOUND)as String
10 Public SelRangeList(SBRANGEUBOUND) as String
11 Public RangeList(SBRANGEUBOUND) as String
12 Public UnprotectList() as String
13 Public FilterNames(2,1) as String
14 Public bDoUnProtect as Boolean
15 Public bCancelTask as Boolean
17 Public sREADY as String
18 Public sPROTECT as String
19 Public sCONTINUE as String
21 Public sSELTEMPL as String
22 Public sSELCELL as String
23 Public sCURRRANGES as String
24 Public sTEMPLATES as String
26 Public sSOURCEFILE as String
27 Public sSOURCEDIR as String
28 Public sTARGETDIR as String
30 Public sStsPROGRESS as String
31 Public sStsCELLPROGRSS as String
32 Public sStsRELRANGES as String
33 Public sStsRELSHEETRANGES as String
34 Public sStsREPROTECT as String
36 Public sMsgSELDIR as String
37 Public sMsgSELFILE as String
38 Public sMsgTARGETDIR as String
39 Public sMsgNOTTHERE as String
40 Public sMsgDLGTITLE as String
41 Public sMsgUNPROTECT as String
42 Public sMsgPWPROTECT as String
43 Public sMsgWRONGPW as String
44 Public sMsgSHEETPROTECTED as String
45 Public sMsgWARNING as String
46 Public sMsgSHEETSNOPROTECT as String
47 Public sMsgSHEETNOPROTECT as String
48 Public sMsgCHOOSECURRENCY as String
49 Public sMsgPASSWORD as String
50 Public sMsgOK as String
51 Public sMsgCANCEL as String
52 Public sMsgFileInvalid as String
53 Public sMsgNODIRECTORY as String
54 Public sMsgDOCISREADONLY as String
55 Public sMsgFileExists as String
56 Public sMsgCancelConversion as String
57 Public sMsgCancelTitle as String
58 Public sCurrPORTUGUESE as String
59 Public sCurrDUTCH as String
60 Public sCurrFRENCH as String
61 Public sCurrSPANISH as String
62 Public sCurrITALIAN as String
63 Public sCurrGERMAN as String
64 Public sCurrBELGIAN as String
65 Public sCurrIRISH as String
66 Public sCurrLUXEMBOURG as String
67 Public sCurrAUSTRIAN as String
68 Public sCurrFINNISH as String
69 Public sCurrGREEK as String
70 Public sCurrSLOVENIAN as String
71 Public sCurrCYPRIOT as String
72 Public sCurrMALTESE as String
73 Public sCurrSLOVAK as String
74 Public sCurrUNKNOWN as String
75 Public sCurrSYSUNKNOWN as String
77 Public sPrgsRETRIEVAL as String
78 Public sPrgsCONVERTING as String
79 Public sPrgsUNPROTECT as String
80 Public sInclusiveSubDir as String
82 Public Const SBCOUNTRYCOUNT = 15
83 Public CurMimeType as String
84 Public CurCellCount as Long
85 Public oSheets as Object
86 Public oStyles as Object
87 Public oStyle as Object
88 Public oFormats as Object
89 Public aSimpleStr as String
90 Public nSimpleKey as Long
91 Public aFormat() as Variant
92 Public oRanges as Object
93 Public oRange as Object
94 Public nLanguage as integer
95 Public nFormatLanguage as integer
96 Public aCellFormat as Variant
97 Public oDocument as Object
98 Public StartCol, StartRow, EndCol, EndRow as String
99 Public oSheet as Object
100 Public IntStartCol, IntStartRow, IntEndCol, IntEndRow as integer
101 Public oSelRanges as Object
102 Public nFormatType as Integer
103 Public sFormatCurrency as String
104 Public sFormatLanguage as String
105 Public CurSheetName as String
106 Public oStatusLine as Object
107 Public Const SBRELGET = 50
108 Public StatusValue as Single
109 Public TotCellCount as Long
110 Public StyleIndex as Integer
111 Public RangeIndex as Integer
112 Public CurrIndex as Integer
113 Public ActLangNumber(1) as Integer
114 Public CurExtension(2) as String
115 Public Currfactor as Double
116 Public CurrSymbolList(2) as String
117 Public CurrLanguage as String
118 Public CurrValue(15,5)
119 Public LangIDValue(15,2,2) as String
120 Public PreName as String
121 Public Separator as String
122 Public BitmapDir as String
123 Public TypeIndex as Integer, CSIndex as Integer, LangIndex as Integer, FSIndex as Integer
124 Public oLocale as New com.sun.star.lang.Locale
125 Public sEuroSign as String
126 Public oPointer as Object
127 Public sDocType as String
128 Public bPreSelected as Boolean
129 Public bRecursive as Boolean
130 Public bCancelProtection as Boolean
131 Public CurrRoundMode as Boolean
132 Public bRangeListDefined as Boolean
133 Public bDocHasProtectedSheets as Boolean
134 Public sGOON as String
135 Public sHELP as String
136 Public sCANCEL as String
137 Dim sEnd as String
139 Sub InitializeResources()
140 Dim 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)
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
232 LocWorkPath = GetPathSettings(&quot;Work&quot;)
233 If Not oUcb.Exists(LocWorkPath) Then
234 ShowNoOfficePathError()
235 Stop
236 End If
238 .txtSource.Text = ConvertfromUrl(LocWorkPath)
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
249 End Sub
251 Sub InitializeLanguages()
252 sEuroSign = chr(8364)
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;
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;
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;
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;
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;
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;
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;
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;
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;
299 LangIDValue(6,1,0) = &quot;nl&quot;
300 LangIDValue(6,1,1) = &quot;BE&quot;
301 LangIDValue(6,1,2) = &quot;-813&quot;
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;
308 LangIDValue(7,1,0) = &quot;ga&quot;
309 LangIDValue(7,1,1) = &quot;IE&quot;
310 LangIDValue(7,1,2) = &quot;-83C&quot;
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;
317 LangIDValue(8,1,0) = &quot;de&quot;
318 LangIDValue(8,1,1) = &quot;LU&quot;
319 LangIDValue(8,1,2) = &quot;-1007&quot;
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;
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;
331 LangIDValue(10,1,0) = &quot;sv&quot;
332 LangIDValue(10,1,1) = &quot;FI&quot;
333 LangIDValue(10,1,2) = &quot;-81D&quot;
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;
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;
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;
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;
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;
360 End Sub
364 Sub InitializeCurrencies()
365 Dim i as Integer
366 GoOn = True
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
512 i = -1
513 CurrSymbolList(0) = &quot;&quot;
514 CurrSymbolList(1) = &quot;&quot;
515 InitializeCurrencyValues(CurrIndex)
516 End Sub
519 Sub 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
527 End Sub
530 Sub InitializeConverter(oLocale, iDialogPage as Integer)
531 Dim 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
564 End Sub
567 Sub 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
575 End Sub
578 Function InitializeLocales(oLocale) as Boolean
579 Dim i as Integer, n as Integer, m as Integer
580 Dim sLanguage as String, sCountry as String
581 Dim 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
603 End Function
604 </script:module>