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,\ ...@@ -25,6 +25,7 @@ $(eval $(call gb_Library_use_libraries,fps_office,\
cppu \ cppu \
cppuhelper \ cppuhelper \
sal \ sal \
salhelper \
svl \ svl \
svt \ svt \
tk \ tk \
......
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
namespace svt namespace svt
{ {
AsyncPickerAction::AsyncPickerAction( SvtFileDialog* _pDialog, SvtFileView* _pView, const Action _eAction ) AsyncPickerAction::AsyncPickerAction( SvtFileDialog* _pDialog, SvtFileView* _pView, const Action _eAction )
:m_refCount ( 0 ) :m_eAction ( _eAction )
,m_eAction ( _eAction )
,m_pView ( _pView ) ,m_pView ( _pView )
,m_pDialog ( _pDialog ) ,m_pDialog ( _pDialog )
,m_bRunning ( false ) ,m_bRunning ( false )
...@@ -45,23 +44,6 @@ namespace svt ...@@ -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() void AsyncPickerAction::cancel()
{ {
DBG_TESTSOLARMUTEX(); DBG_TESTSOLARMUTEX();
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <rtl/ref.hxx> #include <rtl/ref.hxx>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <com/sun/star/uno/Sequence.h> #include <com/sun/star/uno/Sequence.h>
#include <salhelper/simplereferenceobject.hxx>
class SvtFileView; class SvtFileView;
class SvtFileDialog; class SvtFileDialog;
...@@ -39,7 +40,7 @@ namespace svt ...@@ -39,7 +40,7 @@ namespace svt
//= AsyncPickerAction //= AsyncPickerAction
class AsyncPickerAction : public ::rtl::IReference class AsyncPickerAction : public salhelper::SimpleReferenceObject
{ {
public: public:
enum Action enum Action
...@@ -50,7 +51,6 @@ namespace svt ...@@ -50,7 +51,6 @@ namespace svt
}; };
private: private:
mutable oslInterlockedCount m_refCount;
Action m_eAction; Action m_eAction;
SvtFileView* m_pView; SvtFileView* m_pView;
SvtFileDialog* m_pDialog; SvtFileDialog* m_pDialog;
...@@ -83,10 +83,6 @@ namespace svt ...@@ -83,10 +83,6 @@ namespace svt
/// cancels the running action /// cancels the running action
void cancel(); void cancel();
// IReference overridables
virtual oslInterlockedCount SAL_CALL acquire() SAL_OVERRIDE;
virtual oslInterlockedCount SAL_CALL release() SAL_OVERRIDE;
protected: protected:
virtual ~AsyncPickerAction(); 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