summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorBehrend Cornelius <bc@openoffice.org>2001-05-21 14:52:58 +0000
committerBehrend Cornelius <bc@openoffice.org>2001-05-21 14:52:58 +0000
commit99470bf970c7f1f9e317d24a96dffeb3799f7bd6 (patch)
tree91a3f14c9d09d57609dd4b100130e1d2ea4f51b6 /wizards
parent448d824234187ccf3bd86eaaa4b71fbbaf05cc93 (diff)
#85954# Several modifications
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/importwizard/API.xba4
-rw-r--r--wizards/source/importwizard/DialogModul.xba188
-rw-r--r--wizards/source/importwizard/FilesModul.xba134
-rw-r--r--wizards/source/importwizard/ImportDialog.xdl53
-rw-r--r--wizards/source/importwizard/Language.xba69
-rw-r--r--wizards/source/importwizard/Main.xba88
6 files changed, 324 insertions, 212 deletions
diff --git a/wizards/source/importwizard/API.xba b/wizards/source/importwizard/API.xba
index 5959d5d45318..1a636854a5a2 100644
--- a/wizards/source/importwizard/API.xba
+++ b/wizards/source/importwizard/API.xba
@@ -76,14 +76,14 @@ Dim sPath as String
Dim Index as Integer
Select Case Wizardmode
Case SBMICROSOFTMODE
- Index = Val(Application(CurOffice,9))
+ Index = Application(CurOffice,SBAPPLKEY)
If GetGUIType = 1 Then &apos; Windows
sPath = QueryValue(HKEY_CURRENT_USER, sKeyName(Index), sValueName(Index))
Else
sPath = &quot;&quot;
End If
If sPath = &quot;&quot; Then
-&apos; Todo: das User/Work Verzeichnis kann man hier wohl kaum nehmen
+&apos; Todo: das User/Work Verzeichnis kann man hier wohl kaum nehmen!!
sPath = SOWorkPath
End If
GetDefaultPath = sPath
diff --git a/wizards/source/importwizard/DialogModul.xba b/wizards/source/importwizard/DialogModul.xba
index fbc58bd03d45..04a6cfca9aa6 100644
--- a/wizards/source/importwizard/DialogModul.xba
+++ b/wizards/source/importwizard/DialogModul.xba
@@ -21,6 +21,7 @@ Public SOBitmapPath As String
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
@@ -40,18 +41,29 @@ Public XMLFilterName(7,2)
Public ChkApplication(SBMAXAPPLCOUNT-1) as Object
Public Applications(SBMAXAPPLCOUNT-1,9)
+Public Const SBAPPLCONVERT = 0
+Public Const SBDOCCONVERT = 1
+Public Const SBDOCRECURSIVE = 2
+Public Const SBDOCSOURCE = 3
+Public Const SBDOCTARGET = 4
+Public Const SBTEMPLCONVERT = 5
+Public Const SBTEMPLRECURSIVE = 6
+Public Const SBTEMPLSOURCE = 7
+Public Const SBTEMPLTARGET = 8
+Public Const SBAPPLKEY = 9
+
&apos; Application-relating Data are stored in this Array
&apos; according to the following structure:
-&apos; Applications(X,0) = &quot;TRUE/FALSE&quot; (Application is to be converted)
-&apos; Applications(X,1) = &quot;TRUE/FALSE&quot; (Documents are to be converted)
-&apos; Applications(X,2) = &quot;TRUE/FALSE&quot; (Including Subdirectories)
+&apos; Applications(X,0) = True/False (Application is to be converted)
+&apos; Applications(X,1) = True/False (Documents are to be converted)
+&apos; Applications(X,2) = True/False (Including Subdirectories)
&apos; Applications(X,3) = &quot;File:///...&quot; (SourceUrl of the documents)
&apos; Applications(X,4) = &quot;File///:...&quot; (TargetUrl of the documents)
-&apos; Applications(X,5) = &quot;TRUE/FALSE&quot; (Templates are to be converted)
-&apos; Applications(X,6) = &quot;TRUE/FALSE&quot; (Including Subdirectories)
+&apos; Applications(X,5) = True/False (Templates are to be converted)
+&apos; Applications(X,6) = True/False (Including Subdirectories)
&apos; Applications(X,7) = &quot;File:///...&quot; (SourceUrl of the templates)
&apos; Applications(X,8) = &quot;File:///...&quot; (TargetUrl of the templates)
-&apos; Applications(X,9) = &quot;0&quot; (Key to the original Index of the Applications)
+&apos; Applications(X,9) = 0 (Key to the original Index of the Applications)
Sub FillStep_Welcome()
@@ -86,11 +98,11 @@ End Sub
Sub FillStep_InputPaths(OfficeIndex as Integer, bStartup as Boolean)
Dim Index as Integer
If bStartup Then
- If ImportDialog.OptMSDocuments.State Then
+ If ImportDialog.OptMSDocuments.State = 1 Then
SetupMSConfiguration()
Else
SetupXMLConfiguration()
- End If
+ End If
&apos; TemplateCheckBox-Captions
GetApplResourceArray(1008 + iApplSection, ApplCount, sTemplateCheckBox())
&apos; DocumentCheckbox- Captions
@@ -103,19 +115,14 @@ Dim Index as Integer
CurOffice = OfficeIndex
- Index = Val(Applications(CurOffice,9))
+ Index = Applications(CurOffice,SBAPPLKEY)
With ImportDialog
.TemplateCheckbox.Label = sTemplateCheckbox(Index)
- .TemplateSearchSubDir.Label = sSearchInSubDir
-
- .DocumentImportLabel.Label = sImportLabel
- .DocumentExportLabel.Label = sExportLabel
- .DocumentSearchSubDir.Label = sSearchInSubDir
-
- .DocumentPathCheckbox.State = Val(Applications(CurOffice,1))
- .DocumentSearchSubDir.State = Val(Applications(CurOffice,2))
- .DocumentImportPath.Text = ConvertFromUrl(Applications(CurOffice,3))
- .DocumentExportPath.Text = ConvertFromUrl(Applications(CurOffice,4))
+ .DocumentPathCheckbox.State = Abs(Applications(CurOffice,SBDOCCONVERT))
+ SetEnabledDocument_InputPath()
+ .DocumentSearchSubDir.State = Abs(Applications(CurOffice,SBDOCRECURSIVE))
+ .DocumentImportPath.Text = ConvertFromUrl(Applications(CurOffice,SBDOCSOURCE))
+ .DocumentExportPath.Text = ConvertFromUrl(Applications(CurOffice,SBDOCTARGET))
.DocumentFrame.Label = sProgressMoreDocs
If WizardMode = SBXMLMODE AND Index = 3 Then
@@ -128,16 +135,11 @@ Dim Index as Integer
.DocumentPathCheckbox.Label = sDocumentCheckbox(Index)
.TemplateFrame.Label = sProgressMoreTemplates
End If
-&apos;Todo: Enable this Checkbox as soon as an XML-Template-Format is defined
- .TemplateCheckbox.State = Val(Applications(CurOffice,5))
- .TemplateSearchSubDir.State = Val(Applications(CurOffice,6))
- .TemplateImportPath.Text = ConvertFromUrl(Applications(CurOffice,7))
- .TemplateImportLabel.Label = sImportLabel
- .TemplateExportPath.Text = ConvertFromUrl(Applications(CurOffice,8))
- .TemplateExportLabel.Label = sExportLabel
-
-&apos; Call SetEnabledTemplate_InputPath()
-&apos; Call SetEnabledDocument_InputPath()
+ .TemplateCheckbox.State = Abs(Applications(CurOffice,SBTEMPLCONVERT))
+ SetEnabledTemplate_InputPath()
+ .TemplateSearchSubDir.State = Abs(Applications(CurOffice,SBTEMPLRECURSIVE))
+ .TemplateImportPath.Text = ConvertFromUrl(Applications(CurOffice,SBTEMPLSOURCE))
+ .TemplateExportPath.Text = ConvertFromUrl(Applications(CurOffice,SBTEMPLTARGET))
.cbGoOn.Label = sNextButton
.cbBack.Enabled = True
ImportDialog.Step = 2
@@ -149,26 +151,26 @@ End Sub
Sub FillUpApplicationList()
Dim i as Integer
Dim a as Integer
-Dim sBoolValue as String
+Dim BoolValue as Boolean
-&apos; If Not bDoKeepApplValues Then
+ If Not bDoKeepApplValues Then
a = 0
For i = 0 To ApplCount - 1
- sBoolValue = CStr(ChkApplication(i).State)
- Applications(a,0) = sBoolValue
- Applications(a,1) = sBoolValue
- Applications(a,2) = sBoolValue
- Applications(a,3) = GetDefaultPath(i)
- Applications(a,4) = SOWorkPath
- Applications(a,5) = sBoolValue
- Applications(a,6) = sBoolValue
- Applications(a,7) = GetTemplateDefaultPath(i)
- Applications(a,8) = GetTargetTemplatePath(i)
- Applications(a,9) = CStr(i)
+ BoolValue = ChkApplication(i).State = 1
+ Applications(a,SBAPPLCONVERT) = BoolValue
+ Applications(a,SBDOCCONVERT) = BoolValue
+ Applications(a,SBDOCRECURSIVE) = BoolValue
+ Applications(a,SBDOCSOURCE) = GetDefaultPath(i)
+ Applications(a,SBDOCTARGET) = SOWorkPath
+ Applications(a,SBTEMPLCONVERT) = BoolValue
+ Applications(a,SBTEMPLRECURSIVE) = BoolValue
+ Applications(a,SBTEMPLSOURCE) = GetTemplateDefaultPath(i)
+ Applications(a,SBTEMPLTARGET) = GetTargetTemplatePath(i)
+ Applications(a,SBAPPLKEY) = i
If ChkApplication(i).State = 1 Then a = a + 1
Next i
ApplCount = a
-&apos; End If
+ End If
End Sub
@@ -177,14 +179,14 @@ Function SaveStep_InputPath() as Boolean
Dim bSaveConfiguration as Boolean
bSaveConfiguration = CheckInputPaths
If bSaveConfiguration Then
- Applications(CurOffice,1) = CStr(ImportDialog.DocumentPathCheckbox.State)
- Applications(CurOffice,2) = CStr(ImportDialog.DocumentSearchSubDir.State)
- Applications(CurOffice,3) = ConvertToURL(ImportDialog.DocumentImportPath.Text)
- Applications(CurOffice,4) = ConvertToUrl(ImportDialog.DocumentExportPath.Text)
- Applications(CurOffice,5) = CStr(ImportDialog.TemplateCheckbox.State)
- Applications(CurOffice,6) = CStr(ImportDialog.TemplateSearchSubDir.State)
- Applications(CurOffice,7) = ConvertToURL(ImportDialog.TemplateImportPath.Text)
- Applications(CurOffice,8) = ConvertToURL(ImportDialog.TemplateExportPath.Text)
+ Applications(CurOffice,SBDOCCONVERT) = ImportDialog.DocumentPathCheckbox.State = 1
+ Applications(CurOffice,SBDOCRECURSIVE) = ImportDialog.DocumentSearchSubDir.State = 1
+ Applications(CurOffice,SBDOCSOURCE) = ConvertToURL(ImportDialog.DocumentImportPath.Text)
+ Applications(CurOffice,SBDOCTARGET) = ConvertToUrl(ImportDialog.DocumentExportPath.Text)
+ Applications(CurOffice,SBTEMPLCONVERT) = ImportDialog.TemplateCheckbox.State = 1
+ Applications(CurOffice,SBTEMPLRECURSIVE) = ImportDialog.TemplateSearchSubDir.State = 1
+ Applications(CurOffice,SBTEMPLSOURCE) = ConvertToURL(ImportDialog.TemplateImportPath.Text)
+ Applications(CurOffice,SBTEMPLTARGET) = ConvertToURL(ImportDialog.TemplateExportPath.Text)
End If
SaveStep_InputPath = bSaveConfiguration
End Function
@@ -193,19 +195,18 @@ End Function
Sub SetEnabledTemplate_InputPath()
Dim bDoEnable as Boolean
With ImportDialog
- bDoEnable = ImportDialog.TemplateCheckbox.State = 1
+ bDoEnable = .TemplateCheckbox.State = 1
.TemplateImportLabel.Enabled = bDoEnable
.TemplateExportLabel.Enabled = bDoEnable
.TemplateImportPath.Enabled = bDoEnable
.TemplateExportPath.Enabled = bDoEnable
.TemplateSearchSubDir.Enabled = bDoEnable
.TemplateImportPath.Enabled = bDoEnable
-&apos;Note: The following lines have bee disabled due to Bug 82532
-&apos; If Not bDoEnable Then
-&apos; .cbGoOn.Enabled = .DocumentPathCheckBox.State
-&apos; Else
-&apos; .cbGoOn.Enabled = True
-&apos; End If
+ If Not bDoEnable Then
+ .cbGoOn.Enabled = .DocumentPathCheckbox.State = 1
+ Else
+ .cbGoOn.Enabled = True
+ End If
End With
End Sub
@@ -219,13 +220,11 @@ Dim bDoEnable as Boolean
.DocumentSearchSubDir.Enabled = bDoEnable
.DocumentImportPath.Enabled = bDoEnable
.DocumentExportPath.Enabled = bDoEnable
-&apos;Note: The following lines have bee disabled due to Bug 82532
-
-&apos; If Not bDoEnable Then
-&apos; .cbGoOn.Enabled = .TemplateCheckBox.State
-&apos; Else
-&apos; .cbGoOn.Enabled = True
-&apos; End If
+ If Not bDoEnable Then
+ .cbGoOn.Enabled = .TemplateCheckbox.State = 1
+ Else
+ .cbGoOn.Enabled = True
+ End If
End With
End Sub
@@ -236,40 +235,41 @@ Dim i as Integer
Dim Index as Integer
Dim sAddText as String
For i = 0 To ApplCount -1
- Index = Val(Applications(i,9))
- If Applications(i,5) = &quot;1&quot; Then
+ Index = Applications(i,SBAPPLKEY)
+ If Applications(i,SBTEMPLCONVERT) Then
&apos; Templates are to be converted
- If Index = 3 Then
- sAddText = ReplaceString(sSumDocuments(Index),sSOHelperDocuments(0),&quot;%1&quot;) &amp; sCRLF
+ sAddText = &quot;&quot;
+ If WizardMode = SBMICROSOFTMODE Then
+ sAddText = sSumMSTemplates(Index) &amp; sCRLF
Else
- sAddText = ReplaceString(sSumDocuments(Index),sTemplateCheckBox(Index),&quot;%1&quot;) &amp; sCRLF
+ sAddText = sSumSOTemplates(Index) &amp; sCRLF
End If
- sTmpText = sTmpText &amp; sAddText &amp; Applications(i,7) &amp; sCRLF
- If Applications(i,6) = &quot;1&quot; Then
+ sTmpText = sTmpText &amp; sAddText &amp; ConvertFromUrl(Applications(i,SBTEMPLSOURCE)) &amp; sCRLF
+ If Applications(i,SBTEMPLRECURSIVE) Then
&apos; Including Subdirectories
sTmpText = sTmpText &amp; sSumInclusiveSubDir &amp; sCRLF
End If
sTmpText = sTmpText &amp; sSumSaveDocuments &amp; sCRLF
- sTmpText = sTmpText &amp; Applications(i,8) &amp; sCRLF
+ sTmpText = sTmpText &amp; Applications(i,SBTEMPLTARGET) &amp; sCRLF
sTmpText = sTmpText &amp; sCRLF
End If
- If Applications(i,1) = &quot;1&quot; Then
+ If Applications(i,SBDOCCONVERT) Then
&apos; Documents are to be converted
- If Index = 3 Then
- sAddText = ReplaceString(sSumDocuments(Index),sSOHelperDocuments(1),&quot;%1&quot;) &amp; sCRLF
+ If WizardMode = SBMICROSOFTMODE Then
+ sAddText = sSumMSDocuments(Index) &amp; sCRLF
Else
- sAddText = ReplaceString(sSumDocuments(Index),sDocumentCheckBox(Index),&quot;%1&quot;) &amp; sCRLF
+ sAddText = sSumSODocuments(Index) &amp; sCRLF
End If
- sTmpText = sTmpText &amp; sAddText &amp; Applications(i,3) &amp; sCRLF
+ sTmpText = sTmpText &amp; sAddText &amp; ConvertFromUrl(Applications(i,SBDOCSOURCE)) &amp; sCRLF
- If Applications(i,2) = &quot;1&quot; Then
+ If Applications(i,SBDOCRECURSIVE) Then
&apos; Including Subdirectories
sTmpText = sTmpText &amp; sSumInclusiveSubDir &amp; sCRLF
End If
sTmpText = sTmpText &amp; sSumSaveDocuments &amp; sCRLF
- sTmpText = sTmpText &amp; Applications(i,4) &amp; sCRLF
+ sTmpText = sTmpText &amp; Applications(i,SBDOCTARGET) &amp; sCRLF
sTmpText = sTmpText &amp; sCRLF
End If
Next i
@@ -419,7 +419,7 @@ End Function
Sub AssignCheckboxObjects()
With ImportDialog
- If .OptSODocuments.State Then
+ If .OptSODocuments.State = 1 Then
Set ChkApplication(0) = .ChkFirstSOApplication
Set ChkApplication(1) = .ChkSecondSOApplication
Set ChkApplication(2) = .ChkThirdSOApplication
@@ -451,7 +451,7 @@ Dim sMessageNoDir as String
Dim sShowPath as String
If oTextBox.Enabled Then
If bCheck Then
- sShowPath = ConvertToUrl(oTextBox.Text)
+ sShowPath = oTextBox.Text
sUrlPath = ConvertToUrl(sShowPath)
If Not oUcb.Exists(sUrlPath) Then
If Not bCreateNew Then
@@ -497,4 +497,28 @@ Sub InitializeProgressPage(oDialog as Object)
oDialog.LabelRetrieval.FontWeight = com.sun.star.awt.FontWeight.NORMAL
oDialog.LabelCurProgress.FontWeight = com.sun.star.awt.FontWeight.BOLD
End Sub
+
+
+Sub GetFolderName(aEvent as Object)
+Dim oFolderDialog
+Dim iAccept as Integer
+Dim sPath as String
+Dim InitPath as String
+Dim RefControlName as String
+Dim oRefControl
+ oFolderDialog = CreateUnoService(&quot;com.sun.star.ui.FolderPicker&quot;)
+ RefControlName = aEvent.Source.Model.Tag
+ oRefControl = ImportDialogArea.GetControl(RefControlName)
+ InitPath = ConvertToUrl(oRefControl.Model.Text)
+ If oUcb.Exists(InitPath) Then
+ oFolderDialog.SetDisplayDirectory(InitPath)
+ End If
+ iAccept = oFolderDialog.Execute()
+ If iAccept = 1 Then
+ sPath = oFolderDialog.GetDisplayDirectory()
+ If oUcb.Exists(sPath) Then
+ oRefControl.Text = ConvertFromUrl(sPath)
+ End If
+ End If
+End Sub
</script:module> \ No newline at end of file
diff --git a/wizards/source/importwizard/FilesModul.xba b/wizards/source/importwizard/FilesModul.xba
index 8e0089957bf0..93af82c5ffce 100644
--- a/wizards/source/importwizard/FilesModul.xba
+++ b/wizards/source/importwizard/FilesModul.xba
@@ -4,6 +4,9 @@
Public AbsTemplateFound as Integer
Public AbsDocuFound as Integer
+Public oLogDocument as Object
+Public oLogTable as Object
+
Function ReadApplicationDirectories(ApplIndex as Integer, FilesList(),bIsDocument as Boolean, sFiltername()) as Integer
@@ -14,21 +17,20 @@ Dim sSourceDir as String
Dim bCheckRealType as Boolean
Dim a as Integer
Dim sFileContent() as String
-Dim NewList(200,1) as String
+Dim NewList() as String
Dim Index as Integer
Dim sLocExtension as String
- Index = Val(Applications(ApplIndex,9)
+ Index = Applications(ApplIndex,SBAPPLKEY)
sLocExtension = &quot;&quot;
If bIsDocument Then
- &apos; Documents
- bCheckDocuType = ControlStateToBool(Applications(ApplIndex,1))
+ bCheckDocuType = Applications(ApplIndex,SBDOCCONVERT)
bCheckRealType = False
- bRecursive = ControlStateToBool(Applications(ApplIndex,2))
+ bRecursive = Applications(ApplIndex,SBDOCRECURSIVE)
FilterIndex = Index
- sSourceDir = Applications(ApplIndex,3)
+ sSourceDir = Applications(ApplIndex,SBDOCSOURCE)
Else
&apos; Templates
- bCheckDocuType = ControlStateToBool(Applications(ApplIndex,5))
+ bCheckDocuType = Applications(ApplIndex,SBTEMPLCONVERT)
&apos; In SO the documenttype cannot be derived from the extension name
bCheckRealType = WizardMode = SBXMLMODE
If bCheckRealType Then
@@ -39,21 +41,22 @@ Dim sLocExtension as String
End If
bIsDocument = Not bCheckRealType
End If
- bRecursive = ControlStateToBool(Applications(ApplIndex,6))
+ bRecursive = Applications(ApplIndex,SBTEMPLRECURSIVE)
FilterIndex = Index + MaxApplCount
- sSourceDir = Applications(ApplIndex,7)
+ sSourceDir = Applications(ApplIndex,SBTEMPLSOURCE)
End If
If bCheckDocuType Then
sFileContent() = GetMimeTypeList(sFilterName(FilterIndex))
NewList() = ReadDirectories(sSourceDir, bRecursive, bCheckRealType, False, sFileContent(), sLocExtension)
- AddListtoList(FilesList(), NewList(), ApplIndex)
- LabelRetrieval.Caption = sProgressPage_2 &amp; &quot; &quot; &amp; ReplaceString(sProgressPage_5, FilesList(0,0) &amp; &quot; &quot;, &quot;%1&quot;)
+ If Ubound(NewList()) &gt; -1 Then
+ AddListtoList(FilesList(), NewList(), ApplIndex)
+ End If
+ LabelRetrieval.Caption = sProgressPage_2 &amp; &quot; &quot; &amp; ReplaceString(sProgressPage_5, Str(Ubound(FilesList()) + 1) &amp; &quot; &quot;, &quot;%1&quot;)
End If
- ReadApplicationDirectories() = Val(NewList(0,0))
+ ReadApplicationDirectories() = Ubound(NewList(),1) + 1
End Function
-
Sub ShowCurrentProgress(bIsDocument as Boolean, CurFound as Integer)
If bIsDocument Then
AbsDocuFound = AbsDocuFound + CurFound
@@ -64,10 +67,11 @@ Sub ShowCurrentProgress(bIsDocument as Boolean, CurFound as Integer)
End If
End Sub
+
Sub ConvertAllDocuments(sFilterName())
Dim FileProperties(0) as new com.sun.star.beans.PropertyValue
Dim OpenProperties(0) as new com.sun.star.beans.PropertyValue
-Dim FilesList(500,2) as String
+Dim FilesList(0,2) as String
Dim sViewPath as String
Dim i as Integer
Dim FilterIndex as Integer
@@ -92,6 +96,7 @@ Dim oTaskEnum as Object
Dim oTask as Object
Dim oModel as Object
Dim oTaskController as Object
+Dim MaxFileIndex as Integer
AbsTemplateFound = 0
AbsDocuFound = 0
For i = 0 To ApplCount-1
@@ -107,12 +112,11 @@ Dim oTaskController as Object
CurFound = ReadApplicationDirectories(i, FilesList(), bIsDocument, sFilterName())
ShowCurrentProgress(bIsDocument, CurFound)
Next i
-
InitializeProgressPage(ImportDialog)
-
OpenProperties(0).Name = &quot;Hidden&quot;
OpenProperties(0).Value = True
- For i = 1 To cInt(FilesList(0, 0))
+ MaxFileIndex = Ubound(FilesList(),1)
+ For i = 0 To MaxFileIndex
bDoSave = True
If bCancelTask Then
Call CancelTask()
@@ -122,19 +126,19 @@ Dim oTaskController as Object
CurFiltername = GetFilterName(FilesList(i,1), sFilterName(), sExtension, FilterIndex)
ApplIndex = FilesList(i,2)
sViewPath = CutPathView(sFullName, 60)
- ImportDialog.LabelCurDocument.Label = Str(i) &amp; &quot;/&quot; &amp; FilesList(0,0) &amp; &quot; (&quot; &amp; sViewPath &amp; &quot;)&quot;
- If i = 1 Then
-
+ ImportDialog.LabelCurDocument.Label = Str(i+1) &amp; &quot;/&quot; &amp; MaxFileIndex + 1 &amp; &quot; (&quot; &amp; sViewPath &amp; &quot;)&quot;
+ If i = 0 Then
+ CreateLogDocument(OpenProperties())
End If
oDocument = StarDesktop.LoadComponentFromURL(sFullName, &quot;_blank&quot;, 0, OpenProperties())
If Not IsNull(oDocument) Then
Select Case sExtension
Case &quot;sxw&quot;, &quot;sxc&quot;, &quot;sxi&quot;, &quot;sxd&quot;, &quot;sxs&quot;, &quot;mml&quot;
- SourceStemDir = RTrimStr(Applications(ApplIndex,3), &quot;/&quot;)
- TargetStemDir = RTrimStr(Applications(ApplIndex,4), &quot;/&quot;)
- Case Else &apos; Templates and Helper-Applications remain
- SourceStemDir = RTrimStr(Applications(ApplIndex,7), &quot;/&quot;)
- TargetStemDir = RTrimStr(Applications(ApplIndex,8), &quot;/&quot;)
+ SourceStemDir = RTrimStr(Applications(ApplIndex,SBDOCSOURCE), &quot;/&quot;)
+ TargetStemDir = RTrimStr(Applications(ApplIndex,SBDOCTARGET), &quot;/&quot;)
+ Case Else &apos; Templates and Helper-Applications remain
+ SourceStemDir = RTrimStr(Applications(ApplIndex,SBTEMPLSOURCE), &quot;/&quot;)
+ TargetStemDir = RTrimStr(Applications(ApplIndex,SBTEMPLTARGET), &quot;/&quot;)
End Select
TargetFile = ReplaceString(sFullname, TargetStemDir, SourceStemDir)
@@ -162,6 +166,7 @@ Dim oTaskController as Object
End Select
End If
If bDoSave Then
+ InsertDocNamesToLogDocument(i+1, sFullName, TargetFile
On Local Error Resume Next
FileProperties(0).Name = &quot;FilterName&quot;
FileProperties(0).Value = CurFilterName
@@ -185,9 +190,11 @@ Dim oTaskController as Object
&apos; Wend
End If
Next i
+ ImportDialog.cbCancel.Label = sCloseButton
+&apos; oLogDocument.Dispose()
Msgbox sReady, 64, sTitle
- ImportDialogArea.endExecute
- ImportDialogArea.Dispose
+&apos; ImportDialogArea.endExecute
+&apos; ImportDialogArea.Dispose
End
Exit Sub
@@ -198,16 +205,16 @@ End Sub
Sub AddListtoList(FirstList(), SecList(), ApplIndex as Integer)
Dim FirstStart as Integer, FirstEnd as Integer, i as Integer, s as Integer
- FirstStart = Val(FirstList(0,0)) + 1
- FirstEnd = FirstStart + Val(SecList(0,0))
- s = 1
+ FirstStart = Ubound(FirstList(),1)
+ FirstEnd = FirstStart + Ubound(SecList(),1)
+ ReDim Preserve FirstList(FirstEnd,2)
+ s = 0
For i = FirstStart To FirstEnd
FirstList(i,0) = SecList(s,0)
FirstList(i,1) = SecList(s,1)
FirstList(i,2) = CStr(ApplIndex)
s = s + 1
Next i
- FirstList(0,0) = i-2
End Sub
@@ -273,4 +280,67 @@ Dim sMimeTypeList()
sMimeTypeList() = ArrayoutofString(sMimeTypeList(0),&quot;|&quot;)
End If
GetMimetypeList() = sMimeTypeList()
-End Function</script:module> \ No newline at end of file
+End Function
+
+
+Sub CreateLogDocument(HiddenProperties())
+Dim oTableCursor as Object
+Dim oLogCursor as Object
+Dim oLogRows as Object
+Dim sLogUrl as String
+Dim NoArgs()
+Dim i as Integer
+Dim bLogExists as Boolean
+ If ImportDialog.chkLogfile.State = 1 Then
+ i = 2
+ oLogDocument = StarDesktop.LoadComponentFromURL(&quot;private:factory/swriter&quot;, &quot;_blank&quot;, 0, NoArgs())&apos; HiddenProperties()) &apos; HiddenProperties())
+ oLogCursor = oLogDocument.Text.CreateTextCursor
+ oLogTable = oLogDocument.CreateInstance(&quot;com.sun.star.text.TextTable&quot;)
+ oLogCursor.Text.InsertTextContent(oLogCursor, oLogTable, True)
+ oLogCursor = oLogTable.GetCellbyPosition(0,0).createTextCursor
+&apos; Todo: Strings in Resourcen
+ oLogCursor.SetString(sSourceDocuments)
+ oLogCursor = oLogTable.GetCellbyPosition(1,0).createTextCursor
+ oLogCursor.SetString(sTargetDocuments)
+ sLogUrl = SOWorkPath &amp; &quot;/Logfile.sxw&quot;
+ Do
+ bLogExists = oUcb.Exists(sLogUrl)
+ If bLogExists Then
+ If i = 2 Then
+ sLogUrl = ReplaceString(sLogUrl, &quot;/Logfile_2.sxw&quot;, &quot;/Logfile.sxw&quot;)
+ Else
+ sLogUrl = ReplaceString(sLogUrl, &quot;/Logfile_&quot; &amp; cStr(i) &amp; &quot;.sxw&quot;, &quot;/Logfile_&quot; &amp; cStr(i-1) &amp; &quot;.sxw&quot;)
+ End If
+ i = i + 1
+ End If
+ Loop Until Not bLogExists
+&apos; Todo Für das Logdokument einen sinnigen Titel festlegen!
+ oLogDocument.StoreToUrl(sLogUrl, NoArgs())
+ EndIf
+End Sub
+
+
+Sub InsertDocNamesToLogDocument(iRow as Integer, SourceUrl as String, TargetUrl as String)
+Dim oLogCursor as Object
+Dim UrlList(1) as String
+Dim LocFileName as String
+Dim LocUrl as String
+Dim i as Integer
+ If ImportDialog.chkLogfile.State = 1 Then
+ If iRow &gt; 1 Then
+ oLogTable.Rows.InsertByIndex(oLogTable.Rows.Count,1)
+ End If
+ UrlList(0) = SourceUrl
+ UrlList(1) = TargetUrl
+ For i = 0 To 1
+ oLogCursor = oLogTable.GetCellbyPosition(i,iRow).createTextCursor
+ LocUrl = UrlList(i)
+ oLogCursor.HyperLinkURL = LocUrl
+ oLogCursor.HyperLinkName = LocUrl
+ oLogCursor.HyperLinkTarget = LocUrl
+ LocFileName = FileNameOutOfPath(LocUrl, &quot;/&quot;)
+ oLogTable.GetCellbyPosition(i,iRow).InsertString(oLogCursor, LocFileName,False)
+ Next i
+ oLogDocument.Store()
+ End If
+End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/importwizard/ImportDialog.xdl b/wizards/source/importwizard/ImportDialog.xdl
index d796800582c2..b5f016b5d3d3 100644
--- a/wizards/source/importwizard/ImportDialog.xdl
+++ b/wizards/source/importwizard/ImportDialog.xdl
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" dlg:id="ImportDialog" dlg:style-id="0" dlg:title="ImportDialog" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:page="2">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" dlg:id="ImportDialog" dlg:style-id="0" dlg:title="ImportDialog" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:page="1">
<dlg:styles>
<dlg:style dlg:style-id="0"/>
</dlg:styles>
@@ -29,62 +29,71 @@
<dlg:text dlg:style-id="0" dlg:id="LabelCurDocumentRetrieval" dlg:tab-index="15" dlg:left="15" dlg:top="95" dlg:width="235" dlg:height="12" dlg:page="4" dlg:value="LabelCurDocumentRetrieval"/>
<dlg:text dlg:style-id="0" dlg:id="LabelCurProgress" dlg:tab-index="16" dlg:left="10" dlg:top="120" dlg:width="240" dlg:height="12" dlg:page="4" dlg:value="LabelCurProgress"/>
<dlg:text dlg:style-id="0" dlg:id="LabelCurDocument" dlg:tab-index="17" dlg:left="15" dlg:top="135" dlg:width="235" dlg:height="12" dlg:page="4" dlg:value="LabelCurDocument"/>
- <dlg:img dlg:id="ImportPreview" dlg:tab-index="18" dlg:left="5" dlg:top="5" dlg:width="260" dlg:height="31"/>
- <dlg:button dlg:style-id="0" dlg:id="cbBack" dlg:tab-index="19" dlg:left="155" dlg:top="190" dlg:width="50" dlg:height="13" dlg:value="cbBack">
+ <dlg:img dlg:id="ImportPreview" dlg:tab-index="18" dlg:left="6" dlg:top="5" dlg:width="258" dlg:height="30"/>
+ <dlg:button dlg:style-id="0" dlg:id="cbBack" dlg:tab-index="19" dlg:left="155" dlg:top="190" dlg:width="50" dlg:height="14" dlg:value="cbBack">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.Main.PrevStep"/>
</dlg:button>
<dlg:titledbox dlg:style-id="0" dlg:id="DocumentFrame" dlg:tab-index="20" dlg:left="5" dlg:top="115" dlg:width="260" dlg:height="70" dlg:page="2">
<dlg:title dlg:value="DocumentFrame"/>
</dlg:titledbox>
- <dlg:button dlg:style-id="0" dlg:id="cbCancel" dlg:tab-index="21" dlg:left="5" dlg:top="190" dlg:width="50" dlg:height="13" dlg:value="cbCancel">
+ <dlg:button dlg:style-id="0" dlg:id="cbCancel" dlg:tab-index="21" dlg:left="6" dlg:top="190" dlg:width="50" dlg:height="14" dlg:value="cbCancel">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.Main.CancelButton"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="cbHelp" dlg:tab-index="22" dlg:left="65" dlg:top="190" dlg:width="50" dlg:height="13" dlg:value="cbHelp">
+ <dlg:button dlg:style-id="0" dlg:id="cbHelp" dlg:tab-index="22" dlg:left="65" dlg:top="190" dlg:width="50" dlg:height="14" dlg:value="cbHelp">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.Main.HelperDialog"/>
</dlg:button>
- <dlg:button dlg:style-id="0" dlg:id="cbGoOn" dlg:tab-index="23" dlg:left="215" dlg:top="190" dlg:width="50" dlg:height="13" dlg:value="cbGoOn">
+ <dlg:button dlg:style-id="0" dlg:id="cbGoOn" dlg:tab-index="23" dlg:left="214" dlg:top="190" dlg:width="50" dlg:height="14" dlg:value="cbGoOn">
<dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.Main.NextStep"/>
</dlg:button>
- <dlg:text dlg:style-id="0" dlg:id="WelcomeTextLabel" dlg:tab-index="24" dlg:left="5" dlg:top="41" dlg:width="260" dlg:height="20" dlg:page="1" dlg:value="WelcomeTextLabel" dlg:multiline="true"/>
- <dlg:text dlg:style-id="0" dlg:id="WelcomeTextLabel3" dlg:tab-index="25" dlg:left="5" dlg:top="61" dlg:width="260" dlg:height="12" dlg:page="1" dlg:value="WelcomeTextLabel3"/>
- <dlg:button dlg:style-id="0" dlg:id="Button1" dlg:tab-index="26" dlg:disabled="true" dlg:left="245" dlg:top="80" dlg:width="12" dlg:height="12" dlg:page="2" dlg:value="..."/>
- <dlg:button dlg:style-id="0" dlg:id="Button2" dlg:tab-index="27" dlg:disabled="true" dlg:left="245" dlg:top="94" dlg:width="12" dlg:height="12" dlg:page="2" dlg:value="..."/>
- <dlg:button dlg:style-id="0" dlg:id="Button3" dlg:tab-index="28" dlg:disabled="true" dlg:left="245" dlg:top="154" dlg:width="12" dlg:height="12" dlg:page="2" dlg:value="..."/>
- <dlg:button dlg:style-id="0" dlg:id="Button4" dlg:tab-index="29" dlg:disabled="true" dlg:left="245" dlg:top="169" dlg:width="12" dlg:height="12" dlg:page="2" dlg:value="..."/>
+ <dlg:text dlg:style-id="0" dlg:id="WelcomeTextLabel" dlg:tab-index="24" dlg:left="6" dlg:top="41" dlg:width="258" dlg:height="20" dlg:page="1" dlg:value="WelcomeTextLabel" dlg:multiline="true"/>
+ <dlg:text dlg:style-id="0" dlg:id="WelcomeTextLabel3" dlg:tab-index="25" dlg:left="6" dlg:top="61" dlg:width="258" dlg:height="12" dlg:page="1" dlg:value="WelcomeTextLabel3"/>
+ <dlg:button dlg:style-id="0" dlg:id="Button1" dlg:tab-index="26" dlg:left="245" dlg:top="80" dlg:width="12" dlg:height="12" dlg:page="2" dlg:tag="TemplateImportPath" dlg:value="...">
+ <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.DialogModul.GetFolderName"/>
+ </dlg:button>
+ <dlg:button dlg:style-id="0" dlg:id="Button2" dlg:tab-index="27" dlg:left="245" dlg:top="94" dlg:width="12" dlg:height="12" dlg:page="2" dlg:tag="TemplateExportPath" dlg:value="...">
+ <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.DialogModul.GetFolderName"/>
+ </dlg:button>
+ <dlg:button dlg:style-id="0" dlg:id="Button3" dlg:tab-index="28" dlg:left="245" dlg:top="154" dlg:width="12" dlg:height="12" dlg:page="2" dlg:tag="DocumentImportPath" dlg:value="...">
+ <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.DialogModul.GetFolderName"/>
+ </dlg:button>
+ <dlg:button dlg:style-id="0" dlg:id="Button4" dlg:tab-index="29" dlg:left="245" dlg:top="169" dlg:width="12" dlg:height="12" dlg:page="2" dlg:tag="DocumentExportPath" dlg:value="...">
+ <dlg:event dlg:listener-type="com.sun.star.awt.XActionListener" dlg:event-method="actionPerformed" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.DialogModul.GetFolderName"/>
+ </dlg:button>
<dlg:radiogroup>
- <dlg:radio dlg:style-id="0" dlg:id="OptSODocuments" dlg:tab-index="30" dlg:left="5" dlg:top="75" dlg:width="260" dlg:height="12" dlg:page="1" dlg:tag="XML" dlg:value="OptSODocuments">
+ <dlg:radio dlg:style-id="0" dlg:id="OptSODocuments" dlg:tab-index="30" dlg:left="6" dlg:top="75" dlg:width="258" dlg:height="9" dlg:page="1" dlg:tag="XML" dlg:value="OptSODocuments">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.Main.DisorEnableCheckboxes"/>
</dlg:radio>
- <dlg:radio dlg:style-id="0" dlg:id="OptMSDocuments" dlg:tab-index="31" dlg:left="5" dlg:top="125" dlg:width="260" dlg:height="12" dlg:page="1" dlg:tag="MS" dlg:value="OptMSDocuments">
+ <dlg:radio dlg:style-id="0" dlg:id="OptMSDocuments" dlg:tab-index="31" dlg:left="6" dlg:top="117" dlg:width="258" dlg:height="9" dlg:page="1" dlg:tag="MS" dlg:value="OptMSDocuments">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.Main.DisorEnableCheckboxes"/>
</dlg:radio>
</dlg:radiogroup>
- <dlg:checkbox dlg:style-id="0" dlg:id="ChkFirstSOApplication" dlg:tab-index="32" dlg:left="10" dlg:top="90" dlg:width="120" dlg:height="12" dlg:page="1" dlg:value="ChkFirstSOApplication">
+ <dlg:checkbox dlg:style-id="0" dlg:id="ChkFirstSOApplication" dlg:tab-index="32" dlg:left="11" dlg:top="88" dlg:width="120" dlg:height="9" dlg:page="1" dlg:value="ChkFirstSOApplication">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.Main.DisOrEnableNextButton"/>
</dlg:checkbox>
- <dlg:checkbox dlg:style-id="0" dlg:id="ChkSecondSOApplication" dlg:tab-index="33" dlg:left="135" dlg:top="90" dlg:width="120" dlg:height="12" dlg:page="1" dlg:value="ChkSecondSOApplication">
+ <dlg:checkbox dlg:style-id="0" dlg:id="ChkSecondSOApplication" dlg:tab-index="33" dlg:left="135" dlg:top="88" dlg:width="120" dlg:height="9" dlg:page="1" dlg:value="ChkSecondSOApplication">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.Main.DisOrEnableNextButton"/>
</dlg:checkbox>
- <dlg:checkbox dlg:style-id="0" dlg:id="ChkThirdSOApplication" dlg:tab-index="34" dlg:left="10" dlg:top="105" dlg:width="120" dlg:height="12" dlg:page="1" dlg:value="ChkThirdSOApplication">
+ <dlg:checkbox dlg:style-id="0" dlg:id="ChkThirdSOApplication" dlg:tab-index="34" dlg:left="11" dlg:top="101" dlg:width="120" dlg:height="9" dlg:page="1" dlg:value="ChkThirdSOApplication">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.Main.DisOrEnableNextButton"/>
</dlg:checkbox>
- <dlg:checkbox dlg:style-id="0" dlg:id="ChkFourthSOApplication" dlg:tab-index="35" dlg:left="135" dlg:top="105" dlg:width="120" dlg:height="12" dlg:page="1" dlg:value="ChkFourthSOApplication">
+ <dlg:checkbox dlg:style-id="0" dlg:id="ChkFourthSOApplication" dlg:tab-index="35" dlg:left="135" dlg:top="101" dlg:width="120" dlg:height="9" dlg:page="1" dlg:value="ChkFourthSOApplication">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.Main.DisOrEnableNextButton"/>
</dlg:checkbox>
- <dlg:checkbox dlg:style-id="0" dlg:id="ChkFirstMSApplication" dlg:tab-index="36" dlg:disabled="true" dlg:left="10" dlg:top="140" dlg:width="120" dlg:height="12" dlg:page="1" dlg:value="ChkFirstMSApplication">
+ <dlg:checkbox dlg:style-id="0" dlg:id="ChkFirstMSApplication" dlg:tab-index="36" dlg:disabled="true" dlg:left="11" dlg:top="130" dlg:width="120" dlg:height="9" dlg:page="1" dlg:value="ChkFirstMSApplication">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.Main.DisOrEnableNextButton"/>
</dlg:checkbox>
- <dlg:checkbox dlg:style-id="0" dlg:id="ChkSecondMSApplication" dlg:tab-index="37" dlg:disabled="true" dlg:left="135" dlg:top="140" dlg:width="120" dlg:height="12" dlg:page="1" dlg:value="ChkSecondMSApplication">
+ <dlg:checkbox dlg:style-id="0" dlg:id="ChkSecondMSApplication" dlg:tab-index="37" dlg:disabled="true" dlg:left="135" dlg:top="130" dlg:width="120" dlg:height="9" dlg:page="1" dlg:value="ChkSecondMSApplication">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.Main.DisOrEnableNextButton"/>
</dlg:checkbox>
- <dlg:checkbox dlg:style-id="0" dlg:id="ChkThirdMSApplication" dlg:tab-index="38" dlg:disabled="true" dlg:left="10" dlg:top="155" dlg:width="120" dlg:height="12" dlg:page="1" dlg:value="ChkThirdMSApplication">
+ <dlg:checkbox dlg:style-id="0" dlg:id="ChkThirdMSApplication" dlg:tab-index="38" dlg:disabled="true" dlg:left="11" dlg:top="143" dlg:width="120" dlg:height="9" dlg:page="1" dlg:value="ChkThirdMSApplication">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.Main.DisOrEnableNextButton"/>
</dlg:checkbox>
- <dlg:text dlg:style-id="0" dlg:id="WelcomeTextLabel2" dlg:tab-index="39" dlg:disabled="true" dlg:left="5" dlg:top="170" dlg:width="260" dlg:height="18" dlg:page="1" dlg:value="WelcomeTextLabel2"/>
+ <dlg:text dlg:style-id="0" dlg:id="WelcomeTextLabel2" dlg:tab-index="39" dlg:disabled="true" dlg:left="6" dlg:top="156" dlg:width="258" dlg:height="18" dlg:page="1" dlg:value="WelcomeTextLabel2" dlg:multiline="true"/>
<dlg:checkbox dlg:style-id="0" dlg:id="TemplateCheckbox" dlg:tab-index="40" dlg:left="10" dlg:top="50" dlg:width="240" dlg:height="12" dlg:page="2" dlg:value="TemplateCheckbox">
<dlg:event dlg:listener-type="com.sun.star.awt.XItemListener" dlg:event-method="itemStateChanged" dlg:script-type="StarBasic" dlg:script-code="ImportWizard.DialogModul.SetEnabledTemplate_InputPath"/>
</dlg:checkbox>
<dlg:checkbox dlg:style-id="0" dlg:id="TemplateSearchSubDir" dlg:tab-index="41" dlg:left="10" dlg:top="63" dlg:width="240" dlg:height="12" dlg:page="2" dlg:value="TemplateSearchSubDir"/>
<dlg:text dlg:style-id="0" dlg:id="TemplateImportLabel" dlg:tab-index="42" dlg:left="10" dlg:top="80" dlg:width="60" dlg:height="12" dlg:page="2" dlg:value="TemplateImportLabel"/>
+ <dlg:checkbox dlg:style-id="0" dlg:id="chkLogfile" dlg:tab-index="43" dlg:left="6" dlg:top="177" dlg:width="136" dlg:height="9" dlg:page="1" dlg:value="chkLogfile"/>
</dlg:bulletinboard>
</dlg:window> \ No newline at end of file
diff --git a/wizards/source/importwizard/Language.xba b/wizards/source/importwizard/Language.xba
index c4d9a2da1db9..10d0b0c1df1f 100644
--- a/wizards/source/importwizard/Language.xba
+++ b/wizards/source/importwizard/Language.xba
@@ -9,13 +9,12 @@ Public sSOHelperdocuments(1) As String
Public sTemplateCheckbox(SBMAXAPPLCOUNT-1) As String
Public sDocumentCheckbox(SBMAXAPPLCOUNT-1) As String
Public sTemplateGroupName(SBMAXAPPLCOUNT-1) As String
-Public sSumDocuments As String &apos; Todo: Platzhalter einfügen
+Public sSearchInSubDir as String
Public sPathErrorTemplates(SBMAXAPPLCOUNT-1) As String
Public sPathErrorDocument(SBMAXAPPLCOUNT-1) As String
Public sPathErrorStarDoc(SBMAXAPPLCOUNT-1) As String
Public sStarDocLabel(SBMAXAPPLCOUNT-1) As String
Public sImportLabel As String, sExportLabel As String
-Public sSearchInSubDir As String
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
@@ -32,6 +31,13 @@ Public sProgressPage_1 As String, sProgressPage_2 As String, sProgressPage_3 as
Public sProgressFound as String, sProgresspage_5 as String
Public sContainerName(1) as String
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
Sub LoadLanguage()
@@ -41,13 +47,14 @@ Sub LoadLanguage()
sBackButton = GetResText(1002)
sNextButton = GetResText(1003)
sBeginButton = GetResText(1004)
-
- sWelcometextLabel1 = ReplaceString(GetResText(1005), GetProductName(),&quot;%PRODUCTNAME&quot;)
- sWelcometextLabel2 = GetResText(1006)
- sWelcometextLabel3 = GetResText(1007)
+ sCloseButton = GetResText(1005)
+
+ sWelcometextLabel1 = ReplaceString(GetResText(1006), GetProductName(),&quot;%PRODUCTNAME&quot;)
+ sWelcometextLabel2 = GetResText(1007)
+ sWelcometextLabel3 = GetResText(1008)
&apos; Microsoft Documents
- GetApplResourceArray(1008, 3, sMSTemplateCheckBox())
+ GetApplResourceArray(1009, 3, sMSTemplateCheckBox())
&apos; DocumentCheckbox- Captions
GetApplResourceArray(1012, 3, sMSDocumentCheckBox())
@@ -58,17 +65,10 @@ Sub LoadLanguage()
&apos;StarOffice Applicationnames
GetApplResourceArray(2016,2, sSOHelperDocuments())
- sImportLabel = GetResText(1033)
- sExportLabel = GetResText(1034)
-
sContainerName(0) = GetResText(1030)
sContainerName(1) = &quot;StarOffice&quot;
- sSearchInSubDir = GetResText(1022)
- sSumInclusiveSubDir = GetResText(1023)
- sSumSaveDocuments = GetResText(1024)
- sSumDocuments = GetResText(1025)
sSummaryHeader = GetResText(1031)
sTemplateGroupName(0) = GetResText(1036)
@@ -95,7 +95,29 @@ Sub LoadLanguage()
sProgressFound = GetResText(1093)
sProgressPage_5 = GetResText(1094)
sReady = GetResText(1100)
+ sSourceDocuments = GetResText(2030)
+ sTargetDocuments = GetResText(2031)
+ 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())
ImportDialogArea.Title = sTitle
+ With ImportDialog
+ sImportLabel = GetResText(1033)
+ sExportLabel = GetResText(1034)
+ sSearchInSubDir = GetResText(1022)
+ .TemplateSearchSubDir.Label = sSearchInSubDir
+ .DocumentImportLabel.Label = sImportLabel
+ .DocumentExportLabel.Label = sExportLabel
+ .DocumentSearchSubDir.Label = sSearchInSubDir
+ .TemplateImportLabel.Label = sImportLabel
+ .TemplateExportLabel.Label = sExportLabel
+ .chkLogfile.Label = GetResText(2032)
+ .chkLogfile.Helptext = GetResText(2033)
+ End With
End If
End Sub
@@ -109,23 +131,4 @@ Dim a as Integer
a = a + 1
Next
End Sub
-
-
-Sub LoadLibrary(sLibname as String)
-Dim oArg(0) as new com.sun.star.beans.PropertyValue
-Dim oUrl as new com.sun.star.util.URL
-Dim oTrans as Object
-Dim oDisp as Object
-
- oArg(0).Name = &quot;LibraryName&quot;
- oArg(0).Value = sLibname
-
- oTrans = createUNOService(&quot;com.sun.star.util.URLTransformer&quot;)
- oUrl.Complete = &quot;slot:6517&quot;
- oTrans.parsestrict(oUrl)
-
- oDisp = StarDesktop.currentFrame.queryDispatch(oUrl, &quot;_self&quot;, 0)
- oDisp.dispatch(oUrl, oArg())
-End Sub
-
</script:module> \ No newline at end of file
diff --git a/wizards/source/importwizard/Main.xba b/wizards/source/importwizard/Main.xba
index bd3caf5ae2e9..395f7c83570c 100644
--- a/wizards/source/importwizard/Main.xba
+++ b/wizards/source/importwizard/Main.xba
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Main" script:language="StarBasic">&apos; ***** BASIC *****
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Main" script:language="StarBasic">Option Explicit
+
+&apos; ***** BASIC *****
&apos; Todo: Problematik der VBA-Makros, die angeblich nicht mit abgespeichert werden koennen.
&apos; Evt. Erkennen der Arbeitsverzeichnisse von MS Office
&apos; Filternamen fuer Ziel-XML-Dokumente und deren Extensionen feststellen (auch fuer StarMath)
@@ -17,18 +19,19 @@ Sub Main
On Error Goto RTError
End If
SOBitmapPath = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/bitmap&quot;)
- SOWorkPath = ConvertToUrl(GetPathSettings(&quot;Work&quot;, False))
- SOTemplatePath = ConvertToUrl(GetPathSettings(&quot;Template&quot;,False,1))
+ SOWorkPath = GetPathSettings(&quot;Work&quot;, False)
+ SOTemplatePath = GetPathSettings(&quot;Template&quot;,False,1)
bCancelTask = False
+ bDoKeepApplValues = False
CurOffice = 0
ImportDialogArea = LoadDialog(&quot;ImportWizard&quot;,&quot;ImportDialog&quot;)
-
ImportDialog = ImportDialogArea.Model
LoadLanguage()
FillStep_Welcome()
RepaintHeaderPreview()
SetStates()
- ImportDialogArea.execute
+ ImportDialogArea.SetVisible(True)
+ ImportDialog.cbGoOn.DefaultButton = True
Exit Sub
RTError:
Msgbox sRTErrorDesc, 16, sRTErrorHeader
@@ -50,8 +53,7 @@ Dim iCurStep as Integer
If Not bDebugWizard Then
On Error Goto RTError
End If
-
- iCurStep = ImportDialog.Step
+ iCurStep = ImportDialog.Step
Select Case iCurStep
Case 1
FillStep_InputPaths(0, True)
@@ -59,6 +61,7 @@ Dim iCurStep as Integer
If SaveStep_InputPath Then
If CurOffice &lt; ApplCount - 1 Then
CurOffice = CurOffice + 1
+ TakeOverPathSettings()
FillStep_InputPaths(CurOffice, False)
RepaintHeaderPreview()
Else
@@ -75,13 +78,13 @@ Dim iCurStep as Integer
End Select
Case 4
End Select
+ ImportDialog.cbGoOn.DefaultButton = True
Exit Sub
RTError:
Msgbox sRTErrorDesc, 16, sRTErrorHeader
End Sub
-
Sub PrevStep
Dim iCurStep as Integer
If Not bDebugWizard Then
@@ -90,6 +93,7 @@ Dim iCurStep as Integer
iCurStep = ImportDialog.Step
Select Case iCurStep
Case 4
+ ImportDialog.cbCancel.Label = sCancelButton
FillStep_Summary()
Case 3
&apos;Todo: muessen auch beim Zuruecksteppen wirklich die Importpfade auf ihre Gueltigkeit hin Ueberprueft werden?
@@ -102,11 +106,11 @@ Dim iCurStep as Integer
RepaintHeaderPreview()
Else
FillStep_Welcome()
-&apos; bDoKeepApplValues = True
+ bDoKeepApplValues = True
End If
End If
End Select
-
+ ImportDialog.cbGoOn.DefaultButton = True
Exit Sub
RTError:
Msgbox sRTErrorDesc, 16, sRTErrorHeader
@@ -114,13 +118,13 @@ End Sub
Sub CancelButton
- If ImportDialog.Step = 4 Then
- Call CancelButtonPressed()
- Else
+&apos; If ImportDialog.Step = 4 Then
+&apos; Call CancelButtonPressed()
+&apos; Else
ImportDialogArea.EndExecute
- ImportDialogArea.Dispose
+ ImportDialogArea.Dispose()
End
- End If
+&apos; End If
End Sub
@@ -136,10 +140,10 @@ Sub CancelTask()
End Sub
-Sub CancelButtonPressed()
- ImportDialog.cbCancel.Enabled = False
- bCancelTask = True
-End Sub
+&apos;Sub CancelButtonPressed()
+&apos; ImportDialog.cbCancel.Enabled = False
+&apos; bCancelTask = True
+&apos;End Sub
Sub TemplateDirSearchDialog()
@@ -153,7 +157,7 @@ Dim CurStep as Integer
Dim sBitmapPath as String
CurStep = ImportDialog.Step
If CurStep = 2 Then
- sBitmapPath = SOBitmapPath &amp; WizardMode &amp; &quot;-Import_&quot; &amp; CurStep &amp; &quot;-&quot; &amp; Val(Applications(CurOffice,9))+1 &amp; &quot;.bmp&quot;
+ sBitmapPath = SOBitmapPath &amp; WizardMode &amp; &quot;-Import_&quot; &amp; CurStep &amp; &quot;-&quot; &amp; Applications(CurOffice,SBAPPLKEY) + 1 &amp; &quot;.bmp&quot;
Else
sBitmapPath = SOBitmapPath &amp; &quot;Import_&quot; &amp; CurStep &amp; &quot;.bmp&quot;
End If
@@ -168,25 +172,19 @@ End Sub
Sub DisorEnableCheckboxes(oEvent as Object)
-Dim bMSEnable, bXMLEnable as Boolean
- Select Case oEvent.Source.Model.Tag
- Case &quot;MS&quot;
- bMSEnable = true
- bXMLEnable = false
- Case &quot;XML&quot;
- bMSEnable = false
- bXMLEnable = true
- End Select
+Dim bMSEnable as Boolean
+ bMSEnable = oEvent.Source.Model.Tag = &quot;MS&quot;
With ImportDialog
- .ChkFirstSOApplication.Enabled = bXMLEnable
- .ChkSecondSOApplication.Enabled = bXMLEnable
- .ChkThirdSOApplication.Enabled = bXMLEnable
- .ChkFourthSOApplication.Enabled = bXMLEnable
+ .ChkFirstSOApplication.Enabled = Not bMSEnable
+ .ChkSecondSOApplication.Enabled = Not bMSEnable
+ .ChkThirdSOApplication.Enabled = Not bMSEnable
+ .ChkFourthSOApplication.Enabled = Not bMSEnable
.ChkFirstMSApplication.Enabled = bMSEnable
.ChkSecondMSApplication.Enabled = bMSEnable
.ChkThirdMSApplication.Enabled = bMSEnable
.WelcomeTextLabel2.Enabled = bMSEnable
End With
+ bDoKeepApplValues = False
DisOrEnableNextButton()
End Sub
@@ -195,18 +193,17 @@ Sub DisOrEnableNextButton()
Dim iCurStep as Integer
Dim bDoEnable as Boolean
Dim i as Integer
-
iCurStep = ImportDialog.Step
Select Case iCurStep
Case 1
With ImportDialog
- If .OptMSDocuments.State Then
- bDoEnable = .ChkFirstMSApplication.State Or .ChkSecondMSApplication.State Or .ChkThirdMSApplication.State
+ If .OptMSDocuments.State = 1 Then
+ bDoEnable = .ChkFirstMSApplication.State = 1 Or .ChkSecondMSApplication.State = 1 Or .ChkThirdMSApplication.State = 1
Else
- bDoEnable = .ChkFirstSOApplication.State Or .ChkSecondSOApplication.State Or .ChkThirdSOApplication.State Or .ChkFourthSOApplication.State
+ bDoEnable = .ChkFirstSOApplication.State = 1 Or .ChkSecondSOApplication.State = 1 Or .ChkThirdSOApplication.State = 1 Or .ChkFourthSOApplication.State = 1
End If
End With
-&apos; bDoKeepApplValues = False
+ bDoKeepApplValues = False
Case 2
bDoEnable = CheckControlPath(ImportDialog.TemplateImportPath, True)
bDoEnable = CheckControlPath(ImportDialog.TemplateExportPath, bDoEnable)
@@ -217,7 +214,16 @@ Dim i as Integer
End Sub
-Function ControlStateToBool(iState)
- ControlStateToBool = (Val(iState) = 1)
-End Function
+Sub TakeOverPathSettings()
+&apos;Takes over the Pathsettings from the first selected application to the next applications
+ Applications(CurOffice,SBDOCSOURCE) = Applications(0,SBDOCSOURCE)
+ Applications(CurOffice,SBDOCTARGET) = Applications(0,SBDOCTARGET)
+ If WizardMode = SBXMLMODE AND Applications(CurOffice,SBAPPLKEY) = 3 Then &apos; Helper Applications
+ 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
+End Sub
</script:module> \ No newline at end of file