1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE script:module PUBLIC
"-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
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 .
20 <script:module xmlns:
script=
"http://openoffice.org/2000/script" script:
name=
"Init" script:
language=
"StarBasic">Option Explicit
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 sCurrLATVIAN as String
93 Public sCurrLITHUANIAN 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 =
19
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(
18,
5)
137 Public LangIDValue(
18,
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
157 Sub InitializeResources()
158 Dim LocWorkPath as String
160 ' 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,
"%PRODUCTNAME
", 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 sCurrLATVIAN = GetResText(
1517)
218 sCurrLITHUANIAN = 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
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
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(
"Work
")
252 If Not oUcb.Exists(LocWorkPath) Then
253 ShowNoOfficePathError()
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)
270 Sub InitializeLanguages()
271 sEuroSign = chr(
8364)
273 ' CURRENCIES_PORTUGUESE
274 LangIDValue(
0,
0,
0) =
"pt
"
275 LangIDValue(
0,
0,
1) =
""
276 LangIDValue(
0,
0,
2) =
"-
816"
278 ' CURRENCIES_DUTCH
279 LangIDValue(
1,
0,
0) =
"nl
"
280 LangIDValue(
1,
0,
1) =
""
281 LangIDValue(
1,
0,
2) =
"-
413"
283 ' CURRENCIES_FRENCH
284 LangIDValue(
2,
0,
0) =
"fr
"
285 LangIDValue(
2,
0,
1) =
""
286 LangIDValue(
2,
0,
2) =
"-
40C
"
288 ' CURRENCIES_SPANISH
289 LangIDValue(
3,
0,
0) =
"es
"
290 LangIDValue(
3,
0,
1) =
""
291 LangIDValue(
3,
0,
2) =
"-
40A
"
294 LangIDValue(
3,
1,
0) =
"es
"
295 LangIDValue(
3,
1,
1) =
""
296 LangIDValue(
3,
1,
2) =
"-C0A
"
298 'Spanish katalanic
299 LangIDValue(
3,
2,
0) =
"es
"
300 LangIDValue(
3,
2,
1) =
""
301 LangIDValue(
3,
2,
2) =
"-
403"
303 ' CURRENCIES_ITALIAN
304 LangIDValue(
4,
0,
0) =
"it
"
305 LangIDValue(
4,
0,
1) =
""
306 LangIDValue(
4,
0,
2) =
"-
410"
308 ' CURRENCIES_GERMAN
309 LangIDValue(
5,
0,
0) =
"de
"
310 LangIDValue(
5,
0,
1) =
"DE
"
311 LangIDValue(
5,
0,
2) =
"-
407"
313 ' CURRENCIES_BELGIAN
314 LangIDValue(
6,
0,
0) =
"fr
"
315 LangIDValue(
6,
0,
1) =
"BE
"
316 LangIDValue(
6,
0,
2) =
"-
80C
"
318 LangIDValue(
6,
1,
0) =
"nl
"
319 LangIDValue(
6,
1,
1) =
"BE
"
320 LangIDValue(
6,
1,
2) =
"-
813"
322 ' CURRENCIES_IRISH
323 LangIDValue(
7,
0,
0) =
"en
"
324 LangIDValue(
7,
0,
1) =
"IE
"
325 LangIDValue(
7,
0,
2) =
"-
1809"
327 LangIDValue(
7,
1,
0) =
"ga
"
328 LangIDValue(
7,
1,
1) =
"IE
"
329 LangIDValue(
7,
1,
2) =
"-
83C
"
331 ' CURRENCIES_LUXEMBOURG
332 LangIDValue(
8,
0,
0) =
"fr
"
333 LangIDValue(
8,
0,
1) =
"LU
"
334 LangIDValue(
8,
0,
2) =
"-
140C
"
336 LangIDValue(
8,
1,
0) =
"de
"
337 LangIDValue(
8,
1,
1) =
"LU
"
338 LangIDValue(
8,
1,
2) =
"-
1007"
340 ' CURRENCIES_AUSTRIAN
341 LangIDValue(
9,
0,
0) =
"de
"
342 LangIDValue(
9,
0,
1) =
"AT
"
343 LangIDValue(
9,
0,
2) =
"-C07
"
345 ' CURRENCIES_FINNISH
346 LangIDValue(
10,
0,
0) =
"fi
"
347 LangIDValue(
10,
0,
1) =
"FI
"
348 LangIDValue(
10,
0,
2) =
"-
40B
"
350 LangIDValue(
10,
1,
0) =
"sv
"
351 LangIDValue(
10,
1,
1) =
"FI
"
352 LangIDValue(
10,
1,
2) =
"-
81D
"
354 ' CURRENCIES_GREEK
355 LangIDValue(
11,
0,
0) =
"el
"
356 LangIDValue(
11,
0,
1) =
"GR
"
357 LangIDValue(
11,
0,
2) =
"-
408"
359 ' CURRENCIES_SLOVENIAN
360 LangIDValue(
12,
0,
0) =
"sl
"
361 LangIDValue(
12,
0,
1) =
"SI
"
362 LangIDValue(
12,
0,
2) =
"-
424"
364 ' CURRENCIES_CYPRIOT
365 LangIDValue(
13,
0,
0) =
"el
"
366 LangIDValue(
13,
0,
1) =
"CY
"
367 LangIDValue(
13,
0,
2) =
"-
408"
369 ' CURRENCIES_MALTESE
370 LangIDValue(
14,
0,
0) =
"mt
"
371 LangIDValue(
14,
0,
1) =
"MT
"
372 LangIDValue(
14,
0,
2) =
"-
43A
"
374 ' CURRENCIES_SLOVAK
375 LangIDValue(
15,
0,
0) =
"sk
"
376 LangIDValue(
15,
0,
1) =
"SK
"
377 LangIDValue(
15,
0,
2) =
"-
41B
"
379 ' CURRENCIES_ESTONIAN
380 LangIDValue(
16,
0,
0) =
"et
"
381 LangIDValue(
16,
0,
1) =
"ET
"
382 LangIDValue(
16,
0,
2) =
"-
425"
384 ' CURRENCIES_LATVIAN
385 LangIDValue(
17,
0,
0) =
"lv
"
386 LangIDValue(
17,
0,
1) =
"LV
"
387 LangIDValue(
17,
0,
2) =
"-
426"
389 LangIDValue(
17,
1,
0) =
"ltg
"
390 LangIDValue(
17,
1,
1) =
"LV
"
391 LangIDValue(
17,
1,
2) =
"-
64B
"
393 ' CURRENCIES_LITHUANIAN
394 LangIDValue(
18,
0,
0) =
"lt
"
395 LangIDValue(
18,
0,
1) =
"LT
"
396 LangIDValue(
18,
0,
2) =
"-
427"
402 Sub InitializeCurrencies()
406 CurrValue(
0,
0) = sCurrPORTUGUESE
407 ' real conversion rate
408 CurrValue(
0,
1) =
200.482
409 ' rounded conversion rate
411 CurrValue(
0,
3) =
"Esc.
"
412 CurrValue(
0,
4) =
"Esc.
"
413 CurrValue(
0,
5) =
"PTE
"
415 CurrValue(
1,
0) = sCurrDUTCH
416 ' real conversion rate
417 CurrValue(
1,
1) =
2.20371
418 ' rounded conversion rate
420 CurrValue(
1,
3) =
"F
"
421 CurrValue(
1,
4) =
"fl
"
422 CurrValue(
1,
5) =
"NLG
"
424 CurrValue(
2,
0) = sCurrFRENCH
425 ' real conversion rate
426 CurrValue(
2,
1) =
6.55957
427 ' rounded conversion rate
429 CurrValue(
2,
3) =
"F
"
430 CurrValue(
2,
4) =
"F
"
431 CurrValue(
2,
5) =
"FRF
"
433 CurrValue(
3,
0) = sCurrSPANISH
434 ' real conversion rate
435 CurrValue(
3,
1) =
166.386
436 ' rounded conversion rate
438 CurrValue(
3,
3) =
"Pts
"
439 CurrValue(
3,
4) =
"Pts
"
440 CurrValue(
3,
5) =
"ESP
"
442 CurrValue(
4,
0) = sCurrITALIAN
443 ' real conversion rate
444 CurrValue(
4,
1) =
1936.27
445 ' rounded conversion rate
446 CurrValue(
4,
2) =
2000
447 CurrValue(
4,
3) =
"L.
"
448 CurrValue(
4,
4) =
"L.
"
449 CurrValue(
4,
5) =
"ITL
"
451 CurrValue(
5,
0) = sCurrGERMAN
452 ' real conversion rate
453 CurrValue(
5,
1) =
1.95583
454 ' rounded conversion rate
456 CurrValue(
5,
3) =
"DM
"
457 CurrValue(
5,
4) =
"DM
"
458 CurrValue(
5,
5) =
"DEM
"
460 CurrValue(
6,
0) = sCurrBELGIAN
461 ' real conversion rate
462 CurrValue(
6,
1) =
40.3399
463 ' rounded conversion rate
465 CurrValue(
6,
3) =
"FB
"
466 CurrValue(
6,
4) =
"BF
"
467 CurrValue(
6,
5) =
"BEF
"
469 CurrValue(
7,
0) = sCurrIRISH
470 ' real conversion rate
471 CurrValue(
7,
1) =
0.787564
472 ' rounded conversion rate
474 CurrValue(
7,
3) =
"IR£
"
475 CurrValue(
7,
4) =
"£
"
476 CurrValue(
7,
5) =
"IEP
"
478 CurrValue(
8,
0) = sCurrLUXEMBOURG
479 ' real conversion rate
480 CurrValue(
8,
1) =
40.3399
481 ' rounded conversion rate
483 CurrValue(
8,
3) =
"F
"
484 CurrValue(
8,
4) =
"F
"
485 CurrValue(
8,
5) =
"LUF
"
487 CurrValue(
9,
0) = sCurrAUSTRIAN
488 ' real conversion rate
489 CurrValue(
9,
1) =
13.7603
490 ' rounded conversion rate
492 CurrValue(
9,
3) =
"öS
"
493 CurrValue(
9,
4) =
"S
"
494 CurrValue(
9,
5) =
"ATS
"
496 CurrValue(
10,
0) = sCurrFINNISH
497 ' real conversion rate
498 CurrValue(
10,
1) =
5.94573
499 ' rounded conversion rate
501 CurrValue(
10,
3) =
"mk
"
502 CurrValue(
10,
4) =
"mk
"
503 CurrValue(
10,
5) =
"FIM
"
505 CurrValue(
11,
0) = sCurrGREEK
506 ' real conversion rate
507 CurrValue(
11,
1) =
340.750
508 ' rounded conversion rate
509 CurrValue(
11,
2) =
400
510 CurrValue(
11,
3) = chr(
916)
& chr(
961)
& chr(
967)
511 CurrValue(
11,
4) = chr(
916)
& chr(
961)
& chr(
967)
512 CurrValue(
11,
5) =
"GRD
"
514 CurrValue(
12,
0) = sCurrSLOVENIAN
515 ' real conversion rate
516 CurrValue(
12,
1) =
239.64
517 ' rounded conversion rate
518 CurrValue(
12,
2) =
240
519 CurrValue(
12,
3) =
"SIT
"
520 CurrValue(
12,
4) =
"SIT
"
521 CurrValue(
12,
5) =
"SIT
"
523 CurrValue(
13,
0) = sCurrCYPRIOT
524 ' real conversion rate
525 CurrValue(
13,
1) =
0.585274
526 ' rounded conversion rate
527 CurrValue(
13,
2) =
0.6
528 CurrValue(
13,
3) =
"£C
"
529 CurrValue(
13,
4) =
"£
"
530 CurrValue(
13,
5) =
"CYP
"
532 CurrValue(
14,
0) = sCurrMALTESE
533 ' real conversion rate
534 CurrValue(
14,
1) =
0.429300
535 ' rounded conversion rate
536 CurrValue(
14,
2) =
0.4
537 CurrValue(
14,
3) = chr(
8356)
538 CurrValue(
14,
4) =
"Lm
"
539 CurrValue(
14,
5) =
"MTL
"
541 CurrValue(
15,
0) = sCurrSLOVAK
542 ' real conversion rate
543 CurrValue(
15,
1) =
30.1260
544 ' rounded conversion rate
546 CurrValue(
15,
3) =
"Sk
"
547 CurrValue(
15,
4) =
"Sk
"
548 CurrValue(
15,
5) =
"SKK
"
550 CurrValue(
16,
0) = sCurrESTONIAN
551 ' real conversion rate
552 CurrValue(
16,
1) =
15.6466
553 ' rounded conversion rate
555 CurrValue(
16,
3) =
"kr
"
556 CurrValue(
16,
4) =
"kr
"
557 CurrValue(
16,
5) =
"EEK
"
559 CurrValue(
17,
0) = sCurrLATVIAN
560 ' real conversion rate
561 CurrValue(
17,
1) =
0.702804
562 ' rounded conversion rate
563 CurrValue(
17,
2) =
0.7
564 CurrValue(
17,
3) =
"Ls
"
565 CurrValue(
17,
4) =
"Ls
"
566 CurrValue(
17,
5) =
"LVL
"
568 CurrValue(
18,
0) = sCurrLITHUANIAN
569 ' real conversion rate
570 CurrValue(
18,
1) =
3.45280
571 ' rounded conversion rate
572 CurrValue(
18,
2) =
3.5
573 CurrValue(
18,
3) =
"Lt
"
574 CurrValue(
18,
4) =
"Lt
"
575 CurrValue(
18,
5) =
"LTL
"
578 CurrSymbolList(
0) =
""
579 CurrSymbolList(
1) =
""
580 InitializeCurrencyValues(CurrIndex)
584 Sub InitializeControls()
585 If CurrIndex = -
1 Then
586 If DialogModel.Step =
1 Then
587 EnableStep1DialogControls(True, False, False)
588 ElseIf DialogModel.Step =
2 Then
589 EnableStep2DialogControls(True)
595 Sub InitializeConverter(oLocale, iDialogPage as Integer)
596 Dim Isthere as Boolean
597 bCancelProtection = False
598 bRangeListDefined = False
600 If iDialogPage =
1 Then
602 sDocType = Tools.GetDocumentType(ThisComponent)
603 If sDocType =
"sCalc
" Then
604 bDocHasProtectedSheets = CheckSheetProtection(oSheets)
606 oStatusline = ThisComponent.GetCurrentController.GetFrame.CreateStatusIndicator()
608 DialogConvert = LoadDialog(
"Euro
",
"DlgConvert
")
609 DialogModel = DialogConvert.Model
610 DialogPassword = LoadDialog(
"Euro
",
"DlgPassword
")
611 PasswordModel = DialogPassword.Model
612 DialogModel.Step = iDialogPage
613 InitializeResources()
614 InitializeLanguages()
615 InitializeLocales(oLocale)
616 InitializeCurrencies()
618 BitmapDir = GetOfficeSubPath(
"Template
",
"../wizard/bitmap
")
619 If BitmapDir =
"" Then
622 FillUpCurrencyListbox()
623 DialogModel.imgPreview.ImageUrl = BitmapDir
& "euro_
" & DialogModel.Step
& ".bmp
"
624 DialogConvert.Title = sMsgDLGTITLE
625 DialogModel.cmdGoOn.DefaultButton = True
626 If iDialogPage =
1 Then
632 Sub InitializeCurrencyValues(CurrIndex)
633 If CurrIndex
<> -
1 Then
634 CurrLanguage = CurrValue(CurrIndex,
0)
635 CurrFactor = CurrValue(CurrIndex,
1)
636 CurrSymbolList(
0) = CurrValue(CurrIndex,
3)
637 CurrSymbolList(
1) = CurrValue(CurrIndex,
4)
638 CurrSymbolList(
2) = CurrValue(CurrIndex,
5)
643 Function InitializeLocales(oLocale) as Boolean
644 Dim i as Integer, n as Integer, m as Integer
645 Dim sLanguage as String, sCountry as String
646 Dim bTakeThisLocale as Boolean
647 sLanguage = oLocale.Language
648 sCountry = oLocale.Country
649 For n =
0 To SBCOUNTRYCOUNT -
1
651 If DialogModel.Step =
2 Then
652 bTakeThisLocale = LangIDValue(n,m,
0) = sLanguage
654 bTakeThisLocale = LangIDValue(n,m,
0) = sLanguage
656 If bTakeThisLocale Then
659 CurExtension(i) = LangIDValue(CurrIndex,i,
2)
661 InitializeLocales = True
667 InitializeLocales = False