集成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="AutoPilotRun" script:language="StarBasic">Option Explicit
Public SourceDir as String
@@ -31,7 +28,7 @@ Public Source as String
Public SubstFile as String
Public SubstDir as String
Public NoArgs()
Public TypeList(14) as String
Public TypeList(6) as String
Public GoOn as Boolean
Public DoUnprotect as Integer
Public Password as String
@@ -48,13 +45,13 @@ Dim i As Integer
Dim oFactoryKey as Object
BasicLibraries.LoadLibrary(&quot;Tools&quot;)
BasicLibraries.LoadLibrary(&quot;ImportWizard&quot;)
If InitResources(&quot;Euro Converter&quot;, &quot;eur&quot;) Then
If InitResources(&quot;Euro Converter&quot;) Then
oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
oLocale = GetStarOfficeLocale()
InitializeConverter(oLocale, 2)
ToggleGoOnButton()
oFactoryKey = GetRegistryKeyContent(&quot;org.openoffice.Setup/Office/Factories&quot;)
DialogModel.chkTextDocuments.Enabled = oFactoryKey.hasbyName(&quot;com.sun.star.text.TextDocument&quot;)
DialogModel.chkTextDocuments.Enabled = oFactoryKey.hasbyName(&quot;com.sun.star.text.TextDocument&quot;)
DialogModel.cmdGoOn.DefaultButton = True
DialogModel.lstCurrencies.TabIndex = 12
DialogConvert.GetControl(&quot;optWholeDir&quot;).SetFocus()
@@ -77,21 +74,13 @@ Dim bDisposable as Boolean
TargetStemDir = TargetDir
TypeList(0) = &quot;calc8&quot;
TypeList(1) = &quot;calc_StarOffice_XML_Calc&quot;
TypeList(2) = &quot;calc_StarCalc_30&quot;
TypeList(3) = &quot;calc_StarCalc_40&quot;
TypeList(4) = &quot;calc_StarCalc_50&quot;
If DialogModel.chkTextDocuments.State = 1 Then
ReDim Preserve TypeList(13) as String
ReDim Preserve TypeList(5) as String
TypeList(5) = &quot;writer8&quot;
TypeList(6) = &quot;writerglobal8&quot;
TypeList(7) = &quot;writer_StarOffice_XML_Writer&quot;
TypeList(8) = &quot;writer_globaldocument_StarOffice_XML_Writer_GlobalDocument&quot;
TypeList(9) = &quot;writer_StarWriter_30&quot;
TypeList(10) = &quot;writer_StarWriter_40&quot;
TypeList(11) = &quot;writer_globaldocument_StarWriter_40GlobalDocument&quot;
TypeList(12) = &quot;writer_StarWriter_50&quot;
TypeList(13) = &quot;writer_globaldocument_StarWriter_50GlobalDocument&quot;
TypeList(2) = &quot;writer8&quot;
TypeList(3) = &quot;writerglobal8&quot;
TypeList(4) = &quot;writer_StarOffice_XML_Writer&quot;
TypeList(5) = &quot;writer_globaldocument_StarOffice_XML_Writer_GlobalDocument&quot;
End If
FilesList() = ReadDirectories(SourceDir, bRecursive, True, False, TypeList())
TotDocCount = Ubound(FilesList(),1) + 1
@@ -147,7 +136,7 @@ Dim sExtension as String
bIsReadOnly = False
RetrieveDocumentObjects()
sViewPath = CutPathView(SourceFile, 60)
DialogModel.lblCurDocument.Label = Str(DocIndex+1) &amp; &quot;/&quot; &amp; sTotDocCount &amp; &quot; (&quot; &amp; sViewPath &amp; &quot;)&quot;
DialogModel.lblCurDocument.Label = Str(DocIndex+1) &amp; &quot;/&quot; &amp; sTotDocCount &amp; &quot; (&quot; &amp; sViewPath &amp; &quot;)&quot;
End If
InitializeDocument() = Not bIsReadOnly
Else
@@ -246,7 +235,7 @@ Dim TextBoxText as String
TextBoxText = TextBoxText &amp; DeleteStr(sInclusiveSubDir,&quot;~&quot;) &amp; chr(13)
End If
Else
TextBoxText = sSOURCEFILE &amp; &quot; &quot; &amp; ConvertFromUrl(Source) &amp; chr(13)
TextBoxText = sSOURCEFILE &amp; &quot; &quot; &amp; ConvertFromUrl(Source) &amp; chr(13)
End If
TextBoxText = TextBoxText &amp; sTARGETDIR &amp; &quot; &quot; &amp; ConvertFromUrl(TargetDir) &amp; chr(13)
If DialogModel.chkProtect.State = 1 Then
@@ -254,8 +243,8 @@ Dim TextBoxText as String
End If
DialogModel.txtConfig.Text = TextBoxText
ToggleProgressStep()
DialogModel.cmdGoOn.Enabled = False
InitializeThirdStep() = True
DialogModel.cmdGoOn.Enabled = False
InitializeThirdStep() = True
Else
InitializeThirdStep() = False
End If
@@ -276,7 +265,7 @@ Dim LocStep as Integer
DialogConvert.GetControl(&quot;lstCurrencies&quot;).Visible = Not bMakeVisible
DialogConvert.GetControl(&quot;cmdBack&quot;).Visible = bMakeVisible
DialogConvert.GetControl(&quot;cmdGoOn&quot;).Visible = bMakeVisible
DialogModel.imgPreview.ImageUrl = BitmapDir &amp; &quot;euro_&quot; &amp; DialogModel.Step &amp; &quot;.bmp&quot;
DialogModel.imgPreview.ImageUrl = BitmapDir &amp; &quot;euro_&quot; &amp; DialogModel.Step &amp; &quot;.png&quot;
End Sub
@@ -330,8 +319,8 @@ Dim sNoDirMessage as String
If DialogModel.chkTextDocuments.State = 1 Then
If (Instr(1, sLocMimeType, &quot;text&quot;) = 0) And (Instr(1, sLocMimeType, &quot;calc&quot;) = 0) Then
Msgbox(sMsgFileInvalid, 48, sMsgDLGTITLE)
bIsValid = False
End If
bIsValid = False
End If
Else
If (Instr(1, sLocMimeType, &quot;spreadsheet&quot;) = 0) And (Instr(1, sLocMimeType, &quot;calc&quot;)) = 0 Then
Msgbox(sMsgFileInvalid, 48, sMsgDLGTITLE)
@@ -350,7 +339,7 @@ Dim sNoDirMessage as String
End If
End if
Else
Msgbox(HeaderString &amp; &quot; &apos;&quot; &amp; ConvertFromUrl(sPath) &amp; &quot;&apos; &quot; &amp; sMsgNOTTHERE,48, sMsgDLGTITLE)
Msgbox(HeaderString &amp; &quot; &apos;&quot; &amp; ConvertFromUrl(sPath) &amp; &quot;&apos; &quot; &amp; sMsgNOTTHERE,48, sMsgDLGTITLE)
End If
If bIsValid Then
AssignFileName() = sPath
@@ -361,7 +350,7 @@ End Function
Sub ToggleGoOnButton()
Dim bDoEnable as Boolean
Dim bDoEnable as Boolean
Dim sLocMimeType as String
Dim sPath as String
bDoEnable = Ubound(DialogModel.lstCurrencies.SelectedItems()) &gt; -1
@@ -376,7 +365,7 @@ End Sub
Sub CallFolderPicker()
GetFolderName(DialogModel.txtTarget)
ToggleGoOnButton()
ToggleGoOnButton()
End Sub
@@ -385,39 +374,31 @@ Sub CallFilePicker()
Dim oMasterKey as Object
Dim oTypes() as Object
Dim oUIKey() as Object
oMasterKey = GetRegistryKeyContent(&quot;org.openoffice.TypeDetection.Types&quot;)
oTypes() = oMasterKey.Types
oUIKey = GetRegistryKeyContent(&quot;org.openoffice.Office.UI/FilterClassification/LocalFilters&quot;)
If DialogModel.chkTextDocuments.State = 1 Then
Dim FilterNames(11,1) as String
FilterNames(6,0) = oTypes.GetByName(&quot;writer_StarOffice_XML_Writer&quot;).UIName
FilterNames(6,1) = &quot;*.sxw&quot;
FilterNames(7,0) = oTypes.GetByName(&quot;writer_StarOffice_XML_Writer_Template&quot;).UIName
FilterNames(7,1) = &quot;*.stw&quot;
FilterNames(8,0) = oUIKey.Classes.GetByName(&quot;sw3to5&quot;).DisplayName
FilterNames(8,1) = &quot;*.sdw&quot;
FilterNames(9,0) = oUIKey.Classes.GetByName(&quot;sw3to5templ&quot;).DisplayName
Filternames(9,1) = &quot;*.vor&quot;
FilterNames(10,0) = oTypes.GetByName(&quot;writer8&quot;).UIName
FilterNames(10,1) = &quot;*.odt&quot;
FilterNames(11,0) = oTypes.GetByName(&quot;writer8_template&quot;).UIName
FilterNames(11,1) = &quot;*.ott&quot;
Dim FilterNames(7,1) as String
FilterNames(4,0) = oTypes.GetByName(&quot;writer_StarOffice_XML_Writer&quot;).UIName
FilterNames(4,1) = &quot;*.sxw&quot;
FilterNames(5,0) = oTypes.GetByName(&quot;writer_StarOffice_XML_Writer_Template&quot;).UIName
FilterNames(5,1) = &quot;*.stw&quot;
FilterNames(6,0) = oTypes.GetByName(&quot;writer8&quot;).UIName
FilterNames(6,1) = &quot;*.odt&quot;
FilterNames(7,0) = oTypes.GetByName(&quot;writer8_template&quot;).UIName
FilterNames(7,1) = &quot;*.ott&quot;
Else
ReDim FilterNames(5,1) as String
ReDim FilterNames(3,1) as String
End If
FilterNames(0,0) = oTypes.GetByName(&quot;calc_StarOffice_XML_Calc&quot;).UIName
Filternames(0,1) = &quot;*.sxc&quot;
FilterNames(1,0) = oTypes.GetByName(&quot;calc_StarOffice_XML_Calc_Template&quot;).UIName
Filternames(1,1) = &quot;*.stc&quot;
FilterNames(2,0) = oUIKey.Classes.GetByName(&quot;sc345&quot;).DisplayName
FilterNames(2,1) = &quot;*.sdc&quot;
FilterNames(3,0) = oUIKey.Classes.GetByName(&quot;sc345templ&quot;).DisplayName
Filternames(3,1) = &quot;*.vor&quot;
FilterNames(4,0) = oTypes.GetByName(&quot;calc8&quot;).UIName
Filternames(4,1) = &quot;*.ods&quot;
FilterNames(5,0) = oTypes.GetByName(&quot;calc8_template&quot;).UIName
Filternames(5,1) = &quot;*.ots&quot;
FilterNames(0,0) = oTypes.GetByName(&quot;calc8&quot;).UIName
Filternames(0,1) = &quot;*.ods&quot;
FilterNames(1,0) = oTypes.GetByName(&quot;calc8_template&quot;).UIName
Filternames(1,1) = &quot;*.ots&quot;
FilterNames(2,0) = oTypes.GetByName(&quot;calc_StarOffice_XML_Calc&quot;).UIName
Filternames(2,1) = &quot;*.sxc&quot;
FilterNames(3,0) = oTypes.GetByName(&quot;calc_StarOffice_XML_Calc_Template&quot;).UIName
Filternames(3,1) = &quot;*.stc&quot;
GetFileName(DialogModel.txtSource, Filternames())
Else
GetFolderName(DialogModel.txtSource)
@@ -428,7 +409,7 @@ End Sub
Sub PreviousStep()
DialogModel.Step = 2
DialogModel.cmdGoOn.Label = sGOON
DialogModel.cmdGoOn.Label = sGOON
DialogModel.cmdCancel.Label = sCANCEL
End Sub
</script:module>

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="Common" script:language="StarBasic"> REM ***** BASIC *****
Public DialogModel as Object
Public DialogConvert as Object
@@ -162,8 +159,8 @@ Dim oFormatofObject() as Object
CheckFormatType = False
Exit Function
End If
If FieldinArray(CurrSymbolList(),2,oFormatofObject.CurrencySymbol) Then
&apos; If the Currencysymbol of the object ist the one needed, then check the Currency extension
If FieldInArray(CurrSymbolList(),2,oFormatofObject.CurrencySymbol) Then
&apos; If the Currencysymbol of the object is the one needed, then check the Currency extension
sFormatCurrExt = oFormatofObject.CurrencyExtension
If FieldInList(CurExtension(),2,sFormatCurrExt) Then

