summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-07-08 14:05:21 +0200
committerNoel Grandin <noel@peralex.com>2014-07-08 15:16:47 +0200
commitf219bfb26f98e6afaf19fe892d5bac746c82ef96 (patch)
tree6516fe7f5dd023dd8ac8325c23c30decd81acd01 /svx
parent482f97926e1090c50ef05eed6badf311a7aa02f9 (diff)
use SimpleReferenceObject in svx module
to replace hand-rolled version Change-Id: I084a21161ae44991199fbd2b12d61dcb7d592408
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/fmscriptingenv.cxx25
-rw-r--r--svx/source/inc/fmscriptingenv.hxx3
2 files changed, 3 insertions, 25 deletions
diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx
index 5c9b5b9abb54..120dcb5dc5e6 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -148,7 +148,6 @@ namespace svxform
private:
::osl::Mutex m_aMutex;
- oslInterlockedCount m_refCount;
ListenerImplementation m_pScriptListener;
FmFormModel& m_rFormModel;
bool m_bDisposed;
@@ -165,10 +164,6 @@ namespace svxform
virtual void revokeEventAttacherManager( const Reference< XEventAttacherManager >& _rxManager ) SAL_OVERRIDE;
virtual void dispose() SAL_OVERRIDE;
- // IReference
- virtual oslInterlockedCount SAL_CALL acquire() SAL_OVERRIDE;
- virtual oslInterlockedCount SAL_CALL release() SAL_OVERRIDE;
-
private:
void impl_registerOrRevoke_throw( const Reference< XEventAttacherManager >& _rxManager, bool _bRegister );
};
@@ -804,8 +799,7 @@ namespace svxform
FormScriptingEnvironment::FormScriptingEnvironment( FmFormModel& _rModel )
- :m_refCount( 0 )
- ,m_pScriptListener( NULL )
+ :m_pScriptListener( NULL )
,m_rFormModel( _rModel )
,m_bDisposed( false )
{
@@ -856,23 +850,6 @@ namespace svxform
}
- oslInterlockedCount SAL_CALL FormScriptingEnvironment::acquire()
- {
- return osl_atomic_increment( &m_refCount );
- }
-
-
- oslInterlockedCount SAL_CALL FormScriptingEnvironment::release()
- {
- if ( 0 == osl_atomic_decrement( &m_refCount ) )
- {
- delete this;
- return 0;
- }
- return m_refCount;
- }
-
-
IFormScriptingEnvironment::~IFormScriptingEnvironment()
{
}
diff --git a/svx/source/inc/fmscriptingenv.hxx b/svx/source/inc/fmscriptingenv.hxx
index 8d86f2520d68..9e9e7db31a3b 100644
--- a/svx/source/inc/fmscriptingenv.hxx
+++ b/svx/source/inc/fmscriptingenv.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/script/XEventAttacherManager.hpp>
#include <rtl/ref.hxx>
+#include <salhelper/simplereferenceobject.hxx>
class FmFormModel;
@@ -35,7 +36,7 @@ namespace svxform
/** describes the interface implemented by a component which handles scripting requirements
in a form/control environment.
*/
- class SAL_NO_VTABLE IFormScriptingEnvironment : public ::rtl::IReference
+ class SAL_NO_VTABLE IFormScriptingEnvironment : public ::salhelper::SimpleReferenceObject
{
public:
/** registers an XEventAttacherManager whose events should be monitored and handled