use SimpleReferenceObject in accessibility
to replace hand-rolled version Change-Id: I9dd8d02024702972722b43f2654db91eb3da3794
This commit is contained in:
parent
6238934272
commit
ea91310384
@ -26,6 +26,7 @@ $(eval $(call gb_Library_use_libraries,acc,\
|
|||||||
cppu \
|
cppu \
|
||||||
cppuhelper \
|
cppuhelper \
|
||||||
sal \
|
sal \
|
||||||
|
salhelper \
|
||||||
i18nlangtag \
|
i18nlangtag \
|
||||||
sot \
|
sot \
|
||||||
svl \
|
svl \
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
#define INCLUDED_TOOLKIT_HELPER_ACCESSIBLEFACTORY_HXX
|
#define INCLUDED_TOOLKIT_HELPER_ACCESSIBLEFACTORY_HXX
|
||||||
|
|
||||||
#include <com/sun/star/uno/Reference.hxx>
|
#include <com/sun/star/uno/Reference.hxx>
|
||||||
|
|
||||||
#include <rtl/ref.hxx>
|
#include <rtl/ref.hxx>
|
||||||
|
#include <salhelper/simplereferenceobject.hxx>
|
||||||
|
|
||||||
namespace com { namespace sun { namespace star { namespace accessibility {
|
namespace com { namespace sun { namespace star { namespace accessibility {
|
||||||
class XAccessible;
|
class XAccessible;
|
||||||
@ -58,7 +58,7 @@ namespace toolkit
|
|||||||
|
|
||||||
//= IAccessibleFactory
|
//= IAccessibleFactory
|
||||||
|
|
||||||
class IAccessibleFactory : public ::rtl::IReference
|
class IAccessibleFactory : public salhelper::SimpleReferenceObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** creates an accessible context for a button window
|
/** creates an accessible context for a button window
|
||||||
@ -122,7 +122,7 @@ namespace toolkit
|
|||||||
createAccessible( Menu* _pMenu, sal_Bool _bIsMenuBar ) = 0;
|
createAccessible( Menu* _pMenu, sal_Bool _bIsMenuBar ) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
~IAccessibleFactory() {}
|
virtual ~IAccessibleFactory() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ $(eval $(call gb_Library_use_libraries,tk,\
|
|||||||
cppu \
|
cppu \
|
||||||
cppuhelper \
|
cppuhelper \
|
||||||
sal \
|
sal \
|
||||||
|
salhelper \
|
||||||
i18nlangtag \
|
i18nlangtag \
|
||||||
tl \
|
tl \
|
||||||
utl \
|
utl \
|
||||||
|
@ -58,14 +58,7 @@ namespace toolkit
|
|||||||
protected:
|
protected:
|
||||||
virtual ~AccessibleDummyFactory();
|
virtual ~AccessibleDummyFactory();
|
||||||
|
|
||||||
private:
|
|
||||||
oslInterlockedCount m_refCount;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// IReference
|
|
||||||
virtual oslInterlockedCount SAL_CALL acquire() SAL_OVERRIDE;
|
|
||||||
virtual oslInterlockedCount SAL_CALL release() SAL_OVERRIDE;
|
|
||||||
|
|
||||||
// IAccessibleFactory
|
// IAccessibleFactory
|
||||||
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
|
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
|
||||||
createAccessibleContext( VCLXButton* /*_pXWindow*/ ) SAL_OVERRIDE
|
createAccessibleContext( VCLXButton* /*_pXWindow*/ ) SAL_OVERRIDE
|
||||||
@ -131,7 +124,6 @@ namespace toolkit
|
|||||||
|
|
||||||
|
|
||||||
AccessibleDummyFactory::AccessibleDummyFactory()
|
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
|
//= AccessibilityClient
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user