cURL: follow redirects
[LibreOffice.git] / wizards / source / importwizard / DialogModul.xba
blobe55266985414703fa3af902d4c677bc6e5b2673a
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
3 <!--
4 * This file is part of the LibreOffice project.
6 * This Source Code Form is subject to the terms of the Mozilla Public
7 * License, v. 2.0. If a copy of the MPL was not distributed with this
8 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 * This file incorporates work covered by the following license notice:
12 * Licensed to the Apache Software Foundation (ASF) under one or more
13 * contributor license agreements. See the NOTICE file distributed
14 * with this work for additional information regarding copyright
15 * ownership. The ASF licenses this file to you under the Apache
16 * License, Version 2.0 (the "License"); you may not use this file
17 * except in compliance with the License. You may obtain a copy of
18 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 -->
20 <script:module xmlns:script="http://openoffice.org/2000/script" script:name="DialogModul" script:language="StarBasic">Option Explicit
22 Public Const bDebugWizard = True
24 Public Const SBFIRSTAPPLCHECKED = 0
25 Public Const SBSECONDAPPLCHECKED = 1
26 Public Const SBTHIRDAPPLCHECKED = 2
27 Public Const SBFOURTHAPPLCHECKED = 3
28 Public WizardMode as String
29 Public Const SBMICROSOFTMODE = &quot;MS&quot;
30 &apos; The absolute maximal Number of possible Applications
31 Public Const SBMAXAPPLCOUNT = 4
32 Public Const Twip = 425
33 Public MaxApplCount as Integer
34 Public CurOffice As Integer
35 Public SOBitmapPath As String
36 Public SOWorkPath As String
37 Public SOTemplatePath as String
38 Public bCancelTask As Boolean
39 Public bDoKeepApplValues as Boolean
40 Public iApplSection as Integer
41 Public oUcb as Object
42 Public PathSeparator as String
44 Public ApplCount as Integer
45 Public sKeyName(SBMAXAPPLCOUNT-1) as String
46 Public sValueName(SBMAXAPPLCOUNT-1) as String
47 Public sCRLF as String
48 Public MSFilterName(5,4) as String
50 Public Applications(SBMAXAPPLCOUNT-1,9)
52 Public Const SBAPPLCONVERT = 0
53 Public Const SBDOCCONVERT = 1
54 Public Const SBDOCRECURSIVE = 2
55 Public Const SBDOCSOURCE = 3
56 Public Const SBDOCTARGET = 4
57 Public Const SBTEMPLCONVERT = 5
58 Public Const SBTEMPLRECURSIVE = 6
59 Public Const SBTEMPLSOURCE = 7
60 Public Const SBTEMPLTARGET = 8
61 Public Const SBAPPLKEY = 9
62 Public XMLTemplateList()
64 &apos; Application-relating Data are stored in this Array
65 &apos; according to the following structure:
66 &apos; Applications(X,0) = True/False (Application is to be converted)
67 &apos; Applications(X,1) = True/False (Documents are to be converted)
68 &apos; Applications(X,2) = True/False (Including Subdirectories)
69 &apos; Applications(X,3) = &quot;File:///...&quot; (SourceUrl of the documents)
70 &apos; Applications(X,4) = &quot;File///:...&quot; (TargetUrl of the documents)
71 &apos; Applications(X,5) = True/False (Templates are to be converted)
72 &apos; Applications(X,6) = True/False (Including Subdirectories)
73 &apos; Applications(X,7) = &quot;File:///...&quot; (SourceUrl of the templates)
74 &apos; Applications(X,8) = &quot;File:///...&quot; (TargetUrl of the templates)
75 &apos; Applications(X,9) = 0 (Key to the original Index of the Applications)
78 Sub FillStep_Welcome()
79 Dim i as Integer
80 &apos; bDoKeepApplValues = False
81 ImportDialogArea.Title = sTitle
82 With ImportDialog
83 .cmdHelp.Label = sHelpButton
84 .cmdCancel.Label = sCancelButton
85 .cmdBack.Label = sBackButton
86 .cmdGoOn.Label = sNextButton
87 .WelcomeTextLabel.Label = sWelcomeTextLabel1
88 .WelcomeTextLabel3.Label = sWelcomeTextLabel3
90 .optMSDocuments.Label = sContainerName(0)
91 .chkMSApplication1.Label = sMsDocumentCheckbox(0)
92 .chkMSApplication2.Label = sMsDocumentCheckbox(1)
93 .chkMSApplication3.Label = sMsDocumentCheckbox(2)
95 .cmdBack.Enabled = False
96 .Step = 1
98 If Not oFactoryKey.hasbyName(&quot;com.sun.star.text.TextDocument&quot;) Then
99 .chkLogfile.State = 0
100 .chkLogfile.Enabled = False
101 End If
102 End With
103 CheckModuleInstallation()
104 ToggleNextButton()
105 End Sub
108 Sub FillStep_InputPaths(OfficeIndex as Integer, bStartup as Boolean)
109 Dim Index as Integer
110 Dim oNullObject as Object
111 If bStartup And Not bDoKeepApplValues Then
112 If ImportDialog.optMSDocuments.State = 1 Then
113 SetupMSConfiguration()
114 Else
115 &apos;Not supposed to happen - is there an assert in BASIC...
116 End If
117 FillUpApplicationList()
118 End If
119 CurOffice = OfficeIndex
120 Index = Applications(CurOffice,SBAPPLKEY)
121 InitializePathsforCurrentApplication(Index)
122 With ImportDialog
123 .chkTemplatePath.Label = sTemplateCheckbox(Index)
124 .chkDocumentPath.State = Abs(Applications(CurOffice,SBDOCCONVERT))
125 .chkDocumentSearchSubDir.State = Abs(Applications(CurOffice,SBDOCRECURSIVE))
126 .txtDocumentImportPath.Text = ConvertFromUrl(Applications(CurOffice,SBDOCSOURCE))
127 .txtDocumentExportPath.Text = ConvertFromUrl(Applications(CurOffice,SBDOCTARGET))
128 .hlnDocuments.Label = sProgressMoreDocs
129 If WizardMode = SBMICROSOFTMODE Then
130 ImportDialogArea.Title = sTitle &amp; &quot; - &quot; &amp; sMSDocumentCheckBox(Index)
131 End If
132 .chkTemplatePath.Enabled = True
133 .chkDocumentPath.Enabled = True
134 .chkTemplatePath.Label = sTemplateCheckbox(Index)
135 .chkDocumentPath.Label = sDocumentCheckbox(Index)
136 .hlnTemplates.Label = sProgressMoreTemplates
137 .chkTemplatePath.State = Abs(Applications(CurOffice,SBTEMPLCONVERT))
138 ToggleInputPaths(oNullObject,&quot;Template&quot;)
139 ToggleInputPaths(oNullObject,&quot;Document&quot;)
140 .chkTemplateSearchSubDir.State = Abs(Applications(CurOffice,SBTEMPLRECURSIVE))
141 .txtTemplateImportPath.Text = ConvertFromUrl(Applications(CurOffice,SBTEMPLSOURCE))
142 .txtTemplateExportPath.Text = ConvertFromUrl(Applications(CurOffice,SBTEMPLTARGET))
143 .cmdGoOn.Label = sNextButton
144 .cmdBack.Enabled = True
145 ImportDialog.Step = 2
146 End With
147 ImportDialogArea.GetControl(&quot;chkTemplatePath&quot;).SetFocus()
148 ToggleNextButton()
149 End Sub
152 Sub FillUpApplicationList()
153 Dim i as Integer
154 Dim a as Integer
155 Dim BoolValue as Boolean
156 If Not bDoKeepApplValues Then
157 a = 0
158 For i = 1 To ApplCount
159 If ImportDialog.optMSDocuments.State = 1 Then
160 BoolValue = ImportDialogArea.GetControl(&quot;chkMSApplication&quot; &amp; i).Model.State = 1
161 End If
162 Applications(a,SBAPPLCONVERT) = BoolValue
163 Applications(a,SBDOCCONVERT) = BoolValue
164 Applications(a,SBDOCRECURSIVE) = BoolValue
165 Applications(a,SBDOCSOURCE) = &quot;&quot; &apos; GetDefaultPath(i)
166 Applications(a,SBDOCTARGET) = &quot;&quot; &apos; SOWorkPath
167 Applications(a,SBTEMPLCONVERT) = BoolValue
168 Applications(a,SBTEMPLRECURSIVE) = BoolValue
169 Applications(a,SBTEMPLSOURCE) = &quot;&quot; &apos; GetTemplateDefaultPath(i)
170 Applications(a,SBTEMPLTARGET) = &quot;&quot; &apos; GetTargetTemplatePath(i)
171 Applications(a,SBAPPLKEY) = i-1
172 If BoolValue Then
173 a = a + 1
174 End If
175 Next i
176 ApplCount = a
177 End If
178 End Sub
181 Sub InitializePathsforCurrentApplication(i as Integer)
182 AssignPathToCurrentApplication(SBDOCSOURCE, GetDefaultPath(i))
183 AssignPathToCurrentApplication(SBDOCTARGET, SOWorkPath)
184 AssignPathToCurrentApplication(SBTEMPLSOURCE, GetTemplateDefaultPath(i))
185 AssignPathToCurrentApplication(SBTEMPLTARGET, GetTargetTemplatePath(i))
186 End Sub
189 Sub AssignPathToCurrentApplication(Index as Integer, NewPath as String)
190 If Applications(CurOffice,Index) = &quot;&quot; Then
191 If CurOffice &gt; 0 Then
192 Applications(CurOffice,Index) = Applications(CurOffice-1,Index)
193 Else
194 Applications(CurOffice,Index) = NewPath
195 End If
196 End If
197 End Sub
200 Sub SaveStep_InputPath()
201 Applications(CurOffice,SBDOCCONVERT) = ImportDialog.chkDocumentPath.State = 1
202 Applications(CurOffice,SBDOCRECURSIVE) = ImportDialog.chkDocumentSearchSubDir.State = 1
203 Applications(CurOffice,SBDOCSOURCE) = ConvertToURL(ImportDialog.txtDocumentImportPath.Text)
204 Applications(CurOffice,SBDOCTARGET) = ConvertToUrl(ImportDialog.txtDocumentExportPath.Text)
205 Applications(CurOffice,SBTEMPLCONVERT) = ImportDialog.chkTemplatePath.State = 1
206 Applications(CurOffice,SBTEMPLRECURSIVE) = ImportDialog.chkTemplateSearchSubDir.State = 1
207 Applications(CurOffice,SBTEMPLSOURCE) = ConvertToURL(ImportDialog.txtTemplateImportPath.Text)
208 Applications(CurOffice,SBTEMPLTARGET) = ConvertToURL(ImportDialog.txtTemplateExportPath.Text)
209 End Sub
212 Sub ToggleInputPaths(aEvent as Object, Optional sDocType)
213 Dim bDoEnable as Boolean
214 Dim sLocDocType as String
215 Dim oCheckBox as Object
216 If Not IsNull(aEvent) Then
217 sLocDocType = aEvent.Source.Model.Tag
218 Else
219 sLocDocType = sDocType
220 End If
221 With ImportDialogArea
222 oCheckBox = .GetControl(&quot;chk&quot; &amp; sLocDocType &amp; &quot;Path&quot;).Model
223 bDoEnable = oCheckBox.State = 1 And oCheckBox.Enabled
224 .GetControl(&quot;lbl&quot; &amp; sLocDocType &amp; &quot;Import&quot;).Model.Enabled = bDoEnable
225 .GetControl(&quot;lbl&quot; &amp; sLocDocType &amp; &quot;Export&quot;).Model.Enabled = bDoEnable
226 .GetControl(&quot;txt&quot; &amp; sLocDocType &amp; &quot;ImportPath&quot;).Model.Enabled = bDoEnable
227 .GetControl(&quot;txt&quot; &amp; sLocDocType &amp; &quot;ExportPath&quot;).Model.Enabled = bDoEnable
228 .GetControl(&quot;chk&quot; &amp; sLocDocType &amp; &quot;SearchSubDir&quot;).Model.Enabled = bDoEnable
229 .GetControl(&quot;cmd&quot; &amp; sLocDocType &amp; &quot;Import&quot;).Model.Enabled = bDoEnable
230 .GetControl(&quot;cmd&quot; &amp; sLocDocType &amp; &quot;Export&quot;).Model.Enabled = bDoEnable
231 End With
232 ToggleNextButton()
233 End Sub
236 Function MakeSummaryString()
237 Dim sTmpText As String
238 Dim i as Integer
239 Dim Index as Integer
240 Dim sAddText as String
241 For i = 0 To ApplCount -1
242 Index = Applications(i,SBAPPLKEY)
243 If Applications(i,SBTEMPLCONVERT) Then
244 &apos; Templates are to be converted
245 sAddText = &quot;&quot;
246 If WizardMode = SBMICROSOFTMODE Then
247 sAddText = sSumMSTemplates(Index) &amp; sCRLF
248 End If
249 sTmpText = sTmpText &amp; sAddText &amp; ConvertFromUrl(Applications(i,SBTEMPLSOURCE)) &amp; sCRLF
250 If Applications(i,SBTEMPLRECURSIVE) Then
251 &apos; Including Subdirectories
252 sTmpText = sTmpText &amp; sSumInclusiveSubDir &amp; sCRLF
253 End If
254 sTmpText = sTmpText &amp; sSumSaveDocuments &amp; sCRLF
255 sTmpText = sTmpText &amp; ConvertFromUrl(Applications(i,SBTEMPLTARGET)) &amp; sCRLF
256 sTmpText = sTmpText &amp; sCRLF
257 End If
259 If Applications(i,SBDOCCONVERT) Then
260 &apos; Documents are to be converted
261 If WizardMode = SBMICROSOFTMODE Then
262 sAddText = sSumMSDocuments(Index) &amp; sCRLF
263 End If
264 sTmpText = sTmpText &amp; sAddText &amp; ConvertFromUrl(Applications(i,SBDOCSOURCE)) &amp; sCRLF
266 If Applications(i,SBDOCRECURSIVE) Then
267 &apos; Including Subdirectories
268 sTmpText = sTmpText &amp; sSumInclusiveSubDir &amp; sCRLF
269 End If
271 sTmpText = sTmpText &amp; sSumSaveDocuments &amp; sCRLF
272 sTmpText = sTmpText &amp; ConvertFromUrl(Applications(i,SBDOCTARGET)) &amp; sCRLF
273 sTmpText = sTmpText &amp; sCRLF
274 End If
275 Next i
276 MakeSummaryString = sTmpText
277 End Function
280 Sub FillStep_Summary()
281 ImportDialogArea.Title = sTitle
282 With ImportDialog
283 .SummaryTextbox.Text = MakeSummaryString()
284 .cmdGoOn.Enabled = .SummaryTextbox.Text &lt;&gt; &quot;&quot;
285 .cmdGoOn.Label = sBeginButton
286 .SummaryHeaderLabel.Label = sSummaryHeader
287 .Step = 3
288 End With
289 ImportDialogArea.GetControl(&quot;SummaryHeaderLabel&quot;).SetFocus()
290 End Sub
293 Sub FillStep_Progress()
294 With ImportDialog
295 .cmdBack.Enabled = False
296 .cmdGoOn.Enabled = False
297 .hlnProgress.Label = sProgressPage_1
298 .LabelRetrieval.FontWeight = com.sun.star.awt.FontWeight.BOLD
299 .LabelRetrieval.Label = sProgressPage_2
300 .LabelCurProgress.Label = sProgressPage_3
301 .LabelCurDocumentRetrieval.Label = &quot;&quot;
302 .LabelCurTemplateRetrieval.Label = &quot;&quot;
303 .LabelCurDocument.Label = &quot;&quot;
304 .Step = 4
305 End With
306 ImportDialogArea.GetControl(&quot;LabelRetrieval&quot;).SetFocus()
307 If ImportDialog.chkLogfile.State = 1 Then
308 ImportDialog.cmdShowLogFile.DefaultButton = True
309 End If
310 End Sub
313 Sub SetupMSConfiguration()
314 iApplSection = 0
315 Wizardmode = SBMICROSOFTMODE
316 MaxApplCount = 3
317 ApplCount = 3
318 &apos; chkTemplatePath-Captions
319 GetApplResourceArray(1009 + iApplSection, ApplCount, sTemplateCheckBox())
320 &apos; DocumentCheckbox- Captions
321 GetApplResourceArray(1009 + iApplSection + ApplCount, ApplCount, sDocumentCheckBox())
323 sKeyName(0) = &quot;Software\Microsoft\Office\8.0\Word\Options&quot;
324 sKeyName(1) = &quot;Software\Microsoft\Office\8.0\Excel\Microsoft Excel&quot;
325 sKeyName(2) = &quot;Software\Microsoft\Office\8.0\PowerPoint\Recent Folder List\Default&quot;
327 sValueName(0) = &quot;DOC-PATH&quot;
328 sValueName(1) = &quot;DefaultPath&quot;
329 sValueName(2) = &quot;&quot;
331 &apos; See definition of Filtername-Array about meaning of fields
332 MSFilterName(0,0) = &quot;doc|docx|docm&quot;
333 MSFilterName(0,1) = &quot;writer8|writer8|writer8&quot;
334 MSFilterName(0,2) = &quot;odt|odt|odt&quot;
335 MSFilterName(0,3) = sMSDocumentCheckBox(0)
336 MSFilterName(0,4) = &quot;Word&quot;
339 MSFilterName(1,0) = &quot;xls|xlsx|xlsm&quot;
340 MSFilterName(1,1) = &quot;calc8|calc8|calc8&quot;
341 MSFilterName(1,2) = &quot;ods|ods|ods&quot;
342 MSFilterName(1,3) = sMSDocumentCheckBox(1)
343 MSFilterName(1,4) = &quot;Excel&quot;
345 MSFilterName(2,0) = &quot;ppt|pps|pptx|pub|pptm|ppsx|ppsm&quot;
346 MSFilterName(2,1) = &quot;impress8|impress8|impress8|impress8|impress8|impress8|impress8&quot;
347 MSFilterName(2,2) = &quot;odp|odp|odp|odp|odp|odp|odp&quot;
348 MSFilterName(2,3) = sMSDocumentCheckBox(2)
349 MSFilterName(2,4) = &quot;PowerPoint/Publisher&quot;
351 MSFilterName(3,0) = &quot;dot|dotx|dotm&quot;
352 MSFilterName(3,1) = &quot;writer8_template|writer8_template|writer8_template&quot;
353 MSFilterName(3,2) = &quot;ott|ott|ott&quot;
354 MSFilterName(3,3) = sMSTemplateCheckBox(0)
355 MSFilterName(3,4) = &quot;Word&quot;
357 MSFilterName(4,0) = &quot;xlt|xltx|xltm&quot;
358 MSFilterName(4,1) = &quot;calc8_template|calc8_template|calc8_template&quot;
359 MSFilterName(4,2) = &quot;ots|ots|ots&quot;
360 MSFilterName(4,3) = sMSTemplateCheckBox(1)
361 MSFilterName(4,4) = &quot;Excel&quot;
363 MSFilterName(5,0) = &quot;pot|potx|potm&quot;
364 MSFilterName(5,1) = &quot;impress8_template|impress8_template|impress8_template&quot;
365 MSFilterName(5,2) = &quot;otp|otp|otp&quot;
366 MSFilterName(5,3) = sMSTemplateCheckBox(2)
367 MSFilterName(5,4) = &quot;PowerPoint&quot;
368 End Sub
371 Function CheckControlPath(oCheckbox as Object, oTextBox as Object, ByVal bDoEnable as Boolean)
372 Dim sPath as String
373 If Not bDoEnable Then
374 CheckControlPath = False
375 ElseIf oCheckbox.State = 0 Then
376 CheckControlPath = True
377 Else
378 sPath = ConvertToUrl(Trim(oTextBox.Text))
379 CheckControlPath = oUcb.Exists(sPath)
380 End If
381 End Function
384 Function CheckInputPaths() as Boolean
385 Dim bChangePage as Boolean
386 bChangePage = CheckTextBoxPath(ImportDialog.txtTemplateImportPath, True, False, sTitle, False)
387 bChangePage = CheckTextBoxPath(ImportDialog.txtTemplateExportPath, bChangePage, True, sTitle, False)
388 bChangePage = CheckTextBoxPath(ImportDialog.txtDocumentImportPath, bChangePage, False, sTitle, False)
389 bChangePage = CheckTextBoxPath(ImportDialog.txtDocumentExportPath, bChangePage, True, sTitle, False)
390 CheckInputPaths = bChangePage
391 End Function
394 Function CheckTextBoxPath(oTextBox as Object, ByVal bCheck as Boolean, bCreateNew as Boolean, sTitle as String, bgetResources as Boolean) as Boolean
395 Dim iCreate as Integer
396 Dim sQueryMessage as String
397 Dim sUrlPath as String
398 Dim sMessageNoDir as String
399 Dim sShowPath as String
400 Dim oLocUcb as Object
401 oLocUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
402 If bGetResources Then
403 If InitResources(&quot;ImportWizard&quot;,&quot;imp&quot;) then
404 sNoDirCreation = GetResText(1050)
405 sMsgDirNotThere = GetResText(1051)
406 sQueryForNewCreation = GetResText(1052)
407 Else
408 CheckTextBoxPath() = False
409 Exit Function
410 End If
411 End If
412 If oTextBox.Enabled Then
413 If bCheck Then
414 sShowPath = oTextBox.Text
415 sUrlPath = ConvertToUrl(sShowPath)
416 If Not oLocUcb.Exists(sUrlPath) Then
417 If Not bCreateNew Then
418 &apos; Sourcedirectories must be existing, Targetdirectories may be created new
419 sQueryMessage = ReplaceString(sMsgDirNotThere, sShowPath,&quot;%1&quot;)
420 Msgbox(sQueryMessage,16,sTitle)
421 CheckTextBoxPath() = False
422 Exit Function
423 Else
424 sQueryMessage = ReplaceString(sMsgDirNotThere, sShowPath,&quot;%1&quot;)
425 sQueryMessage = sQueryMessage &amp; Chr(13) &amp; sQueryForNewCreation
426 iCreate = Msgbox (sQueryMessage, 36, sTitle)
427 If iCreate = 6 Then
428 On Local Error Goto NOVALIDPATH
429 CreateFolder(sUrlPath)
430 If Not oLocUcb.Exists(sUrlPath) Then
431 Goto NOVALIDPATH
432 End If
433 Else
434 CheckTextBoxPath() = False
435 Exit Function
436 End If
437 End If
438 End If
439 CheckTextBoxPath() = True
440 Else
441 CheckTextBoxPath() = False
442 End If
443 Else
444 CheckTextBoxPath() = True
445 End If
446 Exit Function
447 NOVALIDPATH:
448 sMessageNoDir = ReplaceString(sNoDirCreation, sShowPath, &quot;%1&quot;)
449 Msgbox(sMessageNoDir, 16, sTitle)
450 CheckTextBoxPath() = False
451 End Function
454 Sub InitializeProgressPage(oDialog as Object)
455 oDialog.LabelRetrieval.FontWeight = com.sun.star.awt.FontWeight.NORMAL
456 oDialog.LabelCurProgress.FontWeight = com.sun.star.awt.FontWeight.BOLD
457 End Sub
460 Sub SetProgressDisplay(AbsFound as Integer)
461 ImportDialog.LabelRetrieval.Label = sProgressPage_2 &amp; &quot; &quot; &amp; ReplaceString(sProgressPage_5, Str(AbsFound) &amp; &quot; &quot;, &quot;%1&quot;)
462 ImportDialog.LabelCurDocumentRetrieval.Label = sProgressFound &amp; &quot; &quot; &amp; CStr(AbsDocuFound) &amp; &quot; &quot; &amp; sProgressMoreDocs
463 ImportDialog.LabelCurTemplateRetrieval.Label = sProgressFound &amp; &quot; &quot; &amp; CStr(AbsTemplateFound) &amp; &quot; &quot; &amp; sProgressMoreTemplates
464 End Sub
466 Sub TakoverFolderName(aEvent as Object)
467 Dim RefControlName as String
468 Dim oRefControl
469 RefControlName = aEvent.Source.Model.Tag
470 oRefControl = ImportDialogArea.GetControl(RefControlName)
471 GetFolderName(oRefControl.Model)
472 ToggleNextButton()
473 End Sub
476 Sub FinalizeDialogButtons()
477 ImportDialog.cmdShowLogFile.Enabled = ((Isnull(oLogDocument) = False) And (ImportDialog.chkLogfile.State = 1))
478 ImportDialog.cmdCancel.Enabled = False
479 ImportDialog.cmdGoOn.Label = sCloseButton
480 ImportDialog.cmdGoOn.Enabled = True
481 End Sub
482 </script:module>