Init.xba (3e02b54d) Init.xba (79ff0626)
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
3<!--***********************************************************
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
3<!--***********************************************************
4 *
4 *
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License. You may obtain a copy of the License at
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License. You may obtain a copy of the License at
12 *
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
14 *
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied. See the License for the
19 * specific language governing permissions and limitations
20 * under the License.
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied. See the License for the
19 * specific language governing permissions and limitations
20 * under the License.
21 *
21 *
22 ***********************************************************-->
23<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Init" script:language="StarBasic">Option Explicit
22 ***********************************************************-->
23<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Init" script:language="StarBasic">Option Explicit
24REM ***** BASIC *****
24REM ***** BASIC *****
25
25
26
27
28Public Const SBRANGEUBOUND = 20
29Public StyleRangeAssignmentList(SBRANGEUBOUND)as String
30Public SelRangeList(SBRANGEUBOUND) as String
31Public RangeList(SBRANGEUBOUND) as String
32Public UnprotectList() as String
33Public FilterNames(2,1) as String
34Public bDoUnProtect as Boolean
35Public bCancelTask as Boolean

--- 176 unchanged lines hidden (view full) ---

212 sCurrFINNISH = GetResText(1510)
213 sCurrGREEK = GetResText(1511)
214 sCurrSLOVENIAN = GetResText(1512)
215 sCurrCYPRIOT = GetResText(1513)
216 sCurrMALTESE = GetResText(1514)
217 sCurrSLOVAK = GetResText(1515)
218 sCurrUNKNOWN = GetResText(1516)
219 sCurrSYSUNKNOWN = GetResText(1517)
26Public Const SBRANGEUBOUND = 20
27Public StyleRangeAssignmentList(SBRANGEUBOUND)as String
28Public SelRangeList(SBRANGEUBOUND) as String
29Public RangeList(SBRANGEUBOUND) as String
30Public UnprotectList() as String
31Public FilterNames(2,1) as String
32Public bDoUnProtect as Boolean
33Public bCancelTask as Boolean

--- 176 unchanged lines hidden (view full) ---

