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