sc/source/ui/view/cellsh2.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
New commits: commit 7e9ef9557da52b219e2c7ce500345510f9cbbc9c Author: Pranam Lashkari <[email protected]> AuthorDate: Wed Sep 17 21:26:17 2025 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Tue Sep 30 11:20:57 2025 +0200 tdf#156263: fixes freeze after opening data validity dialog after making dialog async ScValidationRegisteredDlg was destroyed while dialog is still running causing undefined behaviour regression caused by 63b26e8e20f6a4eeb3117925b7a727f565e3a2dc Change-Id: Idef30f12b88c46cb30a01ffb12588bb11e279750 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191105 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191116 Tested-by: Jenkins (cherry picked from commit ef7151c271d14f623759f87d30e452f2e6d66664) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191652 Reviewed-by: Pranam Lashkari <[email protected]> diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index 5e79e0820c36..af45261e6070 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -928,7 +928,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) vcl::Window* pWin = GetViewData().GetActiveWin(); weld::Window* pParentWin = pWin ? pWin->GetFrameWeld() : nullptr; auto xDlg = std::make_shared<ScValidationDlg>(pParentWin, &aArgSet, pTabViewShell); - ScValidationRegisteredDlg aRegisterThatDlgExists(pParentWin, xDlg); + std::shared_ptr<ScValidationRegisteredDlg> pRegisterThatDlgExists + = std::make_shared<ScValidationRegisteredDlg>(pParentWin, xDlg); struct lcl_auxData { @@ -947,11 +948,13 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) OUString aErrTitle; OUString aErrText; bool bCaseSensitive; + std::shared_ptr<ScValidationRegisteredDlg> aRegisterThatDlgExists; }; - std::shared_ptr<lcl_auxData> xAuxData = std::make_shared<lcl_auxData>(lcl_auxData{ - aCursorPos, eMode, eOper, aExpr1, aExpr2, bBlank, nListType, bShowHelp, - aHelpTitle, aHelpText, bShowError, eErrStyle, aErrTitle, aErrText, bCaseSensitive}); + std::shared_ptr<lcl_auxData> xAuxData = std::make_shared<lcl_auxData>( + lcl_auxData{ aCursorPos, eMode, eOper, aExpr1, aExpr2, bBlank, nListType, + bShowHelp, aHelpTitle, aHelpText, bShowError, eErrStyle, + aErrTitle, aErrText, bCaseSensitive, pRegisterThatDlgExists }); auto xRequest = std::make_shared<SfxRequest>(rReq); rReq.Ignore(); // the 'old' request is not relevant any more
