Run the following Basic routine: Sub Test(Optional x) MsgBox x End Sub It shows "Error 448" *successful message*; while the correct behavior would be "Argument is not optional" *runtime error*. This is similar to bug 144353.
repro Version: 7.4.0.0.alpha0+ / LibreOffice Community Build ID: c97a3592c78ce276a353f95ce68c70a8a39174a0 CPU threads: 4; OS: Linux 5.13; UI render: default; VCL: gtk3 Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US Calc: threaded Jumbo
Should we fix this directly in the corresponding function (SbRtl_MsgBox) while the different parameters will be retrieved or could we set it somewhere in the retrieval process? I doubt that MsgBox is the only function which should throw an error with a missing optional paramter.
(In reply to Andreas Heinisch from comment #2) I suppose that we could break when a missing optional is passed as an argument which is not marked optional?
(In reply to Mike Kaganski from comment #3) Oh, ignore me. It is not the case when we pass an argument to another user-defined function. I am not sure is we can find some generic place to handle missing optionals in run-time library functions. Do you have a proposal in mind?
Atm, I don't know such a generic place. So we should tackle one function at a time.
Andreas Heinisch committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/522f5ad4d8c92624fffa869143aa869662a48589 tdf#147529 - BASIC MsgBox: Check for missing optional parameters It will be available in 7.5.0. 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.
Andreas Heinisch committed a patch related to this issue. It has been pushed to "libreoffice-7-4": https://git.libreoffice.org/core/commit/c44e819489985cbd924e58ccfc82a654c29ea6f5 tdf#147529 - BASIC MsgBox: Check for missing optional parameters It will be available in 7.4.0.0.beta2. 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.