From e83b5f6a015269ed7e5407a8440c0fc99fcfa397 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 1 Jun 2021 13:26:04 +0200 Subject: no need to allocate these on the heap Change-Id: Ic4b16e776a731e5e9bea61e99acb7257c5220322 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116585 Tested-by: Jenkins Reviewed-by: Noel Grandin --- filter/source/msfilter/escherex.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'filter/source/msfilter/escherex.cxx') diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 06ac5c24f841..81a792a00baf 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1345,8 +1345,8 @@ bool EscherPropertyContainer::CreateOLEGraphicProperties(const uno::Reference xGraphicObject(new GraphicObject(aGraphic)); - bRetValue = CreateGraphicProperties(rXShape, *xGraphicObject); + GraphicObject aGraphicObject(aGraphic); + bRetValue = CreateGraphicProperties(rXShape, aGraphicObject); } } } @@ -1391,8 +1391,8 @@ bool EscherPropertyContainer::CreateMediaGraphicProperties(const uno::Reference< SdrObject* pSdrObject(GetSdrObjectFromXShape(rXShape)); // SJ: leaving unoapi, because currently there is if (auto pSdrMediaObj = dynamic_cast(pSdrObject)) // no access to the native graphic object { - std::unique_ptr xGraphicObject(new GraphicObject(pSdrMediaObj->getSnapshot())); - bRetValue = CreateGraphicProperties(rXShape, *xGraphicObject); + GraphicObject aGraphicObject(pSdrMediaObj->getSnapshot()); + bRetValue = CreateGraphicProperties(rXShape, aGraphicObject); } } return bRetValue; -- cgit