#91711# Filedialog and folderDialog Routines modified
This commit is contained in:
parent
6eccbb9a0c
commit
565d8433af
1 changed files with 8 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
||||
</script:module>
|
||||
</script:module>
|
||||
|
|
Loading…
Reference in a new issue