To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=96720 Issue #|96720 Summary|FilePicker: setDefaultName, setDefaultDirectory broken Component|scripting Version|OOO300m9 Platform|PC URL| OS/Version|Linux Status|NEW Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|code Assigned to|kr Reported by|probe1
------- Additional comments from [EMAIL PROTECTED] Sun Nov 30 08:57:23 +0000 2008 ------- Wrote a macro using FilePicker (re-using StoreDocument function from Tools library), where the statements .setDefaultName and .setDefaultDirectory don't work. This macro should work as a work-around for issue 22561, for Writer documents only. Tested with OOO300m9 (OOo 3.0.0) on Linux (used vanilla RPMs). Traced with xray in a local SUB (instead using the function), that both values are passed correctly, but they don't show/take effect on .execute the dialogue. Relevant part of macro is this: ' --------------------------------- Sub test_FileSave ' load helper function library If NOT GlobalScope.BasicLibraries.isLibraryLoaded( "Tools" ) Then GlobalScope.BasicLibraries.loadLibrary( "Tools" ) End If ' create a list of available FilterNames addWriterFilterNames() ' use procedure from TOOLS library StoreDocument( ThisComponent, aFilterNames, "FilenameProposal", "/home" ) End If ' --------------------------------- ' add FilterNames Sub addWriterFilterNames oMasterKey = GetRegistryKeyContent("org.openoffice.TypeDetection.Types") oTypes() = oMasterKey.Types oUIKey = GetRegistryKeyContent("org.openoffice.Office.UI/FilterClassification/LocalFilters") aFilterNames(0,0) = oTypes.GetByName("writer8").UIName & " (*.odt)" aFilterNames(0,1) = "*.odt" aFilterNames(0,2) = oTypes.GetByName("writer8").Name aFilterNames(1,0) = oTypes.GetByName("writer8_template").UIName & " (*.ott)" aFilterNames(1,1) = "*.ott" aFilterNames(1,2) = oTypes.GetByName("writer8_template").Name End Sub ' --------------------------------- --------------------------------------------------------------------- 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]