集成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,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="Debug" script:language="StarBasic">REM ***** BASIC *****
Sub ActivateReadOnlyFlag()
@@ -253,4 +250,4 @@ Sub FillDocument()
oMyReport.trigger(&quot;fill&quot;)
End Sub
</script:module>
</script:module>

View File

@@ -1,25 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.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 .
-->
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DlgOverwriteAll" dlg:left="138" dlg:top="75" dlg:width="230" dlg:height="64" dlg:closeable="true" dlg:moveable="true">
<dlg:bulletinboard>
<dlg:text dlg:id="lblQueryforSave" dlg:tab-index="0" dlg:left="6" dlg:top="6" dlg:width="218" dlg:height="36" dlg:value="lblQueryforSave" dlg:multiline="true"/>

View File

@@ -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="Listbox" script:language="StarBasic">Option Explicit
Dim OriginalList()
Dim oDialogModel as Object
@@ -175,10 +172,10 @@ Dim iOldSourceSelect as Integer
m = 0
For n = 0 To MaxOriginalIndex
SearchString = OriginalList(n)
If IndexinArray(SearchString, SelList()) &lt;&gt; -1 Then
If IndexInArray(SearchString, SelList()) &lt;&gt; -1 Then
NewSourceList(m) = SearchString
m = m + 1
ElseIf IndexinArray(SearchString, SourceList()) &lt;&gt; -1 Then
ElseIf IndexInArray(SearchString, SourceList()) &lt;&gt; -1 Then
NewSourceList(m) = SearchString
m = m + 1
End If
@@ -329,7 +326,7 @@ End Function
&apos; Note: When using this Sub it must be ensured that the
&apos; &apos;RemoveItem&apos; appears only only once in the Listbox
&apos; &apos;RemoveItem&apos; appears only once in the Listbox
Sub RemoveListboxItemByName(oListbox as Object, RemoveItem as String)
Dim OldList() as String
Dim NullList() as String

View File

