diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-20 15:47:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-21 15:16:04 +0200 |
commit | db3c199e947c622afe3fa6e71632e41681562009 (patch) | |
tree | 1bc631e05872130b6b3df0ea7a4e3c96357f31d0 | |
parent | 12782fc917bcdc1c119bda675fc27f77887498e0 (diff) |
loplugin:useuniqueptr in SvxPatternTabPage
Change-Id: I8b2493c723c65f90fd2dbef588c1fa1c669bcceb
Reviewed-on: https://gerrit.libreoffice.org/56194
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | cui/source/inc/cuitabarea.hxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/tppattern.cxx | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 2c8e55234fe9..119c466a9971 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -592,7 +592,7 @@ private: VclPtr<PushButton> m_pBtnAdd; VclPtr<PushButton> m_pBtnModify; - SvxBitmapCtl* m_pBitmapCtl; + std::unique_ptr<SvxBitmapCtl> m_pBitmapCtl; const SfxItemSet& m_rOutAttrs; diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx index 9bb279850d1f..712bef2dc03e 100644 --- a/cui/source/tabpages/tppattern.cxx +++ b/cui/source/tabpages/tppattern.cxx @@ -109,7 +109,7 @@ SvxPatternTabPage::SvxPatternTabPage( vcl::Window* pParent, const SfxItemSet& r m_pCtlPreview->set_width_request(aSize.Width()); m_pCtlPreview->set_height_request(aSize.Height()); - m_pBitmapCtl = new SvxBitmapCtl; + m_pBitmapCtl.reset(new SvxBitmapCtl); // this page needs ExchangeSupport SetExchangeSupport(); @@ -137,8 +137,7 @@ SvxPatternTabPage::~SvxPatternTabPage() void SvxPatternTabPage::dispose() { - delete m_pBitmapCtl; - m_pBitmapCtl = nullptr; + m_pBitmapCtl.reset(); m_pCtlPixel.clear(); m_pLbColor.clear(); m_pLbBackgroundColor.clear(); |