LibreOffice Module comphelper (master)  1
Protected Member Functions | Protected Attributes | List of all members
comphelper::OAccessibleContextWrapperHelper Class Referenceabstract

Helper for wrapping an XAccessibleContext by aggregating a proxy for it. More...

#include <accessiblewrapper.hxx>

Inheritance diagram for comphelper::OAccessibleContextWrapperHelper:
[legend]
Collaboration diagram for comphelper::OAccessibleContextWrapperHelper:
[legend]

Protected Member Functions

 OAccessibleContextWrapperHelper (const css::uno::Reference< css::uno::XComponentContext > &_rxContext,::cppu::OBroadcastHelper &_rBHelper, const css::uno::Reference< css::accessibility::XAccessibleContext > &_rxInnerAccessibleContext, const css::uno::Reference< css::accessibility::XAccessible > &_rxOwningAccessible, const css::uno::Reference< css::accessibility::XAccessible > &_rxParentAccessible)
 ctor More...
 
void aggregateProxy (oslInterlockedCount &_rRefCount,::cppu::OWeakObject &_rDelegator)
 to be called from within your ctor - does the aggregation of a proxy for m_xInnerContext More...
 
css::uno::Any SAL_CALL queryInterface (const css::uno::Type &_rType) override
 
sal_Int32 baseGetAccessibleChildCount ()
 
css::uno::Reference< css::accessibility::XAccessible > baseGetAccessibleChild (sal_Int32 i)
 
css::uno::Reference< css::accessibility::XAccessibleRelationSet > baseGetAccessibleRelationSet ()
 
virtual void SAL_CALL notifyEvent (const css::accessibility::AccessibleEventObject &aEvent) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual void SAL_CALL dispose () override
 
virtual void notifyTranslatedEvent (const css::accessibility::AccessibleEventObject &_rEvent)=0
 notify an accessible event which has been translated (if necessary) More...
 
virtual ~OAccessibleContextWrapperHelper () override
 
 OAccessibleContextWrapperHelper (const OAccessibleContextWrapperHelper &)=delete
 
OAccessibleContextWrapperHelperoperator= (const OAccessibleContextWrapperHelper &)=delete
 
- Protected Member Functions inherited from cppu::ImplHelper1< class >
 ~ImplHelper1 ()
 

Protected Attributes

css::uno::Reference< css::accessibility::XAccessibleContext > m_xInnerContext
 the context we're wrapping (properly typed, in opposite to OComponentProxyAggregationHelper::m_xInner) More...
 
css::uno::Reference< css::accessibility::XAccessible > m_xOwningAccessible
 the XAccessible which created this context More...
 
css::uno::Reference< css::accessibility::XAccessible > m_xParentAccessible
 the XAccessible which is to be returned in getAccessibleParent More...
 
rtl::Reference< OWrappedAccessibleChildrenManagerm_xChildMapper
 

Additional Inherited Members

- Public Member Functions inherited from cppu::ImplHelper1< class >
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE
 
- Private Member Functions inherited from comphelper::OComponentProxyAggregationHelper
css::uno::Any SAL_CALL queryInterface (const css::uno::Type &_rType) override
 
 OComponentProxyAggregationHelper (const css::uno::Reference< css::uno::XComponentContext > &_rxContext,::cppu::OBroadcastHelper &_rBHelper)
 
virtual ~OComponentProxyAggregationHelper ()
 
void componentAggregateProxyFor (const css::uno::Reference< css::lang::XComponent > &_rxComponent, oslInterlockedCount &_rRefCount,::cppu::OWeakObject &_rDelegator)
 to be called from within your ctor More...
 
- Private Member Functions inherited from cppu::ImplHelper1< css::lang::XEventListener >
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE
 
 ~ImplHelper1 ()
 
- Private Attributes inherited from comphelper::OComponentProxyAggregationHelper
css::uno::Reference< css::lang::XComponent > m_xInner
 
::cppu::OBroadcastHelperm_rBHelper
 

Detailed Description

Helper for wrapping an XAccessibleContext by aggregating a proxy for it.

This class does not have own ref counting. In addition, it does not implement the XAccessibleContext interface, but provides all the methods from this interface which must be implemented using the inner context (such as getAccessibleChild*).

Children of the aggregated XAccessibleContext are wrapped, too.

AccessibleEvents fired by the inner context are multiplexed, especially, any references to children in such events are translated. This means that even in such events, no un-wrapped object will ever leave this class - if the aggregated context notifies a child event, the child passed to the event is wrapped

OAccessibleContextWrapper

Definition at line 143 of file accessiblewrapper.hxx.

Constructor & Destructor Documentation

comphelper::OAccessibleContextWrapperHelper::OAccessibleContextWrapperHelper ( const css::uno::Reference< css::uno::XComponentContext > &  _rxContext,
::cppu::OBroadcastHelper _rBHelper,
const css::uno::Reference< css::accessibility::XAccessibleContext > &  _rxInnerAccessibleContext,
const css::uno::Reference< css::accessibility::XAccessible > &  _rxOwningAccessible,
const css::uno::Reference< css::accessibility::XAccessible > &  _rxParentAccessible 
)
protected

