summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-06-11 15:19:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-20 11:05:51 +0200
commitd79b0d8648067055616de6f8913e5dbbac5311f4 (patch)
tree0851b6794bf7affa9084001d7baaf441b04c624a /cui/source
parent8cc60b05c688e0edc03a63da0afd85f1e853bbc3 (diff)
loplugin:useuniqueptr in AlignmentTabPage
Change-Id: I78dc902ae41eb8d8423c83a4ec32a4ca932bbc5e Reviewed-on: https://gerrit.libreoffice.org/56103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/inc/align.hxx2
-rw-r--r--cui/source/tabpages/align.cxx5
2 files changed, 3 insertions, 4 deletions
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<ValueSet> m_pVsRefEdge;
VclPtr<TriStateBox> m_pCbStacked;
VclPtr<TriStateBox> m_pCbAsianMode;
- OrientationHelper* m_pOrientHlp;
+ std::unique_ptr<OrientationHelper> m_pOrientHlp;
VclPtr<VclHBox> m_pBoxDirection;
VclPtr<TriStateBox> 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();