To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=79211
                 Issue #|79211
                 Summary|FilePicker doesn't show name if no other file of same 
                        |type exists on the location
               Component|framework
                 Version|OOo 2.2.1
                Platform|All
                     URL|
              OS/Version|Windows XP
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|ui
             Assigned to|tm
             Reported by|cornouws





------- Additional comments from [EMAIL PROTECTED] Wed Jul  4 12:54:41 +0000 
2007 -------
FilePicker doesn't show name if no other file of same type exists on the start
location.

It's already a long time that my attention is cathed by the fact that
File|Export as PDF doesn't show a default name, if it is the first export to a
certain folder.

Now I've experienced the same in basic code.
Little code below.
sFileName  isn't displayed, if there is an folder where for the first time a
document of that type is saved.

Since I guess those two are related, I set the component to framework, not API.
Pls correct if I'm wrong.


' = = = code to reproduce bug
Sub Main
' For testing:
' choose sPath so that no other file of .odt exists in folder

        Dim sName$, sPath$
        sName = ""
        sPath = ""
        PickMyFileName (sName , sPath )
        
End Sub

Function PickMyFileName (sDocPath$, sFileName$) as String
        Dim oFilePickerDlg
        Dim sFilePickerArgs
        Dim sFilesPicked () as String

        oFilePickerDlg = createUnoService( "com.sun.star.ui.dialogs.FilePicker" 
)
        sFilePickerArgs =
Array(com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_AUTOEXTENSION_PASSWORD
 )
        With oFilePickerDlg
                .Initialize ( sFilePickerArgs() )
                If Len(sDocPath) > 0 Then .SetDisplayDirectory 
(ConvertToURL(sDocPath))
                If Len(sFileName) > 0 Then .SetDefaultName (sFileName)
                .AppendFilter( "All files (*.*)", "*.*" )
                .AppendFilter( "OpenDocument Text (.odt)", "*.odt" )
                .SetCurrentFilter( "OpenDocument Text (.odt)" )
        
.SetValue(com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_AUTOEXTENSION,
0, true)   
        
.SetValue(com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_PASSWORD,
0, false)
        End With
        
   If oFilePickerDlg.execute() > 0 Then
      sFilesPicked() = oFilePickerDlg.getFiles()
      PickMyFileName= sFilesPicked(0)
   End If
        
        
End Function

---------------------------------------------------------------------
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]

Reply via email to