diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-03-05 10:47:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-07 13:24:51 +0100 |
commit | 1d2773807f6d2deb1181ef4b14fbdd49ca1d5c14 (patch) | |
tree | 788ef3ef220549c9785bcf1f5b35becc176300d4 /chart2/source/controller/drawinglayer | |
parent | e4e80ed313882f9ea1b309054e5aa3e839586516 (diff) |
ref-count SdrPage
which simplifies ownership handling, particularly with regard to
undo/redo
Change-Id: Ie8f300ebfdae6db3c06f78a87e35a07497d6b825
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111991
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller/drawinglayer')
-rw-r--r-- | chart2/source/controller/drawinglayer/ViewElementListProvider.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx index 9259ce921819..f4f5ecfbd9d6 100644 --- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx +++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx @@ -152,12 +152,12 @@ Graphic ViewElementListProvider::GetSymbolGraphic( sal_Int32 nStandardSymbol, co new SdrModel()); pModel->GetItemPool().FreezeIdRanges(); - SdrPage* pPage = new SdrPage( *pModel, false ); + rtl::Reference<SdrPage> pPage = new SdrPage( *pModel, false ); pPage->SetSize(Size(1000,1000)); - pModel->InsertPage( pPage, 0 ); + pModel->InsertPage( pPage.get(), 0 ); std::unique_ptr<SdrView> pView(new SdrView(*pModel, pVDev)); pView->hideMarkHandles(); - SdrPageView* pPageView = pView->ShowSdrPage(pPage); + SdrPageView* pPageView = pView->ShowSdrPage(pPage.get()); // directly clone to target SdrModel pObj = pObj->CloneSdrObject(*pModel); |