210 sCurrFINNISH = GetResText(1510)
211 sCurrGREEK = GetResText(1511)
212 sCurrSLOVENIAN = GetResText(1512)
213 sCurrCYPRIOT = GetResText(1513)
214 sCurrMALTESE = GetResText(1514)
215 sCurrSLOVAK = GetResText(1515)
216 sCurrUNKNOWN = GetResText(1516)
217 sCurrSYSUNKNOWN = GetResText(1517)
220 .cmdCancel.Label = sCANCEL
221 .cmdHelp.Label = sHELP
222 .cmdBack.Label = GetResText(1002)
223 .cmdGoOn.Label = sGOON
224 .lblHint.Label = GetResText(1004)
218 .cmdCancel.Label = sCANCEL
219 .cmdHelp.Label = sHELP
220 .cmdBack.Label = GetResText(1002)
221 .cmdGoOn.Label = sGOON
222 .lblHint.Label = GetResText(1004)
225 .lblCurrencies.Label = GetResText(1006)
223 .lblCurrencies.Label = GetResText(1006)
226 .cmdBack.Enabled = False
224 .cmdBack.Enabled = False
227 If .Step = 1 Then
228 .chkComplete.Label = GetResText(1100)
229 .hlnSelection.Label = GetResText(1101)
230 .optCellTemplates.Label = GetResText(1102)
231 .optSheetRanges.Label = GetResText(1103)
232 .optDocRanges.Label = GetResText(1104)
233 .optSelRange.Label = GetResText(1105)
234 sCURRRANGES = GetResText(1108)
235 .lblSelection.Label = sCURRRANGES
236 Else
237 .lblProgress.Label = sStsPROGRESS
238 .hlnExtent.Label = GetResText(1200)
225 If .Step = 1 Then
226 .chkComplete.Label = GetResText(1100)
227 .hlnSelection.Label = GetResText(1101)
228 .optCellTemplates.Label = GetResText(1102)
229 .optSheetRanges.Label = GetResText(1103)
230 .optDocRanges.Label = GetResText(1104)
231 .optSelRange.Label = GetResText(1105)
232 sCURRRANGES = GetResText(1108)
233 .lblSelection.Label = sCURRRANGES
234 Else
235 .lblProgress.Label = sStsPROGRESS
236 .hlnExtent.Label = GetResText(1200)
239 .optSingleFile.Label = GetResText(1201)
237 .optSingleFile.Label = GetResText(1201)
240 .optWholeDir.Label = GetResText(1202)
241 .chkProtect.Label = GetResText(1207)
238 .optWholeDir.Label = GetResText(1202)
239 .chkProtect.Label = GetResText(1207)
242 .chkTextDocuments.Label = GetResText(1210)
240 .chkTextDocuments.Label = GetResText(1210)
243
244 sSOURCEFILE = GetResText(1203)
245 sSOURCEDIR = GetResText(1204)
246 .lblSource.Label = sSOURCEDIR
247 sInclusiveSubDir = GetResText(1205)
248 .chkRecursive.Label = sInclusiveSubDir
249 sTARGETDIR = GetResText(1206)
241
242 sSOURCEFILE = GetResText(1203)
243 sSOURCEDIR = GetResText(1204)
244 .lblSource.Label = sSOURCEDIR
245 sInclusiveSubDir = GetResText(1205)
246 .chkRecursive.Label = sInclusiveSubDir
247 sTARGETDIR = GetResText(1206)
250 .lblTarget.Label = STARGETDIR
251
248 .lblTarget.Label = STARGETDIR
249
252 LocWorkPath = GetPathSettings(&quot;Work&quot;)
253 If Not oUcb.Exists(LocWorkPath) Then
254 ShowNoOfficePathError()
255 Stop
256 End If
257
258 .txtSource.Text = ConvertfromUrl(LocWorkPath)
250 LocWorkPath = GetPathSettings(&quot;Work&quot;)
251 If Not oUcb.Exists(LocWorkPath) Then
252 ShowNoOfficePathError()
253 Stop
254 End If
255
256 .txtSource.Text = ConvertfromUrl(LocWorkPath)
259
257
260 SubstDir = .txtSource.Text
261 .txtTarget.Text = .txtSource.Text
262 .hlnProgress.Label = GetResText(1600)
263 .lblConfig.Label = GetResText(1603)
264 sPrgsRETRIEVAL = GetResText(1601)
265 sPrgsCONVERTING = GetResText(1602)
266 sPrgsUNPROTECT = GetResText(1604)
267 End If

--- 17 unchanged lines hidden (view full) ---

285 LangIDValue(2,0,0) = &quot;fr&quot;
286 LangIDValue(2,0,1) = &quot;&quot;
287 LangIDValue(2,0,2) = &quot;-40C&quot;
288
289&apos; CURRENCIES_SPANISH
290 LangIDValue(3,0,0) = &quot;es&quot;
291 LangIDValue(3,0,1) = &quot;&quot;
292 LangIDValue(3,0,2) = &quot;-40A&quot;
258 SubstDir = .txtSource.Text
259 .txtTarget.Text = .txtSource.Text
260 .hlnProgress.Label = GetResText(1600)
261 .lblConfig.Label = GetResText(1603)
262 sPrgsRETRIEVAL = GetResText(1601)
263 sPrgsCONVERTING = GetResText(1602)
264 sPrgsUNPROTECT = GetResText(1604)
265 End If

--- 17 unchanged lines hidden (view full) ---

283 LangIDValue(2,0,0) = &quot;fr&quot;
284 LangIDValue(2,0,1) = &quot;&quot;
285 LangIDValue(2,0,2) = &quot;-40C&quot;
286
287&apos; CURRENCIES_SPANISH
288 LangIDValue(3,0,0) = &quot;es&quot;
289 LangIDValue(3,0,1) = &quot;&quot;
290 LangIDValue(3,0,2) = &quot;-40A&quot;
293
291
294 &apos;Spanish modern
295 LangIDValue(3,1,0) = &quot;es&quot;
296 LangIDValue(3,1,1) = &quot;&quot;
297 LangIDValue(3,1,2) = &quot;-C0A&quot;
298
299 &apos;Spanish katalanic
300 LangIDValue(3,2,0) = &quot;es&quot;
301 LangIDValue(3,2,1) = &quot;&quot;

