diff options
Diffstat (limited to 'forms/source/richtext')
-rw-r--r-- | forms/source/richtext/rtattributehandler.cxx | 31 | ||||
-rw-r--r-- | forms/source/richtext/rtattributehandler.hxx | 26 |
2 files changed, 4 insertions, 53 deletions
diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx index 7a335567eb4b..03e257aee571 100644 --- a/forms/source/richtext/rtattributehandler.cxx +++ b/forms/source/richtext/rtattributehandler.cxx @@ -40,25 +40,6 @@ namespace frm { - //= ReferenceBase - - - oslInterlockedCount SAL_CALL ReferenceBase::acquire() - { - return osl_atomic_increment( &m_refCount ); - } - - - oslInterlockedCount SAL_CALL ReferenceBase::release() - { - return osl_atomic_decrement( &m_refCount ); - } - - - ReferenceBase::~ReferenceBase() - { - } - AttributeHandler::AttributeHandler( AttributeId _nAttributeId, WhichId _nWhichId ) :m_nAttribute( _nAttributeId ) ,m_nWhich ( _nWhichId ) @@ -71,18 +52,6 @@ namespace frm } - oslInterlockedCount SAL_CALL AttributeHandler::acquire() - { - return ReferenceBase::acquire(); - } - - - oslInterlockedCount SAL_CALL AttributeHandler::release() - { - return ReferenceBase::release(); - } - - AttributeId AttributeHandler::getAttributeId( ) const { return getAttribute(); diff --git a/forms/source/richtext/rtattributehandler.hxx b/forms/source/richtext/rtattributehandler.hxx index 9cbc60e33bce..881ec2d2ed8f 100644 --- a/forms/source/richtext/rtattributehandler.hxx +++ b/forms/source/richtext/rtattributehandler.hxx @@ -24,6 +24,7 @@ #include <rtl/ref.hxx> #include <editeng/svxenum.hxx> #include <editeng/frmdir.hxx> +#include <salhelper/simplereferenceobject.hxx> class SfxItemSet; class SfxPoolItem; @@ -32,21 +33,7 @@ class SfxItemPool; namespace frm { - class ReferenceBase : public ::rtl::IReference - { - protected: - oslInterlockedCount m_refCount; - - public: - // IReference - virtual oslInterlockedCount SAL_CALL acquire() SAL_OVERRIDE; - virtual oslInterlockedCount SAL_CALL release() SAL_OVERRIDE; - - protected: - virtual ~ReferenceBase(); - }; - - class IAttributeHandler : public ::rtl::IReference + class IAttributeHandler : public salhelper::SimpleReferenceObject { public: virtual AttributeId getAttributeId( ) const = 0; @@ -54,11 +41,10 @@ namespace frm virtual void executeAttribute( const SfxItemSet& _rCurrentAttribs, SfxItemSet& _rNewAttribs, const SfxPoolItem* _pAdditionalArg, ScriptType _nForScriptType ) const = 0; protected: - ~IAttributeHandler() {} + virtual ~IAttributeHandler() {} }; - class AttributeHandler :public ReferenceBase - ,public IAttributeHandler + class AttributeHandler : public IAttributeHandler { private: AttributeId m_nAttribute; @@ -86,10 +72,6 @@ namespace frm // pseudo-abstract virtual AttributeCheckState implGetCheckState( const SfxPoolItem& _rItem ) const; - // disambiguate IReference - virtual oslInterlockedCount SAL_CALL acquire() SAL_OVERRIDE; - virtual oslInterlockedCount SAL_CALL release() SAL_OVERRIDE; - protected: virtual ~AttributeHandler(); }; |