mirror of
https://github.com/kekingcn/kkFileView.git
synced 2026-04-19 18:28:39 +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="Debug" script:language="StarBasic">REM ***** BASIC *****
|
||||
|
||||
Sub ActivateReadOnlyFlag()
|
||||
@@ -253,4 +250,4 @@ Sub FillDocument()
|
||||
oMyReport.trigger("fill")
|
||||
End Sub
|
||||
|
||||
</script:module>
|
||||
</script:module>
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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()) <> -1 Then
|
||||
If IndexInArray(SearchString, SelList()) <> -1 Then
|
||||
NewSourceList(m) = SearchString
|
||||
m = m + 1
|
||||
ElseIf IndexinArray(SearchString, SourceList()) <> -1 Then
|
||||
ElseIf IndexInArray(SearchString, SourceList()) <> -1 Then
|
||||
NewSourceList(m) = SearchString
|
||||
m = m + 1
|
||||
End If
|
||||
@@ -329,7 +326,7 @@ End Function
|
||||
|
||||
|
||||
' Note: When using this Sub it must be ensured that the
|
||||
' 'RemoveItem' appears only only once in the Listbox
|
||||
' 'RemoveItem' appears only once in the Listbox
|
||||
Sub RemoveListboxItemByName(oListbox as Object, RemoveItem as String)
|
||||
Dim OldList() as String
|
||||
Dim NullList() as String
|
||||
|
||||
@@ -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()) > 0 Then
|
||||
aLocLocale.Country = sLocaleList(1)
|
||||
End If
|
||||
If Ubound(sLocaleList()) > 1 Then
|
||||
aLocLocale.Variant = sLocaleList(2)
|
||||
End If
|
||||
GetStarOfficeLocale() = aLocLocale
|
||||
End Function
|
||||
|
||||
@@ -137,14 +137,14 @@ Dim sProdName as String
|
||||
End Function
|
||||
|
||||
|
||||
' Opens a Document, checks beforehand, wether it has to be loaded
|
||||
' or wether it is already on the desktop.
|
||||
' If the parameter bDisposable is set to False then then returned document
|
||||
' Opens a Document, checks beforehand, whether it has to be loaded
|
||||
' or whether it is already on the desktop.
|
||||
' If the parameter bDisposable is set to False then the returned document
|
||||
' 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
|
||||
' Search if one of the active Components ist the one that you search for
|
||||
' 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
|
||||
' Search if one of the active Components ist the one that you search for
|
||||
' 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
|
||||
|
||||
' Gets the fully qualified path to a subdirectory of the
|
||||
' Template Directory, e. g. with the parameter "wizard/bitmap"
|
||||
' The parameter must be passed over in Url-scription
|
||||
' The return-Value is in Urlscription
|
||||
' The parameter must be passed in Url notation
|
||||
' 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("Tools", "com") Then
|
||||
If InitResources("Tools") Then
|
||||
ProductName = GetProductName()
|
||||
sError = GetResText(1006)
|
||||
sError = GetResText("RID_COMMON_6")
|
||||
sError = ReplaceString(sError, ProductName, "%PRODUCTNAME")
|
||||
sError = ReplaceString(sError, chr(13), "<BR>")
|
||||
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( "com.sun.star.resource.VclStringResourceLoader" )
|
||||
Function InitResources(Description) as boolean
|
||||
Dim xResource as Object
|
||||
Dim sOfficeDir as String
|
||||
Dim aArgs(5) as Any
|
||||
On Error Goto ErrorOccurred
|
||||
sOfficeDir = "$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/wizards/"
|
||||
sOfficeDir = GetDefaultContext.getByName("/singletons/com.sun.star.util.theMacroExpander").ExpandMacros(sOfficeDir)
|
||||
aArgs(0) = sOfficeDir
|
||||
aArgs(1) = true
|
||||
aArgs(2) = GetStarOfficeLocale()
|
||||
aArgs(3) = "resources"
|
||||
aArgs(4) = ""
|
||||
aArgs(5) = NULL
|
||||
oResSrv = getProcessServiceManager().createInstanceWithArguments( "com.sun.star.resource.StringResourceWithLocation", aArgs() )
|
||||
If (IsNull(oResSrv)) then
|
||||
InitResources = FALSE
|
||||
MsgBox( Description & ": No resource loader found", 16, GetProductName())
|
||||
MsgBox("could not initialize StringResourceWithLocation")
|
||||
Else
|
||||
InitResources = TRUE
|
||||
oResSrv.FileName = ShortDescription
|
||||
End If
|
||||
Exit Function
|
||||
ErrorOcurred:
|
||||
ErrorOccurred:
|
||||
Dim nSolarVer
|
||||
InitResources = FALSE
|
||||
nSolarVer = GetSolarVersion()
|
||||
MsgBox("Resource file missing (" & ShortDescription & trim(str(nSolarVer)) + "*.res)", 16, GetProductName())
|
||||
MsgBox("Resource file missing", 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(), "%PRODUCTNAME")
|
||||
Else
|
||||
GetResText = ""
|
||||
End If
|
||||
Exit Function
|
||||
ErrorOcurred:
|
||||
ErrorOccurred:
|
||||
GetResText = ""
|
||||
MsgBox("Resource with ID =" + str( nID ) + " not found!", 16, GetProductName())
|
||||
MsgBox("Resource with ID =" + sID + " not found!", 16, GetProductName())
|
||||
Resume CLERROR
|
||||
CLERROR:
|
||||
End Function
|
||||
@@ -361,7 +373,7 @@ Dim oRange as Object
|
||||
End Sub
|
||||
|
||||
|
||||
' Inserts a certain String to all cells of a Range that ist passed over
|
||||
' Inserts a certain string to all cells of a range that is passed
|
||||
' 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
|
||||
' Get the Range out of the Rangename
|
||||
oCellRange = oSheet.GetCellRangeByName(Range)
|
||||
Else
|
||||
' The range is passed over as an object
|
||||
' 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 = ".uno:SwitchControlDesignMode"
|
||||
@@ -779,18 +783,18 @@ Dim ErrMsg as String
|
||||
oDocument = StarDesktop.LoadComponentFromURL(sUrl,"_default",0, NoArgs())
|
||||
NOMODULEINSTALLED:
|
||||
If (Err <> 0) OR IsNull(oDocument) Then
|
||||
If InitResources("", "com") Then
|
||||
If InitResources("") Then
|
||||
Select Case sType
|
||||
Case "swriter"
|
||||
ErrMsg = GetResText(1001)
|
||||
ErrMsg = GetResText("RID_COMMON_1")
|
||||
Case "scalc"
|
||||
ErrMsg = GetResText(1002)
|
||||
ErrMsg = GetResText("RID_COMMON_2")
|
||||
Case "simpress"
|
||||
ErrMsg = GetResText(1003)
|
||||
ErrMsg = GetResText("RID_COMMON_3")
|
||||
Case "sdraw"
|
||||
ErrMsg = GetResText(1004)
|
||||
ErrMsg = GetResText("RID_COMMON_4")
|
||||
Case "smath"
|
||||
ErrMsg = GetResText(1005)
|
||||
ErrMsg = GetResText("RID_COMMON_5")
|
||||
Case Else
|
||||
ErrMsg = "Invalid Document Type!"
|
||||
End Select
|
||||
|
||||
@@ -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 = "" Then
|
||||
' Todo: Catch the case that a document that has to be overwritten is writeportected (e.g. it is open)
|
||||
' 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 = "FilterName"
|
||||
@@ -314,7 +311,7 @@ Dim sProdName as String
|
||||
Filternames(i,0) = ReplaceString(Filternames(i,0), sProdName,"%productname%")
|
||||
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(), "dbw") Then
|
||||
QueryString = GetResText(507)
|
||||
If InitResources(GetProductName()) Then
|
||||
QueryString = GetResText("RID_COMMON_7")
|
||||
QueryString = ReplaceString(QueryString, ConvertFromUrl(FilePath), "<PATH>")
|
||||
If Len(QueryString) > 190 Then
|
||||
QueryString = DeleteStr(QueryString, ".<BR>")
|
||||
End If
|
||||
QueryString = ReplaceString(QueryString, chr(13), "<BR>")
|
||||
lblYes = GetResText(508)
|
||||
lblYesToAll = GetResText(509)
|
||||
lblNo = GetResText(510)
|
||||
lblCancel = GetResText(511)
|
||||
lblYes = GetResText("RID_COMMON_8")
|
||||
lblYesToAll = GetResText("RID_COMMON_9")
|
||||
lblNo = GetResText("RID_COMMON_10")
|
||||
lblCancel = GetResText("RID_COMMON_11")
|
||||
DlgOverwrite = LoadDialog("Tools", "DlgOverwriteAll")
|
||||
DlgOverwrite.Title = sTitle
|
||||
OverwriteModel = DlgOverwrite.Model
|
||||
|
||||
@@ -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
|
||||
|
||||
' Checks if a Field (LocField) is already defined in an Array
|
||||
' Returns 'True' or 'False'
|
||||
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
|
||||
|
||||
' Checks if a Field (LocField) is already defined in an Array
|
||||
' Returns 'True' or 'False'
|
||||
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
|
||||
|
||||
' Retrieves the Index of the delivered String 'SearchString' in
|
||||
' the Array LocList()'
|
||||
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
|
||||
|
||||
|
||||
' Searches for a String in a two-dimensional Array by querying all Searchindexex of the second dimension
|
||||
' Searches for a String in a two-dimensional Array by querying all Searchindexes of the second dimension
|
||||
' 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,".", MaxIndex)
|
||||
GetFileNameWithoutExtension = RTrimStr(FileName, "." & SepList(MaxIndex)
|
||||
GetFileNameWithoutExtension = RTrimStr(FileName, "." & 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
|
||||
|
||||
@@ -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">'Option explicit
|
||||
Public oDocument
|
||||
Public oDocInfo as object
|
||||
@@ -92,8 +89,8 @@ Dim sFileArray(StartUbound,1) as String
|
||||
If RealFileContent <> "" Then
|
||||
' Retrieve the Index in the Array, where a Filename is positioned
|
||||
If Not IsMissing(sFileContent()) Then
|
||||
If (FieldinArray(sFileContent(), Ubound(sFileContent), RealFileContent)) Then
|
||||
' The extension of the current file passes the filter and is therefor admitted to the
|
||||
If (FieldInArray(sFileContent(), Ubound(sFileContent), RealFileContent)) Then
|
||||
' The extension of the current file passes the filter and is therefore admitted to the
|
||||
' fileList
|
||||
If Not IsMissing(sExtension) Then
|
||||
If sExtension <> "" Then
|
||||
@@ -300,8 +297,8 @@ Dim oUcb as Object
|
||||
CreateFolder = True
|
||||
NOSPACEONDRIVE:
|
||||
If Err <> 0 Then
|
||||
If InitResources("", "dbw") Then
|
||||
ErrMsg = GetResText(500)
|
||||
If InitResources("") Then
|
||||
ErrMsg = GetResText("RID_COMMON_0")
|
||||
ErrMsg = ReplaceString(ErrMsg, chr(13), "<BR>")
|
||||
ErrMsg = ReplaceString(ErrMsg, sNewFolder, "%1")
|
||||
Msgbox(ErrMsg, 48, GetProductName())
|
||||
|
||||
Reference in New Issue
Block a user