--- 26 unchanged lines hidden (view full) ---

328 LangIDValue(7,1,0) = &quot;ga&quot;
329 LangIDValue(7,1,1) = &quot;IE&quot;
330 LangIDValue(7,1,2) = &quot;-83C&quot;
331
332&apos; CURRENCIES_LUXEMBOURG
333 LangIDValue(8,0,0) = &quot;fr&quot;
334 LangIDValue(8,0,1) = &quot;LU&quot;
335 LangIDValue(8,0,2) = &quot;-140C&quot;
292 &apos;Spanish modern
293 LangIDValue(3,1,0) = &quot;es&quot;
294 LangIDValue(3,1,1) = &quot;&quot;
295 LangIDValue(3,1,2) = &quot;-C0A&quot;
296
297 &apos;Spanish katalanic
298 LangIDValue(3,2,0) = &quot;es&quot;
299 LangIDValue(3,2,1) = &quot;&quot;

--- 26 unchanged lines hidden (view full) ---

326 LangIDValue(7,1,0) = &quot;ga&quot;
327 LangIDValue(7,1,1) = &quot;IE&quot;
328 LangIDValue(7,1,2) = &quot;-83C&quot;
329
330&apos; CURRENCIES_LUXEMBOURG
331 LangIDValue(8,0,0) = &quot;fr&quot;
332 LangIDValue(8,0,1) = &quot;LU&quot;
333 LangIDValue(8,0,2) = &quot;-140C&quot;
336
334
337 LangIDValue(8,1,0) = &quot;de&quot;
338 LangIDValue(8,1,1) = &quot;LU&quot;
339 LangIDValue(8,1,2) = &quot;-1007&quot;
340
341&apos; CURRENCIES_AUSTRIAN
342 LangIDValue(9,0,0) = &quot;de&quot;
343 LangIDValue(9,0,1) = &quot;AT&quot;
344 LangIDValue(9,0,2) = &quot;-C07&quot;

--- 194 unchanged lines hidden (view full) ---

539Sub InitializeControls()
540 If CurrIndex = -1 Then
541 If DialogModel.Step = 1 Then
542 EnableStep1DialogControls(True, False, False)
543 ElseIf DialogModel.Step = 2 Then
544 EnableStep2DialogControls(True)
545 End If
546 End If
335 LangIDValue(8,1,0) = &quot;de&quot;
336 LangIDValue(8,1,1) = &quot;LU&quot;
337 LangIDValue(8,1,2) = &quot;-1007&quot;
338
339&apos; CURRENCIES_AUSTRIAN
340 LangIDValue(9,0,0) = &quot;de&quot;
341 LangIDValue(9,0,1) = &quot;AT&quot;
342 LangIDValue(9,0,2) = &quot;-C07&quot;

--- 194 unchanged lines hidden (view full) ---

