集成OpenOffice替换为LibreOffice

This commit is contained in:
陈精华
2021-06-23 10:26:22 +08:00
parent 8a1eebb9b0
commit 79341b2c8e
14724 changed files with 2184695 additions and 551131 deletions

View File

@@ -1,31 +1,28 @@
<?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="tools" script:language="StarBasic">REM ***** BASIC *****
Option Explicit
Public Const SBMAXTEXTSIZE = 50
Function SetProgressValue(iValue as Integer)
Function SetProgressValue(iValue as Integer)
If iValue = 0 Then
oProgressbar.End
End If
@@ -87,7 +84,7 @@ Dim NullValue
Else
oControl.Model.EffectiveValue = oControl.Model.EffectiveMax
End If
GetPeerSize() = oPeer.PreferredSize()
GetPeerSize() = oPeer.PreferredSize()
oControl.Model.EffectiveValue = NullValue
ElseIf Not IsMissing(LocText) Then
oControl.Text = LocText
@@ -109,7 +106,7 @@ Dim NullValue
oControl.Text = Mid(SBSIZETEXT,1, SBMAXTEXTSIZE)
Else
oControl.Text = Mid(SBSIZETEXT,1, oControl.MaxTextLen)
End If
End If
GetPeerSize() = oPeer.PreferredSize()
oControl.Text = &quot;&quot;
End If
@@ -143,7 +140,7 @@ Function PixelTo100thMMY(oControl as Object) as long
oPeer = oControl.GetPeer()
PixelTo100mmX = Clng(Peer.GetInfo.PixelPerMeterY/100000)
&apos; PixelTo100thMM = nValue * 28 &apos; not an exact calculation
&apos; PixelTo100thMM = nValue * 28 &apos; not an exact calculation
End function
@@ -170,25 +167,25 @@ Dim OldIndex as Integer
End If
OldIndex = CurIndex
CurIndex = GetCurIndex(DialogModel.lstStyles, Styles(),8)
If CurIndex &lt;&gt; OldIndex Then
If CurIndex &lt;&gt; OldIndex Then
ToggleLayoutPage(False)
Dim sImportPath as String
sImportPath = Styles(CurIndex, 8)
bWithBackGraphic = LoadNewStyles(oDocument, DialogModel, CurIndex, sImportPath, Styles(), TexturePath)
ControlCaptionsToStandardLayout()
ToggleLayoutPage(True, &quot;lstStyles&quot;)
ToggleLayoutPage(True, &quot;lstStyles&quot;)
End If
WIZARDERROR:
If Err &lt;&gt; 0 Then
If Err &lt;&gt; 0 Then
Msgbox(sMsgErrMsg, 16, GetProductName())
Resume LOCERROR
LOCERROR:
LOCERROR:
End If
End Sub
Function SetNumerics(ByVal oLocObject as Object, iLocFieldType as Integer) as Object
Function SetNumerics(ByVal oLocObject as Object, iLocFieldType as Integer) as Object
If CurControlType = cNumericBox Then
oLocObject.TreatAsNumber = True
Select Case iLocFieldType
@@ -228,9 +225,9 @@ Function SetNumerics(ByVal oLocObject as Object, iLocFieldType as Integer) as Ob
&apos; Todo Why does this not work?: oLocObject.DefaultDate = CurDefaultValue
ElseIf CurControlType = cTimeBox Then &apos; com.sun.star.sdbc.DataType.DATE, com.sun.star.sdbc.DataType.TIME
oLocObject.DefaultTime = CurDefaultValue
&apos; Todo: Property TimeFormat? frome where?
&apos; Todo: Property TimeFormat? from where?
ElseIf CurControlType = cCheckBox Then
&apos; Todo Why does this not work?: oLocObject.DefautState = CurDefaultValue
&apos; Todo Why does this not work?: oLocObject.DefaultState = CurDefaultValue
End If
If oLocObject.PropertySetInfo.HasPropertybyName(&quot;FormatKey&quot;) Then
On Local Error Resume Next
@@ -326,19 +323,16 @@ End Function
Function GetFormWizardPaths() as Boolean
FormPath = GetOfficeSubPath(&quot;Template&quot;,&quot;../wizard/bitmap&quot;)
If FormPath &lt;&gt; &quot;&quot; Then
WebWizardPath = GetOfficeSubPath(&quot;Template&quot;,&quot;wizard/web&quot;)
If WebWizardPath &lt;&gt; &quot;&quot; Then
WizardPath = GetOfficeSubPath(&quot;Template&quot;,&quot;wizard/&quot;)
If Wizardpath &lt;&gt; &quot;&quot; Then
TexturePath = GetOfficeSubPath(&quot;Gallery&quot;, &quot;www-back/&quot;)
If TexturePath &lt;&gt; &quot;&quot; Then
WorkPath = GetPathSettings(&quot;Work&quot;)
If WorkPath &lt;&gt; &quot;&quot; Then
TempPath = GetPathSettings(&quot;Temp&quot;)
If TempPath &lt;&gt; &quot;&quot; Then
GetFormWizardPaths = True
Exit Function
End If
WizardPath = GetOfficeSubPath(&quot;Template&quot;,&quot;wizard/&quot;)
If Wizardpath &lt;&gt; &quot;&quot; Then
TexturePath = GetOfficeSubPath(&quot;Gallery&quot;, &quot;backgrounds/&quot;)
If TexturePath &lt;&gt; &quot;&quot; Then
WorkPath = GetPathSettings(&quot;Work&quot;)
If WorkPath &lt;&gt; &quot;&quot; Then
TempPath = GetPathSettings(&quot;Temp&quot;)
If TempPath &lt;&gt; &quot;&quot; Then
GetFormWizardPaths = True
Exit Function
End If
End If
End If