summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-06-20 15:30:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-21 08:24:55 +0200
commite1b922a2b302879747ffb93d3a463f2e4d8eca71 (patch)
tree7746786c4cacf1721546057d6c869217b6941348 /forms
parent10433ad91f29e5ef316ab2e8fd2d4713a3217a41 (diff)
loplugin:useuniqueptr in frm::ODatabaseForm
Change-Id: I55a0ee19476d1e656cd9ff82d44666d43ba4ca58 Reviewed-on: https://gerrit.libreoffice.org/56189 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/DatabaseForm.cxx6
-rw-r--r--forms/source/component/DatabaseForm.hxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index c434543fbace..a191db5d0d42 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -2528,7 +2528,7 @@ void SAL_CALL ODatabaseForm::disposing(const EventObject& Source)
void ODatabaseForm::impl_createLoadTimer()
{
OSL_PRECOND( m_pLoadTimer == nullptr, "ODatabaseForm::impl_createLoadTimer: timer already exists!" );
- m_pLoadTimer = new Timer("DatabaseFormLoadTimer");
+ m_pLoadTimer.reset(new Timer("DatabaseFormLoadTimer"));
m_pLoadTimer->SetTimeout(100);
m_pLoadTimer->SetInvokeHandler(LINK(this,ODatabaseForm,OnTimeout));
}
@@ -2558,7 +2558,7 @@ void SAL_CALL ODatabaseForm::unloading(const EventObject& /*aEvent*/)
if ( m_pLoadTimer && m_pLoadTimer->IsActive() )
m_pLoadTimer->Stop();
- DELETEZ( m_pLoadTimer );
+ m_pLoadTimer.reset();
Reference< XRowSet > xParentRowSet( m_xParent, UNO_QUERY_THROW );
xParentRowSet->removeRowSetListener( this );
@@ -2849,7 +2849,7 @@ void SAL_CALL ODatabaseForm::unload()
if (!isLoaded())
return;
- DELETEZ(m_pLoadTimer);
+ m_pLoadTimer.reset();
aGuard.clear();
EventObject aEvt(static_cast<XWeak*>(this));
diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx
index 211cf216c68d..920a1b8ead21 100644
--- a/forms/source/component/DatabaseForm.hxx
+++ b/forms/source/component/DatabaseForm.hxx
@@ -177,7 +177,7 @@ class ODatabaseForm :public OFormComponents
rtl::Reference<OGroupManager> m_pGroupManager;
::dbtools::ParameterManager m_aParameterManager;
::dbtools::FilterManager m_aFilterManager;
- Timer* m_pLoadTimer;
+ std::unique_ptr<Timer> m_pLoadTimer;
rtl::Reference<OFormSubmitResetThread> m_pThread;
OUString m_sCurrentErrorContext;