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