View File

@@ -1,32 +1,29 @@
<?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="ConvertRun" script:language="StarBasic">Option Explicit
Public oPreSelRange as Object
Sub Main()
BasicLibraries.LoadLibrary(&quot;Tools&quot;)
If InitResources(&quot;Euro Converter&quot;, &quot;eur&quot;) Then
If InitResources(&quot;Euro Converter&quot;) Then
bDoUnProtect = False
bPreSelected = True
oDocument = ThisComponent
@@ -289,7 +286,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 FieldinList(LocList(), MaxIndex as integer, ByVal LocField ) As Boolean
Function FieldInList(LocList(), MaxIndex as integer, ByVal LocField ) As Boolean
Dim i as integer
LocField = Ucase(LocField)
For i = Lbound(LocList()) to MaxIndex

View File

@@ -1,32 +1,29 @@
<?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="DialogConvert" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_DIALOG" dlg:closeable="true" dlg:moveable="true">
<dlg:bulletinboard>
<dlg:text dlg:id="lblCurrencies" dlg:tab-index="1" dlg:left="170" dlg:top="39" dlg:width="89" dlg:height="8" dlg:value="lblCurrencies"/>
<dlg:text dlg:id="lblCurrencies" dlg:tab-index="1" dlg:left="170" dlg:top="39" dlg:width="92" dlg:height="8" dlg:value="lblCurrencies"/>
<dlg:checkbox dlg:id="chkComplete" dlg:tab-index="0" dlg:left="12" dlg:top="43" dlg:width="129" dlg:height="10" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_CHECKBOX1" dlg:value="chkComplete" dlg:checked="true">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Euro.ConvertRun.RetrieveEnableValue?language=Basic&amp;location=application" script:language="Script"/>
</dlg:checkbox>
<dlg:menulist dlg:id="lstCurrencies" dlg:tab-index="2" dlg:left="170" dlg:top="51" dlg:width="90" dlg:height="12" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_COMBOBOX1" dlg:spin="true" dlg:linecount="12">
<dlg:menulist dlg:id="lstCurrencies" dlg:tab-index="2" dlg:left="170" dlg:top="51" dlg:width="93" dlg:height="12" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_COMBOBOX1" dlg:spin="true" dlg:linecount="12">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Euro.Common.SelectCurrency?language=Basic&amp;location=application" script:language="Script"/>
</dlg:menulist>
<dlg:radiogroup>
@@ -77,7 +74,7 @@
<dlg:text dlg:id="lblRetrieval" dlg:tab-index="24" dlg:left="9" dlg:top="119" dlg:width="216" dlg:height="8" dlg:page="3" dlg:value="lblRetrieval"/>
<dlg:text dlg:id="lblConfig" dlg:tab-index="25" dlg:left="6" dlg:top="39" dlg:width="94" dlg:height="8" dlg:page="3" dlg:value="lblConfig"/>
<dlg:text dlg:id="lblCurDocument" dlg:tab-index="26" dlg:left="16" dlg:top="141" dlg:width="208" dlg:height="8" dlg:page="3"/>
<dlg:img dlg:id="imgPreview" dlg:tab-index="27" dlg:left="6" dlg:top="6" dlg:width="258" dlg:height="26" dlg:src="file:///D:/office630np/share/template/german/wizard/bitmap/euro_2.bmp"/>
<dlg:img dlg:id="imgPreview" dlg:tab-index="27" dlg:left="6" dlg:top="6" dlg:width="258" dlg:height="26"/>
<dlg:fixedline dlg:id="hlnSelection" dlg:tab-index="28" dlg:left="7" dlg:top="72" dlg:width="258" dlg:height="8" dlg:page="1" dlg:value="hlnSelection"/>
<dlg:fixedline dlg:id="hlnExtent" dlg:tab-index="29" dlg:left="6" dlg:top="39" dlg:width="156" dlg:height="8" dlg:page="2" dlg:value="hlnExtent"/>
<dlg:fixedline dlg:id="hlnProgress" dlg:tab-index="30" dlg:left="6" dlg:top="108" dlg:width="258" dlg:height="8" dlg:page="3" dlg:value="hlnProgress"/>

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="DlgPassword" dlg:left="77" dlg:top="93" dlg:width="310" dlg:height="65" dlg:closeable="true" dlg:moveable="true" dlg:title="DlgPassword">
<dlg:bulletinboard>
<dlg:button dlg:id="cmdGoOn" dlg:tab-index="0" dlg:left="251" dlg:top="6" dlg:width="53" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGPASSWORD_CMDGOON" dlg:value="cmdGoOn">
@@ -32,4 +29,4 @@
<dlg:textfield dlg:id="txtPassword" dlg:tab-index="3" dlg:left="11" dlg:top="18" dlg:width="232" dlg:height="12" dlg:help-url="HID:WIZARDS_HID_DLGPASSWORD_TXTPASSWORD" dlg:echochar="*"/>
<dlg:fixedline dlg:id="hlnPassword" dlg:tab-index="4" dlg:left="6" dlg:top="6" dlg:width="238" dlg:height="8" dlg:value="hlnPassword"/>
</dlg:bulletinboard>
</dlg:window>
</dlg:window>

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="Hard" script:language="StarBasic">REM ***** BASIC *****
Option Explicit
@@ -246,4 +243,4 @@ Dim LocCellCount as Long
oRangeAddress = oRange.RangeAddress
LocCellCount = (oRangeAddress.EndColumn - oRangeAddress.StartColumn + 1) * (oRangeAddress.EndRow - oRangeAddress.StartRow + 1)
CountRangeCells = LocCellCount
End Function</script:module>
End Function</script:module>

