diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-05-04 11:21:15 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-05-04 14:48:38 +0200 |
commit | 0fe7bda233da3c1f95a82c0050c8f917dc39c22e (patch) | |
tree | dbead2885836e74023813cd2b99760155f5e403d /basctl | |
parent | b72a31b37f9bdcfd3f59b3256b465bf0fb5a50ca (diff) |
tdf#116879 Separate SdrObjList::Clear() as needed
SdrObjList::Clear() does broadcast the SdrObject
removals and deletions and a SetChanged() to SdrModel.
The old version avoided this in the destructor (with
a comment to not call virtual methods in destructor,
but the problem is more that the ::Notify triggered
works on the SdrPage already in destruction). To allow
calls to Clear() without broadcasting I splitted this
to a impClearSdrObjList(bool bBrodacast) and rename
of ::Clear to ::ClearSdrObjList to get all places.
Adapted all places in the code as needed, already pre-
checked on Linux that this fixes the problem.
Change-Id: Iea46758fb6b57f2b3d9896959a35260c6f6d52d5
Reviewed-on: https://gerrit.libreoffice.org/53839
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/dlged/dlged.cxx | 5 | ||||
-rw-r--r-- | basctl/source/dlged/dlgedpage.cxx | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index 186e83521b05..f3755414bfb3 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -414,7 +414,10 @@ void DlgEditor::ResetDialog () SdrPageView* pPgView = pDlgEdView->GetSdrPageView(); bool bWasMarked = pDlgEdView->IsObjMarked( pOldDlgEdForm ); pDlgEdView->UnmarkAll(); - pPage->Clear(); + + // clear SdrObjects with broadcasting + pPage->ClearSdrObjList(); + pPage->SetDlgEdForm( nullptr ); SetDialog( m_xUnoControlDialogModel ); if( bWasMarked ) diff --git a/basctl/source/dlged/dlgedpage.cxx b/basctl/source/dlged/dlgedpage.cxx index da9ba12ef1b0..73241128d447 100644 --- a/basctl/source/dlged/dlgedpage.cxx +++ b/basctl/source/dlged/dlgedpage.cxx @@ -34,7 +34,8 @@ DlgEdPage::DlgEdPage(DlgEdModel& rModel, bool bMasterPage) DlgEdPage::~DlgEdPage() { - Clear(); + // clear SdrObjects with broadcasting + ClearSdrObjList(); } SdrPage* DlgEdPage::Clone(SdrModel* const pNewModel) const |