diff options
author | Noel Grandin <noel@peralex.com> | 2014-07-07 10:55:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-07-08 08:56:18 +0200 |
commit | ea91310384f2f677abc8e85ece54e71fba26ed0c (patch) | |
tree | 3803fe6b1712a391ee9b2eba0c7e7d1723532d2a | |
parent | 623893427221bdab2f5c7339dd152e371132d83e (diff) |
use SimpleReferenceObject in accessibility
to replace hand-rolled version
Change-Id: I9dd8d02024702972722b43f2654db91eb3da3794
-rw-r--r-- | accessibility/Library_acc.mk | 1 | ||||
-rw-r--r-- | include/toolkit/helper/accessiblefactory.hxx | 6 | ||||
-rw-r--r-- | toolkit/Library_tk.mk | 1 | ||||
-rw-r--r-- | toolkit/source/helper/accessibilityclient.cxx | 25 |
4 files changed, 5 insertions, 28 deletions
diff --git a/accessibility/Library_acc.mk b/accessibility/Library_acc.mk index a2b66cd0ae12..4b5a10bb9fe1 100644 --- a/accessibility/Library_acc.mk +++ b/accessibility/Library_acc.mk @@ -26,6 +26,7 @@ $(eval $(call gb_Library_use_libraries,acc,\ cppu \ cppuhelper \ sal \ + salhelper \ i18nlangtag \ sot \ svl \ diff --git a/include/toolkit/helper/accessiblefactory.hxx b/include/toolkit/helper/accessiblefactory.hxx index 6428a10fa15d..bcd3dce3b4a4 100644 --- a/include/toolkit/helper/accessiblefactory.hxx +++ b/include/toolkit/helper/accessiblefactory.hxx @@ -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() {} }; diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk index 9c2410e64474..5a219e0f3374 100644 --- a/toolkit/Library_tk.mk +++ b/toolkit/Library_tk.mk @@ -41,6 +41,7 @@ $(eval $(call gb_Library_use_libraries,tk,\ cppu \ cppuhelper \ sal \ + salhelper \ i18nlangtag \ tl \ utl \ diff --git a/toolkit/source/helper/accessibilityclient.cxx b/toolkit/source/helper/accessibilityclient.cxx index 41ad0a28b0e4..7dc37943acae 100644 --- a/toolkit/source/helper/accessibilityclient.cxx +++ b/toolkit/source/helper/accessibilityclient.cxx @@ -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 |