mirror of
https://github.com/kekingcn/kkFileView.git
synced 2026-04-20 04:48:38 +00:00
集成OpenOffice替换为LibreOffice
This commit is contained in:
@@ -1,29 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
||||
<!--***********************************************************
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
***********************************************************-->
|
||||
<!--
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed
|
||||
* with this work for additional information regarding copyright
|
||||
* ownership. The ASF licenses this file to you under the Apache
|
||||
* License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
-->
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Init" script:language="StarBasic">Option Explicit
|
||||
REM ***** BASIC *****
|
||||
|
||||
|
||||
REM ***** BASIC *****
|
||||
|
||||
Public Const SBRANGEUBOUND = 20
|
||||
Public StyleRangeAssignmentList(SBRANGEUBOUND)as String
|
||||
@@ -91,15 +86,16 @@ Public sCurrSLOVENIAN as String
|
||||
Public sCurrCYPRIOT as String
|
||||
Public sCurrMALTESE as String
|
||||
Public sCurrSLOVAK as String
|
||||
Public sCurrUNKNOWN as String
|
||||
Public sCurrSYSUNKNOWN as String
|
||||
Public sCurrESTONIAN as String
|
||||
Public sCurrLATVIAN as String
|
||||
Public sCurrLITHUANIAN as String
|
||||
|
||||
Public sPrgsRETRIEVAL as String
|
||||
Public sPrgsCONVERTING as String
|
||||
Public sPrgsUNPROTECT as String
|
||||
Public sInclusiveSubDir as String
|
||||
|
||||
Public Const SBCOUNTRYCOUNT = 15
|
||||
Public Const SBCOUNTRYCOUNT = 19
|
||||
Public CurMimeType as String
|
||||
Public CurCellCount as Long
|
||||
Public oSheets as Object
|
||||
@@ -135,8 +131,8 @@ Public CurExtension(2) as String
|
||||
Public Currfactor as Double
|
||||
Public CurrSymbolList(2) as String
|
||||
Public CurrLanguage as String
|
||||
Public CurrValue(15,5)
|
||||
Public LangIDValue(15,2,2) as String
|
||||
Public CurrValue(18,5)
|
||||
Public LangIDValue(18,2,2) as String
|
||||
Public PreName as String
|
||||
Public Separator as String
|
||||
Public BitmapDir as String
|
||||
@@ -160,94 +156,95 @@ Sub InitializeResources()
|
||||
Dim LocWorkPath as String
|
||||
With DialogModel
|
||||
' Strings that are also needed by the Password Dialog
|
||||
sGoOn = GetResText(1003)
|
||||
sHelp = GetResText(1001)
|
||||
sCANCEL = GetResText(1418)
|
||||
sEnd = GetResText(1000)
|
||||
sPROTECT = GetResText(1005)
|
||||
sCONTINUE = GetResText(1007)
|
||||
sSELTEMPL = GetResText(1106)
|
||||
sSELCELL = GetResText(1107)
|
||||
sCURRRANGES = GetResText(1108)
|
||||
sTEMPLATES = GetResText(1109)
|
||||
sStsPROGRESS = GetResText(1300)
|
||||
sStsCELLPROGRSS = GetResText(1301)
|
||||
sStsRELSHEETRANGES = GetResText(1302)
|
||||
sStsRELRANGES = GetResText(1303)
|
||||
sStsREPROTECT = GetResText(1304)
|
||||
sREADY = GetResText(1400)
|
||||
sMsgSELDIR = GetResText(1401)
|
||||
sMsgSELFILE = GetResText(1402)
|
||||
sMsgTARGETDIR = GetResText(1403)
|
||||
sMsgNOTTHERE = GetResText(1404)
|
||||
sMsgDLGTITLE = GetResText(1405)
|
||||
sMsgUNPROTECT = GetResText(1406)
|
||||
sMsgPWPROTECT = GetResText(1407)
|
||||
sMsgWRONGPW = GetResText(1408)
|
||||
sMsgSHEETPROTECTED = GetResText(1409)
|
||||
sMsgWARNING = GetResText(1410)
|
||||
sMsgSHEETSNOPROTECT = GetResText(1411)
|
||||
sMsgSHEETNOPROTECT = GetResText(1412)
|
||||
sMsgCHOOSECURRENCY = GetResText(1415)
|
||||
sMsgPASSWORD = GetResText(1416)
|
||||
sMsgOK = GetResText(1417)
|
||||
sMsgCANCEL = GetResText(1418)
|
||||
sMsgFILEINVALID = GetResText(1419)
|
||||
sGoOn = GetResText("STEP_ZERO_3")
|
||||
sHelp = GetResText("STEP_ZERO_1")
|
||||
sCANCEL = GetResText("MESSAGES_18")
|
||||
sEnd = GetResText("STEP_ZERO_0")
|
||||
sPROTECT = GetResText("STEP_ZERO_5")
|
||||
sCONTINUE = GetResText("STEP_ZERO_7")
|
||||
sSELTEMPL = GetResText("STEP_CONVERTER_6")
|
||||
sSELCELL = GetResText("STEP_CONVERTER_7")
|
||||
sCURRRANGES = GetResText("STEP_CONVERTER_8")
|
||||
sTEMPLATES = GetResText("STEP_CONVERTER_9")
|
||||
sStsPROGRESS = GetResText("STATUSLINE_0")
|
||||
sStsCELLPROGRSS = GetResText("STATUSLINE_1")
|
||||
sStsRELSHEETRANGES = GetResText("STATUSLINE_2")
|
||||
sStsRELRANGES = GetResText("STATUSLINE_3")
|
||||
sStsREPROTECT = GetResText("STATUSLINE_4")
|
||||
sREADY = GetResText("MESSAGES_0")
|
||||
sMsgSELDIR = GetResText("MESSAGES_1")
|
||||
sMsgSELFILE = GetResText("MESSAGES_2")
|
||||
sMsgTARGETDIR = GetResText("MESSAGES_3")
|
||||
sMsgNOTTHERE = GetResText("MESSAGES_4")
|
||||
sMsgDLGTITLE = GetResText("MESSAGES_5")
|
||||
sMsgUNPROTECT = GetResText("MESSAGES_6")
|
||||
sMsgPWPROTECT = GetResText("MESSAGES_7")
|
||||
sMsgWRONGPW = GetResText("MESSAGES_8")
|
||||
sMsgSHEETPROTECTED = GetResText("MESSAGES_9")
|
||||
sMsgWARNING = GetResText("MESSAGES_10")
|
||||
sMsgSHEETSNOPROTECT = GetResText("MESSAGES_11")
|
||||
sMsgSHEETNOPROTECT = GetResText("MESSAGES_12")
|
||||
sMsgCHOOSECURRENCY = GetResText("MESSAGES_15")
|
||||
sMsgPASSWORD = GetResText("MESSAGES_16")
|
||||
sMsgOK = GetResText("MESSAGES_17")
|
||||
sMsgCANCEL = GetResText("MESSAGES_18")
|
||||
sMsgFILEINVALID = GetResText("MESSAGES_19")
|
||||
sMsgFILEINVALID = ReplaceString(sMsgFILEINVALID,"%PRODUCTNAME", GetProductname())
|
||||
SMsgNODIRECTORY = GetResText(1420)
|
||||
sMsgDOCISREADONLY = GetResText(1421)
|
||||
sMsgFileExists = GetResText(1422)
|
||||
sMsgCancelConversion = GetResText(1423)
|
||||
sMsgCancelTitle = GetResText(1424)
|
||||
sCurrPORTUGUESE = GetResText(1500)
|
||||
sCurrDUTCH = GetResText(1501)
|
||||
sCurrFRENCH = GetResText(1502)
|
||||
sCurrSPANISH = GetResText(1503)
|
||||
sCurrITALIAN = GetResText(1504)
|
||||
sCurrGERMAN = GetResText(1505)
|
||||
sCurrBELGIAN = GetResText(1506)
|
||||
sCurrIRISH = GetResText(1507)
|
||||
sCurrLUXEMBOURG = GetResText(1508)
|
||||
sCurrAUSTRIAN = GetResText(1509)
|
||||
sCurrFINNISH = GetResText(1510)
|
||||
sCurrGREEK = GetResText(1511)
|
||||
sCurrSLOVENIAN = GetResText(1512)
|
||||
sCurrCYPRIOT = GetResText(1513)
|
||||
sCurrMALTESE = GetResText(1514)
|
||||
sCurrSLOVAK = GetResText(1515)
|
||||
sCurrUNKNOWN = GetResText(1516)
|
||||
sCurrSYSUNKNOWN = GetResText(1517)
|
||||
SMsgNODIRECTORY = GetResText("MESSAGES_20")
|
||||
sMsgDOCISREADONLY = GetResText("MESSAGES_21")
|
||||
sMsgFileExists = GetResText("MESSAGES_22")
|
||||
sMsgCancelConversion = GetResText("MESSAGES_23")
|
||||
sMsgCancelTitle = GetResText("MESSAGES_24")
|
||||
sCurrPORTUGUESE = GetResText("CURRENCIES_0")
|
||||
sCurrDUTCH = GetResText("CURRENCIES_1")
|
||||
sCurrFRENCH = GetResText("CURRENCIES_2")
|
||||
sCurrSPANISH = GetResText("CURRENCIES_3")
|
||||
sCurrITALIAN = GetResText("CURRENCIES_4")
|
||||
sCurrGERMAN = GetResText("CURRENCIES_5")
|
||||
sCurrBELGIAN = GetResText("CURRENCIES_6")
|
||||
sCurrIRISH = GetResText("CURRENCIES_7")
|
||||
sCurrLUXEMBOURG = GetResText("CURRENCIES_8")
|
||||
sCurrAUSTRIAN = GetResText("CURRENCIES_9")
|
||||
sCurrFINNISH = GetResText("CURRENCIES_10")
|
||||
sCurrGREEK = GetResText("CURRENCIES_11")
|
||||
sCurrSLOVENIAN = GetResText("CURRENCIES_12")
|
||||
sCurrCYPRIOT = GetResText("CURRENCIES_13")
|
||||
sCurrMALTESE = GetResText("CURRENCIES_14")
|
||||
sCurrSLOVAK = GetResText("CURRENCIES_15")
|
||||
sCurrESTONIAN = GetResText("CURRENCIES_16")
|
||||
sCurrLATVIAN = GetResText("CURRENCIES_17")
|
||||
sCurrLITHUANIAN = GetResText("CURRENCIES_18")
|
||||
.cmdCancel.Label = sCANCEL
|
||||
.cmdHelp.Label = sHELP
|
||||
.cmdBack.Label = GetResText(1002)
|
||||
.cmdBack.Label = GetResText("STEP_ZERO_2")
|
||||
.cmdGoOn.Label = sGOON
|
||||
.lblHint.Label = GetResText(1004)
|
||||
.lblCurrencies.Label = GetResText(1006)
|
||||
.lblHint.Label = GetResText("STEP_ZERO_4")
|
||||
.lblCurrencies.Label = GetResText("STEP_ZERO_6")
|
||||
.cmdBack.Enabled = False
|
||||
If .Step = 1 Then
|
||||
.chkComplete.Label = GetResText(1100)
|
||||
.hlnSelection.Label = GetResText(1101)
|
||||
.optCellTemplates.Label = GetResText(1102)
|
||||
.optSheetRanges.Label = GetResText(1103)
|
||||
.optDocRanges.Label = GetResText(1104)
|
||||
.optSelRange.Label = GetResText(1105)
|
||||
sCURRRANGES = GetResText(1108)
|
||||
.chkComplete.Label = GetResText("STEP_CONVERTER_0")
|
||||
.hlnSelection.Label = GetResText("STEP_CONVERTER_1")
|
||||
.optCellTemplates.Label = GetResText("STEP_CONVERTER_2")
|
||||
.optSheetRanges.Label = GetResText("STEP_CONVERTER_3")
|
||||
.optDocRanges.Label = GetResText("STEP_CONVERTER_4")
|
||||
.optSelRange.Label = GetResText("STEP_CONVERTER_5")
|
||||
sCURRRANGES = GetResText("STEP_CONVERTER_8")
|
||||
.lblSelection.Label = sCURRRANGES
|
||||
Else
|
||||
.lblProgress.Label = sStsPROGRESS
|
||||
.hlnExtent.Label = GetResText(1200)
|
||||
.optSingleFile.Label = GetResText(1201)
|
||||
.optWholeDir.Label = GetResText(1202)
|
||||
.chkProtect.Label = GetResText(1207)
|
||||
.chkTextDocuments.Label = GetResText(1210)
|
||||
.hlnExtent.Label = GetResText("STEP_AUTOPILOT_0")
|
||||
.optSingleFile.Label = GetResText("STEP_AUTOPILOT_1")
|
||||
.optWholeDir.Label = GetResText("STEP_AUTOPILOT_2")
|
||||
.chkProtect.Label = GetResText("STEP_AUTOPILOT_7")
|
||||
.chkTextDocuments.Label = GetResText("STEP_AUTOPILOT_10")
|
||||
|
||||
sSOURCEFILE = GetResText(1203)
|
||||
sSOURCEDIR = GetResText(1204)
|
||||
.lblSource.Label = sSOURCEDIR
|
||||
sInclusiveSubDir = GetResText(1205)
|
||||
.chkRecursive.Label = sInclusiveSubDir
|
||||
sTARGETDIR = GetResText(1206)
|
||||
.lblTarget.Label = STARGETDIR
|
||||
sSOURCEFILE = GetResText("STEP_AUTOPILOT_3")
|
||||
sSOURCEDIR = GetResText("STEP_AUTOPILOT_4")
|
||||
.lblSource.Label = sSOURCEDIR
|
||||
sInclusiveSubDir = GetResText("STEP_AUTOPILOT_5")
|
||||
.chkRecursive.Label = sInclusiveSubDir
|
||||
sTARGETDIR = GetResText("STEP_AUTOPILOT_6")
|
||||
.lblTarget.Label = STARGETDIR
|
||||
|
||||
LocWorkPath = GetPathSettings("Work")
|
||||
If Not oUcb.Exists(LocWorkPath) Then
|
||||
@@ -256,14 +253,14 @@ Dim LocWorkPath as String
|
||||
End If
|
||||
|
||||
.txtSource.Text = ConvertfromUrl(LocWorkPath)
|
||||
|
||||
|
||||
SubstDir = .txtSource.Text
|
||||
.txtTarget.Text = .txtSource.Text
|
||||
.hlnProgress.Label = GetResText(1600)
|
||||
.lblConfig.Label = GetResText(1603)
|
||||
sPrgsRETRIEVAL = GetResText(1601)
|
||||
sPrgsCONVERTING = GetResText(1602)
|
||||
sPrgsUNPROTECT = GetResText(1604)
|
||||
.hlnProgress.Label = GetResText("STEP_LASTPAGE_0")
|
||||
.lblConfig.Label = GetResText("STEP_LASTPAGE_3")
|
||||
sPrgsRETRIEVAL = GetResText("STEP_LASTPAGE_1")
|
||||
sPrgsCONVERTING = GetResText("STEP_LASTPAGE_2")
|
||||
sPrgsUNPROTECT = GetResText("STEP_LASTPAGE_4")
|
||||
End If
|
||||
End With
|
||||
End Sub
|
||||
@@ -290,7 +287,7 @@ Sub InitializeLanguages()
|
||||
LangIDValue(3,0,0) = "es"
|
||||
LangIDValue(3,0,1) = ""
|
||||
LangIDValue(3,0,2) = "-40A"
|
||||
|
||||
|
||||
'Spanish modern
|
||||
LangIDValue(3,1,0) = "es"
|
||||
LangIDValue(3,1,1) = ""
|
||||
@@ -333,7 +330,7 @@ Sub InitializeLanguages()
|
||||
LangIDValue(8,0,0) = "fr"
|
||||
LangIDValue(8,0,1) = "LU"
|
||||
LangIDValue(8,0,2) = "-140C"
|
||||
|
||||
|
||||
LangIDValue(8,1,0) = "de"
|
||||
LangIDValue(8,1,1) = "LU"
|
||||
LangIDValue(8,1,2) = "-1007"
|
||||
@@ -377,6 +374,25 @@ Sub InitializeLanguages()
|
||||
LangIDValue(15,0,1) = "SK"
|
||||
LangIDValue(15,0,2) = "-41B"
|
||||
|
||||
' CURRENCIES_ESTONIAN
|
||||
LangIDValue(16,0,0) = "et"
|
||||
LangIDValue(16,0,1) = "ET"
|
||||
LangIDValue(16,0,2) = "-425"
|
||||
|
||||
' CURRENCIES_LATVIAN
|
||||
LangIDValue(17,0,0) = "lv"
|
||||
LangIDValue(17,0,1) = "LV"
|
||||
LangIDValue(17,0,2) = "-426"
|
||||
' and Latgalian
|
||||
LangIDValue(17,1,0) = "ltg"
|
||||
LangIDValue(17,1,1) = "LV"
|
||||
LangIDValue(17,1,2) = "-64B"
|
||||
|
||||
' CURRENCIES_LITHUANIAN
|
||||
LangIDValue(18,0,0) = "lt"
|
||||
LangIDValue(18,0,1) = "LT"
|
||||
LangIDValue(18,0,2) = "-427"
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -529,6 +545,33 @@ Dim i as Integer
|
||||
CurrValue(15,4) = "Sk"
|
||||
CurrValue(15,5) = "SKK"
|
||||
|
||||
CurrValue(16,0) = sCurrESTONIAN
|
||||
' real conversion rate
|
||||
CurrValue(16,1) = 15.6466
|
||||
' rounded conversion rate
|
||||
CurrValue(16,2) = 16
|
||||
CurrValue(16,3) = "kr"
|
||||
CurrValue(16,4) = "kr"
|
||||
CurrValue(16,5) = "EEK"
|
||||
|
||||
CurrValue(17,0) = sCurrLATVIAN
|
||||
' real conversion rate
|
||||
CurrValue(17,1) = 0.702804
|
||||
' rounded conversion rate
|
||||
CurrValue(17,2) = 0.7
|
||||
CurrValue(17,3) = "Ls"
|
||||
CurrValue(17,4) = "Ls"
|
||||
CurrValue(17,5) = "LVL"
|
||||
|
||||
CurrValue(18,0) = sCurrLITHUANIAN
|
||||
' real conversion rate
|
||||
CurrValue(18,1) = 3.45280
|
||||
' rounded conversion rate
|
||||
CurrValue(18,2) = 3.5
|
||||
CurrValue(18,3) = "Lt"
|
||||
CurrValue(18,4) = "Lt"
|
||||
CurrValue(18,5) = "LTL"
|
||||
|
||||
i = -1
|
||||
CurrSymbolList(0) = ""
|
||||
CurrSymbolList(1) = ""
|
||||
@@ -544,7 +587,7 @@ Sub InitializeControls()
|
||||
EnableStep2DialogControls(True)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
|
||||
Sub InitializeConverter(oLocale, iDialogPage as Integer)
|
||||
@@ -558,7 +601,7 @@ Dim Isthere as Boolean
|
||||
If sDocType = "sCalc" Then
|
||||
bDocHasProtectedSheets = CheckSheetProtection(oSheets)
|
||||
End If
|
||||
oStatusline = ThisComponent.GetCurrentController.GetFrame.CreateStatusIndicator()
|
||||
oStatusline = ThisComponent.GetCurrentController.GetFrame.CreateStatusIndicator()
|
||||
End If
|
||||
DialogConvert = LoadDialog("Euro", "DlgConvert")
|
||||
DialogModel = DialogConvert.Model
|
||||
@@ -575,9 +618,9 @@ Dim Isthere as Boolean
|
||||
Stop
|
||||
End If
|
||||
FillUpCurrencyListbox()
|
||||
DialogModel.imgPreview.ImageUrl = BitmapDir & "euro_" & DialogModel.Step & ".bmp"
|
||||
DialogModel.imgPreview.ImageUrl = BitmapDir & "euro_" & DialogModel.Step & ".png"
|
||||
DialogConvert.Title = sMsgDLGTITLE
|
||||
DialogModel.cmdGoOn.DefaultButton = True
|
||||
DialogModel.cmdGoOn.DefaultButton = True
|
||||
If iDialogPage = 1 Then
|
||||
ToggleWindow(True)
|
||||
End If
|
||||
@@ -592,7 +635,7 @@ Sub InitializeCurrencyValues(CurrIndex)
|
||||
CurrSymbolList(1) = CurrValue(CurrIndex,4)
|
||||
CurrSymbolList(2) = CurrValue(CurrIndex,5)
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
|
||||
Function InitializeLocales(oLocale) as Boolean
|
||||
|
||||
Reference in New Issue
Block a user