Bump version to 4.1-6
[LibreOffice.git] / wizards / source / euro / Init.xba
blobd01d500bca2dffde6592dcef603ef28e6d68af6f
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
3 <!--
4 * This file is part of the LibreOffice project.
6 * This Source Code Form is subject to the terms of the Mozilla Public
7 * License, v. 2.0. If a copy of the MPL was not distributed with this
8 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 * This file incorporates work covered by the following license notice:
12 * Licensed to the Apache Software Foundation (ASF) under one or more
13 * contributor license agreements. See the NOTICE file distributed
14 * with this work for additional information regarding copyright
15 * ownership. The ASF licenses this file to you under the Apache
16 * License, Version 2.0 (the "License"); you may not use this file
17 * except in compliance with the License. You may obtain a copy of
18 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 -->
20 <script:module xmlns:script="http://openoffice.org/2000/script" script:name="Init" script:language="StarBasic">Option Explicit
21 REM ***** BASIC *****
25 Public Const SBRANGEUBOUND = 20
26 Public StyleRangeAssignmentList(SBRANGEUBOUND)as String
27 Public SelRangeList(SBRANGEUBOUND) as String
28 Public RangeList(SBRANGEUBOUND) as String
29 Public UnprotectList() as String
30 Public FilterNames(2,1) as String
31 Public bDoUnProtect as Boolean
32 Public bCancelTask as Boolean
34 Public sREADY as String
35 Public sPROTECT as String
36 Public sCONTINUE as String
38 Public sSELTEMPL as String
39 Public sSELCELL as String
40 Public sCURRRANGES as String
41 Public sTEMPLATES as String
43 Public sSOURCEFILE as String
44 Public sSOURCEDIR as String
45 Public sTARGETDIR as String
47 Public sStsPROGRESS as String
48 Public sStsCELLPROGRSS as String
49 Public sStsRELRANGES as String
50 Public sStsRELSHEETRANGES as String
51 Public sStsREPROTECT as String
53 Public sMsgSELDIR as String
54 Public sMsgSELFILE as String
55 Public sMsgTARGETDIR as String
56 Public sMsgNOTTHERE as String
57 Public sMsgDLGTITLE as String
58 Public sMsgUNPROTECT as String
59 Public sMsgPWPROTECT as String
60 Public sMsgWRONGPW as String
61 Public sMsgSHEETPROTECTED as String
62 Public sMsgWARNING as String
63 Public sMsgSHEETSNOPROTECT as String
64 Public sMsgSHEETNOPROTECT as String
65 Public sMsgCHOOSECURRENCY as String
66 Public sMsgPASSWORD as String
67 Public sMsgOK as String
68 Public sMsgCANCEL as String
69 Public sMsgFileInvalid as String
70 Public sMsgNODIRECTORY as String
71 Public sMsgDOCISREADONLY as String
72 Public sMsgFileExists as String
73 Public sMsgCancelConversion as String
74 Public sMsgCancelTitle as String
75 Public sCurrPORTUGUESE as String
76 Public sCurrDUTCH as String
77 Public sCurrFRENCH as String
78 Public sCurrSPANISH as String
79 Public sCurrITALIAN as String
80 Public sCurrGERMAN as String
81 Public sCurrBELGIAN as String
82 Public sCurrIRISH as String
83 Public sCurrLUXEMBOURG as String
84 Public sCurrAUSTRIAN as String
85 Public sCurrFINNISH as String
86 Public sCurrGREEK as String
87 Public sCurrSLOVENIAN as String
88 Public sCurrCYPRIOT as String
89 Public sCurrMALTESE as String
90 Public sCurrSLOVAK as String
91 Public sCurrESTONIAN as String
92 Public sCurrUNKNOWN as String
93 Public sCurrSYSUNKNOWN as String
95 Public sPrgsRETRIEVAL as String
96 Public sPrgsCONVERTING as String
97 Public sPrgsUNPROTECT as String
98 Public sInclusiveSubDir as String
100 Public Const SBCOUNTRYCOUNT = 17
101 Public CurMimeType as String
102 Public CurCellCount as Long
103 Public oSheets as Object
104 Public oStyles as Object
105 Public oStyle as Object
106 Public oFormats as Object
107 Public aSimpleStr as String
108 Public nSimpleKey as Long
109 Public aFormat() as Variant
110 Public oRanges as Object
111 Public oRange as Object
112 Public nLanguage as integer
113 Public nFormatLanguage as integer
114 Public aCellFormat as Variant
115 Public oDocument as Object
116 Public StartCol, StartRow, EndCol, EndRow as String
117 Public oSheet as Object
118 Public IntStartCol, IntStartRow, IntEndCol, IntEndRow as integer
119 Public oSelRanges as Object
120 Public nFormatType as Integer
121 Public sFormatCurrency as String
122 Public sFormatLanguage as String
123 Public CurSheetName as String
124 Public oStatusLine as Object
125 Public Const SBRELGET = 50
126 Public StatusValue as Single
127 Public TotCellCount as Long
128 Public StyleIndex as Integer
129 Public RangeIndex as Integer
130 Public CurrIndex as Integer
131 Public ActLangNumber(1) as Integer
132 Public CurExtension(2) as String
133 Public Currfactor as Double
134 Public CurrSymbolList(2) as String
135 Public CurrLanguage as String
136 Public CurrValue(16,5)
137 Public LangIDValue(16,2,2) as String
138 Public PreName as String
139 Public Separator as String
140 Public BitmapDir as String
141 Public TypeIndex as Integer, CSIndex as Integer, LangIndex as Integer, FSIndex as Integer
142 Public oLocale as New com.sun.star.lang.Locale
143 Public sEuroSign as String
144 Public oPointer as Object
145 Public sDocType as String
146 Public bPreSelected as Boolean
147 Public bRecursive as Boolean
148 Public bCancelProtection as Boolean
149 Public CurrRoundMode as Boolean
150 Public bRangeListDefined as Boolean
151 Public bDocHasProtectedSheets as Boolean
152 Public sGOON as String
153 Public sHELP as String
154 Public sCANCEL as String
155 Dim sEnd as String
157 Sub InitializeResources()
158 Dim 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 sCurrESTONIAN = GetResText(1516)
217 sCurrUNKNOWN = GetResText(1517)
218 sCurrSYSUNKNOWN = GetResText(1518)
219 .cmdCancel.Label = sCANCEL
220 .cmdHelp.Label = sHELP
221 .cmdBack.Label = GetResText(1002)
222 .cmdGoOn.Label = sGOON
223 .lblHint.Label = GetResText(1004)
224 .lblCurrencies.Label = GetResText(1006)
225 .cmdBack.Enabled = False
226 If .Step = 1 Then
227 .chkComplete.Label = GetResText(1100)
228 .hlnSelection.Label = GetResText(1101)
229 .optCellTemplates.Label = GetResText(1102)
230 .optSheetRanges.Label = GetResText(1103)
231 .optDocRanges.Label = GetResText(1104)
232 .optSelRange.Label = GetResText(1105)
233 sCURRRANGES = GetResText(1108)
234 .lblSelection.Label = sCURRRANGES
235 Else
236 .lblProgress.Label = sStsPROGRESS
237 .hlnExtent.Label = GetResText(1200)
238 .optSingleFile.Label = GetResText(1201)
239 .optWholeDir.Label = GetResText(1202)
240 .chkProtect.Label = GetResText(1207)
241 .chkTextDocuments.Label = GetResText(1210)
243 sSOURCEFILE = GetResText(1203)
244 sSOURCEDIR = GetResText(1204)
245 .lblSource.Label = sSOURCEDIR
246 sInclusiveSubDir = GetResText(1205)
247 .chkRecursive.Label = sInclusiveSubDir
248 sTARGETDIR = GetResText(1206)
249 .lblTarget.Label = STARGETDIR
251 LocWorkPath = GetPathSettings(&quot;Work&quot;)
252 If Not oUcb.Exists(LocWorkPath) Then
253 ShowNoOfficePathError()
254 Stop
255 End If
257 .txtSource.Text = ConvertfromUrl(LocWorkPath)
259 SubstDir = .txtSource.Text
260 .txtTarget.Text = .txtSource.Text
261 .hlnProgress.Label = GetResText(1600)
262 .lblConfig.Label = GetResText(1603)
263 sPrgsRETRIEVAL = GetResText(1601)
264 sPrgsCONVERTING = GetResText(1602)
265 sPrgsUNPROTECT = GetResText(1604)
266 End If
267 End With
268 End Sub
270 Sub InitializeLanguages()
271 sEuroSign = chr(8364)
273 &apos; CURRENCIES_PORTUGUESE
274 LangIDValue(0,0,0) = &quot;pt&quot;
275 LangIDValue(0,0,1) = &quot;&quot;
276 LangIDValue(0,0,2) = &quot;-816&quot;
278 &apos; CURRENCIES_DUTCH
279 LangIDValue(1,0,0) = &quot;nl&quot;
280 LangIDValue(1,0,1) = &quot;&quot;
281 LangIDValue(1,0,2) = &quot;-413&quot;
283 &apos; CURRENCIES_FRENCH
284 LangIDValue(2,0,0) = &quot;fr&quot;
285 LangIDValue(2,0,1) = &quot;&quot;
286 LangIDValue(2,0,2) = &quot;-40C&quot;
288 &apos; CURRENCIES_SPANISH
289 LangIDValue(3,0,0) = &quot;es&quot;
290 LangIDValue(3,0,1) = &quot;&quot;
291 LangIDValue(3,0,2) = &quot;-40A&quot;
293 &apos;Spanish modern
294 LangIDValue(3,1,0) = &quot;es&quot;
295 LangIDValue(3,1,1) = &quot;&quot;
296 LangIDValue(3,1,2) = &quot;-C0A&quot;
298 &apos;Spanish katalanic
299 LangIDValue(3,2,0) = &quot;es&quot;
300 LangIDValue(3,2,1) = &quot;&quot;
301 LangIDValue(3,2,2) = &quot;-403&quot;
303 &apos; CURRENCIES_ITALIAN
304 LangIDValue(4,0,0) = &quot;it&quot;
305 LangIDValue(4,0,1) = &quot;&quot;
306 LangIDValue(4,0,2) = &quot;-410&quot;
308 &apos; CURRENCIES_GERMAN
309 LangIDValue(5,0,0) = &quot;de&quot;
310 LangIDValue(5,0,1) = &quot;DE&quot;
311 LangIDValue(5,0,2) = &quot;-407&quot;
313 &apos; CURRENCIES_BELGIAN
314 LangIDValue(6,0,0) = &quot;fr&quot;
315 LangIDValue(6,0,1) = &quot;BE&quot;
316 LangIDValue(6,0,2) = &quot;-80C&quot;
318 LangIDValue(6,1,0) = &quot;nl&quot;
319 LangIDValue(6,1,1) = &quot;BE&quot;
320 LangIDValue(6,1,2) = &quot;-813&quot;
322 &apos; CURRENCIES_IRISH
323 LangIDValue(7,0,0) = &quot;en&quot;
324 LangIDValue(7,0,1) = &quot;IE&quot;
325 LangIDValue(7,0,2) = &quot;-1809&quot;
327 LangIDValue(7,1,0) = &quot;ga&quot;
328 LangIDValue(7,1,1) = &quot;IE&quot;
329 LangIDValue(7,1,2) = &quot;-83C&quot;
331 &apos; CURRENCIES_LUXEMBOURG
332 LangIDValue(8,0,0) = &quot;fr&quot;
333 LangIDValue(8,0,1) = &quot;LU&quot;
334 LangIDValue(8,0,2) = &quot;-140C&quot;
336 LangIDValue(8,1,0) = &quot;de&quot;
337 LangIDValue(8,1,1) = &quot;LU&quot;
338 LangIDValue(8,1,2) = &quot;-1007&quot;
340 &apos; CURRENCIES_AUSTRIAN
341 LangIDValue(9,0,0) = &quot;de&quot;
342 LangIDValue(9,0,1) = &quot;AT&quot;
343 LangIDValue(9,0,2) = &quot;-C07&quot;
345 &apos; CURRENCIES_FINNISH
346 LangIDValue(10,0,0) = &quot;fi&quot;
347 LangIDValue(10,0,1) = &quot;FI&quot;
348 LangIDValue(10,0,2) = &quot;-40B&quot;
350 LangIDValue(10,1,0) = &quot;sv&quot;
351 LangIDValue(10,1,1) = &quot;FI&quot;
352 LangIDValue(10,1,2) = &quot;-81D&quot;
354 &apos; CURRENCIES_GREEK
355 LangIDValue(11,0,0) = &quot;el&quot;
356 LangIDValue(11,0,1) = &quot;GR&quot;
357 LangIDValue(11,0,2) = &quot;-408&quot;
359 &apos; CURRENCIES_SLOVENIAN
360 LangIDValue(12,0,0) = &quot;sl&quot;
361 LangIDValue(12,0,1) = &quot;SI&quot;
362 LangIDValue(12,0,2) = &quot;-424&quot;
364 &apos; CURRENCIES_CYPRIOT
365 LangIDValue(13,0,0) = &quot;el&quot;
366 LangIDValue(13,0,1) = &quot;CY&quot;
367 LangIDValue(13,0,2) = &quot;-408&quot;
369 &apos; CURRENCIES_MALTESE
370 LangIDValue(14,0,0) = &quot;mt&quot;
371 LangIDValue(14,0,1) = &quot;MT&quot;
372 LangIDValue(14,0,2) = &quot;-43A&quot;
374 &apos; CURRENCIES_SLOVAK
375 LangIDValue(15,0,0) = &quot;sk&quot;
376 LangIDValue(15,0,1) = &quot;SK&quot;
377 LangIDValue(15,0,2) = &quot;-41B&quot;
379 &apos; CURRENCIES_ESTONIAN
380 LangIDValue(16,0,0) = &quot;et&quot;
381 LangIDValue(16,0,1) = &quot;ET&quot;
382 LangIDValue(16,0,2) = &quot;-425&quot;
384 End Sub
388 Sub InitializeCurrencies()
389 Dim i as Integer
390 GoOn = True
392 CurrValue(0,0) = sCurrPORTUGUESE
393 &apos; real conversion rate
394 CurrValue(0,1) = 200.482
395 &apos; rounded conversion rate
396 CurrValue(0,2) = 200
397 CurrValue(0,3) = &quot;Esc.&quot;
398 CurrValue(0,4) = &quot;Esc.&quot;
399 CurrValue(0,5) = &quot;PTE&quot;
401 CurrValue(1,0) = sCurrDUTCH
402 &apos; real conversion rate
403 CurrValue(1,1) = 2.20371
404 &apos; rounded conversion rate
405 CurrValue(1,2) = 2
406 CurrValue(1,3) = &quot;F&quot;
407 CurrValue(1,4) = &quot;fl&quot;
408 CurrValue(1,5) = &quot;NLG&quot;
410 CurrValue(2,0) = sCurrFRENCH
411 &apos; real conversion rate
412 CurrValue(2,1) = 6.55957
413 &apos; rounded conversion rate
414 CurrValue(2,2) = 7
415 CurrValue(2,3) = &quot;F&quot;
416 CurrValue(2,4) = &quot;F&quot;
417 CurrValue(2,5) = &quot;FRF&quot;
419 CurrValue(3,0) = sCurrSPANISH
420 &apos; real conversion rate
421 CurrValue(3,1) = 166.386
422 &apos; rounded conversion rate
423 CurrValue(3,2) = 170
424 CurrValue(3,3) = &quot;Pts&quot;
425 CurrValue(3,4) = &quot;Pts&quot;
426 CurrValue(3,5) = &quot;ESP&quot;
428 CurrValue(4,0) = sCurrITALIAN
429 &apos; real conversion rate
430 CurrValue(4,1) = 1936.27
431 &apos; rounded conversion rate
432 CurrValue(4,2) = 2000
433 CurrValue(4,3) = &quot;L.&quot;
434 CurrValue(4,4) = &quot;L.&quot;
435 CurrValue(4,5) = &quot;ITL&quot;
437 CurrValue(5,0) = sCurrGERMAN
438 &apos; real conversion rate
439 CurrValue(5,1) = 1.95583
440 &apos; rounded conversion rate
441 CurrValue(5,2) = 2
442 CurrValue(5,3) = &quot;DM&quot;
443 CurrValue(5,4) = &quot;DM&quot;
444 CurrValue(5,5) = &quot;DEM&quot;
446 CurrValue(6,0) = sCurrBELGIAN
447 &apos; real conversion rate
448 CurrValue(6,1) = 40.3399
449 &apos; rounded conversion rate
450 CurrValue(6,2) = 40
451 CurrValue(6,3) = &quot;FB&quot;
452 CurrValue(6,4) = &quot;BF&quot;
453 CurrValue(6,5) = &quot;BEF&quot;
455 CurrValue(7,0) = sCurrIRISH
456 &apos; real conversion rate
457 CurrValue(7,1) = 0.787564
458 &apos; rounded conversion rate
459 CurrValue(7,2) = 0.8
460 CurrValue(7,3) = &quot;IR£&quot;
461 CurrValue(7,4) = &quot;£&quot;
462 CurrValue(7,5) = &quot;IEP&quot;
464 CurrValue(8,0) = sCurrLUXEMBOURG
465 &apos; real conversion rate
466 CurrValue(8,1) = 40.3399
467 &apos; rounded conversion rate
468 CurrValue(8,2) = 40
469 CurrValue(8,3) = &quot;F&quot;
470 CurrValue(8,4) = &quot;F&quot;
471 CurrValue(8,5) = &quot;LUF&quot;
473 CurrValue(9,0) = sCurrAUSTRIAN
474 &apos; real conversion rate
475 CurrValue(9,1) = 13.7603
476 &apos; rounded conversion rate
477 CurrValue(9,2) = 15
478 CurrValue(9,3) = &quot;öS&quot;
479 CurrValue(9,4) = &quot;S&quot;
480 CurrValue(9,5) = &quot;ATS&quot;
482 CurrValue(10,0) = sCurrFINNISH
483 &apos; real conversion rate
484 CurrValue(10,1) = 5.94573
485 &apos; rounded conversion rate
486 CurrValue(10,2) = 6
487 CurrValue(10,3) = &quot;mk&quot;
488 CurrValue(10,4) = &quot;mk&quot;
489 CurrValue(10,5) = &quot;FIM&quot;
491 CurrValue(11,0) = sCurrGREEK
492 &apos; real conversion rate
493 CurrValue(11,1) = 340.750
494 &apos; rounded conversion rate
495 CurrValue(11,2) = 400
496 CurrValue(11,3) = chr(916) &amp; chr(961) &amp; chr(967)
497 CurrValue(11,4) = chr(916) &amp; chr(961) &amp; chr(967)
498 CurrValue(11,5) = &quot;GRD&quot;
500 CurrValue(12,0) = sCurrSLOVENIAN
501 &apos; real conversion rate
502 CurrValue(12,1) = 239.64
503 &apos; rounded conversion rate
504 CurrValue(12,2) = 240
505 CurrValue(12,3) = &quot;SIT&quot;
506 CurrValue(12,4) = &quot;SIT&quot;
507 CurrValue(12,5) = &quot;SIT&quot;
509 CurrValue(13,0) = sCurrCYPRIOT
510 &apos; real conversion rate
511 CurrValue(13,1) = 0.585274
512 &apos; rounded conversion rate
513 CurrValue(13,2) = 0.6
514 CurrValue(13,3) = &quot;£C&quot;
515 CurrValue(13,4) = &quot;£&quot;
516 CurrValue(13,5) = &quot;CYP&quot;
518 CurrValue(14,0) = sCurrMALTESE
519 &apos; real conversion rate
520 CurrValue(14,1) = 0.429300
521 &apos; rounded conversion rate
522 CurrValue(14,2) = 0.4
523 CurrValue(14,3) = chr(8356)
524 CurrValue(14,4) = &quot;Lm&quot;
525 CurrValue(14,5) = &quot;MTL&quot;
527 CurrValue(15,0) = sCurrSLOVAK
528 &apos; real conversion rate
529 CurrValue(15,1) = 30.1260
530 &apos; rounded conversion rate
531 CurrValue(15,2) = 30
532 CurrValue(15,3) = &quot;Sk&quot;
533 CurrValue(15,4) = &quot;Sk&quot;
534 CurrValue(15,5) = &quot;SKK&quot;
536 CurrValue(16,0) = sCurrESTONIAN
537 &apos; real conversion rate
538 CurrValue(16,1) = 15.6466
539 &apos; rounded conversion rate
540 CurrValue(16,2) = 16
541 CurrValue(16,3) = &quot;kr&quot;
542 CurrValue(16,4) = &quot;kr&quot;
543 CurrValue(16,5) = &quot;EEK&quot;
545 i = -1
546 CurrSymbolList(0) = &quot;&quot;
547 CurrSymbolList(1) = &quot;&quot;
548 InitializeCurrencyValues(CurrIndex)
549 End Sub
552 Sub InitializeControls()
553 If CurrIndex = -1 Then
554 If DialogModel.Step = 1 Then
555 EnableStep1DialogControls(True, False, False)
556 ElseIf DialogModel.Step = 2 Then
557 EnableStep2DialogControls(True)
558 End If
559 End If
560 End Sub
563 Sub InitializeConverter(oLocale, iDialogPage as Integer)
564 Dim Isthere as Boolean
565 bCancelProtection = False
566 bRangeListDefined = False
567 PWIndex = -1
568 If iDialogPage = 1 Then
569 ToggleWindow(False)
570 sDocType = Tools.GetDocumentType(ThisComponent)
571 If sDocType = &quot;sCalc&quot; Then
572 bDocHasProtectedSheets = CheckSheetProtection(oSheets)
573 End If
574 oStatusline = ThisComponent.GetCurrentController.GetFrame.CreateStatusIndicator()
575 End If
576 DialogConvert = LoadDialog(&quot;Euro&quot;, &quot;DlgConvert&quot;)
577 DialogModel = DialogConvert.Model
578 DialogPassword = LoadDialog(&quot;Euro&quot;, &quot;DlgPassword&quot;)
579 PasswordModel = DialogPassword.Model
580 DialogModel.Step = iDialogPage
581 InitializeResources()
582 InitializeLanguages()
583 InitializeLocales(oLocale)
584 InitializeCurrencies()
585 InitializeControls()
586 BitmapDir = GetOfficeSubPath(&quot;Template&quot;, &quot;../wizard/bitmap&quot;)
587 If BitmapDir = &quot;&quot; Then
588 Stop
589 End If
590 FillUpCurrencyListbox()
591 DialogModel.imgPreview.ImageUrl = BitmapDir &amp; &quot;euro_&quot; &amp; DialogModel.Step &amp; &quot;.bmp&quot;
592 DialogConvert.Title = sMsgDLGTITLE
593 DialogModel.cmdGoOn.DefaultButton = True
594 If iDialogPage = 1 Then
595 ToggleWindow(True)
596 End If
597 End Sub
600 Sub InitializeCurrencyValues(CurrIndex)
601 If CurrIndex &lt;&gt; -1 Then
602 CurrLanguage = CurrValue(CurrIndex,0)
603 CurrFactor = CurrValue(CurrIndex,1)
604 CurrSymbolList(0) = CurrValue(CurrIndex,3)
605 CurrSymbolList(1) = CurrValue(CurrIndex,4)
606 CurrSymbolList(2) = CurrValue(CurrIndex,5)
607 End If
608 End Sub
611 Function InitializeLocales(oLocale) as Boolean
612 Dim i as Integer, n as Integer, m as Integer
613 Dim sLanguage as String, sCountry as String
614 Dim bTakeThisLocale as Boolean
615 sLanguage = oLocale.Language
616 sCountry = oLocale.Country
617 For n = 0 To SBCOUNTRYCOUNT - 1
618 For m = 0 TO 1
619 If DialogModel.Step = 2 Then
620 bTakeThisLocale = LangIDValue(n,m,0) = sLanguage
621 Else
622 bTakeThisLocale = LangIDValue(n,m,0) = sLanguage
623 End If
624 If bTakeThisLocale Then
625 CurrIndex = n
626 For i = 0 To 2
627 CurExtension(i) = LangIDValue(CurrIndex,i,2)
628 Next i
629 InitializeLocales = True
630 Exit Function
631 End If
632 Next m
633 Next n
634 CurrIndex = -1
635 InitializeLocales = False
636 End Function
637 </script:module>