LibreOffice Module comphelper (master) 1
accessiblewrapper.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
21#include <com/sun/star/accessibility/AccessibleEventId.hpp>
22#include <com/sun/star/accessibility/AccessibleStateType.hpp>
23
24using namespace ::comphelper;
25using namespace ::com::sun::star::accessibility;
26using namespace ::com::sun::star::uno;
27using namespace ::com::sun::star::lang;
28
29
30namespace comphelper
31{
32 OWrappedAccessibleChildrenManager::OWrappedAccessibleChildrenManager( const Reference< XComponentContext >& _rxContext )
33 :m_xContext( _rxContext )
34 ,m_bTransientChildren( true )
35 {
36 }
37
38
39 OWrappedAccessibleChildrenManager::~OWrappedAccessibleChildrenManager( )
40 {
41 }
42
43
44 void OWrappedAccessibleChildrenManager::setTransientChildren( bool _bSet )
45 {
46 m_bTransientChildren = _bSet;
47 }
48
49
50 void OWrappedAccessibleChildrenManager::setOwningAccessible( const Reference< XAccessible >& _rxAcc )
51 {
52 OSL_ENSURE( !m_aOwningAccessible.get().is(), "OWrappedAccessibleChildrenManager::setOwningAccessible: to be called only once!" );
53 m_aOwningAccessible = WeakReference< XAccessible >( _rxAcc );
54 }
55
56
57 void OWrappedAccessibleChildrenManager::removeFromCache( const Reference< XAccessible >& _rxKey )
58 {
59 AccessibleMap::iterator aRemovedPos = m_aChildrenMap.find( _rxKey );
60 if ( m_aChildrenMap.end() != aRemovedPos )
61 { // it was cached
62 // remove ourself as event listener
63 Reference< XComponent > xComp( aRemovedPos->first, UNO_QUERY );
64 if( xComp.is() )
65 xComp->removeEventListener( this );
66 // and remove the entry from the map
67 m_aChildrenMap.erase( aRemovedPos );
68 }
69 }
70
71
72 void OWrappedAccessibleChildrenManager::invalidateAll( )
73 {
74 // remove as event listener from the map elements
75 for( const auto& rChild : m_aChildrenMap )
76 {
77 Reference< XComponent > xComp( rChild.first, UNO_QUERY );
78 if( xComp.is() )
79 xComp->removeEventListener( this );
80 }
81 // clear the map
82 AccessibleMap().swap(m_aChildrenMap);
83 }
84
85
86 Reference< XAccessible > OWrappedAccessibleChildrenManager::getAccessibleWrapperFor(
87 const Reference< XAccessible >& _rxKey )
88 {
90
91 if( !_rxKey.is() )
92 {
93 // fprintf( stderr, "It was this path that was crashing stuff\n" );
94 return xValue;
95 }
96
97 // do we have this child in the cache?
98 AccessibleMap::const_iterator aPos = m_aChildrenMap.find( _rxKey );
99 if ( m_aChildrenMap.end() != aPos )
100 {
101 xValue = aPos->second;
102 }
103 else
104 { // not found in the cache, and allowed to create
105 // -> new wrapper
106 xValue = new OAccessibleWrapper( m_xContext, _rxKey, m_aOwningAccessible );
107
108 // see if we do cache children
109 if ( !m_bTransientChildren )
110 {
111 if (!m_aChildrenMap.emplace( _rxKey, xValue ).second)
112 {
113 OSL_FAIL(
114 "OWrappedAccessibleChildrenManager::"
115 "getAccessibleWrapperFor: element was already"
116 " inserted!" );
117 }
118
119 // listen for disposals of inner children - this may happen when the inner context
120 // is the owner for the inner children (it will dispose these children, and of course
121 // not our wrapper for these children)
122 Reference< XComponent > xComp( _rxKey, UNO_QUERY );
123 if ( xComp.is() )
124 xComp->addEventListener( this );
125 }
126 }
127
128 return xValue;
129 }
130
131
132 void OWrappedAccessibleChildrenManager::dispose()
133 {
134 // dispose our children
135 for( const auto& rChild : m_aChildrenMap )
136 {
137 Reference< XComponent > xComp( rChild.first, UNO_QUERY );
138 if( xComp.is() )
139 xComp->removeEventListener( this );
140
141 Reference< XComponent > xContextComponent;
142 if( rChild.second.is() )
143 xContextComponent.set( rChild.second->getContextNoCreate(),
144 ::css::uno::UNO_QUERY );
145 if( xContextComponent.is() )
146 xContextComponent->dispose();
147 }
148
149 // clear our children
150 AccessibleMap().swap(m_aChildrenMap);
151 }
152
153
154 void OWrappedAccessibleChildrenManager::implTranslateChildEventValue( const Any& _rInValue, Any& _rOutValue )
155 {
156 _rOutValue.clear();
157 Reference< XAccessible > xChild;
158 if ( _rInValue >>= xChild )
159 _rOutValue <<= getAccessibleWrapperFor( xChild );
160 }
161
162
163 void OWrappedAccessibleChildrenManager::translateAccessibleEvent( const AccessibleEventObject& _rEvent, AccessibleEventObject& _rTranslatedEvent )
164 {
165 // just in case we can't translate some of the values:
166 _rTranslatedEvent.NewValue = _rEvent.NewValue;
167 _rTranslatedEvent.OldValue = _rEvent.OldValue;
168
169 switch ( _rEvent.EventId )
170 {
171 case AccessibleEventId::CHILD:
172 case AccessibleEventId::ACTIVE_DESCENDANT_CHANGED:
173 case AccessibleEventId::CONTROLLED_BY_RELATION_CHANGED:
174 case AccessibleEventId::CONTROLLER_FOR_RELATION_CHANGED:
175 case AccessibleEventId::LABEL_FOR_RELATION_CHANGED:
176 case AccessibleEventId::LABELED_BY_RELATION_CHANGED:
177 case AccessibleEventId::CONTENT_FLOWS_FROM_RELATION_CHANGED:
178 case AccessibleEventId::CONTENT_FLOWS_TO_RELATION_CHANGED:
179 // these are events where both the old and the new value contain child references
180 implTranslateChildEventValue( _rEvent.OldValue, _rTranslatedEvent.OldValue );
181 implTranslateChildEventValue( _rEvent.NewValue, _rTranslatedEvent.NewValue );
182 break;
183
184 case AccessibleEventId::NAME_CHANGED:
185 case AccessibleEventId::DESCRIPTION_CHANGED:
186 case AccessibleEventId::ACTION_CHANGED:
187 case AccessibleEventId::STATE_CHANGED:
188 case AccessibleEventId::BOUNDRECT_CHANGED:
189 case AccessibleEventId::INVALIDATE_ALL_CHILDREN:
190 case AccessibleEventId::SELECTION_CHANGED:
191 case AccessibleEventId::VISIBLE_DATA_CHANGED:
192 case AccessibleEventId::VALUE_CHANGED:
193 case AccessibleEventId::MEMBER_OF_RELATION_CHANGED:
194 case AccessibleEventId::CARET_CHANGED:
195 case AccessibleEventId::TEXT_CHANGED:
196 case AccessibleEventId::HYPERTEXT_CHANGED:
197 case AccessibleEventId::TABLE_CAPTION_CHANGED:
198 case AccessibleEventId::TABLE_COLUMN_DESCRIPTION_CHANGED:
199 case AccessibleEventId::TABLE_COLUMN_HEADER_CHANGED:
200 case AccessibleEventId::TABLE_MODEL_CHANGED:
201 case AccessibleEventId::TABLE_ROW_DESCRIPTION_CHANGED:
202 case AccessibleEventId::TABLE_ROW_HEADER_CHANGED:
203 case AccessibleEventId::TABLE_SUMMARY_CHANGED:
204 // these Ids are also missed: SUB_WINDOW_OF_RELATION_CHANGED & TEXT_ATTRIBUTE_CHANGED
205 case AccessibleEventId::TEXT_SELECTION_CHANGED:
206 // nothing to translate
207 break;
208
209 default:
210 OSL_FAIL( "OWrappedAccessibleChildrenManager::translateAccessibleEvent: unknown (or unexpected) event id!" );
211 break;
212 }
213 }
214
215
216 void OWrappedAccessibleChildrenManager::handleChildNotification( const AccessibleEventObject& _rEvent )
217 {
218 if ( AccessibleEventId::INVALIDATE_ALL_CHILDREN == _rEvent.EventId )
219 { // clear our child map
220 invalidateAll( );
221 }
222 else if ( AccessibleEventId::CHILD == _rEvent.EventId )
223 {
224 // check if the removed or replaced element is cached
225 Reference< XAccessible > xRemoved;
226 if ( _rEvent.OldValue >>= xRemoved )
227 removeFromCache( xRemoved );
228 }
229 }
230
231
232 void SAL_CALL OWrappedAccessibleChildrenManager::disposing( const EventObject& _rSource )
233 {
234 // this should come from one of the inner XAccessible's of our children
235 Reference< XAccessible > xSource( _rSource.Source, UNO_QUERY );
236 AccessibleMap::iterator aDisposedPos = m_aChildrenMap.find( xSource );
237#if OSL_DEBUG_LEVEL > 0
238 if ( m_aChildrenMap.end() == aDisposedPos )
239 {
240 OSL_FAIL( "OWrappedAccessibleChildrenManager::disposing: where did this come from?" );
241 // helper for diagnostics
242 Reference< XAccessible > xOwningAccessible( m_aOwningAccessible );
243 Reference< XAccessibleContext > xContext;
244 try
245 {
246 if ( xOwningAccessible.is() )
247 xContext = xOwningAccessible->getAccessibleContext();
248 if ( xContext.is() )
249 {
250 //TODO: do something
251 //OUString sName = xContext->getAccessibleName();
252 //OUString sDescription = xContext->getAccessibleDescription();
253 //sal_Int32 nPlaceYourBreakpointHere = 0;
254 }
255 }
256 catch( const Exception& /*e*/ )
257 {
258 // silent this, it's only diagnostics which failed
259 }
260 }
261#endif
262 if ( m_aChildrenMap.end() != aDisposedPos )
263 {
264 m_aChildrenMap.erase( aDisposedPos );
265 }
266 }
267
268 OAccessibleWrapper::OAccessibleWrapper( const Reference< XComponentContext >& _rxContext,
269 const Reference< XAccessible >& _rxInnerAccessible, const Reference< XAccessible >& _rxParentAccessible )
270 :OAccessibleWrapper_Base( )
271 ,OComponentProxyAggregation( _rxContext, Reference< XComponent >( _rxInnerAccessible, UNO_QUERY ) )
272 ,m_xParentAccessible( _rxParentAccessible )
273 ,m_xInnerAccessible( _rxInnerAccessible )
274 {
275 }
276
277
279 {
280 if ( !m_rBHelper.bDisposed )
281 {
282 acquire(); // to prevent duplicate dtor calls
283 dispose();
284 }
285 }
286
287
290
291
293 {
294 // #111089# instead of the inner XAccessible the proxy XAccessible must be returned
296 if ( !aReturn.hasValue() )
298
299 return aReturn;
300 }
301
302
303 Reference< XAccessibleContext > OAccessibleWrapper::getContextNoCreate( ) const
304 {
305 return m_aContext;
306 }
307
308
309 rtl::Reference<OAccessibleContextWrapper> OAccessibleWrapper::createAccessibleContext( const Reference< XAccessibleContext >& _rxInnerContext )
310 {
311 return new OAccessibleContextWrapper( getComponentContext(), _rxInnerContext, this, m_xParentAccessible );
312 }
313
314
315 Reference< XAccessibleContext > SAL_CALL OAccessibleWrapper::getAccessibleContext( )
316 {
317 // see if the context is still alive (we cache it)
318 Reference< XAccessibleContext > xContext = m_aContext;
319 if ( !xContext.is() )
320 {
321 // create a new context
322 Reference< XAccessibleContext > xInnerContext = m_xInnerAccessible->getAccessibleContext( );
323 if ( xInnerContext.is() )
324 {
325 xContext = createAccessibleContext( xInnerContext );
326 // cache it
327 m_aContext = WeakReference< XAccessibleContext >( xContext );
328 }
329 }
330
331 return xContext;
332 }
333
335 const Reference< XComponentContext >& _rxContext,
336 ::cppu::OBroadcastHelper& _rBHelper,
337 const Reference< XAccessibleContext >& _rxInnerAccessibleContext,
338 const Reference< XAccessible >& _rxOwningAccessible,
339 const Reference< XAccessible >& _rxParentAccessible )
340 :OComponentProxyAggregationHelper( _rxContext, _rBHelper )
341 ,m_xInnerContext( _rxInnerAccessibleContext )
342 ,m_xOwningAccessible( _rxOwningAccessible )
343 ,m_xParentAccessible( _rxParentAccessible )
344 // initialize the mapper for our children
345 ,m_xChildMapper( new OWrappedAccessibleChildrenManager( getComponentContext() ) )
346 {
347 // determine if we're allowed to cache children
348 sal_Int64 aStates = m_xInnerContext->getAccessibleStateSet( );
349 m_xChildMapper->setTransientChildren( aStates & AccessibleStateType::MANAGES_DESCENDANTS );
350
351 m_xChildMapper->setOwningAccessible( m_xOwningAccessible );
352 }
353
354
355 void OAccessibleContextWrapperHelper::aggregateProxy( oslInterlockedCount& _rRefCount, ::cppu::OWeakObject& _rDelegator )
356 {
357 Reference< XComponent > xInnerComponent( m_xInnerContext, UNO_QUERY );
358 OSL_ENSURE( xInnerComponent.is(), "OComponentProxyAggregation::aggregateProxy: accessible is no XComponent!" );
359 if ( xInnerComponent.is() )
360 componentAggregateProxyFor( xInnerComponent, _rRefCount, _rDelegator );
361
362 // add as event listener to the inner context, because we want to multiplex the AccessibleEvents
363 osl_atomic_increment( &_rRefCount );
364 {
365 Reference< XAccessibleEventBroadcaster > xBroadcaster( m_xInner, UNO_QUERY );
366 if ( xBroadcaster.is() )
367 xBroadcaster->addAccessibleEventListener( this );
368 }
369 osl_atomic_decrement( &_rRefCount );
370 }
371
372
374 {
375 OSL_ENSURE( m_rBHelper.bDisposed, "OAccessibleContextWrapperHelper::~OAccessibleContextWrapperHelper: you should ensure (in your dtor) that the object is disposed!" );
376 }
377
378
380 {
382 if ( !aReturn.hasValue() )
384 return aReturn;
385 }
386
387
389
390
391 sal_Int64 OAccessibleContextWrapperHelper::baseGetAccessibleChildCount( )
392 {
393 return m_xInnerContext->getAccessibleChildCount();
394 }
395
396
397 Reference< XAccessible > OAccessibleContextWrapperHelper::baseGetAccessibleChild( sal_Int64 i )
398 {
399 // get the child of the wrapped component
400 Reference< XAccessible > xInnerChild = m_xInnerContext->getAccessibleChild( i );
401 return m_xChildMapper->getAccessibleWrapperFor( xInnerChild );
402 }
403
404
406 {
407 return m_xInnerContext->getAccessibleRelationSet();
408 // TODO: if this relation set would contain relations to siblings, we would normally need
409 // to wrap them, too...
410 }
411
412
413 void SAL_CALL OAccessibleContextWrapperHelper::notifyEvent( const AccessibleEventObject& _rEvent )
414 {
415#if OSL_DEBUG_LEVEL > 0
416 if ( AccessibleEventId::STATE_CHANGED == _rEvent.EventId )
417 {
418 bool bChildTransienceChanged = false;
419 sal_Int64 nChangeState = 0;
420 if ( _rEvent.OldValue >>= nChangeState )
421 bChildTransienceChanged = bChildTransienceChanged || AccessibleStateType::MANAGES_DESCENDANTS == nChangeState;
422 if ( _rEvent.NewValue >>= nChangeState )
423 bChildTransienceChanged = bChildTransienceChanged || AccessibleStateType::MANAGES_DESCENDANTS == nChangeState;
424 OSL_ENSURE( !bChildTransienceChanged, "OAccessibleContextWrapperHelper::notifyEvent: MANAGES_DESCENDANTS is not expected to change during runtime!" );
425 // if this asserts, then we would need to update our m_bTransientChildren flag here,
426 // as well as (potentially) our child cache
427 }
428#endif
429 AccessibleEventObject aTranslatedEvent( _rEvent );
430
431 {
432 ::osl::MutexGuard aGuard( m_rBHelper.rMutex );
433
434 // translate the event
435 queryInterface( cppu::UnoType<XInterface>::get() ) >>= aTranslatedEvent.Source;
436 m_xChildMapper->translateAccessibleEvent( _rEvent, aTranslatedEvent );
437
438 // see if any of these notifications affect our child manager
439 m_xChildMapper->handleChildNotification( _rEvent );
440
441 if ( aTranslatedEvent.NewValue == m_xInner )
442 aTranslatedEvent.NewValue <<= aTranslatedEvent.Source;
443 if ( aTranslatedEvent.OldValue == m_xInner )
444 aTranslatedEvent.OldValue <<= aTranslatedEvent.Source;
445 }
446
447 notifyTranslatedEvent( aTranslatedEvent );
448 }
449
450
452 {
453 ::osl::MutexGuard aGuard( m_rBHelper.rMutex );
454
455 // stop multiplexing events
456 Reference< XAccessibleEventBroadcaster > xBroadcaster( m_xInner, UNO_QUERY );
457 OSL_ENSURE( xBroadcaster.is(), "OAccessibleContextWrapperHelper::disposing(): inner context is no broadcaster!" );
458 if ( xBroadcaster.is() )
459 xBroadcaster->removeAccessibleEventListener( this );
460
461 // dispose the child cache/map
462 m_xChildMapper->dispose();
463
464 // let the base class dispose the inner component
466 }
467
468
469 void SAL_CALL OAccessibleContextWrapperHelper::disposing( const EventObject& _rEvent )
470 {
471 // simply disambiguate this
473 }
474
476
477
479
480
481 OAccessibleContextWrapper::OAccessibleContextWrapper( const Reference< XComponentContext >& _rxContext,
482 const Reference< XAccessibleContext >& _rxInnerAccessibleContext, const Reference< XAccessible >& _rxOwningAccessible,
483 const Reference< XAccessible >& _rxParentAccessible )
485 ,OAccessibleContextWrapperHelper( _rxContext, rBHelper, _rxInnerAccessibleContext, _rxOwningAccessible, _rxParentAccessible )
486 ,m_nNotifierClient( 0 )
487 {
488 aggregateProxy( m_refCount, *this );
489 }
490
491
493 {
494 }
495
496
498 {
500 }
501
502
503 Reference< XAccessible > SAL_CALL OAccessibleContextWrapper::getAccessibleChild( sal_Int64 i )
504 {
505 return baseGetAccessibleChild( i );
506 }
507
508
509 Reference< XAccessible > SAL_CALL OAccessibleContextWrapper::getAccessibleParent( )
510 {
511 return m_xParentAccessible;
512 }
513
514
516 {
517 return m_xInnerContext->getAccessibleIndexInParent();
518 }
519
520
522 {
523 return m_xInnerContext->getAccessibleRole();
524 }
525
526
528 {
529 return m_xInnerContext->getAccessibleDescription();
530 }
531
532
534 {
535 return m_xInnerContext->getAccessibleName();
536 }
537
538
539 Reference< XAccessibleRelationSet > SAL_CALL OAccessibleContextWrapper::getAccessibleRelationSet( )
540 {
542 }
543
544
546 {
547 return m_xInnerContext->getAccessibleStateSet();
548 }
549
550
552 {
553 return m_xInnerContext->getLocale();
554 }
555
556
557 void OAccessibleContextWrapper::notifyTranslatedEvent( const AccessibleEventObject& _rEvent )
558 {
559 if ( m_nNotifierClient )
561 }
562
563
564 void SAL_CALL OAccessibleContextWrapper::addAccessibleEventListener( const Reference< XAccessibleEventListener >& _rxListener )
565 {
566 ::osl::MutexGuard aGuard( m_aMutex );
567 if ( !m_nNotifierClient )
570 }
571
572
573 void SAL_CALL OAccessibleContextWrapper::removeAccessibleEventListener( const Reference< XAccessibleEventListener >& _rxListener )
574 {
575 ::osl::MutexGuard aGuard( m_aMutex );
576 if ( m_nNotifierClient )
577 {
579 {
583 }
584 }
585 }
586
587
589 {
591
592 // --- <mutex lock> -----------------------------------------
593 {
594 ::osl::MutexGuard aGuard( m_aMutex );
595
596 // prepare notifying our AccessibleListeners
597 if ( m_nNotifierClient )
598 {
599 nClientId = m_nNotifierClient;
601 }
602 }
603 // --- </mutex lock> -----------------------------------------
604
605 // let the base class do
607
608 // notify the disposal
609 if ( nClientId )
611 }
612} // namespace accessibility
613
614
615/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XComponentContext > m_xContext
static sal_Int32 addEventListener(const TClientId _nClient, const css::uno::Reference< css::accessibility::XAccessibleEventListener > &_rxListener)
registers a listener for the given client
static void addEvent(const TClientId _nClient, const css::accessibility::AccessibleEventObject &_rEvent)
adds an event, which is to be broadcasted, to the queue
static sal_Int32 removeEventListener(const TClientId _nClient, const css::uno::Reference< css::accessibility::XAccessibleEventListener > &_rxListener)
revokes a listener for the given client
static TClientId registerClient()
registers a client of this class, means a broadcaster of AccessibleEvents
static void revokeClient(const TClientId _nClient)
revokes a broadcaster of AccessibleEvents
static void revokeClientNotifyDisposing(const TClientId _nClient, const css::uno::Reference< css::uno::XInterface > &_rxEventSource)
revokes a client, with additionally notifying a disposing event to all listeners registered for this ...
Helper for wrapping an XAccessibleContext by aggregating a proxy for it.
css::uno::Reference< css::accessibility::XAccessible > m_xParentAccessible
the XAccessible which is to be returned in getAccessibleParent
css::uno::Reference< css::accessibility::XAccessible > baseGetAccessibleChild(sal_Int64 i)
rtl::Reference< OWrappedAccessibleChildrenManager > m_xChildMapper
virtual void SAL_CALL notifyEvent(const css::accessibility::AccessibleEventObject &aEvent) override
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
virtual void notifyTranslatedEvent(const css::accessibility::AccessibleEventObject &_rEvent)=0
notify an accessible event which has been translated (if necessary)
css::uno::Reference< css::accessibility::XAccessibleContext > m_xInnerContext
the context we're wrapping (properly typed, in opposite to OComponentProxyAggregationHelper::m_xInner...
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
void aggregateProxy(oslInterlockedCount &_rRefCount, ::cppu::OWeakObject &_rDelegator)
to be called from within your ctor - does the aggregation of a proxy for m_xInnerContext
virtual void SAL_CALL dispose() override
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &_rType) override
css::uno::Reference< css::accessibility::XAccessibleRelationSet > baseGetAccessibleRelationSet()
virtual void SAL_CALL removeAccessibleEventListener(const css::uno::Reference< css::accessibility::XAccessibleEventListener > &xListener) override
virtual void SAL_CALL disposing() override
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override
virtual css::lang::Locale SAL_CALL getLocale() override
virtual void SAL_CALL addAccessibleEventListener(const css::uno::Reference< css::accessibility::XAccessibleEventListener > &xListener) override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 i) override
virtual void notifyTranslatedEvent(const css::accessibility::AccessibleEventObject &_rEvent) override
notify an accessible event which has been translated (if necessary)
OAccessibleContextWrapper(const css::uno::Reference< css::uno::XComponentContext > &_rxContext, 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
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
virtual OUString SAL_CALL getAccessibleName() override
virtual sal_Int16 SAL_CALL getAccessibleRole() override
::comphelper::AccessibleEventNotifier::TClientId m_nNotifierClient
virtual OUString SAL_CALL getAccessibleDescription() override
a class which aggregates a proxy for an XAccessible, and wrapping the context returned by this XAcces...
css::uno::Reference< css::accessibility::XAccessibleContext > getContextNoCreate() const
css::uno::Reference< css::accessibility::XAccessible > m_xParentAccessible
css::uno::WeakReference< css::accessibility::XAccessibleContext > m_aContext
virtual rtl::Reference< OAccessibleContextWrapper > createAccessibleContext(const css::uno::Reference< css::accessibility::XAccessibleContext > &_rxInnerContext)
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
css::uno::Reference< css::accessibility::XAccessible > m_xInnerAccessible
a helper class for aggregating a proxy to an XComponent
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
void componentAggregateProxyFor(const css::uno::Reference< css::lang::XComponent > &_rxComponent, oslInterlockedCount &_rRefCount, ::cppu::OWeakObject &_rDelegator)
to be called from within your ctor
css::uno::Reference< css::lang::XComponent > m_xInner
const css::uno::Reference< css::uno::XComponentContext > & getComponentContext() const
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &_rType) override
virtual void SAL_CALL dispose() override
mutable::osl::Mutex m_aMutex
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
::osl::Mutex m_aMutex
::std::map< css::uno::Reference< css::accessibility::XAccessible >, rtl::Reference< comphelper::OAccessibleWrapper > > AccessibleMap
Reference< XComponentContext > getComponentContext(Reference< XMultiServiceFactory > const &factory)
::cppu::WeakComponentImplHelper< css::accessibility::XAccessibleEventBroadcaster, css::accessibility::XAccessibleContext > OAccessibleContextWrapper_CBase
Type
Reference
int i
sal_Int16 nId
#define IMPLEMENT_FORWARD_REFCOUNT(classname, refcountbase)
Definition: uno3.hxx:95
#define IMPLEMENT_FORWARD_XTYPEPROVIDER2(classname, baseclass1, baseclass2)
Definition: uno3.hxx:136
#define IMPLEMENT_FORWARD_XINTERFACE2(classname, refcountbase, baseclass2)
Definition: uno3.hxx:99