1. Menu / Option / LibreOffice / General, uncheck "Use LibreOffice dialogs". 2. Run the next macro: Sub TestGetFileOpen() Dim oFilePicker oFilePicker = createUnoService("com.sun.star.ui.dialogs.FilePicker") oFilePicker.initialize(Array(com.sun.star.ui.dialogs.TemplateDescription.FILEOPEN_SIMPLE)) With oFilePicker .setLabel com.sun.star.ui.dialogs.CommonFilePickerElementIds.PUSHBUTTON_OK, "Select" If .execute() = 1 Then Msgbox "Selected file: " & ConvertFromUrl(oFilePicker.getSelectedFiles()(0)) End If End With End Sub Result: the name of the "Open" button has not changed, but should have changed. Version: 7.4.2.3 (x64) / LibreOffice Community Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf CPU threads: 6; OS: Windows 10.0 Build 19044; UI render: default; VCL: win Locale: ru-RU (ru_RU); UI: en-US Calc: CL
I can't reproduce it in Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: b052ec2f2fbe0f3044ba824c064a280a5ee9cd7f CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3 Locale: de-DE (es_ES.UTF-8); UI: en-US Calc: threaded
Repro using Version: 7.5.0.3 (X86_64) / LibreOffice Community Build ID: c21113d003cd3efa8c53188764377a8272d9d6de CPU threads: 12; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win Locale: ru-RU (ru_RU); UI: en-US Calc: CL threaded and also on gtk3 (the button label is "Open", not the requested "Select"). Code pointer specific for Windows: In VistaFilePickerImpl::impl_sta_SetControlLabel, the constant css::ui::dialogs::CommonFilePickerElementIds::PUSHBUTTON_OK should be handled explicitly, and instead of IFileDialogCustomize::SetControlLabel, another function should be called: IFileDialog::SetOkButtonLabel. A similar handling is possible for filename box label: IFileDialog::SetFileNameLabel. Other integrations (like gtk3) need their own fixes (if possible).
Created attachment 185083 [details] the gtk case should be working in 7.5, seems to work in trunk for me at least The gtk case should be working in the 7-5 series since https://git.libreoffice.org/core/+/1da3406a8e97934615b5b644cbb81bf3108143ec%5E%21 of https://bugs.documentfoundation.org/show_bug.cgi?id=150706#c7
(In reply to Caolán McNamara from comment #3) Thanks - I must had been tested with an older version (even though I thought I checked that, but likely I confused myself). Yes, I see this in current master. Let's mark it Windows-only; any other VCL plugin, if it happens to not implement this, would need to have a separate bug, preferably with this in See Also.
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-7-4": https://git.libreoffice.org/core/commit/4f6cabae397424caa1edf7cc084f5f458b9e5cb7 Related: tdf#150706 & tdf#153330 add OK and CANCEL to known controls It will be available in 7.4.6. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Thanks a lot for the fix!