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("Work") 253 If Not oUcb.Exists(LocWorkPath) Then 254 ShowNoOfficePathError() 255 Stop 256 End If 257 258 .txtSource.Text = ConvertfromUrl(LocWorkPath) | 250 LocWorkPath = GetPathSettings("Work") 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) = "fr" 286 LangIDValue(2,0,1) = "" 287 LangIDValue(2,0,2) = "-40C" 288 289' CURRENCIES_SPANISH 290 LangIDValue(3,0,0) = "es" 291 LangIDValue(3,0,1) = "" 292 LangIDValue(3,0,2) = "-40A" | 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) = "fr" 284 LangIDValue(2,0,1) = "" 285 LangIDValue(2,0,2) = "-40C" 286 287' CURRENCIES_SPANISH 288 LangIDValue(3,0,0) = "es" 289 LangIDValue(3,0,1) = "" 290 LangIDValue(3,0,2) = "-40A" |
293 | 291 |
294 'Spanish modern 295 LangIDValue(3,1,0) = "es" 296 LangIDValue(3,1,1) = "" 297 LangIDValue(3,1,2) = "-C0A" 298 299 'Spanish katalanic 300 LangIDValue(3,2,0) = "es" 301 LangIDValue(3,2,1) = "" --- 26 unchanged lines hidden (view full) --- 328 LangIDValue(7,1,0) = "ga" 329 LangIDValue(7,1,1) = "IE" 330 LangIDValue(7,1,2) = "-83C" 331 332' CURRENCIES_LUXEMBOURG 333 LangIDValue(8,0,0) = "fr" 334 LangIDValue(8,0,1) = "LU" 335 LangIDValue(8,0,2) = "-140C" | 292 'Spanish modern 293 LangIDValue(3,1,0) = "es" 294 LangIDValue(3,1,1) = "" 295 LangIDValue(3,1,2) = "-C0A" 296 297 'Spanish katalanic 298 LangIDValue(3,2,0) = "es" 299 LangIDValue(3,2,1) = "" --- 26 unchanged lines hidden (view full) --- 326 LangIDValue(7,1,0) = "ga" 327 LangIDValue(7,1,1) = "IE" 328 LangIDValue(7,1,2) = "-83C" 329 330' CURRENCIES_LUXEMBOURG 331 LangIDValue(8,0,0) = "fr" 332 LangIDValue(8,0,1) = "LU" 333 LangIDValue(8,0,2) = "-140C" |
336 | 334 |
337 LangIDValue(8,1,0) = "de" 338 LangIDValue(8,1,1) = "LU" 339 LangIDValue(8,1,2) = "-1007" 340 341' CURRENCIES_AUSTRIAN 342 LangIDValue(9,0,0) = "de" 343 LangIDValue(9,0,1) = "AT" 344 LangIDValue(9,0,2) = "-C07" --- 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) = "de" 336 LangIDValue(8,1,1) = "LU" 337 LangIDValue(8,1,2) = "-1007" 338 339' CURRENCIES_AUSTRIAN 340 LangIDValue(9,0,0) = "de" 341 LangIDValue(9,0,1) = "AT" 342 LangIDValue(9,0,2) = "-C07" --- 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 = "sCalc" 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 = "sCalc" 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("Euro", "DlgConvert") 564 DialogModel = DialogConvert.Model 565 DialogPassword = LoadDialog("Euro", "DlgPassword") 566 PasswordModel = DialogPassword.Model 567 DialogModel.Step = iDialogPage 568 InitializeResources() 569 InitializeLanguages() 570 InitializeLocales(oLocale) 571 InitializeCurrencies() 572 InitializeControls() 573 BitmapDir = GetOfficeSubPath("Template", "../wizard/bitmap") 574 If BitmapDir = "" Then 575 Stop 576 End If 577 FillUpCurrencyListbox() | 560 End If 561 DialogConvert = LoadDialog("Euro", "DlgConvert") 562 DialogModel = DialogConvert.Model 563 DialogPassword = LoadDialog("Euro", "DlgPassword") 564 PasswordModel = DialogPassword.Model 565 DialogModel.Step = iDialogPage 566 InitializeResources() 567 InitializeLanguages() 568 InitializeLocales(oLocale) 569 InitializeCurrencies() 570 InitializeControls() 571 BitmapDir = GetOfficeSubPath("Template", "../wizard/bitmap") 572 If BitmapDir = "" Then 573 Stop 574 End If 575 FillUpCurrencyListbox() |
578 DialogModel.imgPreview.ImageUrl = BitmapDir & "euro_" & DialogModel.Step & ".bmp" | 576 DialogModel.imgPreview.ImageUrl = BitmapDir & "euro_" & DialogModel.Step & ".png" |
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 <> -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 <> -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 --- |