mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-04-06 08:17:33 +00:00
集成OpenOffice替换为LibreOffice
This commit is contained in:
@@ -1,25 +1,22 @@
|
||||
<?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="Correspondence" script:language="StarBasic">Option Explicit
|
||||
|
||||
Public msgNoTextmark$, msgError$
|
||||
@@ -62,16 +59,16 @@ End Sub
|
||||
|
||||
|
||||
Function LoadLanguageCorrespondence() as Boolean
|
||||
If InitResources("'Template'", "tpl") Then
|
||||
msgNoTextmark$ = GetResText(1303) & Chr(13) & Chr(10) & GetResText(1301)
|
||||
msgError$ = GetResText(1302)
|
||||
If InitResources("'Template'") Then
|
||||
msgNoTextmark$ = GetResText("CorrespondenceDialog_0") & Chr(13) & Chr(10) & GetResText("CorrespondenceNoTextmark_1")
|
||||
msgError$ = GetResText("CorrespondenceMsgError")
|
||||
If bTemplate Then
|
||||
DialogModel.Title = GetResText(1303+3)
|
||||
DialogModel.CmdCancel.Label = GetResText(1102)
|
||||
DialogModel.CmdCorrGoOn.Label = GetResText(1103)
|
||||
DialogModel.OptSingle.Label = GetResText(1303 + 1)
|
||||
DialogModel.Optmerge.Label = GetResText(1303 + 2)
|
||||
DialogModel.FrmLetter.Label = GetResText(1303)
|
||||
DialogModel.Title = GetResText("CorrespondenceDialog_3")
|
||||
DialogModel.CmdCancel.Label = GetResText("STYLES_2")
|
||||
DialogModel.CmdCorrGoOn.Label = GetResText("STYLES_3")
|
||||
DialogModel.OptSingle.Label = GetResText("CorrespondenceDialog_1")
|
||||
DialogModel.Optmerge.Label = GetResText("CorrespondenceDialog_2")
|
||||
DialogModel.FrmLetter.Label = GetResText("CorrespondenceDialog_0")
|
||||
End If
|
||||
LoadLanguageCorrespondence() = True
|
||||
Else
|
||||
@@ -133,7 +130,7 @@ Dim bDBvalid as Boolean
|
||||
oDBAccess = GetRegistryKeyContent("org.openoffice.Office.DataAccess/AddressBook/")
|
||||
sAddressbook = oDBAccess.DataSourceName
|
||||
If sAddressbook = "" Then
|
||||
MsgBox(GetResText(1301))
|
||||
MsgBox(GetResText("CorrespondenceNoTextmark_1"))
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
@@ -233,72 +230,72 @@ Dim bCorrectField as Boolean
|
||||
oFieldMaster = oDocument.createInstance("com.sun.star.text.TextField.JumpEdit")
|
||||
Select Case sColName
|
||||
Case "Company"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+1)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_1")
|
||||
Case "Department"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+2)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_2")
|
||||
Case "FirstName"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+3)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_3")
|
||||
Case "LastName"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+4)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_4")
|
||||
Case "Street"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+5)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_5")
|
||||
Case "Country"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+6)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_6")
|
||||
Case "Zip"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+7)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_7")
|
||||
Case "City"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+8)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_8")
|
||||
Case "Title"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+9)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_9")
|
||||
Case "Position"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+10)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_10")
|
||||
Case "AddrForm"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+11)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_11")
|
||||
Case "Code"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+12)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_12")
|
||||
Case "AddrFormMail"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+13)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_13")
|
||||
Case "PhonePriv"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+14)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_14")
|
||||
Case "PhoneComp"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+15)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_15")
|
||||
Case "Fax"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+16)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_16")
|
||||
Case "EMail"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+17)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_17")
|
||||
Case "URL"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+18)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_18")
|
||||
Case "Note"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+19)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_19")
|
||||
Case "Altfield1"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+20)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_20")
|
||||
Case "Altfield2"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+21)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_21")
|
||||
Case "Altfield3"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+22)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_22")
|
||||
Case "Altfield4"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+23)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_23")
|
||||
Case "Id"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+24)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_24")
|
||||
Case "State"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+25)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_25")
|
||||
Case "PhoneOffice"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+26)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_26")
|
||||
Case "Pager"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+27)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_27")
|
||||
Case "PhoneCell"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+28)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_28")
|
||||
Case "PhoneOther"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+29)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_29")
|
||||
Case "CalendarURL"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+30)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_30")
|
||||
Case "InviteParticipant"
|
||||
oFieldMaster.PlaceHolder = getResText(1350+31)
|
||||
oFieldMaster.PlaceHolder = getResText("CorrespondenceFields_31")
|
||||
Case Else
|
||||
bCorrectField = False
|
||||
End Select
|
||||
If bCorrectField Then
|
||||
oFieldMaster.Hint = getResText(1350)
|
||||
oFieldMaster.Hint = getResText("CorrespondenceFields_0")
|
||||
oBookText.InsertTextContent(oBookMarkCursor, oFieldMaster, True)
|
||||
End If
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user