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

loplugin:useuniqueptr in SchAlignmentTabPage

Change-Id: Ib457e6894d233fa4737bb4a6488b37c5455ee098
Reviewed-on: https://gerrit.libreoffice.org/55529Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst b3380825
...@@ -41,7 +41,7 @@ SchAlignmentTabPage::SchAlignmentTabPage(vcl::Window* pWindow, ...@@ -41,7 +41,7 @@ SchAlignmentTabPage::SchAlignmentTabPage(vcl::Window* pWindow,
get(m_pLbTextDirection,"textdirLB"); get(m_pLbTextDirection,"textdirLB");
get(m_pFtABCD,"labelABCD"); get(m_pFtABCD,"labelABCD");
m_pCtrlDial->SetText(m_pFtABCD->GetText()); 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_pCbStacked->EnableTriState( false );
m_pOrientHlp->Enable(); m_pOrientHlp->Enable();
...@@ -60,8 +60,7 @@ SchAlignmentTabPage::~SchAlignmentTabPage() ...@@ -60,8 +60,7 @@ SchAlignmentTabPage::~SchAlignmentTabPage()
void SchAlignmentTabPage::dispose() void SchAlignmentTabPage::dispose()
{ {
delete m_pOrientHlp; m_pOrientHlp.reset();
m_pOrientHlp = nullptr;
m_pCtrlDial.clear(); m_pCtrlDial.clear();
m_pFtRotate.clear(); m_pFtRotate.clear();
m_pNfRotate.clear(); m_pNfRotate.clear();
......
...@@ -35,7 +35,7 @@ private: ...@@ -35,7 +35,7 @@ private:
VclPtr<FixedText> m_pFtRotate; VclPtr<FixedText> m_pFtRotate;
VclPtr<NumericField> m_pNfRotate; VclPtr<NumericField> m_pNfRotate;
VclPtr<TriStateBox> m_pCbStacked; VclPtr<TriStateBox> m_pCbStacked;
svx::OrientationHelper* m_pOrientHlp; std::unique_ptr<svx::OrientationHelper> m_pOrientHlp;
VclPtr<FixedText> m_pFtTextDirection; VclPtr<FixedText> m_pFtTextDirection;
VclPtr<TextDirectionListBox> m_pLbTextDirection; VclPtr<TextDirectionListBox> m_pLbTextDirection;
VclPtr<FixedText> m_pFtABCD; VclPtr<FixedText> m_pFtABCD;
......
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