To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=56809
Issue #:|56809
Summary:|FolderPicker does not use default directory
Component:|api
Version:|OOo 2.0
Platform:|All
URL:|
OS/Version:|Windows, all
Status:|NEW
Status whiteboard:|
Keywords:|
Resolution:|
Issue type:|DEFECT
Priority:|P3
Subcomponent:|code
Assigned to:|sw
Reported by:|pitonyak
------- Additional comments from [EMAIL PROTECTED] Thu Oct 27 11:05:35 -0700
2005 -------
I duplicated this problem using Windows XP Professional, but I exepect the
problem on any windows computer.
When you use the FolderPicker service, the service that is used depends on your
settings. If your settings are set to use the system dialogs. Use:
Tools | Options |OpenOffice.org | Gernal | Use OpenOffice.org Dialogs
This option should NOT be checked to see the problem. Now, run the following
macro:
Function ChooseADirectoryURL(Optional sInPath$) As String
Dim oDialog As Object
Dim oSFA As Object
Dim s As String
oDialog = CreateUnoService("com.sun.star.ui.dialogs.FolderPicker")
'oDialog = CreateUnoService("com.sun.star.ui.dialogs.OfficeFolderPicker")
oSFA = createUnoService("com.sun.star.ucb.SimpleFileAccess")
If IsMissing(sInPath) Then
Print "Using " & GetWorkDir()
oDialog.setDisplayDirectory(GetWorkDir())
'oDialog.setDisplayDirectory("file:///C:/Andy")
ElseIf oSFA.Exists(sInPath) Then
oDialog.setDisplayDirectory(sInPath)
Else
s = "Directory '" & sInPath & "' Does not exist"
If MsgBox(s, 33, "Error") = 2 Then Exit Function
End If
Print "Set the value: " & oDialog.getDisplayDirectory()
Inspect(oDialog)
If oDialog.Execute() = 1 Then
ChooseADirectoryURL() = oDialog.getDirectory()
End If
End Function
Function GetWorkDir() As String
Dim oPathSettings
oPathSettings = CreateUnoService("com.sun.star.util.PathSettings")
GetWorkDir() = oPathSettings.Work
End Function
You do indeed set the default directory, but you do NOT use it. If, however, you
use the OfficeFolderPicker service directly (or if you are set to use this
service by default as already mentioned) then the default directory is set.
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]