Created attachment 134608 [details] Screenshot. "Öffnen" is german and translates to "open" The macro below saves a table as csv (with defined settings). It worked in 5.2.6.2 but in 5.2.7.2 it opens an "open"-Window (instead of save as) and does not save the file. Sub DDICSVsave dim aUrl(), s$ Dim Arg() 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") oDlg.setMultiSelectionMode(false) oDlg.initialize(array(1)) ' Speichern unter oDlg.execute aUrl = oDlg.getFiles() thisComponent.storeAsURL(aURL(0), fileProps()) End Sub
I can't reproduce it in Version: 5.3.4.2 Build ID: 1:5.3.4-0ubuntu0.16.10.1~lo0.1 CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; Layout Engine: new; Locale: ca-ES (ca_ES.UTF-8); Calc: group Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ? I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
This Version is also affected. Version: 5.3.4.2 Build-ID: f82d347ccc0be322489bf7da61d7e4ad13fe2ff3 CPU-Threads: 4; BS-Version: Windows 6.1; UI-Render: Standard; Layout-Engine: neu; Gebietsschema: de-DE (de_DE); Calc: group
I repro on Win, but not on Linux. I tried to bibisect, but the 5.4 repository kept crashing, oldest or latest commits. 5.3 repository did not crash and did not show the problem. Win 10 Version: 6.0.0.0.alpha0+ (x64) Build ID: b9f85538e65882238de80ab36c864bc0082ad7f4 CPU threads: 4; OS: Windows 6.19; UI render: default; TinderBox: Win-x86_64@42, Branch:master, Time: 2017-08-20_01:44:43 Locale: fi-FI (fi_FI); Calc: group
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
Thanks, Regina. Closing.
I tried the suggested solution. It works with 5.4.0.3. Great! Thanks a lot, Regina!