diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-04 16:30:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-11 08:27:26 +0200 |
commit | ed63df584e81892f20b6c15ebf9d41ffd16f4b46 (patch) | |
tree | 56988ae3a4068c1f82e4f1dbe12b0423cbcb6508 /chart2/source | |
parent | b3380825a51682d67a3c8b706d1d73e9bd5585cf (diff) |
loplugin:useuniqueptr in SchAlignmentTabPage
Change-Id: Ib457e6894d233fa4737bb4a6488b37c5455ee098
Reviewed-on: https://gerrit.libreoffice.org/55529
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source')
-rw-r--r-- | chart2/source/controller/dialogs/tp_TitleRotation.cxx | 5 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/tp_TitleRotation.hxx | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx index d4521676529b..f2d60eac5f60 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx @@ -41,7 +41,7 @@ SchAlignmentTabPage::SchAlignmentTabPage(vcl::Window* pWindow, get(m_pLbTextDirection,"textdirLB"); get(m_pFtABCD,"labelABCD"); m_pCtrlDial->SetText(m_pFtABCD->GetText()); - m_pOrientHlp = new svx::OrientationHelper(*m_pCtrlDial, *m_pNfRotate, *m_pCbStacked); + m_pOrientHlp.reset( new svx::OrientationHelper(*m_pCtrlDial, *m_pNfRotate, *m_pCbStacked) ); m_pCbStacked->EnableTriState( false ); m_pOrientHlp->Enable(); @@ -60,8 +60,7 @@ SchAlignmentTabPage::~SchAlignmentTabPage() void SchAlignmentTabPage::dispose() { - delete m_pOrientHlp; - m_pOrientHlp = nullptr; + m_pOrientHlp.reset(); m_pCtrlDial.clear(); m_pFtRotate.clear(); m_pNfRotate.clear(); diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.hxx b/chart2/source/controller/dialogs/tp_TitleRotation.hxx index aa49e4ff5407..8af1a4f67b9a 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.hxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.hxx @@ -35,7 +35,7 @@ private: VclPtr<FixedText> m_pFtRotate; VclPtr<NumericField> m_pNfRotate; VclPtr<TriStateBox> m_pCbStacked; - svx::OrientationHelper* m_pOrientHlp; + std::unique_ptr<svx::OrientationHelper> m_pOrientHlp; VclPtr<FixedText> m_pFtTextDirection; VclPtr<TextDirectionListBox> m_pLbTextDirection; VclPtr<FixedText> m_pFtABCD; |