summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-18 13:41:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-05-28 08:50:01 +0200
commit7f3c2ee6c135773c98ded063bdf10ec8900bf00f (patch)
tree6621671367251defeac70e7ba2690e2da284b178 /dbaccess
parent326c094ecfb496555b02234a751ab525cea6db55 (diff)
loplugin:useuniqueptr in OMarkableTreeListBox
Change-Id: Ifd3ea7fa32e9b254ff901a014f559ab211948929 Reviewed-on: https://gerrit.libreoffice.org/54849 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/control/marktree.cxx6
-rw-r--r--dbaccess/source/ui/inc/marktree.hxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/dbaccess/source/ui/control/marktree.cxx b/dbaccess/source/ui/control/marktree.cxx
index cf8e16f4e3de..1893985aa6fa 100644
--- a/dbaccess/source/ui/control/marktree.cxx
+++ b/dbaccess/source/ui/control/marktree.cxx
@@ -41,7 +41,7 @@ OMarkableTreeListBox::~OMarkableTreeListBox()
void OMarkableTreeListBox::dispose()
{
- delete m_pCheckButton;
+ m_pCheckButton.reset();
DBTreeListBox::dispose();
}
@@ -65,8 +65,8 @@ void OMarkableTreeListBox::Paint(vcl::RenderContext& rRenderContext, const tools
void OMarkableTreeListBox::InitButtonData()
{
- m_pCheckButton = new SvLBoxButtonData( this );
- EnableCheckButton( m_pCheckButton );
+ m_pCheckButton.reset( new SvLBoxButtonData( this ) );
+ EnableCheckButton( m_pCheckButton.get() );
}
void OMarkableTreeListBox::KeyInput( const KeyEvent& rKEvt )
diff --git a/dbaccess/source/ui/inc/marktree.hxx b/dbaccess/source/ui/inc/marktree.hxx
index 721af1a31cbb..a8bd8b2a70db 100644
--- a/dbaccess/source/ui/inc/marktree.hxx
+++ b/dbaccess/source/ui/inc/marktree.hxx
@@ -34,7 +34,7 @@ namespace dbaui
*/
class OMarkableTreeListBox : public DBTreeListBox
{
- SvLBoxButtonData* m_pCheckButton;
+ std::unique_ptr<SvLBoxButtonData> m_pCheckButton;
Link<void*,void> m_aCheckButtonHandler;
public: