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