mirror of
https://github.com/kekingcn/kkFileView.git
synced 2026-04-19 22:28:38 +00:00
集成OpenOffice替换为LibreOffice
This commit is contained in:
@@ -1,25 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
||||
<!--***********************************************************
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
***********************************************************-->
|
||||
<!--
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed
|
||||
* with this work for additional information regarding copyright
|
||||
* ownership. The ASF licenses this file to you under the Apache
|
||||
* License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
-->
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="API" script:language="StarBasic">Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" _
|
||||
(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
|
||||
' Helper Application with no templates
|
||||
GetTemplateDefaultPath = SOWorkPath
|
||||
Else
|
||||
GetTemplateDefaultPath = SOTemplatePath
|
||||
End If
|
||||
End Select
|
||||
NOVALIDSYSTEMPATH:
|
||||
If Err <> 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 ' Returnvalue API-Call
|
||||
Dim hKey As Long ' Onen key handle
|
||||
Dim hKey As Long ' One key handle
|
||||
Dim vValue As String ' Key value
|
||||
|
||||
lRetVal = RegOpenKeyEx(BaseKey, sKeyName, 0, KEY_ALL_ACCESS, hKey)
|
||||
|
||||
@@ -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 = "MS"
|
||||
Public Const SBXMLMODE = "SO"
|
||||
' 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 'Number of different formats
|
||||
Public FilterTracingLogPath(2) as String
|
||||
Public bMSApplFilterTracingAvailable(2) as String
|
||||
Public bTakeOverTargetName(2) as Boolean
|
||||
Public bTakeOverPathName(2) as Boolean
|
||||
|
||||
' e.g.:
|
||||
' XMLFilterName(x,0) = "sdw" ' in documents we take the extensions; in SO-templates the appropriate Filtername
|
||||
' XMLFilterName(x,1) = "swriter: StarWriter 5.0" ' the filtername of the target-format
|
||||
' XMLFilterName(x,2) = "sxw" ' the target extension
|
||||
|
||||
Public Applications(SBMAXAPPLCOUNT-1,9)
|
||||
|
||||
@@ -89,8 +73,6 @@ Public XMLTemplateList()
|
||||
' Applications(X,8) = "File:///..." (TargetUrl of the templates)
|
||||
' 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()
|
||||
'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 & " - " & sSODocumentCheckBox(Index)
|
||||
Else
|
||||
If WizardMode = SBMICROSOFTMODE Then
|
||||
ImportDialogArea.Title = sTitle & " - " & sMSDocumentCheckBox(Index)
|
||||
End If
|
||||
If WizardMode = SBXMLMODE AND Index = 3 Then
|
||||
' 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,"Template")
|
||||
ToggleInputPaths(oNullObject,"Document")
|
||||
@@ -192,8 +157,6 @@ Dim BoolValue as Boolean
|
||||
For i = 1 To ApplCount
|
||||
If ImportDialog.optMSDocuments.State = 1 Then
|
||||
BoolValue = ImportDialogArea.GetControl("chkMSApplication" & i).Model.State = 1
|
||||
Else
|
||||
BoolValue = ImportDialogArea.GetControl("chkSOApplication" & 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
|
||||
' Templates are to be converted
|
||||
sAddText = ""
|
||||
If WizardMode = SBMICROSOFTMODE Then
|
||||
sAddText = sSumMSTemplates(Index) & sCRLF
|
||||
Else
|
||||
sAddText = sSumSOTemplates(Index) & sCRLF
|
||||
End If
|
||||
sTmpText = sTmpText & sAddText & ConvertFromUrl(Applications(i,SBTEMPLSOURCE)) & sCRLF
|
||||
If Applications(i,SBTEMPLRECURSIVE) Then
|
||||
@@ -299,8 +259,6 @@ Dim sAddText as String
|
||||
' Documents are to be converted
|
||||
If WizardMode = SBMICROSOFTMODE Then
|
||||
sAddText = sSumMSDocuments(Index) & sCRLF
|
||||
Else
|
||||
sAddText = sSumSODocuments(Index) & sCRLF
|
||||
End If
|
||||
sTmpText = sTmpText & sAddText & ConvertFromUrl(Applications(i,SBDOCSOURCE)) & 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 = "nodepath"
|
||||
aNodePath(0).Value = "org.openoffice.Office.Tracing"
|
||||
oFilterService = createUnoService("com.sun.star.util.FilterTracer")
|
||||
bFilterTracingAvailable = Not IsNull(oFilterService)
|
||||
If bFilterTracingAvailable Then
|
||||
oMasterkey = GetRegistryKeyContent("org.openoffice.Office.Tracing/")
|
||||
If oMasterKey.hasbyName("Import") Then
|
||||
oImportKey = GetRegistryKeyContent("org.openoffice.Office.Tracing/Import")
|
||||
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 = "")
|
||||
bTakeOverPathName = (LocApplPath = "")
|
||||
MSLogPath = LocApplPath & "/" & LocApplName & ".log"
|
||||
End If
|
||||
CheckMSImportAvailability() = bApplIsAvailable
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Sub SetupMSConfiguration()
|
||||
iApplSection = 0
|
||||
Wizardmode = SBMICROSOFTMODE
|
||||
MaxApplCount = 3
|
||||
ApplCount = 3
|
||||
' chkTemplatePath-Captions
|
||||
GetApplResourceArray(1009 + iApplSection, ApplCount, sTemplateCheckBox())
|
||||
sTemplateCheckBox(0) = GetResText("MSTemplateCheckbox_1_")
|
||||
sTemplateCheckBox(1) = GetResText("MSTemplateCheckbox_2_")
|
||||
sTemplateCheckBox(2) = GetResText("MSTemplateCheckbox_3_")
|
||||
' DocumentCheckbox- Captions
|
||||
GetApplResourceArray(1009 + iApplSection + ApplCount, ApplCount, sDocumentCheckBox())
|
||||
sDocumentCheckBox(0) = GetResText("MSDocumentCheckbox_1_")
|
||||
sDocumentCheckBox(1) = GetResText("MSDocumentCheckbox_2_")
|
||||
sDocumentCheckBox(2) = GetResText("MSDocumentCheckbox_3_")
|
||||
|
||||
sKeyName(0) = "Software\Microsoft\Office\8.0\Word\Options"
|
||||
sKeyName(1) = "Software\Microsoft\Office\8.0\Excel\Microsoft Excel"
|
||||
@@ -425,11 +344,11 @@ Sub SetupMSConfiguration()
|
||||
MSFilterName(1,3) = sMSDocumentCheckBox(1)
|
||||
MSFilterName(1,4) = "Excel"
|
||||
|
||||
MSFilterName(2,0) = "ppt|pps|pptx|pptm"
|
||||
MSFilterName(2,1) = "impress8|impress8|impress8|impress8"
|
||||
MSFilterName(2,2) = "odp|odp|odp|odp"
|
||||
MSFilterName(2,0) = "ppt|pps|pptx|pub|pptm|ppsx|ppsm"
|
||||
MSFilterName(2,1) = "impress8|impress8|impress8|impress8|impress8|impress8|impress8"
|
||||
MSFilterName(2,2) = "odp|odp|odp|odp|odp|odp|odp"
|
||||
MSFilterName(2,3) = sMSDocumentCheckBox(2)
|
||||
MSFilterName(2,4) = "PowerPoint"
|
||||
MSFilterName(2,4) = "PowerPoint/Publisher"
|
||||
|
||||
MSFilterName(3,0) = "dot|dotx|dotm"
|
||||
MSFilterName(3,1) = "writer8_template|writer8_template|writer8_template"
|
||||
@@ -451,118 +370,6 @@ Sub SetupMSConfiguration()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
' This is an extract from "http://util.openoffice.org/source/browse/util/sot/source/base/exchange.cxx?rev=1.25&content-type=text/x-cvsweb-markup"
|
||||
' about the listed defined mimetypes that are required to define binary StarOffice templates that have for all applications the same extension ".vor"
|
||||
|
||||
' 26 SOT_FORMATSTR_ID_STARWRITER_30*/ { "application/x-openoffice-starwriter-30;windows_formatname=\"StarWriter 3.0\"", "StarWriter 3.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
' 27 SOT_FORMATSTR_ID_STARWRITER_40*/ { "application/x-openoffice-starwriter-40;windows_formatname=\"StarWriter 4.0\"", "StarWriter 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
' 28 SOT_FORMATSTR_ID_STARWRITER_50*/ { "application/x-openoffice-starwriter-50;windows_formatname=\"StarWriter 5.0\"", "StarWriter 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
|
||||
' 29 SOT_FORMATSTR_ID_STARWRITERWEB_40*/ { "application/x-openoffice-starwriterweb-40;windows_formatname=\"StarWriter/Web 4.0\"", "StarWriter/Web 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
' 30 SOT_FORMATSTR_ID_STARWRITERWEB_50*/ { "application/x-openoffice-starwriterweb-50;windows_formatname=\"StarWriter/Web 5.0\"", "StarWriter/Web 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
|
||||
' 31 SOT_FORMATSTR_ID_STARWRITERGLOB_40*/ { "application/x-openoffice-starwriterglob-40;windows_formatname=\"StarWriter/Global 4.0\"", "StarWriter/Global 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
' 32 SOT_FORMATSTR_ID_STARWRITERGLOB_50*/ { "application/x-openoffice-starwriterglob-50;windows_formatname=\"StarWriter/Global 5.0\"", "StarWriter/Global 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
|
||||
' 33 SOT_FORMATSTR_ID_STARDRAW*/ { "application/x-openoffice-stardraw;windows_formatname=\"StarDrawDocument\"", "StarDrawDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
' 34 SOT_FORMATSTR_ID_STARDRAW_40*/ { "application/x-openoffice-stardraw-40;windows_formatname=\"StarDrawDocument 4.0\"", "StarDrawDocument 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
' 36 SOT_FORMATSTR_ID_STARDRAW_50*/ { "application/x-openoffice-stardraw-50;windows_formatname=\"StarDraw 5.0\"", "StarDraw 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
|
||||
' 35 SOT_FORMATSTR_ID_STARIMPRESS_50*/ { "application/x-openoffice-starimpress-50;windows_formatname=\"StarImpress 5.0\"", "StarImpress 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
|
||||
' 37 SOT_FORMATSTR_ID_STARCALC*/ { "application/x-openoffice-starcalc;windows_formatname=\"StarCalcDocument\"", "StarCalcDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
' 38 SOT_FORMATSTR_ID_STARCALC_40*/ { "application/x-openoffice-starcalc-40;windows_formatname=\"StarCalc 4.0\"", "StarCalc 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
' 39 SOT_FORMATSTR_ID_STARCALC_50*/ { "application/x-openoffice-starcalc-50;windows_formatname=\"StarCalc 5.0\"", "StarCalc 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
|
||||
' 40 SOT_FORMATSTR_ID_STARCHART*/ { "application/x-openoffice-starchart;windows_formatname=\"StarChartDocument\"", "StarChartDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
' 41 SOT_FORMATSTR_ID_STARCHART_40*/ { "application/x-openoffice-starchart-40;windows_formatname=\"StarChartDocument 4.0\"", "StarChartDocument 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
' 42 SOT_FORMATSTR_ID_STARCHART_50*/ { "application/x-openoffice-starchart-50;windows_formatname=\"StarChart 5.0\"", "StarChart 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
|
||||
' 46 SOT_FORMATSTR_ID_STARMATH*/ { "application/x-openoffice-starmath;windows_formatname=\"StarMath\"", "StarMath", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
' 47 SOT_FORMATSTR_ID_STARMATH_40*/ { "application/x-openoffice-starmath-40;windows_formatname=\"StarMathDocument 4.0\"", "StarMathDocument 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
' 48 SOT_FORMATSTR_ID_STARMATH_50*/ { "application/x-openoffice-starmath-50;windows_formatname=\"StarMath 5.0\"", "StarMath 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) },
|
||||
|
||||
|
||||
Sub SetupXMLConfiguration()
|
||||
iApplSection = 1000
|
||||
Wizardmode = SBXMLMODE
|
||||
ApplCount = 4
|
||||
MaxApplCount = 4
|
||||
XMLTemplateList = Array("vor", "sti", "stw" , "stc" , "std")
|
||||
' chkTemplatePath-Captions
|
||||
GetApplResourceArray(1009 + iApplSection, ApplCount, sTemplateCheckBox())
|
||||
' DocumentCheckbox- Captions
|
||||
GetApplResourceArray(1009 + iApplSection + ApplCount, ApplCount, sDocumentCheckBox())
|
||||
|
||||
XMLFilterName(0,0) = "sdw|sxw"
|
||||
XMLFilterName(0,1) = "writer8|writer8"
|
||||
XMLFilterName(0,2) = "odt|odt"
|
||||
XMLFilterName(0,3) = sDocumentCheckBox(0)
|
||||
|
||||
XMLFilterName(1,0) = "sdc|sxc"
|
||||
XMLFilterName(1,1) = "calc8|calc8"
|
||||
XMLFilterName(1,2) = "ods|ods"
|
||||
XMLFilterName(1,3) = sDocumentCheckBox(1)
|
||||
|
||||
If oFactoryKey.HasByName("com.sun.star.drawing.DrawingDocument") and oFactoryKey.HasByName("com.sun.star.presentation.PresentationDocument") Then
|
||||
XMLFilterName(2,0) = "sdd|sda|sxi|sxd"
|
||||
XMLFilterName(2,1) = "impress8|draw8|impress8|draw8"
|
||||
XMLFilterName(2,2) = "odp|odg|odp|odg"
|
||||
Elseif oFactoryKey.HasByName("com.sun.star.drawing.DrawingDocument") Then
|
||||
XMLFilterName(2,0) = "sda|sxd"
|
||||
XMLFilterName(2,1) = "draw8|draw8"
|
||||
XMLFilterName(2,2) = "odg|odg"
|
||||
Elseif oFactoryKey.HasByName("com.sun.star.presentation.PresentationDocument") Then
|
||||
XMLFilterName(2,0) = "sdd|sxi"
|
||||
XMLFilterName(2,1) = "impress8|impress8"
|
||||
XMLFilterName(2,2) = "odp|odp"
|
||||
End If
|
||||
XMLFilterName(2,3) = sDocumentCheckBox(2)
|
||||
|
||||
|
||||
XMLFilterName(3,0) = "smf|sxm"
|
||||
XMLFilterName(3,1) = "math8|math8"
|
||||
XMLFilterName(3,2) = "odf|odf"
|
||||
XMLFilterName(3,3) = sDocumentCheckBox(3)
|
||||
|
||||
XMLFilterName(4,0) = "application/x-openoffice-starwriter|application/vnd.stardivision.writer/web|application/vnd.sun.xml.writer|application/vnd.sun.xml.writerweb"
|
||||
XMLFilterName(4,1) = "writer8_template|writerweb8_writer_template|writer8_template|writerweb8_writer_template"
|
||||
XMLFilterName(4,2) = "ott|oth|ott|oth"
|
||||
XMLFilterName(4,3) = sTemplateCheckBox(0)
|
||||
|
||||
|
||||
XMLFilterName(5,0) = "application/x-openoffice-starcalc|application/vnd.sun.xml.calc"
|
||||
XMLFilterName(5,1) = "calc8_template|calc8_template"
|
||||
XMLFilterName(5,2) = "ots|ots"
|
||||
XMLFilterName(5,3) = sTemplateCheckBox(1)
|
||||
|
||||
' due to bug #108942# impress templates of the version 4.0 have to be handled in a special way because their mimetype
|
||||
' falsely points to the draw application.
|
||||
If oFactoryKey.HasByName("com.sun.star.drawing.DrawingDocument") and oFactoryKey.HasByName("com.sun.star.presentation.PresentationDocument") Then
|
||||
XMLFilterName(6,0) = "application/x-openoffice-starimpress|application/x-openoffice-stardraw-40|application/x-openoffice-stardraw|application/vnd.sun.xml.impress|application/vnd.sun.xml.draw"
|
||||
XMLFilterName(6,1) = "impress8_template|impress8_template|draw8_template|impress8_template|draw8_template"
|
||||
XMLFilterName(6,2) = "otp|otp|otg|otp|otg"
|
||||
Elseif oFactoryKey.HasByName("com.sun.star.drawing.DrawingDocument") Then
|
||||
XMLFilterName(6,0) = "application/x-openoffice-stardraw|application/vnd.sun.xml.draw"
|
||||
XMLFilterName(6,1) = "draw8_template|draw8_template"
|
||||
XMLFilterName(6,2) = "otg|otg"
|
||||
Elseif oFactoryKey.HasByName("com.sun.star.presentation.PresentationDocument") Then
|
||||
XMLFilterName(6,0) = "application/x-openoffice-starimpress|application/x-openoffice-stardraw-40|application/vnd.sun.xml.impress"
|
||||
XMLFilterName(6,1) = "impress8_template|impress8_template|impress8_template"
|
||||
XMLFilterName(6,2) = "otp|otp|otp"
|
||||
End If
|
||||
XMLFilterName(6,3) = sTemplateCheckBox(2)
|
||||
|
||||
If oFactoryKey.HasByName("com.sun.star.text.GlobalDocument") Then
|
||||
XMLFilterName(7,0) = "sgl|sxg"
|
||||
XMLFilterName(7,1) = "writerglobal8|writerglobal8"
|
||||
XMLFilterName(7,2) = "odm|odm"
|
||||
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("com.sun.star.ucb.SimpleFileAccess")
|
||||
If bGetResources Then
|
||||
If InitResources("ImportWizard","imp") then
|
||||
sNoDirCreation = GetResText(1050)
|
||||
sMsgDirNotThere = GetResText(1051)
|
||||
sQueryForNewCreation = GetResText(1052)
|
||||
If InitResources("ImportWizard") then
|
||||
sNoDirCreation = GetResText("NoDirCreation")
|
||||
sMsgDirNotThere = GetResText("MsgDirNotThere")
|
||||
sQueryForNewCreation = GetResText("QueryfornewCreation")
|
||||
Else
|
||||
CheckTextBoxPath() = False
|
||||
Exit Function
|
||||
|
||||
@@ -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) > SBMAXEXTENSIONLENGTH Then ' 7 == Length of two extensions like 'sda|sdd
|
||||
If Instr(LocExtension, "vnd.sun.xml.") = 1 Then
|
||||
LocExtension = SetExtension(LocExtension)
|
||||
LocContentString = sFilterName(iKey +DistIndex, 0)
|
||||
LocContentString = ReplaceString(LocContentString, "|", ";")
|
||||
@@ -241,9 +238,6 @@ Dim XMLTemplateContentString as String
|
||||
XMLTemplateCount = 0
|
||||
XMLTemplateContentString = ""
|
||||
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) = "" Then ' Querying the number of fields in a multidimensionl Array is unsecure
|
||||
If FilesList(0,0) = "" Then ' Querying the number of fields in a multidimensional Array is unsecure
|
||||
TotFound = 0 ' 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 <> sPrevMimeTypeorExtension Then
|
||||
CreateLogTable(ApplIndex, sMimeTypeOrExtension, sFiltername()
|
||||
CreateLogTable(ApplIndex, sMimeTypeOrExtension, sFiltername())
|
||||
End If
|
||||
If ApplIndex > Ubound(Applications) or (ApplIndex < 0) Then
|
||||
Msgbox "Applicationindex out of bounds:" & sSourcUrl
|
||||
@@ -362,7 +356,7 @@ Dim sPrevMimeTypeorExtension as String
|
||||
Elseif iGeneralOverwrite = SBOVERWRITENEVER Then
|
||||
bDoSave = False
|
||||
ElseIf ((iGeneralOverWrite = SBOVERWRITEQUERY) OR (iGeneralOverwrite = SBOVERWRITECANCEL)) Then
|
||||
' Todo: According to AS there might come a new feature that storeasUrl could possibly rise a UI dialog.
|
||||
' Todo: According to AS there might come a new feature that storeasUrl could possibly rise a UI dialog.
|
||||
' In this case my own UI becomes obsolete
|
||||
sCurFileExists = ReplaceString(sFileExists, ConvertFromUrl(sTargetUrl), "<1>")
|
||||
sCurFileExists = ReplaceString(sCurFileExists, chr(13), "<CR>")
|
||||
@@ -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), "<1>")
|
||||
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 "sdw", "sdc", "sda", "sdd", "smf", "sgl", "doc", "xls", "ppt", "sxi" , "sxw" , "sxd" , "sxg" , "sxm" , "sxc" , "pps" , "docx" , "docm" , "xlsx" , "xlsm" , "xlsb" , "pptx" , "pptm"
|
||||
AbsDocuFound = AbsDocuFound + 1
|
||||
Case "sdw", "sdc", "sda", "sdd", "smf", "sgl", "doc", "docx", "docm", "xls", "xlsx", "xlsm", "ppt", "pps", "pptx", "pptm", "ppsx", "ppsm", "pub", "sxi", "sxw", "sxd", "sxg", "sxm", "sxc"
|
||||
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 & "/" & sTemplateGroupName
|
||||
Case SBXMLMODE
|
||||
If Index = 3 Then
|
||||
' 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 = ""
|
||||
oLogCursor.ParaStyleName = "Heading 1"
|
||||
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("com.sun.star.text.TextTable")
|
||||
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("FilterTracer")
|
||||
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, "/")
|
||||
CurFilterFolder = DirectoryNameoutofPath(FilterTracingLogPath(ApplIndex), "/")
|
||||
CurFilterTracingpath = CurFilterFolder & "/" & TargetFilename & ".log"
|
||||
End If
|
||||
If bTakeOverPathName(ApplIndex) Then 'Replace the Folder in the FilterTracerpath by the Folder of the targetUrl
|
||||
sTargetFolder = DirectoryNameoutofPath(sTargetUrl,"/")
|
||||
CurFilterTracingPath = sTargetFolder & "/" & FileNameoutofPath(CurFilterTracingPath, "/")
|
||||
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
|
||||
|
||||
@@ -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&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&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&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&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&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&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&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&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&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&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&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&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&location=application" script:language="Script"/>
|
||||
</dlg:button>
|
||||
</dlg:bulletinboard>
|
||||
|
||||
@@ -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("ImportWizard","imp") then
|
||||
sHelpButton = GetResText(1000)
|
||||
sCancelButton = GetResText(1001)
|
||||
sBackButton = GetResText(1002)
|
||||
sNextButton = GetResText(1003)
|
||||
sBeginButton = GetResText(1004)
|
||||
sCloseButton = GetResText(1005)
|
||||
|
||||
sWelcometextLabel1 = ReplaceString(GetResText(1006), GetProductName(),"%PRODUCTNAME")
|
||||
sWelcometextLabel2 = GetResText(1007)
|
||||
sWelcometextLabel3 = GetResText(1008)
|
||||
If InitResources("ImportWizard") then
|
||||
sHelpButton = GetResText("HelpButton")
|
||||
sCancelButton = GetResText("CancelButton")
|
||||
sBackButton = GetResText("BackButton")
|
||||
sNextButton = GetResText("NextButton")
|
||||
sBeginButton = GetResText("BeginButton")
|
||||
sCloseButton = GetResText("CloseButton")
|
||||
|
||||
sWelcometextLabel1 = ReplaceString(GetResText("WelcometextLabel1"), GetProductName(),"%PRODUCTNAME")
|
||||
sWelcometextLabel3 = GetResText("WelcometextLabel3")
|
||||
|
||||
' Microsoft Documents
|
||||
GetApplResourceArray(1009, 3, sMSTemplateCheckBox())
|
||||
sMSTemplateCheckBox(0) = GetResText("MSTemplateCheckbox_1_")
|
||||
sMSTemplateCheckBox(1) = GetResText("MSTemplateCheckbox_2_")
|
||||
sMSTemplateCheckBox(2) = GetResText("MSTemplateCheckbox_3_")
|
||||
|
||||
' DocumentCheckbox- Captions
|
||||
GetApplResourceArray(1012, 3, sMSDocumentCheckBox())
|
||||
|
||||
' DocumentCheckbox- Captions
|
||||
GetApplResourceArray(2013, 5, sSODocumentCheckBox())
|
||||
sMSDocumentCheckBox(0) = GetResText("MSDocumentCheckbox_1_")
|
||||
sMSDocumentCheckBox(1) = GetResText("MSDocumentCheckbox_2_")
|
||||
sMSDocumentCheckBox(2) = GetResText("MSDocumentCheckbox_3_")
|
||||
|
||||
'StarOffice Applicationnames
|
||||
|
||||
sSOHelperDocuments(0,0) = GetResText(2017)
|
||||
sSOHelperDocuments(0,1) = "com.sun.star.text.GlobalDocument"
|
||||
sSOHelperDocuments(1,0) = GetResText(2018)
|
||||
sSOHelperDocuments(1,1) = "com.sun.star.formula.FormulaProperties"
|
||||
|
||||
GetApplResourceArray(2017,2, sSOHelperDocuments())
|
||||
|
||||
sContainerName(0) = GetResText(1030)
|
||||
' Note: for the version 5.2 there was no Productname "StarSuite"
|
||||
sContainerName(1) = "StarOffice"
|
||||
|
||||
sSummaryHeader = GetResText(1031)
|
||||
sContainerName(0) = GetResText("MSContainerName")
|
||||
|
||||
sTemplateGroupName = GetResText(1036)
|
||||
sSummaryHeader = GetResText("SummaryHeader")
|
||||
|
||||
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("GroupnameDefault")
|
||||
|
||||
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)
|
||||
'StarOffice Applicationnames
|
||||
GetApplResourceArray(3100, 4, sSumSODocuments())
|
||||
GetApplResourceArray(3110, 4, sSumSOTemplates())
|
||||
GetApplResourceArray(3200, 3, sSumMSDocuments())
|
||||
GetApplResourceArray(3210, 3, sSumMSTemplates())
|
||||
sProgressMoreDocs = GetResText("ProgressMoreDocs")
|
||||
sProgressMoreTemplates = GetResText("ProgressMoreTemplates")
|
||||
sNoDirCreation = GetResText("NoDirCreation")
|
||||
sMsgDirNotThere = GetResText("MsgDirNotThere")
|
||||
sQueryForNewCreation = GetResText("QueryfornewCreation")
|
||||
sFileExists = GetResText("FileExists")
|
||||
sMorePathsError3 = GetResText("MorePathsError3")
|
||||
sConvertError1 = GetResText("ConvertError1")
|
||||
sConvertError2 = GetResText("ConvertError2")
|
||||
sRTErrorDesc = GetResText("RTErrorDesc")
|
||||
sRTErrorHeader = GetResText("RTErrorHeader")
|
||||
sOverwriteallFiles = GetResText("OverwriteallFiles")
|
||||
sReeditMacro = GetResText("ReeditMacro")
|
||||
sCouldnotsaveDocument = GetResText("CouldNotsaveDocument")
|
||||
sCouldnotopenDocument = GetResText("CouldNotopenDocument")
|
||||
sPathDialogMessage = GetResText("PathDialogMessage")
|
||||
sTitle = GetResText("DialogTitle")
|
||||
|
||||
sProgressPage_1 = GetResText("ProgressPage1")
|
||||
sProgressPage_2 = GetResText("ProgressPage2")
|
||||
sProgressPage_3 = GetResText("ProgressPage3")
|
||||
sProgressFound = GetResText("ProgressFound")
|
||||
sProgressPage_5 = GetResText("ProgressPage5")
|
||||
sReady = GetResText("Ready")
|
||||
sSourceDocuments = GetResText("SourceDocuments")
|
||||
sTargetDocuments = GetResText("TargetDocuments")
|
||||
sLogSummary = GetResText("LogfileSummary")
|
||||
sSumInclusiveSubDir = GetResText("SumInclusiveSubDir")
|
||||
sSumSaveDocuments = GetResText("SumSaveDokumente")
|
||||
sSumMSDocuments(0) = GetResText("SumMSTextDocuments")
|
||||
sSumMSDocuments(1) = GetResText("SumMSTableDocuments")
|
||||
sSumMSDocuments(2) = GetResText("SumMSDrawDocuments")
|
||||
sSumMSTemplates(0) = GetResText("SumMSTextTemplates")
|
||||
sSumMSTemplates(1) = GetResText("SumMSTableTemplates")
|
||||
sSumMSTemplates(2) = GetResText("SumMSDrawTemplates")
|
||||
With ImportDialog
|
||||
sImportLabel = GetResText(1033)
|
||||
sExportLabel = GetResText(1034)
|
||||
sSearchInSubDir = GetResText(1022)
|
||||
sImportLabel = GetResText("TextImportLabel")
|
||||
sExportLabel = GetResText("TextExportLabel")
|
||||
sSearchInSubDir = GetResText("SearchInSubDir")
|
||||
.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("CreateLogfile")
|
||||
.chkLogfile.Helptext = GetResText("LogfileHelpText")
|
||||
.cmdShowLogFile.Label = GetResText("ShowLogfile")
|
||||
End With
|
||||
ModuleList(0) = "com.sun.star.text.TextDocument"
|
||||
ModuleList(1) = "com.sun.star.sheet.SpreadsheetDocument"
|
||||
@@ -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>
|
||||
|
||||
@@ -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 *****
|
||||
|
||||
' ***** BASIC *****
|
||||
Public HeaderPreviews(4) as Object
|
||||
Public ImportDialog as Object
|
||||
Public ImportDialogArea as Object
|
||||
Public oFactoryKey as Object
|
||||
Public bShowLogFile as Boolean
|
||||
|
||||
' If the ProgressPage ist already on Top The Dialog will be immediately closed when this flag is
|
||||
' If the ProgressPage is already on Top The Dialog will be immediately closed when this flag is
|
||||
' 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("ImportWizard","ImportDialog")
|
||||
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("optSODocuments").SetFocus()
|
||||
ToggleCheckboxesWithBoolean(False)
|
||||
ImportDialogArea.GetControl("optMSDocuments").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 <> 1) OR (iCurStep <> 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,"XML", "SO")
|
||||
If CurStep = 2 Then
|
||||
sBitmapPath = SOBitmapPath & LocPrefix & "-Import_" & CurStep & "-" & Applications(CurOffice,SBAPPLKEY) + 1 & ".bmp"
|
||||
sBitmapPath = SOBitmapPath & LocPrefix & "-Import_" & CurStep & "-" & Applications(CurOffice,SBAPPLKEY) + 1 & ".png"
|
||||
Else
|
||||
sBitmapPath = SOBitmapPath & "Import_" & CurStep & ".bmp"
|
||||
sBitmapPath = SOBitmapPath & "Import_" & CurStep & ".png"
|
||||
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,"/") <> 0 Then
|
||||
CheckInstalledModule() = False
|
||||
@@ -226,7 +220,7 @@ Sub ToggleCheckboxes(oEvent as Object)
|
||||
Dim bMSEnable as Boolean
|
||||
WizardMode = oEvent.Source.Model.Tag
|
||||
bMSEnable = WizardMode = "MS"
|
||||
ToggleCheckBoxesWithBoolean(bMSEnable)
|
||||
ToggleCheckboxesWithBoolean(bMSEnable)
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -235,20 +229,14 @@ Sub ToggleCheckboxesWithBoolean(bMSEnable as Boolean)
|
||||
WizardMode = SBMICROSOFTMODE
|
||||
MaxApplCount = 3
|
||||
Else
|
||||
WizardMode = SBXMLMODE
|
||||
MaxApplCount = 4
|
||||
'Not supposed to happen - is there an assert in BASIC...
|
||||
End If
|
||||
With ImportDialogArea
|
||||
.GetControl("chkSOApplication1").Model.Enabled = Not bMSEnable
|
||||
.GetControl("chkSOApplication2").Model.Enabled = Not bMSEnable
|
||||
.GetControl("chkSOApplication3").Model.Enabled = Not bMSEnable
|
||||
.GetControl("chkSOApplication4").Model.Enabled = Not bMSEnable
|
||||
.GetControl("chkMSApplication1").Model.Enabled = bMSEnable
|
||||
.GetControl("chkMSApplication2").Model.Enabled = bMSEnable
|
||||
.GetControl("chkMSApplication3").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()
|
||||
'Takes over the Pathsettings from the first selected application to the next applications
|
||||
If Applications(CurOffice,SBDOCSOURCE) = "" 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>
|
||||
|
||||
Reference in New Issue
Block a user