1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?> 2cdf0e10cSrcweir<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> 3*019b6df1Smseidel 43e02b54dSAndrew Rist<!--*********************************************************** 53e02b54dSAndrew Rist * 63e02b54dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 73e02b54dSAndrew Rist * or more contributor license agreements. See the NOTICE file 83e02b54dSAndrew Rist * distributed with this work for additional information 93e02b54dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 103e02b54dSAndrew Rist * to you under the Apache License, Version 2.0 (the 113e02b54dSAndrew Rist * "License"); you may not use this file except in compliance 123e02b54dSAndrew Rist * with the License. You may obtain a copy of the License at 133e02b54dSAndrew Rist * 143e02b54dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 153e02b54dSAndrew Rist * 163e02b54dSAndrew Rist * Unless required by applicable law or agreed to in writing, 173e02b54dSAndrew Rist * software distributed under the License is distributed on an 183e02b54dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 193e02b54dSAndrew Rist * KIND, either express or implied. See the License for the 203e02b54dSAndrew Rist * specific language governing permissions and limitations 213e02b54dSAndrew Rist * under the License. 223e02b54dSAndrew Rist * 233e02b54dSAndrew Rist ***********************************************************--> 24cdf0e10cSrcweir 25*019b6df1Smseidel<script:module xmlns:script="http://openoffice.org/2000/script" script:name="CommonLang" script:language="StarBasic">REM ***** BASIC ***** 26cdf0e10cSrcweir 27cdf0e10cSrcweir' Column A has the index 1 28cdf0e10cSrcweirPublic Const SBCOLUMNNAME1 = 3 ' Stock names, sheet 1 29cdf0e10cSrcweirPublic Const SBCOLUMNID1 = 4 ' Stock ID, sheet 1 30cdf0e10cSrcweirPublic Const SBCOLUMNQUANTITY1 = 5 ' Stock quantity sheet 1 31cdf0e10cSrcweirPublic Const SBCOLUMNRATE1 = 7 ' Price for stocks, sheet 1 32cdf0e10cSrcweirPublic Const SBCOLUMNNAME2 = 3 ' Stock names, sheet 2 33cdf0e10cSrcweirPublic Const SBCOLUMNDATE2 = 4 ' Transaction dates, sheet 2 34cdf0e10cSrcweirPublic Const SBCOLUMNQUANTITY2 = 5 ' Transaction quantity, sheet 2 35cdf0e10cSrcweirPublic Const SBCOLUMNRATE2 = 6 ' Price for stocks, sheet 2 36cdf0e10cSrcweirPublic Const SBCOLUMNPROVPERCENT2 = 7 ' Provision in %, sheet 2 37cdf0e10cSrcweirPublic Const SBCOLUMNPROVMIN2 = 8 ' Minimum provision, sheet 2 38cdf0e10cSrcweirPublic Const SBCOLUMNPROVFIX2 = 9 ' Fixed provision, sheet 2 39cdf0e10cSrcweirPublic Const SBCOLUMNPROCEEDS2 = 12 ' Profit, sheet 2 40cdf0e10cSrcweirPublic Const SBCOLUMNQTYSOLD2 = 14 ' Quantity sold, sheet 2 41cdf0e10cSrcweirPublic Const SBCOLUMNQTYREST2 = 15 ' Quantity not sold yet, sheet 2 42cdf0e10cSrcweirPublic Const SBCOLUMNPRCREST2 = 16 ' Proportional proce for quantity not sold yet, sheet 2 43cdf0e10cSrcweirPublic Const SBCOLUMNREALPROC2 = 17 ' Realized proceeds, sheet 2 44cdf0e10cSrcweirPublic Const SBCOLUMNDIVIDEND2 = 18 ' Dividend paid, sheet 2 45cdf0e10cSrcweirPublic Const SBCOLUMNREALPROFIT2 = 19 ' Realized profit, sheet 2 46cdf0e10cSrcweirPublic Const SBROWFIRSTTRANSACT2 = 8 ' First data row, sheet 2 47cdf0e10cSrcweirPublic Const SBROWHEADER1 = 6 ' Headline, sheet 1 48cdf0e10cSrcweirPublic Const SBMSGOK = 0 49cdf0e10cSrcweirPublic Const SBMSGYESNO = 4 50cdf0e10cSrcweirPublic Const SBMSGSTOP = 16 51cdf0e10cSrcweirPublic Const SBMSGQUESTION = 32 52cdf0e10cSrcweirPublic Const SBMSGDEFAULTBTN2 = 256 53cdf0e10cSrcweirPublic Const SBHASID = 1 ' 0 = no ID, 1 = stocks have an ID 54cdf0e10cSrcweirPublic Const SBDIALOGSELL = 1 ' Step for main dialog 55cdf0e10cSrcweirPublic Const SBDIALOGBUY = 2 ' Step for main dialog 56cdf0e10cSrcweirPublic Const SBBINARY = 0 57cdf0e10cSrcweirPublic TransactMode as Integer 58cdf0e10cSrcweirPublic Const LIFO = -1 59cdf0e10cSrcweirPublic Const FIFO = 1 60cdf0e10cSrcweir 61cdf0e10cSrcweirPublic Const HANDLEDIVIDEND = 1 62cdf0e10cSrcweirPublic Const HANDLESPLIT = 2 63cdf0e10cSrcweir 64cdf0e10cSrcweirGlobal oDocument as Object 65cdf0e10cSrcweirGlobal oDocFormats() as Object 66cdf0e10cSrcweirGlobal oController as Object 67cdf0e10cSrcweirGlobal oFirstSheet as Object 68cdf0e10cSrcweirGlobal oBankSheet as Object 69cdf0e10cSrcweirGlobal oMovementSheet as Object 70cdf0e10cSrcweirGlobal sDocLanguage as String 71cdf0e10cSrcweirGlobal sDocCountry as String 72cdf0e10cSrcweirGlobal oSheets as Object 73cdf0e10cSrcweirGlobal oDocLocale as New com.sun.star.lang.Locale 74cdf0e10cSrcweirGlobal bEnableMarket as Boolean 75cdf0e10cSrcweirGlobal bEnableInternet as Boolean 76cdf0e10cSrcweirGlobal oMarketModel as Object 77cdf0e10cSrcweirGlobal oInternetModel as Object 78cdf0e10cSrcweir 79cdf0e10cSrcweirGlobal sCurCurrency$, sCurExtension$, sCurChartSource$, sCurStockIDLabel$, sCurSeparator$ 80cdf0e10cSrcweir 81cdf0e10cSrcweirPublic oNumberFormatter as Object 82cdf0e10cSrcweirPublic bDebugmode as Boolean 83cdf0e10cSrcweirGlobal GlobListindex as Integer 84cdf0e10cSrcweirPublic blabla() as String 85cdf0e10cSrcweirPublic SplitDate as Date 86cdf0e10cSrcweirPublic oChartSheet as Object 87cdf0e10cSrcweirPublic oBackgroundSheet as Object 88cdf0e10cSrcweirPublic Const SBDATECOLUMN = 3 89cdf0e10cSrcweirPublic Const SBVALUECOLUMN = 4 90cdf0e10cSrcweirPublic Const SBSTARTROW = 25 91cdf0e10cSrcweirPublic Const SBCHARTPERIOD = 14 92cdf0e10cSrcweirPublic Const SBINTERVAL = "d" 93cdf0e10cSrcweirPublic sColumnHeader as String 94cdf0e10cSrcweirPublic StartDate as Date 95cdf0e10cSrcweirPublic EndDate as Date 96cdf0e10cSrcweirPublic iCurRow as Integer 97cdf0e10cSrcweirPublic iMaxRow as Integer 98cdf0e10cSrcweirPublic iStartDay as Integer 99cdf0e10cSrcweirPublic iStartMonth as Integer 100cdf0e10cSrcweirPublic iStartYear as Integer 101cdf0e10cSrcweirPublic iEndDay as Integer 102cdf0e10cSrcweirPublic iEndMonth as Integer 103cdf0e10cSrcweirPublic iEndYear as Integer 104cdf0e10cSrcweirPublic oStatusLine as Object 105cdf0e10cSrcweirPublic Today as Date 106cdf0e10cSrcweirPublic sInterval as String 107cdf0e10cSrcweirPublic ShortMonths(11,1) 108cdf0e10cSrcweirPublic iStep as Integer 109cdf0e10cSrcweirPublic sDepotCurrency as String 110cdf0e10cSrcweirPublic iValueCol as Integer 111cdf0e10cSrcweir 112cdf0e10cSrcweirPublic DlgReference as Object 113cdf0e10cSrcweirPublic DlgTransaction as Object 114cdf0e10cSrcweirPublic DlgStockRates as Object 115cdf0e10cSrcweirPublic DlgStartUp as Object 116cdf0e10cSrcweirPublic TransactModel as Object 117cdf0e10cSrcweirPublic StockRatesModel as Object 118cdf0e10cSrcweirPublic StartUpModel as Object 119cdf0e10cSrcweirPublic StockRatesTitle(1 To 3) 120cdf0e10cSrcweirPublic TransactTitle(1 To 2) 121cdf0e10cSrcweirPublic NullList() 122cdf0e10cSrcweirPublic sStartupWelcome$, sStartupChooseMarket$, sStartupHint$ 123cdf0e10cSrcweir 124cdf0e10cSrcweirPublic sMarket(7,10) as String 125cdf0e10cSrcweirPublic sCountryMarket(7,10) as String 126cdf0e10cSrcweir 127cdf0e10cSrcweirPublic cDlgCaption1$, cDlgCaption2$ 128cdf0e10cSrcweirPublic sMsgError$, sMsgNoName$, sMsgNoQuantity$, sMsgNoDividend$, sMsgNoExchangeRate$ 129cdf0e10cSrcweirPublic sMsgNoValidExchangeDate$, sMsgWrongExchangeDate$, sMsgSellTooMuch$, sMsgConfirm$ 130cdf0e10cSrcweirPublic sMsgFreeStock$, sMsgTotalLoss$, sMsgEndDatebeforeNow$, sMsgStartDatebeforeEndDate$ 131cdf0e10cSrcweir 132cdf0e10cSrcweirPublic sOk$, sCancel$ 133cdf0e10cSrcweirPublic sMsgAuthorization$, sMsgDeleteAll$ 134cdf0e10cSrcweirPublic SellMethod$ 135cdf0e10cSrcweirPublic cSplit$ 136cdf0e10cSrcweirGlobal HistoryChartSource as String 137cdf0e10cSrcweirPublic DateCellStyle as String 138cdf0e10cSrcweirPublic CurrCellStyle as String 139cdf0e10cSrcweirPublic sStartDate$, sEndDate$, sHistory$ 140cdf0e10cSrcweirPublic sInsertStockname$ 141cdf0e10cSrcweirPublic sProductname$, sTitle$ 142cdf0e10cSrcweirPublic sInsertStocks$, sStockname$, sNoInternetUpdate$, sMarketplace$, sNoInternetDataAvailable$ 143cdf0e10cSrcweirPublic sCheckInternetSettings as String 144cdf0e10cSrcweir 145cdf0e10cSrcweirSub LoadLanguage() 146cdf0e10cSrcweir LoadDepotDialogs() 147cdf0e10cSrcweir Select Case sDocLanguage 148cdf0e10cSrcweir Case "de" 149cdf0e10cSrcweir LoadGermanLanguage() 150cdf0e10cSrcweir Case "en" 151cdf0e10cSrcweir LoadEnglishLanguage() 152cdf0e10cSrcweir Case "fr" 153cdf0e10cSrcweir LoadFrenchLanguage() 154cdf0e10cSrcweir Case "it" 155cdf0e10cSrcweir LoadItalianLanguage() 156cdf0e10cSrcweir Case "es" 157cdf0e10cSrcweir LoadSpanishLanguage() 158cdf0e10cSrcweir Case "sv" 159cdf0e10cSrcweir LoadSwedishLanguage() 160cdf0e10cSrcweir Case "ja" 161cdf0e10cSrcweir LoadJapaneseLanguage() 162cdf0e10cSrcweir Case "ko" 163cdf0e10cSrcweir LoadKoreanLanguage() 164cdf0e10cSrcweir Case "zh" 165cdf0e10cSrcweir If sDocCountry = "CN" Then 166cdf0e10cSrcweir LoadChineseSimpleLanguage() 167cdf0e10cSrcweir Else 168cdf0e10cSrcweir LoadChineseTradLanguage() 169cdf0e10cSrcweir End If 170cdf0e10cSrcweir End Select 171cdf0e10cSrcweir InitializeStartUpModel() 172cdf0e10cSrcweirEnd Sub 173cdf0e10cSrcweir 174cdf0e10cSrcweirSub CompleteMarketList() 175cdf0e10cSrcweirDim EuroIndex as Integer 176cdf0e10cSrcweirDim LocCountry as String 177cdf0e10cSrcweirDim LocLanguage as String 178cdf0e10cSrcweirDim sLangList() as String 179cdf0e10cSrcweirDim sCountryList() as String 180cdf0e10cSrcweirDim sExtensionList() as String 181cdf0e10cSrcweirDim MaxIndex as Integer 182cdf0e10cSrcweirDim bIsLocale as Boolean 183cdf0e10cSrcweir 184cdf0e10cSrcweir GlobListIndex = -1 185cdf0e10cSrcweir For n = 0 To 5 186cdf0e10cSrcweir LocLanguage = sMarket(n,6) 187cdf0e10cSrcweir LocCountry = sMarket(n,7) 188cdf0e10cSrcweir If Instr(1,LocLanguage,";",SBBINARY) = 0 Then 189cdf0e10cSrcweir bIsLocale = CheckDocLocale(LocLanguage, LocCountry) 190cdf0e10cSrcweir Else 191cdf0e10cSrcweir EuroIndex = 0 192cdf0e10cSrcweir sLangList() = ArrayoutofString(LocLanguage, ";", MaxIndex) 193cdf0e10cSrcweir sCountryList() = ArrayoutofString(LocCountry, ";", MaxIndex) 194cdf0e10cSrcweir sExtensionList() = ArrayoutofString(sMarket(n,8), ";", MaxIndex) 195cdf0e10cSrcweir For m = 0 To MaxIndex 196cdf0e10cSrcweir bIsLocale = CheckDocLocale(sLangList(m), sCountryList(m)) 197cdf0e10cSrcweir If bIsLocale Then 198cdf0e10cSrcweir EuroIndex = m 199cdf0e10cSrcweir Exit For 200cdf0e10cSrcweir End If 201cdf0e10cSrcweir Next m 202cdf0e10cSrcweir sMarket(n,6) = sLangList(EuroIndex) 203cdf0e10cSrcweir sMarket(n,7) = sCountryList(EuroIndex) 204cdf0e10cSrcweir sMarket(n,8) = sExtensionList(EuroIndex) 205cdf0e10cSrcweir End If 206cdf0e10cSrcweir If bIsLocale Then 207cdf0e10cSrcweir GlobListIndex = n 208cdf0e10cSrcweir Exit For 209cdf0e10cSrcweir End If 210cdf0e10cSrcweir Next n 211cdf0e10cSrcweirEnd Sub 212cdf0e10cSrcweir 213cdf0e10cSrcweirSub LocalizedCurrencies() 214cdf0e10cSrcweir If GlobListIndex = -1 Then 215cdf0e10cSrcweir sCountryMarket(0,0) = "Euro" 216cdf0e10cSrcweir sCountryMarket(0,1) = chr(8364) 217cdf0e10cSrcweir sCountryMarket(0,2) = "Paris" 218cdf0e10cSrcweir sCountryMarket(0,3) = "http://fr.finance.yahoo.com/d/quotes.csv?s=<StockID>.PA&f=s4l1t1c1ghov&e=.csv" 219cdf0e10cSrcweir sCountryMarket(0,5) = "Code" 220cdf0e10cSrcweir sCountryMarket(0,6) = "fr" 221cdf0e10cSrcweir sCountryMarket(0,7) = "FR" 222cdf0e10cSrcweir sCountryMarket(0,8) = "40C" 223cdf0e10cSrcweir sCountryMarket(0,9) = "59/9" 224cdf0e10cSrcweir sCountryMarket(0,10) = "1" 225cdf0e10cSrcweir 226cdf0e10cSrcweir sCountryMarket(1,0) = "Euro" 227cdf0e10cSrcweir sCountryMarket(1,1) = chr(8364) 228cdf0e10cSrcweir sCountryMarket(1,2) = "Milano" 229cdf0e10cSrcweir sCountryMarket(1,3) = "http://it.finance.yahoo.com/d/quotes.csv?s=<StockID>.MI&f=sl1d1t1c1ohgv&e=.csv" 230cdf0e10cSrcweir sCountryMarket(1,5) = "Codice" 231cdf0e10cSrcweir sCountryMarket(1,6) = "it" 232cdf0e10cSrcweir sCountryMarket(1,7) = "IT" 233cdf0e10cSrcweir sCountryMarket(1,8) = "410" 234cdf0e10cSrcweir sCountryMarket(1,9) = "44" 235cdf0e10cSrcweir sCountryMarket(1,10) = "1" 236cdf0e10cSrcweir 237cdf0e10cSrcweir sCountryMarket(2,0) = "Euro" 238cdf0e10cSrcweir sCountryMarket(2,1) = chr(8364) 239cdf0e10cSrcweir sCountryMarket(2,2) = "Madrid" 240cdf0e10cSrcweir sCountryMarket(2,3) = "http://es.finance.yahoo.com/d/quotes.csv?s=<StockID>&m=MC&f=sl1d1t1c1ohgv&e=.csv" 241cdf0e10cSrcweir sCountryMarket(2,5) = "Simbolo" 242cdf0e10cSrcweir sCountryMarket(2,6) = "es" 243cdf0e10cSrcweir sCountryMarket(2,7) = "ES" 244cdf0e10cSrcweir sCountryMarket(2,8) = "40A" 245cdf0e10cSrcweir sCountryMarket(2,9) = "44" 246cdf0e10cSrcweir sCountryMarket(2,10) = "1" 247cdf0e10cSrcweir 248cdf0e10cSrcweir sCountryMarket(3,0) = "Dansk krone" 249cdf0e10cSrcweir sCountryMarket(3,1) = "kr" 250cdf0e10cSrcweir sCountryMarket(3,2) = "København" 251cdf0e10cSrcweir sCountryMarket(3,3) = "http://dk.finance.yahoo.com/d/quotes.csv?s=<StockID.CO&f=sl1d1t1c1ohgv&e=.csv" 252cdf0e10cSrcweir sCountryMarket(3,5) = "Aktiesymbol" 253cdf0e10cSrcweir sCountryMarket(3,6) = "da" 254cdf0e10cSrcweir sCountryMarket(3,7) = "DK" 255cdf0e10cSrcweir sCountryMarket(3,8) = "406" 256cdf0e10cSrcweir sCountryMarket(3,9) = "44" 257cdf0e10cSrcweir sCountryMarket(3,10) = "1" 258cdf0e10cSrcweir 259cdf0e10cSrcweir sCountryMarket(4,0) = "Svensk krona" 260cdf0e10cSrcweir sCountryMarket(4,1) = "kr" 261cdf0e10cSrcweir sCountryMarket(4,2) = "Stockholm" 262cdf0e10cSrcweir sCountryMarket(4,3) = "http://se.finance.yahoo.com/d/quotes.csv?s=<StockID>.L&f=sl1d1t1c1ohgv&e=.c" 263cdf0e10cSrcweir sCountryMarket(4,5) = "Kod" 264cdf0e10cSrcweir sCountryMarket(4,6) = "sv" 265cdf0e10cSrcweir sCountryMarket(4,7) = "SE" 266cdf0e10cSrcweir sCountryMarket(4,8) = "41D" 267cdf0e10cSrcweir sCountryMarket(4,9) = "44" 268cdf0e10cSrcweir sCountryMarket(4,10) = "1" 269cdf0e10cSrcweir 270cdf0e10cSrcweir ' Taiwan Dollar 271cdf0e10cSrcweir sCountryMarket(5,0) = "新臺幣" 272cdf0e10cSrcweir sCountryMarket(5,1) = "¥" 273cdf0e10cSrcweir sCountryMarket(5,2) = "代號" 274cdf0e10cSrcweir sCountryMarket(5,3) = "http://tw.finance.yahoo.com/d/quotes.csv?s=<StockID>.TW&f=sl1d1t1c1ohgv&e=.csv" 275cdf0e10cSrcweir sCountryMarket(5,5) = "代號" 276cdf0e10cSrcweir sCountryMarket(5,6) = "zh" 277cdf0e10cSrcweir sCountryMarket(5,7) = "TW" 278cdf0e10cSrcweir sCountryMarket(5,8) = "404" 279cdf0e10cSrcweir sCountryMarket(5,9) = "44" 280cdf0e10cSrcweir sCountryMarket(5,10) = "1" 281cdf0e10cSrcweir 282cdf0e10cSrcweir ' Chinese Yuan 283cdf0e10cSrcweir sCountryMarket(6,0) = "人民币" 284cdf0e10cSrcweir sCountryMarket(6,1) = "¥" 285cdf0e10cSrcweir sCountryMarket(6,2) = "代号" 286cdf0e10cSrcweir sCountryMarket(6,3) = "http://cn.finance.yahoo.com/d/quotes.csv?s=<StockID>.SS&f=sl1d1t1c1ohgv&e=.csv" 287cdf0e10cSrcweir sCountryMarket(6,5) = "代号" 288cdf0e10cSrcweir sCountryMarket(6,6) = "zh" 289cdf0e10cSrcweir sCountryMarket(6,7) = "CN" 290cdf0e10cSrcweir sCountryMarket(6,8) = "804" 291cdf0e10cSrcweir sCountryMarket(6,9) = "44" 292cdf0e10cSrcweir sCountryMarket(6,10) = "1" 293cdf0e10cSrcweir 294cdf0e10cSrcweir ' korean Won 295cdf0e10cSrcweir sCountryMarket(7,0) = "한국 원화" 296cdf0e10cSrcweir sCountryMarket(7,1) = "₩" 297cdf0e10cSrcweir sCountryMarket(7,2) = "서울" 298cdf0e10cSrcweir sCountryMarket(7,3) = "http://kr.finance.yahoo.com/d/quotes.csv?s=<StockID>.KS&f=snl1d1t1c1ohgv&e=.csv" 299cdf0e10cSrcweir sCountryMarket(7,5) = "종목 코드" 300cdf0e10cSrcweir sCountryMarket(7,6) = "ko" 301cdf0e10cSrcweir sCountryMarket(7,7) = "KR" 302cdf0e10cSrcweir sCountryMarket(7,8) = "412" 303cdf0e10cSrcweir sCountryMarket(7,9) = "44" 304cdf0e10cSrcweir sCountryMarket(7,10) = "2" 305cdf0e10cSrcweir 306cdf0e10cSrcweir 307cdf0e10cSrcweir' sCountryMarket(5,0) = "Российский рубль" 308cdf0e10cSrcweir' sCountryMarket(5,1) = "р." 309cdf0e10cSrcweir' sCountryMarket(5,2) = "" 310cdf0e10cSrcweir' sCountryMarket(5,3) = "" 311cdf0e10cSrcweir' sCountryMarket(5,5) = "" 312cdf0e10cSrcweir' sCountryMarket(5,6) = "ru" 313cdf0e10cSrcweir' sCountryMarket(5,7) = "RU" 314cdf0e10cSrcweir' sCountryMarket(5,8) = "-419" 315cdf0e10cSrcweir' sCountryMarket(5,9) = "" 316cdf0e10cSrcweir' 317cdf0e10cSrcweir' sCountryMarket(6,0) = "Złoty polski" 318cdf0e10cSrcweir' sCountryMarket(6,1) = "zł" 319cdf0e10cSrcweir' sCountryMarket(6,2) = "" 320cdf0e10cSrcweir' sCountryMarket(6,3) = "" 321cdf0e10cSrcweir' sCountryMarket(6,5) = "" 'Still Todo!! 322cdf0e10cSrcweir' sCountryMarket(6,6) = "pl" 323cdf0e10cSrcweir' sCountryMarket(6,7) = "PL" 324cdf0e10cSrcweir' sCountryMarket(6,8) = "-415" 325cdf0e10cSrcweir' sCountryMarket(6,9) = "" 326cdf0e10cSrcweir' 327cdf0e10cSrcweir' sCountryMarket(7,0) = "Türkische Lira" 328cdf0e10cSrcweir' sCountryMarket(7,1) = "TL" 329cdf0e10cSrcweir' sCountryMarket(7,2) = "" 330cdf0e10cSrcweir' sCountryMarket(7,3) = "" 331cdf0e10cSrcweir' sCountryMarket(7,5) = "" 'Still Todo!! 332cdf0e10cSrcweir' sCountryMarket(7,6) = "tr" 333cdf0e10cSrcweir' sCountryMarket(7,7) = "TR" 334cdf0e10cSrcweir' sCountryMarket(7,8) = "-41F" 335cdf0e10cSrcweir' sCountryMarket(7,9) = "" 336cdf0e10cSrcweir 337cdf0e10cSrcweir Dim n as Integer 338cdf0e10cSrcweir Dim m as Integer 339cdf0e10cSrcweir' Dim sCountryMarket(6,9) as String 340cdf0e10cSrcweir 341cdf0e10cSrcweir For n = 0 To Ubound(sCountryMarket(),1) 342cdf0e10cSrcweir If sDocLanguage = sCountryMarket(n,6) and sDocCountry = sCountryMarket(n,7) Then 343cdf0e10cSrcweir GlobListIndex = 6 344cdf0e10cSrcweir For m = 0 To 10 345cdf0e10cSrcweir sMarket(6,m) = sCountryMarket(n,m) 346cdf0e10cSrcweir Next m 347cdf0e10cSrcweir Exit For 348cdf0e10cSrcweir End If 349cdf0e10cSrcweir Next n 350cdf0e10cSrcweir End If 351cdf0e10cSrcweirEnd Sub 352cdf0e10cSrcweir 353cdf0e10cSrcweirSub LoadDepotDialogs() 354cdf0e10cSrcweir DlgTransaction = LoadDialog("Depot", "Dialog2") 355cdf0e10cSrcweir DlgStockRates = LoadDialog("Depot", "Dialog3") 356cdf0e10cSrcweir DlgStartUp = LoadDialog("Depot", "Dialog4") 357cdf0e10cSrcweir TransactModel = DlgTransaction.Model 358cdf0e10cSrcweir StockRatesModel = DlgStockRates.Model 359cdf0e10cSrcweir StartUpModel = DlgStartUp.Model 360cdf0e10cSrcweirEnd Sub 361cdf0e10cSrcweir 362cdf0e10cSrcweir 363cdf0e10cSrcweirSub InitializeStartUpModel() 364cdf0e10cSrcweir With StartUpModel 365cdf0e10cSrcweir .lblWelcome.Label = sStartupWelcome & Chr(13) & chr(13) & sStartUpChooseMarket 366cdf0e10cSrcweir sStartUpHint = ReplaceString(sStartUpHint, sHistory, "<History>") 367cdf0e10cSrcweir .lblHint.Label = sStartupHint 368cdf0e10cSrcweir' .cmdGoOn.Enabled = Ubound(StartUpModel.lstMarkets.SelectedItems()) <> -1 369cdf0e10cSrcweir .cmdGoOn.Label = sOK 370cdf0e10cSrcweir .cmdCancel.Label = sCancel 371cdf0e10cSrcweir End With 3723e02b54dSAndrew RistEnd Sub</script:module> 373