summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-06 11:38:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-17 07:07:08 +0100
commit794066fa1ac67b6e352c17e78245a2698b0c470b (patch)
treed433b0c84b7854d36266a3ba3fe07857ae165898 /svx
parentc503df794f942488840ac2d69e61895e42a35b2a (diff)
loplugin:useuniqueptr in FmXGridPeer
Change-Id: Ie9a705852035eb99c9d0e5862c4d9f6bdb4c6a05 Reviewed-on: https://gerrit.libreoffice.org/49877 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/fmcomp/fmgridif.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 31280a401825..262d4d47f5bc 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -1041,11 +1041,10 @@ FmXGridPeer::FmXGridPeer(const Reference< XComponentContext >& _rxContext)
,m_bInterceptingDispatch(false)
,m_pStateCache(nullptr)
,m_pDispatchers(nullptr)
- ,m_pGridListener(nullptr)
,m_xContext(_rxContext)
{
// Create must be called after this constructor
- m_pGridListener = new GridListenerDelegator( this );
+ m_pGridListener.reset( new GridListenerDelegator( this ) );
}
@@ -1064,7 +1063,7 @@ void FmXGridPeer::Create(vcl::Window* pParent, WinBits nStyle)
pWin->SetSlotExecutor(LINK(this, FmXGridPeer, OnExecuteGridSlot));
// want to hear about row selections
- pWin->setGridListener( m_pGridListener );
+ pWin->setGridListener( m_pGridListener.get() );
// Init must always be called
pWin->Init();
@@ -1078,8 +1077,6 @@ FmXGridPeer::~FmXGridPeer()
{
setRowSet(Reference< XRowSet > ());
setColumns(Reference< XIndexContainer > ());
-
- delete m_pGridListener;
}
namespace