home *** CD-ROM | disk | FTP | other *** search
/ Kompuutteri Kaikille K-CD 2002 #3 / K-CD_2002-03.iso / OpenOffice / f_0243 / DialogModul.xba < prev    next >
Extensible Markup Language  |  2001-08-29  |  18KB  |  499 lines

  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="DialogModul" script:language="StarBasic">Option Explicit
  4.  
  5. Public Const bDebugWizard=True
  6.  
  7. Public Const SBFIRSTAPPLCHECKED = 0
  8. Public Const SBSECONDAPPLCHECKED = 1
  9. Public Const SBTHIRDAPPLCHECKED = 2
  10. Public Const SBFOURTHAPPLCHECKED = 3
  11. Public WizardMode as String
  12. Public Const SBMICROSOFTMODE = "MS"
  13. Public Const SBXMLMODE = "XML"
  14. ' The absolute maximal Number of possible Applications
  15. Public Const Twip = 425
  16. Public Const SBMAXAPPLCOUNT = 4
  17. Public MaxApplCount as Integer
  18. Public CurOffice As Integer
  19. Public SOBitmapPath As String
  20. Public SOWorkPath As String
  21. Public SOTemplatePath as String
  22. Public bCancelTask As Boolean
  23. Public bDoKeepApplValues as Boolean
  24. Public iApplSection as Integer
  25. Public oUcb as Object
  26. Public PathSeparator as String
  27.  
  28. Public ApplCount as Integer
  29. Public sKeyName(SBMAXAPPLCOUNT-1) as String
  30. Public sValueName(SBMAXAPPLCOUNT-1) as String
  31. Public sCRLF as String
  32. Public MSFilterName(5,2) as String
  33. Public XMLFilterName(7,2)
  34.  
  35. ' e.g.:
  36. ' XMLFilterName(x,0) = "sdw"                         ' in documents we take the extensions; in SO-templates the appropriate Filtername
  37. ' XMLFilterName(x,1) = "swriter: StarWriter 5.0"     ' the filtername of the target-format
  38. ' XMLFilterName(x,2) = "sxw"                         ' the target extension
  39.  
  40. Public ChkApplication(SBMAXAPPLCOUNT-1) as Object
  41. Public Applications(SBMAXAPPLCOUNT-1,9)
  42.  
  43. Public Const SBAPPLCONVERT = 0
  44. Public Const SBDOCCONVERT = 1
  45. Public Const SBDOCRECURSIVE = 2
  46. Public Const SBDOCSOURCE = 3
  47. Public Const SBDOCTARGET = 4
  48. Public Const SBTEMPLCONVERT = 5
  49. Public Const SBTEMPLRECURSIVE = 6
  50. Public Const SBTEMPLSOURCE = 7
  51. Public Const SBTEMPLTARGET = 8
  52. Public Const SBAPPLKEY = 9
  53.  
  54. ' Application-relating Data are stored in this Array
  55. ' according to the following structure:
  56. ' Applications(X,0) = True/False         (Application is to be converted)
  57. ' Applications(X,1) = True/False         (Documents are to be converted)
  58. ' Applications(X,2) = True/False        (Including Subdirectories)
  59. ' Applications(X,3) = "File:///..."        (SourceUrl of the documents)
  60. ' Applications(X,4) = "File///:..."        (TargetUrl of the documents)
  61. ' Applications(X,5) = True/False        (Templates are to be converted)
  62. ' Applications(X,6) = True/False         (Including Subdirectories)
  63. ' Applications(X,7) = "File:///..."        (SourceUrl of the templates)
  64. ' Applications(X,8) = "File:///..."     (TargetUrl of the templates)
  65. ' Applications(X,9) = 0                    (Key to the original Index of the Applications)
  66.  
  67.  
  68. Sub FillStep_Welcome()
  69. Dim i as Integer
  70. '    bDoKeepApplValues = False
  71.     With ImportDialog
  72.         .cbHelp.Label = sHelpButton
  73.         .cbCancel.Label = sCancelButton
  74.         .cbBack.Label = sBackButton
  75.         .cbGoOn.Label = sNextButton
  76.         .WelcomeTextLabel.Label = sWelcomeTextLabel1
  77.         .WelcomeTextLabel2.Label = sWelcomeTextLabel2
  78.         .WelcomeTextLabel3.Label = sWelcomeTextLabel3
  79.  
  80.         .OptMSDocuments.Label = sContainerName(0)
  81.         .ChkFirstMSApplication.Label = sMsDocumentCheckbox(0)
  82.         .ChkSecondMSApplication.Label = sMsDocumentCheckbox(1)
  83.         .ChkThirdMSApplication.Label = sMsDocumentCheckbox(2)
  84.  
  85.         .OptSODocuments.Label = sContainerName(1)
  86.         .ChkFirstSOApplication.Label = sSODocumentCheckbox(0)
  87.         .ChkSecondSOApplication.Label = sSODocumentCheckbox(1)
  88.         .ChkThirdSOApplication.Label = sSODocumentCheckbox(2)
  89.         .ChkFourthSOApplication.Label = sSODocumentCheckbox(3)
  90.         .cbBack.Enabled = False
  91.         .Step = 1
  92.     End With
  93.     ToggleNextButton()
  94. End Sub
  95.  
  96.  
  97. Sub FillStep_InputPaths(OfficeIndex as Integer, bStartup as Boolean)
  98. Dim Index as Integer
  99.     If bStartup And Not bDoKeepApplValues Then
  100.         If ImportDialog.OptMSDocuments.State = 1 Then
  101.             SetupMSConfiguration()
  102.         Else
  103.             SetupXMLConfiguration()
  104.         End If
  105.         ' TemplateCheckBox-Captions
  106.         GetApplResourceArray(1009 + iApplSection, ApplCount, sTemplateCheckBox())
  107.         ' DocumentCheckbox- Captions
  108.         GetApplResourceArray(1009 + iApplSection + ApplCount, ApplCount, sDocumentCheckBox())
  109.         AssignCheckboxObjects()
  110.         FillUpApplicationList()
  111.     End If
  112.     CurOffice = OfficeIndex
  113.     Index = Applications(CurOffice,SBAPPLKEY)
  114.     InitializePathsforCurrentApplication(Index)
  115.     With ImportDialog
  116.         .TemplateCheckbox.Label = sTemplateCheckbox(Index)
  117.         .DocumentPathCheckbox.State = Abs(Applications(CurOffice,SBDOCCONVERT))
  118.         SetEnabledDocument_InputPath()        
  119.         .DocumentSearchSubDir.State = Abs(Applications(CurOffice,SBDOCRECURSIVE))
  120.         .DocumentImportPath.Text = ConvertFromUrl(Applications(CurOffice,SBDOCSOURCE))
  121.         .DocumentExportPath.Text = ConvertFromUrl(Applications(CurOffice,SBDOCTARGET))
  122.         .hlnDocuments.Label = sProgressMoreDocs
  123.  
  124.         If WizardMode = SBXMLMODE AND Index = 3 Then
  125.             ' Note: SO-Helper Applications are partly treated like templates although they only have documents
  126.             .hlnTemplates.Label = sProgressMoreDocs
  127.             .TemplateCheckbox.Label = sSOHelperDocuments(0)
  128.             .DocumentPathCheckbox.Label = sSOHelperDocuments(1)
  129.         Else
  130.             .TemplateCheckbox.Label = sTemplateCheckbox(Index)
  131.             .DocumentPathCheckbox.Label = sDocumentCheckbox(Index)
  132.             .hlnTemplates.Label = sProgressMoreTemplates
  133.         End If
  134.         .TemplateCheckbox.State = Abs(Applications(CurOffice,SBTEMPLCONVERT))
  135.         SetEnabledTemplate_InputPath()
  136.         .TemplateSearchSubDir.State = Abs(Applications(CurOffice,SBTEMPLRECURSIVE))
  137.         .TemplateImportPath.Text = ConvertFromUrl(Applications(CurOffice,SBTEMPLSOURCE))
  138.         .TemplateExportPath.Text = ConvertFromUrl(Applications(CurOffice,SBTEMPLTARGET))
  139.         .cbGoOn.Label = sNextButton
  140.         .cbBack.Enabled = True
  141.         ImportDialog.Step = 2
  142.     End With
  143.     ToggleNextButton()
  144. End Sub
  145.  
  146.  
  147. Sub FillUpApplicationList()
  148. Dim i as Integer
  149. Dim a as Integer
  150. Dim BoolValue as Boolean
  151.     If Not bDoKeepApplValues Then
  152.         a = 0
  153.         For i = 0 To ApplCount - 1
  154.             BoolValue = ChkApplication(i).State = 1
  155.             Applications(a,SBAPPLCONVERT) = BoolValue
  156.             Applications(a,SBDOCCONVERT) = BoolValue
  157.             Applications(a,SBDOCRECURSIVE) = BoolValue
  158.             Applications(a,SBDOCSOURCE) = ""            ' GetDefaultPath(i)
  159.             Applications(a,SBDOCTARGET) = ""            ' SOWorkPath
  160.             Applications(a,SBTEMPLCONVERT) = BoolValue
  161.             Applications(a,SBTEMPLRECURSIVE) = BoolValue
  162.             Applications(a,SBTEMPLSOURCE) = ""             ' GetTemplateDefaultPath(i)
  163.             Applications(a,SBTEMPLTARGET) = ""             ' GetTargetTemplatePath(i)
  164.             Applications(a,SBAPPLKEY) = i
  165.             If ChkApplication(i).State = 1 Then 
  166.                 a = a + 1
  167.             End If
  168.         Next i
  169.         ApplCount = a
  170.     End If
  171. End Sub
  172.  
  173.  
  174. Sub InitializePathsforCurrentApplication(i as Integer)
  175.     AssignPathToCurrentApplication(SBDOCSOURCE, GetDefaultPath(i))
  176.     AssignPathToCurrentApplication(SBDOCTARGET, SOWorkPath)
  177.     AssignPathToCurrentApplication(SBTEMPLSOURCE, GetTemplateDefaultPath(i))
  178.     AssignPathToCurrentApplication(SBTEMPLTARGET, GetTargetTemplatePath(i))
  179. End Sub
  180.  
  181.  
  182. Sub AssignPathToCurrentApplication(Index as Integer, NewPath as String)
  183.     If Applications(CurOffice,Index) = "" Then
  184.         If CurOffice > 0 Then
  185.             Applications(CurOffice,Index) = Applications(CurOffice-1,Index)
  186.         Else
  187.             Applications(CurOffice,Index) = NewPath
  188.         End If
  189.     End If
  190. End Sub
  191.  
  192.  
  193. Sub SaveStep_InputPath()
  194.     Applications(CurOffice,SBDOCCONVERT)  = ImportDialog.DocumentPathCheckbox.State = 1
  195.     Applications(CurOffice,SBDOCRECURSIVE)  = ImportDialog.DocumentSearchSubDir.State = 1
  196.     Applications(CurOffice,SBDOCSOURCE)  = ConvertToURL(ImportDialog.DocumentImportPath.Text)
  197.     Applications(CurOffice,SBDOCTARGET) = ConvertToUrl(ImportDialog.DocumentExportPath.Text)
  198.     Applications(CurOffice,SBTEMPLCONVERT) = ImportDialog.TemplateCheckbox.State = 1
  199.     Applications(CurOffice,SBTEMPLRECURSIVE) = ImportDialog.TemplateSearchSubDir.State = 1
  200.     Applications(CurOffice,SBTEMPLSOURCE) = ConvertToURL(ImportDialog.TemplateImportPath.Text)
  201.     Applications(CurOffice,SBTEMPLTARGET) = ConvertToURL(ImportDialog.TemplateExportPath.Text)
  202. End Sub
  203.  
  204.  
  205. Sub SetEnabledTemplate_InputPath()
  206. Dim bDoEnable as Boolean
  207.     With ImportDialog
  208.         bDoEnable = .TemplateCheckbox.State = 1
  209.         .TemplateImportLabel.Enabled = bDoEnable
  210.         .TemplateExportLabel.Enabled = bDoEnable
  211.         .TemplateImportPath.Enabled = bDoEnable
  212.         .TemplateExportPath.Enabled = bDoEnable
  213.         .TemplateSearchSubDir.Enabled = bDoEnable
  214.         .TemplateImportPath.Enabled = bDoEnable
  215.         If Not bDoEnable Then
  216.             .cbGoOn.Enabled = .DocumentPathCheckbox.State = 1
  217.         Else
  218.             .cbGoOn.Enabled = True
  219.         End If
  220.     End With
  221. End Sub
  222.  
  223.  
  224. Sub SetEnabledDocument_InputPath()
  225. Dim bDoEnable as Boolean
  226.     With ImportDialog
  227.         bDoEnable = .DocumentPathCheckbox.State = 1
  228.         .DocumentImportLabel.Enabled = bDoEnable
  229.         .DocumentExportLabel.Enabled = bDoEnable
  230.         .DocumentSearchSubDir.Enabled = bDoEnable
  231.         .DocumentImportPath.Enabled = bDoEnable
  232.         .DocumentExportPath.Enabled = bDoEnable
  233.     End With
  234.     ToggleNextButton()
  235. End Sub
  236.  
  237.  
  238. Function MakeSummaryString()
  239. Dim sTmpText As String
  240. Dim i as Integer
  241. Dim Index as Integer
  242. Dim sAddText as String
  243.     For i = 0 To ApplCount -1
  244.         Index = Applications(i,SBAPPLKEY)
  245.         If     Applications(i,SBTEMPLCONVERT) Then
  246.             ' Templates are to be converted
  247.             sAddText = ""
  248.             If WizardMode = SBMICROSOFTMODE Then
  249.                 sAddText = sSumMSTemplates(Index) & sCRLF
  250.             Else
  251.                 sAddText = sSumSOTemplates(Index) & sCRLF            
  252.             End If
  253.             sTmpText = sTmpText & sAddText &  ConvertFromUrl(Applications(i,SBTEMPLSOURCE)) & sCRLF
  254.             If Applications(i,SBTEMPLRECURSIVE) Then
  255.                 ' Including Subdirectories
  256.                 sTmpText = sTmpText & sSumInclusiveSubDir & sCRLF
  257.             End If
  258.             sTmpText = sTmpText & sSumSaveDocuments & sCRLF
  259.             sTmpText = sTmpText & ConvertFromUrl(Applications(i,SBTEMPLTARGET)) & sCRLF
  260.             sTmpText = sTmpText & sCRLF
  261.         End If
  262.  
  263.         If Applications(i,SBDOCCONVERT) Then
  264.             ' Documents are to be converted
  265.             If WizardMode = SBMICROSOFTMODE Then
  266.                 sAddText = sSumMSDocuments(Index) & sCRLF
  267.             Else
  268.                 sAddText = sSumSODocuments(Index) & sCRLF            
  269.             End If
  270.             sTmpText = sTmpText & sAddText & ConvertFromUrl(Applications(i,SBDOCSOURCE)) & sCRLF
  271.  
  272.             If Applications(i,SBDOCRECURSIVE) Then
  273.                 ' Including Subdirectories
  274.                 sTmpText = sTmpText & sSumInclusiveSubDir & sCRLF
  275.             End If
  276.  
  277.             sTmpText = sTmpText & sSumSaveDocuments & sCRLF
  278.             sTmpText = sTmpText & ConvertFromUrl(Applications(i,SBDOCTARGET)) & sCRLF
  279.             sTmpText = sTmpText & sCRLF
  280.         End If
  281.     Next i
  282.     MakeSummaryString = sTmpText
  283. End Function
  284.  
  285.  
  286. Sub FillStep_Summary()
  287. ' Todo: Angabe ├╝ber die Vorlagengruppen,bzw. Template-Exportpfad
  288.     With ImportDialog
  289.         .SummaryTextbox.Text = MakeSummaryString()
  290.         .cbGoOn.Enabled = .SummaryTextbox.Text <> ""
  291.         .cbGoOn.Label = sBeginButton
  292.         .SummaryHeaderLabel.Label = sSummaryHeader
  293.         .Step = 3
  294.     End With
  295. End Sub
  296.  
  297.  
  298. Sub FillStep_Progress()
  299.     With ImportDialog
  300.         .cbBack.Enabled = False
  301.         .cbGoOn.Enabled = False
  302.         .hlnProgress.Label = sProgressPage_1
  303.         .LabelRetrieval.FontWeight = com.sun.star.awt.FontWeight.BOLD
  304.             .LabelRetrieval.Label = sProgressPage_2
  305.             .LabelCurProgress.Label = sProgressPage_3
  306.             .LabelCurDocumentRetrieval.Label = ""
  307.             .LabelCurTemplateRetrieval.Label = ""
  308.            .LabelCurDocument.Label = ""
  309.         .Step = 4
  310.     End With
  311. End Sub
  312.  
  313.  
  314. Sub    SetupMSConfiguration()
  315.     iApplSection = 0
  316.     Wizardmode = SBMICROSOFTMODE
  317.     MaxApplCount = 3
  318.     ApplCount = 3
  319.  
  320.     sKeyName(0) = "Software\Microsoft\Office\8.0\Word\Options"
  321.     sKeyName(1) = "Software\Microsoft\Office\8.0\Excel\Microsoft Excel"
  322.     sKeyName(2) = "Software\Microsoft\Office\8.0\PowerPoint\Recent Folder List\Default"
  323.  
  324.     sValueName(0) = "DOC-PATH"
  325.     sValueName(1) = "DefaultPath"
  326.     sValueName(2) = ""
  327.  
  328. ' See definition of Filtername-Array about meaning of fields
  329.     MSFilterName(0,0) = "doc"
  330.     MSFilterName(0,1) = "swriter: StarOffice XML (Writer)"
  331.     MSFilterName(0,2) = "sxw"
  332.  
  333.     MSFilterName(1,0) = "xls"
  334.     MSFilterName(1,1) = "scalc: StarOffice XML (Calc)"
  335.     MSFilterName(1,2) = "sxc"
  336.  
  337.     MSFilterName(2,0) = "ppt"
  338.     MSFilterName(2,1) = "simpress: StarOffice XML (Impress)"
  339.     MSFilterName(2,2) = "sxi"
  340.  
  341.     MSFilterName(3,0) = "dot"
  342.     MSFilterName(3,1) = "swriter: writer_StarOffice_XML_Writer_Template"
  343.     MSFilterName(3,2) = "stw"
  344.  
  345.     MSFilterName(4,0) = "xlt"
  346.     MSFilterName(4,1) = "scalc: calc_StarOffice_XML_Calc_Template"
  347.     MSFilterName(4,2) = "stc"
  348.  
  349.     MSFilterName(5,0) = "pot"
  350.     MSFilterName(5,1) = "simpress: impress_StarOffice_XML_Impress_Template"
  351.     MSFilterName(5,2) = "sti"
  352. End Sub
  353.  
  354.  
  355.  
  356. Sub SetupXMLConfiguration()
  357.     iApplSection = 1000
  358.     Wizardmode = SBXMLMODE
  359.     ApplCount = 4
  360.     MaxApplCount = 4
  361.  
  362.     XMLFilterName(0,0) = "sdw"
  363.     XMLFilterName(0,1) = "swriter: StarOffice XML (Writer)"
  364.     XMLFilterName(0,2) = "sxw"
  365.  
  366.     XMLFilterName(1,0) = "sdc"
  367.     XMLFilterName(1,1) = "scalc: StarOffice XML (Calc)"
  368.     XMLFilterName(1,2) = "sxc"
  369. ' Todo: Gepacktes 'sdp' Format ber├╝cksichtigen
  370.     XMLFilterName(2,0) = "sdd|sda"
  371.     XMLFilterName(2,1) = "simpress: StarOffice XML (Impress)|sdraw: StarOffice XML (Draw)"
  372.     XMLFilterName(2,2) = "sxi|sxd"
  373.  
  374.     XMLFilterName(3,0) = "smf"
  375.     XMLFilterName(3,1) = "smath: StarOffice XML (Math)"
  376.     XMLFilterName(3,2) = "sxm"
  377.  
  378.     XMLFilterName(4,0) = "application/vnd.stardivision.writer;application/x-starwriter|application/vnd.stardivision.writer/web"
  379.     XMLFilterName(4,1) = "swriter: writer_StarOffice_XML_Writer_Template|swriter/web: writer_web_StarOffice_XML_Writer_Web_Template"
  380.     XMLFilterName(4,2) = "stw|stw"
  381.  
  382.     XMLFilterName(5,0) = "application/vnd.stardivision.calc;application/x-starcalc"
  383.     XMLFilterName(5,1) = "scalc: calc_StarOffice_XML_Calc_Template"
  384.     XMLFilterName(5,2) = "stc"
  385.  
  386.     XMLFilterName(6,0) = "application/vnd.stardivision.impress;application/x-starimpress|application/vnd.stardivision.draw;application/x-stardraw"
  387.     XMLFilterName(6,1) = "simpress: impress_StarOffice_XML_Impress_Template|draw_StarOffice_XML_Draw_Template"
  388.     XMLFilterName(6,2) = "sti|std"
  389.  
  390.     XMLFilterName(7,0) = "sgl"
  391.     XMLFilterName(7,1) = "swriter: writer_globaldocument_StarOffice_XML_Writer_GlobalDocument"
  392.     XMLFilterName(7,2) = "sxg"
  393. End Sub
  394.  
  395.  
  396. Function CheckControlPath(oCheckbox as Object, oTextBox as Object, ByVal bDoEnable as Boolean)
  397. Dim sPath as String
  398.     If Not bDoEnable Then
  399.         CheckControlPath = False
  400.     ElseIf oCheckbox.State = 0 Then
  401.         CheckControlPath = True
  402.     Else
  403.         sPath = ConvertToUrl(Trim(oTextBox.Text)
  404.         CheckControlPath = oUcb.Exists(sPath)
  405.     End If
  406. End Function
  407.  
  408.  
  409. Sub AssignCheckboxObjects()
  410.     With ImportDialog
  411.         If .OptSODocuments.State = 1 Then
  412.             Set ChkApplication(0) = .ChkFirstSOApplication
  413.             Set ChkApplication(1) = .ChkSecondSOApplication
  414.             Set ChkApplication(2) = .ChkThirdSOApplication
  415.             Set ChkApplication(3) = .ChkFourthSOApplication
  416.         Else
  417.             Set ChkApplication(0) = .ChkFirstMSApplication
  418.             Set ChkApplication(1) = .ChkSecondMSApplication
  419.             Set ChkApplication(2) = .ChkThirdMSApplication
  420.         End If
  421.     End With
  422. End Sub
  423.  
  424.  
  425. Function CheckInputPaths() as Boolean
  426. Dim bChangePage as Boolean
  427.     bChangePage = CheckTextBoxPath(ImportDialog.TemplateImportPath, True, False)
  428.     bChangePage = CheckTextBoxPath(ImportDialog.TemplateExportPath, bChangePage, True)
  429.     bChangePage = CheckTextBoxPath(ImportDialog.DocumentImportPath, bChangePage, False)
  430.     bChangePage = CheckTextBoxPath(ImportDialog.DocumentExportPath, bChangePage, True)
  431.     CheckInputPaths = bChangePage
  432. End Function
  433.  
  434.  
  435. Function CheckTextBoxPath(oTextBox as Object, ByVal bCheck as Boolean, bCreateNew as Boolean) as Boolean
  436. Dim iCreate as Integer
  437. Dim sQueryMessage as String
  438. Dim sUrlPath as String
  439. Dim sMessageNoDir as String
  440. Dim sShowPath as String
  441.     If oTextBox.Enabled Then
  442.         If bCheck Then
  443.             sShowPath = oTextBox.Text
  444.             sUrlPath = ConvertToUrl(sShowPath)
  445.             If Not oUcb.Exists(sUrlPath) Then
  446.                 If Not bCreateNew Then
  447.                     ' Sourcedirectories must be existing, Targetdirectories may be created new
  448.                     sQueryMessage = ReplaceString(sMsgDirNotThere, sShowPath,"%1")
  449.                     Msgbox(sQueryMessage,16,sTitle)
  450.                     CheckTextBoxPath() = False
  451.                     Exit Function
  452.                 Else
  453.                     sQueryMessage = ReplaceString(sMsgDirNotThere, sShowPath,"%1")
  454.                     sQueryMessage = sQueryMessage & Chr(13) & sQueryForNewCreation
  455.                     iCreate = Msgbox (sQueryMessage, 36, sTitle)
  456.                     If iCreate = 6 Then
  457.                         On Local Error Goto NOVALIDPATH
  458.                         oUcb.CreateFolder(sUrlPath)
  459.                         If Not oUcb.Exists(sUrlPath) Then
  460.                             Goto NOVALIDPATH
  461.                         End If
  462.                     Else
  463.                         CheckTextBoxPath() = False
  464.                         Exit Function
  465.                     End If
  466.                 End If
  467.             End If
  468.             CheckTextBoxPath() = True
  469.         Else
  470.             CheckTextBoxPath() = False
  471.         End If
  472.     Else
  473.         CheckTextBoxPath() = True
  474.     End If
  475.     Exit Function
  476. NOVALIDPATH:
  477.     sMessageNoDir = ReplaceString(sNoDirCreation, sShowPath, "%1")
  478.     Msgbox(sMessageNoDir, 16, sTitle)
  479.     CheckTextBoxPath() = False
  480. End Function
  481.  
  482.  
  483. Sub InitializeProgressPage(oDialog as Object)
  484.   'oDialog.LabelRetrieval.Label = ""
  485.   'oDialog.LabelCurProgress.Label = ""
  486.   oDialog.LabelRetrieval.FontWeight = com.sun.star.awt.FontWeight.NORMAL
  487.   oDialog.LabelCurProgress.FontWeight = com.sun.star.awt.FontWeight.BOLD
  488. End Sub
  489.  
  490.  
  491. Sub TakoverFolderName(aEvent as Object)
  492. Dim RefControlName as String
  493. Dim oRefControl
  494.     RefControlName = aEvent.Source.Model.Tag
  495.     oRefControl = ImportDialogArea.GetControl(RefControlName)
  496.     GetFolderName(oRefControl.Model)
  497.     ToggleNextButton()
  498. End Sub
  499. </script:module>