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