集成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="API" script:language="StarBasic">Declare Function RegOpenKeyEx Lib &quot;advapi32.dll&quot; Alias &quot;RegOpenKeyExA&quot; _
(ByVal hKey As Long, _
ByVal lpSubKey As String, _
@@ -105,8 +102,6 @@ Dim Index as Integer
sPath = SOWorkPath
End If
GetDefaultPath = sPath
Case SBXMLMODE
GetDefaultPath = SOWorkPath
End Select
End Function
@@ -161,13 +156,6 @@ Dim sTemplateValueName as String
Else
GetTemplateDefaultPath = SOWorkPath
End If
Case SBXMLMODE
If Index = 3 Then
&apos; Helper Application with no templates
GetTemplateDefaultPath = SOWorkPath
Else
GetTemplateDefaultPath = SOTemplatePath
End If
End Select
NOVALIDSYSTEMPATH:
If Err &lt;&gt; 0 Then
@@ -217,7 +205,7 @@ End Function
Function QueryValue(BaseKey As Long, sKeyName As String, sValueName As String) As Variant
Dim lRetVal As Long &apos; Returnvalue API-Call
Dim hKey As Long &apos; Onen key handle
Dim hKey As Long &apos; One key handle
Dim vValue As String &apos; Key value
lRetVal = RegOpenKeyEx(BaseKey, sKeyName, 0, KEY_ALL_ACCESS, hKey)

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="DialogModul" script:language="StarBasic">Option Explicit
Public Const bDebugWizard = True
@@ -28,13 +25,11 @@ Public Const SBFIRSTAPPLCHECKED = 0
Public Const SBSECONDAPPLCHECKED = 1
Public Const SBTHIRDAPPLCHECKED = 2
Public Const SBFOURTHAPPLCHECKED = 3
Public bFilterTracingAvailable as Boolean
Public WizardMode as String
Public Const SBMICROSOFTMODE = &quot;MS&quot;
Public Const SBXMLMODE = &quot;SO&quot;
&apos; The absolute maximal Number of possible Applications
Public Const Twip = 425
Public Const SBMAXAPPLCOUNT = 4
Public Const Twip = 425
Public MaxApplCount as Integer
Public CurOffice As Integer
Public SOBitmapPath As String
@@ -42,7 +37,6 @@ Public SOWorkPath As String
Public SOTemplatePath as String
Public bCancelTask As Boolean
Public bDoKeepApplValues as Boolean
Public iApplSection as Integer
Public oUcb as Object
Public PathSeparator as String
@@ -51,16 +45,6 @@ Public sKeyName(SBMAXAPPLCOUNT-1) as String
Public sValueName(SBMAXAPPLCOUNT-1) as String
Public sCRLF as String
Public MSFilterName(5,4) as String
Public XMLFilterName(7,3) as String &apos;Number of different formats
Public FilterTracingLogPath(2) as String
Public bMSApplFilterTracingAvailable(2) as String
Public bTakeOverTargetName(2) as Boolean
Public bTakeOverPathName(2) as Boolean
&apos; e.g.:
&apos; XMLFilterName(x,0) = &quot;sdw&quot; &apos; in documents we take the extensions; in SO-templates the appropriate Filtername
&apos; XMLFilterName(x,1) = &quot;swriter: StarWriter 5.0&quot; &apos; the filtername of the target-format
&apos; XMLFilterName(x,2) = &quot;sxw&quot; &apos; the target extension
Public Applications(SBMAXAPPLCOUNT-1,9)
@@ -89,8 +73,6 @@ Public XMLTemplateList()
&apos; Applications(X,8) = &quot;File:///...&quot; (TargetUrl of the templates)
&apos; Applications(X,9) = 0 (Key to the original Index of the Applications)
Public Const SBMAXEXTENSIONLENGTH = 17
Sub FillStep_Welcome()
Dim i as Integer
@@ -102,7 +84,6 @@ Dim i as Integer
.cmdBack.Label = sBackButton
.cmdGoOn.Label = sNextButton
.WelcomeTextLabel.Label = sWelcomeTextLabel1
.WelcomeTextLabel2.Label = sWelcomeTextLabel2
.WelcomeTextLabel3.Label = sWelcomeTextLabel3
.optMSDocuments.Label = sContainerName(0)
@@ -110,11 +91,6 @@ Dim i as Integer
.chkMSApplication2.Label = sMsDocumentCheckbox(1)
.chkMSApplication3.Label = sMsDocumentCheckbox(2)
.optSODocuments.Label = sContainerName(1)
.chkSOApplication1.Label = sSODocumentCheckbox(0)
.chkSOApplication2.Label = sSODocumentCheckbox(1)
.chkSOApplication3.Label = sSODocumentCheckbox(2)
.chkSOApplication4.Label = sSODocumentCheckbox(3)
.cmdBack.Enabled = False
.Step = 1
@@ -135,7 +111,7 @@ Dim oNullObject as Object
If ImportDialog.optMSDocuments.State = 1 Then
SetupMSConfiguration()
Else
SetupXMLConfiguration()
&apos;Not supposed to happen - is there an assert in BASIC...
End If
FillUpApplicationList()
End If
@@ -149,25 +125,14 @@ Dim oNullObject as Object
.txtDocumentImportPath.Text = ConvertFromUrl(Applications(CurOffice,SBDOCSOURCE))
.txtDocumentExportPath.Text = ConvertFromUrl(Applications(CurOffice,SBDOCTARGET))
.hlnDocuments.Label = sProgressMoreDocs
If WizardMode = SBXMLMODE Then
ImportDialogArea.Title = sTitle &amp; &quot; - &quot; &amp; sSODocumentCheckBox(Index)
Else
If WizardMode = SBMICROSOFTMODE Then
ImportDialogArea.Title = sTitle &amp; &quot; - &quot; &amp; sMSDocumentCheckBox(Index)
End If
If WizardMode = SBXMLMODE AND Index = 3 Then
&apos; Note: SO-Helper Applications are partly treated like templates although they only have documents
.hlnTemplates.Label = sProgressMoreDocs
.chkTemplatePath.Label = sSOHelperDocuments(0,0)
.chkTemplatePath.Enabled = oFactoryKey.HasByName(sSOHelperDocuments(0,1))
.chkDocumentPath.Label = sSOHelperDocuments(1,0)
.chkDocumentPath.Enabled = oFactoryKey.HasByName(sSOHelperDocuments(1,1))
Else
.chkTemplatePath.Enabled = True
.chkDocumentPath.Enabled = True
.chkTemplatePath.Label = sTemplateCheckbox(Index)
.chkDocumentPath.Label = sDocumentCheckbox(Index)
.hlnTemplates.Label = sProgressMoreTemplates
End If
.chkTemplatePath.Enabled = True
.chkDocumentPath.Enabled = True
.chkTemplatePath.Label = sTemplateCheckbox(Index)
.chkDocumentPath.Label = sDocumentCheckbox(Index)
.hlnTemplates.Label = sProgressMoreTemplates
.chkTemplatePath.State = Abs(Applications(CurOffice,SBTEMPLCONVERT))
ToggleInputPaths(oNullObject,&quot;Template&quot;)
ToggleInputPaths(oNullObject,&quot;Document&quot;)
@@ -192,8 +157,6 @@ Dim BoolValue as Boolean
For i = 1 To ApplCount
If ImportDialog.optMSDocuments.State = 1 Then
BoolValue = ImportDialogArea.GetControl(&quot;chkMSApplication&quot; &amp; i).Model.State = 1
Else
BoolValue = ImportDialogArea.GetControl(&quot;chkSOApplication&quot; &amp; i).Model.State = 1
End If
Applications(a,SBAPPLCONVERT) = BoolValue
Applications(a,SBDOCCONVERT) = BoolValue
@@ -276,14 +239,11 @@ Dim Index as Integer
Dim sAddText as String
For i = 0 To ApplCount -1
Index = Applications(i,SBAPPLKEY)
GetFilterTracingLogPath(i, Index)
If Applications(i,SBTEMPLCONVERT) Then
&apos; Templates are to be converted
sAddText = &quot;&quot;
If WizardMode = SBMICROSOFTMODE Then
sAddText = sSumMSTemplates(Index) &amp; sCRLF
Else
sAddText = sSumSOTemplates(Index) &amp; sCRLF
End If
sTmpText = sTmpText &amp; sAddText &amp; ConvertFromUrl(Applications(i,SBTEMPLSOURCE)) &amp; sCRLF
If Applications(i,SBTEMPLRECURSIVE) Then
@@ -299,8 +259,6 @@ Dim sAddText as String
&apos; Documents are to be converted
If WizardMode = SBMICROSOFTMODE Then
sAddText = sSumMSDocuments(Index) &amp; sCRLF
Else
sAddText = sSumSODocuments(Index) &amp; sCRLF
End If
sTmpText = sTmpText &amp; sAddText &amp; ConvertFromUrl(Applications(i,SBDOCSOURCE)) &amp; sCRLF
@@ -351,57 +309,18 @@ Sub FillStep_Progress()
End Sub
Sub GetFilterTracingLogPath(i as Integer, Index as Integer)
Dim aNodePath(0) as new com.sun.star.beans.PropertyValue
Dim oMasterKey
Dim oImportKey
Dim oWordKey
Dim oExcelkey
Dim oPowerpointKey
Dim oFilterService
aNodePath(0).Name = &quot;nodepath&quot;
aNodePath(0).Value = &quot;org.openoffice.Office.Tracing&quot;
oFilterService = createUnoService(&quot;com.sun.star.util.FilterTracer&quot;)
bFilterTracingAvailable = Not IsNull(oFilterService)
If bFilterTracingAvailable Then
oMasterkey = GetRegistryKeyContent(&quot;org.openoffice.Office.Tracing/&quot;)
If oMasterKey.hasbyName(&quot;Import&quot;) Then
oImportKey = GetRegistryKeyContent(&quot;org.openoffice.Office.Tracing/Import&quot;)
bMSApplFilterTracingAvailable(i) = CheckMSImportAvailability(oImportkey, MSFiltername(Index, 4), FilterTracingLogPath(i), bTakeOverTargetName(i), bTakeOverPathName(i))
End If
End If
End Sub
Function CheckMSImportAvailability(oImportkey, MSApplName as String, MSLogPath as String, bTakeOverTargetname as String, bTakeOverpathName as String) as Boolean
Dim bApplIsAvailable as Boolean
Dim oApplKey
Dim LocApplName as String
Dim LocApplPath as String
bApplIsAvailable = oImportKey.hasbyName(MSApplName)
If bApplIsAvailable Then
oApplKey = oImportKey.getByName(MSApplName)
bApplIsAvailable = oApplKey.On
LocApplName = oApplKey.Name
LocApplPath = oApplKey.Path
bTakeOverTargetName = (LocApplName = &quot;&quot;)
bTakeOverPathName = (LocApplPath = &quot;&quot;)
MSLogPath = LocApplPath &amp; &quot;/&quot; &amp; LocApplName &amp; &quot;.log&quot;
End If
CheckMSImportAvailability() = bApplIsAvailable
End Function
Sub SetupMSConfiguration()
iApplSection = 0
Wizardmode = SBMICROSOFTMODE
MaxApplCount = 3
ApplCount = 3
&apos; chkTemplatePath-Captions
GetApplResourceArray(1009 + iApplSection, ApplCount, sTemplateCheckBox())
sTemplateCheckBox(0) = GetResText(&quot;MSTemplateCheckbox_1_&quot;)
sTemplateCheckBox(1) = GetResText(&quot;MSTemplateCheckbox_2_&quot;)
sTemplateCheckBox(2) = GetResText(&quot;MSTemplateCheckbox_3_&quot;)
&apos; DocumentCheckbox- Captions
GetApplResourceArray(1009 + iApplSection + ApplCount, ApplCount, sDocumentCheckBox())
sDocumentCheckBox(0) = GetResText(&quot;MSDocumentCheckbox_1_&quot;)
sDocumentCheckBox(1) = GetResText(&quot;MSDocumentCheckbox_2_&quot;)
sDocumentCheckBox(2) = GetResText(&quot;MSDocumentCheckbox_3_&quot;)
sKeyName(0) = &quot;Software\Microsoft\Office\8.0\Word\Options&quot;
sKeyName(1) = &quot;Software\Microsoft\Office\8.0\Excel\Microsoft Excel&quot;
@@ -425,11 +344,11 @@ Sub SetupMSConfiguration()
MSFilterName(1,3) = sMSDocumentCheckBox(1)
MSFilterName(1,4) = &quot;Excel&quot;
MSFilterName(2,0) = &quot;ppt|pps|pptx|pptm&quot;
MSFilterName(2,1) = &quot;impress8|impress8|impress8|impress8&quot;
MSFilterName(2,2) = &quot;odp|odp|odp|odp&quot;
MSFilterName(2,0) = &quot;ppt|pps|pptx|pub|pptm|ppsx|ppsm&quot;
MSFilterName(2,1) = &quot;impress8|impress8|impress8|impress8|impress8|impress8|impress8&quot;
MSFilterName(2,2) = &quot;odp|odp|odp|odp|odp|odp|odp&quot;
MSFilterName(2,3) = sMSDocumentCheckBox(2)
MSFilterName(2,4) = &quot;PowerPoint&quot;
MSFilterName(2,4) = &quot;PowerPoint/Publisher&quot;
MSFilterName(3,0) = &quot;dot|dotx|dotm&quot;
MSFilterName(3,1) = &quot;writer8_template|writer8_template|writer8_template&quot;
@@ -451,118 +370,6 @@ Sub SetupMSConfiguration()
End Sub
&apos; This is an extract from &quot;http://util.openoffice.org/source/browse/util/sot/source/base/exchange.cxx?rev=1.25&amp;content-type=text/x-cvsweb-markup&quot;
&apos; about the listed defined mimetypes that are required to define binary StarOffice templates that have for all applications the same extension &quot;.vor&quot;
&apos; 26 SOT_FORMATSTR_ID_STARWRITER_30*/ { &quot;application/x-openoffice-starwriter-30;windows_formatname=\&quot;StarWriter 3.0\&quot;&quot;, &quot;StarWriter 3.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 27 SOT_FORMATSTR_ID_STARWRITER_40*/ { &quot;application/x-openoffice-starwriter-40;windows_formatname=\&quot;StarWriter 4.0\&quot;&quot;, &quot;StarWriter 4.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 28 SOT_FORMATSTR_ID_STARWRITER_50*/ { &quot;application/x-openoffice-starwriter-50;windows_formatname=\&quot;StarWriter 5.0\&quot;&quot;, &quot;StarWriter 5.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 29 SOT_FORMATSTR_ID_STARWRITERWEB_40*/ { &quot;application/x-openoffice-starwriterweb-40;windows_formatname=\&quot;StarWriter/Web 4.0\&quot;&quot;, &quot;StarWriter/Web 4.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 30 SOT_FORMATSTR_ID_STARWRITERWEB_50*/ { &quot;application/x-openoffice-starwriterweb-50;windows_formatname=\&quot;StarWriter/Web 5.0\&quot;&quot;, &quot;StarWriter/Web 5.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 31 SOT_FORMATSTR_ID_STARWRITERGLOB_40*/ { &quot;application/x-openoffice-starwriterglob-40;windows_formatname=\&quot;StarWriter/Global 4.0\&quot;&quot;, &quot;StarWriter/Global 4.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 32 SOT_FORMATSTR_ID_STARWRITERGLOB_50*/ { &quot;application/x-openoffice-starwriterglob-50;windows_formatname=\&quot;StarWriter/Global 5.0\&quot;&quot;, &quot;StarWriter/Global 5.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 33 SOT_FORMATSTR_ID_STARDRAW*/ { &quot;application/x-openoffice-stardraw;windows_formatname=\&quot;StarDrawDocument\&quot;&quot;, &quot;StarDrawDocument&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 34 SOT_FORMATSTR_ID_STARDRAW_40*/ { &quot;application/x-openoffice-stardraw-40;windows_formatname=\&quot;StarDrawDocument 4.0\&quot;&quot;, &quot;StarDrawDocument 4.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 36 SOT_FORMATSTR_ID_STARDRAW_50*/ { &quot;application/x-openoffice-stardraw-50;windows_formatname=\&quot;StarDraw 5.0\&quot;&quot;, &quot;StarDraw 5.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 35 SOT_FORMATSTR_ID_STARIMPRESS_50*/ { &quot;application/x-openoffice-starimpress-50;windows_formatname=\&quot;StarImpress 5.0\&quot;&quot;, &quot;StarImpress 5.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 37 SOT_FORMATSTR_ID_STARCALC*/ { &quot;application/x-openoffice-starcalc;windows_formatname=\&quot;StarCalcDocument\&quot;&quot;, &quot;StarCalcDocument&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 38 SOT_FORMATSTR_ID_STARCALC_40*/ { &quot;application/x-openoffice-starcalc-40;windows_formatname=\&quot;StarCalc 4.0\&quot;&quot;, &quot;StarCalc 4.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 39 SOT_FORMATSTR_ID_STARCALC_50*/ { &quot;application/x-openoffice-starcalc-50;windows_formatname=\&quot;StarCalc 5.0\&quot;&quot;, &quot;StarCalc 5.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 40 SOT_FORMATSTR_ID_STARCHART*/ { &quot;application/x-openoffice-starchart;windows_formatname=\&quot;StarChartDocument\&quot;&quot;, &quot;StarChartDocument&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 41 SOT_FORMATSTR_ID_STARCHART_40*/ { &quot;application/x-openoffice-starchart-40;windows_formatname=\&quot;StarChartDocument 4.0\&quot;&quot;, &quot;StarChartDocument 4.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 42 SOT_FORMATSTR_ID_STARCHART_50*/ { &quot;application/x-openoffice-starchart-50;windows_formatname=\&quot;StarChart 5.0\&quot;&quot;, &quot;StarChart 5.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 46 SOT_FORMATSTR_ID_STARMATH*/ { &quot;application/x-openoffice-starmath;windows_formatname=\&quot;StarMath\&quot;&quot;, &quot;StarMath&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 47 SOT_FORMATSTR_ID_STARMATH_40*/ { &quot;application/x-openoffice-starmath-40;windows_formatname=\&quot;StarMathDocument 4.0\&quot;&quot;, &quot;StarMathDocument 4.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
&apos; 48 SOT_FORMATSTR_ID_STARMATH_50*/ { &quot;application/x-openoffice-starmath-50;windows_formatname=\&quot;StarMath 5.0\&quot;&quot;, &quot;StarMath 5.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
Sub SetupXMLConfiguration()
iApplSection = 1000
Wizardmode = SBXMLMODE
ApplCount = 4
MaxApplCount = 4
XMLTemplateList = Array(&quot;vor&quot;, &quot;sti&quot;, &quot;stw&quot; , &quot;stc&quot; , &quot;std&quot;)
&apos; chkTemplatePath-Captions
GetApplResourceArray(1009 + iApplSection, ApplCount, sTemplateCheckBox())
&apos; DocumentCheckbox- Captions
GetApplResourceArray(1009 + iApplSection + ApplCount, ApplCount, sDocumentCheckBox())
XMLFilterName(0,0) = &quot;sdw|sxw&quot;
XMLFilterName(0,1) = &quot;writer8|writer8&quot;
XMLFilterName(0,2) = &quot;odt|odt&quot;
XMLFilterName(0,3) = sDocumentCheckBox(0)
XMLFilterName(1,0) = &quot;sdc|sxc&quot;
XMLFilterName(1,1) = &quot;calc8|calc8&quot;
XMLFilterName(1,2) = &quot;ods|ods&quot;
XMLFilterName(1,3) = sDocumentCheckBox(1)
If oFactoryKey.HasByName(&quot;com.sun.star.drawing.DrawingDocument&quot;) and oFactoryKey.HasByName(&quot;com.sun.star.presentation.PresentationDocument&quot;) Then
XMLFilterName(2,0) = &quot;sdd|sda|sxi|sxd&quot;
XMLFilterName(2,1) = &quot;impress8|draw8|impress8|draw8&quot;
XMLFilterName(2,2) = &quot;odp|odg|odp|odg&quot;
Elseif oFactoryKey.HasByName(&quot;com.sun.star.drawing.DrawingDocument&quot;) Then
XMLFilterName(2,0) = &quot;sda|sxd&quot;
XMLFilterName(2,1) = &quot;draw8|draw8&quot;
XMLFilterName(2,2) = &quot;odg|odg&quot;
Elseif oFactoryKey.HasByName(&quot;com.sun.star.presentation.PresentationDocument&quot;) Then
XMLFilterName(2,0) = &quot;sdd|sxi&quot;
XMLFilterName(2,1) = &quot;impress8|impress8&quot;
XMLFilterName(2,2) = &quot;odp|odp&quot;
End If
XMLFilterName(2,3) = sDocumentCheckBox(2)
XMLFilterName(3,0) = &quot;smf|sxm&quot;
XMLFilterName(3,1) = &quot;math8|math8&quot;
XMLFilterName(3,2) = &quot;odf|odf&quot;
XMLFilterName(3,3) = sDocumentCheckBox(3)
XMLFilterName(4,0) = &quot;application/x-openoffice-starwriter|application/vnd.stardivision.writer/web|application/vnd.sun.xml.writer|application/vnd.sun.xml.writerweb&quot;
XMLFilterName(4,1) = &quot;writer8_template|writerweb8_writer_template|writer8_template|writerweb8_writer_template&quot;
XMLFilterName(4,2) = &quot;ott|oth|ott|oth&quot;
XMLFilterName(4,3) = sTemplateCheckBox(0)
XMLFilterName(5,0) = &quot;application/x-openoffice-starcalc|application/vnd.sun.xml.calc&quot;
XMLFilterName(5,1) = &quot;calc8_template|calc8_template&quot;
XMLFilterName(5,2) = &quot;ots|ots&quot;
XMLFilterName(5,3) = sTemplateCheckBox(1)
&apos; due to bug #108942# impress templates of the version 4.0 have to be handled in a special way because their mimetype
&apos; falsely points to the draw application.
If oFactoryKey.HasByName(&quot;com.sun.star.drawing.DrawingDocument&quot;) and oFactoryKey.HasByName(&quot;com.sun.star.presentation.PresentationDocument&quot;) Then
XMLFilterName(6,0) = &quot;application/x-openoffice-starimpress|application/x-openoffice-stardraw-40|application/x-openoffice-stardraw|application/vnd.sun.xml.impress|application/vnd.sun.xml.draw&quot;
XMLFilterName(6,1) = &quot;impress8_template|impress8_template|draw8_template|impress8_template|draw8_template&quot;
XMLFilterName(6,2) = &quot;otp|otp|otg|otp|otg&quot;
Elseif oFactoryKey.HasByName(&quot;com.sun.star.drawing.DrawingDocument&quot;) Then
XMLFilterName(6,0) = &quot;application/x-openoffice-stardraw|application/vnd.sun.xml.draw&quot;
XMLFilterName(6,1) = &quot;draw8_template|draw8_template&quot;
XMLFilterName(6,2) = &quot;otg|otg&quot;
Elseif oFactoryKey.HasByName(&quot;com.sun.star.presentation.PresentationDocument&quot;) Then
XMLFilterName(6,0) = &quot;application/x-openoffice-starimpress|application/x-openoffice-stardraw-40|application/vnd.sun.xml.impress&quot;
XMLFilterName(6,1) = &quot;impress8_template|impress8_template|impress8_template&quot;
XMLFilterName(6,2) = &quot;otp|otp|otp&quot;
End If
XMLFilterName(6,3) = sTemplateCheckBox(2)
If oFactoryKey.HasByName(&quot;com.sun.star.text.GlobalDocument&quot;) Then
XMLFilterName(7,0) = &quot;sgl|sxg&quot;
XMLFilterName(7,1) = &quot;writerglobal8|writerglobal8&quot;
XMLFilterName(7,2) = &quot;odm|odm&quot;
XMLFilterName(7,3) = sTemplateCheckBox(3)
End If
End Sub
Function CheckControlPath(oCheckbox as Object, oTextBox as Object, ByVal bDoEnable as Boolean)
Dim sPath as String
If Not bDoEnable Then
@@ -570,7 +377,7 @@ Dim sPath as String
ElseIf oCheckbox.State = 0 Then
CheckControlPath = True
Else
sPath = ConvertToUrl(Trim(oTextBox.Text)
sPath = ConvertToUrl(Trim(oTextBox.Text))
CheckControlPath = oUcb.Exists(sPath)
End If
End Function
@@ -595,10 +402,10 @@ Dim sShowPath as String
Dim oLocUcb as Object
oLocUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
If bGetResources Then
If InitResources(&quot;ImportWizard&quot;,&quot;imp&quot;) then
sNoDirCreation = GetResText(1050)
sMsgDirNotThere = GetResText(1051)
sQueryForNewCreation = GetResText(1052)
If InitResources(&quot;ImportWizard&quot;) then
sNoDirCreation = GetResText(&quot;NoDirCreation&quot;)
sMsgDirNotThere = GetResText(&quot;MsgDirNotThere&quot;)
sQueryForNewCreation = GetResText(&quot;QueryfornewCreation&quot;)
Else
CheckTextBoxPath() = False
Exit Function

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="FilesModul" script:language="StarBasic">Option Explicit
Public AbsTemplateFound as Integer
@@ -36,7 +33,6 @@ Public FileCount as Integer
Public XMLTemplateCount as Integer
Public PathCollection(7,3) as String
Public bIsFirstLogTable as Boolean
Public bFilterTracerIsinsideTable as Boolean
Function ReadCollectionPaths(FilesList() as String, sFilterName() as String)
@@ -61,6 +57,7 @@ Dim NewContentList() as String
Dim XMLTemplateContentString as String
Dim ApplIndex as Integer
Dim bAssignFileName as Boolean
Dim bInterruptSearch as Boolean
bInterruptSearch = False
For i = 0 To MaxCollectIndex
SearchDir = PathCollection(i,0)
@@ -190,7 +187,7 @@ Dim LocXMLTemplateContent as String
iKey = Applications(ApplIndex, SBAPPLKEY)
CurListString = PathCollection(CollectIndex, 2)
LocExtension = sFilterName(iKey +DistIndex, 0)
If Len(LocExtension) &gt; SBMAXEXTENSIONLENGTH Then &apos; 7 == Length of two extensions like &apos;sda|sdd
If Instr(LocExtension, &quot;vnd.sun.xml.&quot;) = 1 Then
LocExtension = SetExtension(LocExtension)
LocContentString = sFilterName(iKey +DistIndex, 0)
LocContentString = ReplaceString(LocContentString, &quot;|&quot;, &quot;;&quot;)
@@ -241,9 +238,6 @@ Dim XMLTemplateContentString as String
XMLTemplateCount = 0
XMLTemplateContentString = &quot;&quot;
For i = 0 To ApplCount-1
If WizardMode = SBXMLMODE Then
XMLTemplateCount = XMLTemplateCount + 1
End If
CheckIfToAddPathToCollection(i, SBTEMPLCONVERT, SBTEMPLSOURCE, SBTEMPLRECURSIVE, sFilterName(), MaxApplCount)
Next i
End Sub
@@ -301,7 +295,7 @@ Dim sPrevMimeTypeorExtension as String
Exit Sub
End If
TotFound = Ubound(FilesList()) + 1
If FilesList(0,0) = &quot;&quot; Then &apos; Querying the number of fields in a multidimensionl Array is unsecure
If FilesList(0,0) = &quot;&quot; Then &apos; Querying the number of fields in a multidimensional Array is unsecure
TotFound = 0 &apos; because it will return the value 0 (and not -1) even when the Array is empty
SetProgressDisplay(0)
End If
@@ -333,7 +327,7 @@ Dim sPrevMimeTypeorExtension as String
CurFiltername = GetFilterName(sMimeTypeorExtension, sFilterName(), sExtension, FilterIndex)
ApplIndex = FilesList(i,2)
If sMimeTypeorExtension &lt;&gt; sPrevMimeTypeorExtension Then
CreateLogTable(ApplIndex, sMimeTypeOrExtension, sFiltername()
CreateLogTable(ApplIndex, sMimeTypeOrExtension, sFiltername())
End If
If ApplIndex &gt; Ubound(Applications) or (ApplIndex &lt; 0) Then
Msgbox &quot;Applicationindex out of bounds:&quot; &amp; sSourcUrl
@@ -362,7 +356,7 @@ Dim sPrevMimeTypeorExtension as String
Elseif iGeneralOverwrite = SBOVERWRITENEVER Then
bDoSave = False
ElseIf ((iGeneralOverWrite = SBOVERWRITEQUERY) OR (iGeneralOverwrite = SBOVERWRITECANCEL)) Then
&apos; Todo: According to AS there might come a new feature that storeasUrl could possibly rise a UI dialog.
&apos; Todo: According to AS there might come a new feature that storeasUrl could possibly rise a UI dialog.
&apos; In this case my own UI becomes obsolete
sCurFileExists = ReplaceString(sFileExists, ConvertFromUrl(sTargetUrl), &quot;&lt;1&gt;&quot;)
sCurFileExists = ReplaceString(sCurFileExists, chr(13), &quot;&lt;CR&gt;&quot;)
@@ -417,7 +411,7 @@ Dim sPrevMimeTypeorExtension as String
FileCount = FileCount + 1
End If
oDocument.Dispose()
InsertTargetUrlToLogDocument(sTargetUrl, sComment, ApplIndex)
InsertTargetUrlToLogDocument(sTargetUrl, sComment)
Else
sCurcouldnotopenDocument = ReplaceString(scouldnotopenDocument, ConvertFromUrl(sSourceUrl), &quot;&lt;1&gt;&quot;)
sComment = ConcatComment(sComment, sCurCouldnotopenDocument)
@@ -456,8 +450,8 @@ Dim s as Integer
FirstList(i,1) = SecList(s,1)
sLocExtension = lcase(FirstList(i,1))
Select Case sLocExtension
Case &quot;sdw&quot;, &quot;sdc&quot;, &quot;sda&quot;, &quot;sdd&quot;, &quot;smf&quot;, &quot;sgl&quot;, &quot;doc&quot;, &quot;xls&quot;, &quot;ppt&quot;, &quot;sxi&quot; , &quot;sxw&quot; , &quot;sxd&quot; , &quot;sxg&quot; , &quot;sxm&quot; , &quot;sxc&quot; , &quot;pps&quot; , &quot;docx&quot; , &quot;docm&quot; , &quot;xlsx&quot; , &quot;xlsm&quot; , &quot;xlsb&quot; , &quot;pptx&quot; , &quot;pptm&quot;
AbsDocuFound = AbsDocuFound + 1
Case &quot;sdw&quot;, &quot;sdc&quot;, &quot;sda&quot;, &quot;sdd&quot;, &quot;smf&quot;, &quot;sgl&quot;, &quot;doc&quot;, &quot;docx&quot;, &quot;docm&quot;, &quot;xls&quot;, &quot;xlsx&quot;, &quot;xlsm&quot;, &quot;ppt&quot;, &quot;pps&quot;, &quot;pptx&quot;, &quot;pptm&quot;, &quot;ppsx&quot;, &quot;ppsm&quot;, &quot;pub&quot;, &quot;sxi&quot;, &quot;sxw&quot;, &quot;sxd&quot;, &quot;sxg&quot;, &quot;sxm&quot;, &quot;sxc&quot;
AbsDocuFound = AbsDocuFound + 1
Case else
AbsTemplateFound = AbsTemplateFound + 1
End Select
@@ -473,13 +467,6 @@ Function GetTargetTemplatePath(Index as Integer)
Select Case WizardMode
Case SBMICROSOFTMODE
GetTargetTemplatePath() = SOTemplatePath &amp; &quot;/&quot; &amp; sTemplateGroupName
Case SBXMLMODE
If Index = 3 Then
&apos; Helper Application
GetTargetTemplatePath = SOWorkPath
Else
GetTargetTemplatePath = SOTemplatePath
End If
End Select
End Function
@@ -539,7 +526,6 @@ Dim oCell
If Not bLogExists Then
Exit Sub
End If
bFilterTracerIsinsideTable = False
FilterIndex = GetIndexForPartStringinMultiArray(sFilterName(), CurFileContent, 0)
sDocumentType = sFiltername(FilterIndex,3)
oLogCursor = oLogDocument.Text.createTextCursor()
@@ -554,36 +540,15 @@ Dim oCell
oLogCursor.HyperLinkTarget = &quot;&quot;
oLogCursor.ParaStyleName = &quot;Heading 1&quot;
oLogCursor.setString(sDocumentType)
If WizardMode = SBMICROSOFTMODE Then
If bFilterTracingAvailable Then
If bMSApplFilterTracingAvailable(ApplIndex) Then
Dim CurFilterTracingPath as String
CurFilterTracingPath = FilterTracingLogPath(ApplIndex)
bFilterTracerIsinsideTable = (bTakeOverTargetName(ApplIndex) Or bTakeOverPathName(ApplIndex))
If Not bFilterTracerIsinsideTable Then
oLogCursor.CollapseToEnd()
oLogDocument.Text.insertControlCharacter(oLogCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
InsertCommandButtonatViewCursor(oLogDocument, oLogCursor, CurFilterTracingPath)
End If
End If
End If
End If
oLogCursor.CollapsetoEnd()
oLogDocument.Text.insertControlCharacter(oLogCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
oLogTable = oLogDocument.CreateInstance(&quot;com.sun.star.text.TextTable&quot;)
oLogTable.RepeatHeadline = true
If bFilterTracerIsinsideTable Then
oLogTable.initialize(2,3)
End If
oLogCursor.Text.InsertTextContent(oLogCursor, oLogTable, True)
oTextCursor = oLogTable.GetCellbyPosition(0,0).createTextCursor()
oTextCursor.SetString(sSourceDocuments)
oTextCursor = oLogTable.GetCellbyPosition(1,0).createTextCursor()
oTextCursor.SetString(sTargetDocuments)
If bFilterTracerIsinsideTable Then
oTextCursor = oLogTable.GetCellbyPosition(2,0).createTextCursor()
oTextCursor.SetString(&quot;FilterTracer&quot;)
End If
bInsertRow = False
End Sub
@@ -650,27 +615,7 @@ Dim bLogIsThere as Boolean
End Sub
Function GetFilterTracingLogPath(sTargetUrl as String, ApplIndex) as String
Dim TargetFileName as String
Dim sTargetFolder as String
Dim CurFilterTracingPath as String
Dim CurFilterTracingname as String
Dim CurFilterFolder as String
CurFilterTracingPath = FilterTracingLogPath(ApplIndex)
If bTakeOverTargetName(ApplIndex) Then
TargetFilename = GetFileNameWithoutextension(sTargetUrl, &quot;/&quot;)
CurFilterFolder = DirectoryNameoutofPath(FilterTracingLogPath(ApplIndex), &quot;/&quot;)
CurFilterTracingpath = CurFilterFolder &amp; &quot;/&quot; &amp; TargetFilename &amp; &quot;.log&quot;
End If
If bTakeOverPathName(ApplIndex) Then &apos;Replace the Folder in the FilterTracerpath by the Folder of the targetUrl
sTargetFolder = DirectoryNameoutofPath(sTargetUrl,&quot;/&quot;)
CurFilterTracingPath = sTargetFolder &amp; &quot;/&quot; &amp; FileNameoutofPath(CurFilterTracingPath, &quot;/&quot;)
End If
GetFilterTracingLogPath() = CurFilterTracingPath
End Function
Sub InsertTargetUrlToLogDocument(sTargetUrl as String, sComment as String, ApplIndex as Integer)
Sub InsertTargetUrlToLogDocument(sTargetUrl as String, sComment as String)
Dim oCell
Dim oTextCursor
Dim CurFilterTracingpath as String
@@ -679,12 +624,6 @@ Dim CurFilterTracingpath as String
oCell = oLogTable.GetCellbyPosition(1,oLogTable.Rows.Count-1)
InsertCommentToLogCell(sComment, oCell)
InsertHyperLinkToLogCell(sTargetUrl, oCell)
If bFilterTracerIsinsideTable Then
oCell = oLogTable.getCellByPosition(2, oLogTable.Rows.Count-1)
oTextCursor = oCell.Text.CreateTextCursor()
CurFilterTracingpath = GetFilterTracingLogPath(sTargetUrl, ApplIndex)
InsertCommandButtonatViewCursor(oLogDocument, oTextCursor, CurFilterTracingPath)
End If
oLogDocument.Store()
End If
End If

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="ImportDialog" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:page="4" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_DIALOG" dlg:closeable="true" dlg:moveable="true" dlg:title="ImportDialog">
<dlg:bulletinboard>
<dlg:text dlg:id="lblTemplateExport" dlg:tab-index="0" dlg:left="12" dlg:top="94" dlg:width="60" dlg:height="8" dlg:page="2" dlg:value="lblTemplateExport"/>
@@ -44,7 +41,7 @@
<dlg:text dlg:id="LabelCurDocumentRetrieval" dlg:tab-index="13" dlg:left="15" dlg:top="91" dlg:width="249" dlg:height="8" dlg:page="4" dlg:value="LabelCurDocumentRetrieval"/>
<dlg:text dlg:id="LabelCurProgress" dlg:tab-index="14" dlg:left="10" dlg:top="106" dlg:width="255" dlg:height="8" dlg:page="4" dlg:value="LabelCurProgress"/>
<dlg:text dlg:id="LabelCurDocument" dlg:tab-index="15" dlg:left="15" dlg:top="118" dlg:width="249" dlg:height="20" dlg:page="4" dlg:value="LabelCurDocument" dlg:multiline="true"/>
<dlg:img dlg:id="ImportPreview" dlg:tab-index="16" dlg:left="5" dlg:top="6" dlg:width="258" dlg:height="26" dlg:scale-image="false"/>
<dlg:img dlg:id="ImportPreview" dlg:tab-index="16" dlg:left="6" dlg:top="6" dlg:width="258" dlg:height="26" dlg:scale-image="false"/>
<dlg:button dlg:id="cmdBack" dlg:tab-index="17" dlg:left="155" dlg:top="190" dlg:width="50" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CMDPREV" dlg:value="cmdBack">
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.Main.PrevStep?language=Basic&amp;location=application" script:language="Script"/>
</dlg:button>
@@ -70,46 +67,30 @@
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.DialogModul.TakoverFolderName?language=Basic&amp;location=application" script:language="Script"/>
</dlg:button>
<dlg:radiogroup>
<dlg:radio dlg:id="optSODocuments" dlg:tab-index="27" dlg:left="6" dlg:top="72" dlg:width="258" dlg:height="9" dlg:page="1" dlg:tag="SO" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_OPTSODOCUMENTS" dlg:value="optSODocuments" dlg:checked="true">
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleCheckboxes?language=Basic&amp;location=application" script:language="Script"/>
</dlg:radio>
<dlg:radio dlg:id="optMSDocuments" dlg:tab-index="28" dlg:left="6" dlg:top="113" dlg:width="258" dlg:height="9" dlg:page="1" dlg:tag="MS" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_OPTMSDOCUMENTS" dlg:value="optMSDocuments">
<dlg:radio dlg:id="optMSDocuments" dlg:tab-index="27" dlg:left="6" dlg:top="72" dlg:width="258" dlg:height="9" dlg:page="1" dlg:tag="MS" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_OPTMSDOCUMENTS" dlg:value="optMSDocuments" dlg:checked="true">
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleCheckboxes?language=Basic&amp;location=application" script:language="Script"/>
</dlg:radio>
</dlg:radiogroup>
<dlg:checkbox dlg:id="chkSOApplication1" dlg:tab-index="29" dlg:left="12" dlg:top="85" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CHKWRITER" dlg:value="chkSOApplication1" dlg:checked="false">
<dlg:checkbox dlg:id="chkMSApplication1" dlg:tab-index="29" dlg:disabled="true" dlg:left="12" dlg:top="85" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CHKWORD" dlg:value="chkMSApplication1" dlg:checked="false">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
</dlg:checkbox>
<dlg:checkbox dlg:id="chkSOApplication2" dlg:tab-index="30" dlg:left="155" dlg:top="85" dlg:width="109" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CHKCALC" dlg:value="chkSOApplication2" dlg:checked="false">
<dlg:checkbox dlg:id="chkMSApplication2" dlg:tab-index="30" dlg:disabled="true" dlg:left="155" dlg:top="85" dlg:width="109" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CHKEXCEL" dlg:value="chkMSApplication2" dlg:checked="false">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
</dlg:checkbox>
<dlg:checkbox dlg:id="chkSOApplication3" dlg:tab-index="31" dlg:left="12" dlg:top="98" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CHKIMPRESS" dlg:value="chkSOApplication3" dlg:checked="false">
<dlg:checkbox dlg:id="chkMSApplication3" dlg:tab-index="31" dlg:disabled="true" dlg:left="12" dlg:top="98" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CHKPOWERPOINT" dlg:value="chkMSApplication3" dlg:checked="false">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
</dlg:checkbox>
<dlg:checkbox dlg:id="chkSOApplication4" dlg:tab-index="32" dlg:left="155" dlg:top="98" dlg:width="109" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CHKMATHGLOBAL" dlg:value="chkSOApplication4" dlg:checked="false">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
</dlg:checkbox>
<dlg:checkbox dlg:id="chkMSApplication1" dlg:tab-index="33" dlg:disabled="true" dlg:left="12" dlg:top="126" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CHKWORD" dlg:value="chkMSApplication1" dlg:checked="false">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
</dlg:checkbox>
<dlg:checkbox dlg:id="chkMSApplication2" dlg:tab-index="34" dlg:disabled="true" dlg:left="155" dlg:top="126" dlg:width="109" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CHKEXCEL" dlg:value="chkMSApplication2" dlg:checked="false">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
</dlg:checkbox>
<dlg:checkbox dlg:id="chkMSApplication3" dlg:tab-index="35" dlg:disabled="true" dlg:left="12" dlg:top="139" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CHKPOWERPOINT" dlg:value="chkMSApplication3" dlg:checked="false">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
</dlg:checkbox>
<dlg:text dlg:id="WelcomeTextLabel2" dlg:tab-index="36" dlg:disabled="true" dlg:left="6" dlg:top="152" dlg:width="258" dlg:height="18" dlg:page="1" dlg:value="WelcomeTextLabel2" dlg:multiline="true"/>
<dlg:checkbox dlg:id="chkTemplatePath" dlg:tab-index="37" dlg:left="12" dlg:top="48" dlg:width="240" dlg:height="10" dlg:page="2" dlg:tag="Template" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATE" dlg:value="chkTemplatePath" dlg:checked="true">
<dlg:checkbox dlg:id="chkTemplatePath" dlg:tab-index="36" dlg:left="12" dlg:top="48" dlg:width="240" dlg:height="10" dlg:page="2" dlg:tag="Template" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATE" dlg:value="chkTemplatePath" dlg:checked="true">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.DialogModul.ToggleInputPaths?language=Basic&amp;location=application" script:language="Script"/>
</dlg:checkbox>
<dlg:checkbox dlg:id="chkTemplateSearchSubDir" dlg:tab-index="38" dlg:left="12" dlg:top="61" dlg:width="240" dlg:height="10" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATERECURSE" dlg:value="chkTemplateSearchSubDir" dlg:checked="false"/>
<dlg:text dlg:id="lblTemplateImport" dlg:tab-index="39" dlg:left="12" dlg:top="78" dlg:width="60" dlg:height="8" dlg:page="2" dlg:value="lblTemplateImport"/>
<dlg:checkbox dlg:id="chkLogfile" dlg:tab-index="40" dlg:left="6" dlg:top="171" dlg:width="136" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CHKLOGFILE" dlg:value="chkLogfile" dlg:checked="true"/>
<dlg:fixedline dlg:id="hlnTemplates" dlg:tab-index="41" dlg:left="6" dlg:top="37" dlg:width="258" dlg:height="8" dlg:page="2" dlg:value="hlnTemplates"/>
<dlg:fixedline dlg:id="hlnDocuments" dlg:tab-index="42" dlg:left="6" dlg:top="110" dlg:width="258" dlg:height="8" dlg:page="2" dlg:value="hlnDocuments"/>
<dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="43" dlg:left="6" dlg:top="181" dlg:width="258" dlg:height="6"/>
<dlg:fixedline dlg:id="hlnProgress" dlg:tab-index="44" dlg:left="6" dlg:top="55" dlg:width="258" dlg:height="8" dlg:page="4" dlg:value="hlnProgress"/>
<dlg:button dlg:id="cmdShowLogFile" dlg:tab-index="45" dlg:disabled="true" dlg:left="75" dlg:top="142" dlg:width="120" dlg:height="14" dlg:page="4" dlg:value="cmdShowLogFile">
<dlg:checkbox dlg:id="chkTemplateSearchSubDir" dlg:tab-index="37" dlg:left="12" dlg:top="61" dlg:width="240" dlg:height="10" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATERECURSE" dlg:value="chkTemplateSearchSubDir" dlg:checked="false"/>
<dlg:text dlg:id="lblTemplateImport" dlg:tab-index="38" dlg:left="12" dlg:top="78" dlg:width="60" dlg:height="8" dlg:page="2" dlg:value="lblTemplateImport"/>
<dlg:checkbox dlg:id="chkLogfile" dlg:tab-index="39" dlg:left="6" dlg:top="171" dlg:width="136" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CHKLOGFILE" dlg:value="chkLogfile" dlg:checked="true"/>
<dlg:fixedline dlg:id="hlnTemplates" dlg:tab-index="40" dlg:left="6" dlg:top="37" dlg:width="258" dlg:height="8" dlg:page="2" dlg:value="hlnTemplates"/>
<dlg:fixedline dlg:id="hlnDocuments" dlg:tab-index="41" dlg:left="6" dlg:top="110" dlg:width="258" dlg:height="8" dlg:page="2" dlg:value="hlnDocuments"/>
<dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="42" dlg:left="6" dlg:top="181" dlg:width="258" dlg:height="6"/>
<dlg:fixedline dlg:id="hlnProgress" dlg:tab-index="43" dlg:left="6" dlg:top="55" dlg:width="258" dlg:height="8" dlg:page="4" dlg:value="hlnProgress"/>
<dlg:button dlg:id="cmdShowLogFile" dlg:tab-index="44" dlg:disabled="true" dlg:left="75" dlg:top="142" dlg:width="120" dlg:height="14" dlg:page="4" dlg:value="cmdShowLogFile">
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.FilesModul.OpenLogDocument?language=Basic&amp;location=application" script:language="Script"/>
</dlg:button>
</dlg:bulletinboard>

View File

@@ -1,31 +1,26 @@
<?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="Language" script:language="StarBasic">Option Explicit
Public sMSTemplateCheckbox(2) As String
Public sMSDocumentCheckbox(2) As String
Public sSODocumentCheckbox(4) As String
Public sSOHelperdocuments(1,1) As String
Public sTemplateCheckbox(SBMAXAPPLCOUNT-1) As String
Public sDocumentCheckbox(SBMAXAPPLCOUNT-1) As String
Public sTemplateGroupName As String
@@ -39,7 +34,7 @@ Public SOApplicationName(5) As String
Public sHelpButton As String, sCancelButton As String, sBackButton As String, sNextButton As String
Public sSumInclusiveSubDir As String, sSumSaveDocuments As String
Public sSummaryHeader As String
Public sWelcometextLabel1 As String, sWelcometextLabel2 As String, sWelcometextLabel3 As String
Public sWelcometextLabel1 As String, sWelcometextLabel3 As String
Public sBeginButton As String, sMsgDirNotThere As String
Public sQueryForNewCreation As String, sPathError3 As String
Public sNoDirCreation As String
@@ -54,108 +49,96 @@ Public sReady as String, sTitle as String
Public sCloseButton as String
Public sSourceDocuments as String
Public sTargetDocuments as String
Public sSumSODocuments(4) as String
Public sSumSOTemplates(4) as String
Public sSumMSDocuments(3) as String
Public sSumMSTemplates(3) as String
Public ModuleList(3) as String
Public sLogSummary as String
Public sReeditMacro as String
Public sOverwriteallFiles as String
Public scouldnotopenDocument as String
Public sCouldnotopenDocument as String
Public sCurcouldnotopenDocument as String
Public scouldnotsaveDocument as String
Public sCouldnotsaveDocument as String
Public sCurcouldnotsaveDocument as String
Sub LoadLanguage()
If InitResources(&quot;ImportWizard&quot;,&quot;imp&quot;) then
sHelpButton = GetResText(1000)
sCancelButton = GetResText(1001)
sBackButton = GetResText(1002)
sNextButton = GetResText(1003)
sBeginButton = GetResText(1004)
sCloseButton = GetResText(1005)
sWelcometextLabel1 = ReplaceString(GetResText(1006), GetProductName(),&quot;%PRODUCTNAME&quot;)
sWelcometextLabel2 = GetResText(1007)
sWelcometextLabel3 = GetResText(1008)
If InitResources(&quot;ImportWizard&quot;) then
sHelpButton = GetResText(&quot;HelpButton&quot;)
sCancelButton = GetResText(&quot;CancelButton&quot;)
sBackButton = GetResText(&quot;BackButton&quot;)
sNextButton = GetResText(&quot;NextButton&quot;)
sBeginButton = GetResText(&quot;BeginButton&quot;)
sCloseButton = GetResText(&quot;CloseButton&quot;)
sWelcometextLabel1 = ReplaceString(GetResText(&quot;WelcometextLabel1&quot;), GetProductName(),&quot;%PRODUCTNAME&quot;)
sWelcometextLabel3 = GetResText(&quot;WelcometextLabel3&quot;)
&apos; Microsoft Documents
GetApplResourceArray(1009, 3, sMSTemplateCheckBox())
sMSTemplateCheckBox(0) = GetResText(&quot;MSTemplateCheckbox_1_&quot;)
sMSTemplateCheckBox(1) = GetResText(&quot;MSTemplateCheckbox_2_&quot;)
sMSTemplateCheckBox(2) = GetResText(&quot;MSTemplateCheckbox_3_&quot;)
&apos; DocumentCheckbox- Captions
GetApplResourceArray(1012, 3, sMSDocumentCheckBox())
&apos; DocumentCheckbox- Captions
GetApplResourceArray(2013, 5, sSODocumentCheckBox())
sMSDocumentCheckBox(0) = GetResText(&quot;MSDocumentCheckbox_1_&quot;)
sMSDocumentCheckBox(1) = GetResText(&quot;MSDocumentCheckbox_2_&quot;)
sMSDocumentCheckBox(2) = GetResText(&quot;MSDocumentCheckbox_3_&quot;)
&apos;StarOffice Applicationnames
sSOHelperDocuments(0,0) = GetResText(2017)
sSOHelperDocuments(0,1) = &quot;com.sun.star.text.GlobalDocument&quot;
sSOHelperDocuments(1,0) = GetResText(2018)
sSOHelperDocuments(1,1) = &quot;com.sun.star.formula.FormulaProperties&quot;
GetApplResourceArray(2017,2, sSOHelperDocuments())
sContainerName(0) = GetResText(1030)
&apos; Note: for the version 5.2 there was no Productname &quot;StarSuite&quot;
sContainerName(1) = &quot;StarOffice&quot;
sSummaryHeader = GetResText(1031)
sContainerName(0) = GetResText(&quot;MSContainerName&quot;)
sTemplateGroupName = GetResText(1036)
sSummaryHeader = GetResText(&quot;SummaryHeader&quot;)
sProgressMoreDocs = GetResText(1041)
sProgressMoreTemplates = GetResText(1042)
sNoDirCreation = GetResText(1050)
sMsgDirNotThere = GetResText(1051)
sQueryForNewCreation = GetResText(1052)
sFileExists = GetResText(1053)
sMorePathsError3 = GetResText(1054)
sConvertError1 = GetResText(1055)
sConvertError2 = GetResText(1056)
sRTErrorDesc = GetResText(1057)
sRTErrorHeader = GetResText(1058)
sOverwriteallFiles = GetResText(1070)
sReeditMacro = GetResText(1071)
scouldnotsaveDocument = GetResText(1072)
scouldnotopenDocument = GetResText(1073)
sPathDialogMessage = GetResText(1080)
sTitle = GetResText(1081)
sTemplateGroupName = GetResText(&quot;GroupnameDefault&quot;)
sProgressPage_1 = GetResText(1090)
sProgressPage_2 = GetResText(1091)
sProgressPage_3 = GetResText(1092)
sProgressFound = GetResText(1093)
sProgressPage_5 = GetResText(1094)
sReady = GetResText(1100)
sSourceDocuments = GetResText(2030)
sTargetDocuments = GetResText(2031)
sLogSummary = GetResText(2034)
sSumInclusiveSubDir = GetResText(3000)
sSumSaveDocuments = GetResText(3001)
&apos;StarOffice Applicationnames
GetApplResourceArray(3100, 4, sSumSODocuments())
GetApplResourceArray(3110, 4, sSumSOTemplates())
GetApplResourceArray(3200, 3, sSumMSDocuments())
GetApplResourceArray(3210, 3, sSumMSTemplates())
sProgressMoreDocs = GetResText(&quot;ProgressMoreDocs&quot;)
sProgressMoreTemplates = GetResText(&quot;ProgressMoreTemplates&quot;)
sNoDirCreation = GetResText(&quot;NoDirCreation&quot;)
sMsgDirNotThere = GetResText(&quot;MsgDirNotThere&quot;)
sQueryForNewCreation = GetResText(&quot;QueryfornewCreation&quot;)
sFileExists = GetResText(&quot;FileExists&quot;)
sMorePathsError3 = GetResText(&quot;MorePathsError3&quot;)
sConvertError1 = GetResText(&quot;ConvertError1&quot;)
sConvertError2 = GetResText(&quot;ConvertError2&quot;)
sRTErrorDesc = GetResText(&quot;RTErrorDesc&quot;)
sRTErrorHeader = GetResText(&quot;RTErrorHeader&quot;)
sOverwriteallFiles = GetResText(&quot;OverwriteallFiles&quot;)
sReeditMacro = GetResText(&quot;ReeditMacro&quot;)
sCouldnotsaveDocument = GetResText(&quot;CouldNotsaveDocument&quot;)
sCouldnotopenDocument = GetResText(&quot;CouldNotopenDocument&quot;)
sPathDialogMessage = GetResText(&quot;PathDialogMessage&quot;)
sTitle = GetResText(&quot;DialogTitle&quot;)
sProgressPage_1 = GetResText(&quot;ProgressPage1&quot;)
sProgressPage_2 = GetResText(&quot;ProgressPage2&quot;)
sProgressPage_3 = GetResText(&quot;ProgressPage3&quot;)
sProgressFound = GetResText(&quot;ProgressFound&quot;)
sProgressPage_5 = GetResText(&quot;ProgressPage5&quot;)
sReady = GetResText(&quot;Ready&quot;)
sSourceDocuments = GetResText(&quot;SourceDocuments&quot;)
sTargetDocuments = GetResText(&quot;TargetDocuments&quot;)
sLogSummary = GetResText(&quot;LogfileSummary&quot;)
sSumInclusiveSubDir = GetResText(&quot;SumInclusiveSubDir&quot;)
sSumSaveDocuments = GetResText(&quot;SumSaveDokumente&quot;)
sSumMSDocuments(0) = GetResText(&quot;SumMSTextDocuments&quot;)
sSumMSDocuments(1) = GetResText(&quot;SumMSTableDocuments&quot;)
sSumMSDocuments(2) = GetResText(&quot;SumMSDrawDocuments&quot;)
sSumMSTemplates(0) = GetResText(&quot;SumMSTextTemplates&quot;)
sSumMSTemplates(1) = GetResText(&quot;SumMSTableTemplates&quot;)
sSumMSTemplates(2) = GetResText(&quot;SumMSDrawTemplates&quot;)
With ImportDialog
sImportLabel = GetResText(1033)
sExportLabel = GetResText(1034)
sSearchInSubDir = GetResText(1022)
sImportLabel = GetResText(&quot;TextImportLabel&quot;)
sExportLabel = GetResText(&quot;TextExportLabel&quot;)
sSearchInSubDir = GetResText(&quot;SearchInSubDir&quot;)
.chkTemplateSearchSubDir.Label = sSearchInSubDir
.lblDocumentImport.Label = sImportLabel
.lblDocumentExport.Label = sExportLabel
.chkDocumentSearchSubDir.Label = sSearchInSubDir
.lblTemplateImport.Label = sImportLabel
.lblTemplateExport.Label = sExportLabel
.chkLogfile.Label = GetResText(2032)
.chkLogfile.Helptext = GetResText(2033)
Dim Blabla as String
blabla = GetResText(1072)
.cmdShowLogFile.Label = GetResText(2035)
.chkLogfile.Label = GetResText(&quot;CreateLogfile&quot;)
.chkLogfile.Helptext = GetResText(&quot;LogfileHelpText&quot;)
.cmdShowLogFile.Label = GetResText(&quot;ShowLogfile&quot;)
End With
ModuleList(0) = &quot;com.sun.star.text.TextDocument&quot;
ModuleList(1) = &quot;com.sun.star.sheet.SpreadsheetDocument&quot;
@@ -164,14 +147,4 @@ Sub LoadLanguage()
End If
End Sub
Sub GetApplResourceArray(StartResIndex as Integer, Count as Integer, BigArray())
Dim i as Integer
Dim a as Integer
a = 0
For i = StartResIndex To StartResIndex + Count-1
BigArray(a) = GetResText(i)
a = a + 1
Next
End Sub
</script:module>

View File

@@ -1,35 +1,32 @@
<?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="Main" script:language="StarBasic">Option Explicit
REM ***** BASIC *****
&apos; ***** BASIC *****
Public HeaderPreviews(4) as Object
Public ImportDialog as Object
Public ImportDialogArea as Object
Public oFactoryKey as Object
Public bShowLogFile as Boolean
&apos; If the ProgressPage ist already on Top The Dialog will be immediately closed when this flag is
&apos; If the ProgressPage is already on Top The Dialog will be immediately closed when this flag is
&apos; set to False
Public bConversionIsRunning as Boolean
Public RetValue as Integer
@@ -50,22 +47,23 @@ Sub Main()
If GetImportWizardPaths() = False Then
Exit Sub
End If
bCancelTask = False
bDoKeepApplValues = False
bCancelTask = False
bDoKeepApplValues = False
CurOffice = 0
ImportDialogArea = LoadDialog(&quot;ImportWizard&quot;,&quot;ImportDialog&quot;)
ImportDialog = ImportDialogArea.Model
LoadLanguage()
WizardMode = SBXMLMODE
MaxApplCount = 4
WizardMode = SBMICROSOFTMODE
MaxApplCount = 3
FillStep_Welcome()
RepaintHeaderPreview()
ImportDialog.ImportPreview.BackGroundColor = RGB(0,60,126)
ImportDialog.ImportPreview.BackGroundColor = RGB(0,60,126)
ImportDialog.cmdGoOn.DefaultButton = True
ImportDialogArea.GetControl(&quot;optSODocuments&quot;).SetFocus()
ToggleCheckboxesWithBoolean(False)
ImportDialogArea.GetControl(&quot;optMSDocuments&quot;).SetFocus()
ToggleCheckboxesWithBoolean(True)
RetValue = ImportDialogArea.Execute()
If bShowLogFile=TRUE Then
If bShowLogFile=TRUE Then
OpenDocument(sLogUrl, NoArgs())
End if
If RetValue = 0 Then
@@ -79,7 +77,6 @@ RTError:
End Sub
Sub NextStep()
Dim iCurStep as Integer
If Not bDebugWizard Then
@@ -106,8 +103,6 @@ Dim iCurStep as Integer
Select Case WizardMode
Case SBMICROSOFTMODE
Call ConvertAllDocuments(MSFilterName())
CASE SBXMLMODE
Call ConvertAllDocuments(XMLFilterName())
End Select
Case 4
CancelTask(True)
@@ -116,15 +111,14 @@ Dim iCurStep as Integer
If ((ImportDialog.chkLogfile.State &lt;&gt; 1) OR (iCurStep &lt;&gt; 3)) Then
ImportDialog.cmdGoOn.DefaultButton = True
End If
RepaintHeaderPreview()
RepaintHeaderPreview()
Exit Sub
RTError:
Msgbox sRTErrorDesc, 16, sRTErrorHeader
End Sub
Sub PrevStep()
Dim iCurStep as Integer
If Not bDebugWizard Then
@@ -145,18 +139,18 @@ Dim iCurStep as Integer
FillStep_InputPaths(CurOffice, False)
Else
FillStep_Welcome()
ToggleCheckboxesWithBoolean(True)
bDoKeepApplValues = True
End If
End Select
ImportDialog.cmdGoOn.DefaultButton = True
RepaintHeaderPreview()
RepaintHeaderPreview()
Exit Sub
RTError:
Msgbox sRTErrorDesc, 16, sRTErrorHeader
End Sub
Sub CancelTask()
If bConversionIsRunning Then
If Msgbox(sConvertError1, 36, sConvertError2) = 6 Then
@@ -186,9 +180,9 @@ Dim LocPrefix as String
LocPrefix = WizardMode
LocPrefix = ReplaceString(LocPrefix,&quot;XML&quot;, &quot;SO&quot;)
If CurStep = 2 Then
sBitmapPath = SOBitmapPath &amp; LocPrefix &amp; &quot;-Import_&quot; &amp; CurStep &amp; &quot;-&quot; &amp; Applications(CurOffice,SBAPPLKEY) + 1 &amp; &quot;.bmp&quot;
sBitmapPath = SOBitmapPath &amp; LocPrefix &amp; &quot;-Import_&quot; &amp; CurStep &amp; &quot;-&quot; &amp; Applications(CurOffice,SBAPPLKEY) + 1 &amp; &quot;.png&quot;
Else
sBitmapPath = SOBitmapPath &amp; &quot;Import_&quot; &amp; CurStep &amp; &quot;.bmp&quot;
sBitmapPath = SOBitmapPath &amp; &quot;Import_&quot; &amp; CurStep &amp; &quot;.png&quot;
End If
ImportDialog.ImportPreview.ImageURL = sBitmapPath
End Sub
@@ -206,7 +200,7 @@ Function CheckInstalledModule(Index as Integer) as Boolean
Dim ModuleName as String
Dim NameList() as String
Dim MaxIndex as Integer
Dim i as Integer
Dim i as Integer
ModuleName = ModuleList(Index)
If Instr(1,ModuleName,&quot;/&quot;) &lt;&gt; 0 Then
CheckInstalledModule() = False
@@ -226,7 +220,7 @@ Sub ToggleCheckboxes(oEvent as Object)
Dim bMSEnable as Boolean
WizardMode = oEvent.Source.Model.Tag
bMSEnable = WizardMode = &quot;MS&quot;
ToggleCheckBoxesWithBoolean(bMSEnable)
ToggleCheckboxesWithBoolean(bMSEnable)
End Sub
@@ -235,20 +229,14 @@ Sub ToggleCheckboxesWithBoolean(bMSEnable as Boolean)
WizardMode = SBMICROSOFTMODE
MaxApplCount = 3
Else
WizardMode = SBXMLMODE
MaxApplCount = 4
&apos;Not supposed to happen - is there an assert in BASIC...
End If
With ImportDialogArea
.GetControl(&quot;chkSOApplication1&quot;).Model.Enabled = Not bMSEnable
.GetControl(&quot;chkSOApplication2&quot;).Model.Enabled = Not bMSEnable
.GetControl(&quot;chkSOApplication3&quot;).Model.Enabled = Not bMSEnable
.GetControl(&quot;chkSOApplication4&quot;).Model.Enabled = Not bMSEnable
.GetControl(&quot;chkMSApplication1&quot;).Model.Enabled = bMSEnable
.GetControl(&quot;chkMSApplication2&quot;).Model.Enabled = bMSEnable
.GetControl(&quot;chkMSApplication3&quot;).Model.Enabled = bMSEnable
End With
CheckModuleInstallation()
ImportDialog.WelcomeTextLabel2.Enabled = bMSEnable
bDoKeepApplValues = False
ToggleNextButton()
End Sub
@@ -264,8 +252,6 @@ Dim i as Integer
With ImportDialog
If .optMSDocuments.State = 1 Then
bDoEnable = .chkMSApplication1.State = 1 Or .chkMSApplication2.State = 1 Or .chkMSApplication3.State = 1
Else
bDoEnable = .chkSOApplication1.State = 1 Or .chkSOApplication2.State = 1 Or .chkSOApplication3.State = 1 Or .chkSOApplication4.State = 1
End If
End With
bDoKeepApplValues = False
@@ -277,18 +263,13 @@ Dim i as Integer
End Sub
Sub TakeOverPathSettings()
Sub TakeOverPathSettings()
&apos;Takes over the Pathsettings from the first selected application to the next applications
If Applications(CurOffice,SBDOCSOURCE) = &quot;&quot; Then
Applications(CurOffice,SBDOCSOURCE) = Applications(0,SBDOCSOURCE)
Applications(CurOffice,SBDOCTARGET) = Applications(0,SBDOCTARGET)
If WizardMode = SBXMLMODE AND Applications(CurOffice,SBAPPLKEY) = 3 Then
Applications(CurOffice,SBTEMPLSOURCE) = Applications(CurOffice,SBDOCSOURCE)
Applications(CurOffice,SBTEMPLTARGET) = Applications(CurOffice,SBDOCTARGET)
Else
Applications(CurOffice,SBTEMPLSOURCE) = Applications(0,SBTEMPLSOURCE)
Applications(CurOffice,SBTEMPLTARGET) = Applications(0,SBTEMPLTARGET)
End If
Applications(CurOffice,SBTEMPLSOURCE) = Applications(0,SBTEMPLSOURCE)
Applications(CurOffice,SBTEMPLTARGET) = Applications(0,SBTEMPLTARGET)
End If
End Sub
@@ -304,7 +285,7 @@ Function GetImportWizardPaths() as Boolean
Exit Function
End If
End If
End If
End If
GetImportWizardPaths() = False
End Function
</script:module>