From ba6781f8cba03933811fd2a420cf3d09daddfd56 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 8 Jul 2014 16:09:31 +0200 Subject: use SimpleReferenceObject in fpicker module to replace hand-rolled version Change-Id: I0c1cbf6b0e70106f4ecc5b579e09acc17045a44e --- fpicker/source/office/asyncfilepicker.cxx | 20 +------------------- fpicker/source/office/asyncfilepicker.hxx | 8 ++------ 2 files changed, 3 insertions(+), 25 deletions(-) (limited to 'fpicker/source') diff --git a/fpicker/source/office/asyncfilepicker.cxx b/fpicker/source/office/asyncfilepicker.cxx index e1c2ebe33cf4..d9b18cb405c9 100644 --- a/fpicker/source/office/asyncfilepicker.cxx +++ b/fpicker/source/office/asyncfilepicker.cxx @@ -29,8 +29,7 @@ namespace svt { AsyncPickerAction::AsyncPickerAction( SvtFileDialog* _pDialog, SvtFileView* _pView, const Action _eAction ) - :m_refCount ( 0 ) - ,m_eAction ( _eAction ) + :m_eAction ( _eAction ) ,m_pView ( _pView ) ,m_pDialog ( _pDialog ) ,m_bRunning ( false ) @@ -45,23 +44,6 @@ namespace svt } - oslInterlockedCount SAL_CALL AsyncPickerAction::acquire() - { - return osl_atomic_increment( &m_refCount ); - } - - - oslInterlockedCount SAL_CALL AsyncPickerAction::release() - { - if ( 0 == osl_atomic_decrement( &m_refCount ) ) - { - delete this; - return 0; - } - return m_refCount; - } - - void AsyncPickerAction::cancel() { DBG_TESTSOLARMUTEX(); diff --git a/fpicker/source/office/asyncfilepicker.hxx b/fpicker/source/office/asyncfilepicker.hxx index 77a93e6f7f8a..cea8899f22f3 100644 --- a/fpicker/source/office/asyncfilepicker.hxx +++ b/fpicker/source/office/asyncfilepicker.hxx @@ -24,6 +24,7 @@ #include #include #include +#include class SvtFileView; class SvtFileDialog; @@ -39,7 +40,7 @@ namespace svt //= AsyncPickerAction - class AsyncPickerAction : public ::rtl::IReference + class AsyncPickerAction : public salhelper::SimpleReferenceObject { public: enum Action @@ -50,7 +51,6 @@ namespace svt }; private: - mutable oslInterlockedCount m_refCount; Action m_eAction; SvtFileView* m_pView; SvtFileDialog* m_pDialog; @@ -83,10 +83,6 @@ namespace svt /// cancels the running action void cancel(); - // IReference overridables - virtual oslInterlockedCount SAL_CALL acquire() SAL_OVERRIDE; - virtual oslInterlockedCount SAL_CALL release() SAL_OVERRIDE; - protected: virtual ~AsyncPickerAction(); -- cgit