diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-03 09:22:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-04 11:22:45 +0200 |
commit | f91705bf48f4675838452c92f261867600f27bf7 (patch) | |
tree | 1f0e90a4f70b7538201378dc4f8283c87747fc54 /sc/source/ui | |
parent | c7f762973d21118ce3f5b0baab8850dc89bc4765 (diff) |
loplugin:useuniqueptr in ScChart2DataSequence
Change-Id: I340d9fbde1aa53097c162b61505593ee6d9fde35
Reviewed-on: https://gerrit.libreoffice.org/56902
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/unoobj/chart2uno.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 83bb6ac39b2d..6231038418bb 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -2437,7 +2437,7 @@ ScChart2DataSequence::~ScChart2DataSequence() StopListeningToAllExternalRefs(); } - delete m_pValueListener; + m_pValueListener.reset(); } void ScChart2DataSequence::RefChanged() @@ -2463,7 +2463,7 @@ void ScChart2DataSequence::RefChanged() if (!ScRefTokenHelper::getRangeFromToken(aRange, *itr, ScAddress())) continue; - m_pDocument->StartListeningArea(aRange, false, m_pValueListener); + m_pDocument->StartListeningArea(aRange, false, m_pValueListener.get()); if (pCLC) pCLC->StartListeningHiddenRange(aRange, m_pHiddenListener.get()); } @@ -3220,7 +3220,7 @@ void SAL_CALL ScChart2DataSequence::addModifyListener( const uno::Reference< uti if ( m_aValueListeners.size() == 1 ) { if (!m_pValueListener) - m_pValueListener = new ScLinkListener( LINK( this, ScChart2DataSequence, ValueListenerHdl ) ); + m_pValueListener.reset(new ScLinkListener( LINK( this, ScChart2DataSequence, ValueListenerHdl ) )); if (!m_pHiddenListener.get()) m_pHiddenListener.reset(new HiddenRangeListener(*this)); @@ -3235,7 +3235,7 @@ void SAL_CALL ScChart2DataSequence::addModifyListener( const uno::Reference< uti if (!ScRefTokenHelper::getRangeFromToken(aRange, *itr, ScAddress())) continue; - m_pDocument->StartListeningArea( aRange, false, m_pValueListener ); + m_pDocument->StartListeningArea( aRange, false, m_pValueListener.get() ); if (pCLC) pCLC->StartListeningHiddenRange(aRange, m_pHiddenListener.get()); } |