diff options
Diffstat (limited to 'wizards/source/gimmicks/ReadDir.xba')
-rw-r--r-- | wizards/source/gimmicks/ReadDir.xba | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/wizards/source/gimmicks/ReadDir.xba b/wizards/source/gimmicks/ReadDir.xba index c7dd1f7f44a2..370f8cbc1915 100644 --- a/wizards/source/gimmicks/ReadDir.xba +++ b/wizards/source/gimmicks/ReadDir.xba @@ -39,20 +39,22 @@ Dim oPage As Object Sub Main() Dim oStandardTemplate as Object BasicLibraries.LoadLibrary("Tools") - oDocument = StarDesktop.LoadComponentFromURL("private:factory/sdraw","_blank",0, NoArgs()) - oPage = oDocument.DrawPages(0) - oStandardTemplate = oDocument.StyleFamilies.GetByName("graphics").GetByName("standard") - oStandardTemplate.CharHeight = 10 - oStandardTemplate.TextLeftDistance = 100 - oStandardTemplate.TextRightDistance = 100 - oStandardTemplate.TextUpperDistance = 50 - oStandardTemplate.TextLowerDistance = 50 - DlgReadDir = LoadDialog("Gimmicks","ReadFolderDlg") - oProgressBar = DlgReadDir.Model.ProgressBar1 - DlgReadDir.Model.TextField1.Text = ConvertFromUrl(GetPathSettings("Work")) - DlgReadDir.Model.cmdGoOn.DefaultButton = True - DlgReadDir.GetControl("TextField1").SetFocus() - DlgReadDir.Execute + oDocument = CreateNewDocument("sdraw") + If Not IsNull(oDocument) Then + oPage = oDocument.DrawPages(0) + oStandardTemplate = oDocument.StyleFamilies.GetByName("graphics").GetByName("standard") + oStandardTemplate.CharHeight = 10 + oStandardTemplate.TextLeftDistance = 100 + oStandardTemplate.TextRightDistance = 100 + oStandardTemplate.TextUpperDistance = 50 + oStandardTemplate.TextLowerDistance = 50 + DlgReadDir = LoadDialog("Gimmicks","ReadFolderDlg") + oProgressBar = DlgReadDir.Model.ProgressBar1 + DlgReadDir.Model.TextField1.Text = ConvertFromUrl(GetPathSettings("Work")) + DlgReadDir.Model.cmdGoOn.DefaultButton = True + DlgReadDir.GetControl("TextField1").SetFocus() + DlgReadDir.Execute + End If End Sub |