ctor

Parameters
_rxContexta service factory
_rxInnerAccessibleContextthe object to wrap
_rxOwningAccessibleThe XAccessible which created this object. This is necessary because children of our wrapped context need to be wrapped, too, and if they're asked for a parent, they of course should return the proper parent
The object will be held with a hard reference
_rxParentAccessibleThe XAccessible to return in the getAccessibleParent call
comphelper::OAccessibleContextWrapperHelper::~OAccessibleContextWrapperHelper ( )
overrideprotectedvirtual
comphelper::OAccessibleContextWrapperHelper::OAccessibleContextWrapperHelper ( const OAccessibleContextWrapperHelper )
protecteddelete

Member Function Documentation

void comphelper::OAccessibleContextWrapperHelper::aggregateProxy ( oslInterlockedCount &  _rRefCount,
::cppu::OWeakObject _rDelegator 
)
protected

to be called from within your ctor - does the aggregation of a proxy for m_xInnerContext

Definition at line 358 of file accessiblewrapper.cxx.

References comphelper::OComponentProxyAggregationHelper::componentAggregateProxyFor(), comphelper::OComponentProxyAggregationHelper::m_xInner, and m_xInnerContext.

Reference< XAccessible > comphelper::OAccessibleContextWrapperHelper::baseGetAccessibleChild ( sal_Int32  i)
protected
Exceptions
css::lang::IndexOutOfBoundsException
css::uno::RuntimeException

Definition at line 400 of file accessiblewrapper.cxx.

References m_xChildMapper, and m_xInnerContext.

Referenced by comphelper::OAccessibleContextWrapper::getAccessibleChild().

sal_Int32 comphelper::OAccessibleContextWrapperHelper::baseGetAccessibleChildCount ( )
protected
Exceptions
css::uno::RuntimeException

Definition at line 394 of file accessiblewrapper.cxx.

Referenced by comphelper::OAccessibleContextWrapper::getAccessibleChildCount().

Reference< XAccessibleRelationSet > comphelper::OAccessibleContextWrapperHelper::baseGetAccessibleRelationSet ( )
protected
Exceptions
css::uno::RuntimeException

Definition at line 408 of file accessiblewrapper.cxx.

References m_xInnerContext.

Referenced by comphelper::OAccessibleContextWrapper::getAccessibleRelationSet().

void SAL_CALL comphelper::OAccessibleContextWrapperHelper::dispose ( void  )
overrideprotectedvirtual
void SAL_CALL comphelper::OAccessibleContextWrapperHelper::disposing ( const css::lang::EventObject &  Source)
overrideprotectedvirtual
void SAL_CALL comphelper::OAccessibleContextWrapperHelper::notifyEvent ( const css::accessibility::AccessibleEventObject &  aEvent)
overrideprotectedvirtual
virtual void comphelper::OAccessibleContextWrapperHelper::notifyTranslatedEvent ( const css::accessibility::AccessibleEventObject &  _rEvent)
protectedpure virtual

notify an accessible event which has been translated (if necessary)

Usually, you derive your class from both OAccessibleContextWrapperHelper and XAccessibleEventBroadcaster, and simply call all your XAccessibleEventListener with the given event.

The mutex of the BroadcastHelper passed to the instance's ctor is not locked when calling into this method

Exceptions
css::uno::RuntimeException

Implemented in comphelper::OAccessibleContextWrapper.

Referenced by notifyEvent().

OAccessibleContextWrapperHelper& comphelper::OAccessibleContextWrapperHelper::operator= ( const OAccessibleContextWrapperHelper )
protecteddelete
Any SAL_CALL comphelper::OAccessibleContextWrapperHelper::queryInterface ( const css::uno::Type &  _rType)
overrideprotected

Member Data Documentation

rtl::Reference<OWrappedAccessibleChildrenManager> comphelper::OAccessibleContextWrapperHelper::m_xChildMapper
protected

Definition at line 158 of file accessiblewrapper.hxx.

Referenced by baseGetAccessibleChild(), dispose(), and notifyEvent().

css::uno::Reference< css::accessibility::XAccessibleContext > comphelper::OAccessibleContextWrapperHelper::m_xInnerContext
protected
css::uno::Reference< css::accessibility::XAccessible > comphelper::OAccessibleContextWrapperHelper::m_xOwningAccessible
protected

the XAccessible which created this context

Definition at line 153 of file accessiblewrapper.hxx.

css::uno::Reference< css::accessibility::XAccessible > comphelper::OAccessibleContextWrapperHelper::m_xParentAccessible
protected

the XAccessible which is to be returned in getAccessibleParent

Definition at line 156 of file accessiblewrapper.hxx.

Referenced by comphelper::OAccessibleContextWrapper::getAccessibleParent().


The documentation for this class was generated from the following files: