1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 
25 #ifndef _SVXRECTACCESSIBLECONTEXT_HXX
26 #define _SVXRECTACCESSIBLECONTEXT_HXX
27 
28 #include <com/sun/star/accessibility/XAccessible.hpp>
29 #include <com/sun/star/accessibility/XAccessibleComponent.hpp>
30 #include <com/sun/star/accessibility/XAccessibleContext.hpp>
31 #include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
32 #include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp>
33 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
34 #include <com/sun/star/accessibility/XAccessibleValue.hpp>
35 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
36 #include <com/sun/star/uno/Reference.hxx>
37 #include <cppuhelper/weak.hxx>
38 #include <com/sun/star/lang/XServiceInfo.hpp>
39 #include <com/sun/star/lang/XTypeProvider.hpp>
40 #include <com/sun/star/lang/XServiceName.hpp>
41 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
42 #include <com/sun/star/lang/DisposedException.hpp>
43 #include <vos/mutex.hxx>
44 #include <cppuhelper/interfacecontainer.h>
45 #include <cppuhelper/compbase6.hxx>
46 //IAccessibility2 Implementation 2009-----
47 #ifndef _CPPUHELPER_COMPBASE7_HXX_
48 #include <cppuhelper/compbase7.hxx>
49 #endif
50 #ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_ACTION_HPP_
51 #include <com/sun/star/accessibility/XAccessibleAction.hpp>
52 #endif
53 //-----IAccessibility2 Implementation 2009
54 #include <comphelper/broadcasthelper.hxx>
55 #include <cppuhelper/implbase6.hxx>
56 #include <comphelper/servicehelper.hxx>
57 #include <svx/rectenum.hxx>
58 
59 namespace com { namespace sun { namespace star { namespace awt {
60 	struct Point;
61 	struct Rectangle;
62 	struct Size;
63 	class XFocusListener;
64 } } } }
65 
66 class Rectangle;
67 class SvxRectCtl;
68 class SvxRectCtlChildAccessibleContext;
69 class Window;
70 
71 
72 typedef ::cppu::WeakAggComponentImplHelper6<
73 			::com::sun::star::accessibility::XAccessible,
74 			::com::sun::star::accessibility::XAccessibleComponent,
75 			::com::sun::star::accessibility::XAccessibleContext,
76 			::com::sun::star::accessibility::XAccessibleEventBroadcaster,
77 			::com::sun::star::accessibility::XAccessibleSelection,
78 			::com::sun::star::lang::XServiceInfo >
79 			SvxRectCtlAccessibleContext_Base;
80 
81 class SvxRectCtlAccessibleContext : public ::comphelper::OBaseMutex, public SvxRectCtlAccessibleContext_Base
82 {
83 public:
84 	//=====  internal  ========================================================
85 	SvxRectCtlAccessibleContext(
86         const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxParent,
87 		SvxRectCtl&				rRepresentation,
88 		const ::rtl::OUString*	pName = NULL,
89 		const ::rtl::OUString*	pDescription = NULL );
90 protected:
91 	virtual ~SvxRectCtlAccessibleContext();
92 public:
93 	//=====  XAccessible  =====================================================
94 
95 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL
96 		getAccessibleContext( void ) throw( ::com::sun::star::uno::RuntimeException );
97 
98 	//=====  XAccessibleComponent  ============================================
99 
100 	virtual sal_Bool SAL_CALL
101 		containsPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
102 
103 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
104 		getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
105 
106 	virtual ::com::sun::star::awt::Rectangle SAL_CALL
107 		getBounds() throw( ::com::sun::star::uno::RuntimeException );
108 
109 	virtual ::com::sun::star::awt::Point SAL_CALL
110 		getLocation() throw( ::com::sun::star::uno::RuntimeException );
111 
112 	virtual ::com::sun::star::awt::Point SAL_CALL
113 		getLocationOnScreen() throw( ::com::sun::star::uno::RuntimeException );
114 
115 	virtual ::com::sun::star::awt::Size SAL_CALL
116 		getSize() throw( ::com::sun::star::uno::RuntimeException );
117 
118 	virtual sal_Bool SAL_CALL
119 		isShowing() throw( ::com::sun::star::uno::RuntimeException );
120 
121 	virtual sal_Bool SAL_CALL
122 		isVisible() throw( ::com::sun::star::uno::RuntimeException );
123 
124 	virtual sal_Bool SAL_CALL
125 		isFocusTraversable() throw( ::com::sun::star::uno::RuntimeException );
126 
127 	virtual void SAL_CALL
128 		addFocusListener(
129 			const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
130 			throw( ::com::sun::star::uno::RuntimeException );
131 
132 	virtual void SAL_CALL
133 		removeFocusListener(
134 			const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
135 			throw( ::com::sun::star::uno::RuntimeException );
136 
137 	virtual void SAL_CALL
138 		grabFocus() throw( ::com::sun::star::uno::RuntimeException );
139 
140 	virtual ::com::sun::star::uno::Any SAL_CALL
141 		getAccessibleKeyBinding() throw( ::com::sun::star::uno::RuntimeException );
142     virtual sal_Int32 SAL_CALL
143         getForeground(  ) throw (::com::sun::star::uno::RuntimeException);
144     virtual sal_Int32 SAL_CALL
145         getBackground(  ) throw (::com::sun::star::uno::RuntimeException);
146 
147 	//=====  XAccessibleContext  ==============================================
148 
149 	virtual sal_Int32 SAL_CALL
150 		getAccessibleChildCount( void ) throw( ::com::sun::star::uno::RuntimeException );
151 
152 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
153 		getAccessibleChild( sal_Int32 nIndex )
154 			throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException );
155 
156 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
157 		getAccessibleParent( void ) throw( ::com::sun::star::uno::RuntimeException );
158 
159 	virtual	sal_Int32 SAL_CALL
160 		getAccessibleIndexInParent( void ) throw( ::com::sun::star::uno::RuntimeException );
161 
162 	virtual sal_Int16 SAL_CALL
163 		getAccessibleRole( void ) throw( ::com::sun::star::uno::RuntimeException );
164 
165 	virtual ::rtl::OUString SAL_CALL
166 		getAccessibleDescription( void ) throw (::com::sun::star::uno::RuntimeException);
167 
168 	virtual ::rtl::OUString SAL_CALL
169 		getAccessibleName( void ) throw (::com::sun::star::uno::RuntimeException);
170 
171 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL
172 		getAccessibleRelationSet( void ) throw( ::com::sun::star::uno::RuntimeException );
173 
174 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
175 		getAccessibleStateSet( void ) throw( ::com::sun::star::uno::RuntimeException );
176 
177 	virtual ::com::sun::star::lang::Locale SAL_CALL
178 		getLocale( void )
179 			throw(	::com::sun::star::uno::RuntimeException,
180 					::com::sun::star::accessibility::IllegalAccessibleComponentStateException );
181 
182     //=====  XComponent  =====================================================
183 
184     using ::cppu::WeakAggComponentImplHelperBase::addEventListener;
185     using ::cppu::WeakAggComponentImplHelperBase::removeEventListener;
186 
187     //=====  XAccessibleEventBroadcaster  =====================================
188 
189 	virtual void SAL_CALL
190 		addEventListener(
191 			const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
192 			throw( com::sun::star::uno::RuntimeException );
193 
194 	virtual void SAL_CALL
195 		removeEventListener(
196 			const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
197 			throw( com::sun::star::uno::RuntimeException );
198 
199 	//=====  XServiceInfo  ====================================================
200 
201 	virtual ::rtl::OUString SAL_CALL
202 		getImplementationName( void ) throw( ::com::sun::star::uno::RuntimeException );
203 
204 	virtual sal_Bool SAL_CALL
205 		supportsService( const ::rtl::OUString& sServiceName ) throw( ::com::sun::star::uno::RuntimeException );
206 
207 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
208 		getSupportedServiceNames( void ) throw( ::com::sun::star::uno::RuntimeException );
209 
210 	//=====  XTypeProvider  ===================================================
211 
212 	virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
213 		getImplementationId( void ) throw( ::com::sun::star::uno::RuntimeException );
214 
215 	//=====  XAccessibleSelection =============================================
216 
217 	virtual void SAL_CALL
218 		selectAccessibleChild( sal_Int32 nChildIndex )
219 			throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
220 
221 	virtual sal_Bool SAL_CALL
222 		isAccessibleChildSelected( sal_Int32 nChildIndex )
223 			throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
224 
225 	virtual void SAL_CALL
226 		clearAccessibleSelection() throw( ::com::sun::star::uno::RuntimeException );
227 
228 	virtual void SAL_CALL
229 		selectAllAccessibleChildren() throw( ::com::sun::star::uno::RuntimeException );
230 
231 	virtual sal_Int32 SAL_CALL
232 		getSelectedAccessibleChildCount() throw( ::com::sun::star::uno::RuntimeException );
233 
234 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
235 		getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
236 			throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
237 
238 	virtual void SAL_CALL
239 		deselectAccessibleChild( sal_Int32 nSelectedChildIndex )
240 			throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
241 
242 
243 protected:
244 	//=====  internals ========================================================
245 
246 	void checkChildIndex( long nIndexOfChild ) throw( ::com::sun::star::lang::IndexOutOfBoundsException );
247 
248 	void checkChildIndexOnSelection( long nIndexOfChild ) throw( ::com::sun::star::lang::IndexOutOfBoundsException );
249 
250     /** Selects a new child by index.
251 
252         <p>If the child was not selected before, the state of the child will
253         be updated. If the index is invalid, the index will internaly set to NOCHILDSELECTED</p>
254 
255         @param nIndexOfChild
256             Index of the new child which should be selected.
257     */
258 	// IAccessibility2 implementation 2009. ------
259 	//void selectChild( long nIndexOfChild );
260 	void selectChild( long nIndexOfChild, sal_Bool bFireFocus = sal_True);
261 	// ------ IAccessibility2 implementation 2009.
262 
263 public:
264     /** Selects a new child by point.
265 
266         <p>If the child was not selected before, the state of the child will
267         be updated. If the point is not invalid, the index will internaly set to NOCHILDSELECTED</p>
268 
269         @param eButton
270             Button which belongs to the child which should be selected.
271     */
272 	//void selectChild( RECT_POINT ePoint );
273 	// IAccessibility2 implementation 2009. ------
274 	void selectChild( RECT_POINT ePoint, sal_Bool bFireFocus = sal_True );
275 	void FireChildFocus( RECT_POINT eButton );
276 	//Solution: Add the event handling method
277 	void FireAccessibleEvent (short nEventId, const ::com::sun::star::uno::Any& rOld, const ::com::sun::star::uno::Any& rNew);
278 	// ------ IAccessibility2 implementation 2009.
279 	/// Sets the name
280 	void setName( const ::rtl::OUString& rName );
281 
282 	/// Sets the description
283 	void setDescription( const ::rtl::OUString& rDescr );
284 private:
285 	static ::com::sun::star::uno::Sequence< sal_Int8 > getUniqueId( void );
286 protected:
287 
288     ///	@Return the object's current bounding box relative to the desktop.
289 	virtual Rectangle GetBoundingBoxOnScreen( void ) throw( ::com::sun::star::uno::RuntimeException );
290 
291 	///	@Return the object's current bounding box relative to the parent object.
292 	virtual Rectangle GetBoundingBox( void ) throw( ::com::sun::star::uno::RuntimeException );
293 
294 	/// Calls all Listener to tell they the change.
295 	void CommitChange( const com::sun::star::accessibility::AccessibleEventObject& rEvent );
296 
297 	virtual void SAL_CALL disposing();
298 
299 	/// @returns true if it's disposed or in disposing
300 	inline sal_Bool IsAlive( void ) const;
301 
302 	/// @returns true if it's not disposed and no in disposing
303 	inline sal_Bool IsNotAlive( void ) const;
304 
305 	/// throws the exception DisposedException if it's not alive
306 	void ThrowExceptionIfNotAlive( void ) throw( ::com::sun::star::lang::DisposedException );
307 
308 private:
309     /**	Description of this object.  This is not a constant because it can
310     	be set from the outside.
311     */
312     ::rtl::OUString						msDescription;
313 
314     /**	Name of this object.
315     */
316     ::rtl::OUString						msName;
317 
318     ///	Reference to the parent object.
319     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
320 										mxParent;
321 
322 	/// pointer to internal representation
323 	SvxRectCtl*							mpRepr;
324 
325 	/// array for all possible childs
326 	SvxRectCtlChildAccessibleContext**	mpChilds;
327 
328     /// client id in the AccessibleEventNotifier queue
329     sal_uInt32 mnClientId;
330 
331     /// actual selected child
332 	long								mnSelectedChild;
333 
334 	/// mode of control (true -> 8 points, false -> 9 points)
335 	sal_Bool							mbAngleMode;
336 };
337 
338 inline sal_Bool SvxRectCtlAccessibleContext::IsAlive( void ) const
339 {
340 	return !rBHelper.bDisposed && !rBHelper.bInDispose;
341 }
342 
343 inline sal_Bool SvxRectCtlAccessibleContext::IsNotAlive( void ) const
344 {
345 	return rBHelper.bDisposed || rBHelper.bInDispose;
346 }
347 
348 //IAccessibility2 Implementation 2009-----
349 typedef ::cppu::WeakAggComponentImplHelper7<
350 			::com::sun::star::accessibility::XAccessible,
351 			::com::sun::star::accessibility::XAccessibleComponent,
352 			::com::sun::star::accessibility::XAccessibleContext,
353 			::com::sun::star::accessibility::XAccessibleEventBroadcaster,
354 			::com::sun::star::accessibility::XAccessibleValue,
355 			::com::sun::star::accessibility::XAccessibleAction,
356 			::com::sun::star::lang::XServiceInfo >
357 			SvxRectCtlChildAccessibleContext_Base;
358 //-----IAccessibility2 Implementation 2009
359 
360 
361 class SvxRectCtlChildAccessibleContext : public SvxRectCtlChildAccessibleContext_Base
362 {
363 public:
364 	SvxRectCtlChildAccessibleContext(
365         const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxParent,
366 		const Window& rParentWindow,
367 		const ::rtl::OUString& rName, const ::rtl::OUString& rDescription,
368 		const Rectangle& rBoundingBox,
369 		long nIndexInParent );
370 protected:
371 	virtual ~SvxRectCtlChildAccessibleContext();
372 public:
373 	//=====  XAccessible  =====================================================
374 
375     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL
376     	getAccessibleContext( void ) throw( ::com::sun::star::uno::RuntimeException );
377 
378 	//=====  XAccessibleComponent  ============================================
379 
380     virtual sal_Bool SAL_CALL
381 		containsPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
382 
383     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
384 		getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
385 
386     virtual ::com::sun::star::awt::Rectangle SAL_CALL
387 		getBounds() throw( ::com::sun::star::uno::RuntimeException );
388 
389     virtual ::com::sun::star::awt::Point SAL_CALL
390 		getLocation() throw( ::com::sun::star::uno::RuntimeException );
391 
392     virtual ::com::sun::star::awt::Point SAL_CALL
393 		getLocationOnScreen() throw( ::com::sun::star::uno::RuntimeException );
394 
395     virtual ::com::sun::star::awt::Size SAL_CALL
396 		getSize() throw( ::com::sun::star::uno::RuntimeException );
397 
398 	virtual sal_Bool SAL_CALL
399 		isShowing() throw( ::com::sun::star::uno::RuntimeException );
400 
401     virtual sal_Bool SAL_CALL
402 		isVisible() throw( ::com::sun::star::uno::RuntimeException );
403 
404     virtual sal_Bool SAL_CALL
405 		isFocusTraversable() throw( ::com::sun::star::uno::RuntimeException );
406 
407     virtual void SAL_CALL
408 		addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
409 			throw( ::com::sun::star::uno::RuntimeException );
410 
411 	virtual void SAL_CALL
412 		removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
413 			throw (::com::sun::star::uno::RuntimeException);
414 
415     virtual void SAL_CALL
416 		grabFocus() throw( ::com::sun::star::uno::RuntimeException );
417 
418     virtual ::com::sun::star::uno::Any SAL_CALL
419 		getAccessibleKeyBinding() throw( ::com::sun::star::uno::RuntimeException );
420     virtual sal_Int32 SAL_CALL
421         getForeground(  ) throw (::com::sun::star::uno::RuntimeException);
422     virtual sal_Int32 SAL_CALL
423         getBackground(  ) throw (::com::sun::star::uno::RuntimeException);
424 
425 	//=====  XAccessibleContext  ==============================================
426 
427     virtual sal_Int32 SAL_CALL
428     	getAccessibleChildCount( void ) throw( ::com::sun::star::uno::RuntimeException );
429 
430     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
431     	getAccessibleChild( sal_Int32 nIndex )
432 			throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException );
433 
434 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
435     	getAccessibleParent( void ) throw( ::com::sun::star::uno::RuntimeException );
436 
437 	virtual	sal_Int32 SAL_CALL
438     	getAccessibleIndexInParent( void ) throw( ::com::sun::star::uno::RuntimeException );
439 
440 	virtual sal_Int16 SAL_CALL
441     	getAccessibleRole( void ) throw( ::com::sun::star::uno::RuntimeException );
442 
443 	virtual ::rtl::OUString SAL_CALL
444     	getAccessibleDescription( void ) throw( ::com::sun::star::uno::RuntimeException );
445 
446 	virtual ::rtl::OUString SAL_CALL
447     	getAccessibleName( void ) throw( ::com::sun::star::uno::RuntimeException );
448 
449 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL
450     	getAccessibleRelationSet( void ) throw( ::com::sun::star::uno::RuntimeException );
451 
452 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
453     	getAccessibleStateSet( void ) throw( ::com::sun::star::uno::RuntimeException );
454 
455 	virtual ::com::sun::star::lang::Locale SAL_CALL
456     	getLocale( void )
457 			throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::accessibility::IllegalAccessibleComponentStateException );
458 
459     //=====  XComponent  =====================================================
460 
461     using ::cppu::WeakAggComponentImplHelperBase::addEventListener;
462     using ::cppu::WeakAggComponentImplHelperBase::removeEventListener;
463 
464 	//=====  XAccessibleEventBroadcaster  =====================================
465 
466 	virtual void SAL_CALL
467     	addEventListener(
468         	const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
469 			throw( ::com::sun::star::uno::RuntimeException );
470 
471 	virtual void SAL_CALL
472     	removeEventListener(
473 			const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
474 	        throw( com::sun::star::uno::RuntimeException );
475 
476 	//=====  XAccessibleValue  ================================================
477 
478     virtual ::com::sun::star::uno::Any SAL_CALL
479 		getCurrentValue() throw( ::com::sun::star::uno::RuntimeException );
480 
481     virtual sal_Bool SAL_CALL
482 		setCurrentValue( const ::com::sun::star::uno::Any& aNumber ) throw( ::com::sun::star::uno::RuntimeException );
483 
484     virtual ::com::sun::star::uno::Any SAL_CALL
485 		getMaximumValue() throw( ::com::sun::star::uno::RuntimeException );
486 
487     virtual ::com::sun::star::uno::Any SAL_CALL
488 		getMinimumValue() throw( ::com::sun::star::uno::RuntimeException );
489 
490 //IAccessibility2 Implementation 2009-----
491 	// XAccessibleAction
492 	virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (::com::sun::star::uno::RuntimeException);
493 	virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
494 	virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
495 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
496 //-----IAccessibility2 Implementation 2009
497 	//=====  XServiceInfo  ====================================================
498 
499 	virtual ::rtl::OUString SAL_CALL
500     	getImplementationName( void ) throw( ::com::sun::star::uno::RuntimeException );
501 
502     virtual sal_Bool SAL_CALL
503     	supportsService( const ::rtl::OUString& sServiceName ) throw( ::com::sun::star::uno::RuntimeException );
504 
505 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
506     	getSupportedServiceNames( void ) throw( ::com::sun::star::uno::RuntimeException );
507 
508 
509 	//=====  XTypeProvider  ===================================================
510 
511     virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
512         getImplementationId( void ) throw( ::com::sun::star::uno::RuntimeException );
513 
514 	//===== internal ==========================================================
515 
516 	/// Sets the checked status
517 	//void setStateChecked( sal_Bool bChecked );
518 	// IAccessibility2 implementation 2009. ------
519 	void setStateChecked( sal_Bool bChecked, sal_Bool bFireFocus = sal_True);
520 	void FireFocusEvent();
521 	// ------ IAccessibility2 implementation 2009.
522 protected:
523 	virtual Rectangle GetBoundingBoxOnScreen( void ) throw( ::com::sun::star::uno::RuntimeException );
524 
525 	virtual Rectangle GetBoundingBox( void ) throw( ::com::sun::star::uno::RuntimeException );
526 
527 	void CommitChange( const com::sun::star::accessibility::AccessibleEventObject& rEvent );
528 
529 	virtual void SAL_CALL disposing();
530 
531 	/// @returns true if it's disposed or in disposing
532 	inline sal_Bool IsAlive( void ) const;
533 
534 	/// @returns true if it's not disposed and no in disposing
535 	inline sal_Bool IsNotAlive( void ) const;
536 
537 	/// throws the exception DisposedException if it's not alive
538 	void ThrowExceptionIfNotAlive( void ) throw( ::com::sun::star::lang::DisposedException );
539 
540 	///	Mutex guarding this object.
541     ::osl::Mutex						maMutex;
542 
543 private:
544 
545     /**	Description of this object.  This is not a constant because it can
546     	be set from the outside.  Furthermore, it changes according the the
547         draw page's display mode.
548     */
549     ::rtl::OUString						msDescription;
550 
551     /**	Name of this object.  It changes according the the draw page's
552         display mode.
553     */
554     ::rtl::OUString						msName;
555 
556     ///	Reference to the parent object.
557     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
558 										mxParent;
559 
560 	/// Bounding box
561 	Rectangle*							mpBoundingBox;
562 
563 	/// window of parent
564 	const Window&						mrParentWindow;
565 
566     /// client id in the AccessibleEventNotifier queue
567     sal_uInt32                          mnClientId;
568 
569 	/// index of child in parent
570 	long								mnIndexInParent;
571 
572 	/// Indicates, if object is checked
573 	sal_Bool							mbIsChecked;
574 };
575 
576 inline sal_Bool SvxRectCtlChildAccessibleContext::IsAlive( void ) const
577 {
578 	return !rBHelper.bDisposed && !rBHelper.bInDispose;
579 }
580 
581 inline sal_Bool SvxRectCtlChildAccessibleContext::IsNotAlive( void ) const
582 {
583 	return rBHelper.bDisposed || rBHelper.bInDispose;
584 }
585 
586 
587 #endif
588