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