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

use SimpleReferenceObject in accessibility

to replace hand-rolled version

Change-Id: I9dd8d02024702972722b43f2654db91eb3da3794
üst 62389342
......@@ -26,6 +26,7 @@ $(eval $(call gb_Library_use_libraries,acc,\
cppu \
cppuhelper \
sal \
salhelper \
i18nlangtag \
sot \
svl \
......
......@@ -21,8 +21,8 @@
#define INCLUDED_TOOLKIT_HELPER_ACCESSIBLEFACTORY_HXX
#include <com/sun/star/uno/Reference.hxx>
#include <rtl/ref.hxx>
#include <salhelper/simplereferenceobject.hxx>
namespace com { namespace sun { namespace star { namespace accessibility {
class XAccessible;
......@@ -58,7 +58,7 @@ namespace toolkit
//= IAccessibleFactory
class IAccessibleFactory : public ::rtl::IReference
class IAccessibleFactory : public salhelper::SimpleReferenceObject
{
public:
/** creates an accessible context for a button window
......@@ -122,7 +122,7 @@ namespace toolkit
createAccessible( Menu* _pMenu, sal_Bool _bIsMenuBar ) = 0;
protected:
~IAccessibleFactory() {}
virtual ~IAccessibleFactory() {}
};
......
......@@ -41,6 +41,7 @@ $(eval $(call gb_Library_use_libraries,tk,\
cppu \
cppuhelper \
sal \
salhelper \
i18nlangtag \
tl \
utl \
......
......@@ -58,14 +58,7 @@ namespace toolkit
protected:
virtual ~AccessibleDummyFactory();
private:
oslInterlockedCount m_refCount;
public:
// IReference
virtual oslInterlockedCount SAL_CALL acquire() SAL_OVERRIDE;
virtual oslInterlockedCount SAL_CALL release() SAL_OVERRIDE;
// IAccessibleFactory
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
createAccessibleContext( VCLXButton* /*_pXWindow*/ ) SAL_OVERRIDE
......@@ -131,7 +124,6 @@ namespace toolkit
AccessibleDummyFactory::AccessibleDummyFactory()
: m_refCount(0)
{
}
......@@ -141,23 +133,6 @@ namespace toolkit
}
oslInterlockedCount SAL_CALL AccessibleDummyFactory::acquire()
{
return osl_atomic_increment( &m_refCount );
}
oslInterlockedCount SAL_CALL AccessibleDummyFactory::release()
{
if ( 0 == osl_atomic_decrement( &m_refCount ) )
{
delete this;
return 0;
}
return m_refCount;
}
//= AccessibilityClient
......
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