Kaydet (Commit) 51d93012 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in SvxXConnectionPreview

Change-Id: Ie634cbf418e49a2272966feafb4bbfa987cad52c
Reviewed-on: https://gerrit.libreoffice.org/55223Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 5848eb90
......@@ -26,6 +26,7 @@
#include <vcl/ctrl.hxx>
#include <vcl/event.hxx>
#include <vcl/outdev.hxx>
#include <memory>
namespace vcl { class Window; }
......@@ -45,7 +46,7 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxXConnectionPreview : public Control
private:
SdrEdgeObj* pEdgeObj;
SdrPage* pSdrPage;
std::unique_ptr<SdrPage> pSdrPage;
const SdrView* pView;
SVX_DLLPRIVATE void SetStyles();
......
......@@ -54,7 +54,7 @@ SvxXConnectionPreview::~SvxXConnectionPreview()
void SvxXConnectionPreview::dispose()
{
delete pSdrPage;
pSdrPage.reset();
Control::dispose();
}
......@@ -161,9 +161,9 @@ void SvxXConnectionPreview::Construct()
// not yet one.
if(!pSdrPage)
{
pSdrPage = new SdrPage(
pSdrPage.reset( new SdrPage(
pView->getSdrModelFromSdrView(),
false);
false) );
}
const SdrEdgeObj* pTmpEdgeObj = static_cast<const SdrEdgeObj*>(pObj);
......
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