@@ -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="Misc" script:language="StarBasic">REM ***** BASIC *****
Const SBSHARE = 0
@@ -104,6 +101,9 @@ Dim oMasterKey
If Ubound(sLocaleList()) &gt; 0 Then
aLocLocale.Country = sLocaleList(1)
End If
If Ubound(sLocaleList()) &gt; 1 Then
aLocLocale.Variant = sLocaleList(2)
End If
GetStarOfficeLocale() = aLocLocale
End Function
@@ -137,14 +137,14 @@ Dim sProdName as String
End Function
&apos; Opens a Document, checks beforehand, wether it has to be loaded
&apos; or wether it is already on the desktop.
&apos; If the parameter bDisposable is set to False then then returned document
&apos; Opens a Document, checks beforehand, whether it has to be loaded
&apos; or whether it is already on the desktop.
&apos; If the parameter bDisposable is set to False then the returned document
&apos; should not be disposed afterwards, because it is already opened.
Function OpenDocument(DocPath as String, Args(), Optional bDisposable as Boolean)
Dim oComponents as Object
Dim oComponent as Object
&apos; Search if one of the active Components ist the one that you search for
&apos; Search if one of the active Components is the one that you search for
oComponents = StarDesktop.Components.CreateEnumeration
While oComponents.HasmoreElements
oComponent = oComponents.NextElement
@@ -168,7 +168,7 @@ End Function
Function TaskonDesktop(DocPath as String) as Boolean
Dim oComponents as Object
Dim oComponent as Object
&apos; Search if one of the active Components ist the one that you search for
&apos; Search if one of the active Components is the one that you search for
oComponents = StarDesktop.Components.CreateEnumeration
While oComponents.HasmoreElements
oComponent = oComponents.NextElement
@@ -235,8 +235,8 @@ End Function
&apos; Gets the fully qualified path to a subdirectory of the
&apos; Template Directory, e. g. with the parameter &quot;wizard/bitmap&quot;
&apos; The parameter must be passed over in Url-scription
&apos; The return-Value is in Urlscription
&apos; The parameter must be passed in Url notation
&apos; The return-Value is in Url notation
Function GetOfficeSubPath(sOfficePath as String, ByVal sSubDir as String)
Dim sOfficeString as String
Dim sOfficeList() as String
@@ -276,9 +276,9 @@ Dim oLocResSrv as Object
If bResObjectexists Then
oLocResSrv = oResSrv
End If
If InitResources(&quot;Tools&quot;, &quot;com&quot;) Then
If InitResources(&quot;Tools&quot;) Then
ProductName = GetProductName()
sError = GetResText(1006)
sError = GetResText(&quot;RID_COMMON_6&quot;)
sError = ReplaceString(sError, ProductName, &quot;%PRODUCTNAME&quot;)
sError = ReplaceString(sError, chr(13), &quot;&lt;BR&gt;&quot;)
MsgBox(sError, 16, ProductName)
@@ -290,38 +290,50 @@ Dim oLocResSrv as Object
End Sub
Function InitResources(Description, ShortDescription as String) as boolean
On Error Goto ErrorOcurred
oResSrv = createUnoService( &quot;com.sun.star.resource.VclStringResourceLoader&quot; )
Function InitResources(Description) as boolean
Dim xResource as Object
Dim sOfficeDir as String
Dim aArgs(5) as Any
On Error Goto ErrorOccurred
sOfficeDir = &quot;$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/wizards/&quot;
sOfficeDir = GetDefaultContext.getByName(&quot;/singletons/com.sun.star.util.theMacroExpander&quot;).ExpandMacros(sOfficeDir)
aArgs(0) = sOfficeDir
aArgs(1) = true
aArgs(2) = GetStarOfficeLocale()
aArgs(3) = &quot;resources&quot;
aArgs(4) = &quot;&quot;
aArgs(5) = NULL
oResSrv = getProcessServiceManager().createInstanceWithArguments( &quot;com.sun.star.resource.StringResourceWithLocation&quot;, aArgs() )
If (IsNull(oResSrv)) then
InitResources = FALSE
MsgBox( Description &amp; &quot;: No resource loader found&quot;, 16, GetProductName())
MsgBox(&quot;could not initialize StringResourceWithLocation&quot;)
Else
InitResources = TRUE
oResSrv.FileName = ShortDescription
End If
Exit Function
ErrorOcurred:
ErrorOccurred:
Dim nSolarVer
InitResources = FALSE
nSolarVer = GetSolarVersion()
MsgBox(&quot;Resource file missing (&quot; &amp; ShortDescription &amp; trim(str(nSolarVer)) + &quot;*.res)&quot;, 16, GetProductName())
MsgBox(&quot;Resource file missing&quot;, 16, GetProductName())
Resume CLERROR
CLERROR:
End Function
Function GetResText( nID as integer ) As string
On Error Goto ErrorOcurred
Function GetResText( sID as String ) As string
Dim sString as String
On Error Goto ErrorOccurred
If Not IsNull(oResSrv) Then
GetResText = oResSrv.getString( nID )
sString = oResSrv.resolveString(sID)
GetResText = ReplaceString(sString, GetProductname(), &quot;%PRODUCTNAME&quot;)
Else
GetResText = &quot;&quot;
End If
Exit Function
ErrorOcurred:
ErrorOccurred:
GetResText = &quot;&quot;
MsgBox(&quot;Resource with ID =&quot; + str( nID ) + &quot; not found!&quot;, 16, GetProductName())
MsgBox(&quot;Resource with ID =&quot; + sID + &quot; not found!&quot;, 16, GetProductName())
Resume CLERROR
CLERROR:
End Function
@@ -361,7 +373,7 @@ Dim oRange as Object
End Sub
&apos; Inserts a certain String to all cells of a Range that ist passed over
&apos; Inserts a certain string to all cells of a range that is passed
&apos; either as an object or as the RangeName
Sub ChangeValueofRange(oSheet as Object, Range, ReplaceValue, Optional StyleName as String)
Dim oCellRange as Object
@@ -369,7 +381,7 @@ Dim oCellRange as Object
&apos; Get the Range out of the Rangename
oCellRange = oSheet.GetCellRangeByName(Range)
Else
&apos; The range is passed over as an object
&apos; The range is passed as an object
Set oCellRange = Range
End If
If IsMissing(StyleName) Then
@@ -630,7 +642,7 @@ Dim i as Integer
End Function
Function GetLastUsedRow(oSheet as Object) as Integer
Function GetLastUsedRow(oSheet as Object) as Long
Dim oCell As Object
Dim oCursor As Object
Dim aAddress As Variant
@@ -731,14 +743,6 @@ Function IsFatOffice() As Boolean
End Function
Function GetLocale(sLanguage as String, sCountry as String)
Dim oLocale as New com.sun.star.lang.Locale
oLocale.Language = sLanguage
oLocale.Country = sCountry
GetLocale = oLocale
End Function
Sub ToggleDesignMode(oDocument as Object)
Dim aSwitchMode as new com.sun.star.util.URL
aSwitchMode.Complete = &quot;.uno:SwitchControlDesignMode&quot;
@@ -779,18 +783,18 @@ Dim ErrMsg as String
oDocument = StarDesktop.LoadComponentFromURL(sUrl,&quot;_default&quot;,0, NoArgs())
NOMODULEINSTALLED:
If (Err &lt;&gt; 0) OR IsNull(oDocument) Then
If InitResources(&quot;&quot;, &quot;com&quot;) Then
If InitResources(&quot;&quot;) Then
Select Case sType
Case &quot;swriter&quot;
ErrMsg = GetResText(1001)
ErrMsg = GetResText(&quot;RID_COMMON_1&quot;)
Case &quot;scalc&quot;
ErrMsg = GetResText(1002)
ErrMsg = GetResText(&quot;RID_COMMON_2&quot;)
Case &quot;simpress&quot;
ErrMsg = GetResText(1003)
ErrMsg = GetResText(&quot;RID_COMMON_3&quot;)
Case &quot;sdraw&quot;
ErrMsg = GetResText(1004)
ErrMsg = GetResText(&quot;RID_COMMON_4&quot;)
Case &quot;smath&quot;
ErrMsg = GetResText(1005)
ErrMsg = GetResText(&quot;RID_COMMON_5&quot;)
Case Else
ErrMsg = &quot;Invalid Document Type!&quot;
End Select

