AutoPilotRun.xba (cdf0e10c) AutoPilotRun.xba (283d1c44)
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
3<script:module xmlns:script="http://openoffice.org/2000/script" script:name="AutoPilotRun" script:language="StarBasic">Option Explicit
4
5Public SourceDir as String
6Public TargetDir as String
7Public TargetStemDir as String
8Public SourceFile as String
9Public TargetFile as String
10Public Source as String
11Public SubstFile as String
12Public SubstDir as String
13Public NoArgs()
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
3<script:module xmlns:script="http://openoffice.org/2000/script" script:name="AutoPilotRun" script:language="StarBasic">Option Explicit
4
5Public SourceDir as String
6Public TargetDir as String
7Public TargetStemDir as String
8Public SourceFile as String
9Public TargetFile as String
10Public Source as String
11Public SubstFile as String
12Public SubstDir as String
13Public NoArgs()
14Public FilterList(9) as String
14Public TypeList(14) as String
15Public GoOn as Boolean
16Public DoUnprotect as Integer
17Public Password as String
18Public DocIndex as Integer
19Public oPathSettings as Object
20Public oUcb as Object
21Public TotDocCount as Integer
22Public sTotDocCount as String

--- 27 unchanged lines hidden (view full) ---

50
51 If Source &lt;&gt; &quot;&quot; And TargetDir &lt;&gt; &quot;&quot; Then
52 If DialogModel.optSingleFile.State = 1 Then
53 SourceFile = Source
54 TotDocCount = 1
55 Else
56 SourceDir = Source
57 TargetStemDir = TargetDir
15Public GoOn as Boolean
16Public DoUnprotect as Integer
17Public Password as String
18Public DocIndex as Integer
19Public oPathSettings as Object
20Public oUcb as Object
21Public TotDocCount as Integer
22Public sTotDocCount as String

--- 27 unchanged lines hidden (view full) ---

50
51 If Source &lt;&gt; &quot;&quot; And TargetDir &lt;&gt; &quot;&quot; Then
52 If DialogModel.optSingleFile.State = 1 Then
53 SourceFile = Source
54 TotDocCount = 1
55 Else
56 SourceDir = Source
57 TargetStemDir = TargetDir
58 FilterList(0) = &quot;application/x-starcalc&quot;
59 FilterList(1) = &quot;application/vnd.stardivision.calc&quot;
60 FilterList(2) = &quot;application/vnd.sun.xml.calc&quot;
61 FilterList(3) = &quot;application/vnd.oasis.opendocument.spreadsheet&quot;
58 TypeList(0) = &quot;calc8&quot;
59 TypeList(1) = &quot;calc_StarOffice_XML_Calc&quot;
60 TypeList(2) = &quot;calc_StarCalc_30&quot;
61 TypeList(3) = &quot;calc_StarCalc_40&quot;
62 TypeList(4) = &quot;calc_StarCalc_50&quot;
62 If DialogModel.chkTextDocuments.State = 1 Then
63 If DialogModel.chkTextDocuments.State = 1 Then
63 ReDim Preserve FilterList(8) as String
64
65 FilterList(4) = &quot;application/x-starwriter&quot;
66 FilterList(5) = &quot;application/vnd.stardivision.writer&quot;
67 FilterList(6) = &quot;application/vnd.stardivision.writer/web&quot;
68 FilterList(7) = &quot;application/vnd.sun.xml.writer&quot;
69 FilterList(8) = &quot;application/vnd.oasis.opendocument.text&quot;
64 ReDim Preserve TypeList(13) as String
65
66 TypeList(5) = &quot;writer8&quot;
67 TypeList(6) = &quot;writerglobal8&quot;
68 TypeList(7) = &quot;writer_StarOffice_XML_Writer&quot;
69 TypeList(8) = &quot;writer_globaldocument_StarOffice_XML_Writer_GlobalDocument&quot;
70 TypeList(9) = &quot;writer_StarWriter_30&quot;
71 TypeList(10) = &quot;writer_StarWriter_40&quot;
72 TypeList(11) = &quot;writer_globaldocument_StarWriter_40GlobalDocument&quot;
73 TypeList(12) = &quot;writer_StarWriter_50&quot;
74 TypeList(13) = &quot;writer_globaldocument_StarWriter_50GlobalDocument&quot;
70 End If
75 End If
71 FilesList() = ReadDirectories(SourceDir, bRecursive, True, False, FilterList())
76 FilesList() = ReadDirectories(SourceDir, bRecursive, True, False, TypeList())
72 TotDocCount = Ubound(FilesList(),1) + 1
73 End If
74 InitializeProgressPage(DialogModel)
75&apos; ChangeToNextProgressStep()
76 sTotDocCount = CStr(TotDocCount)
77 OpenProperties(0).Name = &quot;Hidden&quot;
78 OpenProperties(0).Value = True
79 OpenProperties(1).Name = &quot;AsTemplate&quot;

--- 330 unchanged lines hidden ---
77 TotDocCount = Ubound(FilesList(),1) + 1
78 End If
79 InitializeProgressPage(DialogModel)
80&apos; ChangeToNextProgressStep()
81 sTotDocCount = CStr(TotDocCount)
82 OpenProperties(0).Name = &quot;Hidden&quot;
83 OpenProperties(0).Value = True
84 OpenProperties(1).Name = &quot;AsTemplate&quot;

--- 330 unchanged lines hidden ---