537Sub InitializeControls()
538 If CurrIndex = -1 Then
539 If DialogModel.Step = 1 Then
540 EnableStep1DialogControls(True, False, False)
541 ElseIf DialogModel.Step = 2 Then
542 EnableStep2DialogControls(True)
543 End If
544 End If
547End Sub
545End Sub
548
549
550Sub InitializeConverter(oLocale, iDialogPage as Integer)
551Dim Isthere as Boolean
552 bCancelProtection = False
553 bRangeListDefined = False
554 PWIndex = -1
555 If iDialogPage = 1 Then
556 ToggleWindow(False)
557 sDocType = Tools.GetDocumentType(ThisComponent)
558 If sDocType = &quot;sCalc&quot; Then
559 bDocHasProtectedSheets = CheckSheetProtection(oSheets)
560 End If
546
547
548Sub InitializeConverter(oLocale, iDialogPage as Integer)
549Dim Isthere as Boolean
550 bCancelProtection = False
551 bRangeListDefined = False
552 PWIndex = -1
553 If iDialogPage = 1 Then
554 ToggleWindow(False)
555 sDocType = Tools.GetDocumentType(ThisComponent)
556 If sDocType = &quot;sCalc&quot; Then
557 bDocHasProtectedSheets = CheckSheetProtection(oSheets)
558 End If
561 oStatusline = ThisComponent.GetCurrentController.GetFrame.CreateStatusIndicator()
559 oStatusline = ThisComponent.GetCurrentController.GetFrame.CreateStatusIndicator()
562 End If
563 DialogConvert = LoadDialog(&quot;Euro&quot;, &quot;DlgConvert&quot;)
564 DialogModel = DialogConvert.Model
565 DialogPassword = LoadDialog(&quot;Euro&quot;, &quot;DlgPassword&quot;)
566 PasswordModel = DialogPassword.Model
567 DialogModel.Step = iDialogPage
568 InitializeResources()
569 InitializeLanguages()
570 InitializeLocales(oLocale)
571 InitializeCurrencies()
572 InitializeControls()
573 BitmapDir = GetOfficeSubPath(&quot;Template&quot;, &quot;../wizard/bitmap&quot;)
574 If BitmapDir = &quot;&quot; Then
575 Stop
576 End If
577 FillUpCurrencyListbox()
560 End If
561 DialogConvert = LoadDialog(&quot;Euro&quot;, &quot;DlgConvert&quot;)
562 DialogModel = DialogConvert.Model
563 DialogPassword = LoadDialog(&quot;Euro&quot;, &quot;DlgPassword&quot;)
564 PasswordModel = DialogPassword.Model
565 DialogModel.Step = iDialogPage
566 InitializeResources()
567 InitializeLanguages()
568 InitializeLocales(oLocale)
569 InitializeCurrencies()
570 InitializeControls()
571 BitmapDir = GetOfficeSubPath(&quot;Template&quot;, &quot;../wizard/bitmap&quot;)
572 If BitmapDir = &quot;&quot; Then
573 Stop
574 End If
575 FillUpCurrencyListbox()
578 DialogModel.imgPreview.ImageUrl = BitmapDir &amp; &quot;euro_&quot; &amp; DialogModel.Step &amp; &quot;.bmp&quot;
576 DialogModel.imgPreview.ImageUrl = BitmapDir &amp; &quot;euro_&quot; &amp; DialogModel.Step &amp; &quot;.png&quot;
579 DialogConvert.Title = sMsgDLGTITLE
577 DialogConvert.Title = sMsgDLGTITLE
580 DialogModel.cmdGoOn.DefaultButton = True
578 DialogModel.cmdGoOn.DefaultButton = True
581 If iDialogPage = 1 Then
582 ToggleWindow(True)
583 End If
584End Sub
585
586
587Sub InitializeCurrencyValues(CurrIndex)
588 If CurrIndex &lt;&gt; -1 Then
589 CurrLanguage = CurrValue(CurrIndex,0)
590 CurrFactor = CurrValue(CurrIndex,1)
591 CurrSymbolList(0) = CurrValue(CurrIndex,3)
592 CurrSymbolList(1) = CurrValue(CurrIndex,4)
593 CurrSymbolList(2) = CurrValue(CurrIndex,5)
594 End If
579 If iDialogPage = 1 Then
580 ToggleWindow(True)
581 End If
582End Sub
583
584
585Sub InitializeCurrencyValues(CurrIndex)
586 If CurrIndex &lt;&gt; -1 Then
587 CurrLanguage = CurrValue(CurrIndex,0)
588 CurrFactor = CurrValue(CurrIndex,1)
589 CurrSymbolList(0) = CurrValue(CurrIndex,3)
590 CurrSymbolList(1) = CurrValue(CurrIndex,4)
591 CurrSymbolList(2) = CurrValue(CurrIndex,5)
592 End If
595End Sub
593End Sub
596
597
598Function InitializeLocales(oLocale) as Boolean
599Dim i as Integer, n as Integer, m as Integer
600Dim sLanguage as String, sCountry as String
601Dim bTakeThisLocale as Boolean
602 sLanguage = oLocale.Language
603 sCountry = oLocale.Country

--- 21 unchanged lines hidden ---
594
595
596Function InitializeLocales(oLocale) as Boolean
597Dim i as Integer, n as Integer, m as Integer
598Dim sLanguage as String, sCountry as String
599Dim bTakeThisLocale as Boolean
600 sLanguage = oLocale.Language
601 sCountry = oLocale.Country

--- 21 unchanged lines hidden ---