View File

@@ -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="ModuleControls" script:language="StarBasic">Option Explicit
Public DlgOverwrite as Object
@@ -279,7 +276,7 @@ Dim FilterIndex as Integer
End If
On Local Error Goto NOSAVING
If FilterName = &quot;&quot; Then
&apos; Todo: Catch the case that a document that has to be overwritten is writeportected (e.g. it is open)
&apos; Todo: Catch the case that a document that has to be overwritten is writeprotected (e.g. it is open)
oDocument.StoreAsUrl(sPath, NoArgs())
Else
oStoreProperties(0).Name = &quot;FilterName&quot;
@@ -314,7 +311,7 @@ Dim sProdName as String
Filternames(i,0) = ReplaceString(Filternames(i,0), sProdName,&quot;%productname%&quot;)
oDialog.AppendFilter(FilterNames(i,0), FilterNames(i,1))
Next i
oDialog.SetCurrentFilter(FilterNames(0,0)
oDialog.SetCurrentFilter(FilterNames(0,0))
End Sub
@@ -338,17 +335,17 @@ Dim lblNo as String
Dim lblYesToAll as String
Dim lblCancel as String
Dim OverwriteModel as Object
If InitResources(GetProductName(), &quot;dbw&quot;) Then
QueryString = GetResText(507)
If InitResources(GetProductName()) Then
QueryString = GetResText(&quot;RID_COMMON_7&quot;)
QueryString = ReplaceString(QueryString, ConvertFromUrl(FilePath), &quot;&lt;PATH&gt;&quot;)
If Len(QueryString) &gt; 190 Then
QueryString = DeleteStr(QueryString, &quot;.&lt;BR&gt;&quot;)
End If
QueryString = ReplaceString(QueryString, chr(13), &quot;&lt;BR&gt;&quot;)
lblYes = GetResText(508)
lblYesToAll = GetResText(509)
lblNo = GetResText(510)
lblCancel = GetResText(511)
lblYes = GetResText(&quot;RID_COMMON_8&quot;)
lblYesToAll = GetResText(&quot;RID_COMMON_9&quot;)
lblNo = GetResText(&quot;RID_COMMON_10&quot;)
lblCancel = GetResText(&quot;RID_COMMON_11&quot;)
DlgOverwrite = LoadDialog(&quot;Tools&quot;, &quot;DlgOverwriteAll&quot;)
DlgOverwrite.Title = sTitle
OverwriteModel = DlgOverwrite.Model

View File

@@ -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="Strings" script:language="StarBasic">Option Explicit
Public sProductname as String
@@ -29,7 +26,7 @@ Public sProductname as String
Function ElimChar(ByVal BigString as String, ElimArray() as String)
Dim i% ,n%
For i = 0 to Ubound(ElimArray)
BigString = DeleteStr(BigString,ElimArray(i)
BigString = DeleteStr(BigString,ElimArray(i))
Next
ElimChar = BigString
End Function
@@ -161,7 +158,7 @@ End Sub
&apos; Checks if a Field (LocField) is already defined in an Array
&apos; Returns &apos;True&apos; or &apos;False&apos;
Function FieldinArray(LocArray(), MaxIndex as integer, LocField as String) As Boolean
Function FieldInArray(LocArray(), MaxIndex as integer, LocField as String) As Boolean
Dim i as integer
For i = Lbound(LocArray()) to MaxIndex
If Ucase(LocArray(i)) = Ucase(LocField) Then
@@ -175,7 +172,7 @@ End Function
&apos; Checks if a Field (LocField) is already defined in an Array
&apos; Returns &apos;True&apos; or &apos;False&apos;
Function FieldinList(LocField, BigList()) As Boolean
Function FieldInList(LocField, BigList()) As Boolean
Dim i as integer
For i = Lbound(BigList()) to Ubound(BigList())
If LocField = BigList(i) Then
@@ -189,15 +186,15 @@ End Function
&apos; Retrieves the Index of the delivered String &apos;SearchString&apos; in
&apos; the Array LocList()&apos;
Function IndexinArray(SearchString as String, LocList()) as Integer
Function IndexInArray(SearchString as String, LocList()) as Integer
Dim i as integer
For i = Lbound(LocList(),1) to Ubound(LocList(),1)
If Ucase(LocList(i,0)) = Ucase(SearchString) Then
IndexinArray = i
IndexInArray = i
Exit Function
End if
Next
IndexinArray = -1
IndexInArray = -1
End Function
@@ -217,7 +214,7 @@ Dim a as Integer
End Sub
&apos; Searches for a String in a two-dimensional Array by querying all Searchindexex of the second dimension
&apos; Searches for a String in a two-dimensional Array by querying all Searchindexes of the second dimension
&apos; and delivers the specific String of the ReturnIndex in the second dimension of the Searchlist()
Function StringInMultiArray(SearchList(), SearchString as String, SearchIndex as Integer, ReturnIndex as Integer, Optional MaxIndex as Integer) as String
Dim i as integer
@@ -348,7 +345,7 @@ Dim SepList() as String
FileName = FileNameoutofPath(FileName, Separator)
End If
SepList() = ArrayoutofString(FileName,&quot;.&quot;, MaxIndex)
GetFileNameWithoutExtension = RTrimStr(FileName, &quot;.&quot; &amp; SepList(MaxIndex)
GetFileNameWithoutExtension = RTrimStr(FileName, &quot;.&quot; &amp; SepList(MaxIndex))
End Function
@@ -359,7 +356,7 @@ Dim LocFileName as String
End Function
Function CountCharsinString(BigString, LocChar as String, ByVal StartPos as Integer) as Integer
Function CountCharsInString(BigString, LocChar as String, ByVal StartPos as Integer) as Integer
Dim LocCount%, LocPos%
LocCount = 0
Do

View File

@@ -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="UCB" script:language="StarBasic">&apos;Option explicit
Public oDocument
Public oDocInfo as object
@@ -92,8 +89,8 @@ Dim sFileArray(StartUbound,1) as String
If RealFileContent &lt;&gt; &quot;&quot; Then
&apos; Retrieve the Index in the Array, where a Filename is positioned
If Not IsMissing(sFileContent()) Then
If (FieldinArray(sFileContent(), Ubound(sFileContent), RealFileContent)) Then
&apos; The extension of the current file passes the filter and is therefor admitted to the
If (FieldInArray(sFileContent(), Ubound(sFileContent), RealFileContent)) Then
&apos; The extension of the current file passes the filter and is therefore admitted to the
&apos; fileList
If Not IsMissing(sExtension) Then
If sExtension &lt;&gt; &quot;&quot; Then
@@ -300,8 +297,8 @@ Dim oUcb as Object
CreateFolder = True
NOSPACEONDRIVE:
If Err &lt;&gt; 0 Then
If InitResources(&quot;&quot;, &quot;dbw&quot;) Then
ErrMsg = GetResText(500)
If InitResources(&quot;&quot;) Then
ErrMsg = GetResText(&quot;RID_COMMON_0&quot;)
ErrMsg = ReplaceString(ErrMsg, chr(13), &quot;&lt;BR&gt;&quot;)
ErrMsg = ReplaceString(ErrMsg, sNewFolder, &quot;%1&quot;)
Msgbox(ErrMsg, 48, GetProductName())