diff options
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 6 | ||||
-rw-r--r-- | forms/source/component/DatabaseForm.hxx | 2 |
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; |