Kaydet (Commit) 92b849b9 authored tarafından Armin Le Grand's avatar Armin Le Grand

tdf#120674 set DlgEdForm early in DlgEdObj::EndCreate

Change-Id: I5ba0504265f5692614a8db0117883528bd4bfc0b
Reviewed-on: https://gerrit.libreoffice.org/62000
Tested-by: Jenkins
Reviewed-by: 's avatarArmin Le Grand <Armin.Le.Grand@cib.de>
üst 0b92d04a
......@@ -948,6 +948,22 @@ bool DlgEdObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
bool bResult = SdrUnoObj::EndCreate(rStat, eCmd);
// tdf#120674 after interactive creation, the SdrObject (this) has no SdrPage yet
// due to not being inserted. Usually this should be handled in a ::handlePageChange
// implementation. For historical reasons, the SdrPage (which is the DlgEdPage) was
// already set. For now, get it from the SdrDragStat and use it to access and set
// the local pDlgEdForm
if(nullptr == pDlgEdForm && nullptr != rStat.GetPageView())
const DlgEdPage* pDlgEdPage(dynamic_cast<const DlgEdPage*>(rStat.GetPageView()->GetPage()));
if(nullptr != pDlgEdPage)
// set parent form
pDlgEdForm = pDlgEdPage->GetDlgEdForm();
......@@ -956,9 +972,6 @@ bool DlgEdObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
void DlgEdObj::SetDefaults()
// set parent form
pDlgEdForm = static_cast<DlgEdPage*>(getSdrPageFromSdrObject())->GetDlgEdForm();
if ( pDlgEdForm )
// add child to parent form
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment