use SimpleReferenceObject in xmloff module
to replace hand-rolled version Change-Id: I36d4ce14d0c0c8a4b224a240c6e25c8df99b78aa
This commit is contained in:
parent
065d6cc3f3
commit
6238934272
3 changed files with 3 additions and 27 deletions
|
@ -25,6 +25,7 @@
|
|||
#include <com/sun/star/uno/Any.hxx>
|
||||
|
||||
#include <rtl/ref.hxx>
|
||||
#include <salhelper/simplereferenceobject.hxx>
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
@ -35,7 +36,7 @@ namespace xmloff
|
|||
typedef ::std::map< PropertyId, ::com::sun::star::uno::Any > PropertyValues;
|
||||
|
||||
//= IPropertyHandler
|
||||
class IPropertyHandler : public ::rtl::IReference
|
||||
class IPropertyHandler : public ::salhelper::SimpleReferenceObject
|
||||
{
|
||||
public:
|
||||
/** retrieves the XML attribute value for the given property values
|
||||
|
|
|
@ -27,19 +27,6 @@ namespace xmloff
|
|||
{
|
||||
}
|
||||
|
||||
oslInterlockedCount SAL_CALL PropertyHandlerBase::acquire()
|
||||
{
|
||||
return osl_atomic_increment( &m_refCount );
|
||||
}
|
||||
|
||||
oslInterlockedCount SAL_CALL PropertyHandlerBase::release()
|
||||
{
|
||||
oslInterlockedCount decremented = osl_atomic_decrement( &m_refCount );
|
||||
if ( 0 == decremented )
|
||||
delete this;
|
||||
return decremented;
|
||||
}
|
||||
|
||||
} // namespace xmloff
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
|
||||
#include "forms/property_handler.hxx"
|
||||
|
||||
#include <osl/interlck.h>
|
||||
|
||||
namespace xmloff
|
||||
{
|
||||
|
||||
|
@ -31,19 +29,9 @@ namespace xmloff
|
|||
class PropertyHandlerBase : public IPropertyHandler
|
||||
{
|
||||
protected:
|
||||
PropertyHandlerBase()
|
||||
:m_refCount( 0 )
|
||||
{
|
||||
}
|
||||
PropertyHandlerBase() {}
|
||||
|
||||
virtual ~PropertyHandlerBase();
|
||||
|
||||
// IReference
|
||||
virtual oslInterlockedCount SAL_CALL acquire() SAL_OVERRIDE;
|
||||
virtual oslInterlockedCount SAL_CALL release() SAL_OVERRIDE;
|
||||
|
||||
private:
|
||||
oslInterlockedCount m_refCount;
|
||||
};
|
||||
|
||||
} // namespace xmloff
|
||||
|
|
Loading…
Reference in a new issue