[Libreoffice-commits] core.git: cui/source

Noel Grandin noel.grandin at collabora.co.uk
Wed Jun 20 09:06:15 UTC 2018


 cui/source/inc/align.hxx      |    2 +-
 cui/source/tabpages/align.cxx |    5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit d79b0d8648067055616de6f8913e5dbbac5311f4
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Jun 11 15:19:09 2018 +0200

    loplugin:useuniqueptr in AlignmentTabPage
    
    Change-Id: I78dc902ae41eb8d8423c83a4ec32a4ca932bbc5e
    Reviewed-on: https://gerrit.libreoffice.org/56103
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

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();


More information about the Libreoffice-commits mailing list