From 565d8433aff68c5912c63947419ef54053ebdc29 Mon Sep 17 00:00:00 2001 From: Behrend Cornelius Date: Thu, 30 Aug 2001 12:15:37 +0000 Subject: [PATCH] #91711# Filedialog and folderDialog Routines modified --- wizards/source/tools/ModuleControls.xba | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/wizards/source/tools/ModuleControls.xba b/wizards/source/tools/ModuleControls.xba index 99b972934a13..defcf3ed9612 100644 --- a/wizards/source/tools/ModuleControls.xba +++ b/wizards/source/tools/ModuleControls.xba @@ -164,8 +164,10 @@ Dim sPath as String Dim InitPath as String Dim RefControlName as String Dim oUcb as object - oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") + 'Note: The following services have to be called in the following order + ' because otherwise Basic does not remove the FolderDialog Service oFolderDialog = CreateUnoService("com.sun.star.ui.dialogs.FolderPicker") + oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") InitPath = ConvertToUrl(oRefModel.Text) If InitPath = "" Then InitPath = GetPathSettings("Work") @@ -191,8 +193,10 @@ Dim InitPath as String Dim RefControlName as String Dim oUcb as object 'Dim ListAny(0) - oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") + 'Note: The following services have to be called in the following order + ' because otherwise Basic does not remove the FileDialog Service oFileDialog = CreateUnoService("com.sun.star.ui.dialogs.FilePicker") + oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") 'ListAny(0) = com.sun.star.ui.dialogs.TemplateDescription.FILEOPEN_SIMPLE 'oFileDialog.initialize(ListAny()) AddFiltersToDialog(FilterNames(), oFileDialog) @@ -249,7 +253,7 @@ Dim FilterIndex as Integer End Function -Sub AddFiltersToDialog(FilterNames() as String, oDialog as Object) +Sub AddFiltersToDialog(FilterNames() as String, oDialog as Object) Dim i as Integer Dim MaxIndex as Integer MaxIndex = Ubound(FilterNames(), 1) @@ -260,4 +264,4 @@ Dim MaxIndex as Integer End Sub - \ No newline at end of file +