basctl/source/dlged/dlged.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 3fd80b31eb997847e04571b21ec512928a70bf81
Author: Rafael Lima <[email protected]>
AuthorDate: Wed Jan 17 20:33:43 2024 +0100
Commit: Xisco Fauli <[email protected]>
CommitDate: Mon Jan 22 22:18:48 2024 +0100
tdf#159247 Fix crash while adding control with default properties (Dialog
Editor)
Controls created using the Ctrl+toolbar (which adds a control with default
properties) did not have a parent form, which causes the crash.
Change-Id: Ic2f469e6656a93bbed25d86092384f81b21aaca5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162217
Tested-by: Jenkins
Reviewed-by: Patrick Luby <[email protected]>
Reviewed-by: Rafael Lima <[email protected]>
(cherry picked from commit c4e5b1b934fc3c59fb35ae6c02a0ddf8501a6d28)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162278
Reviewed-by: Xisco Fauli <[email protected]>
(cherry picked from commit 41146e08e1dda001a7c490f6a28aad09174b4d65)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162282
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 1917e3ff4a56..26db2effb039 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -623,6 +623,8 @@ void DlgEditor::CreateDefaultObject()
// set default property values
pDlgEdObj->SetDefaults();
+ // set the form to which the new object belongs
+ pDlgEdObj->SetDlgEdForm(pDlgEdForm.get());
// insert object into drawing page
SdrPageView* pPageView = pDlgEdView->GetSdrPageView();