Created attachment 179021 [details] sample document with a macro from Ilmari's email to dev mailing list [1]: > The dev guide references some known issues (without bug numbers). I > appreciate any help in figuring out if they are still relevant. > > https://wiki.documentfoundation.org/Documentation/DevGuide/LibreOffice_Basic#Date_Field > Dropdown is currently not working by program, but you can set it with > the Control Properties in the IDE. This still seems to be the case. Steps to reproduce: 1) open attached document "UnoControlDateField.odt" 2) run the macro Actual behavior: The left-hand date control has a dropdown menu to select the date, but the right-hand one doesn't. For the left-hand one, the "Dropdown" property has been enabled in the dialog editor ("Tools" -> "Macros" -> "Organize Dialogs"). For the right-hand one, it was attempted in the macro, relevant part: REM This is false, as expected, since "Dropdown" not enabled in IDE test2 = oDateFieldControlModel2.DropDown REM This doesn't work, still doesn't show a dropdown oDateFieldControlModel2.DropDown = true REM This is still false test2 = oDateFieldControlModel2.DropDown Version: 7.4.0.0.alpha0+ / LibreOffice Community Build ID: a3a233657435e26dd9ff19d2d5087729e64cdb03 CPU threads: 12; OS: Linux 5.16; UI render: default; VCL: kf5 (cairo+xcb) Locale: en-GB (en_GB.UTF-8); UI: en-US Calc: threaded [1] https://lists.freedesktop.org/archives/libreoffice/2022-March/088627.html
Created attachment 179022 [details] Screenshot showing the dialog and relevant variables in the IDE
This here (see comment, and arrow indicating the line for DROPDOWN) in `UnoControl::ImplModelPropertiesChanged` *might* be relevant: sal_uInt16 nPType = GetPropertyId( rEvent.PropertyName ); if ( mbDesignMode && mbDisposePeer && !mbRefreshingPeer && !mbCreatingPeer ) { // if we're in design mode, then some properties can change which // require creating a *new* peer (since these properties cannot // be switched at existing peers) if ( nPType ) bNeedNewPeer = ( nPType == BASEPROPERTY_BORDER ) || ( nPType == BASEPROPERTY_MULTILINE ) -> || ( nPType == BASEPROPERTY_DROPDOWN ) || ( nPType == BASEPROPERTY_HSCROLL ) || ( nPType == BASEPROPERTY_VSCROLL ) || ( nPType == BASEPROPERTY_AUTOHSCROLL ) || ( nPType == BASEPROPERTY_AUTOVSCROLL ) || ( nPType == BASEPROPERTY_ORIENTATION ) || ( nPType == BASEPROPERTY_SPIN ) || ( nPType == BASEPROPERTY_ALIGN ) || ( nPType == BASEPROPERTY_PAINTTRANSPARENT );
Reproduced in Version: 7.4.0.0.alpha0+ / LibreOffice Community Build ID: f461c889ac4bc053c306537f644ec4bf3e0d5128 CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3 Locale: es-ES (es_ES.UTF-8); UI: en-US Calc: threaded and according to https://wiki.documentfoundation.org/Documentation/DevGuide/LibreOffice_Basic#Date_Field this might be the case since OOo times