summaryrefslogtreecommitdiff
path: root/svx/source/form/fmvwimp.cxx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2017-08-29 10:35:57 +0900
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-29 10:29:43 +0200
commit8514f192c9e385550b336e57997c9e0dbd3a9bc3 (patch)
tree987daa0324c1b17b907f5a76e9f8c98a7d4b27b2 /svx/source/form/fmvwimp.cxx
parentc1629e680c62107df9582c1bd04c9e0c3273e726 (diff)
svx: FmXFormView owns m_pWatchStoredList
so simplify code with std::unique_ptr. Change-Id: I640bcbde4a59a239b33229168fd48cac29a3fc4d Reviewed-on: https://gerrit.libreoffice.org/41663 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/form/fmvwimp.cxx')
-rw-r--r--svx/source/form/fmvwimp.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 6cfe4314aac4..5ec7438bfb25 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -397,7 +397,6 @@ FmXFormView::FmXFormView(FmFormView* _pView )
,m_nErrorMessageEvent( nullptr )
,m_nAutoFocusEvent( nullptr )
,m_nControlWizardEvent( nullptr )
- ,m_pWatchStoredList( nullptr )
,m_bFirstActivation( true )
,m_isTabOrderUpdateSuspended( false )
{
@@ -455,9 +454,6 @@ FmXFormView::~FmXFormView()
}
cancelEvents();
-
- delete m_pWatchStoredList;
- m_pWatchStoredList = nullptr;
}
// EventListener
@@ -1735,8 +1731,7 @@ void FmXFormView::stopMarkListWatching()
if ( m_pWatchStoredList )
{
m_pWatchStoredList->EndListeningAll();
- delete m_pWatchStoredList;
- m_pWatchStoredList = nullptr;
+ m_pWatchStoredList.reset();
}
}
@@ -1749,7 +1744,7 @@ void FmXFormView::startMarkListWatching()
DBG_ASSERT( pModel != nullptr, "FmXFormView::startMarkListWatching: shell has no model!" );
if (pModel)
{
- m_pWatchStoredList = new ObjectRemoveListener( this );
+ m_pWatchStoredList.reset(new ObjectRemoveListener( this ));
m_pWatchStoredList->StartListening( *static_cast< SfxBroadcaster* >( pModel ) );
}
}