Created attachment 195615 [details] Message when trying to delete a record in LO 24.8.0.2 Open any form in a base file. Try to delete a record. There will appear a warning: You intend to delete 1 record. at home/buildslave/source/lib-core/svx/source/form/formcontroller.cxx:3927 If you click Yes you won't be able to undo this operation. Do you want to continue anyway? at home/buildslave/source/lib-core/svx/source/form/formcontroller.cxx:3926 This is the message, which appears in LO 24.8.0.2. When trying the same in LO 7.4.7.2 there will only appear You intend to delete 1 record. If you click Yes you won't be able to undo this operation. Do you want to continue anyway? … and the layout is better there because the first line will be shown as a title.
Created attachment 195616 [details] Message when trying to delete a record in LO 7.4.7.2
Bug doesn't appear in LO 7.6.4.1, appears first here in Version: 24.2.0.3 (X86_64) / LibreOffice Community Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1 CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb) Locale: de-DE (de_DE.UTF-8); UI: en-US Calc: threaded
Created attachment 195618 [details] Open the form of the attached database and try deleting a record…
Reproducible Version: 24.2.0.0.alpha1 (X86_64) / LibreOffice Community Build ID: 06946980c858649160c634007e5fac9a5aa81f38 CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win Locale: es-ES (es_ES); UI: es-ES Calc: CL threaded Latest version that works on the ones I have installed. Version: 7.6.7.2 (X86_64) / LibreOffice Community Build ID: dd47e4b30cb7dab30588d6c79c651f218165e3c5 CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
On pc Debian x86-64 with master sources updated today, I could reproduce this. bt part: #0 svxform::FormController::confirmDelete(com::sun::star::sdb::RowChangeEvent const&) (this=0x56172af2bda0, aEvent=...) at svx/source/form/formcontroller.cxx:3927 #1 0x00007f7b3d0839b7 in FmGridControl::DeleteSelectedRows() (this=0x56172c843190) at svx/source/fmcomp/fmgridcl.cxx:1197 #2 0x00007f7b3d1865b8 in DbGridControl::OnDelete(void*) (this=0x56172c843190) at svx/source/fmcomp/gridctrl.cxx:2644 Regression from 176e8cf09a527438ec9b2b20ba2df23fa45226bc Use exception ctors, instead of setting members later Avoids overwriting source location in message (12/10/2023). Reverting partly the patch with: diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index fa45f354ed12..2e8340dfdd46 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -3923,8 +3923,11 @@ sal_Bool SAL_CALL FormController::confirmDelete(const RowChangeEvent& aEvent) rtl::Reference<OInteractionDisapprove> pDisapprove = new OInteractionDisapprove; // the request - SQLWarning aDetails(SvxResId(RID_STR_DELETECONFIRM), {}, {}, 0, {}); - SQLWarning aWarning(sTitle, {}, {}, 0, css::uno::Any(aDetails)); + SQLWarning aWarning; + aWarning.Message = sTitle; + SQLWarning aDetails; + aDetails.Message = SvxResId(RID_STR_DELETECONFIRM); + aWarning.NextException <<= aDetails; rtl::Reference<OInteractionRequest> pRequest = new OInteractionRequest( Any( aWarning ) ); seems to fix this. Mike: thought you might be interested in this one.
(In reply to Julien Nabet from comment #5) Heh, those useless and irritating messages helped me the last weeks, when I fixed a couple of Base issues... :-) Julien: please go ahead and fix this. My only ask would be: do not revert it as a whole, but instead, in a non-debug build (#ifdef NDEBUG), assign the aWarning.Message and aDetails.Message, to overwrite the debug information. Thank you!
(In reply to Mike Kaganski from comment #6) > (In reply to Julien Nabet from comment #5) > > Heh, those useless and irritating messages helped me the last weeks, when I > fixed a couple of Base issues... :-) > > Julien: please go ahead and fix this. My only ask would be: do not revert it > as a whole, but instead, in a non-debug build (#ifdef NDEBUG), assign the > aWarning.Message and aDetails.Message, to overwrite the debug information. > > Thank you! Hey both, thank you for fixing so much bugs in Base. I saw this meassages, thought it might help a developer, but won't help anybody out there, who will only use Base. Regards Robert
Patch waiting for review here: https://gerrit.libreoffice.org/c/core/+/171337
Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/572011827a59e93448745294f3fe3eea3e028ffc tdf#162279: Base Forms: details of the warning only on debug mode It will be available in 25.2.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.
Cherry-pick for 24.8 waiting for review here: https://gerrit.libreoffice.org/c/core/+/171353
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/99a9c188cc8a95b72e7e8f59e1e48464767ca651 tdf#162279: Base Forms: details of the warning only on debug mode It will be available in 24.8.1. 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.
Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/068fef40d39b24a7f7ef1142e45cb3e7dcc9fb08 Related tdf#162279: rather use OSL_DEBUG_LEVEL instead of NDEBUG It will be available in 25.8.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.