View File

@@ -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
&apos; 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(&quot;STEP_ZERO_3&quot;)
sHelp = GetResText(&quot;STEP_ZERO_1&quot;)
sCANCEL = GetResText(&quot;MESSAGES_18&quot;)
sEnd = GetResText(&quot;STEP_ZERO_0&quot;)
sPROTECT = GetResText(&quot;STEP_ZERO_5&quot;)
sCONTINUE = GetResText(&quot;STEP_ZERO_7&quot;)
sSELTEMPL = GetResText(&quot;STEP_CONVERTER_6&quot;)
sSELCELL = GetResText(&quot;STEP_CONVERTER_7&quot;)
sCURRRANGES = GetResText(&quot;STEP_CONVERTER_8&quot;)
sTEMPLATES = GetResText(&quot;STEP_CONVERTER_9&quot;)
sStsPROGRESS = GetResText(&quot;STATUSLINE_0&quot;)
sStsCELLPROGRSS = GetResText(&quot;STATUSLINE_1&quot;)
sStsRELSHEETRANGES = GetResText(&quot;STATUSLINE_2&quot;)
sStsRELRANGES = GetResText(&quot;STATUSLINE_3&quot;)
sStsREPROTECT = GetResText(&quot;STATUSLINE_4&quot;)
sREADY = GetResText(&quot;MESSAGES_0&quot;)
sMsgSELDIR = GetResText(&quot;MESSAGES_1&quot;)
sMsgSELFILE = GetResText(&quot;MESSAGES_2&quot;)
sMsgTARGETDIR = GetResText(&quot;MESSAGES_3&quot;)
sMsgNOTTHERE = GetResText(&quot;MESSAGES_4&quot;)
sMsgDLGTITLE = GetResText(&quot;MESSAGES_5&quot;)
sMsgUNPROTECT = GetResText(&quot;MESSAGES_6&quot;)
sMsgPWPROTECT = GetResText(&quot;MESSAGES_7&quot;)
sMsgWRONGPW = GetResText(&quot;MESSAGES_8&quot;)
sMsgSHEETPROTECTED = GetResText(&quot;MESSAGES_9&quot;)
sMsgWARNING = GetResText(&quot;MESSAGES_10&quot;)
sMsgSHEETSNOPROTECT = GetResText(&quot;MESSAGES_11&quot;)
sMsgSHEETNOPROTECT = GetResText(&quot;MESSAGES_12&quot;)
sMsgCHOOSECURRENCY = GetResText(&quot;MESSAGES_15&quot;)
sMsgPASSWORD = GetResText(&quot;MESSAGES_16&quot;)
sMsgOK = GetResText(&quot;MESSAGES_17&quot;)
sMsgCANCEL = GetResText(&quot;MESSAGES_18&quot;)
sMsgFILEINVALID = GetResText(&quot;MESSAGES_19&quot;)
sMsgFILEINVALID = ReplaceString(sMsgFILEINVALID,&quot;%PRODUCTNAME&quot;, 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(&quot;MESSAGES_20&quot;)
sMsgDOCISREADONLY = GetResText(&quot;MESSAGES_21&quot;)
sMsgFileExists = GetResText(&quot;MESSAGES_22&quot;)
sMsgCancelConversion = GetResText(&quot;MESSAGES_23&quot;)
sMsgCancelTitle = GetResText(&quot;MESSAGES_24&quot;)
sCurrPORTUGUESE = GetResText(&quot;CURRENCIES_0&quot;)
sCurrDUTCH = GetResText(&quot;CURRENCIES_1&quot;)
sCurrFRENCH = GetResText(&quot;CURRENCIES_2&quot;)
sCurrSPANISH = GetResText(&quot;CURRENCIES_3&quot;)
sCurrITALIAN = GetResText(&quot;CURRENCIES_4&quot;)
sCurrGERMAN = GetResText(&quot;CURRENCIES_5&quot;)
sCurrBELGIAN = GetResText(&quot;CURRENCIES_6&quot;)
sCurrIRISH = GetResText(&quot;CURRENCIES_7&quot;)
sCurrLUXEMBOURG = GetResText(&quot;CURRENCIES_8&quot;)
sCurrAUSTRIAN = GetResText(&quot;CURRENCIES_9&quot;)
sCurrFINNISH = GetResText(&quot;CURRENCIES_10&quot;)
sCurrGREEK = GetResText(&quot;CURRENCIES_11&quot;)
sCurrSLOVENIAN = GetResText(&quot;CURRENCIES_12&quot;)
sCurrCYPRIOT = GetResText(&quot;CURRENCIES_13&quot;)
sCurrMALTESE = GetResText(&quot;CURRENCIES_14&quot;)
sCurrSLOVAK = GetResText(&quot;CURRENCIES_15&quot;)
sCurrESTONIAN = GetResText(&quot;CURRENCIES_16&quot;)
sCurrLATVIAN = GetResText(&quot;CURRENCIES_17&quot;)
sCurrLITHUANIAN = GetResText(&quot;CURRENCIES_18&quot;)
.cmdCancel.Label = sCANCEL
.cmdHelp.Label = sHELP
.cmdBack.Label = GetResText(1002)
.cmdBack.Label = GetResText(&quot;STEP_ZERO_2&quot;)
.cmdGoOn.Label = sGOON
.lblHint.Label = GetResText(1004)
.lblCurrencies.Label = GetResText(1006)
.lblHint.Label = GetResText(&quot;STEP_ZERO_4&quot;)
.lblCurrencies.Label = GetResText(&quot;STEP_ZERO_6&quot;)
.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(&quot;STEP_CONVERTER_0&quot;)
.hlnSelection.Label = GetResText(&quot;STEP_CONVERTER_1&quot;)
.optCellTemplates.Label = GetResText(&quot;STEP_CONVERTER_2&quot;)
.optSheetRanges.Label = GetResText(&quot;STEP_CONVERTER_3&quot;)
.optDocRanges.Label = GetResText(&quot;STEP_CONVERTER_4&quot;)
.optSelRange.Label = GetResText(&quot;STEP_CONVERTER_5&quot;)
sCURRRANGES = GetResText(&quot;STEP_CONVERTER_8&quot;)
.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(&quot;STEP_AUTOPILOT_0&quot;)
.optSingleFile.Label = GetResText(&quot;STEP_AUTOPILOT_1&quot;)
.optWholeDir.Label = GetResText(&quot;STEP_AUTOPILOT_2&quot;)
.chkProtect.Label = GetResText(&quot;STEP_AUTOPILOT_7&quot;)
.chkTextDocuments.Label = GetResText(&quot;STEP_AUTOPILOT_10&quot;)
sSOURCEFILE = GetResText(1203)
sSOURCEDIR = GetResText(1204)
.lblSource.Label = sSOURCEDIR
sInclusiveSubDir = GetResText(1205)
.chkRecursive.Label = sInclusiveSubDir
sTARGETDIR = GetResText(1206)
.lblTarget.Label = STARGETDIR
sSOURCEFILE = GetResText(&quot;STEP_AUTOPILOT_3&quot;)
sSOURCEDIR = GetResText(&quot;STEP_AUTOPILOT_4&quot;)
.lblSource.Label = sSOURCEDIR
sInclusiveSubDir = GetResText(&quot;STEP_AUTOPILOT_5&quot;)
.chkRecursive.Label = sInclusiveSubDir
sTARGETDIR = GetResText(&quot;STEP_AUTOPILOT_6&quot;)
.lblTarget.Label = STARGETDIR
LocWorkPath = GetPathSettings(&quot;Work&quot;)
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(&quot;STEP_LASTPAGE_0&quot;)
.lblConfig.Label = GetResText(&quot;STEP_LASTPAGE_3&quot;)
sPrgsRETRIEVAL = GetResText(&quot;STEP_LASTPAGE_1&quot;)
sPrgsCONVERTING = GetResText(&quot;STEP_LASTPAGE_2&quot;)
sPrgsUNPROTECT = GetResText(&quot;STEP_LASTPAGE_4&quot;)
End If
End With
End Sub
@@ -290,7 +287,7 @@ Sub InitializeLanguages()
LangIDValue(3,0,0) = &quot;es&quot;
LangIDValue(3,0,1) = &quot;&quot;
LangIDValue(3,0,2) = &quot;-40A&quot;
&apos;Spanish modern
LangIDValue(3,1,0) = &quot;es&quot;
LangIDValue(3,1,1) = &quot;&quot;
@@ -333,7 +330,7 @@ Sub InitializeLanguages()
LangIDValue(8,0,0) = &quot;fr&quot;
LangIDValue(8,0,1) = &quot;LU&quot;
LangIDValue(8,0,2) = &quot;-140C&quot;
LangIDValue(8,1,0) = &quot;de&quot;
LangIDValue(8,1,1) = &quot;LU&quot;
LangIDValue(8,1,2) = &quot;-1007&quot;
@@ -377,6 +374,25 @@ Sub InitializeLanguages()
LangIDValue(15,0,1) = &quot;SK&quot;
LangIDValue(15,0,2) = &quot;-41B&quot;
&apos; CURRENCIES_ESTONIAN
LangIDValue(16,0,0) = &quot;et&quot;
LangIDValue(16,0,1) = &quot;ET&quot;
LangIDValue(16,0,2) = &quot;-425&quot;
&apos; CURRENCIES_LATVIAN
LangIDValue(17,0,0) = &quot;lv&quot;
LangIDValue(17,0,1) = &quot;LV&quot;
LangIDValue(17,0,2) = &quot;-426&quot;
&apos; and Latgalian
LangIDValue(17,1,0) = &quot;ltg&quot;
LangIDValue(17,1,1) = &quot;LV&quot;
LangIDValue(17,1,2) = &quot;-64B&quot;
&apos; CURRENCIES_LITHUANIAN
LangIDValue(18,0,0) = &quot;lt&quot;
LangIDValue(18,0,1) = &quot;LT&quot;
LangIDValue(18,0,2) = &quot;-427&quot;
End Sub
@@ -529,6 +545,33 @@ Dim i as Integer
CurrValue(15,4) = &quot;Sk&quot;
CurrValue(15,5) = &quot;SKK&quot;
CurrValue(16,0) = sCurrESTONIAN
&apos; real conversion rate
CurrValue(16,1) = 15.6466
&apos; rounded conversion rate
CurrValue(16,2) = 16
CurrValue(16,3) = &quot;kr&quot;
CurrValue(16,4) = &quot;kr&quot;
CurrValue(16,5) = &quot;EEK&quot;
CurrValue(17,0) = sCurrLATVIAN
&apos; real conversion rate
CurrValue(17,1) = 0.702804
&apos; rounded conversion rate
CurrValue(17,2) = 0.7
CurrValue(17,3) = &quot;Ls&quot;
CurrValue(17,4) = &quot;Ls&quot;
CurrValue(17,5) = &quot;LVL&quot;
CurrValue(18,0) = sCurrLITHUANIAN
&apos; real conversion rate
CurrValue(18,1) = 3.45280
&apos; rounded conversion rate
CurrValue(18,2) = 3.5
CurrValue(18,3) = &quot;Lt&quot;
CurrValue(18,4) = &quot;Lt&quot;
CurrValue(18,5) = &quot;LTL&quot;
i = -1
CurrSymbolList(0) = &quot;&quot;
CurrSymbolList(1) = &quot;&quot;
@@ -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 = &quot;sCalc&quot; Then
bDocHasProtectedSheets = CheckSheetProtection(oSheets)
End If
oStatusline = ThisComponent.GetCurrentController.GetFrame.CreateStatusIndicator()
oStatusline = ThisComponent.GetCurrentController.GetFrame.CreateStatusIndicator()
End If
DialogConvert = LoadDialog(&quot;Euro&quot;, &quot;DlgConvert&quot;)
DialogModel = DialogConvert.Model
@@ -575,9 +618,9 @@ Dim Isthere as Boolean
Stop
End If
FillUpCurrencyListbox()
DialogModel.imgPreview.ImageUrl = BitmapDir &amp; &quot;euro_&quot; &amp; DialogModel.Step &amp; &quot;.bmp&quot;
DialogModel.imgPreview.ImageUrl = BitmapDir &amp; &quot;euro_&quot; &amp; DialogModel.Step &amp; &quot;.png&quot;
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

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="Protect" script:language="StarBasic">REM ***** BASIC *****
Option Explicit
@@ -135,8 +132,8 @@ Sub RejectPassword()
End Sub
&apos; Reprotects the previousliy protected sheets
&apos; The passwordinformation is stored in the List &apos;UnProtectList()&apos;
&apos; Reprotects the previously protected sheets
&apos; The password information is stored in the List &apos;UnProtectList()&apos;
Sub ReprotectSheets()
Dim i as Integer
Dim oProtectSheet as Object

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="Soft" script:language="StarBasic">Option Explicit
REM ***** BASIC *****
@@ -256,4 +253,4 @@ Dim AssignString as String
End If
End If
GetAssignedRanges() = StyleRangeList()
End Function</script:module>
End Function</script:module>

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="Writer" script:language="StarBasic">REM ***** BASIC *****
@@ -34,7 +31,7 @@ Dim oCell as Object
While oParagraphs.HasMoreElements
oPara = oParagraphs.NextElement
If NOT oPara.supportsService(&quot;com.sun.star.text.Paragraph&quot;) Then
&apos; Note: As cells might be splitted or merged
&apos; Note: As cells might be split or merged
&apos; you cannot refer to them via their indices
sCellNames = oPara.CellNames
For i = 0 To Ubound(sCellNames)
@@ -77,7 +74,7 @@ Dim MaxIndex as Integer
End If
ElseIf oTextField.TextFieldMaster.PropertySetInfo.HasPropertyByName(&quot;Value&quot;) Then
CurInstanceName = oTextField.TextFieldMaster.InstanceName
If Not FieldinArray(InstanceNames(), MaxIndex, CurInstanceName) Then
If Not FieldInArray(InstanceNames(), MaxIndex, CurInstanceName) Then
oTextField.TextFieldMaster.Content = CStr(Round(oTextField.TextFieldMaster.Value/CurrFactor,2))
InstanceNames(MaxIndex) = CurInstanceName
MaxIndex = MaxIndex + 1
@@ -89,4 +86,4 @@ Dim MaxIndex as Integer
Wend
oDocument.GetTextFields.refresh()
End Sub
</script:module>
</script:module>