summaryrefslogtreecommitdiff
path: root/winaccessibility/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-11-19 17:24:36 +0100
committerMichael Stahl <mstahl@redhat.com>2013-11-19 17:32:21 +0100
commit03fdec57762b287cb8e0b6b446f5e7ba1b187f88 (patch)
tree8504f32119aac162bc5370e6312c822739656b32 /winaccessibility/source
parent76ff4c5366fd89f2736dfc7b58d5a38e43ad7062 (diff)
winaccessibility: use WeakImplHelper
Change-Id: I5872e520ca009a0f9277827d72e72befe3323a06
Diffstat (limited to 'winaccessibility/source')
-rw-r--r--winaccessibility/source/service/AccEventListener.cxx33
-rw-r--r--winaccessibility/source/service/AccTopWindowListener.cxx30
2 files changed, 5 insertions, 58 deletions
diff --git a/winaccessibility/source/service/AccEventListener.cxx b/winaccessibility/source/service/AccEventListener.cxx
index df2a42c7967e..de4d7b4da951 100644
--- a/winaccessibility/source/service/AccEventListener.cxx
+++ b/winaccessibility/source/service/AccEventListener.cxx
@@ -47,10 +47,9 @@ using namespace cppu;
AccEventListener::AccEventListener(com::sun::star::accessibility::XAccessible* pAcc,
AccObjectManagerAgent* Agent)
- :pAccessible(pAcc),
- pAgent(Agent),
- m_isDisposed(false),
- m_refcount(0)
+ : pAccessible(pAcc)
+ , pAgent(Agent)
+ , m_isDisposed(false)
{}
AccEventListener::~AccEventListener()
@@ -280,30 +279,4 @@ throw (::com::sun::star::uno::RuntimeException)
removeMeFromBroadcaster();
}
-//need to investigate further
-::com::sun::star::uno::Any SAL_CALL AccEventListener::queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException)
-{
- if(aType.equals(::getCppuType( (Reference< com::sun::star::accessibility::XAccessibleEventListener> const *)0 ) ))
- {
- Reference< com::sun::star::accessibility::XAccessibleEventListener> xEventListener( static_cast< com::sun::star::accessibility::XAccessibleEventListener* >(this));
- return makeAny(xEventListener);
- }
-
- return Any();
-}
-
-void AccEventListener::acquire( ) throw ()
-{
- ::osl_incrementInterlockedCount( &m_refcount );
-}
-
-void AccEventListener::release() throw ()
-{
- // thread-safe decrementation of reference count
- if (0 == ::osl_decrementInterlockedCount( &m_refcount ))
- {
- delete this; // shutdown this object
- }
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/winaccessibility/source/service/AccTopWindowListener.cxx b/winaccessibility/source/service/AccTopWindowListener.cxx
index 5c55cbd3b2a1..fac53d60362f 100644
--- a/winaccessibility/source/service/AccTopWindowListener.cxx
+++ b/winaccessibility/source/service/AccTopWindowListener.cxx
@@ -117,9 +117,8 @@ void AccTopWindowListener::handleWindowOpened( com::sun::star::accessibility::XA
}
}
-AccTopWindowListener::AccTopWindowListener():
- accManagerAgent(),
- m_refcount(1)
+AccTopWindowListener::AccTopWindowListener()
+ : accManagerAgent()
{
}
@@ -272,29 +271,4 @@ void AccTopWindowListener::disposing( const ::com::sun::star::lang::EventObject&
{
}
-//need to investigate further
-::com::sun::star::uno::Any SAL_CALL AccTopWindowListener::queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException)
-{
- if (aType.equals( ::getCppuType( (Reference< com::sun::star::awt::XTopWindowListener> const *)0 ) ))
- {
- Reference< com::sun::star::awt::XTopWindowListener> xTopListener( static_cast< com::sun::star::awt::XTopWindowListener* >(this));
- return makeAny(xTopListener);
- }
- return Any();
-}
-
-void AccTopWindowListener::acquire( ) throw ()
-{
- ::osl_incrementInterlockedCount( &m_refcount );
-}
-
-void AccTopWindowListener::release() throw ()
-{
- // thread-safe decrementation of reference count
- if (0 == ::osl_decrementInterlockedCount( &m_refcount ))
- {
- delete this; // shutdown this object
- }
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */