Kaydet (Commit) ba6781f8 authored tarafından Noel Grandin's avatar Noel Grandin

use SimpleReferenceObject in fpicker module

to replace hand-rolled version

Change-Id: I0c1cbf6b0e70106f4ecc5b579e09acc17045a44e
üst 3a93809d
......@@ -25,6 +25,7 @@ $(eval $(call gb_Library_use_libraries,fps_office,\
cppu \
cppuhelper \
sal \
salhelper \
svl \
svt \
tk \
......
......@@ -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();
......
......@@ -24,6 +24,7 @@
#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
#include <com/sun/star/uno/Sequence.h>
#include <salhelper/simplereferenceobject.hxx>
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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment