From d79b0d8648067055616de6f8913e5dbbac5311f4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 11 Jun 2018 15:19:09 +0200 Subject: loplugin:useuniqueptr in AlignmentTabPage Change-Id: I78dc902ae41eb8d8423c83a4ec32a4ca932bbc5e Reviewed-on: https://gerrit.libreoffice.org/56103 Tested-by: Jenkins Reviewed-by: Noel Grandin --- cui/source/inc/align.hxx | 2 +- cui/source/tabpages/align.cxx | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'cui/source') diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx index 6edfd8b8ba44..df2094afe684 100644 --- a/cui/source/inc/align.hxx +++ b/cui/source/inc/align.hxx @@ -93,7 +93,7 @@ private: VclPtr m_pVsRefEdge; VclPtr m_pCbStacked; VclPtr m_pCbAsianMode; - OrientationHelper* m_pOrientHlp; + std::unique_ptr m_pOrientHlp; VclPtr m_pBoxDirection; VclPtr m_pBtnWrap; diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index 6157e030f0c5..ed35fa53ea6b 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -175,7 +175,7 @@ AlignmentTabPage::AlignmentTabPage( vcl::Window* pParent, const SfxItemSet& rCor get(m_pCbStacked,"checkVertStack"); get(m_pCbAsianMode,"checkAsianMode"); - m_pOrientHlp = new OrientationHelper(*m_pCtrlDial, *m_pNfRotate, *m_pCbStacked); + m_pOrientHlp.reset( new OrientationHelper(*m_pCtrlDial, *m_pNfRotate, *m_pCbStacked) ); // Properties get(m_pBtnWrap,"checkWrapTextAuto"); @@ -246,8 +246,7 @@ AlignmentTabPage::~AlignmentTabPage() void AlignmentTabPage::dispose() { - delete m_pOrientHlp; - m_pOrientHlp = nullptr; + m_pOrientHlp.reset(); m_pLbHorAlign.clear(); m_pFtIndent.clear(); m_pEdIndent.clear(); -- cgit