[Libreoffice-bugs] [Bug 109093] Macro using com.sun.star.ui.dialogs.FilePicker (save as) stops working and presents "open" window

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Aug 20 19:16:03 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=109093

Regina Henschel <rb.henschel at t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rb.henschel at t-online.de

--- Comment #4 from Regina Henschel <rb.henschel at t-online.de> ---
You need to initialize first, before calling setMultiSelectionMode.
Initialize with  com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_SIMPLE

Together this is:

Sub DDICSVsave
dim aUrl(), s$
dim oDlg as variant
dim fileProps(1) as new com.sun.star.beans.PropertyValue
fileProps(0).Name = "FilterName"
fileProps(0).Value = "Text - txt - csv (StarCalc)"
fileProps(1).Name = "FilterOptions"
fileProps(1).Value = "44,34,76,1,,0,false,true,true,false"
oDlg = createUnoService("com.sun.star.ui.dialogs.FilePicker")
dim listAny(0) as variant
listAny(0) = com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_SIMPLE
oDlg.initialize(listAny()) ' Speichern unter
oDlg.setMultiSelectionMode(false)
oDlg.execute
aUrl = oDlg.getFiles()
thisComponent.storeAsURL(aURL(0), fileProps())
End Sub

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170820/d671db53/attachment.html>


More information about the Libreoffice-bugs mailing list